Вы находитесь на странице: 1из 14

EL6113

Hwk #3

1) A causal discrete-time system is described by the difference equation,


y ( n) x(n) 3 x( n 1) 2 x( n 4)

a) What is the transfer function of the system?


Y ( z ) X ( z ) 3 z 1 X ( z ) 2 z 4 X ( z )

Y ( z ) 1 3 z 1 2 z 4 X ( z )
H ( z) 1 3z

2z

b) Sketch the impulse response of the system


h(n) (n) 3 ( n 1) 2 (n 4)

2) A causal discrete-time LTI system is implemented using the difference equation


y ( n) 0.5 y ( n 1) x( n) x (n 1)

where x (n) is the input signal, and y (n) the output signal. Find and sketch the
impulse response of the system.

1 0.5 z 1 Y ( z ) 1 z 1 X ( z)
H ( z)

1 z 1
1 0.5 z

z 1
z 1/ 2

c
c2
H ( z)
z 1

1
z
z ( z 1 / 2)
z z 1/ 2
c1

z 1
2
z 1/ 2 z 0

c2

z 1
3
z z 1 / 2

H ( z ) 2

3z
z 1/ 2

Assuming the system is causal, we get


1
h( n) 2 ( n) 3

U (n)

3) Given two discrete-time LTI systems described by the difference equations


H1 ( z ) :

H 2 (z) :

r (n)

1
r (n 1) x( n) 2 x (n 1)
3

y ( n)

1
y (n 1) r ( n) 2 r ( n 1)
3

let H (z ) be the cascade of H1 ( z ) and H 2 ( z ) in series.


a) Find the difference equation of the total system, H (z ) .

1 2 z 1
z2
H1 ( z )

1
z 1
1 1 z
3
3
H 2 ( z)

1 2 z 1
z2

1 1 z 1 z 13
3

H ( z ) H1 ( z ) H 2 ( z )

( z 2)( z 2)

z 13 2

z2 4
1
z2 2 z
3
9

H ( z)

1 4 z 2
1
1 2 z 1 z 2
3
9

y ( n) 2

y ( n 1)

1
y ( n 2) x (n) 4 x (n 2)
9

b) Suppose H1 ( z ) and H 2 ( z ) are causal systems. Is H (z ) causal? Is H (z )


stable?
Yes, the system is causal, and the system is stable.

4) Consider a causal discrete-time LTI system described by the difference equation


y ( n)

5
1
2
y (n 1) y ( n 2) 2 x( n) x (n 1)
6
6
3

a) Find the transfer function H (z ) .

2 2 z 1
2 z2 2 z
3
3
H ( z)

2
2
1 5 z 1 z
z 5 z 1
6
6
6
6

b) Find the impulse response, h(n) . You may use MATLAB to do the partial fraction
expansion. The MATLAB Command is residue. Make a STEM plot of h(n) in
MATLAB

2z 2
2 z 1 2 z 2
H ( z)
3
3

1
z
z 5 z 1 1 5 z 1 z 2
6
6
6
6

>> [r,p,k]=residue([0 2 2/3],[1 -5/6 1/6])


r=

10.0000
-8.0000
p=
0.5000
0.3333
k=[]
So

H ( z)
10
8

z
z 1
z 1
2
3
H ( z)

10 z
8z

z1
z 1
2
3

n
n
h( n) 10 1 U (n) 8 1 U (n)
2
3

>> n = -5:10 ;
>> U = n>=0 ;
>> h = 10*(1/2).^n .*U - 8*(1/3).^n .*U;
>> stem(n,h,'.')
>> title('h(n)=10*(1/2)^n U(n) - 8*(1/3)^n U(n)');
>> xlabel('n')

h(n)=10*(1/2)n U(n) - 8*(1/3)n U(n)

2.5

1.5

0.5

0
-5

c)
Plot the magnitude of the frequency response
MATLAB function freqz.

10

H (e j )

of the system. Use the

>> b = [0 2 2/3];
>> a = [1 -5/6 1/6];
>> [H,w] = freqz(b,a);
>> plot(w/pi,abs(H))
>> title('|H(exp(j \omega)|');
>> xlabel('\omega/\pi');
|H(exp(j )|

8
7
6
5
4
3
2

5) The impulse response of an LTI system is


1
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

h ( n)

2
cos
n U ( n) .
3

Find a difference equation that implements this system.


1

h( n )

j
n
n
j
1
3
3
U (n) 1 e
U ( n)
e
2

2
2

n j
n j
n
n
1 1
1

3
3

h( n)
e
U ( n)
e
U (n)

2 2
2

h( n )

1
2

1 j 3
e

1 j 3
U ( n)
e

U ( n)

we can rewrite this as


h( n)

1 n
a U (n) (a*) n U (n)
2

where
2

1 j 3
e
2

then,

1 z z 1 2z 2Re{a}z
H z)(
2 z a z a* 2 z2 2Re{a}z a 2
now, Re{a} 1 2 cos(2 / 3) 1 and a 1 , so we get
4
2

2 1
z2 1 z
1 2z 2z
4
H ( z)

2 z2 1 z 1
z2 1 z 1
2
4
2
4

1 1 z 1
4
H ( z)

1
1 1 z 1 z 2
2
4
so, finally

y (n) 1 y (n 1) 1 y ( n 2) x( n) 1 x(n 1)
2
4
4
or,

y (n) x(n) 1 x(n 1) 1 y (n 1) 1 y (n 2)


4
2
4

6) Consider a causal discrete-time LTI system described by the difference equation


y ( n ) x ( n)

1
1
5
x( n 1) y (n 1) y ( n 2)
2
2
8

a) Sketch the Pole/Zero diagram for the system.

1 1 z 1
z2 1 z
z( z 1 )
2
2
2
H ( z)

2
2
2
1 1 z 58 z
z 1 z 58 z 1 z 58
2
2
2
z( z 1 )
2
H ( z)
( z p )( z p*)
where

p 1 j 3 0.79 e j 1.25
4
4
so the zeros are z 0 and z 1 / 2 .

b) Find and sketch the impulse response, h(n) .

(z 1 )
c
c
H ( z)
2

1 2
z
( z p)( z p*) z p z p *

p 1 1 j3
c1 2 2 4 4 1 j 1 0.527 e j 0.32 .
2 6
z p*
p p*
j3
2
z p
z1

z 1

c2 2
z p

z p*

p* 1

2 c * 1 j 1
1 2
6
p*p

so,

c1 z
c1 z
H ( z)

z p z p*
h( n) c1 p n U ( n) c1 ( p*) n U ( n)

recall that
p 0.79 e j 1.25
c1 0.527 e j 0.32

so that
h( n) 0.527 e j 0.32 0.79 n e j 1.25 n U ( n) 0.527 e j 0.32 0.79 n e j 1.25 n U ( n)

h( n) 0.527 (0.79) n e j (1.25 n 0.32) U ( n) 0.527 (0.79) n e j (1.25 n 0.32) U (n)

Since the first and second terms are conjugates, the result is twice the real part of
the first term.
h(n ) 1.054 (0.79) n cos(1.25 n 0.32) U (n)

See below for the sketches


c) Use Matlab to verify your answers to (a) and (b). Use the commands residue and
zplane. Use the command filter to compute the impulse response numerically and
verify that it is the same as your formula in (b).

1
0.8
0.6

Imaginary Part

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

-0.5

0
Real Part

0.5

h(n)

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

10

15

20

25

7) An LTI system has zeros at z1 1 / 3 and z 2 3 , and a double pole at z 0 .


a) If the DC gain is to be 1.0, find H (z ) .

z 1 z 3
3
H ( z) K
z2

DC gain is

1 1 1 3
3
K
4
(1)

K 1

so K 3 , and

H ( z) 3

z 13 z 3

z2

b) Find the impulse response of the stable inverse system, G (z ) .

G( z) 4

z2
3 z 1 z 3
3

G( z)
z
4
3 z 1 z 3
z
3

c
c
G( z)
z
4
1 2
3 z 1 z 3 z 1 z 3
z
3
3

c1 4

z
(1 / 3)
4
1
3 z 3
3 1 / 3 3
6
z 1 / 3

c2 4

z
3 z 1

3 z 3

3
3 3 1

so

G( z)

1 z
3 z

6 z 1
2 z 3
3

for stability, the ROC should be 1 / 3

g ( n) 1

z 3,

and

1 U (n) 3 2 (3) U (n 1)
6 3
n

8) A causal system has the transfer function H ( z )


where

p 0.9 e

z 1
( z p )( z p*)

a) Use the freqz command in MATLAB to plot the frequency response magnitude
and phase functions.

|H(exp(j)|

14
12
10
8
6
4
2
0
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

0.7

0.8

0.9

()=angle(H())

4
3
2
1
0
-1
-2
-3
-4

0.1

0.2

0.3

0.4

0.5

/pi

0.6

b) If the input is x ( n) 2 cos (0.3 n 0.1) , what is the output, y (n) ?


from the graphs we see that

H e j 0.3 0.7 e j 3 ,

or, in other words

A(0.3 ) 0.7 and (0.3 ) 3 , so the system multiplies that amplitude


by about 0.7, and shifts the phase by about -3. Therefore,

y (n) 0.7 * 2 cos (0.3 n 0.1 3) 1.4 cos(0.3n 2.9)

9) The posted file pz_implse shows a set of 8 pole/zero diagrams, and a set of 8
impulse responses. Try to match the pole/zero diagrams to the correct impulse
responses. Do not use MATLAB, just use basic reasoning.

Solution:
Pole Zero Diagram
1
2
3
4
5
6
7
8

Impulse Response
6
1
7
5
2
8
3
4

Вам также может понравиться