dr farazdaq rafeeq al-taha [coputer control 4th class...

35
Dr Farazdaq Rafeeq AL-Taha [COPUTER CONTROL 4TH CLASS MECHATRONICS] 1 Chapter One: Introduction 1.1 Advantages of digital control: Complex control algorithms are easy implemented in digital computers than in analog computer. Controllers are changed by changing the system program without hardware modifications. Digital circuits are less sensitive to noise. This involves a very small error as compared to analog. Digital filter coefficients are more accurate than analog filter circuits. The speed of computer hardware has increased exponentially since the 1980s. 1.2 Disadvantages of digital control: Complex methods used to analysis and design of digital control systems. Since sampling period is not zero, then a delay is occurs in digital systems. Quantization error affects accuracy in digital control. 1.3 Digital system: The basic scheme of digital control system is shown in figure 1. 1.4 Nyquist Sampling Theorem: A signal x(t) is sampled every T seconds, and the sampled output signal x p (t) is () = (). () = ∑ ()( − ) =0 The Fourier transform of the discrete signal is

Upload: votram

Post on 18-May-2018

224 views

Category:

Documents


2 download

TRANSCRIPT

Dr Farazdaq Rafeeq AL-Taha [COPUTER CONTROL 4TH CLASS MECHATRONICS]

1

Chapter One: Introduction

1.1 Advantages of digital control:

Complex control algorithms are easy implemented in digital computers than in analog

computer. Controllers are changed by changing the system program without hardware

modifications. Digital circuits are less sensitive to noise. This involves a very small error as

compared to analog. Digital filter coefficients are more accurate than analog filter circuits. The

speed of computer hardware has increased exponentially since the 1980s.

1.2 Disadvantages of digital control:

Complex methods used to analysis and design of digital control systems. Since sampling period

is not zero, then a delay is occurs in digital systems. Quantization error affects accuracy in

digital control.

1.3 Digital system:

The basic scheme of digital control system is shown in figure 1.

1.4 Nyquist Sampling Theorem:

A signal x(t) is sampled every T seconds, and the sampled output signal xp(t) is

𝑥𝑝(𝑡) = 𝑥(𝑡). 𝑝(𝑡) = ∑ 𝑥(𝑛𝑇)𝛿(𝑡 − 𝑛𝑇)

𝑛=0

The Fourier transform of the discrete signal is

Dr Farazdaq Rafeeq AL-Taha [COPUTER CONTROL 4TH CLASS MECHATRONICS]

2

𝑋(𝑒𝑗𝜃) = ∑ 𝑥(𝑛)𝑒−𝑗𝑛𝜃

𝑛=−∞

𝑥(𝑛) =1

2𝜋∫ 𝑋(𝑒𝑗𝜃)𝑒𝑗𝑛𝜃𝑑𝑡

𝜋

−𝜋

The frequency spectrum of the signal before and after sampling is shown in figure below

In order to avoid any aliasing or distortion of the frequency content of the original signal, and

hence to be able to recover the original signal, we must have

𝜔𝑠 − 𝜔 > 𝜔

𝜔𝑠 ≥ 2 𝜔 Where 2𝜔 is Nyquist rate

𝜔 is maximum frequency

𝜔𝑠 is sampling frequency

This means the sampling frequency should be at least twice the highest frequency of the signal.

To get the original signal a LPF with H(jω)

Dr Farazdaq Rafeeq AL-Taha [COPUTER CONTROL 4TH CLASS MECHATRONICS]

3

Example:

1.5 Applications: Systems that described by difference equations includes:

Computer controlled systems

Digital signal transmission system ( telephone system)

Systems that process audio signals. For example a CD contains digital signal

information, and when it is read from CD, it is a digital signal that can be processed with

a digital filter.

Dr Farazdaq Rafeeq AL-Taha COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

4

Chapter Two: Z-Transform:

The Z-transform offers a valuable set of techniques for the frequency analysis of digital signals

and processors. It is also very useful in design.

The Z-transform of a discrete time signal x(n) is

X(z) = ∑ X(

n=−∞

n) z−n n = 0, 1, 2, …

Where Z = esT , T is the sampling period.

Example: find the Z-transform of discrete unit impulse function.

δ(n) = {1 for n = 00 for n ≠ 0

X(z) = ∑ X (

n=−∞

n) z−n = ∑ 1

0

n=0

. z0 = 1

Example: find the z transform of sampled unit step function

u(n) = {1 for n ≥ 0

0 for n < 0

X(z) = ∑ X (

n=−∞

n) z−n = ∑ 1

n=0

. z−n = 1 + Z−1 + Z−2 + ⋯ + Z−n

=1

1 − z−1=

z

z − 1

The Residue Method:

This is a powerful technique for obtaining z transform

1. X(s) has distinct pole at s=r:

𝐗(𝐳) = 𝐥𝐢𝐦𝐬→𝐫(𝐬 − 𝐫)[𝐗(𝐬)𝐳

𝐳−𝐞𝐬𝐓]

Dr Farazdaq Rafeeq AL-Taha COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

5

2. X(s) with repeated poles of order q:

𝐗(𝐳) =𝟏

(𝐪 − 𝐫)!𝐥𝐢𝐦𝐬→𝐫

𝐝𝐪−𝟏

𝐝𝐬𝐪−𝟏(𝐬 − 𝐫)𝐪[𝐗(𝐬)

𝐳

𝐳 − 𝐞𝐬𝐓]

Example: find the z transform of sampled exponential function

x(t) = e−at and X(s) =1

s + a ∴ one pole at s = −a

X(z) = lims→−a

(s + a) [ 1

(s + a)

z

z − esT ] =

z

z − e−aT

Example: find the z transform of sampled cosine function

x(t) = cos(ωt) X(s) =s

s2 + ω2=

s

(s − jω)(s + jω) ∴ 2 poles at s = ±jω

X(z) =1

2

z

z − e−jωT+

1

2

z

z − ejωT=

z2 − zcosωT

z2 − 2zcosωT + 1

The range of values of z for which the sum in the Z-transform converges absolutely is referred to

as the ROC of the Z-transform

Table 1: Z-Transform

f(t) F(s) F(z) f(kT)

Dr Farazdaq Rafeeq AL-Taha COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

6

Z-Transform properties:

1 Linearity Z[a x(n) + b f(n)] = a X(z) + b F(z)

2 Multiplication by n Z[nT f(nT)] = −Tzd

dzF(z)

3 Multiplication by an Z[an f(nT)] = F(z

a)

4 Multiplication by e−anT Z[f(nT)e−anT] = F(z)|z=z e−anT

5 Final Value Theorem f(∞) = limk→∞ f(k) = limz→1(1 − z−1) F(z)

6 Time Delay Z{x(t − kT)} = z−kX(z)

7 Time advance:

8 Differentiation Z{tx(t)} = −z

dX(z)

dz

9 Initial Value Theorem x(0) = limz→∞

X(z)

Example: find the z transform of sampled ramp function

x(t) = t , X(s) =1

s2 Two repeated poles at s = 0

X(z) =1

(2 − 1)!lims→0

d

dss2[X(s)

z

z − esT] =

zT

(z − 1)2

Example: x(n) = u(n) − nu(n)

: X(Z) =z

z−1−

z

(z−1)2 f(0) = limZ→∞ X(z) = 1

Example: find the Z-transform of the sampled function e−AtcosωT

Z[cos(ωT)] =z2 − zcosωT

z2 − 2zcosωT + 1=

z(z − cosωT)

z2 − 2zcosωT + 1

Replace z by ze+At then

X(z) =ze+AT(ze+AT − cosωT)

z2e+2AT − 2ze+ATcosωT + 1=

z2 − ze−ATcosωT

z2 − 2ze−ATcosωT + e−2AT

Example: Z-transform of a discrete unit step function is X(z) =z

z−1 then

Z(an) = X (z

a) =

za

za − 1

=z

z − a

Example: Find the z-transform of the causal sequence

Dr Farazdaq Rafeeq AL-Taha COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

7

Solution: The given sequence is a sampled step starting at k = 2 rather than k = 0 (i.e., it is

delayed by two sampling periods). Using the delay property, we have

Inversion of the z-Transform

1. Long Division:

Example: Obtain the inverse z-transform of the function

Example: F(z) =z2+z

z2−3z+4=

1+z−1

1−3z−1+4z−2

Then f(0)=1, f(1)=4, f(2)=8, …

Example: F(z) = 1+2z−1+z−2

1−z−1+0.3561z−2 = 1 + 3z−1 + 3.4639z−2 + 2.5756z−3 + ⋯

Then f(0)=1, f(1)=3, f(2)=3.4639, f(3)=2.5756, ….

Dr Farazdaq Rafeeq AL-Taha COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

8

2. Partial Fraction Expansion Method:

Example:

F(z) =z

z2 − 0.25z − 0.375=

45

z

z − 0.75−

45

z

z + 0.5

f(k) =4

5(0.75)k −

4

5(−0.5)k

Example:

F(z) =z2 + z

(z − 0.6)(z − 0.8)(z − 1)=

20z

(z − 0.6)−

45z

(z − 0.8)+

25z

(z − 1)

f(k) = 20(0.6)k − 45(0.8)k + 25

3. Residue Method:

Residue due to first order pole at z=r is given by:

R = limz→r (z − r) [ F(z) zk−1 ]

For repeated poles of order q is given by:

R =1

(q−r)!limz→r

dq−1

dzq−1(z − r)q[F(z)zk−1]

Example: F(z) =z

(z−0.75)(z+0.5)

Two poles at z=0.75 and z=-0.5 Then

R1 = limz→0.75

(z − 0.75) [ z

(z − 0.75)(z + 0.5) zk−1 ] =

0.75k

0.75 + 0.5=

4

5(0.75)k

R2 = limz→−0.5 (z + 0.5) [ z

(z−0.75)(z+0.5) zk−1 ] = −

4

5(−0.5)k

x(k) =4

5[(0.75)k + −(−0.5)k]

Example: find the Z transform of a sampled signal

x(n) = 2u(n) − 2u(n − 8)

X(z) =2z

z − 1− z−8

2z

z − 1= 2

z8 − 1

z7(z − 1)

Dr Farazdaq Rafeeq AL-Taha COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

9

Example: Find the ROC of a sampled unit step function:

X(z) = z

z − 1 |Z| > 1

When |Z| > 1 then X(Z) converges

When |Z| < 1 then X(Z) diverges

The X(z) has a pole at z =

1 and a zero at z = 0.

X(z) = 1 + z−1 + z−2 + z−3 + ⋯

X(2) = 1 +1

2+

1

4+

1

8+ ⋯ =

2

2−1= 2

X(0.5) = 1 + 2 + 4 + 8 + ⋯ = ∞

Example: y(n) = aox(n) − b1y(n − 1)

Example:

Y(z) = aox(n) − b1y(n − 1)

Y(z)[1 − b1z−1] = aoX(z)

G(z) =Y(z)

X(z)=

ao

[1 + b1z−1]

H(z) =ao − a1z−1 + a2z−2

1 − b1z−1 + b2z−2

Dr Farazdaq Rafeeq COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

10

Chapter Three: Pulse Transfer Function

1. Continuous Time Plant Driven by a ZOH :

In ZOH the discrete signal is converted to a stairstep function. The output of ZOH could be

decomposed into a series of gate functions

The continuous time response to the first step of magnitude uo is

y(t) = uoℒ−1[G(s)

s]

The Z transform of the sampled sequence yk is

Y(z) = uoℤℒ−1[G(s)

s]

The response due to the negative going step is exactly the same except it is negative and

delayed by one sample period so that the total z transform to the response to uo gate function

may be calculated by using super position to be

Y(z) = uo { ℤℒ−1 [G(s)

s] − z−1ℤℒ−1 [

G(s)

s]} = uo(1 − z−1)ℤℒ−1 [

G(s)

s]

Extending this idea to the second gate function, we get the response to the first two gate

functions to be

Y(z) = uo(1 − z−1)ℤℒ−1 [G(s)

s] + u1(z−1 − z−2)ℤℒ−1 [

G(s)

s]

This can be simplified to be

Y(z) = (uo + u1z−1) (1 − z−1)ℤℒ−1 [G(s)

s]

Dr Farazdaq Rafeeq COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

11

The discrete time transfer function between the input and output sequences is

𝐆(𝐳) =𝐘(𝐳)

𝐔(𝐳)= (𝟏 − 𝐳−𝟏)ℤ𝓛−𝟏 [

𝐆(𝐬)

𝐬]

Example: Find the pulse transfer function

G(s) =Y(s)

U(s)=

1

s + 1

This system will be driven by a ZOH and followed by a sampler

G(z) = (1 − z−1)ℤℒ−1 [1

s(s + 1)] = (1 − z−1)ℤℒ−1 [

1

s−

1

s + 1]

= (1 − z−1) [1

1 − z−1−

1

1 − e−Tz−1] =

z−1(1 − e−T)

1 − e−Tz−1

Let T=0.2 sec then

G(z) =z−1(1 − e−0.2)

1 − e−0.2z−1=

0.1813z−1

1 − 0.8187z−1

Example: Calculating Pulse Transfer Function Obtain the pulse transfer function G(z) of the

system shown below, where G(s) is given by

Dr Farazdaq Rafeeq COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

12

Solution:

Since there is an input sampler at the input of G(s), the pulse transfer function is

From Z-transform Table, the z-transform of each of the partial fraction expansion terms can be

obtained. Thus

2. System with Time Delay

Consider a continuous-time plant with time delay of TD seconds whose continuous-time transfer

function is expressed as

Example: (ZOH Equivalent with Time Delay) Consider the following first order process control

model with a 0.5 sec time delay

Find the equivalent ZOH transfer function with a sampling time of 0.4 sec.

Solution:

Dr Farazdaq Rafeeq COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

13

Since TD = 0.5 sec, we can select n = 1 and TL = 0.1. Substitute the continuous plant transfer

function into Eq. we obtain

To calculate the z-transform, we need to find the inverse Laplace transformation of the two

signals in the bracket. The first term is a unit step sequence delayed by 0.1sec, hence

By plugging in T=0.4, a=1, and m=0.75, we obtain the same result. Alternatively, the following

Matlab commands would generate the same result.

Dr Farazdaq Rafeeq COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

14

3. Approximating Continuous-Time Controllers (Emulations)

It is desired to find an algorithm (difference equation) so that the digital controller C(z)

approximates the continuous-time controller C(s)

The discrete-time approximation of the continuous-time transfer function can be obtained by

substituting the Laplace operator s with the following:

Example: Discrete-Time Approximation of Continuous-Time Transfer Functions using the three

approximation methods to find the discrete-time equivalent of a lead compensator

Dr Farazdaq Rafeek AL-TAHA COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

15

Chapter 4: Routh-Hurwitz stability Criterion

Procedure:

1. Find the discrete characteristic equation

2. Bilinear Transformation: to transfer the system from Z plane to a new plane

3. Apply Routh-Hurwitz stability Criterion

Example: Determine the range of stability for the unity feedback discrete system with open loop

transfer function

𝐺(𝑧) =0.158𝑘 𝑍

(𝑍 − 1)(𝑍 − 0.368)

The characteristic equation P(Z) = 1 + G(Z)

(𝑍 − 1)(𝑍 − 0.368) + 0.158𝑘 𝑍 = 0

𝑍2 + 𝑍 (0.158𝑘 − 1.368) + 0.368 = 0

Substitute 𝑍 =λ+1

λ−1 then the new characteristic equation is

0.158𝑘 λ2 + 1.264 λ + 2.736 − 0.158𝑘 = 0

λ2| 0.158𝑘 2.736 − 0.158𝑘

λ | 1.264 0

λ0 | 2.736 − 0.158𝑘

Then 0 < 𝑘 < 17.3165

Example: 𝑃(𝑍) = 𝑍3 − 1.3 𝑍2 − 0.08 𝑍 + 0.24

The characteristic equation in λ plane is

−0.14 λ3 + 1.5 λ2 + 5.1 λ + 1.98 = 0

λ3| − 0.14 1.5

λ2| 1.5 1.98

λ | 5.28

λ0 | 1.98 One sign change means one root in the LHSP (unstable system).

Dr Farazdaq Rafeeq AL-TAHA [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

16

Chapter 5: Jury Test

Example: Examine the stability of the following characteristic equation:

P(z) = z4 − 1.2z3 + 0.07z2 + 0.3z − 0.08

= 𝑎𝑜 z4 + a1 z

3 + 𝑎2 z2 + 𝑎3z + 𝑎4

The coefficients are:

ao = 1 a1 = −1.2 a2 = 0.07 a3 = 0.3 a4 = −0.08

Last row= 2 n – 3 = 5

(1) The first condition |a4| < ao is satisfied.

(2) The second condition P(1) > 0

P(1) = 1 − 1.2 + 0.07 + 0.3 − 0.08 = 0.09

The second condition is satisfied.

(3) The third condition for stability P(-1) >0 { for n even }

P(−1) = 1 + 1.2 + 0.07 − 0.3 − 0.08 = 1.98 > 0

Hence the third condition is satisfied.

Now we construct the Jury stability table.

Row 𝑍0 𝑍1 𝑍2 𝑍3 𝑍4

1 -0.08 (a4) 0.3 0.07 -1.2 1 (ao)

2 1 -1.2 0.07 0.3 -0.08

3 -0.994 (b3) 1.176 0.0756 -0.204 (bo)

4 -0.204 0.0756 1.176 -0.994

5 0.946 (c2) -1.184 0.315 (c0)

From this table we get:

|b3| > |bo| and |c2| > |co|

Since all conditions for stability are satisfied, the given characteristic equation is stable or all the

roots lies inside the unit circle.

Dr Farazdaq Rafeeq AL-TAHA [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

17

Example: Examine the stability of the following characteristic equation

P(z) = z3 − 1.1z2 − 0.1z + 0.2

The coefficients are:

ao = 1 a1 = −1.1 a2 = −0.1 a3 = 0.2

Last Row = 2 n – 3 = 3

(1) The first condition |a3| < ao is satisfied.

(2) The second condition

P(1) = 1 − 1.1 − 0.1 + 0.2 = 0

This indicates that at least one root at z=1. Therefore the system at best is critically stable. The

remaining tests determine whether the system is critically stable or unstable (Critical stability is

not desired and the stability test may be stopped at this point).

(3) The third condition

P(−1) = −1 − 1.1 + 0.1 + 0.2 = −1.8 < 0 n = 3 odd

The third condition is satisfied

Let us examine the fourth condition of Jury test

Row 𝑍0 𝑍1 𝑍2 𝑍3

1 0.2 -0.1 -1.1 1

2 1 -1.1 -0.1 0.2

3 -0.96 (b2) 1.036 -0.12 (bo)

(4) |b2| > |bo|

The fourth condition of Jury test is satisfied. The system is critically stable and one root lies on

z=1 while the other two roots lies inside unit circle.

Example: A control system has the following characteristic equation:

P(z) = z3 − 1.3z2 − 0.08z + 0.24

Solution:

We first identify the coefficients: ao = 1 a1 = −1.3 a2 = −0.08 a3 = 0.24

The first condition |a3| < ao is satisfied. Next we examine the second condition

P(1) = 1 − 1.3 − 0.08 + 0.24 = −0.14 < 0 therefore the system is unstable.

Dr Farazdaq Rafeeq COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

18

Chapter Six: Discrete Root Locus:

Example: The system shown below with integral type controller and sampling time T=0.5

sec.

(i) Draw the Root locus.

(ii) Find the critical value of k.

(iii) Find the damping ratio of the closed loop poles analytically

Solution:

(i) We shall first obtain pulse transfer function

The feed forward pulse transfer function becomes

With T=0.5 sec then

Notice that G (z) has 2 poles at z=1 and z=0.6065 and a zero at z=0. We first locate the

system poles and zero in the z plane and then find the breakaway point and break in point

by writing the characteristic equation in the form

Differentiating gives

Dr Farazdaq Rafeeq COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

19

Hence, z=0.7788 (breakaway point) and z=-0.7788(break-in point)

(ii) The critical gain:

The critical gain KC = 8.165

The closed loop poles corresponding to K=2 can be found to be

Z1,2 = 0.4098 ± j 0.6623

(iii) The damping ratio:

Dr Farazdaq Rafeeq COMPUTER CONTROL 4TH CLASS MECHATRONICS[ ]

20

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

21

Chapter Seven

7.1 Steady State Error:

Consider the digital system:

Using the final value theorem:

Discrete unit step

Discrete unit Ramp

Discrete unit

parabolic.

Example: The pulse transfer function with ZOH is

1. For a step input

2. For a ramp input:

3. For a parabolic input:

7.2 Mapping S-Plane to Z-plane:

In s-plane, the closed-loop system (under damped system) is given by:

Dominant poles are: s= and different characteristics are given:

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

22

How, we can determine these characteristics from digital system?

The transformation used to z-domain is: 𝑍=𝑒𝑠𝑇, thus the dominant poles in Z-plane are given by:

Example: Determine all characteristics of the open-loop system

In s-domain, the closed loop transfer function is:

The poles are given by: 𝑠1,2= − 0.5 ± 𝑗 0.866

The performances in s-plane are: 𝜁=0.5; 𝜔=1; 𝑇𝑟=1.368; 𝑇𝑠=8𝑠; 𝑇𝑝=3.62𝑠ec; %𝑂𝑆=16%; 𝑒𝑠𝑠=0

The discrete open-loop transfer function is (T=1sec):

The transfer function of the closed-loop system (unity feedback) is:

The poles are given by: 𝑍1,2=0.5±𝑗 0.618 and

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

23

Chapter Eight: State Space Analysis:

The state model and the output model can be described by

Example: consider the following system

The state space representations are:

Controllable canonical form:

Solution of Discrete Time State Equations:

Consider the Discrete Time System described by

Taking the z transform of both sides gives

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

24

Taking the inverse Z transform of both sides gives

Example: Obtain the state transition matrix of the following discrete time system

The state transition matrix is

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

25

Next compute x(k)

Since

We obtain

Hence

The state vector is

Finally the output is given by:

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

26

Pole Placement Techniques:

To introduce the pole placement technique, we will consider the servomotor Second order model

The state model is given by

Where

Choose the control input u(k) to be a linear combination of the states so that

Where the gain matrix K=[K1 K2] then the system states can be written as

Where Af is the closed loop system matrix. The characteristic equation is

We choose the desired characteristic equation zeros at locations λ1 and λ2 , then the desired

characteristic equation is

Equating the coefficients between the actual and the desired characteristic equations gives

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

27

Thus we can find the gain matrix K that will realize any desired characteristic equation.

Then

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

28

The system response with initial conditions x1(0)=1 and x2(0)=0.

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

29

Example: Simple Inertial System with open loop transfer function G(s) =1

s2 .

[x1̇

x2̇] = [

0 10 0

] [x1

x2] + [

01

] u and y = [1 0] [x1

x2]

The difference equation is

[x1

x2]

k+1= [

1 T0 1

] [x1

x2]

k+ [

T2

2T

] uk

With sampling time T=0.1 sec, then

[x1

x2]

k+1= [

1 0.10 1

] [x1

x2]

k+ [

0.0050.1

] uk

If we choose the state feedback, then the control low is

uk = −[f1 f2] [x1

x2]

k

The pole placement becomes

[x1

x2]

k+1= [

1 0.10 1

] [x1

x2]

k− [

0.005f1 0.005f2

0.1f1 0.1f2] [

x1

x2]

k

So the characteristic equation is

|Z − 1 + 0.005f1 −1 + 0.005f2

0.1f1 Z − 1 + 0.1f2| = 0

Let the desired roots at 0.6 and 0.8 then Z2 − 1.4Z + 0.48 = 0

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

30

Comparing the actual and the desired characteristic equations with equating coefficients with the

same power gives f1 = 8 and f2 = 5.6

Example: Thermal control system described by

[x1̇

x2̇] = [

−2 20.5 −0.75

] [x1

x2] + [

0 00.25 0.5

] u and y = [1 0] [x1

x2]

Choose the state feedback gain matrix to place the closed loop poles at z=0.5j0.2

The system of interest here is

[x1

x2]

k+1= [

0.627 0.3610.0901 0.853

] [x1

x2]

k+ [

0.02510.1150

] uk

The characteristic determinant is

|Z − 0.627 + 0.0251f1 0.0251f2 − 0.361

−0.0901 + 0.115f1 Z − 0.853 + 0.115f2| = 0

Z2 − (1.48 − 0.0251f1 − 0.115f2)Z + 0.5025 + 0.02f1 − 0.069f2 = 0

The desired characteristic equation is

(Z − 0.5 − j0.2)(Z − 0.5 + j0.2) = Z2 − Z + 0.29 = 0

Comparing the actual and the desired characteristic equations with equating coefficients with the

same power gives f1 = 2.24 and f2 = 3.677

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

31

State Estimation:

The system that estimates the states of another system is called the Observer or a State

Estimator. Suppose the system described by

Xk+1 = A Xk + B uk …1

yk = C Xk

The error state X̃k is the difference between the estimated X̂k and measured states, or

X̃k = Xk − X̂k …2

Substitute eqn.2 into 1, then

X̂k+1 = A X̂k + Buk + K(yk − CX̂k)

and uk = − F X̂k

Closed loop roots at det[ I z - A+K C] = 0.

The estimator error X̃k+1 = ( A − K C ) X̃k

In matrix form

[x̃x

]k+1

= [A − KC 0

BF A − BF] [

x̃x

]k

det [Iz − (A − KC) 0

−BF Iz − (A − BF)] = 0

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

32

Example:

[x1

x2]

k+1= [

1 0.10 1

] [x1

x2]

k+ [

0.0050.1

] uk

yk = [1 0] [x1

x2]

k

The estimator state is

[x̂1

x̂2]

k+1

= [1 0.10 1

] [x̂1

x̂2]

k

+ [0.005

0.1] uk + [

K1

K2] (x1 k

− x̂1 k)

The characteristic equation

det [1 − K1 − z 0.1

−K2 1 − z] = 0

or z2 − z(2 − K1) + 1 + K1 + 0.1K2 = 0

To locate the system roots at z = 0.9 ∓ j0.1 or z2 − 1.8z + 0.82 = 0

Equating the coefficients of actual and desired characteristic equations gives

K1 = 0.2 , K2 = 0.2

Example: temperature system with yk = [1 0] [x1

x2]

k

the observer poles may be determined from the appropriate determinant of relation

det[Iz − (A − KC)] det[Iz − (A − BF)] = 0

or

det[Iz − A + KC] = [z − 0.627 + k1 −0.361−0.0901 + k2 z − 0.853

] = 0

z2 − z(K1 − 1.48) + 0.502 − 0.853K1 + 0.361K2 = 0

If the observer is to be faster than the controlled plant, a good choice for pole locations would be

at z = 0.4 ∓ j0.2 so that z2 − 0.8z + 0.2 = 0 . Equating the coefficients gives K1 = 0.68 ,

K2 = 0.77

Then the observer form is

[x̂1

x̂2]

k+1

= [0.627 0.361

0.0901 0.853] [

x̂1

x̂2]

k

+ [0.02510.1150

] uk + [0.680.77

] (x1 k− x̂1 k

)

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

33

With the control law uk = −[2.24 3.677] [x̂1

x̂2]

k

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

34

Control of output about non-zero set point:

In a large number of applications it is desirable to control the system output about some

fixed value. This is especially the case in the chemical process where pressures, temperatures,

and chemical concentrations must be controlled about some nominal values.

Suppose the system described by

Xk+1 = A Xk + B uk

yk = C Xk

The control law generates the control efforts from negatively fed-back states and some linear

combination of the set point variables, or

uk = −F Xk + G y̅

We shall assume the equilibrium states X̅ exist and have a control effort u̅ then

x̅ = A x̅ + Bu̅

While the control law becomes

u̅ = −F x̅ + Gu̅

Then

x̅ = (I − A + BF)−1BGy̅

Since y̅ = C x̅ then

y̅ = C(I − A + BF)−1BG y̅

If the number of variables in y̅ are the same as the number of elements in u̅ then the matrix

C(I − A + BF)−1B is square, and if it is non-singular (which is almost always the case), then it

may be inverted to yield the set point variable-gain matrix

G = [C(I − A + BF)−1B]−1

Now the matrix G is known, the form of the control law is

uk = −Fxk + [C(I − A + BF)−1B]−1y̅

The complete closed loop control system is shown in figure below

Dr Farazdaq Rafeeq [COMPUTER CONTROL 4TH CLASS MECHATRONICS]

35

The dynamic character can be given by examination of the closed loop characteristic equation or

det[zI − A + BF] = 0

Example: Let us design a state feedback control system to control the temperature x1(k)about

some non-zero fixed point y̅ and have the system poles located at z = 0.4 ∓ j0.2 . The system

matrices are

A = [0.627 0.361

0.0901 0.853] B = [

0.02510.1150

] and C = [1 0]

The pole locations will be given by the roots of det[zI − A + BF] = 0 where the elements of F

will be selected to place them as F = [2.24 3.677]

Then

G = [C(I − A + BF)−1B]−1 = 6.408