Solution to HW 2 - 國立中興大學 · Solution to HW 2 Problem 1 1.1) Since y k k y y y y y k k[...

9
Solution to HW 2 Problem 1 1.1) Since [] 0, 0, [1] 6, [2] 4, [3] 0, [4] 8, and [ ] 5. 0, yk k y y y y yk k The Z-transform of the sequence [] yk is obtained as 1 2 4 () { [ ]} 0 6 4 0 8 z Yz yk z z 1 2 4 4 8 . 6 z z z When the input is a unit-pulse sequence, its Z-transform is () 1 ] . {[ } Uz k Therefore, the system transfer function is 1 2 4 1 2 4 () 4 8 4 8 . ( 6 1 6 ) Yz z z z z U z z z 1.2) We get from the answer of 1.1) that 1 2 4 () 4 8 () 6 . Yz z z Uz z By taking inverse Z-transform to each term in the equation above and using the time-shifting property, the following difference equation relating [] uk and [] yk is obtained: [] 6[ 1] 4[ 2] 8[ 4]. yk uk uk uk 1.3) Based on the difference equation in 1.2), the output [ ], 1, 2, 3, 4 yk k generated from the input [0] 1.5, [1] 2, [2] 1, [3] 2.5, [4 ,[] 0, 0 ] 0.5, uk k u u u u u can be calculated as [1] 6 [0] 4[1] 8 [ 3] 9, [2] 6 [1] 4 [0] 8 [ 2] 18 y u u u y u u u [3] 6 [2] 4 [1] 8[1] 2, [4] 6 [3] 4 [2] 8 [0] 1. y u u u y u u u The output samples above can also be calculated using the MATLAB code below: >> B=[0 6 4 0 -8]; >> A=[1]; >> u=[1.5 2 -1 2.5 -0.5]; >> y=filter(B,A,u) y = 0 9 18 2 -1

Transcript of Solution to HW 2 - 國立中興大學 · Solution to HW 2 Problem 1 1.1) Since y k k y y y y y k k[...

Solution to HW 2

Problem 1

1.1) Since [ ] 0, 0, [1] 6, [2] 4, [3] 0, [4] 8, and [ ] 5.0,y k k y y y y y k k The Z-transform

of the sequence [ ]y k is obtained as

1 2 4( ) { [ ]} 0 6 4 0 8zY z y k z z

1 2 44 8 .6 z zz

When the input is a unit-pulse sequence, its Z-transform is ( ) 1] .{ [ }U z k Therefore, the

system transfer function is 1 2 4

1 2 4( ) 4 84 8 .

(

6

16

)

Y z z zz z

U

zz

z

1.2) We get from the answer of 1.1) that

1 2 4( ) 4 8 ( )6 .Y z z z U zz

By taking inverse Z-transform to each term in the equation above and using the time-shifting

property, the following difference equation relating [ ]u k and [ ]y k is obtained:

[ ] 6 [ 1] 4 [ 2] 8 [ 4].y k u k u k u k

1.3) Based on the difference equation in 1.2), the output [ ], 1,2,3,4y k k generated from the input

[0] 1.5, [1] 2, [2] 1, [3] 2.5, [4 , [ ] 0, 0] 0.5, u k ku u u u u

can be calculated as

[1] 6 [0] 4 [ 1] 8 [ 3] 9, [2] 6 [1] 4 [0] 8 [ 2] 18y u u u y u u u

[3] 6 [2] 4 [1] 8 [ 1] 2, [4] 6 [3] 4 [2] 8 [0] 1.y u u u y u u u

The output samples above can also be calculated using the MATLAB code below:

>> B=[0 6 4 0 -8];

>> A=[1];

>> u=[1.5 2 -1 2.5 -0.5];

>> y=filter(B,A,u)

y =

0 9 18 2 -1

Problem 2

2.1) From the block diagram, the following input-output relation is obtained: 1( ) ( ) ( )Y z U z z Y z

1( ) ( ) ( )Y z z Y z U z

Taking inverse Z-transform to the above equation yields

[ ] [ 1] [ ]y k y k u k

2.2) Substituting 0,1, ,2,k m in the difference equation obtained in 2.1) yields

[0] [ 1] [0]y y u

[1] [0] [1]y y u

[2] [1] [2]y y u

[ 1] [ 2] [ 1]y m y m u m

[ ] [ 1] [ ]y m y m u m

Summing up the above 1m equations, we get

[ ] [ 1] [0] [1] [ ].y m y u u u m

Since [ ]y k is causal, then [ 1] 0y and we finally show that

[ ] [0] [ 0,1,[ 21] ,],y m u u m mu

2.3) Let [ ]py k and [ ]sy k be, respectively, the unit-pulse response and the unit-step response. Then the

following input-output relations in Z domain can be obtained:

1

{ [ ]} ( )

1{1[ ]} (

( ) (

) )1

)

( )(

p

s

Y z H z

z

k H z

Y k Hz

H zz

From the above two equations, we have

1

( )( )

1s

pY zY z

z

which can be written as the difference equation

[ ] [ 1] [ ].s psy k y k y k

Applying the method in 2.2) to the above equation yields

[ ] [0] [1 0,1,2,] [ ],s p p py m y y y mm

4.1)

4.2)

4.2

5.

5.1)

5.2)

5.3)