Friday 5 October 2012

PID Control - Control Systems at ControlTheoryPro.com

PID Control - Control Systems at ControlTheoryPro.com:


Introduction to PID Control

A Proportional-Integral-Derivative controller (PID controller) is a generic controller widely used in industrial control systems. The PID control equation involves three separate parameters; the Proportional, the Integral and Derivative terms. The Proportional term responds instaneously to the current error (providing instaneous response). The Integral term responds to the accumulation of errors (providing a slow response that drives the steady-state error towards 0). And the Derivative term responds to the rate at which the error is changing (providing some anticipatory response). Their respective weighting determines the controls response.
A block diagram of a PID controller
A block diagram of a PID controller

Proportional Action[1]

Proportional action provides an instantaneous response to the control error. This is useful for improving the response of a stable system but cannot control an unstable system by itself. Additionally, the gain is the same for all frequencies leaving the system with a nonzero steady-state error.

Integral Action[2]

Integral action drives the steady-state error towards 0 but slows the response since the error must accumulate before a significant response is output from the controler. Since an integrator introduces a system pole at the origin, an integrator can be detrimental to loop stability. Only controllers with integrators can wind-up where, through actuator saturation, the loop is unable to comply with the control command and the error builds until the situation is corrected.

Derivative Action[3]

Derivative action acts on the derivative or rate of change of the control error. This provides a fast response, as opposed to the integral action, but cannot accomodate constant errors (i.e. the derivative of a constant, nonzero error is 0). Derivatives have a phase of +90 degrees leading to an anticipatory or predictive repsonse. However, derivative control will produce large control signals in response to high frequency control errors such as set point changes (step command) and measurement noise.
In order to use derivative control the transfer functions must be proper. This often requires a pole to added to the controller (this pole is not present in the equations below).

PID Control

Proportional-Integral-Derivative or PID control combines proportional control, integral control, and derivative control in parallel.

LaTeX: C_%7BPID%7D%5Cleft%28s%5Cright%29%3DK_P%5Cleft%28k%2B%5Cfrac%7Bk_%7Bi%7D%7D%7Bs%7D%2Bk_%7Bd%7Ds%5Cright%29PID[4]

where
LaTeX: K_P is the PID control gain,
LaTeX: k is a constant included for more flexibility,
LaTeX: k_%7Bi%7D is the integral gain, and
LaTeX: k_%7Bd%7D is the derivative gain.
From this generic form we can do the following:
set LaTeX: T_%7Bd%7D%3D0 and Eqn. PID becomes equal to Eqn. PI
set LaTeX: k_%7Bi%7D%3D0 and Eqn. PID becomes equal to Eqn. PD
set LaTeX: k%3D0 and Eqn. PID becomes an integral-derivative controller
set LaTeX: k%3D0%2C%20k_%7Bi%7D%3D0 and Eqn. PID becomes equal to Eqn. D
set LaTeX: k%3D0%2C%20T_%7Bd%7D%3D0 and Eqn. PID becomes equal to Eqn. I

Alternative forms of PID Control

Standard form similar to Eqn. PID except that a pole has been added to the derivative action to ensure a proper transfer function.
LaTeX: C_%7BPID%7D%5Cleft%28s%5Cright%29%3DK_P%5Cleft%281%2B%5Cfrac%7B1%7D%7BT_%7Br%7Ds%7D%2B%5Cfrac%7BT_%7Bd%7Ds%7D%7B%5Ctau_%7BD%7Ds%2B1%7D%5Cright%29PID Alt 1[5]

Note: Typically LaTeX: 0.1T_%7Bd%7D%5Cle%5Ctau_%7BD%7D%5Cle0.2T_%7Bd%7D
Series Form
LaTeX: C_%7BPID%7D%5Cleft%28s%5Cright%29%3DK_s%5Cleft%281%2B%5Cfrac%7BI_s%7D%7Bs%7D%5Cright%29%5Cleft%281%2B%5Cfrac%7BD_%7Bs%7Ds%7D%7B%5Cgamma_%7Bs%7DD_%7Bs%7Ds%2B1%7D%5Cright%29PID Alt 2 - Series Form[6]


Parallel Form
LaTeX: C_%7BPID%7D%5Cleft%28s%5Cright%29%3DK_p%2B%5Cfrac%7BI_p%7D%7Bs%7D%2B%5Cfrac%7BD_%7Bp%7Ds%7D%7B%5Cgamma_%7Bp%7DD_%7Bp%7Ds%2B1%7DPID Alt 3 - Parallel Form[7]


Example: PID Control design using Pole Placement

In this example the coefficients of a PID controller will be derived symbollically. That way you don't have to do the algebra yourself.
Let's assume a 2nd order system of with the following form
LaTeX: H%28s%29%3DK%5Cfrac%7B%5Comega_n%5E2%7D%7Bs%5E2%2B2%5Czeta%5Comega_n%20s%2B%5Comega_n%5E2%7D%20%5Cmbox%7B%20for%20%7D%200%20%5Cle%20%5Czeta%20%5Cle%201Generic 2ndOrder System

where
LaTeX: K is the system gain
LaTeX: %5Comega_n is the system's natural frequency
LaTeX: %5Czeta is the system's damping ratio.
Let's assume we have a PID controller of form
LaTeX: C_%7BPID%7D%5Cleft%28s%5Cright%29%3DK_P%5Cleft%28k%2B%5Cfrac%7Bk_%7Bi%7D%7D%7Bs%7D%2Bk_%7Bd%7Ds%5Cright%29PID[8]

Roll LaTeX: K_p inside the parentheses and add a factor (LaTeX: %5Calpha) to the denominator of the integrator
LaTeX: C_%7BPID%7D%5Cleft%28s%5Cright%29%3Dk%2B%5Cfrac%7Bk_%7Bi%7D%7D%7B%5Calpha%20s%7D%2Bk_%7Bd%7Ds

The LaTeX: %5Calpha is unnecessary but convenient, I'll explain below. Back to the algebra...
LaTeX: C_%7BPID%7D%5Cleft%28s%5Cright%29%3D%5Cfrac%7Bk%5Calpha%20s%2Bk_%7Bi%7D%2Bk_%7Bd%7D%5Calpha%20s%5E2%7D%7B%5Calpha%20s%7D

Finally, rearrange
LaTeX: C_%7BPID%7D%5Cleft%28s%5Cright%29%3D%5Cfrac%7Bk_%7Bd%7D%5Calpha%20s%5E2%2Bk%5Calpha%20s%2Bk_%7Bi%7D%7D%7B%5Calpha%20s%7D

The characteristic equation of this system is
LaTeX: %5CPhi_%7BCL%7D%3D%5Cleft%28s%5E2%2B2%5Czeta%5Comega_%7Bn%7Ds%2B%5Comega_%7Bn%7D%5E2%5Cright%29%5Calpha%20s%2B%5Comega_%7Bn%7D%5E2%5Cleft%28k_%7Bd%7D%5Calpha%20s%5E2%2Bk%5Calpha%20s%2Bk_%7Bi%7D%5Cright%29


LaTeX: %5CPhi_%7BCL%7D%3D%5Calpha%20s%5E3%2B%5Cleft%282%5Czeta%5Comega_%7Bn%7D%5Calpha%2Bk_%7Bd%7D%5Calpha%5Comega_%7Bn%7D%5E2%5Cright%29s%5E2%2B%5Cleft%28%5Comega_%7Bn%7D%5E2%2Bk%5Calpha%5Comega_%7Bn%7D%5E2%5Cright%29s%2B%5Comega_%7Bn%7D%5E2k_%7Bi%7D

From the order of LaTeX: %5CPhi_%7BCL%7D we know we need 3 stable closed loop poles so the form of the desired characteristic equation is
LaTeX: %5Cbeta%20s%5E3%2B%5Cgamma%20s%5E2%2B%5Cchi%20s%2B%5Cnu




Therefore
Table 1: Pole Placement Results
Result
LaTeX: s%5E3
LaTeX: %5Cbeta%3D%5Calpha
LaTeX: s%5E2
LaTeX: %5Cgamma%3D%5Cleft%282%5Czeta%5Comega_%7Bn%7D%5Calpha%2Bk_%7Bd%7D%5Calpha%5Comega_%7Bn%7D%5E2%5Cright%29
LaTeX: s%5E1
LaTeX: %5Cchi%3D%5Cleft%28%5Comega_%7Bn%7D%5E2%2Bk%5Calpha%5Comega_%7Bn%7D%5E2%5Cright%29
LaTeX: s%5E0
LaTeX: %5Cnu%3D%5Comega_%7Bn%7D%5E2k_%7Bi%7D
Once the desired closed loop poles are determined then LaTeX: %5Cbeta%2C%20%5Cgamma%2C%20%5Cchi%2C and LaTeX: %5Cnu can be determined. Algebra does the rest.
In the hovering helicopter example the desired closed loop poles are determined by deciding what a reasonable overshoot and rise time would be. This allowed for the determination of a desired LaTeX: %5Czeta and LaTeX: %5Comega_n. From those a standard 2nd order system was formed. Since 3 poles were required, just as in this case, a 3rd pole was placed at an arbitrarily high frequency. The desired chracteristic equation from that became
LaTeX: %5Cleft%28s%2Ba%5Cright%29%5Cleft%28s%5E2%2B2%5Czeta_%7Bdesired%7D%5Comega_%7Bdesired%7Ds%2B%5Comega_%7Bdesired%7D%5E2%5Cright%29

where
  • LaTeX: a%20%5Cge%2010%20%5Comega_%7Bdesired%7D is our arbitrarily high 3rd pole.
The addition of the pole at LaTeX: -a required that a prefilter be included to reduce overshoot. That prefilter was
LaTeX: W%5Cleft%28s%5Cright%29%3D%5Cfrac%7Ba%7D%7B%5Cleft%28s%2Ba%5Cright%29%7D


Empirical Tuning[9]

For open loop stable plants the following procedure may be used (these steps are quotes, I've added links and changed the table number only)
  1. Set the plant under proportional control, with a very small gain.
  2. Increase the gain until the loop starts oscillating. Note that linear oscillation is required and that it should be detected at the controller output.
  3. Record the controller critical gain LaTeX: K_p%3DK_c and the oscillation period of the controller output, LaTeX: P_c.
  4. Adjust the controller parameters according Table 2; there is some controversy regarding the PID parameterization for which the Z-N method was developed, but the version described here is, to the best knowledge of the authors, applicable to the parameterization of (6.2.4).
Table 2: Ziegler-Nichols tuning, using the oscillation method
LaTeX: K_PLaTeX: T_rLaTeX: T_d
LaTeX: P
LaTeX: 0.50K_c
-
-
LaTeX: PI
LaTeX: 0.45K_c
LaTeX: %5Cfrac%7BP_c%7D%7B1.2%7D
-
LaTeX: PID
LaTeX: 0.60K_c
LaTeX: 0.5P_c
LaTeX: %5Cfrac%7BP_c%7D%7B8%7D
LaTeX: C_%7BPID%7D%5Cleft%28s%5Cright%29%3DK_P%5Cleft%281%2B%5Cfrac%7B1%7D%7BT_%7Br%7Ds%7D%2B%5Cfrac%7BT_%7Bd%7Ds%7D%7B%5Ctau_%7BD%7Ds%2B1%7D%5Cright%29Eqn. 6.2.4[10]

Note: Typically LaTeX: 0.1T_%7Bd%7D%5Cle%5Ctau_%7BD%7D%5Cle0.2T_%7Bd%7D
The parameters in Table 2 come from Zieglers and Nichols whose goal was to acquire an underdamped response to a step input for plants of the form
LaTeX: G_0%5Cleft%28s%5Cright%29%3D%5Cfrac%7BK_%7B0%7De%5E%7B-s%5Ctau_%7B0%7D%7D%7D%7B%5Cnu_%7B0%7Ds%2B1%7D


PID Control Design - Beyond the Recipe

Recipes for designing controllers with Proportional-Integral-Derivative (PID) elements have made it easy to tune control systems as demonstrated above. The Ziegler-Nichols approach has the virtue that the system identification can be reduced to simple measurements.
Unfortunately, not all processes are well behaved. They may not have the required performance or stability, or may be sensitive to non-ideal elements such as disturbances or friction. When this occurs, the designer often searches for reasons and would like to have a better foundation for understanding the system.
In particular, the Ziegler-Nichols method places an integrator (pole at the origin), and two zeros at the same frequency. The method seems to place a greater emphasis on performance than stability. The damping ratio is typically around 0.4 and the system closed loop response does not roll off very quickly. This may result excessively large in large control inputs and sensitivity to disturbances.
In the PID Control Design - Beyond the Recipe application note we discuss a particular PID design example and offer a third direct design method.

Method I

This method is useful when a measurement of the plant transient response is possible. A step is applied, and a measurement of the transport lag and time constant is made. Then the gains are calculated.
Advantages
One of the assumptions of the Ziegler-Nichols method is that the plant is in the form of a transport lag (delay) and a single time constant. If the system is of higher order the method may not work and be frustrating to tune in practice. The measurement can help you verify the assumptions about the plant.

Method II

This method uses a feedback loop around the plant to determine the oscillation as shown in Empirical Tuning.
Advantages
The plant parameters do not need to be precisely known. The oscillation of the system can easily be measured.

Method III

This method is based on achieving transient response objectives. These objectives can be translated into gain and phase margin requirements. A compensator can be custom designed to achieve the objectives with a minimum of bandwidth.
Advantages
In many cases this method results in a design with one less zero in the response. The response rolls off sooner beyond the closed loop bandwidth for a more resilient system. The appropriate design parameters can be readily calculated with a spreadsheet.

Disclaimer This is an introduction to an application note uses SimApp Dynamic Simulation Software, and a related design spreadsheet in Excel. Peter Way is the President of VentiMar, LLC and the Marketing and Sales Manager for SimApp

See Also

References

Goodwin, G. C., Graebe, S. F., and Salgado, M. E. 2000 Control System Design. 1st. Prentice Hall PTR. ISBN 0139586539
Franklin, G. F., Emami-Naeini, A., and Powell, J. D. 1993 Feedback Control of Dynamic Systems. 3rd. Addison-Wesley Longman Publishing Co., Inc. ISBN 0201527472



'via Blog this'

No comments:

Blog Archive