Need help with PID for controlling water pressure

BachPhi

Member
Join Date
Dec 2007
Location
Los Alamos
Posts
640
I currently have a pressure switch and a back pressure regulator. I am planning to replace the regulator with an E/P electronic-pneumatic regulator to control the pressure with a PID loop. The pressure switch is 4-20 ma (0-300 PSI). I setup the PID, but I do not understand why my output is always at 100% and my CV1 is unchanged at 20000. Can someone please explain to me?TIA.

Here are the settings:
PID1_Scaling_Tab.png


PID1_Config_Tab.png


PID1_Tuning_Tab.png
 
Not over sure why it is not working. All I can say is what I would do and I’ve done in the past. But it’s now been a couple of years since I used a Rockwell PID.
I personally always do any scaling needed on the PV outside the block. It makes it a lot easier to shift values in for testing.
Why do you have a PID1_Timer.DN controlling the block?
How have you moved the setpoint into the PID? Did you use PID1.SP with a MOV function?
 
PID should be in a timed task ( 100msec) for better response. Manipulate the PID UDT bits to activate the PID

ScreenHunter_02 Dec. 16 12.14.jpg
 
Speculations because I'm not sure how the terms are defined

1) When your control action is PV-SP a pressure of 66.75 over setpoint of 65.0 is 'negative' (?) error?

So the output is driven higher and higher to reduce the negative error? How can a higher output reduce a negative error?

2) Is Kp proportional band (PB) or gain?

If PB, then an error of -1.25 error is outside a 2% PB on a 0-100 scale, so the output is driven full scale according to the settings.

3) An integral term of 0.5 might mean 0.5 seconds of reset action or 2 seconds per repeat (probably 0.5 seconds since the untis 1/s are stated). But whether the integral is 0.5 seconds or its inverse, 2 seconds per repeat, it won't take many seconds to drive the output into reset-windup territory.
 
Yes, the routine is being scanned. In fact , I added the PID rung into an existing input routine. The PID1_TMR is 100ms. Yes, I am aware of periodic task is better for PID and a is a requirement for PIDE, but for my purpose, it should be good enough.
As for the scaling , it was being scaled with an SCP instruction and is working properly with the existing back pressure regulator , but I wanted to let you see how my PV was setup in the picture.

I added a MOV instruction ( see pic)
PID1_In_Manual.png


Output still 100% and CV still at 20000
 
One thing you might want to look at is the value of PID1.DATA[0], which is the accumulated integral sum. If that is non-zero and not moving that would cause your output to hold at some value. Why it isn't moving, I would have no idea.

Also, is there any possibility that PID1 is used in another PID instruction in the program?

Keith
 
Not sure if it's the same as the PIDE but is it in Program mode and Auto mode? My guess it's in operator manual.
Wait after looking at your screen shots it's not in manual hmmm
 
Last edited:
Here is the summary , I hope that it will help someone in the future. My PID loop is to control the water pressure ( 65.5 PSI) coming from a low flow pump with an an I/P electronic-pneumatic regulator (4-20ma) and a precision diaphragm back pressure regulator. Input is a pressure switch 0-300 PSI ( 4-20ma)

pulse_pressure_control_schematic.gif


First of all, there is a lot of discussions about PID loop need to be in a periodic task or that if it's in a continuous task, it need to be run by a timer like in my previous post. Well, not really. Since my analog I/O card have a TimeStamp, I think it is more logical and more efficient to use it instead. Make sure Loop Update time equal RTS setting of your analog module ( 40ms in my case)

PID_Logic.png


When cycle not running , move 0 to PID.SO and PID.SP and latched .SWM.
When cycle running, set SP and unlatch SWM and Move CV1 value to control E/P regulator. Here are the settings of PID, since it is a fast response, it only use PI and not PID loop.

PID_Config.png


PID_Scaling.png


PID_Tuning.png
 

Similar Topics

hello guys I'm having problem in pid in Omron cp1l plc I have program . I'm getting alarm when I execute pid
Replies
1
Views
2,806
I just programmed a PID control system for a VFD to control header pressure for our weak liquor pump to our evaporators. I tested out all the...
Replies
4
Views
1,890
I have a few questions about a PID control I have to make changes too. Here's the low down; The PID control is used to control temperature of our...
Replies
33
Views
13,645
Hello, I'm an intern at this power plant and I'm new to PLC programming. I'm hoping to get some help from the professionals in this forum. I...
Replies
22
Views
5,898
I am working on a CIP project. There is a tank which is about 1500L. We need to keep the water volumn inside the tank to be SP:200L. The control...
Replies
17
Views
10,822
Back
Top Bottom