PID help needed

GEOFRA

Member
Join Date
Jul 2002
Location
Nicosia
Posts
99
Dear all, I have a problem tuning a PID loop. I am trying to control the temperature of a pasteurizer for beer cans and bottles. I am using S7-200 Siemens PLC and the analogue ouput controls a 0-2.5bar proportinal pneumatic controller which in turn controls an analogue pneumatic valve that controls the steam.I need to keep the temperature to SP1 at 60C and when movement stops for some reason I need to use a second SP2 at 45C. Now when the system starts in the morning from 27-30C it goes in approximately 30mns to 60 and its very steady there (+/- 0.1C). The problem starts when there is a disturbance in the system i.e when movement stops temporarily( sometimes for seconds)and SP2 is going to be used. Temperature rises above 62C and falls very slowly as there are no more cold cans or bottles entering the pasteurizer during this idle time. The output of the PID is decreasing very slowly and I have this overshoot. I have done an auto tune of the PID and I got a suggestion of Gain 20 and Integral time 6.6mins. I reduced Integral to 1 min in steps of 1 min every time and I also try to decrease gain to 15 in steps of 1 but there is no improvement to this overshoot. Any ideas deeply appreciated.
 
This problem is similar to another recent PID thread. The load on the system is proportional to the material flow through the system.

Currently the integrator must wind up to provide the necessary control output for the current load. When the load goes away the integrator is wound up too high and must unwind.

The cure is to look at the integrator's contribution to the control output when the bottles are going through the system at the maximum rate. The integrator term should be wound up the highest then.Lets call this term the peak_integrator_windup. Now you need to compute a bias term bias=current_bottle_rate*peak_integrator_windup/maximum_bottle_rate.

This effectively predicts how much heat is required for the current bottle rate. The integrator will not have to windup so much, in fact it shouldn't wind up at all. When the line stops the bias term will go to zero immediately so the heat added to the system will drop immediately too.
 
In addition to what Peter has already said you will find that there is also a "minimum" value that the integrater will settle at without any bottles/cans added. This represents the thermal loss of the system i.e. the amount of energy required just to keep the pasturiser at the current temperature. So the calculation of the bias becomes: Bias = Minimum + (Current_bottle_Rate * (peak_integrator_windup - Minimum)/Max_Bottle_rate).

Depending on how well insulated the pasturiser is, you may find that the minimum input to the system is very small or it may me a significant value.

Nick
 
Peter thank you for your answer. So if I got this right you mean that I need to change my integrator from peak value to zero since I actually have a specific bottle rate when bottles move in the pasteurizer and zero bottle rate when they are not moving? As I understand it bias will be either zero or 1 since I have a rate when moving and zero rate when not.
 
Peter thank you for your answer. So if I got this right you mean that I need to change my integrator from peak value to zero since I actually have a specific bottle rate when bottles move in the pasteurizer and zero bottle rate when they are not moving?
You have the right idea and that would work sort of. However, I would change the integrator to that value the integrator is normally at when maintaining temperature when the line is stopped.

As I understand it bias will be either zero or 1 since I have a rate when moving and zero rate when not.
NO!!!! Assume there is no error so the P and D term are not contributing anything to the output. Where does the control output come from then? Currently it is only the integrator. The integrator will probably windup up to some minimal amount just to maintain temperature when line is stopped. As the line speeds up the integrator will wind up too to heat the increasing load. Why not predict what the integrator will do? Why not set the bias to a value that will keep maintain the temperature when the line is stopped. As the line speed increases, increase the bias too so when the line speed is at maximum the bias will be at the same level the integrator would be at. Use a SCP function where the input is the line speed and the output is the bias.

Now, the bias will alway be pretty close to the required control output. The integrator will not wind up unless there is a error in your bias calculation. Now when the line stops the bias will go back instantly to the value needed to keep the system warm when stopped. Since the integrator hasn't wound up or wound up much it will not need to unwind.

The key is to predict the control output and set the bias to that value. The PI control will take care of any small errors in the bias calculation.
 
Peter sorry if I don't get this right. I don't have experience with PID and am using the PID wizard in which I can set Gain, Integral Time, Derivative time and sampling rate. What you mean by bias? I don't have such a parameter in my PID wizard.
 
This is not your control problem.
The overshoot comes whem the belt stops. the steamheater is very hot at that moment and thus you will have some overshoot. almost Nothing to prevent it.
Solution can be to shoot in some cold water, that is no good efficiency, however the product will be better (be aware of minimum sterilisation. Better is to have a buffer on the end, so the line will always run until empty. This will affect the temp, but that is controllable. This way all bottles will always be nice sterilised , pasteurized whatever.
 
Most pre-packaged PID loops have a method whereby you can offset the output. This is usually called offset or feed forward. If the S7-200 PID doesn't have such a thing then you can add your "bias" to the PID output programmatically. Say for example with no bottles entering the system the PID output settles at 10% and at full speed the PID output settles at 50%. If the conveyor is stopped then the bias needs to be 10%, if the conveyor runs at half speed then the bias would be 10% + (0.5 * 50 - 10) = 30%.

Nick
 
Thank you all for contributing on this. Finally I have managed to make this work perfectly well with an overshoot of 0.3 degrees C on disturbances which is very good. Initially I was told that the valves would operate on 0-2.5 bar. When I first went there I noticed that valves started opening at a value of 19000 at my analogue output. So I scaled may output from 19000 at minimum to 32000 at maximum instead of 6400-32000. This seems to make the system overshoot. I replaced 19000 with 6400 and it works perfectly. Thank you all again.
 

Similar Topics

Hello, I have a problem with tuning my PID loop in my RS5000 project. In my program I am using a PID loop to control the KW output of an engine...
Replies
11
Views
4,305
Hi, I'm new here and horribly inept in working with Step7 and i have a problem. I am trying to use PID control on two analog valves in order to...
Replies
2
Views
1,699
Hi Experts; I attached an image of pid parameters setting. When i increase the speed of gas turbine the speed goes 1% up then come back 1% down...
Replies
17
Views
4,332
Hi experts; I have Ge 90-30 CPU 352. I use PID (ISA) and first set only the proportional and setting as under; Error term= SP-PV Upper clamp=32000...
Replies
4
Views
2,045
dear all: we have a automated vehicle which runs on a magnetic tape. we are taking analog input [0 to 10] volts from a reader this has a...
Replies
3
Views
3,687
Back
Top Bottom