$29.99
ECE 4250
Assignment 1
General Instructions
The assignment submissions are via Canvas. There are two parts: a problem set and a coding
(programming) component. Your answers to the problems can be written up any way you want
(e.g., using Latex or scanning your handwritten answers). As long as we can read it, we will
grade it. For the programming part, you will code in Python 3, using Jupyter Notebook. Make
sure that all cell outputs are clearly visible before saving the notebook. Thus, we recommend
that you re-run your code after you are done editing. You should then print this file into a pdf.
For the coding component, please submit both the “.pdf” and “.ipynb” files. Please zip up all
your work into a single file and submit that.
Any acknowledgments of collaboration, answers to questions, comments to code or other notes
should all be included in your problem set answer sheet and/or Jupyter Notebook. General
guidelines regarding assignments apply. In other words, you can collaborate at the ideation/brainstorming stage, but whatever you submit should represent your own individual work. You are
not allowed to copy/paste others’ code/answers or work on same code with someone else. You
are not allowed to use functions outside of the Python Standard Library, unless specified otherwise or you have received permission to do so. Your code will be graded on readability,
executability, and accuracy. You are strongly advised to use detailed commenting that explains the algorithmic steps in your code. Explain every function and loop. Use piazza to ask
questions. Take advantage of TA and Instructor Office Hours to seek help.
Problem Set
Question 1. For each of the following systems, classify whether they are (i) linear or not, (ii)
time invariant or not, (iii) causal or not, and (iv) stable or not:
• y(n) = x(2 − n)
• y(n) = sign(x(n))
• y(n) = x(7n)
• y(n) = sin(x(n))
• y(n) = |x(n)|
1
Question 2. Show that the energy of a real-valued signal can be decomposed into the sum of
the energies of the even and odd parts of the signal.
Question 3. Consider a continuous-time sinusoid xa(t) with a period T0 = 1/F0. Assume this
signal is sampled at a rate of Fs = 1/Ts to produce a discrete-time signal x(n) = xa(nTs).
• What is the condition on Ts and T0 for x(n) to be periodic?
• If x(n) is periodic, what is its fundamental (baseline) period?
Question 4. Assume you are given an LTI system with a step response s(n), which is defined
as the output of the system when excited with (input) a step function u(n)? Can you derive
the expression for the output y(n) in terms of s(n) and an arbitrary input x(n)?
Question 5. Two discrete-time signals x(n) and y(n) are called orthonormal on an interval
[N1, N2], if
X
N2
n=N1
x(n)y
∗
(n) = (
1, if x(n) = y(n), ∀n ∈ [N1, N2]
0, otherwise
Show that harmonically related signals: xk(n) = √
1
N
e
j2πkn/N are orthonormal on an interval of
length N. I.e,
N
X−1
n=0
xk(n)x
∗
l
(n) = (
1, if k = l
0, otherwise
,
where 0 < k, l < N − 1 and N ≥ 2.
Programming Questions
1 Convolutions
Define the following signals
x =
3, 4, 1, 2, 5, 6, 7, 8, 2, 4
h =
1
4
,
1
4
,
1
4
a) Calculate the convolution between these two signals, x ∗ h, in time domain (don’t use any
libraries or built in functions besides addition and multiplication). Note that the convolution
of two signals of length N and M should be of size (N + M − 1).
b) Describe in words what this convolution does.
c) Convolutions are O(N2
) when computed in the time domain for two 1D signals of length
N. I.e., the physical resources (e.g., time) that are needed to convolve two 1D signals of the
same length are proportional to the square of the signal length. However, with a constant
filter like h, we can modify the process to make it O(N). Show how to do a convolution with
a filter like h where all the elements are the same in O(N) time.
d) Show the time difference from the technique discussed in c) by replicating x and h 100 times
to make then 100 times the original length, and time how long the convolution takes with
the regular technique vs the more efficient one.
2