×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

PID controller (find equation) instead of hardware controller

PID controller (find equation) instead of hardware controller

PID controller (find equation) instead of hardware controller

(OP)
Hi All,
I wish you a Merry Christmas and a Happy New Year.

I try to use a PID controller instead of an old hardware vacuum controller. While, a turbo pump decrease pressure; a valve connected to the vacuum chamber, increase pressure.
What is the equation that represents the function of the proposed controller?
Also, how can I determine the PID controller constants and gains?

Regards,
J. Smith

RE: PID controller (find equation) instead of hardware controller

First thing: This doesn't look like it was designed - more like it has "happened". It may have evolved over some time and no one bothered to clean the house.

U1 is an inverting amplifier with gain -0.5. It turns the transducer input (0-5 V) into a 0- -2.5 V signal. R4 and R5 are there to make U1 see same resistance on its positive and negative inputs. Very unusual to do like this. Normal way is to use the equivalent value (3.3 k) instead. Things like these makes me think that this "controller" wasn't designed at all.

U2 is a voltage follower with gain +1.0, which buffers the setpoint from R36. So, setpoint moves 0- +5 V and actual value moves 0- -2.5 V. It seems that only half of the setpoint potentiometer can be utilized before saturating the controller.

U3 takes the difference between the two signals and amplifies it. It also reduces noise (C3 makes it behave like a first order low-pass). Gain is not so obvious - the voltage divider r7/r6 says that it is +7.9. The voltage follower configuration adds 1, so total gain is +8.9 - I would use +9 for gain.

Then, you have some gain adjustment/range switching around U4. Lowest gain is when S1 is open and S2 in opposite position. It is then (18//2.4)/150=0.0141 - the rest can be calculated correspondingly.

The controller as such is made up of U5 and its feed-back. P is set with R37 and ranges from 0 to 1.83. Integration time (input-output, not FB integral)  is a fixed 1200 milliseconds. FB integral ranges from 0 to 2200 milliseconds.

U6/Q1 is the output stage with negative feed-back from Q1 collector to U6 positive input. Looks like a difficult thing to make stable. Perhaps the extremely high base resistor R34 - 330 k) helps. But what about gain spread in Q1?

This whole circuit stinks. Very unprofessionally made.  There are so many unnecessary components and don'ts (Like the 2.2 k resistor at the opamp outputs - not necessary at all. And the "unusual" output stage). There is one thing the designer has learned, though - the use of balanced input resistors.  I certainly hope that this isn't a commercial controller.

Equation: the PI part is obvious, use numbers above. The setpoint and actual value channels as said above. Output stage (if at all stable) has a gain ranging from 7.5 - 27 when R38 goes from 0 to 1 Mohm.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: PID controller (find equation) instead of hardware controller

(OP)
the above circuit extracted from a mono layer old PCB.
because of simplicity, I didn't place 10K potentiometers (offset null) of all 741 opamps circuits. and also, RC [1k, 2n4] between B and C of Q1.
R37 is 67K7
the ouput is enough to drive piezoelectric voltage controlled valve.

if its possible, please write final equation with constants and gains.

RE: PID controller (find equation) instead of hardware controller

I have given you all information needed to write the expressions for setpoint channel gain, actual value gain, controller dynamics et cetera.

I see now that I omitted the FIO LP, it has a 1 millisecond time constant. But I see no reason for it. Any smoothing should be done where signals are input - not in the middle of the function. My guess is that it was put there to calm down oscillations caused by parasitic on-board feed-back. So it should not be used in your SW design.

The fact that the circuit does something - it may even work - does not mean that it is a good design. That was what I pointed out.

I think that a much better approach is to make an analysis of the vacuum system and build your controller from scratch in software. Inheriting data from something as badly designed as this will only give you problems.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: PID controller (find equation) instead of hardware controller

Skogs is right, this is a horrible circuit. There are a huge number of better designs out there:

http://newton.ex.ac.uk/teaching/CDHW/Feedback/DIY-PID.html shows a parallel-acting PID controller at building block level. There are obviously all the practical considerations to consider: local decoupling, input resistance balancing, ranging, an output driver stage,etc.

http://www.mae.ncsu.edu/homepages/silverberg/piddocs.pdf might be of interest too, especially if you are still developing your electronics knowledge. The circuit on the front cover looks more-or-less ready to go if you re-range the input stages and sort out a driver stage for the output actuators. In fact you might need two drivers suited to the two different actuators with a split range controller arranged so both actuators are idle at 50% output, pump runs at full speed at 100% output, valve opens 100% at 0% output (or vice-versa).

I haven't played much with PICs but I did see a couple of PID controller app notes: http://ww1.microchip.com/downloads/en/AppNotes/00937a.pdf is one of them.

----------------------------------
  Sometimes I only open my mouth to swap feet...

RE: PID controller (find equation) instead of hardware controller

"RC [1k, 2n4] between B and C of Q1"

Thanks - that makes the design possible. Without it, the output stage will oscillate.

In fact, this is vital information. It means that there is another LP in the system. I do not think it is worth-while, or necessary, trying to calculate the time constant of it. Having it inside the local FB may result in such a low value that it doesn't influence the total Bode plot.

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: PID controller (find equation) instead of hardware controller

(OP)
What is your suggestions for optimization or new design of output 0-100V stage (U6/Q1)?

RE: PID controller (find equation) instead of hardware controller

You mentioned both a turbo pump and a valve in your earlier post. Normally the output stage is designed to suit the load, but as you haven't told us anything about these items...

----------------------------------
  Sometimes I only open my mouth to swap feet...

RE: PID controller (find equation) instead of hardware controller

(OP)
turbo pump is always ON.
valve is controlled by output 0-100V stage (U6/Q1)

RE: PID controller (find equation) instead of hardware controller

you have a proportional only controller not pid with output rate limiting. the gain reqmt is determined by your valve/supply and vacuum sensor. the gain setting shouldn't be critical but determines the amount of valve opening.the circuit looks fine to me.

RE: PID controller (find equation) instead of hardware controller

U5 with feed-back is a PI controller. The circuit is terrible.  winky smile

Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...

RE: PID controller (find equation) instead of hardware controller

(OP)
Also, there is some produced gas at vaccum chamber during work of system, that change level of vaccum at random events. (Turbo pump works constant.) So, controller via valve must stablize adjusted level of vaccum.
I hope the control be simple :)

I going to use only final stage [U6/Q1] of the above {{{terrible}}} circuit, in my circuit. I will be appreciated with any suggestion or comments in this regard.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources