PID Nightmare

mark.t

Member
Join Date
Feb 2015
Location
USA
Posts
6
Hello, I am attempting to tune two PIDs for heating/cooling of a vessel jacket with steam and chilled water. This is the first time I attempt tuning a PID. So far, I have not been able to find the correct settings that will give the desired result since I need a Critically Damped response plus/minus 1 degree from setpoint. If my heating valve is wide open at 100% and close at setpoint I overshoot around 14 degrees C. In order for me to be within the 1 degree C overshooting, the heating valve can’t exceed 5% open for the final 15 degrees of heating. I am writing to see if an experienced programmer can shed some light that can guide me in the correct direction.
My setup is as follows:
Logix 5000 V31
CPU: 1769-L33ER
Analog Input Card: 1769-IF8, 4-20mA scaled for PID (0-16383)
Analog Output card: 1769-OF4, 4-20mA scaled for PID (0-16383)
RTD is a PT 100 range from 0-150
Steam/cooling valves are both Air to open valves 4-20mA
RTD channel input value goes to SCP set to: input min 0, input max 16383. Scaled min: 0 Scaled Max 1500. Stored at an Integer location.
Heating PID is set to: Dependent, SP-PV, update time 0.1, Derivative of PV, PV tracking, PV Unscaled min 0, PV unscaled max 16383, Engineering units min 0, Engineering Units Max 16383, CV min at 0% 0, CV max at 100% 16383.
Cooling PID has the same settings except for the action that is set to PV-SP.
Created a free running timer set to 100 milliseconds to execute both PID since they are located at the continuous task.
The heating PID output is moved to a SCP set to: input min 0, Input max 16383, scaled min 0, scaled max 16383 that is then moved to the output analog channel to control the valve. Heating and cooling SCP are both set in the same way.
I have tried to set the PID in several different scenarios like: with conditional logic, without conditional logic to no avail. I was contemplating the idea of opening the valve wide open until I reach a point and then switching for the PID to control the final stage of heating but so far have not been able to find a setting that would keep my PID within range. Another problem that I noticed is that for some reason the PID does not tend to close the valve much when reaching the setpoint, or even after reaching setpoint. Then after reaching the setpoint it continues to heat regardless of my settings. Manually I can control my valve output without any issues. Maybe I am missing something in my settings that I can’t seem to catch. I am about to lose my mind with this o_O. Any help would be greatly appreciated.
 
To be honest I am not the expert in PID loops, mainly because I usually end up not using them and make my own version.

Maybe because the things I control never fitted with in the box of the standard PID loop (or I never understood the full potential of the PID loop).
When I do a simulation of a PID loop it all loks fine an dandy, but i real life I never had any success.

What I normally find i that the energi in the surrounding struckture, plays a huge rolle that I find difficult to control with a PID loop.
 
Jacket heating is difficult using PID, to be honest I have used on/off control more effectively. Although I have used PID loops for heating & cooling they do not respond well, In actual fact on one system I disabled the PID and adjusted the output using my own algorithm this worked a treat but I still prefer on/off control or PWM. Another thing I assume you have vacuum breakers on the jacket, check these are working correctly, faulty units can affect the control, allow condensate to drain and protect the jacket from damage.
One other thing to try is to turn off I & D start with a High P value, reduce until it becomes unstable, bring it back up until stable then introduce I & D if required.
 
Hi, and welcome to the forum. I used a lot of PID control on a 2 year project with air handlers--burner control, fans, valves, de-humidification, temp extremes in a test cell for hybrid automobiles.
A few things that helped me: I used a SCL instruction in FBD with inputs and outputs for all my scaling. Although it created another routine, it worked very well and is less cumbersome to use. One can change values on the fly. I also only used the P and I features of the instruction and in independent mode. Lastly I had conditions ahead of some of the PIDs. Mostly as you stated your problems were, I would move different values into the kp, ki tags to either slow down or speed up the action depending on say if a temp was approaching setpoint or a burner percent open needed to be reduced. The chilled water valves for instance on theses air handlers were very slow acting; they used a motor with a gear reduction. I ended up sending a 100% and 0% command to the valves and timed them with a stopwatch to see how long it took from open to close. This way the PID output would be more in sync with the actual valve travel time. So if I commanded a 40% open for example then the PID instruction wouldn't go immediately to 40% and be sitting there "waiting" on the valve to catch up. I have some rungs that I could send you that were pretty successful. Also, not everyone has FBD on their version of Logix. I guess it costs extra. Hope this helps you.
 
Is this a new system and is the designer part of the tuning if its new?

You say you can run it manually then this is what you need to mimic, you may need two PID's or as you say full open to a given value then let the PID take over, do you have probes in the both the jacket and the material ?

What is controlling your jacket temp, boiler and chiller? can you adjust the temp of them also

Do you have a drawing? how large is the vessel?

As you can see there are MANY questions that would need to be answered before someone can help

Peter said:
are you saying the heating and cooling valves are moved by air?

Sounds like a fail safe pneumatic positioner with a diaphragm valve
 
Yes, more information is needed, one thing that stands out and needs to be confirmed is are the heating/cooling jackets separate items built into the vessel.
I think it is unlikely that a steam & chilled water would flow through the same jacket, in my experience such extremes of temperature would buckle and crack the diffusers in the jacket.
Also because of the latency the control is different from Air handling/ shell & tube or in-line heating/cooling.
 
Sounds like a fail safe pneumatic positioner with a diaphragm valve
Now I want to know if the valve has position feedback.


I did part a control system for a turbine. My controller was controlling the spool of a servo like valve. The valve controlled the flow of air. I had to control the position of a big valve that had a 12 inch stroke. There was an outer loop from the master control that gave me a signal 4-20 ma as the set point. This sounds similar to the OP. The master control monitored the steam flow or turbine speed and would tweak the set point to the controller and that moved the servo valve spool that move the piston of the big steam flow valve.
My point is that I had position feedback from the steam valve position and the OP has not indicated that he does. Also, the master control was an outer loop and I was controlling the inner loop. There were two loops not just one.
 
One error:
Heating PID is set to: Dependent, SP-PV, update time 0.1, Derivative of PV, PV tracking, PV Unscaled min 0, PV unscaled max 16383, Engineering units min 0, Engineering Units Max 16383, CV min at 0% 0, CV max at 100% 16383.

Engineering units MAX should be 1500, same as your SCP.
 
I have done this in the past, but we used a tempered loop. A pump ran liquid in a circle through the jacket. We added steam at the beginning of a reaction until the product "kicked" then when setpoint is reached, we switched to cooling.
 
I think you guys are overthinking it, he says the proces and the valves work, it is only the PID it is the problem..

First I'd get rid of two PIDs and make only one - <50% cooling >50 %heating. Just simpler to handle..

Then I'd start with gain 7 and Ti 120s..
 
I think you guys are overthinking it, he says the proces and the valves work, it is only the PID it is the problem..

First I'd get rid of two PIDs and make only one - <50% cooling >50 %heating. Just simpler to handle..
The scaling is much different. Water will cool off faster than steam will heat but it depends on the temperature difference.
The time constants will be different too.



Then I'd start with gain 7 and Ti 120s..
You are guessing and what are the units of the gain?


I still want to know how the steam valve works because it makes a huge difference.


On thing the OP can do is record a trend where the CV changes in steps and record the PV. We are guessing otherwise.
 
Googling [split range temperature control chilled water steam] might provide some ideas, but it's the internet, so caveat emptor.



Unless the gains are extremely different, instead of using 50% as a split-range transition point, perhaps choosing another percentage would work e.g. 75% would account for a gain ratio of three. Of course, it's a crude approach, and might not work for the I and/or D actions.


But as others have noted, the real issue is that the cooling and heating processes need to be characterized to at least get in the ballpark, otherwise it is all fumbling about in the dark.


Also, if there is a pneumatic valve positioner (loop) downstream of the master control, as suggested earlier, then any backlash (play; slop; hysteresis) in the positioner linkages could make it impossible to solve the problem via tuning the master loop. Cf. http://www.plctalk.net/qanda/showthread.php?p=844583.
 
Last edited:

Similar Topics

I have S7 1512C controler for controlling 48 PID temperature loop, the output is PWM. Please I need the best, most efficient way to write the...
Replies
5
Views
212
Hi all, I'm having trouble solving a problem I've been working on for several months, and thought you might like a stab at it. The machine runs...
Replies
22
Views
839
How can I connect PID Output to a valve. In ladder logic program is there any logic do I want to add between valve and PID? PV=SP What will be the...
Replies
7
Views
383
I'm setting up a PID for a 50hp RO pump in a water treatment plant. When I go to manual mode on hmi I set the swm bit, I also ons the pid output%...
Replies
5
Views
523
I am setting up control for Hypochlorite dosing. The easy part is the dosing calculation for flow pacing but I would also like to setup trimming...
Replies
8
Views
889
Back
Top Bottom