Sale!

# ECE 466 Homework 4

\$30.00

ECE 466 Homework 4

You have 10 extra points. I will carry your points over the other homeworks as well. So, if you score 105 in this homework, I will add 0.5 points to your total homework score for the whole semester.
You can collaborate on homeworks and turn in a homework for 2 people. Make sure both of you submit.
Include your codes and answers within the cells that are requested. Do not create additional cells.
Upload the .ipynb document and a generated .html in a zip:
You can use any modules you like for this question. I still need to see your code though. You can change the kernel for cells if you’d like to use another language.

Category:
5/5 - (2 votes)

ECE 466 Homework 4

You have 10 extra points. I will carry your points over the other homeworks as well. So, if you score 105 in this homework, I will add 0.5 points to your total homework score for the whole semester.
You can collaborate on homeworks and turn in a homework for 2 people. Make sure both of you submit.
Include your codes and answers within the cells that are requested. Do not create additional cells.
Upload the .ipynb document and a generated .html in a zip:
You can use any modules you like for this question. I still need to see your code though. You can change the kernel for cells if you’d like to use another language.

Your Name: [Name Surname]

import numpy as np
import matplotlib.pyplot as plt
from scipy import signal
1:
 Write codes to compute and plot the convolutions of the following for 100 time points. Make sure you only show the results where they are legitimate, i.e. the input and the system are defined. For example, if you have a step input, you can’t realize it in a computer as it is infinitely long. In that case, you should plot results where the input behaves like a unit step.

h
[
n
]
=
(
1
5
)
n
u
[
n
]
,
x
[
n
]
=
u
[
n
]

u
[
n

10
]
.
h
[
n
]
=
(
1
2
)
n
u
[
n
]
,
x
[
n
]
=
(
1
4
)
n
u
[
n
]
.
h
[
n
]
=
(
0.7
)
n
u
[
n
]
,
x
[
n
]
=
cos
(
0.1
π
n
)
u
[
n
]
.
h
[
n
]
=
{
1
,
0

n

4
0
,
e
l
s
e
w
h
e
r
e
,
x
[
n
]
=
{
1
3
n
,
0

n

6
0
,
e
l
s
e
w
h
e
r
e
# Your code for 1.1 should be written and executed in this cell.
# Your code for 1.2 should be written and executed in this cell.
# Your code for 1.3 should be written and executed in this cell.
# Your code for 1.4 should be written and executed in this cell.
2:
[20 points] Consider a system represented by a linear constant coefficient difference equation given by
y
[
n
]

0.7
y
[
n

1
]
+
0.1
y
[
n

2
]
=
2
x
[
n
]

x
[
n

2
]
, with initial conditions
y
[

1
]
=
2
,
y
[

2
]
=

1
and input signal
x
[
n
]
=
cos
(
0.5
π
n
)
u
[
n
]
. Code and plot the:

Impulse response of the system
ZSR
ZIR
Total response
# Your code for 2.1 should be written and executed in this cell.
# Your code for 2.2 should be written and executed in this cell.
# Your code for 2.3 should be written and executed in this cell.
# Your code for 2.4 should be written and executed in this cell.
3:
[30 points] Determine the causal signal
x
[
n
]
if its z-transform
X
(
z
)
is given by the following, and plot them. (Use dlti and dimpulse).

X
(
z
)
=
.2
z
z

2
, ROC:
|
z
|
<
2
.
X
(
z
)
=
z
2
+
0.6
z

0.5
z
2

0.9
z
+
0.2
.
X
(
z
)
=
z

6
+
z

7
1

z

1
X
(
z
)
=
1
4
1
+
6
z

1
+
z

2
(
1

2
z

1
+
2
z

2
)
(
1

0.5
z

1
)
X
(
z
)
=
2

1.5
z

1
1

1.5
z

1
+
0.5
z

2
.
X
(
z
)
is specified by the image below.
G
=
1
4
.
Figure

# Your code for 3.1 should be written and executed in this cell.
# Your code for 3.2 should be written and executed in this cell.
# Your code for 3.3 should be written and executed in this cell.
# Your code for 3.4 should be written and executed in this cell.
# Your code for 3.5 should be written and executed in this cell.
# Your code for 3.6 should be written and executed in this cell.
4:
[20 points] Compute and plot the ZSR of the system
y
[
n
]
=
0.7
y
[
n

1
]

0.12
y
[
n

2
]
+
x
[
n

1
]
+
x
[
n

2
]
, to the input
x
[
n
]
=
n
u
[
n
]
. Is the system stable?

# Your code for 4 should be written and executed in this cell.
5:
[20 points] We want to design a causal discrete-time LTI system with the property that if the input is
x
[
n
]
=
(
0.5
)
n
u
[
n
]

1
4
(
0.5
)
n

1
u
[
n

1
]
,
then the output is
y
[
n
]
=
(
1
3
)
n
u
[
n
]
.
Determine the poles, zeros and gain of the system. (You can do this by hand or using signal.tf2zpk)
Find and write the difference equation that characterizes this system.
Determine if the system is stable.
Plot the impulse response of the system.
# Your code for 5.1 should be written and executed in this cell.