Help need on Level PID Control

Camcanpro

Member
Join Date
Jul 2011
Location
Toronto
Posts
15
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 valve is at the outlet of the tank. There is a constant water flow in the tank at rate about 200 kg/min. So in order to keep the 200L water inside tank, Outlet control valve should be opened at certain value all the time. I will use PIDE and autotune. My questions are as below:

(1) Shall I use SP-PV or PV-SP for control action?
(2) Shall I use Output Bias%, because if error equal to 0, the calculated output from PID will be 0, but we need to keep outlet valve at certain openess.
(3) What is the procedure to get right Kp and Ki ( we use indpendent Paramenter)?

Thanks very much for your help
 
PID is no small subject and finding the correct values for your system is a matter of trial and error mixed with a little experience to start with some "close to the mark" parameters.

In your application, what is the consumption of water from the tank i.e the draw of water from the downstream machines or whatever is using it? Is the flow regulated by the valve on the outlet of your water tank or could it be that the valve can be 100% open with no demand downstream and therefore no flow?

The control action dictates what the output of the PID will do in reaction to the error between PV and SP. 2 different scenarios:

1 - the output will increase if the PV is below the SP and decrease if the PV is above the SP
2 - the output will decrease if the PV is below the SP and increase if the PV is above the SP

I would suggest number 2 is appropriate in your case, meaning the valve will begin to close as the PV goes below the SP.

The PID will maintain the output value appropriate for PV=SP. It will not return the output to zero just because the PV has reached SP.

Proportional values and integral values are not something anybody in a forum will be able able to tell you, there are just too many variables to consider. Reaction speeds and system functionality is only available to the person on site - However, starting with nominal values will put you in good stead. I personally would start with a P@1 I@15s D@0. After that checking the trend of the output vs input you can adjust accordingly.
 
Wrong, Wrong, Wrong!!!!!

I am working on a CIP project.
What is CIP? I think about an Ethernet protocol.

There is a tank which is about 1500L. We need to keep the water volumn inside the tank to be SP:200L. The control valve is at the outlet of the tank. There is a constant water flow in the tank at rate about 200 kg/min.
WHat is 200 kg in liters? Is the fluid water?

So in order to keep the 200L water inside tank, Outlet control valve should be opened at certain value all the time. I will use PIDE and autotune. My questions are as below:
If you want to keep the water level constant the in flow must equal the out flow

(1) Shall I use SP-PV or PV-SP for control action?
Honestly, this is too basic. Think about it.

(2) Shall I use Output Bias%, because if error equal to 0, the calculated output from PID will be 0, but we need to keep outlet valve at certain openess.
You can but it isn't necessary

(3) What is the procedure to get right Kp and Ki ( we use indpendent Paramenter)?
Thanks very much for your help
When I know more I will answer. This seems like a student problem. The numbers are too round and the information you are given is wrong. The out flow will vary as a function of the level or pressure across the valve. In truth the system is non-linear system.

What is controlling the in flow?

PID is no small subject and finding the correct values for your system is a matter of trial and error mixed with a little experience to start with some "close to the mark" parameters.
Statements like this wind up my integrator into saturation. One can calculate the PI gains.

I would suggest number 2 is appropriate in your case, meaning the valve will begin to close as the PV goes below the SP.
Wrong.

The PID will maintain the output value appropriate for PV=SP. It will not return the output to zero just because the PV has reached SP.
Why?

Proportional values and integral values are not something anybody in a forum will be able able to tell you,
WRONG!!! WRONG!!! WRONG!!! It is all math and physics. If the right information is available the gains can be calculated exactly. We can send landers to Mars without too much trial and error.

Last spring I helped a student on LinkedIn in the Netherlands with a problem where he had two tanks where a pump filled the first tank and the out flow went to a second tank that also had an out flow valve. The goal was to control the level in the second tank. I still have the Mathcad work sheet for that. It took about two months to work through the problem so the student would understand step by step.

Camcanpro needs to tell us more.
 
Only trying to help..

"What is CIP? I think about an Ethernet protocol."

It's Cleaning In Place

"WHat is 200 kg in liters? Is the fluid water?"

It's water, it has a SG of 1 so....200 kg is 200 litres......

"Statements like this wind up my integrator into saturation. One can calculate the PI gains."

..But for someone asking how to do it on a forum they obviously have little clue about a PID system, so the information given respects the level of the question. On your first day at maths class they didn't tell you about logarithms now did they.....

"Wrong."

Not wrong. As the level decreases in the tank, the valve needs to close. Correct.

"Why?"

Because that's what a PID does.....

"WRONG!!! WRONG!!! WRONG!!! It is all math and physics. If the right information is available the gains can be calculated exactly. We can send landers to Mars without too much trial and error."

Tell that to commissioning engineers worldwide. Experience and monitoring of the system for a day will tell you all you need to know about what values to put in. You don't need 2 months of paperwork to control a valve correctly.
 
I know 200 Kg is approximately 200 L depending on the temperature. The point is that to keep the level constant the out flow should be about 200 L/min once the set point is achieved. How much does the valve need to be open to achieve 200 L/min of flow? Perhaps setting the bias so the valve will flow 200 L/min is a good start and then just use a proportional gain. If probably doesn't make much difference what the proportional gain is then IF the valve can actually allow 200 LPM to flow.

Tell that to commissioning engineers worldwide.
That is because they were only taught to tweak gains.

It only takes a few minutes if you know how, not a day. One can make a pretty good estimate without a lot of trial and error. The bias and proportional gain will work.
 
Peter Nachtwey;520507 It only takes a few minutes if you know how said:
That completely depends on the system actually...Try 5 or 6 PID loops battling in the same system and try and get it right in a few minutes.
 
More clarificaion

Thanks for everyone's help.

Let us make it more clear:

CIP=Clearning in Place. The inlet water come from utility and it is provided at the constant flow rate at 200 Liter/Min. There are one pump and one control valve at the outlet of water tank. The outlet water is sent to another tank and stored there.
I am using AB Controllogix L72 for PLC and Rslogix 5000 V19 for programming. Because Rslogix5000 has PIDE and autotune function, so I am using autotune to automatically to calculate PID parmater for me.

We want to keep certain amount of water inside the tank, such as 200 L, we need PID to keep the water volume inside the tank constant.

(1) If the control valve is on the inlet side, I guess we should use SP-PV, when PV go up, Control valve should close more.When the control valve is on the outlet side, I guess we should use PV-SP, when PV go up, control valve should open more.

(2) PID equation is as below :

4f8XWDGpZ4btsAAAAASUVORK5CYII=


so if SP=PV, what is the value of CV? is CV =0? I am confusing now.

(3) As I mention in item 1, Autotune should can calucalte right PID value for me if I set it up correctly.

Please continue to help
 
Being a noob when it comes to PID, but not when it comes to controls.
I have to go with Peter; PID, is math.
If you research and know the variables, it can be predicted (providing you have the math skills). For the record, I do not! LOL.
 
so if SP=PV, what is the value of CV? is CV =0? I am confusing now.

Please continue to help

If the SP=PV and the CV is at 0 then the CV will stay at 0.
If the SP=PV and the CV is at 50% the CV will stay at 50%.

The CV will only increase or decrease when there is an error.

Whether the CV increases or decreases depends on how you set-up the PIDE instruction PV-SP (direct acting) or SP-PV (reverse acting).

Choseing direct/reverse acting largely depends on the hardware you have, valve ( fail close/fail open), positioner, I/P.
 
Last edited:
If you have a heating loop controlled by a PT100 then you need the steam valve to open when the temperature drops. The hardware cannot affect this decision.
 
(1) If the control valve is on the inlet side, I guess we should use SP-PV, when PV go up, Control valve should close more.When the control valve is on the outlet side, I guess we should use PV-SP, when PV go up, control valve should open more.

(2) ...so if SP=PV, what is the value of CV? is CV =0? I am confusing now.

(3) As I mention in item 1, Autotune should can calucalte right PID value for me if I set it up correctly.

Please continue to help

On item 1 you're correct. (SP-PV) refers to 'direct-acting'. (PV-SP) is 'reverse-acting'. I like to think of it this way: if when I increase my SP, the output should go up makes it direct-acting, otherwise it's reverse.

On item 2: don't worry about it so much; the PID finds its level of output where SP=PV.

On item 3... I have used PIDE and tuned many level controllers but have not used AB's autotune. Their autotune has you specify what type of process it is; I would choose either 'level' or 'integrating' (study the documentation more if you have to). Before engaging the autotune, I'd operate the flowrates at about their nominal values, line out the level manually (PIDE in manual with you adjusting output as necessary, your level is steady at about 50 and your inlet flow is the nominal 200), and then engage the autotuner and see what happens.

About the output bias term. Personally, I'd only choose a nonzero value if I was using proportional control only.

Good luck and let us know what happens.
 

Well we've got 2 stories : so I'm gonna have to disagree with one of them. Here's my take on it.....

The CV (Control Variable) output is mathematically determined by the Error (E) between the SetPoint (SP), and the Process Variable (PV). CV is calculated to INCREASE with a POSITIVE Error, and DECREASE with a NEGATIVE Error.


A "Forward-Acting" or "Direct-Acting" PID is needed when you want to INCREASE the CV when the PV is BELOW the SP : Therefore the equation needed to give a POSITIVE Error is SP-PV.

Typical Forward-Acting loops are...

Heating : The CV drives a device that ADDS heat to the system to INCREASE the PV

Flow Control with Pump : The CV drives a pump that gives a higher PV the faster it spins.

Flow Control with Direct-Acting Valve : The CV drives a valve OPEN to give a higher PV.


A "Reverse-Acting" PID is needed when you want to INCREASE the CV when the PV is ABOVE the SP : Therefore the equation needed to give a POSITIVE Error is PV-SP.

Typical Reverse-Acting loops are...

Cooling : The CV drives a device that ADDS coolant (removes heat) to the system to DECREASE the PV.

In the level-control application as described, if the PV level is above the SetPoint, then you need to OPEN the control valve further to bring the PV level down : therefore you will need Reverse-Acting, or PV-SP loop configuration.
 
Last edited:
I prefer to always use SP-PV. In this case increasing the valve opening makes the water level lower so the controller gain is negative.
In the control guru's example the heat exchanger gain is negative.
http://www.controlguru.com/wp/p49.html
In cases like these, if the controller gains can only be positive then one must negate the error so E=PV-SP.

I hate threads like this. We are getting NOWHERE. Here it goes. I am going to play grumpy old engineering manager and I don't have to do much acting.

1. What are the specifications for control? I know the SP is 200 L but can it be plus or minus how much? If the volume can change 10 or 20 L and still be with specification then a simple P controller with bias may be all that is needed. If the control must be tighter then an integrator will be required.
2. What would cause the volume of water in the tank to vary?
3. What is the feed back device?
4. If it is a level sensing devices will it be affected by the displacement of what ever is being cleaned?
5. Will the water level be smooth or have lots of ripple or process noise. If there is a lot of process noise a low pass filter may be required or the valve will move back and forth responding to the noise.
6. What are the flow characteristic of the valve? One should know how much flow can can be achieved at some rated pressure drop for every percent of valve opening. This is important if the bias is going to be used.
7. Does the valve open quickly so its response time can be ignored? If not then the controller and gains must take into account the slow response time of the valve.
8. What is the surface are of the tank as a function of level? The surface area times the change in level provide a change in volume. This is critical especially if the surface area changes as a function of level.

One doesn't just 'tune' a PID, one 'tunes' a system.
 

Similar Topics

Hi, I am a mechanical engineering senior working on a design project. This project is to create a water dispenser for a disabled person. We need...
Replies
8
Views
6,174
So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
34
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
344
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
171
Good day all! Can someone help me with the procedure to update Beijers E700 firmware? The Panel I am working on is firmware 2.04v and I would...
Replies
1
Views
74
Back
Top Bottom