PID Behavior Assistance

JoseM

Member
Join Date
Jul 2011
Location
Texas
Posts
381
Guys,

I need you guys to help me understand why this PID that I created to control the level of a water tank is not moving away from a CV=100% regardless of how close I'm from set point.

PID Config.jpg PID Logic.jpg
 
Because you have a reverse acting (SP-PV) and integral of .5....So with a positive error (PV is less than SP), the integral is still trying to achieve 0% error by increasing the signal to the device over time. Since the device max is 100%, that's where it stays.

Incidentally, is this logic in a periodic task that matches the update interval of the PID (100ms)?
 
NO, its actually in a continuous updating condition. I do not have a timer build into the code.

One thing I notice yesterday was that only when SP=PV, the PID started decreasing the CV output.
 
Last edited:
NO, its actually in a continuous updating condition. I do not have a timer build into the code.

One thing I notice yesterday was that only when SP=PV, the PID started decreasing the CV output.

Check out your help for PID, and it will show you how to either use a timer or a periodic task for your PID. I usually use a Timer (100ms in your case) with the DN bit firing the PID block, and output of the PID block does a RES on that timer.
 
As a test, set the KI to 0 and depending on your gain, you should see the CV go below 100%. It's the KI over time that is winding up your PID CV to 100% because the error never goes negative (PV exceeds SP). The windup is probably exasperated because you don't have the PID instruction on a timed interval.
 
I added the timer to make it to update on a periodic intervals of 100ms but it still not decreasing the CV from 100%.
 
I ran into that problem some time back
you have to move the PID control to a periodic task of 100ms
the main task is running to fast for it to work correctly
 
do not use a periodic interval
you need to move the PID into a Periodic task that runs at 100ms
the task itself can only run every 100ms
the scan time on the new processors is way to fast for the PID to work
I had the same problem a while back and the solution was to move the PID into a periodic task. worked fine after that.
 
do not use a periodic interval
you need to move the PID into a Periodic task that runs at 100ms
the task itself can only run every 100ms
the scan time on the new processors is way to fast for the PID to work
I had the same problem a while back and the solution was to move the PID into a periodic task. worked fine after that.

Not necessary....The timer method works the same.

As I explained above, your CV is at 100% because of the integral gain of .5 and the fact your PV is less than your SP, so the PID is still trying to achieve 0% error. In your images, your SP is 90, and your PV is 88. KI is 1/time, so as time elapses, the KI continues to add correction to the CV to try and drive the PV to 90. It's operating normally based on the way you have the PID set up. I'm not sure why you expect the CV to go less than 100 when your PV has not achieved setpoint.
 
I'm thinking that if the PID doesn't start reducing the CV when its getting closer to SP, it will over fill my tank.

I decrease my gain to zero and my integral to 0.002 and still no change. Then I said, lets try gain=0 and I=100 and still no change.
 
Last edited:
JoseM,

Reread post #2 and #12.

Nothing is going to happen to the output until the Set-Point is exceeded with a PI controller.

If you want the output to start moving before it reaches set-point then maybe a proportional only controller would work better for you. But with this you will always have a small offset between SP and PV.
 

Similar Topics

Hi all, I'm working on a wastewater plant with oxidation ditch aerators. The aerators are on VFDs and the operators want the dissolved oxygen in...
Replies
45
Views
17,660
In Studio 5000 Logix Designer, I've noticed some odd behavior of the ladder PID instruction. Using the .MINO tag, you can set a minimum output...
Replies
7
Views
3,975
Hi, I would like to assemble a simulator/practice booster pump system that uses PID to maintain steady water pressure under various outlet demands...
Replies
0
Views
82
Hello, I have a motor that we are sending a RPM Speed Output from 0-100% to the VFD. However, the Motor HP needs to be limited to 6000 HP and the...
Replies
3
Views
91
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
13
Views
604
Back
Top Bottom