PIDE Autotuning for Level Control

AMarks95

Member
Join Date
Jul 2018
Location
South Dakota
Posts
224
Have a logix controller and I'm using the PIDE block for the autotuner.

I've got the hang of doing it for direct control things like pressure and flow control but the level autotuner never seems to give good results.

I've tried scaling the PV by 100 to try and get larger changes for the algorithm to interpret but it still didn't produce good results.

I have the PIDE mode set to reverse acting.

Does anybody have any tips for PIDE autotuning for level control?
 
Level control processes are fundamentally different than the processes that auto tune is designed to handle, so auto tune does a poor job of, or is unable to, time a level control system.

Tl;Dr

Say you have a flow controller on manual with it's pump speed output at 50%, and the flow is stable. If you increase the output to 60%, the pump outlet pressure will increase, the flow will increase. As the flow increases the pressure drop through the system will increases, which will increase the back pressure, and ion the end the system will find a new stable equilibrium at a fixed flow rate somewhere near 120% (=60/50) of the previous flow rate. The actual flow rate is not important here; what is important is that the equilibrium is stable. That is the kind of system model autotune algorithms are designed to tune.

Now consider a level controller in manual with it's pump speed output at 50%, and the level is stable. A stable level implies the process flow out of the tank is exactly equal to the pump flow into the tank i.e. no net accumulation over time. If you manually increase the pump speed output to 60%, so the flow into the tank increases with no change in the process flow out of the tank, the level will rise because of the net positive accumulation (inlet flow greater than outlet flow) over time. However in this system there is no analog to the build up of back pressure of the flow control system, and the level will continue to rise as long as there is an imbalance between inlet and outlet flows and there is more tank to fill i.e. the system is unstable. Autotune algorithms are not designed for these kinds of systems.
 
I have never used the PIDE much less the autotune. But keep in mind that, unless this is a somewhat atypical system, as a level control application this will be a Type 1, or single integrating, system. Unless you can tell the autotuner that this is the case it will have a hard time coming up with a reasonable gain set.

Keith

It would seem I type slowly.
 
Level control processes are fundamentally different than the processes that auto tune is designed to handle, so auto tune does a poor job of, or is unable to, time a level control system.

Tl;Dr

Say you have a flow controller on manual with it's pump speed output at 50%, and the flow is stable. If you increase the output to 60%, the pump outlet pressure will increase, the flow will increase. As the flow increases the pressure drop through the system will increases, which will increase the back pressure, and ion the end the system will find a new stable equilibrium at a fixed flow rate somewhere near 120% (=60/50) of the previous flow rate. The actual flow rate is not important here; what is important is that the equilibrium is stable. That is the kind of system model autotune algorithms are designed to tune.

Now consider a level controller in manual with it's pump speed output at 50%, and the level is stable. A stable level implies the process flow out of the tank is exactly equal to the pump flow into the tank i.e. no net accumulation over time. If you manually increase the pump speed output to 60%, so the flow into the tank increases with no change in the process flow out of the tank, the level will rise because of the net positive accumulation (inlet flow greater than outlet flow) over time. However in this system there is no analog to the build up of back pressure of the flow control system, and the level will continue to rise as long as there is an imbalance between inlet and outlet flows and there is more tank to fill i.e. the system is unstable. Autotune algorithms are not designed for these kinds of systems.

Well then I guess I don't understand what the "level" process is for in the Autotune calculator dialog box
 
Call me old school or Dumb, but the PID block has worked fine for me for umpteen years for level control. Granted, the processes I control aren't needing an extremely tight deadband (working with 1000 gal tanks), but the Ziegler-Nichols method of level tuning always gets me to a stable result.

Here's a decent writeup: https://blog.opticontrols.com/archives/697
 
Is the process steady when you try to run the autotune?

What kind of control performance are you looking for?

  • Do you want it to hold a tight level control at or near the setpoint, or
  • is the vessel with the level measurement there for surge purposes, i.e. to attenuate fluctuations in the outflow?
I have the PIDE mode set to reverse acting.

Oh dear, another famously ambiguous term.

Although I am sure you know what you meant by that when you wrote it, there is no way for anyone to know exactly what you meant by "reverse acting" without further context.

  • The Allen-Bradley manual that covers PIDE does not define that term; it states that the .ControlAction parameter value is
    • EITHER true, to calculate Error as PV - SP,
    • OR false, to calculate Error as SP - PV.
  • So, is the PID .ControlAction parameter value assigned a value of true or a value of false?
  • How is the process controlled?
    • Does increasing the PIDE output CV open a valve or increase a cascaded flowrate setpoint to increase flow or increase a pump speed, or does increasing CV close a valve or lower a setpoint to decrease flow or reduce pump speed?
    • Does the effect of CV on flow apply to the inlet flow into the vessel, or the outlet flow from the vessel?
 
Is the process steady when you try to run the autotune?

What kind of control performance are you looking for?

  • Do you want it to hold a tight level control at or near the setpoint, or
  • is the vessel with the level measurement there for surge purposes, i.e. to attenuate fluctuations in the outflow?


Oh dear, another famously ambiguous term.

Although I am sure you know what you meant by that when you wrote it, there is no way for anyone to know exactly what you meant by "reverse acting" without further context.

  • The Allen-Bradley manual that covers PIDE does not define that term; it states that the .ControlAction parameter value is
    • EITHER true, to calculate Error as PV - SP,
    • OR false, to calculate Error as SP - PV.
  • So, is the PID .ControlAction parameter value assigned a value of true or a value of false?
  • How is the process controlled?
    • Does increasing the PIDE output CV open a valve or increase a cascaded flowrate setpoint to increase flow or increase a pump speed, or does increasing CV close a valve or lower a setpoint to decrease flow or reduce pump speed?
    • Does the effect of CV on flow apply to the inlet flow into the vessel, or the outlet flow from the vessel?


Yes, it is an ambiguous term, but I tried to clarify with context, like direct control is pressure and flow.

Have a logix controller and I'm using the PIDE block for the autotuner.

I've got the hang of doing it for direct control things like pressure and flow control but the level autotuner never seems to give good results.

I've tried scaling the PV by 100 to try and get larger changes for the algorithm to interpret but it still didn't produce good results.

I have the PIDE mode set to reverse acting.

Does anybody have any tips for PIDE autotuning for level control?

To clarify further,


  1. Yes, we can set CVProg to a value that gives us a fairly constant level before beginning the autotune. There is a noticeable change in the level after the tuner applies the CV Step.
  2. The tank level is to be held at a constant level setpoint.
  3. ControlAction is set to E = PV - SP (reverse of the default).
  4. Increasing the CV output increases pump speed, which decreases the tank level (flow out of the vessel)
 
  1. ...
  2. ...
  3. ControlAction is set to E = PV - SP (reverse of the default).
  4. Increasing the CV output increases pump speed, which [...] [increases] flow out of the vessel


Does the vessel have straight sides, or is it cylindrical with its axis horizontal?

What are the dimensions and shape of the tank?

What sort of quantitative level control are you after (e.g. 5ft above the bottom of the tank ±6inch)?

What are the maximum and minimum flow rates the outlet pump can achieve, and at what CV values?

What are the expected minimum and maximum inlet flowrates?

What is the dynamic character of the inlet flowrate e.g. what is the biggest short-term change you expect to see and over what time frame?
 
Some good comments above.
I have written many auto tuners. The auto tuner must have a basic model type for each system the auto tuner is going to be used on.
Kieth is right about tank level control is an integrating system. It integrates the difference of the in-flow and out-flow.
What AMarks95 has not said is whether the pump is controlling the in-flow or the out-flow. That determines if the gain must be negative or reverse acting. If the pump is controlling the out-flow then the system will be reverse acting because as the pump speed increases the fluid level will decrease.

BTW, speed control and temperature control are non-integrating systems. This means that if you remove the control signal it will settle down to an ambient state.
Position control and tank level control are integrating system.
Pressure control can be either depending on the system.

NOW FOR THE IMPORTANT PART. WHY IS A PID NECESSARY?
Unless the level must be controlled PRECISELY then a simple proportional band will work. A SCP block will do. The level will be maintained within the proportional band and you don't really care about all the details that drbitboy brought up except the pump must be able to compensate for the maximum in-flow or out-flow.
 
What AMarks95 has not said is whether the pump is controlling the in-flow or the out-flow. That determines if the gain must be negative or reverse acting.

  1. ...
  2. ...
  3. ControlAction is set to E = PV - SP (reverse of the default).
  4. Increasing the CV output increases pump speed, which decreases the tank level (flow out of the vessel)


NOW FOR THE IMPORTANT PART. WHY IS A PID NECESSARY?
Unless the level must be controlled PRECISELY then a simple proportional band will work. A SCP block will do. ...


  1. ...
  2. The tank level is to be held at a constant level setpoint.


@Mr. Nachtwey, interesting, but next time try to keep up.
 
I am WAY BEYOND YOU.
But in the OP's case KISS applies.


Yes, I know you are WAY BEYOND ME. Except at paying attention.

I understand KISS and have known all along that level control can be done with an SCP instruction, but that is

  1. boring, and
  2. not even close to what OP was asking about.
 
Yes, I know you are WAY BEYOND ME. Except at paying attention.

I understand KISS and have known all along that level control can be done with an SCP instruction, but that is

  1. boring, and
  2. not even close to what OP was asking about.
What the OP wants, really needs, is a simple solution. You can look at my video to see how I compensate for varying shapes of the container. It isn't as if I don't know. I know, but that isn't the point. What does the OP really need is simple control. That is what I have provided.

I have yet to find something I can't control. Somethings are not reasonable to control. Some people just have a feel for how things work. This is similar to musician that can instantly play together and adapt to the key that all are playing in. Some people have a natural feel. The key to success is finding that place or activity where you can shine.
 

Similar Topics

Hi! I'm trying to understand how does work the PIDE autotuning feature and I've got good documented resources for it from the Rockwell library...
Replies
8
Views
13,275
Greetings ... someone sent me a request for some student handsouts that I developed ... turns out that I had this hosted on my business website...
Replies
0
Views
134
Studio 5000 version 34. Have error on PIDE CVFaulted (Status1.2), Control variable (CV) health bad. No more information online or in...
Replies
3
Views
973
Hi everyone, I am trying to add a control loop to my HMI interface however I keep getting the following issue, any idea why this would happen?
Replies
8
Views
1,619
We have a routine that we trigger with a JSR every 10 seconds that has PIDE instructions. This resides in a Periodic task that triggers every...
Replies
6
Views
926
Back
Top Bottom