Lab 2

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

Determine (using MATLAB) the resulting sequence from the following transforms.

1. 𝑋1 (𝑧) = (1 − 2𝑧 −1 + 3𝑧 −2 − 4𝑧 −3 )(4 + 3𝑧 −1 − 2𝑧 −2 + 𝑧 −3 )
Codes:
x1=[1 -2 3 -4];
x2=[4 3 -2 1];
n1=[0:3];
[X1, N1]= conv_m(x1, n1, x2, n1)

Therefore:
𝑋1 (𝑧) = 4 − 5𝑧 −1 + 4𝑧 −2 − 2𝑧 −3 − 20𝑧 −4 + 11𝑧 −5 − 4𝑧 −6

2. 𝑋2 (𝑧) = (𝑧 2 − 2𝑧 + 3 + 2𝑧 −1 + 𝑧 −2 )(𝑧 3 − 𝑧 −3 )
Codes:
x3=[1 -2 3 2 -2];
n3=[-2:2];
x4=[1 0 0 0 0 0 -1];
n4=[-3:3];
[X2, N2]= conv_m(x3, n3, x4, n4)

Therefore:
𝑋2 (𝑧) = 𝑧 5 − 2𝑧 4 + 3𝑧 3 + 2𝑧 4 − 2𝑧 − 𝑧 −1 + 2𝑧 −2 − 3𝑧 −3 − 2𝑧 −4 + 2𝑧 −5

3. 𝑋3 (𝑧) = (1 + 𝑧 −1 + 𝑧 −2 )3
Codes:
x5=[1 1 1];
x6=[1 1 1];
x7=[1 1 1];
n5=[0:2];
[Y33 N33]= conv_m(x5, n5, x6, n5);
[X3 N3]=conv_m(x7, n5, Y33, N33)
Therefore:
𝑋3 (𝑧) = 1 + 3𝑧 −1 + 6𝑧 −2 + 7𝑧 −3 + 6𝑧 −4 + 3𝑧 −5 + 𝑧 −6

4. 𝑋4 (𝑧) = 𝑋1 (𝑧)𝑋2 (𝑧)𝑋3 (𝑧)


Codes:
[Y44 N44]=conv_m(X1, N1, X2, N2);
[X4 N4]=conv_m(Y44, N44, X3, N3)

Therefore:
𝑋4 (𝑧) = 4𝑧 5 − 𝑧 4 + 11𝑧 3 + 11𝑧 2 + 16𝑧 + 11 − 43𝑧 −1 − 101𝑧 −2 − 250𝑧 −3 − 252𝑧 −4 − 184𝑧 −5
− 18𝑧 −6 + 94𝑧 −7 + 133𝑧 −8 + 247𝑧 −9 + 235𝑧 −10 + 176𝑧 −11 + 7𝑧 −12 − 55𝑧 −13
− 31𝑧 −14 − 8𝑧 −15 + 6𝑧 −16 − 8𝑧 −17

5. 𝑋5 (𝑧) = (𝑧 −1 − 3𝑧 −3 + 2𝑧 −5 + 5𝑧 −7 − 𝑧 −9 )(𝑧 + 3𝑧 2 + 2𝑧 3 + 4𝑧 4 )
Codes:
x8=[0 1 0 -3 0 2 0 5 0 -1];
x9=[4 2 3 1 0];
n8=[0:9];
n9=[-4:0];
[X5 N5]=conv_m(x8, n8, x9, n9)
Therefore:
𝑋5 (𝑧) = 4𝑧 3 + 2𝑧 2 − 9𝑧 − 5 − 𝑧 −1 + 𝑧 −2 + 26𝑧 −3 + 12𝑧 −4 + 11𝑧 −5 + 3𝑧 −6 − 3𝑧 −7 − 𝑧 −8

For the linear time-invariant systems described by the following systems functions, determine the impulse
response, difference equation representation, the pole-zero plot, the output 𝑦[𝑛] if the input is 𝑥[𝑛] =
𝜋𝑛
5𝑐𝑜𝑠 ( ) 𝑢[𝑛] and plot 100 samples of the output.
4
𝑧+1
6. 𝐻(𝑧) = 𝑧−0.5, causal system
1 + 𝑧 −1
𝐻(𝑧) =
1 − 0.5𝑧 −1
b1 = [1,1];
a1 = [1,-0.5];
[R,p,k] = residuez(b1,a1)
figure (1)
[z,p,l] = zplane(b1,a1);

n=[0:99];%100 samples
x=5.*cos(pi.*n/4).*(stepseq(0,0,99));
s=filter(b1,a1,x);
figure (2)
stem(n,s);%plot of the output

3
𝐻(𝑧) = −2 + 1−0.5𝑧−1
Impulse Response: ℎ(𝑛) = −2𝛿(𝑛) + 3(0.5)𝑛 𝑢(𝑛)
Difference Equation Representation: 𝑦(𝑛) = 𝑥(𝑛) + 𝑥(𝑛 − 1) + 0.5𝑦(𝑛 − 1)
Pole-zero plot:

Output y[n]: :
1+𝑧 −1 +𝑧 −2
7. 𝐻(𝑧) = , stable system
1+0.5𝑧 −1 −0.25𝑧 −2
b2 = [1,1,1];
a2 = [1,0.5,-0.25];
[R,p,k] = residuez(b2,a2)
figure (1)
[z,p,l] = zplane(b2,a2);

n=[0:99];%100 samples
x=5.*cos(pi.*n/4).*(stepseq(0,0,99));
s=filter(b2,a2,x);
figure (2)
stem(n,s);%plot of the output
0.9348 4.0652
𝐻(𝑧) = −4 + +
1+0.809𝑧 −1 1−0.309𝑧 −1
Impulse Response: ℎ(𝑛) = −4𝛿(𝑛) + 0.9348(−0.8090)𝑛 𝑢(𝑛) + 4.0652(0.3090)𝑛 𝑢(𝑛)
Difference Equation Representation: 𝑦(𝑛) = 𝑥(𝑛) + 𝑥(𝑛 − 1) + 𝑥(𝑛 − 2) − 0.5𝑦(𝑛 − 1) +
0.25𝑦(𝑛 − 2)

Pole-zero plot:
Output y[n]:

𝑧 2 −1
8. 𝐻(𝑧) = (𝑧−3)−2, anti-causal system
1−𝑧 −2
𝐻(𝑧) = 1−6𝑧−1 +9𝑧−2 ,
b3 = [1,0,-1];
a3 = [1,-6,9];
[R,p,k] = residuez(b3,a3)
figure (1)
[z,p,l] = zplane(b3,a3);
n=[0:99];%100 samples
x=5.*cos(pi.*n/4).*(stepseq(0,0,99));
s=filter(b3,a3,x);
figure (2)
stem(n,s);%plot of the output

0.2222 0.8889𝑧 −1
: 𝐻(𝑧) = −0.1111 + + (1−3𝑧−1 )2
1−3𝑧 −1
Impulse Response: ℎ(𝑛) = −0.1111𝛿(𝑛) − 0.2222(3)𝑛 𝑢(−𝑛 − 1) − 0.8889𝑛(3)𝑛+1 𝑢(−𝑛 − 1)
Difference Equation Representation: 𝑦(𝑛) = 𝑥(𝑛) − 𝑥(𝑛 − 2) + 6𝑦(𝑛 − 1) − 9𝑦(𝑛 − 2)
Pole-zero plot:

Output y[n]:

𝑧 1−0.5𝑧 −1
9. 𝐻(𝑧) = 𝑧−0.25 + 1+2𝑧−1 , stable system
2 + 1.25𝑧 −1 + 0.125𝑧 −2
𝐻(𝑧) =
1 + 1.75𝑧 −1 − 0.5𝑧 −2
b4 = [2,1.25,0.125];
a4 = [1,1.75,-0.5];
[R,p,k] = residuez(b4,a4)
figure (1)
[z,p,l] = zplane(b4,a4);
n=[0:99];%100 samples
x=5.*cos(pi.*n/4).*(stepseq(0,0,99));
s=filter(b4,a4,x);
figure (2)
stem(n,s);%plot of the output
1.25 1
𝐻(𝑧) = −0.25 + 1+2𝑧−1 + 1−0.25𝑧−1
Impulse Response: ℎ(𝑛) = −0.25𝛿(𝑛) − 1.25(2)𝑛 𝑢(−𝑛 − 1) + (0.25)𝑛 𝑢(𝑛)
Difference Equation Representation: 𝑦(𝑛) = 2𝑥(𝑛) + 1.25𝑥(𝑛 − 1) + 0.125𝑥(𝑛 − 2) −
1.75𝑦(𝑛 − 1) + 0.5𝑦(𝑛 − 2)

Pole-zero plot:

Output y[n]:
10. 𝐻(𝑧) = (1 + 𝑧 −1 + 𝑧 −2 )2
𝐻(𝑧) = 1 + 2𝑧 −1 + 3𝑧 −2 + 2𝑧 −3 + 𝑧 −4
x1=[1 2 3 2 1];
x2=[1];
n1=[0:4];
n2=[0];
[H, N1]= conv_m(x1, n1, x2, n2)
figure (1)
[z,p,l] = zplane(x1,x2);
n=[0:99];%100 samples
x=5.*cos(pi.*n/4).*(stepseq(0,0,99));
s=filter(x1,x2,x);
figure (2)
stem(n,s);%plot of the output

𝐻(𝑧) = 1 + 2𝑧 −1 + 3𝑧 −2 + 2𝑧 −3 + 𝑧 −4
Impulse Response: ℎ(𝑛) = {1 2 3 2 1} = 𝛿(𝑛) + 2𝛿(𝑛 − 1) + 3𝛿(𝑛 − 2) + 2𝛿(𝑛 − 3) + 𝛿(𝑛 − 4)
Difference Equation Representation: 𝑦(𝑛) = 𝑥(𝑛) + 2𝑥(𝑛 − 1) + 3𝑥(𝑛 − 2) + 2𝑥(𝑛 − 3) + 𝑥(𝑛 − 4)

Pole-zero plot:
Output y[n]:

For the following linear, causal and time-invariant systems described by the difference equations,
determine the impulse response representation, the system function, the pole-zero plot, the output y[n] if
the input is 𝑥(𝑛) = 4(0.2)𝑛 𝑢[𝑛] and plot 200 samples of the output.
𝑥[𝑛]+2𝑥[𝑛−1]+𝑥[𝑛−3]
11. 𝑦[𝑛] =
4
1+2𝑧 −1 +𝑧 −3
System Function: 𝐻(𝑧) =
4
1
Impulse Response: ℎ(𝑛) = [𝛿(𝑛) + 2𝛿(𝑛 − 1) + 𝛿(𝑛 − 3)]
4
x1=[1 2 0 1];
x2=[4];
figure (1)
[z,p,l] = zplane(x1,x2);
n=[0:199];%100 samples
x=5.*(0.2.^n).*(stepseq(0,0,199));
s=filter(x1,x2,x);
figure (2)
stem(n,s);%plot of the output

Pole-zero plot:
Output y[n]:

12. 𝑦[𝑛] = 𝑥[𝑛] + 0.5𝑥[𝑛 − 1] − 0.5𝑦[𝑛 − 1] + 0.25𝑦[𝑛 − 2]


1+0.5𝑧 −1
System Function: 𝐻(𝑧) = 1+0.5𝑧−1 −0.25𝑧−2
b4 = [1,0.5];
a4 = [1,0.5,-0.25];
[R,p,k] = residuez(b4,a4)
figure (1)
[z,p,l] = zplane(b4,a4);
n=[0:199];%100 samples
x=5.*(0.2.^n).*(stepseq(0,0,199));
s=filter(b4,a4,x);
figure (2)
stem(n,s);%plot of the output

0.2764 0.7236
𝐻(𝑧) = 1+0.809𝑧−1 + 1−0.309𝑧−1
Impulse Response: ℎ(𝑛) = 0.2764(−0.809)𝑛 𝑢(𝑛) + 0.7236(0.309)𝑛 𝑢(𝑛)
Pole-zero plot:

Output y[n]:

13. 𝑦[𝑛] = 2𝑥[𝑛] + 0.9𝑦[𝑛 − 1]


2
System Function: 𝐻(𝑧) = 1−0.9𝑧−1
b4 = [2];
a4 = [1,-0.9];
[R,p,k] = residuez(b4,a4)
figure (1)
[z,p,l] = zplane(b4,a4);
n=[0:199];%100 samples
x=5.*(0.2.^n).*(stepseq(0,0,199));
s=filter(b4,a4,x);
figure (2)
stem(n,s);%plot of the output
2
𝐻(𝑧) = 1−0.9𝑧−1
Impulse Response: ℎ(𝑛) = 2(0.9)𝑛 𝑢(𝑛)

Pole-zero plot:

Output y[n]:

14. 𝑦[𝑛] = −0.45𝑥[𝑛] − 0.4𝑥[𝑛 − 1] + 𝑥[𝑛 − 2] + 0.4𝑦[𝑛 − 1] + 0.45𝑦[𝑛 − 2]


−0.45−0.4𝑧 −1 +𝑧 −2
System Function: 𝐻(𝑧) = 1−0.4𝑧 −1 −0.45𝑧 −2
b4 = [-0.45 -0.4 1];
a4 = [1 -0.4 -0.45];
[R,p,k] = residuez(b4,a4)
[z,p,l] = zplane(b4,a4);

0.2187 1.5536
𝐻(𝑧) = −2.2222 + +
1−0.9𝑧 −1 1+0.5𝑧 −1
Impulse Response: ℎ(𝑛) = −0.22222𝛿(𝑛) + 0.2187(0.9)𝑛 𝑢(𝑛) + 1.5536(−0.5)𝑛 𝑢(𝑛)

Pole-zero plot:
Output y[n]:

15. 𝑦[𝑛] = ∑4𝑚=0 0.8𝑚 𝑥[𝑛 − 𝑚] − ∑4𝑙=1 0.9𝑙 𝑦[𝑛 − 𝑙]


∑4𝑚=0 0.8𝑚 𝑧 −𝑚
System Function: 𝐻(𝑧) = 1+∑4𝑙=1 0.9𝑙 𝑧 −𝑙
1 + 0.8𝑧 + 0.64𝑧 + 0.512𝑧 −3 + 0.4096𝑧 −4
−1 −2
𝐻(𝑧) =
1 + 0.9𝑧 −1 + 0.81𝑧 −2 + 0.729𝑧 −3 + 0.6561𝑧 −4
b4 = [1,0.8,0.64,0.512,0.4096];
a4 = [1,0.9,0.81,0.729,0.6561];
[R,p,k] = residuez(b4,a4)
figure (1)
[z,p,l] = zplane(b4,a4);
n=[0:199];%100 samples
x=5.*(0.2.^n).*(stepseq(0,0,199));
s=filter(b4,a4,x);
figure (2)
stem(n,s);%plot of the output

Impulse Response:
Pole-zero plot:

Output y[n]:

16-20. Decompose the responses of items 11-15 into three different ways.

x[n]  2 x[n  1]  x[n  3]


16. y[n]=
4

Total response:

a. Homogenous part:

b. Particular part:
c. Transient part:

d. Steady state response:

17. y[n]= x[n]+0.5x[n-1]-0.5y[n-1]+0.25y[n-2]

Total response:

Homogenous part:

Particular part:

Transient part:

Steady state response:

18. y[n]= 2x[n]+0.9y[n-1]


Total response:

Homogenous part:

Particular part:

Transient part:
Steady state response:

19. y[n]= -0.45x[n]-0.4x[n-1]+x[n-2]+0.4y[n-1]+0.45y[n-2]


Total response:

Homogeneous part:

Particular part:

Transient part:

Steady state response:

4 4
20. y[n]=  0.8
m 0
m
x[n  m]   0.9l y[n  1]
l 1

Total response:

Homogeneous part:

Particular part:

Transient part:

Steady state part:


Solve the difference equation for y[n], n ≥ 0 and show the complementary (homogenous) solution, the
particular solution, the zero-input response, the zero-state response, the transient response and the steady
state response.
𝑦[𝑛] − 0.4𝑦[𝑛 − 1] − 0.45𝑦[𝑛 − 2] = 0.45𝑥[𝑛] + 0.4𝑥[𝑛 − 1] − 𝑥[𝑛 − 2]
1 𝑛
The input of the system is 𝑥[𝑛] = [2 + (2) ] 𝑢[𝑛] and subject to the following initial conditions
𝑌 + (𝑧) − 0.4𝑦[−1] − 0.4𝑧 −1 𝑌 + (𝑧) − 0.45𝑦[−2] − 0.45𝑦[−1]𝑧 −1 − 0.45𝑧 −2 𝑌 + (𝑧)
= 0.45𝑋 + (𝑧) + 0.4𝑥[−1] + 0.4𝑧 −1 𝑋 + (𝑧) − 𝑥[−2] − 𝑥[−1]𝑧 −1 − 𝑧 −2 𝑋 + (𝑧)

0.45 + 0.4𝑧 −1 − 𝑧 −2 +
𝑌 + (𝑧) = 𝑋
1 − 0.4𝑧 −1 − 0.45𝑧 −2
0.4𝑦[−1] + 0.45𝑦[−2] + 0.45𝑦[−1]𝑧 −1 + 0.4𝑥[−1] − 𝑥[−2] − 𝑥[−1]𝑧 −1
+
1 − 0.4𝑧 −1 − 0.45𝑧 −2
1 𝑛
𝑥[𝑛] = [2 + ( ) ] 𝑢[𝑛]
2
2 1
𝑥[𝑛] = −1
+
1−𝑧 1 − 0.5𝑧 −1

21. 𝑦[−1] = 0, 𝑦[−2] = 3, 𝑥[−1] = 4, 𝑥[−2] = 2


+ (𝑧)
0.45 + 0.4𝑧 −1 − 𝑧 −2 + −1.85 − 4𝑧 −1
𝑌 = 𝑋 +
1 − 0.4𝑧 −1 − 0.45𝑧 −2 1 − 0.4𝑧 −1 − 0.45𝑧 −2

0.45 + 0.4𝑧 −1 − 𝑧 −2 2 1 −1.85 − 4𝑧 −1


𝑌 + (𝑧) = ( + ) +
1 − 0.4𝑧 −1 − 0.45𝑧 −2 1 − 𝑧 −1 1 − 0.5𝑧 −1 1 − 0.4𝑧 −1 − 0.45𝑧 −2

1.35 + 0.3𝑧 −1 − 3.8𝑧 −2 + 2𝑧 −3 −1.85 − 4𝑧 −1


𝑌 + (𝑧) = +
(1 − 0.4𝑧 −1 − 0.45𝑧 −2 )(1 − 𝑧 −1 )(1 − 0.5𝑧 −1 ) 1 − 0.4𝑧 −1 − 0.45𝑧 −2
−0.5 − 0.925𝑧 −1 − 8.875𝑧 −2 + 4𝑧 −3
𝑌 + (𝑧) =
1 − 1.9𝑧 −1 + 0.65𝑧 −2 + 0. 475𝑧 −3 − 0. 225𝑧 −4
b3 = [-0.5,-0.925,-8.875,4];
a3 = [1,-1.9,0.65,0.475,-0.225];
[R3,p3,k3] = residuez(b3,a3)
−84 91.0938 −3.9375 −3.6562
𝑌 + (𝑧) = 1−𝑧−1 + 1−0.9𝑧−1 + 1+0.5𝑧−1 + 1−0.5𝑧−1
𝑦 + (𝑛) = −84 + 91.0938(0.9)𝑛 𝑢(𝑛) − 3.9375(−0.5)𝑛 𝑢(𝑛) − 3.6562(0.5)𝑛 𝑢(𝑛)
Transient Response: 𝑦𝑡𝑟 (𝑛) = 91.0938(0.9)𝑛 𝑢(𝑛) − 3.9375(−0.5)𝑛 𝑢(𝑛) − 3.6562(0.5)𝑛 𝑢(𝑛)
Steady State Response: 𝑦𝑠𝑠 (𝑛) = −84
1 𝑛
Complementary Solution: 𝑦𝑐 (𝑛) = 2 + (2)
Particular Solution: 𝑦𝑝 (𝑛) = 𝑐1 (0.9)𝑛 + 𝑐2 (−0.5)𝑛
Zero-input response:
−1.85 − 4𝑧 −1
𝑌𝑧𝑖+ =
1 − 0.4𝑧 −1 − 0.45𝑧 −2
b4 = [-1.85,-4];
a4 = [1,-0.4,-0.45];
[R,p,k] = residuez(b4,a4)

−4.0464 2.1964
𝑌𝑧𝑖+ = +
1−0.9𝑧 −1 1+0.5𝑧 −1
𝑦𝑧𝑖 (𝑛) = −4.0464(0.9)𝑛 𝑢(𝑛) + 2.1964(−0.5)𝑛 𝑢(𝑛)

Zero-state response:
+ (𝑧)
1.35 + 0.3𝑧 −1 − 3.8𝑧 −2 + 2𝑧 −3
𝑌 =
1 − 1.9𝑧 −1 + 0.65𝑧 −2 + 0. 475𝑧 −3 − 0. 225𝑧 −4
b2 = [1.35,0.3,-3.8,2];
a2 = [1,-1.9,0.65,0.475,-0.225];
[R2,p2,k2] = residuez(b2,a2)

+ −2 3.4438 1.8125 1.7187


𝑌𝑧𝑠 = 1−𝑧−1 + 1−0.9𝑧−1 − 1+0.5𝑧−1 + 1+0.5𝑧−1
𝑦𝑧𝑠 (𝑛) = −2 + 3.4438(0.9)𝑛 𝑢(𝑛) − 1.8125(−0.5)𝑛 𝑢(𝑛) + 1.7187(0.5)𝑛 𝑢(𝑛)

22. 𝑦[−1] = 0, 𝑦[−2] = 0, 𝑥[−1] = −3, 𝑥[−2] = 0


+ (𝑧)
0.45 + 0.4𝑧 −1 − 𝑧 −2 + −1.2 + 3𝑧 −1
𝑌 = 𝑋 +
1 − 0.4𝑧 −1 − 0.45𝑧 −2 1 − 0.4𝑧 −1 − 0.45𝑧 −2

0.45 + 0.4𝑧 −1 − 𝑧 −2 2 1 −1.2 + 3𝑧 −1


𝑌 + (𝑧) = ( + ) +
1 − 0.4𝑧 −1 − 0.45𝑧 −2 1 − 𝑧 −1 1 − 0.5𝑧 −1 1 − 0.4𝑧 −1 − 0.45𝑧 −2

+ (𝑧)
1.35 + 0.3𝑧 −1 − 3.8𝑧 −2 + 2𝑧 −3 −1.2 + 3𝑧 −1
𝑌 = +
(1 − 0.4𝑧 −1 − 0.45𝑧 −2 )(1 − 𝑧 −1 )(1 − 0.5𝑧 −1 ) 1 − 0.4𝑧 −1 − 0.45𝑧 −2
+ (𝑧)
0.12 + 5.2𝑧 − 6.1𝑧 + 1.5𝑧 −3
−1 −2
𝑌 =
1 − 1.9𝑧 −1 + 0.65𝑧 −2 + 0. 475𝑧 −3 − 0. 225𝑧 −4
b3 = [0.12,5.2,-6.1,1.5];
a3 = [1,-1.9,0.65,0.475,-0.225];
[R3,p3,k3] = residuez(b3,a3)
9.6 5.5264 2.7786 1.175
𝑌 + (𝑧) = − − −
1−𝑧 −1 1−0.9𝑧 −1 1+0.5𝑧 −1 1−0.5𝑧 −1
+ (𝑛)
𝑦 = 9.6 − 5.5264(0.9) 𝑢(𝑛) − 2.7786(−0.5)𝑛 𝑢(𝑛) − 1.175(0.5)𝑛 𝑢(𝑛)
𝑛

Transient Response: 𝑦𝑡𝑟 (𝑛) = −5.5264(0.9)𝑛 𝑢(𝑛) − 2.7786(−0.5)𝑛 𝑢(𝑛) − 1.175(0.5)𝑛 𝑢(𝑛)
Steady State Response: 𝑦𝑠𝑠 (𝑛) = 9.6
1 𝑛
Complementary Solution: 𝑦𝑐 (𝑛) = 2 + (2)
Particular Solution: 𝑦𝑝 (𝑛) = 𝑐1 (0.9)𝑛 + 𝑐2 (−0.5)𝑛
Zero-input response:
+ −1.2 + 3𝑧 −1
𝑌𝑧𝑖 =
1 − 0.4𝑧 −1 − 0.45𝑧 −2
b4 = [-1.2,3];
a4 = [1,-0.4,-0.45];
[R,p,k] = residuez(b4,a4)

1.3714 2.5714
𝑌𝑧𝑖+ = 1−0.9𝑧 −1 − 1+0.5𝑧−1
𝑦𝑧𝑖 (𝑛) = 1.3714(0.9)𝑛 𝑢(𝑛) − 2.5714(−0.5)𝑛 𝑢(𝑛)

Zero-state response:
+ (𝑧)
1.35 + 0.3𝑧 −1 − 3.8𝑧 −2 + 2𝑧 −3
𝑌 =
1 − 1.9𝑧 −1 + 0.65𝑧 −2 + 0. 475𝑧 −3 − 0. 225𝑧 −4
b2 = [1.35,0.3,-3.8,2];
a2 = [1,-1.9,0.65,0.475,-0.225];
[R2,p2,k2] = residuez(b2,a2)

+ −2 3.4438 1.8125 1.7187


𝑌𝑧𝑠 = 1−𝑧−1 + 1−0.9𝑧−1 − 1+0.5𝑧−1 + 1+0.5𝑧−1
𝑦𝑧𝑠 (𝑛) = −2 + 3.4438(0.9)𝑛 𝑢(𝑛) − 1.8125(−0.5)𝑛 𝑢(𝑛) + 1.7187(0.5)𝑛 𝑢(𝑛)

23. 𝑦[−1] = −4, 𝑦[−2] = −3, 𝑥[−1] = −4, 𝑥[−2] = −3


+ (𝑧)
0.45 + 0.4𝑧 −1 − 𝑧 −2 + −1.85 − 4𝑧 −1
𝑌 = 𝑋 +
1 − 0.4𝑧 −1 − 0.45𝑧 −2 1 − 0.4𝑧 −1 − 0.45𝑧 −2

0.45 + 0.4𝑧 −1 − 𝑧 −2 2 1 −1.85 − 4𝑧 −1


𝑌 + (𝑧) = ( + ) +
1 − 0.4𝑧 −1 − 0.45𝑧 −2 1 − 𝑧 −1 1 − 0.5𝑧 −1 1 − 0.4𝑧 −1 − 0.45𝑧 −2

1.35 + 0.3𝑧 −1 − 3.8𝑧 −2 + 2𝑧 −3 −1.85 − 4𝑧 −1


𝑌 + (𝑧) = +
(1 − 0.4𝑧 −1 − 0.45𝑧 −2 )(1 − 𝑧 −1 )(1 − 0.5𝑧 −1 ) 1 − 0.4𝑧 −1 − 0.45𝑧 −2
+ (𝑧)
−0.5 − 0.925𝑧 −1 − 8.875𝑧 −2 + 4𝑧 −3
𝑌 =
1 − 1.9𝑧 −1 + 0.65𝑧 −2 + 0. 475𝑧 −3 − 0. 225𝑧 −4
b3 = [-0.5,-0.925,-8.875,4];
a3 = [1,-1.9,0.65,0.475,-0.225];
[R3,p3,k3] = residuez(b3,a3)
−84 91.0938 −3.9375 −3.6562
𝑌 + (𝑧) = 1−𝑧−1 + 1−0.9𝑧−1 + 1+0.5𝑧−1 + 1−0.5𝑧−1
𝑦 + (𝑛) = −84 + 91.0938(0.9)𝑛 𝑢(𝑛) − 3.9375(−0.5)𝑛 𝑢(𝑛) − 3.6562(0.5)𝑛 𝑢(𝑛)
Transient Response: 𝑦𝑡𝑟 (𝑛) = 91.0938(0.9)𝑛 𝑢(𝑛) − 3.9375(−0.5)𝑛 𝑢(𝑛) − 3.6562(0.5)𝑛 𝑢(𝑛)
Steady State Response: 𝑦𝑠𝑠 (𝑛) = −84
1 𝑛
Complementary Solution: 𝑦𝑐 (𝑛) = 2 + (2)
Particular Solution: 𝑦𝑝 (𝑛) = 𝑐1 (0.9)𝑛 + 𝑐2 (−0.5)𝑛
Zero-input response:
−1.85 − 4𝑧 −1
𝑌𝑧𝑖+ =
1 − 0.4𝑧 −1 − 0.45𝑧 −2
b4 = [-1.85,-4];
a4 = [1,-0.4,-0.45];
[R,p,k] = residuez(b4,a4)

−4.0464 2.1964
𝑌𝑧𝑖+ = +
1−0.9𝑧 −1 1+0.5𝑧 −1
𝑦𝑧𝑖 (𝑛) = −4.0464(0.9)𝑛 𝑢(𝑛) + 2.1964(−0.5)𝑛 𝑢(𝑛)

Zero-state response:
+ (𝑧)
1.35 + 0.3𝑧 −1 − 3.8𝑧 −2 + 2𝑧 −3
𝑌 =
1 − 1.9𝑧 −1 + 0.65𝑧 −2 + 0. 475𝑧 −3 − 0. 225𝑧 −4
b2 = [1.35,0.3,-3.8,2];
a2 = [1,-1.9,0.65,0.475,-0.225];
[R2,p2,k2] = residuez(b2,a2)

+ −2 3.4438 1.8125 1.7187


𝑌𝑧𝑠 = 1−𝑧−1 + 1−0.9𝑧−1 − 1+0.5𝑧−1 + 1+0.5𝑧−1
𝑦𝑧𝑠 (𝑛) = −2 + 3.4438(0.9)𝑛 𝑢(𝑛) − 1.8125(−0.5)𝑛 𝑢(𝑛) + 1.7187(0.5)𝑛 𝑢(𝑛)

24. 𝑦[−1] = 1, 𝑦[−2] = 7 𝑥[−1] = −4, 𝑥[−2] = 0


0.45 + 0.4𝑧 −1 − 𝑧 −2 + −1.85 − 4𝑧 −1
𝑌 + (𝑧) = 𝑋 +
1 − 0.4𝑧 −1 − 0.45𝑧 −2 1 − 0.4𝑧 −1 − 0.45𝑧 −2

0.45 + 0.4𝑧 −1 − 𝑧 −2 2 1 −1.85 − 4𝑧 −1


𝑌 + (𝑧) = ( + ) +
1 − 0.4𝑧 −1 − 0.45𝑧 −2 1 − 𝑧 −1 1 − 0.5𝑧 −1 1 − 0.4𝑧 −1 − 0.45𝑧 −2

+ (𝑧)
1.35 + 0.3𝑧 −1 − 3.8𝑧 −2 + 2𝑧 −3 −1.85 − 4𝑧 −1
𝑌 = +
(1 − 0.4𝑧 −1 − 0.45𝑧 −2 )(1 − 𝑧 −1 )(1 − 0.5𝑧 −1 ) 1 − 0.4𝑧 −1 − 0.45𝑧 −2
−0.5 − 0.925𝑧 −1 − 8.875𝑧 −2 + 4𝑧 −3
𝑌 + (𝑧) =
1 − 1.9𝑧 −1 + 0.65𝑧 −2 + 0. 475𝑧 −3 − 0. 225𝑧 −4
b3 = [-0.5,-0.925,-8.875,4];
a3 = [1,-1.9,0.65,0.475,-0.225];
[R3,p3,k3] = residuez(b3,a3)
−84 91.0938 −3.9375 −3.6562
𝑌 + (𝑧) = 1−𝑧−1 + 1−0.9𝑧−1 + 1+0.5𝑧−1 + 1−0.5𝑧−1
𝑦 + (𝑛) = −84 + 91.0938(0.9)𝑛 𝑢(𝑛) − 3.9375(−0.5)𝑛 𝑢(𝑛) − 3.6562(0.5)𝑛 𝑢(𝑛)
Transient Response: 𝑦𝑡𝑟 (𝑛) = 91.0938(0.9)𝑛 𝑢(𝑛) − 3.9375(−0.5)𝑛 𝑢(𝑛) − 3.6562(0.5)𝑛 𝑢(𝑛)
Steady State Response: 𝑦𝑠𝑠 (𝑛) = −84
1 𝑛
Complementary Solution: 𝑦𝑐 (𝑛) = 2 + (2)
Particular Solution: 𝑦𝑝 (𝑛) = 𝑐1 (0.9)𝑛 + 𝑐2 (−0.5)𝑛
Zero-input response:
−1.85 − 4𝑧 −1
𝑌𝑧𝑖+ =
1 − 0.4𝑧 −1 − 0.45𝑧 −2
b4 = [-1.85,-4];
a4 = [1,-0.4,-0.45];
[R,p,k] = residuez(b4,a4)

−4.0464 2.1964
𝑌𝑧𝑖+ = +
1−0.9𝑧 −1 1+0.5𝑧 −1
𝑦𝑧𝑖 (𝑛) = −4.0464(0.9)𝑛 𝑢(𝑛) + 2.1964(−0.5)𝑛 𝑢(𝑛)

Zero-state response:
+ (𝑧)
1.35 + 0.3𝑧 −1 − 3.8𝑧 −2 + 2𝑧 −3
𝑌 =
1 − 1.9𝑧 −1 + 0.65𝑧 −2 + 0. 475𝑧 −3 − 0. 225𝑧 −4
b2 = [1.35,0.3,-3.8,2];
a2 = [1,-1.9,0.65,0.475,-0.225];
[R2,p2,k2] = residuez(b2,a2)

+ −2 3.4438 1.8125 1.7187


𝑌𝑧𝑠 = 1−𝑧−1 + 1−0.9𝑧−1 − 1+0.5𝑧−1 + 1+0.5𝑧−1
𝑦𝑧𝑠 (𝑛) = −2 + 3.4438(0.9)𝑛 𝑢(𝑛) − 1.8125(−0.5)𝑛 𝑢(𝑛) + 1.7187(0.5)𝑛 𝑢(𝑛)

25. 𝑦[−1] = 5, 𝑦[−2] = 3, 𝑥[−1] = 4, 𝑥[−2] = 8


0.45 + 0.4𝑧 −1 − 𝑧 −2 + −1.85 − 4𝑧 −1
𝑌 + (𝑧) = 𝑋 +
1 − 0.4𝑧 −1 − 0.45𝑧 −2 1 − 0.4𝑧 −1 − 0.45𝑧 −2

0.45 + 0.4𝑧 −1 − 𝑧 −2 2 1 −1.85 − 4𝑧 −1


𝑌 + (𝑧) = ( + ) +
1 − 0.4𝑧 −1 − 0.45𝑧 −2 1 − 𝑧 −1 1 − 0.5𝑧 −1 1 − 0.4𝑧 −1 − 0.45𝑧 −2

+ (𝑧)
1.35 + 0.3𝑧 −1 − 3.8𝑧 −2 + 2𝑧 −3 −1.85 − 4𝑧 −1
𝑌 = +
(1 − 0.4𝑧 −1 − 0.45𝑧 −2 )(1 − 𝑧 −1 )(1 − 0.5𝑧 −1 ) 1 − 0.4𝑧 −1 − 0.45𝑧 −2
−0.5 − 0.925𝑧 −1 − 8.875𝑧 −2 + 4𝑧 −3
𝑌 + (𝑧) =
1 − 1.9𝑧 −1 + 0.65𝑧 −2 + 0. 475𝑧 −3 − 0. 225𝑧 −4
b3 = [-0.5,-0.925,-8.875,4];
a3 = [1,-1.9,0.65,0.475,-0.225];
[R3,p3,k3] = residuez(b3,a3)
−84 91.0938 −3.9375 −3.6562
𝑌 + (𝑧) = 1−𝑧−1 + 1−0.9𝑧−1 + 1+0.5𝑧−1 + 1−0.5𝑧−1
𝑦 + (𝑛) = −84 + 91.0938(0.9)𝑛 𝑢(𝑛) − 3.9375(−0.5)𝑛 𝑢(𝑛) − 3.6562(0.5)𝑛 𝑢(𝑛)
Transient Response: 𝑦𝑡𝑟 (𝑛) = 91.0938(0.9)𝑛 𝑢(𝑛) − 3.9375(−0.5)𝑛 𝑢(𝑛) − 3.6562(0.5)𝑛 𝑢(𝑛)
Steady State Response: 𝑦𝑠𝑠 (𝑛) = −84
1 𝑛
Complementary Solution: 𝑦𝑐 (𝑛) = 2 + (2)
Particular Solution: 𝑦𝑝 (𝑛) = 𝑐1 (0.9)𝑛 + 𝑐2 (−0.5)𝑛
Zero-input response:
−1 − 𝑧 −1
𝑌𝑧𝑖+ =
1 − 0.4𝑧 −1 − 0.45𝑧 −2
b4 = [-1.85,-4];
a4 = [1,-0.4,-0.45];
[R,p,k] = residuez(b4,a4)

−4.0464 2.1964
𝑌𝑧𝑖+ = +
1−0.9𝑧 −1 1+0.5𝑧 −1
𝑦𝑧𝑖 (𝑛) = −4.0464(0.9)𝑛 𝑢(𝑛) + 2.1964(−0.5)𝑛 𝑢(𝑛)

Zero-state response:
+ (𝑧)
1.35 + 0.3𝑧 −1 − 3.8𝑧 −2 + 2𝑧 −3
𝑌 =
1 − 1.9𝑧 −1 + 0.65𝑧 −2 + 0. 475𝑧 −3 − 0. 225𝑧 −4
b2 = [1.35,0.3,-3.8,2];
a2 = [1,-1.9,0.65,0.475,-0.225];
[R2,p2,k2] = residuez(b2,a2)

+ −2 3.4438 1.8125 1.7187


𝑌𝑧𝑠 = 1−𝑧−1 + 1−0.9𝑧−1 − 1+0.5𝑧−1 + 1+0.5𝑧−1
𝑦𝑧𝑠 (𝑛) = −2 + 3.4438(0.9)𝑛 𝑢(𝑛) − 1.8125(−0.5)𝑛 𝑢(𝑛) + 1.7187(0.5)𝑛 𝑢(𝑛)

26-30. Determine the stability of the systems described in items 11-15.

𝑥[𝑛]+2𝑥[𝑛−1]+𝑥[𝑛−3]
26. 𝑦[𝑛] = 4
x1=[1 2 0 1];
x2=[4];
z = roots(x2);
magz = abs(z)

Since the magnitude of the root cant determine, the system


is unstable.

27. 𝑦[𝑛] = 𝑥[𝑛] + 0.5𝑥[𝑛 − 1] − 0.5𝑦[𝑛 − 1] + 0.25𝑦[𝑛 − 2]


b4 = [1,0.5];
a4 = [1,0.5,-0.25];
z = roots(a4);
magz = abs(z)

Since the magnitudes of the roots are less than one, the system is stable.

28. 𝑦[𝑛] = 2𝑥[𝑛] + 0.9𝑦[𝑛 − 1]


b4 = [2];
a4 = [1,-0.9];
z = roots(a4);
magz = abs(z)
Since the magnitude of the root is less than one, the system is stable.

29. 𝑦[𝑛] = −0.45𝑥[𝑛] − 0.4𝑥[𝑛 − 1] + 𝑥[𝑛 − 2] + 0.4𝑦[𝑛 − 1] + 0.45𝑦[𝑛 − 2]


b4 = [-0.45 -0.4 1];
a4 = [1 -0.4 -0.45];
z = roots(a4);
magz = abs(z)

Since the magnitudes of the roots are less than one, the system is stable.

30. 𝑦[𝑛] = ∑4𝑚=0 0.8𝑚 𝑥[𝑛 − 𝑚] − ∑4𝑙=1 0.9𝑙 𝑦[𝑛 − 𝑙]


b4 = [1,0.8,0.64,0.512,0.4096];
a4 = [1,0.9,0.81,0.729,0.6561];
z = roots(a4);
magz = abs(z)

Since the magnitudes of the roots are less than one, the system is stable.

You might also like