DT systems and Difference Equations Monday March 22, 2010

21
1 DT systems and Difference Equations Monday March 22, 2010 Linear Constant-Coefficient Difference Equations Impulse Response Impulse and Step Responses • Stability Responses of LTI systems to complex exponentials

description

DT systems and Difference Equations Monday March 22, 2010. Linear Constant-Coefficient Difference Equations Impulse Response Impulse and Step Responses Stability Responses of LTI systems to complex exponentials. Eigenfunctions of LTI Systems. - PowerPoint PPT Presentation

Transcript of DT systems and Difference Equations Monday March 22, 2010

Page 1: DT systems and Difference Equations Monday March 22, 2010

1

DT systems and Difference Equations

Monday March 22, 2010• Linear Constant-Coefficient Difference

Equations• Impulse Response • Impulse and Step Responses• Stability• Responses of LTI systems to complex

exponentials

Page 2: DT systems and Difference Equations Monday March 22, 2010

2

Eigenfunctions of LTI Systems

• The eigenfunction of an LTI system is the complex exponential function that satisfies the LTI equations

• The eigenvalues are either real or, if complex, occur in complex conjugate pairs

• Any LTI system excited by a complex sinusoid responds with another complex sinusoid of the same frequency, but generally a different amplitude and phase

• All these statements are true of both CT and DT systems

Page 3: DT systems and Difference Equations Monday March 22, 2010

3

Difference Equations

][]1[][

][]1[]1[][

10

110

Mnxbnxbnxb

NnyaNnyanyanya

M

NN

M

kk

N

kk knxbknya

00

][][ ][][][ nynyny ph

0][0

N

khk knya

M

kk

N

kpk knxbknya

00

][][

N

kk

M

kk knyaknxb

any

100

][][1

][

Need for initial conditions y[-N], y[-N+1], , y[-1] to evaluate y[n]

Page 4: DT systems and Difference Equations Monday March 22, 2010

4

The "z" Operator

y[n+1] = zy[n]; y[n-1] = z-1y[n]

][

][1

11

10

11

110

nxzbzbzbb

nyzazazaaM

MM

M

NN

NN

)(11

110 zDzazazaa N

NN

N

)(11

110 zNzbzbzbb M

MM

M

][

)(

)(][ nx

zD

zNny

Page 5: DT systems and Difference Equations Monday March 22, 2010

5

Roots of Characteristic Eq.•D(z) is the characteristic polynomial of the system. Its roots are used in obtaining the homogeneous solution (hence the impulse response) of the system.

•The roots can be real or complex.

•Roots might be distinct or repeated roots.

•A non-repeating root (z1) will contribute to the solution by a (z1)n

function.

•Repeated roots also contribute by similar functions, but having “n” as multiplier for repetitions.

•For a system that was initially at rest, H(z) = N(z)/D(z) is defined as the transfer function of the system (z transform of the impulse response h[n])

Page 6: DT systems and Difference Equations Monday March 22, 2010

6

Complex Roots

Complex roots are expressed in polar form as ±j = re±j and

the corresponding solution is defined as rncos(n).

Repeated conjugate roots will produce same functions with a

multiplier “n” added for every repetition

Page 7: DT systems and Difference Equations Monday March 22, 2010

7

The Impulse Response

The impulse response of the system can easily found using the

homogenous solution and taking the input as x[n] = [n]

The impulse response is conventionally designated by the

symbol, h[n].

Page 8: DT systems and Difference Equations Monday March 22, 2010

8

System type

Input Output

Step to impulse

Impulse to step

Step to impulse

Impulse to step

Continuous-time

Discrete-time

Derivation of Impulse and Step Responses from Each Other

dttdut )()(

t

dtu )()(dt

tdgth )()(

t

dhtg )()(

]1[][][ nunun

n

k

knu ][][ ]1[][][ ngngnh

n

k

khng ][][

Page 9: DT systems and Difference Equations Monday March 22, 2010

9

Stability and Impulse Response

It can be shown that a BIBO-stable DT system has animpulse response that is absolutely summable. That is,

is finite.

h n n

Page 10: DT systems and Difference Equations Monday March 22, 2010

10

Stability

The bounded-input bounded-output (BIBO) stability of the system requires

n

nh ][

This condition is satisfied only of the roots of the characteristic polynomial remains within a unit circle as illustrated in Figure.

Roots on the circle itself are stable provided that the system is not disturbed at one of its natural modes (i.e. the input doesn't have one of the functions forming the impulse response).

z-plane

Real axis

Imaginary axis

Stable Region

Marginal stability

1 -1

-j

j

Page 11: DT systems and Difference Equations Monday March 22, 2010

11

The Frequency Response Function

If the input is defined as x[n] = Xmejn , then y[n] can be found as

yjjnm

eHjxjtjnm

j

xjjnm

jxjjnmez

eYeXeH

eXeHeXzHnyj

j

)()(

)()(][

)()()( jeHjjj eeHeH

is called the frequency response function of the discrete-time system.

Page 12: DT systems and Difference Equations Monday March 22, 2010

12

Example – 1

Find the complete solution of the system represented by

4y[n] – 4y[n-1] + y[n-2] = 2x[n] – x[n-1]

for x[n] = u[n] assuming that the system is at initial rest

(i.e. y[-1] = y[-2] = 0)

D(z) = 4 – 4z-1 + z-2 = 0, multiplying both sides by

z2: 4z2 – 4z + 1 = 0 yields z1,2 = 1/2.

Hence the homogeneous solution is

][2

1

2

1][ 21 nunccny

nn

h

>> roots([4 -4 1])

ans =

0.5000 0.5000

Page 13: DT systems and Difference Equations Monday March 22, 2010

13

Particular and complete solutions for example-1

The input is x[n] = u[n] = (1)nu[n]. The particular solution is

][][44

2][

1

21

1

nunuzz

zny

z

p

Complete solution ][12

1

2

1][ 21 nunccny

nn

4y[n] – 4y[n-1] + y[n-2] = 2x[n] – x[n-1]

D(z) = 4 – 4z-1 + z-2 and N(z) = 2 – z-1

Page 14: DT systems and Difference Equations Monday March 22, 2010

14

Coefficients for Example-1

Coefficients c1 and c2 must be evaluated using initial conditions

y[-1] = y[-2] = 0

The equation can be rewritten as

4y[n] = 2x[n] – x[n-1] + 4y[n-1] - y[n-2]

4y[0] = 2x[0] – x[-1] + 4y[-1] - y[-2] = 2 y[0] = 1/2

4y[1] = 2x[1] – x[0] + 4y[0] - y[-1] = 2 – 1 + 2 = 3 y[1] = 3/4

][12

1

2

1][ 21 nunccny

nn

0 0 0

0

y[0] = c1 + 1 = 1/2 c1 = -1/2][12

10

2

1]0[

0

2

0

1 nuccy

y[1] = c1(1/2) + c2(1/2) + 1 = -1/4 + 1 +c2(1/2) = 3/4 c2 = 0

Therefore y[n] = {-(1/2)(1/2)n + 1}u[n]

Page 15: DT systems and Difference Equations Monday March 22, 2010

15

Example –2 Find the impulse response of the system in example -1

4y[n] – 4y[n-1] + y[n-2] = 2x[n] – x[n-1]; original equation

4h[n] = 2[n] – [n-1] + 4h[n-1] - h[n-2]; reorganized for h[n]

h[n] = {c1(1/2)n + c2n(1/2)n}u[n]; homogeneous solution in exp1

The first impulse is applied at n = 0. Therefore all values of x[n] and h[n] prior to n = 0 are considered as zero.

4h[0] = 2[0] – [0-1] + 4h[0-1] - h[0-2] = 2 h[0] = 1/2 = c1

4h[1] = 2[1] – [1-1] + 4h[1-1] - h[1-2] = -1 + 2 = 1

h[1] = 1/4= (1/2)(1/2) + c2(1/2) c2 = 0 h[n] = (1/2)(1/2)nu[n]

This is an infinite impulse response (IIR) system

Page 16: DT systems and Difference Equations Monday March 22, 2010

16

Complex Exponential ResponseLet a discrete-time LTI system be excited by a complexexponential of the form,

x n zn

The response is the convolution of the excitation with theimpulse response or

y n zm h n m m

zn m h m m

which can be written as

y n zn h m z mm

complexconstant

z transform of h[m]

Page 17: DT systems and Difference Equations Monday March 22, 2010

17

Example – 3 Let a DT system be described by

3y n 2y n 1 y n 2 x n Impulse

n

The eigenfunction is the DT complex exponential,

n

Substituting into the homogeneous difference equation,

3 n 2 n 1 n 2 0

Dividing through by

n 2

3 2 2 10

Solving,

0.333j0.4714

>> roots([3 2 1])

ans =

-0.3333 + 0.4714i -0.3333 - 0.4714i

Page 18: DT systems and Difference Equations Monday March 22, 2010

18

Impulse Response for Example – 3

The homogeneous solution is then of the form,

h n K1 0.333 j0.4714 n K2 0.333 j0.4714 n

The constants can be found be applying initial conditions.For the case of unit impulse excitation at time, n = 0,

3h 0 2h 0 1 0

h 0 2 0

x 0 1 h 0 13

3h 1 2h 1 1 1

3

h 1 2 0

x 1 0 h 1 29

h 0 K1 0.333 j0.4714 0 K2 0.333 j0.4714 0K1 K2 1

3

h 1 K1 0.333 j0.4714 K2 0.333 j0.4714 29

Page 19: DT systems and Difference Equations Monday March 22, 2010

19

K1 0.1665 j0.1181 , K2 0.1665 j0.1181

>> A=[1 1;-0.333+0.4714j -0.333-0.4714j]

A =

1.0000 1.0000 -0.3330 + 0.4714i -0.3330 - 0.4714i

>> B=[1/3;-2/9]

B =

0.3333 -0.2222

>> K=A\B

K =

0.1667 + 0.1180i 0.1667 - 0.1180i

923

1

4714.003331.4714.00333.

11

2

1

K

K

jj

A K B

h 0 K1 0.333 j0.4714 0 K2 0.333 j0.4714 0K1 K2 1

3

h 1 K1 0.333 j0.4714 K2 0.333 j0.4714 29

Page 20: DT systems and Difference Equations Monday March 22, 2010

20

Example – 4

Determine step response of the system in example-2 (h[n] = (1/2)(1/2)nu[n])

][2

1

2

11

2

11

2

11

2

1

2

1

2

1][][

1

0

nukhngn

n

kn

k

n

k

The result is the same as what we obtained in example-1 from direct solution to x[n] = u[n]

1r

1r 1

1

series geometric :Hint1

0 nr

rr

nn

k

k

Page 21: DT systems and Difference Equations Monday March 22, 2010

21

Duties for Wednesday, March 24

• Homework is postponed to Monday March 29

• Study the difference equations from the notes

• Solve the Active Learning Exercises 21, 22 and 25

• Study section 3.5 from the book