Slow Acting Long Time Interval PID Tuning

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?

Volume of contents = volume of media

glycol = coolant.

the volume of the glycol jackets is relatively small.
 
...moving the Ki to 120, probs on Thursday.

I've got a working model, see the plot below; it's an approximation based on tweaking parameters of a simple physical model (not exactly MathCad ;)). It's not perfect (I was really hoping to get those sharp valleys right), but my calibrated eyeball thinks it's close enough to do some tuning tests will that take a few seconds instead of 24h.

okay.png

Blue plots the discretised raw PV data from the massaged eXcel workbook; orange plots the non-discretised model prediction based on the raw CV positions from the same workbook. The modeling starts at the peak because dPV/dt was 0, where I thought it was reasonable to estimate the initial conditions (although I am having second thoughts about that). Going to tweak the model some more, convert it to a class, then write a PID class (which should be quick and re-usable), then write a wrapper to simulate the whole ball of wax, and hopefully have something later today*.



The model is simple enough that it could be refactored into AdvancedHMI and run against an actual PLC with a PID/E instruction, but running that for 24h seems pointless.



I'll put the code (Python) in a repository on Github** eventually; documentation is thin at this point, but I'll be willing to make it available if anyone is interested.


* Actually it would probably be faster to send my Differential equations to @PeterN and he can plonk it into MathCad and be done in twenty minutes.


** @PeterN, do you have a preference whether I should/could include your SOPDT code in that repo?
 
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.

If you only move the integral setting by that amount, response is very likely to become unacceptably slow. I strongly suggest eliminating derivative and deadband along with a modest increase in proportional action. For example:

P=50, I=60, D=0 for the A-B PIDE dependent gains.

Or, if there is concern with such a large increase in P, maybe start with 20 and see if the PV holds at target under disturbances or a set point change. Incrementally increase both P and I if you are seeing an improvement in performance.

One other separate test that can be helpful is to run in manual at a fixed coolant valve opening (e.g., the average of the oscillation) with the process under sufficient supervision. This will indicate if you are dealing with some kind of periodic disturbance contributing to the PV oscillation.
 
@drbitboy, the dead time must be much longer than 1.0



whoops: dt is model timestep, in seconds; I've run it as low as 0.125s with no noticeable change.



I don't think so: the temperature starts rising immediately (within minutes) of the valve closing. I understand a huge process lag with a jacketed tank, but not deadtime (unless there are hundreds of feet or more of glycol line between the chiller and the tank), and any deadtime that is there is significantly smaller than lag, and so can be more or less ignored from a control perspective.


Cf. Post #33 also.
 
Last edited:
Summary

Prediction: @GrizzlyC is going to look like a rockstar tomorrow.

TL;DR


Take my model with a grain of salt, but it suggests @Mispeld's parameters are right on (no surprise; this is not a complex system):

Kc50_Ti60_Td0.png

Also, changing Ti to 120, but without increasing Kc, will eventually get there, but with an overshoot more than twice what we see from the original cycling tuning:

Kc5_Ti120_Td0.png


N.B. Td=1.5 vs. 0 makes very little difference.
 
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%?

Prediction: @GrizzlyC is going to look like a rockstar tomorrow.

I think the valve characteristics also need to be addressed. The valve openness is not the same on the way up as on the way down. In the original graph, 3% on the way up is "levelled out temperature" but 3% on the way down gives a dt the same as at 7%.

To me, once you have gone to 4%, to get back to the same flow as was at 3% you might have to close the valve to -1% or -2%.

Note: talking in % is confusing, so:
-2%=6.74mA
-1%=6.87mA
3%=7.39mA
4%=7.52mA

I am not sure of the right solution for the OP. Maybe changing mininum to 6mA will help, but then you have to put some logic in for starting up, especially if Ti has been increased as proposed.

I did not see it mentioned in this long post, wether you are using dependent or independent gains? From memory with the PIDE, this would make your Integral term either in units of %/second or minutes/repeat. Maybe their were clues elsewhere that I missed.
 
...

I did not see it mentioned in this long post, wether you are using dependent or independent gains? ...
Dependent: it's in the OP.
...3% on the way up is "levelled out temperature" but 3% on the way down gives a dt the same as at 7%. ...

Summary


Cf. the (model) plots here, especially the varying offset between [PV predict] and [Tank predict] in the third image.

TL;DR


My WAG is 3.07%.

There is significant lag in temperature between the bulk of the material* and the temperature sensor, which sensor tip is isolated from the cooling surfaces (cf. Post #49) by a thermal barrier and a thermowell. So the bulk of the material will always be colder than the sensor, and more so the higher the CV setting (i.e. cooling dQ/dt) and duration at that setting. And of course, something to always consider is that the PIDE is controlling the temperature of the sensor only**. That explains the difference between 3% on the way up (opening from being closed) and 7% on the way down.

* which will have a temperature gradient increasing from where it contacts the cooling jacket surface, but (IMNSHO ;)) the bulk media can be thought of - i.e. modeled - as having a single temperature of Q/(MCp) i.e. total heat over total thermal inertia.

** Okay, yes, it's controlling the mA or V signal the transducer sends to the PLC PV input, but you can choose how reductive to get in your own posts ;).
 
Last edited:
So how does that work for the non-linear ball valve?


Are you asking me that question?




Because for this thread, with the valve never going more than a dozen percent past open, a simple exponential model is good enough, and I would not be surprised if a linear model did the trick.
 
Last edited:

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
38
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
707
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
530
Back
Top Bottom