Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

PID controller (find equation) instead of hardware controller 1

Status
Not open for further replies.

john111smith

Computer
Apr 9, 2006
26
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

hrdwr.JPG
 
Replies continue below

Recommended for you

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
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
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.
 
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
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
Skogs is right, this is a horrible circuit. There are a huge number of better designs out there:

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.

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: is one of them.

----------------------------------
image.php
Sometimes I only open my mouth to swap feet...
 
"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
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
What is your suggestions for optimization or new design of output 0-100V stage (U6/Q1)?
 
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...



----------------------------------
image.php
Sometimes I only open my mouth to swap feet...
 
turbo pump is always ON.
valve is controlled by output 0-100V stage (U6/Q1)
 
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.

 
U5 with feed-back is a PI controller. The circuit is terrible. ;-)

Gunnar Englund
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor