Signals and Systems - Electrical Engineering

(avery) #1
Problems 633

10.10. Cascading of interpolators and decimators—MATLAB
Suppose you cascade an interpolator (an upsampler and a low-pass filter) and a decimator (a low-pass
filter and a downsampler).
(a) If both the interpolator and the decimator have the same rateM, carefully draw a block diagram of
the interpolator–decimator system.
(b)Suppose that the interpolator is of rate 3 and the decimator of rate 2. Carefully draw a block diagram
of the interpolator–decimator system. What would be the equivalent of sampling the input of this
system to obtain the same output?
(c) Use the MATLAB functionsinterpanddecimateto process the first 100 samples of the test signal
handelwhere the interpolator’s rate is 3 and the decimator’s is 2. How many samples does the output
have?


10.11. MATLAB and phase computation
The computation of the phase of a complex number or function using MATLAB has some issues that you
need to understand:
(a) The range of possible values of the inverse tangent needs to be extended to[−π,π)depending on
the quadrant the complex number is in. Consider the complex numbers 1 +j,− 1 +j,− 1 −j, and
1 −j, and represent each by a vector from the origin and consider what changes are needed when
we use the formula to find the phase.
(b)The phase of a complex number is only significant if its magnitude is significant. Use MATLAB to
compute the magnitudes and the phases of the complex numbersx= 1 +jandy= 10 −^6 +j 10 −^6.
How do the phases of these numbers compare? What about their magnitudes? Explain.
(c) If the functionX(ejω)is zero or infinite at a frequencyω 0 , the phase is undetermined at that frequency
and of no significance since the corresponding magnitude is zero or infinity. LetX(z)=z− 1 , so that
X(ejω)=ejω− 1. Can you determine the phase ofX(ej^0 )? Explain. Likewise, ifX(z)= 1 /(z− 1 ),
what is the phase ofX(ejω)atω= 0?
(d)If the phase is linear (i.e.,θ=−Nω), MATLAB will plot the values only between[−π,π]and so the
phase will not appear linear. LetX(z)=z−^4. Find the phase ofX(ejω)—is it linear? Then use the
MATLAB functionsfreqzandangleto compute the phase ofX(ejω)—does it appear linear? Explain.


10.12. Linear phase and phase unwrapping—MATLAB
A DTFTX(ejω)is said to have linear phase if its phase is a line through the origin of the frequency
plane. Let


X(ejω)= 2 e−j^4 ω −π≤ω < π

(a) Carefully plot the magnitude and the phase ofX(ejω). Is the phase linear?
(b)Use the MATLAB functionsfreqzandangleto compute the phase ofX(ejω)and then plot it. (Hint:
Letz=ejωto be able to usefreqz.) Does the phase computed by MATLAB appear linear? What are
the maximum and minimum values of the phase, and how many radians separate the minimum from
the maximum?
(c) Now, recalculate the phase, but after usingangleuse the functionunwrappingin the resulting phase
and plot it. Does the phase appear linear?

10.13. Linear phase and symmetry—MATLAB
Consider the signalx[n]=Aδ[n]+u[n+9]−u[n−10].
(a) Carefully plotx[n]. Find the Z-transformX(z)ofx[n]and from itX(ejω), the DTFT ofx[n]. Find the
value ofAso that the phase ofX(ejω)is zero. Use MATLAB to verify your results.
(b)Consider nowx 1 [n]=x[n−9], and use the value ofAfound before. Carefully plotx 1 [n]and find its
DTFT using the Z-transformX 1 (z). Is its phase linear? Use MATLAB to verify your results. Usefreqz,
angle, andunwrapto compute the phase.

Free download pdf