eee4093_qft

43
EEE4093 2013 E Boje 1 UNIVERSITY OF CAPE TOWN Department of Electrical Engineering EEE4093 – Quantitative Feedback Theory (QFT) design Section 1: Introduction to Quantitative feedback design This chapter is aimed at enhancing existing knowledge of feedback systems assuming some background in control theory (differential equations and Laplace transform at some time in the past!). The material will to enable the student to quantify the design problem and the plant model and then design, analyse and tune controllers for the problem. It will be interactive and will use practical examples where possible. Because of very limited number of lectures, we will look at single-input, single-output design only. QFT is by far the best control design method I know for SISO systems! Lecture 1 Introduction, Inverse Nichols Chart, Nichols Chart Lecture 2 Sensitivity design Lecture 3 Sensitivity design Lecture 4 Tracking design Lecture 5 Tracking design Lecture 6 Tracking error design Lecture 7 Design for digital implementation Lecture 8 Consolidation 1.1 The real reasons for feedback control - what feedback does and does not do A quick scan for the keyword, “specification,” in the index of undergraduate “control engineering” textbooks will reveal one of the problems with the subject: Because of the wonderful tools and techniques available to the teacher, one may forget that engineering design is a creative endeavour that balances client’s requirements for performance (utility), with cost, aesthetics and other issues. Before undertaking a control system design, there are therefore a number of items that should be considered. Feedback is mandatory when a) There are unmeasured disturbances (loads) that affect the system output in an undesirable way. Feedback is then required for regulation whether the plant is uncertain or not because of the signal uncertainty. b) The plant is uncertain and accurate (dynamic or static) command following is required. The feedback and possibly pre-filtering is then required for robust tracking. c) If the plant is unstable, feedback may be used to stabilise it. This is really a special case of (a) or (b) because, in a hypothetical world, if the right hand plane singularities of the plant were known with infinite precision, one might attempt to cancel them with an open loop compensator of infinite precision. In chemical plants the usual source of instability is exothermic reactions. In that case, the linear model of the process has a single right hand plane pole, which can easily be stabilised by high gain feedback with the correct sign. A distributed exothermic process which is not sufficiently well stirred can have an essential singularity in the right hand plane in which no control effort can stabilise it - that is a run-away reaction, e.g. in a fluidised bed

Upload: james-gillard

Post on 28-Dec-2015

52 views

Category:

Documents


8 download

DESCRIPTION

Fundamentals of QFT controller design

TRANSCRIPT

Page 1: EEE4093_QFT

EEE4093 2013

E Boje

1

UNIVERSITY OF CAPE TOWN

Department of Electrical Engineering

EEE4093 – Quantitative Feedback Theory (QFT) design

Section 1: Introduction to Quantitative feedback design

This chapter is aimed at enhancing existing knowledge of feedback systems assuming some

background in control theory (differential equations and Laplace transform at some time in the

past!). The material will to enable the student to quantify the design problem and the plant model

and then design, analyse and tune controllers for the problem. It will be interactive and will use

practical examples where possible.

Because of very limited number of lectures, we will look at single-input, single-output design only.

QFT is by far the best control design method I know for SISO systems!

Lecture 1 Introduction, Inverse Nichols Chart, Nichols Chart

Lecture 2 Sensitivity design

Lecture 3 Sensitivity design

Lecture 4 Tracking design

Lecture 5 Tracking design

Lecture 6 Tracking error design

Lecture 7 Design for digital implementation

Lecture 8 Consolidation

1.1 The real reasons for feedback control - what feedback does and does not do

A quick scan for the keyword, “specification,” in the index of undergraduate “control engineering”

textbooks will reveal one of the problems with the subject: Because of the wonderful tools and

techniques available to the teacher, one may forget that engineering design is a creative endeavour

that balances client’s requirements for performance (utility), with cost, aesthetics and other issues.

Before undertaking a control system design, there are therefore a number of items that should be

considered.

Feedback is mandatory when

a) There are unmeasured disturbances (loads) that affect the system output in an undesirable way.

Feedback is then required for regulation whether the plant is uncertain or not because of the

signal uncertainty.

b) The plant is uncertain and accurate (dynamic or static) command following is required. The

feedback and possibly pre-filtering is then required for robust tracking.

c) If the plant is unstable, feedback may be used to stabilise it. This is really a special case of (a)

or (b) because, in a hypothetical world, if the right hand plane singularities of the plant were

known with infinite precision, one might attempt to cancel them with an open loop compensator

of infinite precision. In chemical plants the usual source of instability is exothermic reactions.

In that case, the linear model of the process has a single right hand plane pole, which can easily

be stabilised by high gain feedback with the correct sign. A distributed exothermic process

which is not sufficiently well stirred can have an essential singularity in the right hand plane in

which no control effort can stabilise it - that is a run-away reaction, e.g. in a fluidised bed

Page 2: EEE4093_QFT

EEE4093 2013

E Boje

2

boiler, one can have a section of the bed melting if there is sufficient fuel. These exothermic

nasties are usually avoided or a self-stabilising design is used to make the plant fail-safe against

control system malfunctions (e.g. try to reverse a car blindfolded or a drunk walk). Textbooks

often devote lots of space to stability rather than to engineering design of feedback systems so

we will not spend too much time on instability in this course - except that we should not design

a controller which makes a stable process unstable! Other examples of unstable processes

include the inverted pendulum that originated from rocket launch problems (I have seen

working double and even triple inverted pendulums - academic toys), nuclear power plants

(which do not cause a nuclear explosion and other manifestations of instability if they are not

controlled), and modern fighter aircraft. Note that some in some systems instability is not of

consequence if the effects of instability appear late enough. Missiles in final approach or

population explosions (human, seal, lion) are examples.

Control engineering design may only require a contribution to the plant design if it is possible to

achieve the required performance without the expense of feedback.

Before embarking on a feedback design, we must be convinced that there is a technical justification

to use feedback, and there must be realistic (achievable) specifications both for performance and for

cost (usually measured at the plant input).

Figure 1.1 – Prototype feedback system

Stabilising an open loop unstable process

Reducing the effect of disturbances on the system output

Reducing the effect of plant variations on performance

Controller

Plant +

-

desired

output

sensed

output

actual

output error input

Page 3: EEE4093_QFT

EEE4093 2013

E Boje

3

Reducing the effect of unmeasured disturbances on the plant output

Example: Flow controller

Flow control example

Control system structure

Let us take SP = [0,1], f2=[0,1], f1=[0,1] (all in m3/h).

The process gain is 1 [m3/h]/[input unit] – be careful of getting the gain correct if there are lots of

unit conversions.

The plant can deliver the expected performance so we do not make fools of ourselves trying to

“tune” the controller. (No amount of feedback and tuning can make a Volkswagen Beetle

performance the same as that of a Porsche even if they look and sound similar.)

Write down the system behaviour with feedback, assuming that there are no dynamics for the time

being (incompressible fluid etc.):

f3 = f1+f2

f1 = p g (SP - f3)

or

21

1

13 f

pgSP

pg

pgf

We see the effect that the feedback loop has on reducing the effect of disturbances: We can always

modify the SP so that we get the desired output when there is no disturbance flow. This can be

done using pre-processing of the set-point (see below) and does not have to be done by hand. We

see that the larger the controller gain, g, the smaller the effect of the disturbance on the output. To

get PV=SP with f20 requires g = . This is achievable in steady state (using an integrator) but not

generally. We need realistic expectations.

wild

flow

Fv

Fi

f1

f2

f3

g

p +

-

PV

error OP=u f3

f2 +

+ f1 SP

Page 4: EEE4093_QFT

EEE4093 2013

E Boje

4

What gain is required to get PV to within 10% of SP if SP=1?

Interpret specifications: 0.9 y 1.1

Worst cases:

f2 = 0 f2 = 1

11

3

pg

pgf

g 9 g

pgpg

pgf

1

11

11

13

We can be smart and introduce a pre-filter to get a 2 degree of freedom controller and use the whole

range of allowed output.

Two degree of freedom control system

Calculate the gain, g, and pre-filter gain, f (be careful not to confuse notation with flows) required

to satisfy the 10% specification above.

Worst cases:

f2 = 0, 11

3

pg

fpgf f2 = 1, 1

1

11

13

pgpg

fpgf

Solving simultaneously, g 4, f=1.125. (In general, how do we know that the worst cases of f2 are

the worst cases of the final f3?)

S

P

f

g

p +

-

PV

error OP=u f3

f2

+ + f1

pre-

filter

f2

f3 1.1

1.0

0.9

g=0

g=9

1.0

wasted

f2

f3 1.1

1.0

0.9 g=4

f=1.125

1.0

Page 5: EEE4093_QFT

EEE4093 2013

E Boje

5

We should be aware of why we want to minimise the gain. Often a great deal of engineering effort

goes into “optimising” some variable that should not be optimised. (e.g. Maximising yield without

regard to reagent, life cycle and input costs does not necessarily optimise profit.) Various optimal

performances are shown as a function of damping factor, below for second order systems.

ref. OGATA

Page 6: EEE4093_QFT

EEE4093 2013

E Boje

6

Reducing the effect of plant variations on performance

In many situations it is not practicable or possible to build a perfect plant. We would still like to

maintain some input-output performance. Later on we will do more dramatic examples but

continuing the flow control example, let us assume that the valve sizing is completely wonky (a

chemical engineering term) and that the process gain varies from 1%/% to 10%/%. With no

disturbance (f2=0) to simplify the discussion, we would like |SP-PV| (i.e. the error) to be within

10% of the SP.

With no pre-filter (f=1) the gain required is,

9

1.11

9.0

13

g

gp

gp

SPgp

gpf

or gpgp

gp

PV

SPPV

1

1

11

1.0

With a pre-filter, the gain is,

Worst cases:

1.11 max

max gp

fgp and 9.0

1 min

min gp

fgp

g = 3.95, f = 1.128

(better than half the gain)

Page 7: EEE4093_QFT

EEE4093 2013

E Boje

7

1.2 Transfer Functions

The transfer functions to the plant output and plant input can be calculated as required. For

example:

/1

Y R

F LT

H L

/

1

1Y DoT

L

/1

U R

F GT

L

/ /1

U Do U N

H GT T

L

Observe the effect that high gain has on each of these transfer functions. For L>>1,

TF

HY R/ “Ideal” tracking by design of F/H

TY Do/ 0 “Ideal” disturbance rejection

TF

PHU R/ T T

PU Do U N/ /,

1

1.3 The Nichols and inverse Nichols charts

In the frequency domain, to design for

required reference- and disturbance- to

output response will require selecting

L(s)=G(s)P(s)H(s) to achieve certain

behaviour on 1

L

L and on

1

1 L

The relationship between complex

L(j) = x+jy and 1

1M

L

, a constant

is,

(1+x)2 + y

2 = 1/ M

2

circles centre (-1,j0), radius 1/M

error

U(s)

plant

inputreference

R(s)F(s) G(s) P(s)+

-

output

Y(s)

disturbance

Do(s)

pre-filter

H(s)

+sensor noise

N(s)

++

+

controller plant

sensor

++

Di(s)

-1

M=1/2

M=1

M=2

L

Page 8: EEE4093_QFT

EEE4093 2013

E Boje

8

Notice that if K=1/L (KdB = -LdB, Arg(K) = -Arg(L)), 1

L

L =

1

1 K so we can show the mapping

from L to L/(1+L) by turning the inverse Nichols chart upside down to get the Nichols chart

-350 -300 -250 -200 -150 -100 -50 0-40

-30

-20

-10

0

10

20

30

40

6 db

3 db

1 db

0.5 db

0.25 db

0 db

-1 db

-3 db

-6 db

-12 db

-20 db

-40 db

Open-Loop Phase (deg)

Open-L

oop G

ain

(db)

INVERSE NICHOLS CHART

Page 9: EEE4093_QFT

EEE4093 2013

E Boje

9

-350 -300 -250 -200 -150 -100 -50 0-40

-30

-20

-10

0

10

20

30

40

Open-Loop Phase (deg)

Open-L

oop G

ain

(dB

)

NICHOLS CHART

6 dB

3 dB

1 dB

0.5 dB

0.25 dB

0 dB

-1 dB

-3 dB

-6 dB

-12 dB

-20 dB

-40 dB

Page 10: EEE4093_QFT

EEE4093 2013

E Boje

10

Relationship between Bode plots and the Inverse Nichols Chart

MATLAB CODE l=tf(20*[-1/100 1],conv([1 1],[1/100 1])); [m,p,w]=bode(l,{0.1,100});

figure(1)

semilogx(squeeze(w),db(squeeze(m))) axis([0.1,100,-30,30])

grid

figure(2) semilogx(squeeze(w),squeeze(p))

axis([0.1,100,-270,0])

grid figure(3)

ingrid('new')

nichols(l)

axis([-270,0,-30,30])

INVERSE NICHOLS CHART

Open-Loop Phase (deg)

Open-L

oop G

ain

(dB

)

-270 -225 -180 -135 -90 -45 0-30

-20

-10

0

10

20

30

-20 db

-12 db

-6 db

-3 db

-1 db

0 db

0.25 db

0.5 db

1 db

3 db

6 db

10-1

100

101

102

-30

-20

-10

0

10

20

30BODE MAGNITUDE PLOT

FREQUENCY [rad/s]

MA

GN

ITU

DE

[dB

]

10-1

100

101

102

-250

-200

-150

-100

-50

0BODE PHASE PLOT

AN

GLE

[deg]

FREQUENCY [rad/s]

Page 11: EEE4093_QFT

EEE4093 2013

E Boje 11

Example

1

( )1

P ss

Effect of gain of 10

The Nichols chart provides a mapping from L (rectangular grid with |L| dB and Arg(L)) to

|L/(1+L)|, to enable graphical interpretation of consequences (on the closed loop transfer

function) of design action (on the open loop transfer function).

1.3 Gain, phase and robust stability margins

We need to design engineering systems that are “far away” from the point of instability (-1,j0)

on the arithmetic complex plane (Nyquist diagram) and (0dB, -180) on the log-polar plane

(Nichols chart). We can either do this by specifying the phase reserve at the gain cross-over

point (phase margin) and the gain margin at the phase cross-over or we can specify a

maximum value of |1/(1+L)| say dB.

(You can show that |1/(1+L)| < m (arithmetic), m > 1, gives gain margin of gm = m/(m-1) and

a phase margin of m = 2 arcsin(1/(2 m)).)

Example

Shown are Nyquist plots of 2

1

1 1L

s s s

, which have a phase margin of 52 and a

gain margin of 3.2 (=10dB) the L locus misses the M = 1.9 (5.6 dB circle of |1/(1+L)|

-250 -200 -150 -100 -50 0-30

-20

-10

0

10

20

30

6 db

3 db

1 db

0.5 db

0.25 db

0 db

-1 db

-3 db

-6 db

-12 db

-20 db

Open-Loop Phase (deg)

Open-L

oop G

ain

(db)

INVERSE NICHOLS CHART

100

10

1

3

30

-250 -200 -150 -100 -50 0-30

-20

-10

0

10

20

30

6 db

3 db

1 db

0.5 db

0.25 db

0 db

-1 db

-3 db

-6 db

-12 db

-20 db

Open-Loop Phase (deg)

Open-L

oop G

ain

(db)

INVERSE NICHOLS CHART

100

10

1

3

30

Page 12: EEE4093_QFT

EEE4093 2013

E Boje 12

-1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 -2

-1.5

-1

-0.5

0

0.5

1

1.5

2

Real Axis

Imag A

xis

L=2.5/(s^2+2s+1)/(s+1)

m

1/gm

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 -2

-1.5

-1

-0.5

0

0.5

1

1.5

2

Real Axis

Imag A

xis

L=2.5/(s^2+2s+1)/(s+1)

m=1.92

The same information is available on the inverse Nichols chart

Page 13: EEE4093_QFT

EEE4093 2013

E Boje 13

1.4 Relative Differential Sensitivity

There may be some small, unmodelled uncertainty in the plant. (We can also handle gross

uncertainty in specific parameters but in another course!) Let us investigate the effect that

this has on the closed loop system, /

1Y R

F LT

H L

, relative to the ratio of transfer functions .

1

1

T

P

T TS

P P L

Example

What is the relative differential sensitivity of T

with respect to the plant, P, if

G=1/s, P=1/(s/2+1).

Answer: 2

2

1 2

1 2 2

T

P

s sS

L s s

The sensitivity is less than 1 (0dB) for frequencies

below 1 rad/s and this means that the closed loop

is less sensitive to changes in the plant than the

open loop. This is what we want the feedback

system to do - reduce sensitivity. At frequencies

above 1, the sensitivity is more than 1 (>0dB) and

-250 -200 -150 -100 -50 0-40

-30

-20

-10

0

10

20

6 db

3 db

1 db

0.5 db

0.25 db

0 db

-1 db

-3 db

-6 db

-12 db

-20 db

Open-Loop Phase (deg)

Open-L

oop G

ain

(db)

INVERSE NICHOLS CHART

0.1 0.3

1.0

3.0

m

gm

10-1

100

101

-20

-15

-10

-5

0

5BODE PLOT - SENSITIVITY

|1/(

1+

L)| [

dB

]

FREQUENCY [rad/s]

Page 14: EEE4093_QFT

EEE4093 2013

E Boje 14

this means that the closed loop sensitivity is worse than the open loop sensitivity. To

illustrate this, let the plant be perturbed to 1P =0.9 P and 2P =1.1 P

1.5 Statistical basis for feedback

So far we have only done worst-case calculations. In many situations, the interest is in

reducing the variance or standard deviation of the error. In consumer situations there is often

a hard lower limit on some variable and properly designed feedback allows us to come close

to that limit by reduction of the variance. For example, lysine is sold by weight and there is a

maximum moisture content specified by the product specification. All other things being

equal, it is very profitable to sell customers water at the price per kg of lysine! The less we

need to over-dry the product to guarantee that the maximum moisture content will not be

violated, the more water can be sold at a huge profit.

If variation comes from a number of independent sources, the distribution is Gaussian or

normal. For a mean, and standard deviation, , the density is,

2

2

1

2

1)(

x

exf

and the standard deviation then has the following meaning:

%7.9933

%5.9522

%68

Xp

Xp

Xp

-4 -2 0 2 40

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

standard deviations

Gaussian density function

Example: The wild flow in the disturbance rejection example above with fixed plant gain of 1

has a mean of 0.5 and a standard deviation of 0.25 (it may not be possible that the flow is

negative but we have not specified the distribution). How much gain is required to ensure that

the output standard deviation is less than 0.1 if the SP=0.5 with p=1?

5.1

25.01

11.0

1

1

2

2

2

2

2

2

2

3

g

gp

gpff

Page 15: EEE4093_QFT

EEE4093 2013

E Boje 15

Notice that when we deal with linear dynamic systems, noise signals pass through the system

with their power spectral density modified by the square of the transfer function gain. Also,

the variance at the output (y = P u) is given by Parseval’s identity from the power spectral

density (i.e. variance is related to the area under the curve with linear frequency and

amplitude axes)

djSjP

djS

uu

yyy

2

2

2

1

2

1

Summary of introduction

Feedback has the following purposes:

Stabilising unstable processes

Reducing the effects of disturbances on the output

Reducing the effect of plant variation on the behaviour

High gain feedback solves the last two problems but will have effects at the plant input to be

explored in future chapters. As in any engineering activity there is a trade-off between

performance (output) and cost (control effort). Reasonable expectations of control loop

performance will allow realistic controllers to be designed. Some rough calculations will give

good insight into the design or tuning of feedback loops.

Two degree of freedom feedback system

error

U(s)

plant

inputreference

R(s)F(s) G(s) P(s)+

-

output

Y(s)

disturbance

Do(s)

pre-filter

H(s)

+sensor noise

N(s)

++

+

controller plant

sensor

++

disturbance

Di(s)

Page 16: EEE4093_QFT

EEE4093 2013

E Boje 16

Section 2: Design for disturbance rejection and robust

stability with plant uncertainty

Recall that the transfer of output disturbance to the plant output with feedback is,

LGPHT DoY

1

1

1

1/ (1.1.1)

so all output disturbance rejection and sensitivity designs are based on the inverse Nichols

chart.

Example 1.1.1 (revision)

Given P=1/s, design for

i. |1/(1+L)| -20dB, 0.5

ii. |1/(1+L)| 3dB,

Confirm that G=5/(s/6+1) does

the job

Example 1.1.2

Suppose that the above plant is a 1m3 tank and that the inlet valve has a gain between 1 and 5

m3/%/hour. The gain uncertainty could be because of non-linear installed characteristic as a

result of wrong sizing; poor turndown; or upstream pressure variations. The same regulation

specifications must be met for all possible plant conditions – i.e. robust performance.

The plant model is now

P(s) = k/s, k [1, 5]

We could repeat the design for different values of process gain and try to guess at a controller

that would meet the specifications. It is better to have a systematic method.

-250 -200 -150 -100 -50 0-25

-20

-15

-10

-5

0

5

10

15

20

25

30

Open-Loop Phase (deg)

Op

en

-Lo

op

Gain

(d

b)

6 db

3 db

1 db -1 db

-3 db

-6 db

-12 db

-20 db

L(j0.5)

L(j10)

L(j3.0)

Inverse Nichols Chart

-250 -200 -150 -100 -50 0-25

-20

-15

-10

-5

0

5

10

15

20

25

30

Open-Loop Phase (deg)

Op

en

-Lo

op

Gain

(d

b)

6 db

3 db

1 db -1 db

-3 db

-6 db

-12 db

-20 db

L(j0.5)

L(j10)

L(j3.0)

Inverse Nichols Chart

Page 17: EEE4093_QFT

EEE4093 2013

E Boje 17

2.1 Quantitative Feedback Design:

1) Using the log-polar plane (i.e. the Nichols chart), the controller elements only shift the

plant elements by the controller gain and phase at each given frequency.

dBdBdBGPL , GPL ArgArgArg

The controller does not change the relative gain between different instances of the plant.

2) At any particular design frequency (that we choose), we can draw the locus of the plant

elements as the plant parameters vary. This will define a region on the Nichols chart,

corresponding to the controller, G=1 (0dB, 0). This is called the template,

)()( ii jPj T

3) We choose an arbitrary, fixed plant called the “nominal” to use as a handle on the design

process. By moving the template on the (inverse) Nichols chart we can define the region

where the specifications (at the design frequency) are met for plant elements by plotting

the locus of the nominal plant. i.e.

nominal boundaries satisfied for the nominal plant

specification boundaries satisfied plants

4) The controller is now designed for the nominal plant to satisfy the nominal boundaries at

each design frequency. By construction, we simultaneously satisfy the specification

boundaries for all plants in the plant set.

5) Practice makes perfect!

International Journal of Robust and Nonlinear Control Special Issue: Isaac Horowitz, August 2001

http://onlinelibrary.wiley.com/doi/10.1002/rnc.v11:10/issuetoc

Page 18: EEE4093_QFT

EEE4093 2013

E Boje 18

Example 1.1.2 (continued)

Given, P(s) = k/s, k [1, 5], design for

i. |1/(1+L)| -20dB, 0.5

ii. |1/(1+L)| 3dB,

For pedagogic reasons, choose the nominal as P0 = 2/s. Because there is only gain

uncertainty, it is independent of frequency and all the templates are vertical lines, 14dB

(= dB(5) - dB(1)) high.

Matlab Code for Example 1.1.2

(This code requires the QFT toolbox. Failing that – by hand!) % Uncertainty example 1.1.2 w=[0.5,3,10,30]; k=[2,[1:5]]; % Nominal first k=k(:); num=k; % numerator - columns of cases den=[ones(size(k)),zeros(size(k))]; % denominator coefficients in rows, columns of cases P=freqcp(num,den,w); % frequency response

b1=sisobnds(2,w,0.5,10^(-20/20),P); % |1/(1+L)| -20dB, = 0.5rad/s

b2=sisobnds(2,w,[3,10,30],10^(3/20),P); %|1/(1+L)| 3dB bnd=grpbnds(b1,b2); lpshape(w,bnd,num(1),den(1,:)) % CAD tool for loop-shaping grid Ingrid

-250 -200 -150 -100 -50 0-25

-20

-15

-10

-5

0

5

10

15

20

25

30

Open-Loop Phase (deg)

Op

en

-Lo

op

Gain

(d

b)

6 db

3 db

1 db

0.5 db

-1 db

-3 db

-6 db

-12 db

-20 db

* 3

* 3

B0(30)

B0(0.5)

B(30)

B(0.5)

-250 -200 -150 -100 -50 0-25

-20

-15

-10

-5

0

5

10

15

20

25

30

Open-Loop Phase (deg)

Op

en

-Lo

op

Gain

(d

b)

6 db

3 db

1 db

0.5 db

-1 db

-3 db

-6 db

-12 db

-20 db

-250 -200 -150 -100 -50 0-25

-20

-15

-10

-5

0

5

10

15

20

25

30

Open-Loop Phase (deg)

Op

en

-Lo

op

Gain

(d

b)

6 db

3 db

1 db

0.5 db

-1 db

-3 db

-6 db

-12 db

-20 db

* 3

* 3

B0(30)

B0(0.5)

B(30)

B(0.5)

* 3* 3

* 3* 3

B0(30)

B0(0.5)

B(30)

B(0.5)

Page 19: EEE4093_QFT

EEE4093 2013

E Boje 19

Confirm that G=5/(s/30+1) does the job. We need the same gain as before for {|1/(1+L)| –

20db, = 0.5} as the k=1 case is the worst. We can only place the controller roll-off at =30

rather than =5 in Example 1. There is a controller bandwidth penalty for the performance

robustness. This is a design trade-off – there is no free lunch.

-250 -200 -150 -100 -50 0-25

-20

-15

-10

-5

0

5

10

15

20

25

30

Open-Loop Phase (deg)

Op

en

-Lo

op

Gain

(d

b)

2

6 db

3 db

1 db -1 db

-3 db

-6 db

-12 db

-20 dbL0(j0.5)

L0(j30)

L0(j10)

L0(j3)

-250 -200 -150 -100 -50 0-25

-20

-15

-10

-5

0

5

10

15

20

25

30

Open-Loop Phase (deg)

Op

en

-Lo

op

Gain

(d

b)

2

6 db

3 db

1 db -1 db

-3 db

-6 db

-12 db

-20 dbL0(j0.5)

L0(j30)

L0(j10)

L0(j3)

Page 20: EEE4093_QFT

EEE4093 2013

E Boje 20

2.2 Template

A 'template' at the design frequency i is a collection of frequency responses (typically of the

plant P(ji) P). It can represent a set of experimentally obtained frequency responses, or a

set of frequency responses derived from a parametrically uncertain plant set.

E.g. Draw the template for

, , at = 3 rad/s. Choose

.

E.g. Draw the template for

, , at = 3 rad/s.

Compare to

for the worst case.

2.3 Bounds

QFT translates the known frequency response (templates) and the desired performance

specifications into required conditions on the phase and magnitude of the nominal loop,

L0(ji). These requirements are referred to as 'bounds’ at the design frequencies, i

Bounds are computed at several frequencies, and are represented in the QFT Toolbox by two

line styles: a solid line designates 'stay above' and a dashed line designates 'stay below.' That

is, L0 must stay above or below its bound at the frequency of that bound.

The bounds are labelled via colours in the upper left-hand corner of the figure window in an

ascending order by frequency: r-red, g-green, b-blue, y-yellow, p-purple, c-cyan. Colours are

then repeated if there are more than 6 frequencies.

2.3 QFT Design

We add any of the following terms to the nominal loop transfer function to shape it to satisfy

the bounds with the lowest high frequency gain and controller complexity

Gain (K) - current gain

First Order (1) - add first order pole/zero element

Second Order (2) - add second order pole/zero element

Lead/Lag (L/L) - add lead/lag element

Notch (NTC) - add notch element

Second-over-Second (2/2) - add second-order over second-order element (bi-quadratic)

Page 21: EEE4093_QFT

EEE4093 2013

E Boje 21

2.4 General bound computation

The general computation of bounds follows directly by calculation (similar to M-circles on

the Nichols and inverse Nichols charts) but there has been some work published on bound

computation (for example, Borghesani, Chait and Yaniv, 1998; Chait and Yaniv, 1993). Some

insight into the calculations may be helpful.

Consider the general design problem given by a linear fractional mapping on design

parameter, g typically the controller,

dgc

bga (1.1.2)

Each of a, b, c, and d is a known complex number, e.g. ajaeRa

, and the specification, ,

is a given positive number. At a fixed controller angle, g, the magnitude Rg is calculated as,

2222

222

sinsincoscos2

sinsincoscos2

gdgdcgdcgdcc

gbgbagbagbaa

RRRRRR

RRRRRR (1.1.3)

Clearly this is a quadratic inequality in Rg for which a closed form solution can be found at

equality and some logic applied to discover if the acceptable solution lies above or below the

corresponding gains required for equality

A typical special case is sensitivity design where a = c = 1, b = 0, and d = p, giving,

pg1

1 (1.1.4)

and,

222 /1cos21 gpgpgp RRRR (1.1.5)

A special case of bound computation is dealt with in Section 1.3 where uncertainty reduction

calculations are undertaken.

Page 22: EEE4093_QFT

EEE4093 2013

E Boje 22

Section 3: SISO Tracking design

Figure 1.2.1 - Two degree of freedom feedback system

For tracking, we are interested in the reference to output behaviour, L

L

H

FTY/R

1.

We only need feedback if there is uncertainty and we have two degrees of design freedom as

we can process R and Ymeas independently.

3.1 Tracking design with magnitude specifications

Usually there are client specifications, A() and B() on TY/R in the form,

)()( BTAdBY/R (1.2.1)

In dB, )()(11

ABL

L

L

L

H

FTY/R since there is no uncertainty in F/H. (For

simplicity of exposition, H = 1 (i.e. high sensor bandwidth) is often assumed, but sensor

bandwidth determination / specification is part of the feedback loop design.) We solve the

design problem in two stages:

1) Uncertainty reduction

a) Select an arbitrary nominal P0 {P} and find boundaries using the Nichols chart (i.e.

L/(1+L) mapping) so that )()(1

ABL

L. This is done at each of a selected

set of discrete design frequencies by moving the template on the Nichols chart to

identify the boundary between the region where the inequality is satisfied and where it

is not satisfied.

b) Design L(s) = G(s) P(s) H(s) using standard synthesis, possibly using CAD tools.

c) This stage fixes G(s).

2) Pre-filter design

a) We calculate |L/(1+L)|, either by CAD tool, or by placing the nominal of the template

at i on the Nichols chart on the point L0(ji) and reading off max {|L/(1+L)|}, and

min{|L/(1+L)|}.

b) Put away the Nichols chart and design |F| using a Bode plot!

reference

R(s)

F(s)

pre-filter

+ -

H(s)

error G(s)

controller

sensor

sensor

noise

N(s)

output

Y(s)

+

+ +

+

plant

input

U(s) P(s)

plant

output disturbance

D(s)

Page 23: EEE4093_QFT

EEE4093 2013

E Boje 23

Design example for uncertainty reduction

Given, )1/(

)(

as

ksP , ]10,2[],5,1[ ak , design a controller, G(s), and pre-filter, F(s), to

achieve the specifications,

i) 13/)3/(

1.1

14/12/2)2/(

9.0

2/2

ssT

sssRY

ii)

dBL

31

1

Figure 1.2.2 – Open plant response, SISO tracking example

10-1

100

101

102

-35

-30

-25

-20

-15

-10

-5

0

5

10

15Open loop plant

|P| [d

B]

frequency [rad/s]

Page 24: EEE4093_QFT

EEE4093 2013

E Boje 24

Figure 1.2.3 – Desired closed loop tracking response – SISO tracking example

Figure 1.2.4 - Step response of plants from Bode magnitude plot extremes

10-1

100

101

102

-40

-35

-30

-25

-20

-15

-10

-5

0

5Desired closed loop Bode magnitude envelope

TY

/R [

dB

]

frequency [rad/s]

Time (sec.)

Am

plit

ude

Desired closed loop step response envelope

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.2

0.4

0.6

0.8

1

1.2

1.4

From: U(1)

To: Y

(1)

Page 25: EEE4093_QFT

EEE4093 2013

E Boje 25

-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 -35

-30

-25

-20

-15

-10

-5

0

5

10

15

0.1 1

10

100

Phase (degrees)

Ma

gn

itud

e (

dB

)

Plant templates, w =[0.1,1,10,100]

Figure 1.2.5 – Plant templates, SISO tracking example

-250 -200 -150 -100 -50 0 -40

-30

-20

-10

0

10

20

X: Phase (degrees) Y: Magnitude (dB)

30

10

10 3

3

1

1

0.3, 0.1

L0(j)

Design of G

Figure 1.2.6 - Controller design:

145/1

15/5.3

ss

sG , SISO tracking example

Page 26: EEE4093_QFT

EEE4093 2013

E Boje 26

Figure 1.2.7 – Pre-filter design, SISO tracking example with magnitude specifications

Figure 1.2.8 – Pre-filter, 15/12/

16.1

ssF design – achieved performance

10-1

100

101

102

-40

-35

-30

-25

-20

-15

-10

-5

0

5

|L/(1+L)| and specifications on |TY/R

|

frequency [rad/s]

magnitude [

dB

]

10-1

100

101

102

-40

-35

-30

-25

-20

-15

-10

-5

0

5

Achieved and specifications on |TY/R

|

frequency [rad/s]

magnitude [

dB

]

Page 27: EEE4093_QFT

EEE4093 2013

E Boje 27

Matlab code for above example: % SisoTrackingG.m % SISO tracking design - Feedback controller w=[0.1,0.3,1,3,10,30,100]; % Plant: k/(s/a+1), k=[1,5], a=[2,10] a=[linspace(2,10,4),linspace(2,10,4),ones([1,4])*2,ones([1,4])*10]'; k=[ones([1,4])*1,ones([1,4])*5,linspace(1,5,4),linspace(1,5,4)]'; num=k; den=[1./a,ones(size(a))]; P=freqcp(num,den,w); figure plottmpl(w,[0.1,1,10,100],P) title('Plant templates, w =[0.1,1,10,100]') %Specifications Tup=abs(freqcp(1.1,[1/9,1/3,1],w)); % upper bound Tlo=abs(freqcp(0.9,conv([1/4,1,1],[1/4,1]),w)); % lower bound figure step(tf(1.1,[1/9,1/3,1]),'k',tf(0.9,conv([1/4,1,1],[1/4,1])),'k',5) title('Desired closed loop step response envelope') ww=logspace(-1,2); TTup=abs(freqcp(1.1,[1/9,1/3,1],ww)); % upper bound TTlo=abs(freqcp(0.9,conv([1/4,1,1],[1/4,1]),ww)); % lower bound figure semilogx(ww,db([TTup;TTlo]),'k') axis([0.1,100,-40,5]) grid title('Desired closed loop Bode magnitude envelope') ylabel('T_Y_/_R [dB]') xlabel('frequency [rad/s]') % Design b1=sisobnds(7,w,w,[Tup;Tlo],P); b2=sisobnds(2,w,[10,30,100],10^(3/20),P); bnd=grpbnds(b1,b2); plotbnds(bnd) grid bnd=sectbnds(bnd); % Controller numg=3.5*[1/5,1]; deng=conv([1,1],[1/45,1]); lpshape(w,bnd,num(1),den(1,:),0,numg,deng) grid

% SisoTrackingF.m % SISO tracking example - Pre-filter design s=logspace(-1,2)*i; w=abs(s); %Plant a=[linspace(2,10,4),linspace(2,10,4),ones([1,4])*2,ones([1,4])*10]'; k=[ones([1,4])*1,ones([1,4])*5,linspace(1,5,4),linspace(1,5,4)]'; num=k; den=[1./a,ones(size(a))]; P=freqcp(num,den,w); % Controller numg=3.5*[1/5,1]; deng=conv([1,1],[1/45,1]); G=freqcp(numg,deng,w); for kk=1:16, L(kk,1:50)=G.*P(kk,:); end T=L./(1+L); Tup=abs(freqcp(1.1,[1/9,1/3,1],w)); Tlo=abs(freqcp(0.9,conv([1/4,1,1],[1/4,1]),w)); pfshape(7,w,w,[Tup;Tlo],P,[],G,[],1.16,conv([1/2 1],[1/5 1]))

Page 28: EEE4093_QFT

EEE4093 2013

E Boje 28

3.2 Tracking design with reference model tracking error specifications

Eitelberg (2000) investigated quantitative feedback theory (QFT) design for single-input,

single-output systems with tracking error specifications and Boje (2001) showed how the pre-

filter is designed for this approach.

The two-degree-of-freedom control system shown in Fig. 1.3.1 above and as usual in

quantitative control system design, it is assumed that the linear(ised) plant transfer function is

an element a set, }{)s(P P , including structured and unstructured uncertainty. In order to

undertake engineering design, there must also be some closed loop specifications available. In

most QFT work (see Horowitz (1991, or 1993) for general reference), the tracking (and other)

specifications are assumed to be only on the magnitude of the closed loop transfer functions.

As Eitelberg (2000) argued, bounding the closed loop transfer function within a disk around a

nominal (model) performance often makes engineering sense. Such performance

specifications result in sensitivity designs for tracking performance. They are compatible with

norm-based methods, but the exact (structured and/or unstructured) plant uncertainty

description is retained. QFT design with norm bounded specifications has previously been

discussed for example by Horowitz (1979, 1991), and Nwokah, Jayasuriya & Chait (1991).

Given the system in Fig. 1.3.1 and client-specified model, M(s), with model output,

R(s)M(s)(s)Ym , the design task is to specify feedback controller, G(s) and pre-filter, F(s) to

meet relative tracking error specifications. The relative tracking error transfer function, rk

E ,

of the kth

plant (with Lk = PkG ) is defined as:

RL

FLMYYRE

k

kkm

rk

1 (1.2.2)

Eitelberg (2000) does not use a model reference (i.e. M(s) = 1) which means that the relative

tracking error must become large at frequencies where the closed loop transfer function

(reference to output) has low gain. A model reference extends the frequency range over which

the relative tracking error specification is useful as it captures knowledge of the expected

closed loop roll-off. Eitelberg (2000) accounts for unstructured uncertainty in the

measurement system and pre-filter. This important consideration will not be pursued here. Let

H=1 (no significant measurement dynamics) and D=0 (no disturbance as tracking behaviour

is our focus). Define the complimentary sensitivity, kkk LLIT1

. Simple specifications

on the relative tracking error would be to contain the relative error (element-wise) within a

disk of client-specified, frequency-dependant radius, A(),

}{P),(A)j(F)j(T)j(M)j(E kkrk

P (1.2.3)

A two-degree-of-freedom design is required to properly solve the design problem with

minimum feedback bandwidth and to take care of unstructured and structured uncertainty in

the plant. The design is performed at a set at of discrete design frequencies, i, i = 1, 2…

Page 29: EEE4093_QFT

EEE4093 2013

E Boje 29

3.2.1 Feedback design

Following Eitelberg's (2000) approach, take the difference between the tracking error in two

plant cases, i and k.

MELI

PP

FLILLILEE

ri

k

ik

iikkrk

ri

1 (1.2.4)

In the usual implementation of QFT designs, a nominal (or handle) plant is chosen arbitrarily.

It is plausible that a special nominal plant, Pi = P0, exists for which it is required that the

tracking error be zero, 00 rE , or at least small with respect to the worst tracking error (i.e.

AE r 0 ). Eitelberg (2000) has shown that at worst, the gain is over-designed by 6dB if the

nominal is chosen “badly”. As discussed below, such over-design may ease the pre-filter

design. With a nominal chosen to give zero tracking error in eq(1.2.4), the feedback controller

design can be separated from the pre-filter design as,

MLI

PPE

k

krk

01

(1.2.5)

Eq(1.2.5) is a linear fractional mapping on G of the form,

kkkkkk

rk

PdcbMPPa

dGc

bGaE

,1,0,1 0

(1.2.6)

Eq(1.2.6) along with the specification results in quadratic inequalities for each plant case. The

nominal design boundary is the intersection of all feasible regions over the plant uncertainty

set.

3.2.2 Pre-filter design

Once the controller, G, has been designed to meet or exceed the feedback design constraints,

the pre-filter, F, can be designed to satisfy the tracking error specification, eq(1.2.3). A simple

approach to the design of F is to make use of the assumption that the nominal relative tracking

error is zero,

00 T/MFF (1.2.7)

By correct (realistic) specification of the model, M, the designer can ensure that F is rational,

(strictly) proper and stable (even if L0 is transcendental). The model would be required to

exactly anticipate and replicate right hand plane transmission zeros and other singularities in

the nominal loop transfer function. If, as would be usual, the model is approximate, direct

application of eq(1.3.7) may yield nuisance right hand plane singularities with small residuals

that should obviously be discarded. Direct use of eq(1.2.7) may also result in a pre-filter of

unnecessarily high order for practical problems.

To avoid high order feedback controllers, practical QFT designs usually have some over-

design of the feedback controller. As opposed to “standard” QFT designs where the choice of

nominal plant is arbitrary, there may also be over-design as a result of a poor or constrained

Page 30: EEE4093_QFT

EEE4093 2013

E Boje 30

choice of the nominal plant. At each design frequency, i, any over-design of the feedback

controller can be exploited to reduce the complexity of the pre-filter by finding the exact

region (around F0) within which F may lie. For any particular L, M, and A, eq(1.2.3) is also a

linear fractional mapping in F and therefore results in simple quadratic inequalities on a plant

by plant basis.

0,1,,

dcTbMa

dFc

bFaFTME

k

krk (1.2.8)

Eq(1.2.8) can be solved for r, given any [-360, 0], for example using the Matlab QFT

toolbox (Borgesani, Chait & Yaniv, 1998). The solution of eq(1.2.8) for a particular plant

case and design frequency will divide the complex plane of F into acceptable and

unacceptable regions. If the feedback controller design was successful, by construction, there

is a non-empty intersection (over the plant set) of the acceptable regions for F at each

frequency (or at worst the point, MT/F 01 ). (F(s) must satisfy Bode gain-phase

relationships and, as discussed above, correctly specifying the model will ensure that a proper,

rational and stable F(s) exists.) Usually, in QFT the pre-filter is designed by magnitude only

but the design outlined here is conveniently undertaken on the log-complex plane (arg{F} vs.

dB{F}). The intersection of the regions given by eq(1.3.8) at frequency i provides an exact

bound for the design of F(i).

3.2.3 Example

The example is modified from the example above, with plant: 1/

)(

as

ksP , ],5,1[k

]10,2[a .

Original tracking specifications: 13/)3/(

1.1

14/12/2)2/(

9.0

2/2

ssT

sssRY

Robust stability specification:

dBL

31

1

New specifications:

Nominal (specifically chosen): 15/

5.20

ssP .

Approximately equivalent tracking error specifications, (illustrated at s=j3 in Fig. 1.3.9):

Model response (for specific P0) 14/15.3/4.15.3/

1

2

sss

sM

Tracking error tolerance:

jssss

sA

16/14.2/2.14.2/

14.0/1.0

2

Design

As illustrated in Figure 1.2.10, the feedback controller,

140/13.1/

110/8.4

ss

sG , satisfies the

tracking error bounds. The constraints on the pre-filter design are illustrated in Figure 1.2.11

Page 31: EEE4093_QFT

EEE4093 2013

E Boje 31

along with the pre-filter design, 13/4.1)3/(

1.1

2

ssF , that satisfies the constraints with

low order and low bandwidth.

-1.5 -1 -0.5 0 0.5 1 1.5 -1.5

-1

-0.5

0

0.5

1

1.5

M(j1))

A(j1)

min{TY/R(j1)}

max{TY/R(j1)}

real

imag

Figure 1.2.9 – SISO tracking error specifications compared to magnitude specifications

Page 32: EEE4093_QFT

EEE4093 2013

E Boje 32

-250 -200 -150 -100 -50 0 -30

-20

-10

0

10

20

30

X: Phase (degrees) Y: Magnitude (dB)

=30

=3 B0(1)

L0(j1)

=10

0.3, 0.1

Feedback design, G, Tracking error specification

Figure 1.2.10 – Feedback design SISO tracking error design,

140/13.1/

110/8.4

ss

sG

-180 -160 -140 -120 -100 -80 -60 -40 -20 0 -60

-50

-40

-30

-20

-10

0

X: Phase (degrees) Y: Magnitude (dB)

Design of pre-filter, F- Tracking error

=1

=10

=3

=30

=100

Figure 1.2.11 – Pre-filter design for tracking error specifications 13/4.1)3/(

1.1

2

ssF

(dashed lines = “below” bounds, solid lines = “above” bounds)

Page 33: EEE4093_QFT

EEE4093 2013

E Boje 33

Eitelberg E, “Quantitative feedback design for tracking error tolerance” Automatica, vol. 36, no. 2, 319-326,

http://dx.doi.org/10.1016/S0005-1098(99)00149-1

Boje E, “Multivariable quantitative feedback design for tracking error specifications”, Automatica, vol. 38 no. 1,

2002, 131-138. http://dx.doi.org/10.1016/S0005-1098(01)00177-7 Boje E, “Pre-filter Design for Tracking Error Specifications in QFT”, International Journal of Robust and

Nonlinear Control, vol. 13, no 7, 637-642, 2003. http://dx.doi.org/10.1002/rnc.829

10-1

100

101

102

0

0.2

0.4

0.6

0.8

1

1.2

1.4

rad/s

Arith

metic m

agnitude

Example 1.3.2.3

Tlow

Thigh

Model

Model Error|T

high|-|T

low|

Probably don't care

what happens here!

Page 34: EEE4093_QFT

EEE4093 2013

E Boje 34

Section 4: Discrete controller design

The vast majority of digital designs are for sampled data systems shown in Figure 2.1.1 where

the plant is continuous but the controller is discrete. There are many possible ways to go

about digital controller design. I prefer using the w-domain as continuous time design

philosophy can be used (Eitelberg, 1988; Boje, 1990; Eitelberg and Boje, 1991). The results

of this section can also be applied for systems with pulse width modulators (PWM) as part of

the actuator as this is also a sampling process (Boje, 1999).

pre-filter

F(w) G(w)

controller

-

+P(s)

plant+

+

d(t)

disturbance

r(t) u(t) y(t)A/D

outputreference

A/D

D/A

Computer

input

Figure 2.1.1 - Sampled data control system

4.1 – Approximate effect of discretisation

It is possible to show (see Eitelberg, 1988) that the effect of sampling a continuous time

process for implementing a digital controller is approximately to add an additional right hand

plane zero, (1-wT/2), where T is the sampling period to the loop transfer function. To see this,

consider a single-input, single-output, strictly proper, continuous time system,

bAIc1

)(

ssPs , described by the state space equations,

(1.3.1)

At the sampling instances,

idid

iT

iT

i

u

udee

bxA

bxxAA

01 (1.3.2)

( bbAAA dee

Td

Td

0 and are respectively the discrete time state transition and input

matrices corresponding to the given sampling rate.) Taking z- transforms and solving for the

transfer function,

ddz zz/UzYzP bAIc1

)()()(

(1.3.3)

Now take the w-transform (Tustin or bi-linear transform) of the z-domain transfer function,

1

12,

2/1

2/1

z

z

Tw

wT

wTz (1.3.4)

This gives

2/12/12/1)(1

wTwTwTwP ddz

bAIc (1.3.5)

cx

bAxx

y

u

Page 35: EEE4093_QFT

EEE4093 2013

E Boje 35

Writing out the Taylor series expansion for ...!222 TTd AAIA and

bAb ...!22 TTd , we can express Pz(w) approximately in terms of the parameters of

Ps(s),

2/1)(2/1)(1

wTwPwTwwP sz

bAIc (1.3.6)

The approximation in eq(1.3.6) is accurate to order, O(T2) (Boje, 1990). The result can be

generalised to systems with input and measurement delay, PWM inputs, sampling jitter, etc.

Another view of the result is obtained by writing Ps(s) as partial fraction expansion and then

taking the z-transform (transfer function with “zero-order hold”, not signal) and w-transform.

Assuming no repeated roots (for convenience),

n

i i

is

ps

rsP

1

)( , and

n

iTp

iTp

iz

i

i

ez

perzP

1

1)( , giving,

2

1

21

2

2

2

2

21

22

1

1tanh

tanh

111

1)(

Tn

i i

i

Tn

iT

iT

iT

iTi

Tn

iTpTT

iTp

iz

wpw

r

wpw

ppr

weww

perwP

i

i

(1.3.7)

The approximations require that piT << 1, meaning that the sampling rate, 1/T must be more

than the highest plant corner frequency that has significant residual, ri. Eq. (1.3.7) illustrates

the effect of frequency warping when translating between the s- and w- domains.

References

Eitelberg E (1988): “Sampling rate design based on (1-sT/2)”, International Journal of Control, 48:4, 1423-1432

http://dx.doi.org/10.1080/00207178808906259

Boje E, “Further results on Eitelberg’s sampling rate design based on (1-sT/2)”, International Journal of

Control, Vol. 51, No 5, 1990, pp1155-1158. http://dx.doi.org/10.1080/00207179008934123

Eitelberg E and Boje E, “Feedback controller design for plants with modes and disturbances above the sampling

frequency”, International Journal of System Science, Vol. 22, No 9, pp1553-1562, 1991.

http://dx.doi.org/10.1080/00207729108910730

Page 36: EEE4093_QFT

EEE4093 2013

E Boje 36

Figure 1.3.2 Warping of poles from s- to w-domains, T=1

4.2 – Effect of discretisation on design

For design, the performance specifications (sensitivity or tracking) are at low frequency,

within the system bandwidth where |Ts(j)| |Tz(j)| for any transfer function, T.

The main effect of sampling is to add (non-minimum) phase lag to the loop transfer function.

For example, with a sampling rate of 1 sample per second, we get approximately 45 of extra

phase lag and +3dB of extra gain at 2 rad/s. (Think what that does on the inverse Nichols

chart.) For sampling rate, Ts = 1s, the table below gives other values of lag and gain.

Table 1.3.1 – Normalised effect of sampling (i.e. T=1s)

frequency (rad/s) 0.1 0.2 0.4 1.0

lag -2.8 -5.7 -12.1 -26.6

gain +0.0 dB +0.0 dB +0.2 dB +1.0dB

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1Warping of poles from s- to w-domain

real

imag

Page 37: EEE4093_QFT

EEE4093 2013

E Boje 37

Figure 1.3.2 - Inverse Nichols chart showing effect of sampling at T=0.1s on L=1/s – an

integrator

Design

There are two possible design scenarios.

1) The sampling rate is fixed and we must design the discrete controller. The accurate

approach is to find the exact Pz(w). We can obtain the exact w-domain transfer function

using Matlab or tables, for example,

» Ps=tf(2,[1 3])

3

2)(

ssPs

» Pz=c2d(Ps,0.1,'zoh') % T=0.1

7408.0

1728.0)(

zzPz

» Pw=d2c(Pz,'tustin')

3

05012

9782

9851099260

w

w.

.w

.w.(w)Ps

The controller, G(w) is designed to meet specifications on T/(w) and then implemented

as G(z). We may save time by simply taking Pz(w) Ps(s)(1-sT/2)|s=w.

2) The sampling rate must be determined as part of the design.

Here, we design with P(s) but include the term (1-sT/2) with T a design variable to be

specified as an output of the controller design. Of course G(w) does not include the term,

it is part of L(w) to be designed but is the sampling effect and the phase lag comes from

sampling the plant.

-250 -200 -150 -100 -50 0-40

-30

-20

-10

0

10

20

30

40

6 db

3 db

1 db

0.5 db

0.25 db

0 db

-1 db

-3 db

-6 db

-12 db

-20 db

Open-Loop Phase (deg)

Open-L

oop G

ain

(db)

INVERSE NICHOLS CHART

0.03

0.1

0.3

1.0

3.0

10 10

30 100

L1=1/s

L2=(1-sT/2)/s

T=0.1

Page 38: EEE4093_QFT

EEE4093 2013

E Boje 38

Z{y(iT)} y(t) L{y(t)} or

Ps(s)

iTy

sz

s

sP

z

zzP

)(1)( 1LZ

1z

z

(t)

s

1

1z

T

21z

Tz

t

2

1

s

2

2

)1(

)1(2/

z

zT

aTez

z

e-at

as

1

aT

aT

ez

ae

/)1(

2aT

aT

ez

Tze

te

-at

21

as

22

1)1(1

aez

aTeezaTe

aT

ataTaT

aTaT

at

ebTezz

bTez

22 cos2

sin

bte at sin

22)( bas

b

aTaT ebTezz

babnzn

22

2201

cos2

bTb

abTeen

bTb

abTen

aTaT

aT

sincos

sincos1

0

1

aTaT

at

ebTezz

bTezz

22

2

cos2

cos

bte at cos

22)( bas

as

aTaT ebTezz

baanzn

22

2201

cos2

bTa

bbTeen

bTa

bbTen

aTaT

aT

sincos

sincos1

0

1

Table 2.1.2 Quick table of Laplace and Z-transforms. (After Eitelberg, 1999)

4.3 – A/D Conversion and Calculation delays

We must often allow for the A/D conversion time and calculation delay between the sampling

of the input and the control action at the output. It is unlikely that this will be more than one

sample on a single processor system unless they are badly designed. For one sample delay,

allocate an extra 1

2/1

2/1

z

wT

wT. For sub-sample delay, see the literature (e.g. Eitelberg,

1988).

Example: As before, ]5,1[],5,1[,1/

kaas

kP , with specifications,

i) 0.5 dB,201

1

L

ii) 1 dB,101

1

L

Page 39: EEE4093_QFT

EEE4093 2013

E Boje 39

iii)

dB,31

1

L

iv) Control action follows measurement with a one sample delay. Initially allow 30

for sampling effects at 30 rad/s.

Choose 1

10

sP . (Previous design was,

130/

15/

11.0/

60)(

s

s

ssG )

Specification (iv) tells us that the approximate effect of sampling is

delayn calculatio sampling

2/1

2/12/1)()(

wT

wTwTwPwP sz

and 30/3=10 is allocated to each term at 30

rad/s.

Design: As before except the high frequency pole must be at higher frequency to leave

sampling effect: 1120/

15/

11.0/

60)(

s

s

ssG

-250 -200 -150 -100 -50 0 -40

-30

-20

-10

0

10

20

30

Open-Loop Phase (deg)

Open-L

oop G

ain

(db)

2

2

6 db

3 db

1 db

0 db

-1 db

-3 db

-6 db

-12 db

-20 db 0.5

1.0

10

30

B0(10) B0(30) B0(100

) 30

Figure 1.3.3 – Design with 30 margin at 30 rad/s, 1120/

15/

11.0/

60)(

s

s

ssG

The margin allows arg(1-jT/2) = -10 at =30, T=11.8ms, 2/T=170 rad/s

Page 40: EEE4093_QFT

EEE4093 2013

E Boje 40

-250 -200 -150 -100 -50 0 -40

-30

-20

-10

0

10

20

30

Open-Loop Phase (deg)

Open

-Loop G

ain

(db)

2

2

6 db

3 db

1 db

0 db

-1 db

-3 db

-6 db

-12 db

-20 db

Specs. violated

0.5

1.0

10

30

Figure 1.3.3 – Design with 2/1

2/12/1)()()(

wT

wTwTwGwPwL s

, T=11.8ms

To prevent violating high frequency specifications, we must reduce the sampling and

calculation delay or increase the sampling rate. With T=8ms, extra lag around 15 rad/s, and

some tuning, we get,

-250 -200 -150 -100 -50 0 -40

-30

-20

-10

0

10

20

30

Open-Loop Phase (deg)

Open-L

oop G

ain

(db)

2

2

6 db

3 db

1 db

0 db

-1 db

-3 db

-6 db

-12 db

-20 db

30

1.0

10

Figure 1.3.3 – Design with 2/1

2/12/1)()()(

wT

wTwTwGwPwL s

, T=8ms,

110/

120/

1120/

14/

11.0/

60)(

w

w

w

w

wwG

Page 41: EEE4093_QFT

EEE4093 2013

E Boje 41

Notice that as a result of the phase lag introduced by sampling and delay, this G(w) has

considerably more bandwidth than the G(s). A digital controller can never have lower

bandwidth than an equivalent continuous one.

A final observation from Figure 2.1.2 is that one should avoid calculation delays if at all

possible. Some bad hardware designs may have latching of the A/D output in one cycle and

latching of the controller output to the D/A in the next sample of even later. (For example,

Yaniv, Fried and Furst-Yust, (2002) report 4 samples of delay on a Loughborough PC31

board.) This is no problem in signal processing but unnecessarily reduces performance in

feedback systems. Parts of the control algorithm not requiring the current A/D result should

be pre-calculated and the D/A value latched as soon as it is available. There is a possible

trade-off here as one could introduce sampling jitter by not latching the D/A value

periodically and this introduces noise effects discussed below.

4.4 – PID Controller discretisation

The PID controller itself is discretised, often in a pretty obscure way. If the sampling is very

fast with respect to the process dynamics, it does not matter but the actual algorithm may

influence the behaviour in very fast loops. For example, the discretisation of the series PID,

1

111)(

sT

sT

sTp

d

d

i

ksG

, with Ei = SPi - PVi - the error, all terms in the forward path,

backward difference approximation to derivative and the velocity algorithm is,

increment D) (and alProportion

increment Integral

increment Output

output Next

1

1

iipi

ii

pi

iii

iii

XXkP

ET

hkI

IPOP

OPOPOP

(1.3.8)

We calculate Xi depending on whether there is derivative action or not:

end

else

small)(or 0 if

11

ii

didididi

d

EX

hTαETEh)(TXTαX

T

(1.3.9)

Page 42: EEE4093_QFT

EEE4093 2013

E Boje 42

References Boje E, "Further results on Eitelberg's sampling rate design based on (1-sT/2)", International Journal of Control,

Vol. 51, No 5, pp 1155-1158, 1990.

Boje E, “Feedback design of pulse width modulators”, IEEE ACC 1999, San Diego, California, WP15-4, 2-4

June 1999, 1420-1424.

Eitelberg E, "Sampling rate design based on (1-sT/2)", International Journal of Control, Vol. 48, No 4, pp 1423-

1432, 1988.

Eitelberg E and Boje E, "Feedback Controller Design for Plants with modes and Disturbances above the

Sampling Frequency", International Journal of System Science, Vol. 22, No. 9, pp 1553-1562, 1991.

Matlab QFT Toolbox help % Quantitative Feedback Theory (QFT) Toolbox (OLD VERSION)

% Version 1.0 01-Feb-95 % Copyright (c) 1995 by C. Borghesani, Y. Chait, O. Yaniv. % % Conversions. % cp2mp - Complex to magnitude and phase. % mp2cp - Magnitude and phase to complex. % % Integrated Development Environments. % lpshape - Continuous-time controller design. % dlpshape - Discrete-time controller design. % pfshape - Continuous-time pre-filter design. % dpfshape - Discrete-time pre-filter design. % % Specialised X-Y Graphs. % plotbnds - Nichols plot of bounds. % plottmpl - Nichols plot of templates. % % Arithmetic. % addcp - Addition of frequency response sets. % addnd - Addition of transfer function num/den sets. % mulcp - Multiplication of frequency % putqft - Interactively set IDE MAT-file. % getqft - Interactively retrieve IDE MAT-file. % % General Utility. % freqcp - Continuous-time frequency response of num/den matrix. % dfreqcp - Discrete-time frequency response of num/den matrix. % qftdefs - User-defined defaults. function bdb = sisobnd2(w,wbd,W,uP,vP,R,nom,uC,vC,ctype,ph_r,info);

% Compute QFT bounds for the following closed-loop configuration % % | 1 | % |------------ | <= WS % | 1 + PGH | % % SISOBNDS(2,W,WBD,WS,P,R,NOM,C,LOC,PHS) computes bounds at frequencies % designated by WBD. WS is the performance specification, P is % the frequency response data of the plant (complex), R is the % disk radius for non-parametric uncertainty, NOM designates the % nominal plant and controller, C. LOC specifies location of unknown % controller in the loop: 1 for G, 2 for H. PHS specifies at which % phases (degrees) to compute bounds. % % SISOBNDS(2,W,[],WS,P,[],NOM,[],[],PHS) computes bounds using default % values for WBD (all frequencies in W), R (0), C (1), CTYPE (1).

Page 43: EEE4093_QFT

EEE4093 2013

E Boje 43

function plotbnds(bdb,ptype,phase,pos)

% PLOTBNDS Plot QFT bounds. % PLOTBNDS(BDS,PTYPE,PHS) plots the QFT bounds in BDS that are % associated with PTYPE and PHS. PHS is the same phase vector used % for computing BDB with SISOBNDS(PTYPE,...) and GENBNDS(PTYPE,...). % % PLOTBNDS(BDS) plots all the QFT bounds in BDS that were computed % using the default PHS. % % PLOTBNDS(BDS,[],PHS) plots the QFT bounds in BDS that were computed % using PHS and uses default value for PTYPE. function plottmp(w,wbd,P,nom,pos)

% PLOTTMPL Plot frequency response templates. % PLOTTMPL(W,WBD,P,NOM) plots the frequency response data computed % at the frequencies in WBD in P. NOM designates the location of % the nominal plant within P. % % PLOTTMPL(W,[],P) uses the default values for WBD (all frequencies % in W) and NOM (the first row) function lpshape(wl,bdb,uL0,vL0,delay,numC0,denC0,phase)

% LPSHAPE Controller design environment for continuous-time linear systems. % LPSHAPE produces a continuous-time Nichols plot using default % settings. % % LPSHAPE(W,BDB,NUMP0,DENP0,DELAY,NUMC0,DENC0,PHS) produces % the Nichols plot design environment with the nominal plant transfer % function P0(s)=NUMP0(s)/DENP0(s) where NUMP0 and DENP0 contain % the polynomial coefficients in descending powers of s using the % user-supplied frequency vector W. BDB contains the QFT bounds, % NUMC0 and DENC0 contain the coefficients for the initial % controller, and PHS is the user-defined phase vector. % % LPSHAPE(W,[],P0,[]) produces the nichols plot as above, % yet without the bounds and P0 is now in complex number format. % W corresponds to the frequency vector used to compute P0. The % rest of the inputs are set to their defaults. % % See also DLPSHAPE, PFSHAPE, DPFSHAPE, XTRQFT function bds = grpbnds(bd1,bd2,bd3,bd4,bd5,bd6,bd7,bd8,bd9)

% GRPBNDS Group QFT bounds. % GRPBNDS(BD1,BD2,...,BD9) creates a single bound matrix containing % all the passed bounds. % % See Also: PLOTBNDS, SECTBNDS, SISOBNDS, GENBNDS function cp = freqcp(num,den,w,delay)

% FREQCP Compute continuous bode of numerator/denominator matrices. % CP=FREQCP(NUM,DEN,W,DELAY) returns the continuous bode of the % numerators and denominators in NUM and DEN, respectively. W is % the frequency vector in radians/second. DELAY is the pure % time delay and it must have as many rows as NUM or DEN or be % just one element. % % CP=FREQCP(NUM,DEN,W) returns the continuous bode as above, % except DELAY defaults to zero (0). % % Rows and columns of NUM and DEN correspond to cases and % coefficients, respectively. % % Rows and columns of CP correspond to cases and frequencies, % respectively.