Flexible gain scheduler

Flexible gain scheduler

ISA TRANSACTIONS ® ELSEVIER ISA Transactions 33 (1994) 35-41 Flexible gain scheduler Gregory K. McMillan ,,a, Willy K. Wojsznis b, Guy T. Borders b...

401KB Sizes 4 Downloads 75 Views

ISA TRANSACTIONS ®

ELSEVIER

ISA Transactions 33 (1994) 35-41

Flexible gain scheduler Gregory K. McMillan ,,a, Willy K. Wojsznis b, Guy T. Borders b " Monsanto, 800 N. Lindbergh Bh'd., St. Louis, MO 63167, USA b Fisher-Rosemount Systems, Inc., 1712 Centre Creek Drive, Austin, T X 78754, USA

Abstract

A gain scheduler for PID controllers is discussed, which combines the simplicity of a rigid gain scheduler with continuous updating of controller parameters, specific to adaptive systems. The algorithm distinguishes the ranges of a linear process like a rigid scheduler and, additionally, assumes nonlinear process behavior in some proximity of the range limits. The algorithm applies fuzzy interpolation in the bands of process nonlinearity. In the implementation, available features include disabling fuzzy control while preserving a hysteresis between ranges.

Key words: Adaptive control; Nonlinear process control; Gain scheduling

1. I n t r o d u c t i o n

Linearity is more the exception than the rule for control loops in the process industry. In fact, the only nearly linear self-regulating loops are flow loops with a linear m e a s u r e m e n t (such as a magmeter), a variable speed drive, and slow disturbances. Even in this type of loops, fast upsets that cause a rate change in flow controller output faster than the possible rate of change of the drive speed, cause a dynamic nonlinearity due to the velocity limited response. Control valves introduce nonlinearities due to - prestroke dead time, - stroking time, - deadband, - slip-stick, - inherent trim characteristics, - variable pressures.

* Corresponding author.

Even in the best case (a valve with linear trim, constant pressure and positioner), the deadband and changes in valve gain (especially near shutoff), are not negligible for sensitive loops. If you consider other types of loops such as pressure, t e m p e r a t u r e and composition, there are considerably greater nonlinearities due to changes in the process gain, time constant and dead time. The one thing you can say about a time constant is that it is rarely constant. Some generalizations can be made about loops. Table l shows the relationship between controller tuning settings and loop condition that are typical for the type listed. Table I demonstrates that gain scheduling based on these relationships can greatly improve the performance of many loops.

2. Gain

scheduling

background

Process control strategies use various methods of gain scheduling to diminish the effect of pro-

0019-0578/94/$07.00 © 1994 Elsevier Science B.V. All rights reserved SSDI 001 9 - 0 5 7 8 ( 9 4 ) 0 0 0 0 6 - 8

36

G.K. McMillan et al. / ISA Transactions 33 (1994) 35-41

Table 1 Gain scheduling effects on the relationship between controller tuning settings and loop condition Type

Setting

Relation

Loop condition

Variable

Control valve pH Temperature Temperature Liquid pressure Level Feedforward Deadtime a

Gain Gain Gain Gain Gain Gain Gain Gain

Inverse Inverse Inverse Direct Inverse Direct Inverse Direct

Slope on installed characteristic Slope of titration curve Jacket or coil flow Liquid mass in vessel Slope of pump curve Cross-sectional area (vessel) Feedforward multiplier Flow or conveyor speed

Valve position pH Flow Level Flow Level Flow Speed

a The gain for dead time dominant loops depends only upon the steady state open loop gain. However, if the dead time is less than the time constant of the open loop response, the gain is inversely proportional to the transportation time delay (dead time) that is inversely proportional to the flow or conveyor speed.

cess nonlinearities on control loops performance. A general approach assumes a nonlinear process model, on-line model identification and adaptive control. This approach, although quite successful in specific applications, cannot be universally applied because a computational load for adaptive control is substantially higher than for assumed linear process control. You can apply several simplified techniques for gain scheduling in linear controllers. The known approach assigns to the process a number of ranges depending on the specific process and application, and assumes linear process behavior within every range. The technique is quite useful in practice, specifically when PID control with tuning on-demand is used jointly with gain scheduling. Tuning on-demand finds controller settings for every defined range. It also allows controller settings to be switched automatically when the process operation moves to the neighboring range. Hagglund and Astrom present an implementation of this type of gain scheduling [1]. The limitation of this technique appears when range limits cannot be defined exactly or when range limits are changing as a consequence of a process state. Another approach is based on fuzzy control and its application to gain scheduling. This technique assumes linear interpolation of the desired controller parameters, defined initially for some number of ranges. The deviation between interpolated and desired parameters depends on the number of ranges, thus control performance de-

pends on how far desired controller parameters are from optimal parameters. Ling and Edgar show where process-modelbased criterion can be used to calculate PID controller settings according to the process state [2]. The algorithm is called model-based fuzzy gain scheduling. Kaya et al. describe another model based on a gain scheduler [3]. The disadvantage of this approach is that a process model has to be assumed and identified, which is not common in the industrial practice. The presented solution combines the simplicity of the rigid gain scheduler and advantages of the fuzzy gain scheduler.

3. Operation The operation of the flexible gain scheduler is illustrated in Fig. 1, which shows a controlled process that is supervised by a gain scheduler. The gain scheduler has access to the process input variable u, process output variable y and

Scheduler

Gain

SP ~

~-e

T

I

Process

L Controller

/

J

u

T

Process

Fig. 1. General principle of the gain scheduling.

T

Y

G.K. McMillan et aL / ISA Transactions 33 (1994) 35-41

10( ~ "5 O

I

I

I

I

I

I __~/

~_ Fuzzy/

~

I

deadban~l

I

ano, 7

i

Test Reterence Value

No Changes

k--I I I I I

it 1

Fig. 2. Sample

noe

:~ Update ControllerFrom Scheduler I

Within Fuzzy Band FuzzySchedule Enabled Within Fuzzy Band Fuzzy Schedule disabled

III

Limit 2 Process Input (% of span)

1O0

FCI-1 ACID FEED

>n update ControllerFromScheduler J )~ Update SchedulerFrom Controller J

enable fuzzy operation. The scheduler then periodically reads the process variables and defines the actual operating range and the scheduler updates controller settings with settings defined for the specific ranges, or with settings computed according to the fuzzy algorithms. Fig. 3 shows the logic of the gain scheduling operation. The gain scheduler considers six possible cases dependent on the reference value. Specifically, when the process is within the enabled fuzzy 9-00T-1992 3 ~C1-3 ~ S S E L PH

20. 00

[

50. O0

14. 00 !

i0. 31 I

3hSE4

F! ~,

I~'PH

|i

FEED

13.00 MODE : MAN BJ.,~NI,I:

AVI-4

0 00

-3 A BASE3

A%l,.L~VI:

AVI-3 B

~ _ . _ . @

DEG F 50

49 76 % 7 30

9.50 PH

ATI-3

0 O0 MODE: AUTO

5 ACI-5 ~ C I ~ C PH 1400

5 0 O0 91. 09

11oo.oo

4 ACI-4 FEED PH 14 O0

50. 00 11 37 7 00 Pit

MODE

'I'V1-2

13:4147

L

FVI-I

WATER 2 TCI-2 TEMPEP~TURE II 1 5 0 00

operation.

curve.

NE~IZER

$

I I

Fig. 3. Logic of t h e f l e x i b l e g a i n s c h e d u l e r

L~I

1

~.~u,n~

:~ .o~=,oo

Moved out ot tuzzy Band & Fuzzy Disabled

nonlinear process i n p u t / o u t p u t

11 o.oo

:4 Ap~,~Fo~

Moved out of Fuzzy Band& FuzzyEnabled

other process variables, which are used for defining the ranges of the process Input/Output curve, as shown in Fig. 2. When you apply a gain scheduler in a Distributed Control System environment and do not attach it to a specific loop, you must enter the loop address and range limits before the scheduler starts its operation. You must also enter the width of the regions for the fuzzy control and

II

>I Upda,,SchedulerFromController I

New Range

/ 0t~~Un

37

VESSEL LEVEL i00. 0O

19.03 % 49.97 s o . oo

0.00 1161 7 00

00

MODE : ALARM :

~0DE

Fig, 4. A c i d f e e d , b a s e c o n t r o l s t r e a m n e u t r a l i z e r

%

PH

AYI-5

model.

:

000

I " MODE

0.00

: AI.V£C ALBI~M

G.K~ McMillan et al. / ISA Transactions 33 (1994) 35-41

38

range, the fuzzy control provides the following controller settings as described in [2]:

These equations provide linear interpolation of the gain, the reset and the rate in fuzzy regions. The interpolation gives preference for the higher gain and reset and may result in underdamped control. When more damped action is required, the inverse of the gain and reset are interpolated, which gives preference for the low gain and reset in most of the fuzzy region. The approach has been proven in [2], where model based criteria were used to derive controller settings in fuzzy bands. The selection of the interpolating rules may be done automatically or manually.

K c = WlKcl + w z K c 2 ,

Reset = 1 / K c (wlK~lResetl + w z K c 2 R e s e t 2 ) , Rate = 1 / K c (WlKclRatel + wzKczRate2 ), w 2 = (ReferenceValue - L 1 + delta)/2delta, where W1 = 1

-

W2,

Kcl,Resetl,Ratel = Controller settings for range1, K~2 ,Reset2,Rate2 = Controller settings for range2,

4. Test results

K~ ,Reset,Rate The flexible gain scheduler was tested with a model of a neutralizer (see Fig. 4). The control was done on a pH loop ( A C 1 - 4 in Fig. 4) with split-range control of a strong base entering the

= Controller settings for fuzzy operation, L1 = Range 1 upper limit, delta = Fuzzy region width.

1

1":['Nil

#-- ThO 1 ACl-4 2 ACl-4 3 A01-4

(6)

14.00 14.00

ATT~ PV SP OUTPUT

EUWORD PH PR

INT 15S 15S 15S

8-08T-1992 21 : 12 : 0 3 ATTP, EUWORD INT

TAG

100.00

CURSOR TIME

~ A A A ~ A A h, A ,r] A /% CURSOB VALUE 7.38 9.50 4 9 73

0.00 O. 00 O. 00

.................

8-0CT-1992

2 ACl-4 FEED PH 14. 00

I

49. 04 848 9.50

,.

.........

. .........

. .........

• ..........

20:E5:12

,..,,

8-0CT-1992

i0

LOOP TAG

, ,,...

21:11:57

ACI-4

LOOP ID :

3 RANGE I LIMIT

25. 0 0 0

4 RANOE II LIMIT

75. 000

I ACTI%'E RANOE :

5 DE~D BAND

i0. 000

I

III

II

I

~

CUBP~NT

6 F~'ZZ~r 7 At~TGTUNER

PH

GAIN RESET ~W'l~

2. 000 2. 000

1O. 005 000 0 000

Iii iii

REFERENCE : VALUE :

PW 79. ~93

0. 000

I

i00 2O. 000 0 000

8 GS LOP' S 0

O, O0 MODE &~ ALAR.M :

1284

9 [ SCHEDULING [] OFF

i00 ii

Fig. 5. p H loop step response to setpoint change of p H 11.0 to p H 9.5 with gain scheduling off.

G.K. McMillan et al. / ISA Transactions 33 (1994) 35-41

action. This makes it virtually impossible to exercise good control in any region. In the test performed, the scheduler used three PID settings, one for each specific region. An adjustable deadband of 10% was used. The range limits were set to be at 25% and 75% of span (pH of 3.5 and 10.5, respectively). The procedure introduced small pH setpoint changes in the loop and tested the scheduler at each change, rather than using one setting only. The scheduler was tested both with and without the fuzzy interpolation. The controller gains used differed by a magnitude of 400 times, which is an indication of the vast difference existing between process gains. The results from the pH loop showed that the best control was provided by the scheduler with the fuzzy-model-based (inverse) interpolation enabled. The control provided by only one PID setting proved to be insufficient. Figs. 5 and 6

mixer. The feed to the mixer was a strong acid. The pH sensor was located after the mixer and before the entrance to the vessel. The simulation used charge, mass and energy balances and also provided valve hysteresis and noise in the process. In a pH loop such as the one described, it is often difficult to provide good control with only one set of PID loop parameters. The reason is that in a typical sigmoidal pH curve the middle region process gain is sometimes one or two orders of magnitude greater than the outer two regions. When you use one PID setting, often it is one that lies between the actual controller gains necessary for each region. This results in both too slow of a response for low process gain regions and too fast of a response for high process gain regions. Using only one PID setting in this manner results in overall PID settings that are merely a compromise calling for frequent operator inter-

1

(6)

A'l~IR

EUWORD

INT

1 ACI-4

PV

PH

15S

2 ACl-4 ACI-4

SP OTJTP~

PH

15S 15S

#

1400 14.00 I00.00

TAG

39

~

8-0CT-1992 ATI~

TAG

20:00:24-EU%;0RD INT

C U R S OP. T I M E .____

CURSOR

0.00 0. 00 0. 00

................................................ 8-00T-1992

19:44:42 3 RANGE

4 6 . S0 • 9.30 9.S0 PIt

,[11°

4

R~NOE

5

DEAD

I LIMIT

2~.000

II L I M I T

i0

LOOP

ENABLED

GAIN

V AUTOTUNEI~ 0S

20:00:12

ACI-4

:

LOOP

BANOE:

i0000

HES~

8

TAG

I ACTIVE

75,000

BAND

6 FUZZY

. .......... ,,,,,,,,,m,, 8-0CT-Ig92

2 ACI-4 FEED PH

2.000 2.000 0.000

FUZZY

II/III

:

ALARM:

AUTO

ID

:

I

III

OUI~NT

0.005

2.000

0. 0 0 5

1.000

2.000

0.000

0.000

1. 0 0 0 0. 0 0 0

LCP'S I00 9

SCHEDULING



ON

ii

1284

II

O. O0

MODE

VALUE 9 30 9 S0 46.50

P.EFERENOE : VALUE :

PV 66 520

Fig. 6. p H l o o p r e s p o n s e to s e t p o i n t c h a n g e o f p H 11.0 to p H 9.5 w i t h g a i n s c h e d u l i n g on.

G.K. McMillan et al. / ISA Transactions 33 (1994) 35-41

40

1 (6) b~]"iIJli

TAG I ACI-4 2 ACl-4 3 ACl-4

14.00 14 O0 I00

0 0

ATTR PV SP OUTPUT

~

18-0CT-1992~21:31:12"~ ATTIR EUW0B.D

TA0

INT

CURSOR VALUE 4.53 4.50 45. 66

00 00 0

........

2 AOl-4 FEED PM

I

INT 15S 15S 15S

8URS0R TIM~

" .........

18-0CT-1992

I

E~0RD P~ PH

14.00

45.$2 % 4.$3 I

4 .P 5H 0

" .........

" .........

" .........

• .........

21 : 15 : 29

3 ~h*aNOE I L I M I T

25.000

4 ~OE

75.000

II L I M I T

5 DF2xD Bae~D 6 FUZZY

" .........

18-0CT-1992 i0

L O O P TAG:

hCi-4

I ACTIVE

i0.000

7 AUT0~R

LOOP

ttANOE: I

ENABLED

•'A

21:30:59

FUZZY

1284

I

I/II

0~NT

III

IX

ID:

GAIN

2.000

0.010

2.000

0.307

RESET

2.000

2.000

RATE

0

0.000

2,000 0.000

2.000 0.000

000

8 8S L C P ' S 0

0.00

MODE: A ~ 0 ALARM:

9

F i g . 7. p H

loop

step

SCHEDULIN8

response

to setpoint

change

show a comparison between these two types of control which both have a setpoint change from a pH 11 to 9.5. In Fig. 5 the gain scheduler is turned off, and only the current PID settings are used. This example shows clearly that the process is in oscillation and not converging to setpoint. However, in Fig. 6, the gain scheduler is turned on for the same setpoint change, and the process converges satisfactorily to setpoint. Fig. 7 shows another setpoint change from pH 3 to 4.5. Here the gain scheduler is on and the transition curve converges smoothly. Note that the gain scheduler merely supervises which region the process is in, and uses the given PID settings for that region accordingly. If the settings cannot control the region (i.e., the region is nonlinear or the process curve is unknown), the scheduler can only provide the settings given to it by the operators and engineers. The deadband fuzzy interpolation provides a method of nonlinear control for the transition regions which deft-

of pH

i00

~

II

3.0 to pH

[ REFERENCE [ VALUE : :

4.5 with

PV 32160

gain scheduling

on.

nitely helps in control, but the scheduler is only as good as the model approximation. Overall, the gain scheduling provided significant control improvement of pH loops. You must realize though, that a pH curve has a very steep process gain, and control in this region requires manipulating valve positions by tenths-of-percent of span, which is very difficult to achieve.

5. Conclusions

In testing simulated pH loops, the gain scheduler with bands of fuzzy-defined settings between linear regions has demonstrated significant improvement in control performance as compared to control with a rigid-gain scheduler or control with averaging controller settings. Gradual changes of controller settings when moving from one linear region to another demonstrate a positive effect on loop behavior in intermediate bands. However, linear interpolation of controller set-

G.K. McMillan et al. / ISA Transactions 33 (1994) 35-41

tings may, in some cases, give too sensitive control. In such cases we recommend using the model-based fuzzy scheduling which leads to the interpolation of the inverse of controller gain and reset. The automatic selection of the scheduling rules may be applied in such a way that when the process output (or reference value) is moving in the region of lower process gain, the linear interpolation should be set up, and while the process reference value is moving toward higher process gain the model based fuzzy scheduling should be set on.

41

References [1] T. Hagglund and K.J. Astrom, "An industrial adaptive PID controller", IFAC 1989, Glasgow. [2] Ling, Cheng and T.F. Edgar, "A new fuzzy gain scheduling algorithm for process control", American Control Conference (1992) Chicago. [3] A. Kaya et al., Adaptive process control using function blocks, US Patent number 4,481,567, 11/1984. [4] Lane et al., Apparatus and method using adaptive gain scheduling algorithm, US Patent number 4,768,14,8/1988. [5] G.K. McMillan, "Tuning and control loop performance", ISA (1990). [6] W. Pedrycz, Fuzzy Control and Fuzzy Systems, Wiley, New York, 1989.