Slow Acting Long Time Interval PID Tuning

The attached workbook is an approach to suggestion #1 in the previous post. The optimization might work better with the fitted data, and without compromising results. If a negative CV is a problem, it can also be offset (i.e., CV Mod+ column).
 
Two suggestions: (1) apply smoothing functions to the plant data, and add a CV offset to create a smooth bottom to its oscillation instead of the discontinuity at zero, and (2) force a first order w/ deadtime system so there are only three optimization parameter (if I understand correctly), and run a series of evenly-spaced grid "searches," and then plot the objective on a series of 3D plots to visually interpret the "surfaces" that simplex is operating on. This may help guide the starting values to find the minimum objective of interest.

For the PV being sent to the PID I am running it through a 10 second filter and then truncating the output to 2 decimal places. (00.00). I do this because the filter output is a 7 decimal place REAL that moves frequently in either direction and produces undesirable effects on the PID CV.

I can change that CV output to not bottom out at zero, this will also have the effect increasing the deadtime as it will take longer for the valve to open enough to send cooling. However I think that having it not bottom out is a good step forward.

Regarding the TankFit document you posted, I see that the graph has averaged in the datapoints but what am I really looking at here?
 
I can change that CV output to not bottom out at zero, this will also have the effect increasing the deadtime as it will take longer [because of reset wind up?] for the valve to open enough to send cooling. However I think that having it not bottom out is a good step forward.


There should be no reset wind up in the PIDE if the CV minimum value is accomplished by either

  1. seting the PIDE the CV minimum value (CVEUmin?),
  2. OR
  3. adding 1 to the PIDE output CV value, but doing the adding external to the PIDE, so 0 by the PIDE becomes 1 to the CV conversion and everything downstream
 
Last edited:
For the PV being sent to the PID I am running it through a 10 second filter and then truncating the output to 2 decimal places. (00.00). I do this because the filter output is a 7 decimal place REAL that moves frequently in either direction and produces undesirable effects on the PID CV.


The Kc (proportional gain) and/or Kd (derivative gain) are too high and/or the deadband is too small.
 
For the PV being sent to the PID I am running it through a 10 second filter and then truncating the output to 2 decimal places. (00.00). I do this because the filter output is a 7 decimal place REAL that moves frequently in either direction and produces undesirable effects on the PID CV.

I can change that CV output to not bottom out at zero, this will also have the effect increasing the deadtime as it will take longer for the valve to open enough to send cooling. However I think that having it not bottom out is a good step forward.

Regarding the TankFit document you posted, I see that the graph has averaged in the datapoints but what am I really looking at here?

Considering a process lag in the 10's of minutes, a filter with a 10-second time constant is not unreasonable. That is kind of long in my experience for dealing with instrumentation noise. Regardless, unless I am missing something, the rounding of the CV to integer values prevents excessive valve reversals; though I could imagine the occasional issue with CV "noise" when it moves through the round-off point (this actually happens in the dataset at around 40000 seconds elapsed time when it flips between 6% and 7%.)

Maybe there is a misunderstanding with respect to CV scaling and the valve positioner. I am assuming a CV = 0 means the valve is fully closed, and coolant flow is stopped. Or if not fully closed, a minimum opening allowed for equipment or safety requirements. With the current tuning there are times when the controller wants a negative valve position, which, if real, would recover temperature more quickly toward target. The suggestion is to continue allowing CV to reach zero, but with some equipment/process change that results in less heat removal than the current zero point.

Finally the TankFit dataset are sinusoid models applied to the CV and PV time series as if the CV could go negative. So it is more like "eyeball averaging" in selecting the model variables to give the best visual fit. In retrospect the amplitude of the PV model might be a bit too large because if the CV could go negative, as mentioned above, the PV would have reversed sooner, without the v-shape.

Regarding suggestion #2 in my earlier post about plotting the response surface: there is a example of this in Mr. Nachtwey's system identification video on his youtube channel.
 
I have the valve go to complete closed position 4ma when at 0%CV to ensure the valve is closed and move it to 7ma at 1%CV to just barely crack it open and proportion it up from there in small increments as it is a ball valve.


4ma to 7ma is nearly 20% of a 4-20ma signal, and that is for the 1% change in PIDE CV. Now, we do not know the actual valve characteristic, nor do we know anything about non-linearities in the cooling system characteristic, but does that seem like a bit of a big jump to anyone else? At a minimum the PIDE assumes at near-linear (or near-equal-percentage) response between CV and PV.


So the first 0-to-1% in CV from the PIDE goes from 0 to 20% of the valve position, and the next 9% CV or so gets to 29-30%; could this system not be re-scaled to simply have linear CV position from 0-30%?
 
Hey Peter,

Update: Deadtime printed out is 0.006 (what are the units?)
Ooop, sorry about that. I really hate when I ask a question and I don't get an answer.

The units are minutes for the time constants and dead time.
I used the standard ISA PID.
The gain is control output percent per degree of error.


Again, the system identification program will work best if your initial guess is close to the real values. This way the system ID program will find the global minimum instead of a local minimum. I can estimate the real values by looking at a plot.
Please keep trying.
 
Last edited:
Here is how I think about this process i.e. it is trying to control an accumulating quantity by draining at a rate equal to that being added. In reality the quantity is heat (Q) with temperature as a proxy, an analogous model is level control, where the quantity is volume with level as a proxy.


slow_pide.png

Tau1 expresses the total heat capacity divided by the thermal resistance of the cooling jacket system (heat transfer coefficients; reciprocal of thermal conductivities; etc.). Tau2 expresses the same from the main body of the tank to the PT100 sensor inside the thermowell; Tau2 is ideally negligible compared to Tau1, but I put it in there to remind myself that the PIDE is controlling the temperature of temperature sensor, which is a proxy for the material temperature. There is also a Tau3 from the thermowell to the cooling system, but @GrizzlyC says that is properly insulated so Tau3 is infinity.

It could be argued whether the control valve in this model is represented accurately i.e. perhaps the CV could be seen as a setpoint cascading to level (model; temperature+flow reality) control loop in the cooling system, but that level of subtlety is probably not needed.

The point to made is that when CV goes to 0, the large volume in the main tank drops just a little as it quickly fills the smaller volume/level (i.e. cross-sectional area) in the cooling system, after which the inflow of material will start raising the main tank level. This is analogous to the large thermal inertia of the main tank quickly bringing the smaller thermal inertia of glycol in the cooling jackets to thermal equilibrium, dropping the main tank temperature slightly, after which the exotherm will start raising the temperature of the main tank. Also, the material around the thermowell would start its exotherm-driven temperature rise almost immediately as it is isolated from the cooling jackets.
 
@drbitboy
I am surprised the program didn't do better but the data isn't very good.


I just realized that the CV munging done means using the raw data is pointless:

  • At 0% CV output from the PIDE the valve signal is 4ma i.e. 0%
  • At 1% CV output from the PIDE the valve signal is 7ma i.e. 19.75% :oops:
  • I am going to assume CV:valve-signal is 1%:1% i.e. 1%:0.16ma after that.
Running the case now, but I still do not expect decent results: this is a ball valve controlling chilled glycol to a cooling jacket. The CV:pV behavior is unlikely to be linear.
 
Last edited:
4ma to 7ma is nearly 20% of a 4-20ma signal, and that is for the 1% change in PIDE CV. Now, we do not know the actual valve characteristic, nor do we know anything about non-linearities in the cooling system characteristic, but does that seem like a bit of a big jump to anyone else? At a minimum the PIDE assumes at near-linear (or near-equal-percentage) response between CV and PV.


So the first 0-to-1% in CV from the PIDE goes from 0 to 20% of the valve position, and the next 9% CV or so gets to 29-30%; could this system not be re-scaled to simply have linear CV position from 0-30%?

Thats right at about 7ma the ball valve just barely opens up, enough to see a crack of light through it. I bench tested it before I installed it.

I want to steer clear of a 1-20% range where nothing happens as that will cause an excessive amount of wind up.
 
Thats right at about 7ma the ball valve just barely opens up, enough to see a crack of light through it. I bench tested it before I installed it.

I want to steer clear of a 1-20% range where nothing happens as that will cause an excessive amount of wind up.


So there is no flow below a signal of around 7ma, say 19-20%?


During the bench test, did you characterize the flow vs. linear percentage? If yes, can you post that? Or can you point us to the flow characteristic of the valve? Thanks.


How did the test, with Ti = 120min, work out?
 
Last edited:
Thats right at about 7ma the ball valve just barely opens up, enough to see a crack of light through it. I bench tested it before I installed it.

I want to steer clear of a 1-20% range where nothing happens as that will cause an excessive amount of wind up.

I missed this part about valve response problems over a significant part of the CV range. If you have a flow measurement, it is not uncommon to linearize the valve response by manipulating the PID CV before sending the signal to the analog output. Similar to what you are already doing, but with a characteristic function that is the inverse of the uncompensated flow vs. CV.

You still might benefit from tuning adjustments in the short term, though it sounds like that valve configuration is a real impediment especially if the process operating window moves.
 
A query about the 11000L of media:


Is that the volume of the tank contents being cooled?


Or is it the volume of the glycol in the 2 cooling jackets?
 
So there is no flow below a signal of around 7ma, say 19-20%?


During the bench test, did you characterize the flow vs. linear percentage? If yes, can you post that? Or can you point us to the flow characteristic of the valve? Thanks.


How did the test, with Ti = 120min, work out?

I don't have a flow vs. linear percentage. But yeah no flow between 4 and 7ma

I plan to do that test with Ti 120 on Thursday. I got delayed due to production changes.
 
I missed this part about valve response problems over a significant part of the CV range. If you have a flow measurement, it is not uncommon to linearize the valve response by manipulating the PID CV before sending the signal to the analog output. Similar to what you are already doing, but with a characteristic function that is the inverse of the uncompensated flow vs. CV.

You still might benefit from tuning adjustments in the short term, though it sounds like that valve configuration is a real impediment especially if the process operating window moves.

I agree that the setup is not ideal but there are other companies that pull this system off successfully. If I was to set it up again I would use needle or globe valve to better control flow.

I can adjust the 0-100% range of the valve by manipulating the output mA after the PID, so I can increase the resolution. I just want to get a positive tuning tests before I do anything drastic.

At this point even with all of your guys help I'm still on track to just play around with the tuning parameters with no set direction other than moving the Ki to 120, probs on Thursday. Ill keep you updated and posts results as I get them.
 

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,747
Anyone have issues with RSLinx being very slow to open. It sometimes will say "Checking Activation" at the bottom for what seems like an...
Replies
2
Views
131
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
85
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
67
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
734
Back
Top Bottom