+ All Categories
Home > Engineering > Digital control systems (dcs) lecture 18-19-20

Digital control systems (dcs) lecture 18-19-20

Date post: 14-Feb-2017
Category:
Upload: ali-rind
View: 541 times
Download: 14 times
Share this document with a friend
55
Digital Control Systems (DCS) Lecture-18-19-20 Introduction to Digital Control Systems 1
Transcript
Page 1: Digital control systems (dcs) lecture 18-19-20

1

Digital Control Systems (DCS)Lecture-18-19-20

Introduction to Digital Control Systems

Page 2: Digital control systems (dcs) lecture 18-19-20

2

Lecture Outline• Introduction

• Difference Equations

• Review of Z-Transform

• Inverse Z-transform

• Relations between s-plane and z-plane

• Solution of difference Equations

Page 3: Digital control systems (dcs) lecture 18-19-20

3

Introduction

• Digital control offers distinct advantages over analog control that explain its popularity.

• Accuracy: Digital signals are more accurate than their analogue counterparts.

• Implementation Errors: Implementation errors are negligible.

• Flexibility: Modification of a digital controller is possible without complete replacement.

• Speed: Digital computers may yield superior performance at very fast speeds

• Cost: Digital controllers are more economical than analogue controllers.

Page 4: Digital control systems (dcs) lecture 18-19-20

4

Structure of a Digital Control System

Page 5: Digital control systems (dcs) lecture 18-19-20

5

Examples of Digital control SystemsClosed-Loop Drug Delivery System

Page 6: Digital control systems (dcs) lecture 18-19-20

6

Examples of Digital control Systems

Aircraft Turbojet Engine

Page 7: Digital control systems (dcs) lecture 18-19-20

7

• A difference equation expresses the change in some variable as a result of a finite change in another variable.

• A differential equation expresses the change in some variable as a result of an infinitesimal change in another variable.

Difference Equation vs Differential Equation

Page 8: Digital control systems (dcs) lecture 18-19-20

8

Differential Equation• Following figure shows a mass-spring-damper-system. Where y is

position, F is applied force D is damping constant and K is spring constant.

• Rearranging above equation in following form

𝐹 (𝑡 )=𝑚 �̈� (𝑡 )+𝐷 �̇� (𝑡 )+𝐾𝑦 (𝑡)

�̈� (𝑡 )= 1𝑚 𝐹 (𝑡 )− 𝐷

𝑚 �̇� (𝑡 ) 𝐾𝑚 𝑦 (𝑡 )

Page 9: Digital control systems (dcs) lecture 18-19-20

9

Difference Equations• Difference equations arise in problems where the

independent variable, usually time, is assumed to have a discrete set of possible values.

• Where coefficients , ,… and , ,… are constant. • is forcing function

𝑦 (𝑘+𝑛 )+𝑎𝑛−1 𝑦 (𝑘+𝑛−1 )+…+𝑎1 𝑦 (𝑘+1 )+𝑎0 𝑦 (𝑘 )=𝑏𝑛𝑢 (𝑘+𝑛 )+𝑏𝑛− 1𝑢 (𝑘+𝑛−1 )+…+𝑏1 𝑢 (𝑘+1 )+𝑏0 𝑢 (𝑘 )

Page 10: Digital control systems (dcs) lecture 18-19-20

10

Difference Equations

• Example-1: For each of the following difference equations, determine the (a) order of the equation. Is the equation (b) linear, (c) time invariant, or (d) homogeneous?

Page 11: Digital control systems (dcs) lecture 18-19-20

11

Difference Equations

• Example-1: For each of the following difference equations, determine the (a) order of the equation. Is the equation (b) linear, (c) time invariant, or (d) homogeneous?

Solution: a) The equation is second order. b) All terms enter the equation linearlyc) All the terms if the equation have constant coefficients.

Therefore the equation is therefore LTI. d) A forcing function appears in the equation, so it is

nonhomogeneous.

Page 12: Digital control systems (dcs) lecture 18-19-20

12

Difference Equations

• Example-1: For each of the following difference equations, determine the (a) order of the equation. Is the equation (b) linear, (c) time invariant, or (d) homogeneous?

Solution: a) The equation is 4th order. b) All terms are linearc) The second coefficient is time dependent d) There is no forcing function therefore the equation is

homogeneous.

Page 13: Digital control systems (dcs) lecture 18-19-20

13

Difference Equations

• Example-1: For each of the following difference equations, determine the (a) order of the equation. Is the equation (b) linear, (c) time invariant, or (d) homogeneous?

Solution: a) The equation is 1st order. b) Nonlinearc) Time invariantd) Homogeneous

Page 14: Digital control systems (dcs) lecture 18-19-20

14

Z-Transform• Difference equations can be solved using classical methods analogous

to those available for differential equations.

• Alternatively, z-transforms provide a convenient approach for solving LTI equations.

• The z-transform is an important tool in the analysis and design of discrete-time systems.

• It simplifies the solution of discrete-time problems by converting LTI difference equations to algebraic equations and convolution to multiplication.

• Thus, it plays a role similar to that served by Laplace transforms in continuous-time problems.

Page 15: Digital control systems (dcs) lecture 18-19-20

15

Z-Transform• Given the causal sequence {u0, u1, u2, …, uk}, its z-

transform is defined as

• The variable z −1 in the above equation can be regarded as a time delay operator.

𝑈 (𝑧 )=𝑢𝑜+𝑢1 𝑧−1+𝑢2 𝑧− 2+𝑢𝑘 𝑧−𝑘

𝑈 (𝑧 )=∑𝑘=0

𝑢𝑘 𝑧−𝑘

Page 16: Digital control systems (dcs) lecture 18-19-20

16

Z-Transform

• Example-2: Obtain the z-transform of the sequence

,...0 ,0 ,0 ,4 ,0 ,2 ,3 ,1 ,10 kku

Page 17: Digital control systems (dcs) lecture 18-19-20

17

Relation between Laplace Transform and Z-Transform

• The Laplace Transform of above equation is

• And the Z-transform of is given as

• Comparing (A) and (B) yields

𝑢∗ (𝑡 )=𝑢𝑜 𝛿 (𝑡 )+𝑢1 𝛿 (𝑡−𝑇 )+𝑢2 𝛿 (𝑡−2𝑇 )+…+𝑢𝑘 𝛿 (𝑡−𝑘𝑇 )

𝑈∗ ( 𝑠)=𝑢𝑜+𝑢1𝑒−𝑠𝑇+𝑢2 𝑒−2𝑠𝑇+…+𝑢𝑘 𝑒−𝑘𝑠𝑇

𝑈∗ ( 𝑠)=∑𝑘=0

𝑢𝑘𝑒−𝑘𝑠𝑇 (𝐴)

𝑧=𝑒𝑠𝑇

𝑈 (𝑧 )=∑𝑘=0

𝑢𝑘 𝑧−𝑘(𝐵)

Page 18: Digital control systems (dcs) lecture 18-19-20

18

Conformal Mapping between s-plane to z-plane

• Where .

• Then in polar coordinates is given by

𝑧=𝑒(𝜎+ 𝑗𝜔 )𝑇

𝑧=𝑒𝜎 𝑇 𝑒 𝑗𝜔 𝑇

∠ 𝑧=𝜔𝑇|𝑧|=𝑒𝜎𝑇

𝑧=𝑒𝑠𝑇

Page 19: Digital control systems (dcs) lecture 18-19-20

19

Conformal Mapping between s-plane to z-plane

• We will discuss following cases to map given points on s-plane to z-plane.

– Case-1: Real pole in s-plane

– Case-2: Imaginary Pole in s-plane

– Case-3:Complex Poles

𝑠−𝑝𝑙𝑎𝑛𝑒 𝑧−𝑝𝑙𝑎𝑛𝑒

Page 20: Digital control systems (dcs) lecture 18-19-20

20

Conformal Mapping between s-plane to z-plane

• Case-1: Real pole in s-plane

• We know

• Therefore

∠ 𝑧=𝜔𝑇|𝑧|=𝑒𝜎𝑇

|𝑧|=𝑒𝜎𝑇 ∠ 𝑧=0

Page 21: Digital control systems (dcs) lecture 18-19-20

21

Conformal Mapping between s-plane to z-plane

When

∠ 𝑧=𝜔𝑇|𝑧|=𝑒𝜎𝑇

|𝑧|=𝑒0𝑇=1∠ 𝑧=0𝑇=0

𝑠=0

𝑠−𝑝𝑙𝑎𝑛𝑒 𝑧−𝑝𝑙𝑎𝑛𝑒

1

Case-1: Real pole in s-plane

Page 22: Digital control systems (dcs) lecture 18-19-20

22

Conformal Mapping between s-plane to z-plane

When

∠ 𝑧=𝜔𝑇|𝑧|=𝑒𝜎𝑇

|𝑧|=𝑒−∞𝑇=0∠ 𝑧=0

−∞

𝑠−𝑝𝑙𝑎𝑛𝑒 𝑧−𝑝𝑙𝑎𝑛𝑒

0

Case-1: Real pole in s-plane

Page 23: Digital control systems (dcs) lecture 18-19-20

23

Conformal Mapping between s-plane to z-plane

Consider

∠ 𝑧=𝜔𝑇|𝑧|=𝑒𝜎𝑇

|𝑧|=𝑒−𝑎𝑇

∠ 𝑧=0

−𝑎

𝑠−𝑝𝑙𝑎𝑛𝑒 𝑧−𝑝𝑙𝑎𝑛𝑒

1

Case-1: Real pole in s-plane

0

Page 24: Digital control systems (dcs) lecture 18-19-20

24

Conformal Mapping between s-plane to z-plane

• Case-2: Imaginary pole in s-plane

• We know

• Therefore

∠ 𝑧=𝜔𝑇|𝑧|=𝑒𝜎𝑇

|𝑧|=1 ∠ 𝑧=±𝜔 𝑇

Page 25: Digital control systems (dcs) lecture 18-19-20

25

Conformal Mapping between s-plane to z-plane

Consider

∠ 𝑧=𝜔𝑇|𝑧|=𝑒𝜎𝑇

|𝑧|=𝑒0𝑇=1∠ 𝑧=𝜔𝑇

𝑠= 𝑗𝜔

𝑠−𝑝𝑙𝑎𝑛𝑒 𝑧−𝑝𝑙𝑎𝑛𝑒

1

−1

−1

1

𝜔 𝑇

Case-2: Imaginary pole in s-plane

Page 26: Digital control systems (dcs) lecture 18-19-20

26

Conformal Mapping between s-plane to z-plane

When

∠ 𝑧=𝜔𝑇|𝑧|=𝑒𝜎𝑇

|𝑧|=𝑒0𝑇=1∠ 𝑧=−𝜔𝑇

𝑠=− 𝑗 𝜔

𝑠−𝑝𝑙𝑎𝑛𝑒 𝑧−𝑝𝑙𝑎𝑛𝑒

1

−1

−1

1

−𝜔𝑇

Case-2: Imaginary pole in s-plane

Page 27: Digital control systems (dcs) lecture 18-19-20

27

Conformal Mapping between s-plane to z-plane

When

∠ 𝑧=𝜔𝑇|𝑧|=𝑒𝜎𝑇

|𝑧|=𝑒0𝑇=1∠ 𝑧=± 𝜋

− 𝑗 𝜔𝑇

𝑠−𝑝𝑙𝑎𝑛𝑒 𝑧−𝑝𝑙𝑎𝑛𝑒

1

−1

−1

1

𝜋

𝝎𝑻=𝝅

𝑗 𝜔𝑇

Case-2: Imaginary pole in s-plane

Page 28: Digital control systems (dcs) lecture 18-19-20

28

Conformal Mapping between s-plane to z-plane• Anything in the Alias/Overlay region in the S-Plane will be

overlaid on the Z-Plane along with the contents of the strip between .

Page 29: Digital control systems (dcs) lecture 18-19-20

29

Conformal Mapping between s-plane to z-plane• In order to avoid aliasing, there must be nothing in this region, i.e. there

must be no signals present with radian frequencies higher than w p/T, or cyclic frequencies higher than f = 1/2T.

• Stated another way, the sampling frequency must be at least twice the highest frequency present (Nyquist rate).

Page 30: Digital control systems (dcs) lecture 18-19-20

30

Conformal Mapping between s-plane to z-plane

∠ 𝑧=𝜔𝑇|𝑧|=𝑒𝜎𝑇

|𝑧|=𝑒𝜎𝑇

∠ 𝑧=±𝜔 𝑇

𝑠−𝑝𝑙𝑎𝑛𝑒 𝑧−𝑝𝑙𝑎𝑛𝑒

1

−1

−1

1

Case-3: Complex pole in s-plane

Page 31: Digital control systems (dcs) lecture 18-19-20

31

Mapping regions of the s-plane onto the z-plane

Page 32: Digital control systems (dcs) lecture 18-19-20

32

Mapping regions of the s-plane onto the z-plane

Page 33: Digital control systems (dcs) lecture 18-19-20

33

Mapping regions of the s-plane onto the z-plane

Page 34: Digital control systems (dcs) lecture 18-19-20

34

Page 35: Digital control systems (dcs) lecture 18-19-20

35

Page 36: Digital control systems (dcs) lecture 18-19-20

36

Example-3

• Map following s-plane poles onto z-plane assume (T=1). Also comment on the nature of step response in each case.

Page 37: Digital control systems (dcs) lecture 18-19-20

37

z-Transforms of Standard Discrete-Time Signals

• The following identities are used repeatedly to derive several important results.

∑𝑘=0

𝑛

𝑎𝑘=1−𝑎𝑛+1

1−𝑎 ,𝑎≠1

∑𝑘=0

𝑎𝑘= 11−𝑎 ,|𝑎|≠1

Page 38: Digital control systems (dcs) lecture 18-19-20

38

z-Transforms of Standard Discrete-Time Signals

• Unit Impulse

• Z-transform of the signal

𝛿 (𝑘 )={1 ,0 ,𝑘=0𝑘≠0

𝛿 ( 𝑧 )=1

Page 39: Digital control systems (dcs) lecture 18-19-20

39

z-Transforms of Standard Discrete-Time Signals

• Sampled Step

• or

• Z-transform of the signal

𝑢 (𝑘 )={1 ,0 ,𝑘≥0𝑘<0

𝑈 (𝑧 )=1+ 𝑧−1+𝑧−2+𝑧−3+…+𝑧−𝑘=∑𝑘=0

𝑛

𝑧−𝑘

𝑢 (𝑘 )= {1,1 ,1,1,… }

𝑈 (𝑧 )= 11−𝑧− 1=

𝑧𝑧−1

Page 40: Digital control systems (dcs) lecture 18-19-20

40

z-Transforms of Standard Discrete-Time Signals

• Sampled Ramp

• Z-transform of the signal

𝑟 (𝑘 )={𝑘 ,0 ,𝑘≥0𝑘<0

𝑈 (𝑧 )= 𝑧( 𝑧−1 )2

𝑟 (𝑘 )

𝑘0 1 2 3

……

Page 41: Digital control systems (dcs) lecture 18-19-20

41

z-Transforms of Standard Discrete-Time Signals

• Sampled Parabolic Signal

• Then

𝑢 (𝑘 )={𝑎𝑘 ,0 ,

𝑘≥0𝑘<0

𝑈 (𝑧 )=1+𝑎𝑧−1+𝑎2 𝑧− 2+𝑎3 𝑧−3+…+𝑎𝑘 𝑧−𝑘=∑𝑘=0

𝑛

(𝑎𝑧 )−𝑘

𝑈 (𝑧 )= 11−𝑎𝑧−1=

𝑧𝑧−𝑎

Page 42: Digital control systems (dcs) lecture 18-19-20

42

Exercise

• Find the z-transform of following causal sequences.

𝑓 (𝑘 )=2×1 (𝑘 )+4×𝛿 (𝑘 ) ,𝑘=0,1,2 ,…

𝑓 (𝑘 )={ 4 ,𝑘=2,3 ,…0 , h𝑜𝑡 𝑒𝑟𝑤𝑖𝑠𝑒

Page 43: Digital control systems (dcs) lecture 18-19-20

43

Exercise

• Find the z-transform of following causal sequences.

𝑓 (𝑘 )=2×1 (𝑘 )+4×𝛿 (𝑘 ) ,𝑘=0,1,2 ,…

Solution: Using Linearity Property

𝐹 ( 𝑧 )=𝒵 {2×1 (𝑘 )+4×𝛿 (𝑘 ) }

𝐹 ( 𝑧 )=2×𝒵 {1 (𝑘 ) }+4×𝒵 {𝛿 (𝑘) }

𝐹 (𝑧 )=2× 𝑧𝑧−1 +4

𝐹 ( 𝑧 )=6 𝑧−4𝑧−1

Page 44: Digital control systems (dcs) lecture 18-19-20

44

Exercise• Find the z-transform of following causal sequences.

𝑓 (𝑘 )={ 4 ,𝑘=2,3 ,…0 , h𝑜𝑡 𝑒𝑟𝑤𝑖𝑠𝑒

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

𝐹 ( 𝑧 )=𝒵 {4×1 (𝑘−2 ) }

𝐹 ( 𝑧 )=4 𝑧−2𝒵 {1 (𝑘−2 ) }

𝐹 ( 𝑧 )=4 𝑧−2 𝑧𝑧−1=

4𝑧 (𝑧−1)

Page 45: Digital control systems (dcs) lecture 18-19-20

45

Inverse Z-transform

1. Long Division: We first use long division to obtain as many terms as desired of the z-transform expansion.

2. Partial Fraction: This method is almost identical to that used in inverting Laplace transforms. However, because most z-functions have the term z in their numerator, it is often convenient to expand F(z)/z rather than F(z).

Page 46: Digital control systems (dcs) lecture 18-19-20

46

Inverse Z-transform

• Example-4: Obtain the inverse z-transform of the function

• Solution• 1. Long Division

𝐹 ( 𝑧 )= 𝑧+1𝑧2+0.2𝑧+0.1

Page 47: Digital control systems (dcs) lecture 18-19-20

47

Inverse Z-transform• 1. Long Division

• Thus

• Inverse z-transform

𝐹 ( 𝑧 )= 𝑧+1𝑧2+0.2𝑧+0.1

𝐹 ( 𝑧 )=0+𝑧− 1+0.8 𝑧− 2−0.26 𝑧− 3+…

𝑓 (𝑘 )= {0 ,1 ,0.8 ,−0.26 ,…   }

Page 48: Digital control systems (dcs) lecture 18-19-20

48

Inverse Z-transform

• Example-5: Obtain the inverse z-transform of the function

• Solution• 2. Partial Fractions

𝐹 ( 𝑧 )= 𝑧+1𝑧2+0.3𝑧+0.02

𝐹 ( 𝑧 )𝑧 = 𝑧+1

𝑧( 𝑧2+0.3 𝑧+0.02)

𝐹 ( 𝑧 )𝑧 = 𝑧+1

𝑧( 𝑧2+0.1 𝑧+0.2𝑧+0.02)

Page 49: Digital control systems (dcs) lecture 18-19-20

49

Inverse Z-transform𝐹 ( 𝑧 )

𝑧 = 𝑧+1𝑧 ( 𝑧+0.1)(𝑧+0.2)

𝐹 ( 𝑧 )𝑧 = 𝐴

𝑧 + 𝐵𝑧+0.1

+ 𝐶𝑧+0.2

5002.01

2.01.01)0()(

0

FzzFzA

z

90)2.01.0)(1.0(

11.0)2.0)(1.0(

11)1.0()()1.0(1.01.0

zz zz

zz

zzzFzB

40)1.02.0)(2.0(

12.0)2.0)(1.0(

11)2.0()()2.0(2.02.0

zz zz

zz

zzzFzC

Page 50: Digital control systems (dcs) lecture 18-19-20

50

Inverse Z-transform𝐹 (𝑧 )

𝑧 = 50𝑧 −

90𝑧+0.1

+ 40𝑧+0.2

𝐹 ( 𝑧 )=50− 90 𝑧𝑧+0.1+

40 𝑧𝑧+0.2

• Taking inverse z-transform (using z-transform table)

𝑓 (𝑘 )=50 𝛿 (𝑘 )−90 (−0.1 )𝑘+40 (−0. 2 )𝑘

Page 51: Digital control systems (dcs) lecture 18-19-20

51

Inverse Z-transform

• Example-6: Obtain the inverse z-transform of the function

• Solution• 2. Partial Fractions

𝐹 ( 𝑧 )= 𝑧(𝑧+0.1)(𝑧+0.2)(𝑧+0.3)

Page 52: Digital control systems (dcs) lecture 18-19-20

52

Inverse Z-transform• Example-6: Obtain the inverse z-transform of the

function

• Solution• The most convenient method to obtain the partial fraction expansion

of a function with simple real roots is the method of residues.• The residue of a complex function F(z) at a simple pole zi is given by

• This is the partial fraction coefficient of the ith term of the expansion

𝐹 ( 𝑧 )= 𝑧(𝑧+0.1)(𝑧+0.2)(𝑧+0.3)

𝐴𝑖= (𝑧−𝑧𝑖 ) 𝐹 (𝑧 )|𝑧→𝑧 𝑖

F ( z )=∑𝑖=1

𝑛 𝐴𝑖

𝑧−𝑧 𝑖

Page 53: Digital control systems (dcs) lecture 18-19-20

53

Z-transform solution of Difference Equations

• By a process analogous to Laplace transform solution of differential equations, one can easily solve linear difference equations.

1. The equations are first transformed to the z-domain (i.e., both the right- and left-hand side of the equation are z-transformed) .

2. Then the variable of interest is solved.

3. Finally inverse z-transformed is computed.

Page 54: Digital control systems (dcs) lecture 18-19-20

54

Z-transform solution of Difference Equations

• Example-7: Solve the linear difference equation

• With initial conditions

• 1. Taking z-transform of given equation

• 2. Solve for X(z)

𝑥 (𝑘+2 )− 32 𝑥 (𝑘+1 )+ 1

2 𝑥 (𝑘 )=1(𝑘)

Solution

[𝑧 2 𝑋 (𝑧 )−𝑧2 𝑥 (0 )−𝑧𝑥 (1 ) ]− 32 𝑧𝑋 ( 𝑧 )+ 1

2 𝑋 ( 𝑧 )= 𝑧𝑧−1

[ 𝑧¿¿ 2− 32 𝑧+ 1

2 ]𝑋 (𝑧 )= 𝑧𝑧 −1+𝑧 2+(

52 −

32 ) 𝑧 ¿

Page 55: Digital control systems (dcs) lecture 18-19-20

55

Z-transform solution of Difference Equations

• Then

• 3. Inverse z-transform

[ 𝑧¿¿ 2− 32 𝑧+ 1

2 ]𝑋 ( 𝑧 )= 𝑧𝑧 −1+𝑧 2+(

52 −

32 ) 𝑧 ¿

𝑋 (𝑧 )=𝑧 [1+(𝑧+1)(𝑧−1)]

( 𝑧−1)(𝑧−1)(𝑧−0.5)=

𝑧 3

(𝑧−1 )2(𝑧−0.5)

𝑋 ( 𝑧 )𝑧 =

𝑧 2

( 𝑧−1 )2(𝑧−0.5)=

𝐴( 𝑧−1 )2+

𝐵𝑧−1

+𝐶

𝑧−0.5

𝑋 (𝑧 )= 2𝑧( 𝑧−1 )2

+𝑧

𝑧−0.5

𝑥 (𝑘)=2𝑘+(0.5)𝑘


Recommended