EE113 Digital Signal Processing Homework 2 solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (4 votes)

Problem 1. (20 points) Is the system linear? causal? time-invariant? stable?
(a) (10 points) Consider the moving average system with exponential weighting
y[n] = 1
M + 1
X
M
k=0
λ
kx[n − k]
where |λ| < 1.
(b) (10 points) Consider the system
y[n] = 1
|n| + 1
x[−n
2
]
Problem 2. (10 points) The response of a linear system to 0.5
nu[n] is u[n] and to 0.5
n−1u[n − 1]
is u[n − 1]. Is the system time-invariant? Why or why not?
Problem 3. (10 points) Consider a first-order differential equation in the form
dya
dt + A ya(t) = A xa(t)
The derivative can be approximated using the backward difference
dya
dt ≈
ya(t) − ya(t − T)
T
where T is the step size.
(a) (5 points) Using the approximation for the derivative in the differential equation, express
ya(t) in terms of ya(t − T) and xa(t).
(b) (5 points) Convert the differential equation to a difference equation by defining discrete-time
signals
x[n] = xa(nT)
y[n] = ya(nT)
y[n − 1] = ya(nT − T)
Show that the resulting difference equation corresponds to an exponential smoother. That is,
the difference equation is of the form
y[n] = (1 − α)y[n − 1] + αx[n].
Determine the parameter α in terms of A and T.
Problem 4. (15 points)
(a) (5 points) Compute the convolution of x[n] and h[n], y[n] = x[n] ∗ h[n]:
x[n] = n
0, 1, 2, 3, 4, 3, 2, 1, 0
o

n=0
and h[n] = n
1, 1, −1, −1
o

n=0
.
1
(b) (10 points) Let y[n] be the convolution of two discrete-time signals x[n] and h[n], that is
y[n] = x[n] ∗ h[n]
Show that time shifting either x[n] or h[n] by m samples causes y[n] to be time shifted by m
as well. Mathematically prove that
x[n − m] ∗ h[n] = y[n − m]
and
x[n] ∗ h[n − m] = y[n − m]
Problem 5. (25 points) (Use MATLAB for part (c) of this problem) Consider the DTLTI
system shown in Fig. 1:
Figure 1: System Block diagram for Problem 5
(a) (5 Points) Express the impulse response of the system as a function of the impulse responses
of the subsystems.
(b) (10 points) Let
h1[n] = e
−0.1nu[n]
h2[n] = h3[n] = u[n] − u[n − 3]
and
h4[n] = δ[n − 2]
Determine the impulse response heq[n] of the equivalent system. Note that you need to do
the convolution on paper, but are free to use MATLAB (“conv” command) to verify if your
calculations are correct.
(c) (10 points) Let the input signal be a unit-step, that is, x[n] = u[n]. Determine and plot y[n]
in MATLAB.
(Include the MATLAB plots for n = 0, 1, . . . , 10 samples only, and use “stem” for the plot
command)
2
Problem 6. (20 points) (Use MATLAB for this problem)
Consider the problem 4 of Exercise 1, let’s say that the goal of that problem is to play the music
slower and still make it sound natural. In this problem, we will implement a MATLAB program to
achieve the same goal using a system of upsampler and smoother as shown in the figure below.
Figure 2: System block diagram for Problem 5
Write a MATLAB program and report your observations for a system that has the cascade of
two systems, S1 and S2, as shown in the Fig. 2. System S1 is an upsampler, such that the response
of the system to an input of x[n] is w[n]:
w[n] = (
x[n/3], if n/3 is an integer
0, otherwise
The system S2 is is a smoother that can be implemented using:
(a) (10 points) Moving average filter. Choose window lengths to be 1, 5, 10, 50, and 100, and
play the output audio signal y[n] from the system corresponding to each window length. Report
the window length that makes the output signal y[n] sound better, and explain the differences,
based on what you hear, as you change the window lengths.
(b) (10 points) Exponential smoother. Report the best α = 0, 0.3, 0.5, 0.8, 1 that makes the output
signal y[n] sounds better, and explain the differences with the other values of α.
Consider the output of the overall system is y[n].
The snippet of the code and the audio file are available in a compressed file “HW2 Prob6.rar” in
week 2 folder.
3