Assignment (3)
1. Choose the Correct Answer:
1) Difference equation is used in: …………………..
a) Discrete time analysis
b) Continuous time analysis
c) Digital analysis
d) None of the mentioned
2) A second order discrete time system is characterized by the difference equation,
y(n)−3y(n−1)+2y(n−2)=x(n)−2x(n−1)
The value of y(2) when n≥0 and x(n) = u(n) and the initial condition are given as y(-1) = y(-2) =
1 is ……………………
a) 2
b) 4
c) 5
d) 6
3) Discrete LTI systems can be described by:
a) Its impulse response only
b) Difference equations only
c) Its frequency response only
d) All of the above
4) The system described by the difference equation y(n)-2y (n-1)+y(n-2)= x(n)-x(n-1) has y(n)= 0
and n<0. If x(n) = 8(n), then y(2) will be …………………
a) 2
b) 1
c) 0
d) -1
5) The system described by the difference equation y(n)-2y (n-1)+y(n+2)= x(n)-x(n-1) has an order
(degree) …………………
a) 2
b) 1
c) 3
d) 4
2. Solve the following difference equation iteratively (first three terms only):
y[n + 2] + 3y[n + 1] + 2y[n] = x[n + 2] + 3x[n + 1] + 3x[n]
with initial conditions y[-1[=3 and y[-2[=2 , and causal input x[n] = 3nu[n]
3. Solve the following difference equation iteratively:
y[n + 2] + 2y[n + 1] + y[n] = 0
with initial conditions y[-1] = 1, y[-2]=1
4. Solve the following difference equation iteratively:
y[n] + 0.5y[n - 1] = x[n]
with initial condition y[-1[=16, and causal input x[n] = n2
5. Solve the following difference equation iteratively:
y[n + 2] - y[n + 1] + 0.24y[n] = x[n + 2] - 2x[n + 1
with initial conditions y[-1[=2 and y[-2[=1 , and causal input x[n] =n
6. Find the complete response 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)
STUDENT CODE: C2200881 STUDENT NAME: MOSTAFA MAHMOUD ABDELATIF
Solution
2) Solve the following difference equation iteratively (first three terms only):
y[n + 2] + 3y[n + 1] + 2y[n] = x[n + 2] + 3x[n + 1] + 3x[n]
with initial conditions y[-1[=3 and y[-2[=2 , and causal input x[n] = 3nu[n]
For ( n = 0 ): Using ( y[-1] = 3 ), ( y[-2] = 2 ): [ y[0] = x[2] + 3x[1] + 3x[0] - 3y[-1] -
2y[-2]. ] Substitute: [ x[2] = 3^2 = 9, \quad x[1] = 3^1 = 3, \quad x[0] = 3^0 = 1, ] [ y[0] = 9
+ 3(3) + 3(1) - 3(3) - 2(2) = 9 + 9 + 3 - 9 - 4 = 8. ]
For ( n = 1 ): [ y[1] = x[3] + 3x[2] + 3x[1] - 3y[0] - 2y[-1]. ] Substitute: [ x[3] = 3^3 =
27, \quad x[2] = 9, \quad x[1] = 3, \quad y[0] = 8, \quad y[-1] = 3, ] [ y[1] = 27 + 3(9) +
3(3) - 3(8) - 2(3) = 27 + 27 + 9 - 24 - 6 = 33. ]
For ( n = 2 ): [ y[2] = x[4] + 3x[3] + 3x[2] - 3y[1] - 2y[0]. ] Substitute: [ x[4] = 3^4 =
81, \quad x[3] = 27, \quad x[2] = 9, \quad y[1] = 33, \quad y[0] = 8, ] [ y[2] = 81 + 3(27) +
3(9) - 3(33) - 2(8) = 81 + 81 + 27 - 99 - 16 = 74.
Results:
The first three terms of the output sequence are: [ y[0] = 8, \quad y[1] = 33, \quad y[2] =
74. ]
3)
Solve the following difference equation iteratively:
y[n + 2] + 2y[n + 1] + y[n] = 0
with initial conditions y[-1] = 1, y[-2]=1
For ( n = 0 ): Substitute ( y[-1] ) and ( y[-2] ): [ y[0] = -2y[-1] - y[-2]. ] [ y[0] = -2(1)
- (1) = -2 - 1 = -3. ]
For ( n = 1 ): Substitute ( y[0] ) and ( y[-1] ): [ y[1] = -2y[0] - y[-1]. ] [ y[1] = -2(-3) -
(1) = 6 - 1 = 5. ]
For ( n = 2 ): Substitute ( y[1] ) and ( y[0] ): [ y[2] = -2y[1] - y[0]. ] [ y[2] = -2(5) - (-
3) = -10 + 3 = -7. ]
For ( n = 3 ): Substitute ( y[2] ) and ( y[1] ): [ y[3] = -2y[2] - y[1]. ] [ y[3] = -2(-7) -
(5) = 14 - 5 = 9.
Results:
The first few terms of the sequence are: [ y[0] = -3, \quad y[1] = 5, \quad y[2] = -7, \quad
y[3] = 9. ]
4) Solve the following difference equation iteratively:
y[n] + 0.5y[n - 1] = x[n]
with initial condition y[-1[=16, and causal input x[n] = n2
For ( n = 0 ): Substitute ( x[0] = 0^2 = 0 ) and ( y[-1] = 16 ): [ y[0] = x[0] - 0.5y[-
1]. ] [ y[0] = 0 - 0.5(16) = -8. ]
For ( n = 1 ): Substitute ( x[1] = 1^2 = 1 ) and ( y[0] = -8 ): [ y[1] = x[1] - 0.5y[0]. ] [
y[1] = 1 - 0.5(-8) = 1 + 4 = 5. ]
For ( n = 2 ): Substitute ( x[2] = 2^2 = 4 ) and ( y[1] = 5 ): [ y[2] = x[2] - 0.5y[1]. ]
[ y[2] = 4 - 0.5(5) = 4 - 2.5 = 1.5. ]
For ( n = 3 ): Substitute ( x[3] = 3^2 = 9 ) and ( y[2] = 1.5 ): [ y[3] = x[3] - 0.5y[2]. ]
[ y[3] = 9 - 0.5(1.5) = 9 - 0.75 = 8.25. ]
Results:
The first few terms of the sequence are: [ y[0] = -8, \quad y[1] = 5, \quad y[2] = 1.5, \
quad y[3] = 8.25. ]
5) Solve the following difference equation iteratively:
y[n + 2] - y[n + 1] + 0.24y[n] = x[n + 2] - 2x[n + 1
with initial conditions y[-1[=2 and y[-2[=1 , and causal input x[n] =n
To solve the difference equation iteratively:
Problem Statement
Equation:
y[n+2]−y[n+1]+0.24y[n]=x[n+2]−2x[n+1]y[n + 2] - y[n + 1] + 0.24y[n] = x[n + 2] - 2x[n + 1]
Initial conditions:
y[−1]=2y[-1] = 2, y[−2]=1y[-2] = 1
x[n]=nx[n] = n
Steps for Iterative Solution
1. Substitute values of nn starting from n=−2n = -2.
2. Use the initial conditions and causal input x[n]=nx[n] = n to compute subsequent values
of y[n]y[n].
Step-by-Step Computation
For n=−2n = -2:
y[0]−y[−1]+0.24y[−2]=x[0]−2x[−1]y[0] - y[-1] + 0.24y[-2] = x[0] - 2x[-1]
Substitute:
y[−1]=2y[-1] = 2, y[−2]=1y[-2] = 1
x[0]=0x[0] = 0, x[−1]=−1x[-1] = -1
y[0]−2+0.24(1)=0−2(−1)y[0] - 2 + 0.24(1) = 0 - 2(-1) y[0]−2+0.24=2y[0] - 2 + 0.24 = 2
y[0]=3.76y[0] = 3.76
For n=−1n = -1:
y[1]−y[0]+0.24y[−1]=x[1]−2x[0]y[1] - y[0] + 0.24y[-1] = x[1] - 2x[0]
Substitute:
y[0]=3.76y[0] = 3.76, y[−1]=2y[-1] = 2
x[1]=1x[1] = 1, x[0]=0x[0] = 0
y[1]−3.76+0.24(2)=1−2(0)y[1] - 3.76 + 0.24(2) = 1 - 2(0) y[1]−3.76+0.48=1y[1] - 3.76 + 0.48 =
1 y[1]=4.28y[1] = 4.28
For n=0n = 0:
y[2]−y[1]+0.24y[0]=x[2]−2x[1]y[2] - y[1] + 0.24y[0] = x[2] - 2x[1]
Substitute:
y[1]=4.28y[1] = 4.28, y[0]=3.76y[0] = 3.76
x[2]=2x[2] = 2, x[1]=1x[1] = 1
y[2]−4.28+0.24(3.76)=2−2(1)y[2] - 4.28 + 0.24(3.76) = 2 - 2(1) y[2]−4.28+0.9024=0y[2] - 4.28
+ 0.9024 = 0 y[2]=3.3776y[2] = 3.3776
Results for the First Three Terms:
y[0]=3.76y[0] = 3.76
y[1]=4.28y[1] = 4.28
y[2]=3.3776y[2] = 3.3776
Find the complete response of the system represented by:
7. Find the complete response 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)
For n=0n = 0n=0:
4y[0]−4y[−1]+y[−2]=2x[0]−x[−1]4y[0] - 4y[-1] + y[-2] = 2x[0] - x[-
1]4y[0]−4y[−1]+y[−2]=2x[0]−x[−1]
Substitute initial conditions:
y[−1]=0y[-1] = 0y[−1]=0, y[−2]=0y[-2] = 0y[−2]=0,
x[0]=1x[0] = 1x[0]=1, x[−1]=0x[-1] = 0x[−1]=0.
4y[0]−0+0=2(1)−04y[0] - 0 + 0 = 2(1) - 04y[0]−0+0=2(1)−0 4y[0]=24y[0] = 24y[0]=2
y[0]=24=0.5y[0] = \frac{2}{4} = 0.5y[0]=42=0.5
For n=1n = 1n=1:
4y[1]−4y[0]+y[−1]=2x[1]−x[0]4y[1] - 4y[0] + y[-1] = 2x[1] -
x[0]4y[1]−4y[0]+y[−1]=2x[1]−x[0]
Substitute:
y[0]=0.5y[0] = 0.5y[0]=0.5, y[−1]=0y[-1] = 0y[−1]=0,
x[1]=1x[1] = 1x[1]=1, x[0]=1x[0] = 1x[0]=1.
4y[1]−4(0.5)+0=2(1)−14y[1] - 4(0.5) + 0 = 2(1) - 14y[1]−4(0.5)+0=2(1)−1 4y[1]−2=14y[1] - 2 =
14y[1]−2=1 4y[1]=34y[1] = 34y[1]=3 y[1]=34=0.75y[1] = \frac{3}{4} = 0.75y[1]=43=0.75
For n=2n = 2n=2:
4y[2]−4y[1]+y[0]=2x[2]−x[1]4y[2] - 4y[1] + y[0] = 2x[2] - x[1]4y[2]−4y[1]+y[0]=2x[2]−x[1]
Substitute:
y[1]=0.75y[1] = 0.75y[1]=0.75, y[0]=0.5y[0] = 0.5y[0]=0.5,
x[2]=1x[2] = 1x[2]=1, x[1]=1x[1] = 1x[1]=1.
4y[2]−4(0.75)+0.5=2(1)−14y[2] - 4(0.75) + 0.5 = 2(1) - 14y[2]−4(0.75)+0.5=2(1)−1
4y[2]−3+0.5=14y[2] - 3 + 0.5 = 14y[2]−3+0.5=1 4y[2]−2.5=14y[2] - 2.5 = 14y[2]−2.5=1
4y[2]=3.54y[2] = 3.54y[2]=3.5 y[2]=3.54=0.875y[2] = \frac{3.5}{4} = 0.875y[2]=43.5=0.875
General Computation
By iterating for higher values of nnn, the values of y[n]y[n]y[n] can be computed step-by-step.
For large nnn, this system reaches a steady state as the input is constant.
Complete Response for the First Few Values
1. y[0]=0.5y[0] = 0.5y[0]=0.5
2. y[1]=0.75y[1] = 0.75y[1]=0.75
3. y[2]=0.875y[2] = 0.875y[2]=0.875