PID Control

J

Thread Starter

J Fouts

I'm having a difficult time explaining what happens to the output of a PID controller when there is an error between input and set point. Could someone explain in laymen terms what the output does if: you are operating at setpoint and all of the sudden a 10% error in pv to sv occurs. First if you had a gain(K) of 1, how much would the output increase and then how the reset (integ.) action adds to the gain and when the rate(deriv.) adds to the output.
 
B

Bill Clemons

To keep the description simple, I use Proportional Band, Reset, and Rate to describe the P, I, and D Gains applied in a continuous process controller. The controller compares the process variable to set point and develops the error. The error is multiplied by (100/Proportional Band) to develop the Proportional Gain. As long as there is error relative to the direction of the control (reverse or direct), then there will be proportional gain applied as control output to the field actuation of the control loop. A simple controller is a Proportional Only Controller. Just like a throttle setting, Proportional only can apply a constant rate of output based on error. If the process load shifts, the controller response will be sluggish and require operator intervention to approach set point for the new process conditions. The adjustment is thought of as manual reset.

Add an integrator (theoretical) or apply a reset time over which the controller will continually update the output according to the Proportional Gain being applied and the amount of error that exists. Reset is used as an automatic bias to bring the process variable to set point (elminate the offset of a proportional only controller). Reset acts, after the fact, to continually add output to the control. In a well tuned controller, the reset is adjusted so the controller acts only as quickly as the process itself is capable of changing. When the reset time is too short the process variable may oscillate around the set point. When the reset is too long, the process variable will not get to set point. PI controllers are useful in noisy, quick acting processes, such as flow controls.

Rate is applied as a predictive addition to controller output. Rate time is adjusted so that the controller can act on an initial deviation from set point and add an increment of output for a sustained period. Rate control is useful when applied to a vessel heater. As the deviation is sensed, the controller can add a substantial increase in output for a set period of time (to fire a heater or flow a given quantity of steam to the exchanger). At the end of the time period, the rate control action will kick off, again. At that point, the controller will have had enough time to bring the PI or P action into full effect.

Secondly, the control action will have momentum toward closing on the set point. Think of the jet liner which is landing at the air field. For the first twenty seconds of touch down, the pilot applies reverse thrust at 100%. The twenty seconds @ 100% is a form of rate gain. After that, the jets are shut down (or throttled back to a few %) and the rest of the braking is completed with wheel brakes, similar to PI gain, when PV is near set point and process loading has subsided.
 
C

Chris Schene

The proportional gain (P part of the PID controller) always applies Kp * Instantaneous error value (sp-pv) at any given time as a control signal. So, for example if Kp =3, SP = 0 and PV = 0, no P control will be applied. Then SP changes to 10 and the error value becomes 10, the controller will instantly apply a control signal of Kp* error or 3*10 = 30.

The integrator (reset) will slowly increase the correction it is applying until the error value is driven to zero. Once you reach an error level of zero you no longer have any proportional (P) control applied, but only integral or reset control. The integral or reset constant determines how quickly the integral control will come to a final value. A good starting point for the integral constant is (Kp/Process Time Constant).

I know this is sometimes hard to visualize: I have an excel spread sheet that will allow you to change the various constants and see how the P control, I control, u, PV, all change . If you provide your email address, I will send it to you.
 
In general, (I mean in a very "raw" way) Integral action speeds the response time, but tends to inestabilize the system. Derivative action try to counteract this inestabilization.

Do you know the time constants of your PID controler?
 
B

Bruce Durdle

The integral and derivative elements do not "add to the gain" - they introduce completely separate components into the controller output that
increases the output over and above that caused by the porportional term alone.

The output of a PI controller has two components. The P component will follow the changes in error (magnified by the gain) so in your case of a
10% error with a gain of 1 the output will show a step change of 10% (with polarity dependin gon the actin configured into the controller).

The I term has a rate of change proportinal to the error, so as long as the error remains steady will increase or decrease at a steady rate. The rate depends on the Integral Action Time and the magnitude of the integral contribution to the output will equal the proportional contribution after the IAT. So if IAT is one minute, the integral component will ramp up at 10% (the amount of the initial proportional step) in 1 minute and will reach 20% after 2 minutes, 30% after 3 minutes, etc.

As a result, the response from the PI controller to a 10% step in error will be an initial step of 10%, rising to 20% (10% proportional, 10%
integral) at 1 minute, 30% (10% proportional, 20% integral) at 2 minutes, 40% (10% proportional, 30% integral) at 3 minutes, etc. If gain is K and
IAT is Ti, this modifies to:
initial step of K x 10%, rising to K x 20% at 1 x IAT, K x 30% at 2 x IAT, K x 40% at 3 x IAT, etc

The derivative element will give an instantaneous spike on a step change in error, and is not really significant in a step change. However, if the error is ramping at say 10% per minute, the derivative element will develop a steady component wihich wuill remain constant while the error is ramping. The porportional term will again track the error change and will change at
10% per minute for a gain of 1. The amount of the derivative term will equal the proportional component at the DAT - so if the DAT is .1 minute,
the derivative element will be .1 x 10% = 1%. The output of a P+D controller will then be a 1% step due to the derivative element with a proportional element ramping at 10% per minute.

Noite that this explanation assumes you have a standard "interacting" algorithm. With the non-interacting algorithm, the magnitudes of the
integral and derivative terms will be independent of the proportional component.

Bruce.
 
K
The details are in the code or electronics implementing the controller, but the proportional part of PID should produce an output effect proportional to the input error, scaled by the proportional gain.

The proportional effect has no time parameter, so the output should change instantaneously as the input error changes (as the controller response or scan rate allows). In the example, you'd "suddenly" see a 10% change in the output on account of the P term.

In the simplest sense, the P, I, and D terms would be independent of each other and are simply added together to yield an output. The integral
term integrates the input error over time, so its output effect increases as time goes on if the error is held constant. The integral gain scales
this effect.

Derivative also has a time parameter, but its effect is proportional to how fast the input error (or just the input) changes. In the example, you'd have a large output effect in proportion to how "suddenly" the input change occurred, and scaled according to the derivative gain.

Note that the actual gains might be used as multipliers or divisors in different PID controllers, and might be arranged to be independent of each other or could interact. Also, there can be other factors involved,
such as filters on the input or error, variable or fixed bias, etc., so don't assume anything or try to infer details from one PID controller to another.

--
Ken Irving <[email protected]>
 
C
> Are you guys sure these are layman's terms? I still don't get it.

If you provide your email I will send you an excel spread sheet where you can change parameters "hands on" and see what the effect is on a PI controller controlling a first order plant.
 
M
The gain K will be multiplied by the error. In your example the Proportional (P) term would cause P = K * error = 1 * 10 = 10 to be added to the controller output. If PV is still not at SP or SV, then the integration (I) term will add to the PID control. If the Reset Rate is 0.05 repeats per second, then every second the I term will add 0.05 * 10 = 0.5 to the controller output. The higher the Reset Rate, the faster the controller will try to respond to the error. The I term may also be expressed as a time constant depending on the controller. The Reset Rate and Time Constant are in general reciprocals of each other ie Rate= 1/Time Constant. So the larger the time constant the slower the controller will react to the error. The Derivative (D) term will respond to instantaneous changes in the system. For instance, assume that the PV and SP are at the same value, D = 0.4 and that the SP is then changed by 10. If the SP remains constant and the PV never moves, the only time the D term would do anything would be at the time the SP changes and the error is created. At that time, the Controller would see a value of 0.4 * 10/second = 4 added to it for one second. This is the case that D term works on the error, however, a better way of implement D term is to look at the change(slope of PV), not error. What does all this mean? To summarize:

The P term gives you a value based on the error to move your controller output in a direction to get rid of the error. This will get the PV closer to the SP, but will not get you there completely (because the system is dynamic).

The I term looks at the error over a certain period of time and adds to the controller output to help get rid of the error. The P term has gotten you closer, the I term should get rid of the remaining error over time.

The D term acts as an accelerator and brake to try to help the P and I get PV to the SP as quickly as possible.

This may be a bit simplified, but I hope this helps. You need to tune your PID parameters so that your P, I and D terms do not over-compensate the CO based on the error and go unstable, but still remove the error in a relatively fast time as determined by the process constraints.

[email protected]

For more information:
www.controlsoftinc.com
 
B
As simply as I can -
A PI controller generates to intrnal signals in response to an error. The first is the proportional term, and is, as it says, proportional to the error. The constant of proportionality is the gain. So if a controller has a gain of 2 and the error changes by 1%, the proportional component of the output will change by 2% in response.

The second component is the integral term. It generates an output component that increases at a rate dependent on the error and the proportional gain. The integral response to a step change in error will equal the proportional response after a time called the integral action time. So if our controller with gain of 2 and error change of 1% has an integral action time of 2 minutes, the output will change by 2% over 2 minutes due to the integral contribution. Immediately after the shange in error, the output will change by 2%. 2
minutes later it will have changed by 4%,(2% from the initial proportional response, 2% from the integral) After 4 minutes, it will have changed by 6% (2% theninitial proportional, 4% from the accumulated integral)..

Bruce.
 
M

Michael R. Batchelor

Could you donate that to an archive somewhere? I'm sure it would be useful to lots of people.

Michael R. Batchelor - Industrial Informatics, Inc.

Chris Schene wrote:
> If you provide your email I will send you an excel spread sheet where
> you can change parameters "hands on" and see what the effect is on a PI
> controller controlling a first order plant.
 
C
Michael,

I am planning to upgrade my spread sheet for PID,PD, P controllers and various plant types: Pure capacity (integrator), first order with delay, 2nd to nth order, double integrator (typical in mechanical systems). What I have so far is just a PI controlling a first order plant (Temperature control processes are usually first order, for example, often with a process lag).

Could you suggest an archive I could donate the spread sheet to?

Thanks,

Chris Schene
 
Chris, I read your response and would like to use your spreadsheet as a learning tool for my technicians. I would appreciate it if you could forward a copy to me as well.

Regards, Tom
 
C
Tom,

I did not see an email address listed. Please provide an email address so I can send the spread sheet to you.
 
Top