Sie sind auf Seite 1von 5

ThM3-2

2:20

hxeedings of the 1999 EEE International Conference on Control Applications Kohala Coast-Island of Hawaii, Hawaii, USA August 22-27, 1999

Auto-Tuning PID U s i n g Loop-ShapingIdeas Sujit Gaikwad, Sachi Dash and Gunter Stein gaikwad-sujit 0htc.honeywell.com
Honeywell Technology Center Minneapolis, MN 554 18, USA

Abstract In this paper we present a direct approach for auto-tuning PID controllers. The approach is based on loop-shaping principles. Auto-tuning is accomplished under closed-loop system excitation without fitting a model of the system. The tuning procedure recursively adapts PID parameters to achieve a target loop-shape. In simulation testing the procedure works very well for systems with integrators, dead-time, lead dynamics, inverse response, sensor noise and colored noise disturbances. Here we present an example of a first order plant with delay operating under a colored noise disturbance,

the control-loop and a target loopshape. The fitting is performed on sampled observations of the proportional, integral, derivative actions and the output of the target-loop transfer function driven by the system input.

2 . Loop-shaping Overview
The objective of feedback control is to maintain a system at a desired output in the presence of disturbances, uncertainty, system instability and measurement noise. Figure 1 shows the block diagram of a typical feedback control system. The closed-loop transfer functions relating the tracking error e to the set-point r ,the measurement noise n , the disturbances doand di are:

1. Introduction
Simple Proportional Integral Derivative (PID) controllers are still the most popular control algorithms in process industries. All plant information and control systems offer PID control algorithms as standard equipment in their hardware. However, tuning PID loops is still a formidable task for control engineers. Today, there are hundreds of tools, methods and theories available for this purpose. However, in practice the bulk of these methods require a lot of engineering effort to get satisfactory tuning. Currently, control engineers use commercially available tools only as a startins point and then play with the PID parameters to get acceptable settings. This is a very time consuming practice. The idea of an auto-tuning or a self-tuning PID controller is very attractive. Such a controller will determine PID settings on its own without much operator intervention. This idea has tremendous commercial value and there are a number of auto-tuners in the market. In fact almost every Distributed Control System (DCS) manufacturer has one. Shinskey (FeedbackControllersfor the Process Industries, McGraw H i l l ,1994) has observed that many of the commercial offerings are not particularly effective. In his experience most of them fall into the Category of unreliable, if working at all. We are sure that practicing engineers who have tried some of these techniques will recognize that auto-tuning does not work all the time. However, since there are so many PID loops to be tuned the technology has its place in industrial control applications. For example, a typical refinery has 3000 PID loops. We believe that with the deployment of field-bus in the process industry there will be continued attention given to this problem. In this paper we have developed an autotuning PID controller based on encouraging ideas from classical loop-shaping theory. The auto-tuner determines optimum PID gains under closed-loop system excitation by recursively minimizing a weighted fit of the error between
0-7803-5446-X/99$10.00 0 1999 IEEE

e=

1 GK G ( r - d o ) +n--d, l+GK I+GK l+GK

e = S ( r - d , -Gdi)+Tn
where G is the system being controlled, K is the controller, S = 1/(1 +GK)is the sensitivity function and

T = GK/(l+ GK) is the complimentary sensitivity


function. It is desired to keep the tracking error small which translates to the minimization of both S and T . However, the control system must meet the fundamental constraint of S +T = 1. Therefore, we cannot make S and T arbitrarily small at the same time. Realizing, that typically set-point and disturbances are mainly low frequency signals and measurement noise is a high frequency signal we will get satisfactory performance by making S small at low frequencies and T small at high frequencies. Since and T both depend on the loop transfer function, a target loop is selected such that the closed-loop transfer functions have desirable properties. Loop-shaping is the classic frequency based control design methodology that achieves this objective by shaping the open-loop transfer function L ( j a ) = G ( j a ) K ( j a ) . This is done by choosing loop-shapes that have a large gain at low frequencies below crossover and a small gain at high frequencies above crossover. The controller K is selected such that the loop transfer function GK approximates the target loop L. Selection of the target loop is governed by bandwidth constraints imposed by uncertainty in the model, non-minimum phase behavior and unstable Doles. 589

3 . Auto-Tuning PID
We have developed an auto-tuner for Proportional Integral Derivative (PID) controllers based on loops-shaping ideas. The proportional gain K,, integral gain Ki and the derivative term Kd are selected by directly fitting the loop transfer function to a target loopshape. A PID form with independent gains and derivative approximation is used:

d ( t )= N(0,l)

K. KdS K = Kc +I+
S

as+l

Figure 2 shows a block diagram representation of the autotuning procedure. PID parameters are estimated in the closed-loop (AUTOmode) without identifying a model for the system. The objective is to auto-tune the PID gains with very little operator interaction. System excitation is provided by an external signal that is added to the controIIer output as part of the tuning method. The input is seIected to have power in the frequency region around the desired bandwidth. This input could be a series of steps, a pseudo random binary sequence or band-pass filtered and clipped white noise. It is important to inject an input that is plant friendly. i.e. a signal with which an operator is comfortable. The target loopshape is determined by the desired closedloop bandwidth and the nature of the plant. For example, for stable systems we select a first-order loop-shape ( L = wc/s) and integrating plants are tuned for a secondorder target loop-shape ( L=
S

:
) '

). Here

a,is the

crossover frequency and x is a parameter that governs the

L = wc/s;wc = 1 ; T s= 0 . 0 1 The system has a time constant of 0.1 min. a delay of 0.1 min and the data is sampled at 0.01 min. Figure 3 shows the system in open-loop with the colored-noise disturbance acting on the system. Such systems are difficult to identify and control because of the drifting disturbance and timedelay. Figure 4 shows the closed-loop data collected during the auto-tuning procedure. The system output is nicely maintained between + 2 and -2 throughout the tuning procedure. The excitation signal is white noise that is clipped and bandpass filtered to have power around crossover. A recursive least-squares algorithm with nonnegativity constraints was used to fit the PID parameters. The least-squares algorithm is documented in Goodwin and Sin (Adaptive Filtering Prediction and Control, Prentice Hall, 1984, pp. 92-94). The performance of this algorithm can be improved using dead-zones and normalization schemes. At initial time when the excitation signal is small we observe drifts in the parameters. The PID parameters are adapted at every sampling instant. Figure 5 shows the convergence of the PID parameters and the fitting error. We observe that the parameters nicely converge in about 10 minutes and the fitting error becomes small very quickly. Figures 6 and 7 show frequency response analyses for the final system. In the frequency ranges around the system bandwidth we observe very good fits of the sensitivity, complementary sensitivity and loop transfer functions.
5. Conclusions

low-frequency slope or overshoot in response to a step setpoint change. The bandwidth is limited by the nature of the system and uncertainty represented by quality of the data collected during testing. The tuning algorithm has a single knob (bandwidth) that the operator can adjust to get a desirable loop with acceptable performance. An approximate range for the bandwidth can be obtained using a pre-tuning step test. A recursive least squares algorithm is used to fit the PID parameters. The fitting is performed to meet the objective:

min 11 uID (L- GK) /(l+ GK)II, which is equivalent to min IILu - Ke, II,
Note that since G does not explicitly appear in this objective it allows us to directly fit the controller. For the PID controller this is a solution to a least-squares problem.
4. Case Study

In this paper we have presented a novel algorithm for tuning PID controllers under closed-loop system excitation. The auto-tuning procedure is a direct approach, which determines optimum P I D coefficients without identifying a model of the system. The PID gains are computed to approximate a specified target loop transfer function. In simulation testing we have found that the procedure works very well for systems with integrators, dead-time, lead dynamics, inverse response, sensor noise and colored noise disturbances. Opportunities for future research include an outer loop for estimating an achievable bandwidth, adaptive (aIways on) tuning, extension to higher-order controllers, and multivariable systems.
Acknowledgment Support from the Honeywell Initiative program is appreciated. We would like to thank Ward MacArthur and Kostas Tsakalis for their insights into the project.

We consider the case of a plant with time operating under a drifting disturbance as:

590

Figure 1: Classical Feedback Control Structure

.__..___..._.. __...._.._-.._. L . 1 .L . .__.. j I 1 I

r
I
I I
I

W
excitation

I l l I l l

i l i

I
$-//?
I

I l l I I I I I I
I l l I I I I I I

I l l

IkP

derivative s* = s/(a*s+l) approxiation

Iki

Ts--1------;
I I I 1
I

I I

Figure 2: Loopshaping based AutoTuning PID

hgure3: Normal operating disturbance in the system

591

Y
i
2
0

-2 2

0 41

10

12

14

16

18

up=J!%pid

1
I

2
0
-2
d

-0

10

12

14

16

18

Tim

UDid

'

2
0 -2
d

-1 -1.5

10

12

14

16

18

'

2 4 6 8

10

12

14

16

18

Time

Time

Figure 4. Closed-loop inpudoutput data during AutoTuning

theta=(kp ki kdJ;Kp=0.17879Ki=0.98417Kd=0.013693

RI elm
0.4

I.4

1.2
1

a3

a2

0.8
0.6
4.1 *

0.4

4.2
4.3
4 . 4

.
2
6

02

0
0

I
0
4

10

12

14

16

18

10

12

14

16

18

Tme[Min)

n r r e ( m 1

Figure 5. Parameter convergence of the recursive least squares algorithm.

592

10'

ld

too

1 0

10"

A
0

I@
10'

1 0 '
1 10' 10"
1oo

10'

td

10'

loj lo)

lU*

1 U '

1Q

lb

1 6

1 8

Frequency [Radwslime]

Figure 6. Sensitivity and complementary sensitivity comparison with the target loop.

hesuency W ~ I W

Figure 7. Fit of the loop (GK) versus the target loop (L)

593