Help with PID on RX3i

gottspeed

Member
Join Date
Feb 2017
Location
Canada
Posts
24
Hi guys, this is my first time using PID and I've got a concern with the output of my PID block.

I'm controlling a VFD with a pressure setpoint and my concern is that as my PV gets closer to SP, my CV drops to zero.

On the surface, this seems like it will slow the drive down to zero as pressure reaches the setpoint. Obviously I'll set clamps to prevent this from happening, but I still feel like I'm missing something.

How do I make a pump speed out of the CV on this PID?

https://imgur.com/a/gZISj
gZISj
 
Last edited:
I'll elaborate as you say that this is your first use of PID

I've not worked in the RX3i platform but the manual shows us the following:

The Independent term PID (PID_IND) algorithm calculates the output as: PID Output=Kp*Error+Ki*Error*dt+Kd*Derivative+CVBias
where Kp is the proportional gain, Ki is the integral rate, Kd is the derivative time, and dt is the time interval since the last solution.
The ISA (PID_ISA) algorithm has different coefficients for the terms:
PID Output = Kc * (Error + Error * dt/Ti + Td * Derivative) + CV Bias

This tells us that the equation used is a non-velocity (also could be called positional) form of the equation. Since you're using the independent form I'll use that from now on. Let's forget about I and D and just look at the Proportional component of the output:

PID Output=Kp* Error (Error is either SP-PV or PV-SP, could also be known as direct or reverse acting)

So, in your screenshot Error: 36=1*(500-464). It's working exactly as expected. If your Kp was 10 the output would be 360 for example.

As noted above you need to use more than just proportional to maintain an output with an Error of zero. The integral term is one of those options, which aims to correct error over time or using a gain to add a fixed offset to the output (CVBias). The manual I found online has a block diagram and in it shows the I is calculated as
Integral Term = Previous Integ. Term + Ki * Error * ΔTime
So the integral output references the previous I output - it takes time to wind up and wind down, the bigger the error the faster it winds.

Can you provide more information on your specific application - it will be easier to provide more info then, you mention pump and pressure but there are many pumping applications.

My experience is that is way too much P and not enough I - but like I say it's hard to make an informed comment without knowing more about the application. You may need to use the bias as well.
 
Hi there, thanks for your response.

The pumping application is municipal water distribution where I am to maintain a pressure set point on the distribution system by modulating VFD speed input.

The problem I see is that as my error approaches zero, so does my CV. I do understand that this is PIDs purpose, so I'm unclear on how to take my CV and make a useful drive speed command out of it.

Say it takes 80% VFD speed to reach the pressure setpoint of 700 kPa, as we get close to the SP, CV will drop considerably which would in turn drop VFD speed to its minimum.

It seems like this is a matter of adjusting the PID parameters, because I want this program to run the drive close to its required speed while using PID to trim the VFD speed the rest of the way.

I should probably do more reading on this, but PME's help files don't cover this question so I thought Id ask here in hopes someone has dealt with this and can point me it the right direction.
 
Say it takes 80% VFD speed to reach the pressure setpoint of 700 kPa
In logic, implement a formula that relates the required VFD speed command to the set point over the required range of set points. Something like Speed Command = K1 + K2 * Pressure Setpoint. Take the value of Speed Command you get from the formula and copy it to the PID block's "Bias" parameter.
 
Just an update everybody, the cause of my problem was that my sample rate was set to every scan. Simple fix was to set the sample rate to 10ms.
 
I'm not sure about the Rx3i, but in the 90-30 even if you set the PID to recalculate every scan, it would not do so more often than once every 10 milliseconds. Also, I find it hard to reconcile your original definition of your problem with what you say you did to solve it.
 
Understand that the "Sample Rate" is the "amount of time" the PID uses for calculation. ie....process change over 10ms in your case...

A lot of people try to calculate as fast as possible...... but.... can the process itself even react that fast? This can also cause "Reset windup" which is sometimes a key issue with resolving PID.
Every 10ms is fast (100 times per second?)......Maybe every 0.25 second is sufficient and the PID now has more time to see process reaction before it recalculates?
 
Last edited:
Another GE PID tip..
You notice the SP and PV can only be Integers...
If your values are in Real (floating point) and you have to convert to Integer for the PID block.....multiply by 10 FIRST THEN convert them to integer.
Now your PID will be far more responsive and a little more forgiving, because it is controlling in 0.1 range, an increase by a factor of 10.
 
Last edited:
Page 5 of the manual that Nathan linked:
Sample Period
The shortest time, in 10ms. increments, between solutions of the PID
algorithm. For example, use a 10 for a 100ms. sample period.
Minimum time of 10ms is enforced by the block if the sweep<10ms)
So if the program scan time is greater than 10 milliseconds a value of zero in the Sample Period parameter means you recalculate every scan. If the program scan time is less than 10 milliseconds, a value of zero for the Sample Period parameter means you recalculate every scan in which more than 10 milliseconds have elapsed since the last recalculation.
 

Similar Topics

Hello all, I have an issue with a PID block in RsLogix 5000. The parameters are P: 3.25 I: 0.11 D: 0.01 The Set Point is 71 psi This loop...
Replies
63
Views
14,781
hey guys - I'm a novice PLC enthusiast, so this may be a simple one. I'm running a PID on a Micrologix 1200 PLC and I want to change the Gain for...
Replies
18
Views
4,235
I need a little help with a project I have been thinking about. We have a belt line that is fed by a gravity door (pretty much a hydraulic...
Replies
14
Views
2,726
Hi all, I have a request from client as follows, There's one PID for Control valve which would be controlling on basis of temperature. One...
Replies
1
Views
1,511
Hi, I am trying to automatically regulate a process ( liquid ) in a tube using an ultrasonic sensor, differential level meter, control valve...
Replies
3
Views
3,115
Back
Top Bottom