Sie sind auf Seite 1von 2

EE351: Spectrum Analysis and Discrete Time Systems (Fall 2005) ASSIGNMENT

Assignment 2
Issued September 27, 2005; Due October 4, 2005 (in class)

1. (Linear and Time-Invariant Properties) This problem illustrates the important consequences
of the linear and time-invariant properties. Specifically, if one knows the response of an LTI
system to a single input, one can compute the responses to many other inputs.
Consider an LTI system whose response to the input signal x1 (t) in Figure 4-(a) is the signal
y1 (t) illustrated in Figure 4-(b).

(a) First, write x2 (t) depicted in Figure 4-(c) in terms of x1 (t). Then determine and sketch
carefully the response of the system to the input signal x2 (t).
(b) Repeat for the input signal x3 (t) shown in Figure 4-(d).

x1 (t ) y1 (t )

1 1

t t
0 1 2 0 1 2
(a) (b)
x2 ( t ) x3 ( t )

1 1

t t
−1 0 1 2 0 1 2 3

−1

(c) (d)

Figure 4: Figure for Question 1.

2. (Moving-Average System) An important application of DT systems is the enhancement of


some feature in a data set, such as identifying the underlying trend in data that are fluctuating.
Moving-average systems are often used for this purpose. Treating the data PN −1x[n] as the input
signal, the output of an N -point moving-average system is y[n] = N1 k=0 x[n − k]. It is
simple to show that (you might want to show it for yourself) a moving-average system is
linear and time-invariant (LTI).

Electrical Engineering, University of Saskatchewan Page 3


EE351: Spectrum Analysis and Discrete Time Systems (Fall 2005) ASSIGNMENT

Consider the four-point moving-average system whose input/output relationship is


3
1X
y[n] = x[n − k]
4
k=0

(a) Find and plot the impulse response h[n] of the system.
(b) Compute and plot the response of the system to the following input:

n, −2 ≤ n ≤ 4
x[n] =
0, otherwise
Comment on the fluctuating rates of the input and output signals.
3. (Computing convolution sum in MATLAB )
P
The MATLAB function conv computes the convolution sum y[n] = x[n]∗h[n] = ∞ k=−∞ x[k]h[n−
k] assuming that x[n] and h[n] are finite-length sequences (you cannot enter an infinite length
sequence in MATLAB!). If x[n] is nonzero only on the interval nx ≤ n ≤ nx + Nx − 1 and
h[n] is nonzero only on the interval nh ≤ n ≤ nh + Nh − 1, then y[n] can be nonzero only on
the interval
(nx + nh ) ≤ n ≤ (nx + nh ) + Nx + Nh − 2 (1)
This means that conv needs only compute y[n] for the Nx +Nh −1 samples on this interval. If
x is an Nx -length vector containing the values of x[n] on the interval nx ≤ n ≤ nx +Nx −1 and
h is an Nh -length vector containing the values of h[n] on the interval nh ≤ n ≤ nh + Nh − 1,
then y=conv(x,h) returns in y the Nx +Nh −1 samples of y[n] on the interval in (1). However,
conv does not return the time indices of the samples of y[n] stored in y, which makes sense
because the intervals of x and h are not input to conv. Instead, you are responsible for keeping
track of these indices. This MATLAB assignment shows you how to do this.

1, 0 ≤ n ≤ 3
(a) Consider the finite-length signal: x[n] =
0, otherwise.
Analytically determine y[n] = x[n] ∗ x[n].
(b) Compute the nonzero samples of y[n] = x[n] ∗ x[n] using conv, and store these samples
in the vector y. Your first step should be to define the vector x to contain the samples of
x[n] on the interval 0 ≤ n ≤ 3. Also construct an index vector ny, where ny(i) contains
the index of the sample of y[n] stored in the i-th element of y, i.e., y(i)=y[ny(i)]. For
example, ny(1) should be nx + nx , where nx is the first nonzero index of x[n]. Plot the
result using stem(ny,y), and make sure that your plot agrees with signal determined in
Part (a).

n, −2 ≤ n ≤ 4
(c) Consider the finite-length signal: h[n] =
0, otherwise
Compute y using conv. Plot your results.
Notes: For MATLAB parts, please hand in your codes and plots.
4. (Computing convolution sum for signals of infinite duration) Consider an LTI system with
impulse response:  n
3
h[n] = u[n]
4
Determine the output of the system at times n = −5, n = 5 and n = 10 when the input
signal is x[n] = u[n].

Electrical Engineering, University of Saskatchewan Page 4

Das könnte Ihnen auch gefallen