19
Contents 1.1 Gain Scheduling ...................................................... 2 1.2 Design of Gain-Scheduling Controllers .......................................... 2 1.2.1 Nonlinear actuator (Non-linear valve problem) ................................. 3 1.2.2 Gain scheduling based on measurements of auxiliary variables (Tank system problem) ........... 8 1.2.3 Time scaling based on production rate (Concentration control problem) ................... 11 1.2.4 Nonlinear transformations ............................................. 14 1.3 MATLAB Codes and Simulation ............................................. 19 1.4 References .......................................................... 19 1.5 Contacts ........................................................... 19 1

Gain Scheduling (GS)

Embed Size (px)

Citation preview

Page 1: Gain Scheduling (GS)

Contents

1.1 Gain Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2 Design of Gain-Scheduling Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2.1 Nonlinear actuator (Non-linear valve problem) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2.2 Gain scheduling based on measurements of auxiliary variables (Tank system problem) . . . . . . . . . . . 8

1.2.3 Time scaling based on production rate (Concentration control problem) . . . . . . . . . . . . . . . . . . . 11

1.2.4 Nonlinear transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

1.3 MATLAB Codes and Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.4 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.5 Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1

Page 2: Gain Scheduling (GS)

1.1. GAIN SCHEDULING Adaptive Control

1.1 Gain Scheduling

It is sometimes possible to find auxiliary variables that correlate well with the changes in process dynamics. It is then possible

to reduce the effects of parameter variations simply by changing the parameters of the controller as functions of the auxiliary

variables (see Figure 1.1). Gain scheduling can thus be viewed as a feedback control system in which the feedback gains are

adjusted by using feedforward compensation. The concept of gain scheduling originated in connection with the development of

flight control systems. In this application the Mach number and the dynamic pressure are measured by air data sensors and

used as scheduling variables.

Figure 1.1: Block diagram of a system in which influences of paramaer variations are reduced by gain scheduling.

A main problem in the design of systems with gain scheduling is to find suitable scheduling variables. This is normally done

on the basis of knowledge of the physics of a system. In process control the production rate can often be chosen as a scheduling

variable, since time constants and time delays are often inversely proportional to production rate.

When scheduling variables have been determined, the controller parameters are calculated at a number of operating conditions

by using some suitable design method. The controller is thus tuned or calibrated for each operating condition. The stability

and performance of the system are typically evaluated by simulation; particular attention is given to the transition between

different operating conditions. The number of entries in the scheduling tables is increased if necessary. Notice, however, that

there is no feedback from the performance of the closed-loop system to the controller parameters.

It is sometimes possible to obtain gain schedules by introducing nonlinear transformations in such a way that the transformed

system does not depend on the operating conditions. The auxiliary measurements are used together with the process measure-

ments to calculate the transformed variables. The transformed control variable is then calculated and retransformed before it is

applied to the process. The controller thus obtained can be regarded as being composed of two nonlinear transformations with

a linear controller in between. Sometimes the transformation is based on variables that are obtained indirectly through state

estimation. Examples are given in Sections 9.4 and 9.5.

One drawback of gain scheduling is that it is an open-loop compensation. There is no feedback to compensate for an incorrect

schedule. Another drawback of gain scheduling is that the design may be time-consuming. The controller parameters must be

determined for many operating conditions, and the performance must be checked by extensive simulations. This difficulty is

partly avoided if scheduling is based on nonlinear transformations.

Gain scheduling has the advantage that the controller parameters can be changed very quickly in response to process changes.

Since no estimation of parameters occurs, the limiting factors depend on how quickly the auxiliary measurements respond to

process changes.

1.2 Design of Gain-Scheduling Controllers

It is difficult to give general rules for designing gain-scheduling controllers. The key question is to determine the variables

that can be used as scheduling variables. It is clear that these auxiliary signals must reflect the operating conditions of the

plant. Ideally, there should be simple expressions for how the controller parameters relate to the scheduling variables. It is thus

necessary to have good insight into the dynamics of the process if gain scheduling is to be used. The following general ideas can

be useful:

• Linearization of nonlinear actuators,

• Gain scheduling based on measurements of auxiliary variables,

• Time scaling based on production rate, and

• Nonlinear transformations.

The ideas are illustrated by some examples.

Mohamed Mohamed El-Sayed Atyya Page 2 of 19

Page 3: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

1.2.1 Nonlinear actuator (Non-linear valve problem)

The figure below slows a process

(G(s) = 1

(s+1)3

)with non-linear valve v = f(u) = u4

, controlled by PI controller

Gc(s) = k(

1 + 1Tis

)

Figure 1.2: Block diagram of a flow control loop with a PI controller and a nonlinear valve.

if k = 0.15 , Ti = 1 we get the following results

Mohamed Mohamed El-Sayed Atyya Page 3 of 19

Page 4: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

Valve Approximation

Because of non-linearity of the valve, so we split the valve characteristic line to two regions as shown,

as f̂−1(c) =

{0.433 c 0 ≤ c ≤ 3

0.0538 c+ 1.139 3 ≤ c ≤ 16Finally we get,

Figure 1.3: Compensation of a nonlinear actuator using an approximate inverse.

Mohamed Mohamed El-Sayed Atyya Page 4 of 19

Page 5: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

For the same values of k and Ti and same inputs we get,

Mohamed Mohamed El-Sayed Atyya Page 5 of 19

Page 6: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

Controller with Gain Change

Another solution of the problem is to change the controller parameter as I choose,

Ti = 0.05 , k =

{uc if uc ≤ 11uc

if uc ≥ 1

For the same inputs we get,

Mohamed Mohamed El-Sayed Atyya Page 6 of 19

Page 7: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

Controller with Parameter Change

Another solution of the problem is to change the controller parameter as I choose,

Ti =

{0.05 if uc < 1

14uc

if uc ≥ 1, k =

{uc if uc ≤ 11uc

if uc ≥ 1

For the same inputs we get,

Mohamed Mohamed El-Sayed Atyya Page 7 of 19

Page 8: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

1.2.2 Gain scheduling based on measurements of auxiliary variables (Tank system problem)

System Modeling

For the following tank,

• qin : Inlet volume flow rate

• qout : Outlet volume flow rate

• a : Cross sectional area of tap

• h : Height of the tank

• A(h) : Cross sectional area of tank at height h

• Ao : Cross sectional area of tank at height h

qin − qout =dV

dt=dV

dh

dh

dt

dV = A(h) dh ⇒ dV

dh= A(h)

qin − qout = A(h)dh

dtqout = V̇out = avout ;

v2out = v2

in + 2gh , vin ≈ 0 ⇒ vout =√

2gh

qout = a√

2gh

qout − a√

2gh = A(h)dh

dtLinearization :

qin = qo,in + ∆qin , h = ho + ∆h

qo,out + ∆qin − a√

2g(ho + ∆h) = A(ho + ∆h)d

dt(ho + ∆h)

dhodt

= 0 , A(ho + ∆h) ≈ A(ho)√2g(ho + ∆h) =

√2gho

(1 +

∆h

ho

)≈√

2gho

(1 +

1

2

∆h

ho

)@ steady state qo,in − qo,out = 0 ⇒ qo,in − a

√2gho = 0

∆qin → qin , ∆h → h

qo,in + qin − a√

2gho − a√

2gho

(h

2ho

)= A(ho)

dh

dt

Qin −a

2

√2g

hoH = AoHs ; Ao = A(ho)

let β =1

Ao, α =

a

2Ao

√2g

ho

Mohamed Mohamed El-Sayed Atyya Page 8 of 19

Page 9: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

G(s) =H

Qin(s) =

β

s+ α

Use PI controller : Gc(s) = k

(1 +

1

Tis

)Closed loop TF :

H

Hd=

Gc(s)G(s)

1 +Gc(s)G(s)=

βk(Tis+ 1)

Tis2 + (βkTi + αTi)s+ βk

=βk(s+ 1

Ti)

s2 + (βk + α)s+ βkTi

2ζwn = βk + α ⇒ k =2ζwn − α

β

w2n =

βk

Ti⇒ Ti =

βk

w2n

=2ζwn − α

w2n

As : α << 2ζwn

k =2ζwnβ

= 2ζwnAo , Ti =2ζ

wn

Let :

A(h) = A(0) + h2 , A(0) = 20 , h = 7 , a = 0.1A(0) = 2 , ζ = 0.7 , wn = 4

Figure 1.4: Block diagram of tank system with PI gain scheduling controller

Mohamed Mohamed El-Sayed Atyya Page 9 of 19

Page 10: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

Some Simulation Results

Mohamed Mohamed El-Sayed Atyya Page 10 of 19

Page 11: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

1.2.3 Time scaling based on production rate (Concentration control problem)

System Modeling

• cin : The concentration at the inlet of the pipe

• Vd : The pipe volume

• Vm : Tank volume

• q : Flow rate

• c : The concentration in the tank and at the outlet

• Ts : Sampling Time

Mohamed Mohamed El-Sayed Atyya Page 11 of 19

Page 12: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

Vmdc

dt= q(t)[cin(t− τ)− c(t)]

τ =Vdq(t)

Vmcs = q[cine−τs − c]

G(s) =c

cin=

qe−τs

Vms+ q=

e−τs

Ts+ 1; T =

Vmq

G(z) = Z

{1− e−Tss

s

e−τs

Ts+ 1

}= z−d(1− z−1)Z

{1/T

s(s+ 1/T )

}= z−d(1− z−1)

(1− e−Ts/T )z−1

(1− z−1)(1− e−Ts/T z−1)= z−d

(1− e−Ts/T )z−1

1− e−Ts/T z−1

Where : τ = dTs

Let : a = e−Ts/T = e−Tsq/Vm = e−TsVd/(τVm) = e−Vd/(Vmd)

G(z) = z−d(1− a)z−1

1− az−1

Closed Loop System Performance Without Gain Scheduling

Let : q = 1 , T = 1 , τ = 1 , ⇒ G(s) =e−s

s+ 1And use PI controller Gc(s) = 0.5

(1 + 1

1.1s

)

Mohamed Mohamed El-Sayed Atyya Page 12 of 19

Page 13: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

Closed Loop System Performance With Gain Scheduling

Use Ziegler-Nichols of PI controller of the open loop system,

Kc =0.9τ

T=

0.9VdVm

, Ti =L

0.3=

Vd0.3q

Mohamed Mohamed El-Sayed Atyya Page 13 of 19

Page 14: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

1.2.4 Nonlinear transformations

Examples

1. Nonlinear transformation of a pendulumConsider the system

dx1

dt= x2

dx2

dt= − sinx1 + u cosx1

y = x1

which describes a pendulum, where the acceleration of the pivot point is the input and the output y is the angle from a

downward position. Introduce the transformed control signal

v(t) = − sinx1(t) + u cosx1(t)

This gives the linear equations

dx

dt=

[0 10 0

]x+

[01

]v

Assume that x1 and x2 are measured, and introduce the control law

v(t) = −l′1x1(t)− l′2x2(t) +m′uc(t)

The transfer function from uc to y is

m′

s2 + l′2s+ l′1Let the desired characteristic equation be

s2 + p1s+ p2

which can be obtained with

l′1 = p2 l′2 = p1 m′ = p2

Mohamed Mohamed El-Sayed Atyya Page 14 of 19

Page 15: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

Transformation back to the original control signal gives

u(t) =v(t) + sin x1(t)

cosx1(t)=

1

cosx1(t)(−p2x1(t)− p1x2(t) + p2uc(t) + sin x1(t))

Notice that the previous equation can be used for all angles except for x1 = ±π/2,that is, when the pendulum is

horizontal.

From Laplace transformation we get

x1

u=

cosx1

s2 + sinx1=

b

s2 + ax2

u=

s cosx1

s2 + sinx1=

bs

s2 + a

Let :p1 = 10, p2 = 25

For unit step input and linear controller

Figure 1.5: Block diagram of the system with linear controller

Mohamed Mohamed El-Sayed Atyya Page 15 of 19

Page 16: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

Mohamed Mohamed El-Sayed Atyya Page 16 of 19

Page 17: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

For unit step input and nonlinear controller

Figure 1.6: Block diagram of the system with nonlinear controller

Mohamed Mohamed El-Sayed Atyya Page 17 of 19

Page 18: Gain Scheduling (GS)

1.2. DESIGN OF GAIN-SCHEDULING CONTROLLERS Adaptive Control

2. Nonlinear transformation of a second-order systemConsider the system

dx1

dt= f1(x1, x2)

dx2

dt= f2(x1, x2, u)

y = x1

Assume that the state variables can be measured and that we want to find a feedback such that the response of the

variable x1 to the command signal is given by the transfer function

G(s) =w2

s2 + 2ζws+ w2(1.1)

Introduce new coordinates z1 and z2, defined by

z1 = x1

z2 =dx1

dt= f1(x1, x2)

and the new control signal v, defined by

v = F (x1, x2, u) =∂f1

∂x1f1 +

∂f1

∂x2f2 (1.2)

These transformations result in the linear system

dz1

dt= z2

(1.3)dz2

dt= v

It is easily seen that the linear feedback

v = w2(uc − z1)− 2ζwz2 (1.4)

Mohamed Mohamed El-Sayed Atyya Page 18 of 19

Page 19: Gain Scheduling (GS)

1.3. MATLAB CODES AND SIMULATION Adaptive Control

gives the desired closed-loop transfer function of Eq. (1.1 ) from uc, to z1 = x1 for the linear system of Eqs. (1.4). It

remains to transform back to the original variables. It follows from Eqs. (1.2) and (1.4) that

F (x1, x2, u) =∂f1

∂x1f1 +

∂f1

∂x2f2 = w2(uc − x1)− 2ζwf1(x1, x2)

Solving this equation for u gives the desired feedback. It follows from the implicit function theorem that a condition for

local solvability is that the partial derivative ∂F/∂u is different from zero.

1.3 MATLAB Codes and Simulation

1.2.1 http://goo.gl/NOPbhx

1.2.2 http://goo.gl/adJrkw

1.2.3 http://goo.gl/dJwTxB

1.2.4 http://goo.gl/mwWq7N

1.4 References

1. Karl Johan Astrom, Adaptive Control, 2nd Edition.

1.5 Contacts

[email protected]

Mohamed Mohamed El-Sayed Atyya Page 19 of 19