Module 4 - Examples

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

MODULE 1: ANALYTICAL TOOLS

EXAMPLES

1. Determine the Z-transform of the following finite-duration signals:


a. x 3 ( n )={ 0 ,0 , 1 , 2, 5 , 7 , 0 ,1 }
¿

b. x 4 ( n )= { 2, 4 , 5 , 7 , 0 ,1 }
¿

SOLUTION

Recall; x ( z )= ∑ x (n) z−n
n=−∞

a. X 3 ( z )=0. z−0 +0. z−1+1. z−2 +2. z−3+ 5. z−4 + 7. z−5 +0. z−6 +1. z −7
¿ z +2 z +5 z + 7 z + z – ROC: entire Z-plane except Z=0.
−2 −3 −4 −5 −7

− ( −2)
b. X 4 ( z ) =2. z +4. z−(−1) +5. z −0 +7. z−1 +0. z−2+1. z−3
¿ 2 z + 4 z+ 5+7 z + z – ROC: entire Z-plane except Z=0∧Z=∞
2 −1 −3

2. Determine the Z-transform and the ROC of the signal:


x ( n )=[ 3 ( 2 ) −4 ( 3 ) ] u ( n )
n n

SOLUTION
x ( n )=3 [ 2 u ( n ) ]−4 [ 3 u(n) ]
n n

x ( n )=3 x 1 ( n )−4 x 2 ( n )
Where:
x 1 ( n )=2n u ( n )
n
x 2 ( n )=3 u ( n )
1
X 1 ( z )= −1
;ROC |z|>2
1−2 z

1
X 2 ( z )= −1
; ROC|z|>3
1−3 z

∴ X ( z ) =3 X 1 ( z )−4 X 2 ( z )

X ( z )=3
[ 1
1−2 z
−1
−4
1
] [
1−3 z
−1 ]
3 4
X ( z )= −1
− −1
; ROC |z|>3
1−2 z 1−3 z

3. Determine the Z-transform of the signal:

x ( n )=( cos ωo n ) u(n)

SOLUTION
Using Euler’s identity, the signal x ( n ) can be expressed as:
1 jω n 1 − jω n
x ( n )=( cos ωo n ) u ( n ) = e u ( n )+ e u (n)
o o

2 2
1 1
∴ X ( z ) = Z {e u(n) }+ Z { e u (n) }
jω n o −jω n o

2 2

Set α =e ± j ω (|α|=e± j ω )
o o

j ωo n 1
∴e u (n) Z − j ωo −1
; ROC :|Z|> 1
↔ 1−e z

− j ωo n 1
e u ( n) Z − j ω o −1
; ROC :|z|> 1
↔ 1−e z

1 1 1 1
X ( z )= . + . ; ROC :|z|>1
2 1−e− j ω −1
z 2 1−e− j ω −1
o
z o

X ( z )=
1
[
2 1−e
1
− j ω −1
z
+
1−e
1
− j ω −1
o
z o ]
X ( z )=
1
[
1
2 1−e z
j ω −1
+
1−e
o
1
− j ω −1
z o ]

[ ]
− j ωo −1 j ωo −1
1 1−e z +1−e z
X ( z )= j ω −1 − j ω −1 jω −jω −1 −1
2 1−e z −e o
z +e .e .z .z
o o o

[ ]
− j w o −1 j ωo −1
1 1−e z +1−e z
X ( z )=
2 1−z ( e + e j ω ) +e j ω − j ω z−1
−1 −jω o o o o

[ ]
1
2−z−1 . ( e− j ω + e j ω ) × 2
o o

1 2
X ( z )=
2 −1 1
1−z . ( e +e ) ×2+ z
−jω jω o −2 o

[ ]
−1
1 2−2 z cos ω o
X ( z )=
2 1−2 z−1 cos ωo + z −2

[ ]
−1
1 2(1−z cos ω o)
X ( z )=
2 1−2 z−1 cos ωo + z −2

1−z −1 cos ω 0
X ( z )= ; ROC |z|>1
1−2 z−1 cos ωo + z −2

4. Determine the system function and the unit sample response of the system described by
the difference equation:
1
y ( n )= y ( n−1 )+ 2 x ( n )
2

1
Y ( z )= Y ( z ) . Z−1 +2. X ( z )
2

1 −1
Y ( z )− .Y ( z ) . z =2. X ( z )
2
Y ( z) 2 1
∴ H ( z )= = ; ROC :|z|>
X (z) 1 −1 2
1− z
2

h ( n ) =2 ()
1 n ( )
2
u n −unit sample response of the system

5. Determine the inverse Z-transform of:

1
X ( z )=
1−1.5 z +0.5 z−2
−1

If

a. ROC:|z|>1
b. ROC:|z|<0.5
c. ROC:0.5<| z|< 1

SOLUTION

a. Remove all negative powers by multiplying the numerator and denominator by the
highest power of the denominator ( z 2 ¿ :

2
z
X ( z )= 2
z −1.5 z+0.5

b. Divide both sides by z :

X (z) z
2
1
= 2 ×
z z −1.5 z+ 0.5 z

X ( z) z
= 2
z z −1.5 z+ 0.5

X (z) z
=
z ( z−1 ) ( z−0.5 )
c. Determine the poles by equating the denominator:
z−1=0 ; z−0.5=0

∴ poles are at z =1; z=0.5

d. Simplify the partial fraction to determine the values of A and B:

x(z) A B z
= + =
z ( z−1 ) ( z −0.5 ) ( z −1 )( z−0.5 )

¿ A ( z−0.5 ) + B ( z−1 )=z

Az−0.5 A +Bz−B=z

Equating coefficients of z :
A+ B=1… … … .(1)

Coefficients of constants:

−0.5 A−B=0 … … …(2)

From Eqn. (1): A=1−B … … … … … … … …(3)

∴ Subst . ( 3 ) into ( 2 ) we have :

−0.5 ( 1−B )−B=0

B=−1

Subst. the value of (B) into Eqn. (3) we have:

∴ A=1−(−1 )=2

X (z) A B 2 1
= + = −
z ( z−1 ) (z−0.5) ( z −1 ) ( z−0.5 )

e. Multiply left and right side of equation by z to get:

X (z) z 1
× z= × z− ×z
z z−1 z−0.5
2z z
X ( z )= −
z−1 z −0.5

f. Divide the numerator and denominator by the highest power of z :

1 1
2 z× z×
z z
X ( z )= −
1 1 1 1
z × −1 × z × −0.5 ×
z z z z

2 1
X ( z )= −
1 0.5
1− 1−
z z

2 1
X ( z )= −1

1−z 1−0.5 z−1

Therefore;

a. When ROC: |z|>1

−1
Recall z { 1
1− p K Z −1
}=( Pk ) u ( n ) if ROC :|z|>|P k|
n

X ( z )=2
( 1
1−z
−1

)(
1
1−0.5 z
−1 )
n n
x ( n )=2 ( 1 ) u ( n ) −( 0.5 ) u(n)

b. When ROC: |z|<0.5

−1
Recall z { 1
1− p K Z −1
}=−( Pk ) u (−n−1 ) if ROC :| z|<|Pk|
n

x ( n )=2− (1 ) u (−n−1 )−[−( 0.5 ) u(−n−1) ]


n n

( n ) =−2 (1 )n u (−n−1 )+ ( 0.5 )n u (−n−1)


c. When ROC: 0.5<| z|< 1

Recall z
−1
{ 1
1− p K Z
−1
}=( Pk ) u ( n ) if ROC :|z|>|P k| and
n

z
−1
{ 1
1− p K Z −1
}
=−( Pk ) u (−n−1 ) if ROC :| z|<|Pk|
n

First case: |z|>0.5

Thus this part of the equation ( 1


1−0.5 z ) n
−1 becomes: ( 0.5 ) u(n)

Second case: |z|<1

Thus this part of the equation becomes: −2 ( 1 )n u (−n−1 )

Bringing both parts of the equation together gives the discrete-time signal:

n n
x ( n )=−2 ( 1 ) u (−n−1 )−( 0.5 ) u( n)

6. Determine the inverse transform of the equation below:

−1
1+ z
X ( z )=
1−z−1 +0.5 z−2

z2 + z
X ( z )= 2
z −z+ 0.5

X ( z) 2
z +z 1
= 2 ×
z z −z +0.5 z

X (z) z +1
= 2
z z −z +0.5

∴ The poles are P1=0.5+ j 0.5; P2 =0.5− j0.5


X (z ) z +1 A B
= 2 = +
z z −z +0.5 z−P1 z−P2

z +1= A ( z−P2 ) + B ( z−P1 )

z +1= Az−A P2+ Bz−B P 1

Equating coefficients of z :

A+ B=1

Equating constants:

− A P2−B P1=1

1+ P2
B=
P2−P1

1+ ( 0.5− j 0.5 )
B=
( 0.5− j 0.5 )−( 0.5+ j 0.5 )

B=0.5+ j 1.5

A=0.5− j1.5

X ( z ) 0.5− j 1.5 0.5+ j1.5


= +
z z−P1 z−P2

( 0.5− j1.5 ) z ( 0.5+ j1.5 ) z


X ( z )= +
z−P 1 z −P 2

Recall,

( )
¿
AK Ak
z−1 −1
+ ¿ −1
=2| A k|r nk cos ( Bn+α k ) u ( n )
1−Pk z 1−Pk z

If ROC is |z|>|P k|=r k

SOLUTION
¿
Ak =A k =0.5− j1.5

P K =P¿k =0.5+ j0.5

Expressing Ak ¿ PK in polar form we have:

(
j tan
−1 b
)
a+ jb=√ a +b . e
2 2 a j ( arg )
=r e

For Ak :a=0.5 , b=−1.5

r =√ 0.52+ (−1.5 ) =1.58=|A k|


2

arg=tan
−1
( ba )=tan ( −1.5
0.5 )
−1

arg=−71.57=α k

Ak in polar form will be:

− j 71.57
Ak =0.5+ j 1.5=1.58 e

For Pk :a=0.5 , b=0.5

r =√ 0.52+ 0.52=0.7071=r k

arg=tan −1 ( 0.5
0.5 )
=45=β k

∴ P k in polar form will be:

j 45
Pk =0.5+ j 0.5=0.7071e

n
¿ 2. ( 1.58 )( 0.7071 ) cos ( 45 n−71.57 ) u ( n )

n
¿ 31.6 ( 0.7071 ) cos ( 45 n−71.57 ) u(n)

STABILITY AND CAUSALITY


1. Determine the step response to the causal system described by the difference
equation:
y ( n )= y ( n−1 )+ x(n)

Check the system’s stability.

SOLUTION
−1
Y ( z )=Y ( z ) z + X ( z )

Y ( z )−Y ( z ) z−1=X (z)

Y ( z ) ( 1−z−1) =X ( z )

Y ( z) 1
H ( z )= =
X ( z ) 1−z−1

∴ Step response Y (z ) to the step function x ( n )=u( n) will be:

Y ( z )=H ( z)∗X (z )

x ( n )=u( n)

1
∴ X ( z) = −1
1−z

∴ Y ( z )=H ( z ) . X ( z )

1 1 1
Y ( z )= −1
. −1
= 2
1−z 1− z ( 1−z −1)

y ( n )=(n+1)u (n)

To get the system’s stability, find the poles of the equation above:

1
Y ( z )=
1−2 z −1 + z −2

Multiply the nominator and denominator by z 2 :


2
Y ( z) z
= 2
z z −2 z +1

Poles=P1=P2=1.

Since the poles are not within the unit circle, the system is unstable.

2. A linear time-invariant system is characterized by the system function.

3−4 z −1
H ( z )=
1−3.5 z −1+1.5 z−2

Specify the ROC of H ( z ) and determine h(n) for the following conditions:
a. The system is stable
b. The system is causal
c. The system is anti-causal

SOLUTION
−1
3−4 z
H ( z )= −1 −1
1−3.5 z +1.5 z

3 z 2−4 z
H ( z )=
z 2−3.5 z +1.5

H (z) 3 z−4 A B
= 2 = +
(z ) z −3.5 z +1.5 z−3 z −0.5

A ( z−0.5 ) + B ( z−3 )=3 z −4

Coefficients of z :

A+ B=3 … … … …(1)

Constant:
−0.5 A−3 B=−4 … … … …(2)

Solve the equation (1) and (2) and get:

A=2; B=1

H (z) 2 1
∴ = −
z z−3 z−0.5

2z z
H ( z )= −
z −3 z −0.5

2 1
H ( z )= −1
+ −1
1−3 z 1−0.5 z

1 1
H ( z )=2. −1
+
1−3 z 1−0.5 z −1
a. The system is stable:
3 z−1 <1; 0.5 z−1 <1
3 0.5
<1 ; <1
z z
3< z ; 0.5< z
z <3 ; z> 0.5

For the system to be stable: 0.5< z <3


For; z <3 :
−2 ( 3 )n u (−n−1)

For; z <0.5 :

( 0.5 )n u ( n )

∴ The impulse response for a stable system will be:

n n
h ( n ) =−2 (3 ) u (−n−1 ) + ( 0.5 ) u(n)

b. For the system to be causal: z >3

n n
∴ 2 ( 3 ) u ( n ) + ( 0.5 ) u(n)
c. The system is anti-causal when: z <0.5 .

n n
∴−2 ( 3 ) u (−n−1 ) −( 0.5 ) u(−n−1)

SOLUTION OF DIFFERENCE EQUATIONS USING Z-TRANSFORM

Steps:

1. Find the Z-transform of the difference equation


2. Slot in the initial conditions
3. Solve the difference equation in the Z-domain
4. Get the answer in the discrete-time domain by finding the inverse Z-transform of the
solution in the Z-domain.

Example

A digital signal processing system is described by the difference equation:


n
y ( n )−0.5 y ( n−1 )=5 ( 0.2 ) u (n)

a) Determine the solution when the initial condition is given by y (−1 )=1

SOLUTION
n
y ( n )−0.5 y ( n−1 )=5 ( 0.2 ) u ( n )

z
Y ( z )−0.5 ( y (−1 )+ Z Y ( z ) ) =5.
−1
z−0.2

Initial condition: y (−1 )=1

5z
∴ Y ( z )−0.5 ( 1+Y ( z ) z )=
−1
z−0.2

−1 5z
Y ( z )−0.5−0.5 z Y ( z )=
z −0.2

5z 0.5
Y ( z )−0.5 z−1 Y ( z )= +
z−0.2 1
5 z +0.5(z −0.2)
Y ( z ) ( 1−0.5 z −1) =
(z−0.2)

5 z +0.5 z−0.1
Y ( z )= −1
( z−0.2)(1−0.5 z )

5 z +0.5 z−0.1
Y ( z )= −1
z −0.5−0.2+ 0.1 z

5.5 z−0.1
Y ( z )= −1
z −0.7+0.1 z

Multiply the numerator and denominator by z :

5.5 z 2−0.1 z
Y ( z )=
z 2−0.7 z+ 0.1

Y ( z ) 5.5 z 2−0.1 z 1
= 2 ×
z z −0.7 z+ 0.1 z

Y ( z) 5.5 z−0.1
= 2 (1)
z z −0.7 z+ 0.1

Solving the partial fraction on the right

5.5 z−0.1 5.5 z−0.1 A B


= = +
z −0.7 z+ 0.1 ( z−0.5)(z−0.2) z −0.5 z−0.2
2

5.5 z−0.1 A B
= +
( z−0.5)( z−0.2) z−0.5 z −0.2

Using cover-up rule:

5.5 z−0.1
A= with z=0.5
(z−0.2)

5.5 ( 0.5 )−0.1


=8.8333
(0.5−0.2)

5.5 z−0.1
B= with z=0.2
(z−0.5)

5.5 ( 0.2 )−0.1


=−3.333
( 0.2−0.5)
A B 8.8333 3.333
+ = −
z−0.5 z−0.2 z−0.5 z−0.2

Return solved partial fraction to equation (1)

Y ( z) 8.8333 3.333
= −
z z−0.5 z−0.2

8.8333 z 3.333 z
Y ( z )= −
z−0.5 z−0.2

Y ( z )=8.333 ( z−0.5
z
)−3.333 ( z−0.2
z
)
−1 n n
Z ( Y ( z ) )= y ( n ) =8.833 ( 0.5 ) u ( n )−3.333 ( 0.2 ) u( n)

Example:

A relaxed (zero initial conditions) DSP system is described by the difference equation:

y ( n ) +0.1 y ( n−1 )−0.2 y ( n−2 )=x ( n )+ x(n−1)

a) Determine the impulse response y (n) due to the impulse sequence x ( n )=δ (n).
b) Determine system response y (n) due to the unit step function excitation, where u ( n )=1
for n ≥ 0.

SOLUTION
y ( n ) +0.1 y ( n−1 )−0.2 y ( n−2 )=x ( n )+ x ( n−1 )
Y ( z )+ 0.1 ( z Y ( z ) )−0.2 ( z Y ( z ) ) =X ( z )+ z X (z )
−1 −2 −1

Y ( z ) ( 1+0.1 z −0.2 z )= X (z)(1+ z )


−1 −2 −1

When x ( n )=δ (n)


X ( z )=Z ( x ( n ) )=1
∴ Y ( z ) ( 1+0.1 z −0.2 z ) =( 1+ z )
−1 −2 −1
−1
1+ z
Y ( z )= −1 −2
1+ 0.1 z −0.2 z
z2 + z
Y ( z )= 2
z +0.1 z−0.2
Y ( z) z2 + z 1
= 2 ×
z z + 0.1 z−0.2 z
Y (z) z+1
= 2 (1)
z z + 0.1 z−0.2

Solving the partial fraction part of equation (1)

z+1 A B
= +
z +0.1 z−0.2 ( z−0.4 ) ( z +0.5)
2

Using cover-up rule

z +1
A= with z=0.4
z +0.5

0.4+1
A= =1.556
0.4 +0.5

z+1
A= with z=−0.5
z +0.4

−0.5+1
A= =−0.556
−0.5−0.4
Returning the solution of the partial fraction to equation (1) we have:

Y ( z) 1.556 0.556
= −
z z−0.4 z +0.5
1.556 z 0.556 z
Y ( z )= −
z −0.4 z +0.5
Z ( Y ( z ) )= y ( n ) =1.556 ( 0.4 ) u ( n )−0.556 (−0.5 ) u( n)
−1 n n

When x ( n )=u( n)

z
X ( z )=Z ( x ( n ) )=
z−1

∴ Y ( z ) ( 1+0.1 z −1 −0.2 z −2) = ( z−1z ) (1+ z


−1
)
z +1
Y ( z ) ( 1+0.1 z−1−0.2 z−2 )=
z−1

z+1 1
Y ( z )= ×
z −1 1+ 0.1 z −0.2 z −2
−1

z+ 1
Y ( z )= −1 −2
z −0.3 z + 0.2 z −0.9
3 2
z +z
Y ( z )= 3 2
z −0.3 z +0.2−0.9 z

z (z 2+ z )
Y ( z )= 3 2
z −0.9 z −0.3 z +0.2
2
Y ( z) z (z + z) 1
= 3 ×
z z −0.9 z −0.3 z+ 0.2 z
2

2
Y ( z) z +z
= 3 2
z z −0.9 z −0.3 z+ 0.2

Solving the partial fraction to the right of equation (1) we have:

z2 + z A B c
= + +
z −0.9 z −0.3 z+ 0.2 (z−1) (z +0.5) (z−0.4)
3 2

Using cover-up rule:


2
z +z
A= with z=1
( z+ 0.5)( z−0.4)
2
1 +1
A= =2.2222
(1+0.5)(1−0.4)
2
z +z
B= with z=−0.5
( z +1)(z−0.4)
2
(−0.5) +(−0.5)
B= =−0.1852
((−0.5)+1)((−0.5)−0.4)

z 2+ z
C= with z =0.4
(z−1)(z +0.5)
2
0.4 +0.4
C= =−1.0370
(0.4 +1)(0.4+0.5)
Putting the solved partial fraction back in equation (1) we have:

Y ( z) 2.222 0.1852 1.0370


= − −
z ( z−1) ( z +0.5 ) ( z−0.4)

2.222 z 0.1852 z 1.0370 z


Y ( z )= − −
(z−1) ( z+ 0.5 ) (z−0.4)

Z−1 ( Y ( z ) )= y ( n ) =2.222u ( n ) −0.1852 (−0.5 )n u ( n )−1.0370 ( 0.4 )n u(n)

You might also like