Slow Acting Long Time Interval PID Tuning

Darn. I had a response all written up before I realized I need PVEUMin and PVEUMax, not the corresponding CV scales.

The default for these is also 0 and 100, but a decent chance they were modified depending on your temperature range.
 
Is this a new or an existing installation?


If the latter, has the PID ever controlled the temperature better than this?
 
I'm interested in your comment about how " there might be too much pure deadtime. If true, and the CV has room to work it could very well be possible to significantly reduce or eliminate the amplitude of oscillation."


@Mispeld actually wrote "the might not be too much pure deadtime"
 
The parameter that will close the valve before the temperature is exceeded is the derivative factor D that acts not by the error value (PV - SV) but by its variation.

You would have to play with it and see the effect, the dilemma is that there are PID implementations on which increasing D the derivative effect increases and in others it decreases, therefore you will first have to test whether you should increase or decrease it.

If you put excessive effect it can also generate oscillation.

If you manage to stabilize the oscillation but it takes a long time to finally reach the setpoint then you would have to adjust I

Systems with a lot of thermal inertia need derivative effect.
 
Last edited:
With a peak to peak time of 5 hours I would expect the I = (5 * 60)=300 and the D 1/8 * I = 45. That would be my starting point. I am assuming that 'I' is minutes per repeat of course.
 
You guys are flailing and failing

The first thing I would do is plot the integrator's contribution to the control output. Then it is easy to see if it is winding up or down too much.


I would also model the system. Rockwell PLCs/software can save away the trend. The control output and PV must be recorded as a function of time. Then it is possible compute a model. An accurate model will probably be required because a simple PID may not work by itself.


I would use a Smith Predictor but this will require the use of a long FIFO or queue to record data. Another method that would work is MPC or model predictive control but that method is too complicated to implement in a PLC and it still requires an accurate model.


When the dead time is longer than the time constants the system will be difficult to tune. A thousand curses on the engineers that design systems like this that don't consider how it will be controlled.


Here is an example of of using a PID with Smith Predictor.
In this example the plant is modeled as a SOPDT system with the two time constants being 0.5 and 2 minutes. The dead time is 180 minutes which is MUCH longer than the plant time constants.
To make tuning more realistic I introduce modeling error at the top of page 6.

https://deltamotion.com/peter/Mathcad/SOPDT/Mathcad - SOPDT SP.pdf


I created this a long time ago. I am sure it has been posted before.

I know the date is wrong.
 
Darn. I had a response all written up before I realized I need PVEUMin and PVEUMax, not the corresponding CV scales.

The default for these is also 0 and 100, but a decent chance they were modified depending on your temperature range.

Lol thanks for doing that anyways but yeah its default 0-100%
 
Is this a new or an existing installation?


If the latter, has the PID ever controlled the temperature better than this?

This is an addon to an existing temperature control system. The first system actually had 2 state valves controlling the temperature within a 0.5C deadband, however the large load of glycol shocked the product and was detrimental to the final result and we had to change to a proportional system.
 
The parameter that will close the valve before the temperature is exceeded is the derivative factor D that acts not by the error value (PV - SV) but by its variation.

You would have to play with it and see the effect, the dilemma is that there are PID implementations on which increasing D the derivative effect increases and in others it decreases, therefore you will first have to test whether you should increase or decrease it.

If you put excessive effect it can also generate oscillation.

If you manage to stabilize the oscillation but it takes a long time to finally reach the setpoint then you would have to adjust I

Systems with a lot of thermal inertia need derivative effect.

I agree that this system has a lot of thermal inertia which is the cause of all my problems. I started with 35Kp 8Ki and 0Kd Adjusting the Kd parameter in this AB PIDE instruction up from 0.5, 1.5 and then 3 did not result in anything other than random spikes in the opposite direction of the control action. The spikes occurred if the PV went up or down 0.01C then the CV immediately went back to its original value. If the spikes were smoothed out it would have been beneficial.

In order to test this I extended the PID algorithm time from 1 seconds to 45 seconds. This however had none to negligible effects.
 
With a peak to peak time of 5 hours I would expect the I = (5 * 60)=300 and the D 1/8 * I = 45. That would be my starting point. I am assuming that 'I' is minutes per repeat of course.

Its Mins/Repeat, sorry should have mentioned that earlier.
 
The first thing I would do is plot the integrator's contribution to the control output. Then it is easy to see if it is winding up or down too much.


I would also model the system. Rockwell PLCs/software can save away the trend. The control output and PV must be recorded as a function of time. Then it is possible compute a model. An accurate model will probably be required because a simple PID may not work by itself.


I would use a Smith Predictor but this will require the use of a long FIFO or queue to record data. Another method that would work is MPC or model predictive control but that method is too complicated to implement in a PLC and it still requires an accurate model.


When the dead time is longer than the time constants the system will be difficult to tune. A thousand curses on the engineers that design systems like this that don't consider how it will be controlled.


Here is an example of of using a PID with Smith Predictor.
In this example the plant is modeled as a SOPDT system with the two time constants being 0.5 and 2 minutes. The dead time is 180 minutes which is MUCH longer than the plant time constants.
To make tuning more realistic I introduce modeling error at the top of page 6.

https://deltamotion.com/peter/Mathcad/SOPDT/Mathcad - SOPDT SP.pdf


I created this a long time ago. I am sure it has been posted before.

I know the date is wrong.

I took a look through your Mathcad document with the smith predictor in it. I won't lie that this is way over my head. I did however send off some screen captures of some trend displays to our engineering department. A screen capture can only give you so much information but our engineer returned with our original parameters of,

P=35
I=8
D=0

Which was not a bad start. Now that we have been going for about a week I connected an SQL database to the factorytalk application to get some refined data. That chart I showed earlier on has been compiled into an excel spreadsheet with a pivot table. I sent off that information to our engineer to further refinement.

Ill have to ask him if he uses a smith predictor to determine the gains, im sure he uses something close to that.

Without imposing I still have the spreadsheet if anybody is interested is seeing the recorded data in CSV form.
 
I took a look through your Mathcad document with the smith predictor in it. I won't lie that this is way over my head. I did however send off some screen captures of some trend displays to our engineering department. A screen capture can only give you so much information but our engineer returned with our original parameters of,

P=35
I=8
D=0
What are the units for the proportional gain?
The integrator usually is a time constant or has units of minutes.
Which was not a bad start.
The integrator time constant is way too short for a system like yours.
Are you going to plot the integrator's contribution to the control output?
The RS5000 can save the trend data and export it as en excel spread sheet.
Now that we have been going for about a week I connected an SQL database to the factorytalk application to get some refined data. That chart I showed earlier on has been compiled into an excel spreadsheet with a pivot table. I sent off that information to our engineer to further refinement.
I doubt they know what they are doing.
Ill have to ask him if he uses a smith predictor to determine the gains, im sure he uses something close to that.
A Smith Predictor is not used to calculate gains. It is used to predict what the system will do 5 hours in advance in your case. This keeps the integrator from winding up when the actual system isn't responding.


Without imposing I still have the spreadsheet if anybody is interested is seeing the recorded data in CSV form.
Yes, if you can display it in 3 columns
Time, Control Output , PV
I will use this program to estimate the plants SOPDT parameters.
https://deltamotion.com/peter/py/SysID%20SOPDT.zip
I have posted this a few times. It should be stickied somewhere obvious.
 
I agree that this system has a lot of thermal inertia which is the cause of all my problems. I started with 35Kp 8Ki and 0Kd Adjusting the Kd parameter in this AB PIDE instruction up from 0.5, 1.5 and then 3 did not result in anything other than random spikes in the opposite direction of the control action. The spikes occurred if the PV went up or down 0.01C then the CV immediately went back to its original value. If the spikes were smoothed out it would have been beneficial.

In order to test this I extended the PID algorithm time from 1 seconds to 45 seconds. This however had none to negligible effects.

I have seen some PID algorithm in PLCs and also in panel temperature controllers in which the derivative effect makes that rebound that you describe but the sum of both corrections usually goes in the correct direction of the control action.

But if you only regulate every 45 seconds, it may be that the first correction in the opposite direction has an effect that is too long and harmful.

I installed in the past about a hundred large industrial furnaces with tens of tons of material inside and always used a fixed PID run period of 3 seconds.
 
I have seen some PID algorithm in PLCs and also in panel temperature controllers in which the derivative effect makes that rebound that you describe but the sum of both corrections usually goes in the correct direction of the control action.

But if you only regulate every 45 seconds, it may be that the first correction in the opposite direction has an effect that is too long and harmful.

I installed in the past about a hundred large industrial furnaces with tens of tons of material inside and always used a fixed PID run period of 3 seconds.


The problem is that very few really understand PIDs. The teachers teach what they were taught but it is very shallow.
Most people are taught what the different gains do. This is OK but it they are not taught what they really do. That is the problem.


The PID gains and time constant place poles and zeros but were are mostly concerned with poles. Closed loop poles are the roots of the denominator of a closed loop transfer function. The closed loop poles determine the response. Negative closed loop poles cause the error to decay. The more negative they are the faster the errors will disappear. Imaginary poles will result in over shoot. All of this can be calculated.


Way back in the 1990s there were newsgroups where people would brag about tuning a large number of systems that were all the same. That was no big deal. I was not impressed. It showed no real understanding of closed loop control. I ruffled a lot of feathers by saying it could all be calculated.


In this application the update time isn't that critical. The update time should be at least 10 times shorter than the plants shortest time constant but in the OP's case the plant appears to have a very long time constant. 45 seconds would do since it appears the plants time constant is more than 10 minutes long, it is just an odd ball value. 3 seconds or 10 seconds would do. That isn't the main problem. It is the dead time.
 

Similar Topics

Hey guys, I have a Controllogix and I am tying to control a PID loop for Chlorine (CL2). The trouble is the mixing point is 15 minutes away from...
Replies
16
Views
6,716
Hi All, we've recently upgraded from FTView SE v10 to v12. Since the upgrade we've been having a problem where the HMI is slow to update tags in...
Replies
0
Views
45
Hi, I have some problem with View Point which I'm using to manual control of conveyors. On begin when in network was only PLC and HMI View Point...
Replies
0
Views
62
Hi. Importing a 2014 aapck in 2023: no problem using it, adding windows, works very well, no problem whatsoever. Creating a new project: as...
Replies
2
Views
708
I am having a weird experience using KepwareEx6 as an OPC Server for a set of SLC processors where the tag data is not updating remotely at the...
Replies
2
Views
531
Back
Top Bottom