Digital Signal Processing Reference
In-Depth Information
(b) [ones(1,10),zeros(1,20),ones(1,10),zeros(1,20)]
(c) b = fir1(21,0.5)
(d) [1,0,1]
(e) [1,0,1,0,1,0,1]
(f ) [1,0,1,0,1,0,1,0,1,0,1,0,1]
(g) [1,0,1,0,1,0,1,0,1,0,1,0,1].*hamming(13)'
(h) [1,0,1,0,1,0,1,0,1,0,1,0,1].*blackman(13)'
(i) [1,0,1,0,1,0,1,0,1,0,1,0,1].*kaiser(13,5)'
(j) [1,0,-1,0,1,0,-1,0,1,0,-1,0,1].*hamming(13)'
(k) [1,0,-1,0,1,0,-1,0,1,0,-1,0,1].*blackman(13)'
(l) [1,0,-1,0,1,0,-1,0,1,0,-1,0,1].*kaiser(13,5)'
(m) [real(j.ˆ(0:1:10))].*blackman(11)'
(n) [real(j.ˆ(0:1:20))].*blackman(21)'
(o) [real(j.ˆ(0:1:40))].*blackman(41)'
(p) [real(j.ˆ(0:1:80))].*blackman(81)'
3. Write a script that can receive b and a difference equation coefficients (according to Eq. (1.13)) in row
vector form (normalized so a 0 = 1), compute, and display the following:
(a) The unit impulse response of the system defined by b and a .
(b) The unit step response of the system.
(c) The magnitude and phase of the DTFT.
(d) The response to a linear chirp of length 1024 samples and frequencies from 0 to 512 Hz (0 to
π radians in normalized frequency).
(e) The magnitude of response to a complex linear chirp of length 1024 samples and frequencies
from 0 to 512 Hz (0 to π radians in normalized frequency). Such a chirp can be generated by the following
code:
N = 1024; t = 0:1/N:1;y=chirp(t,0,1,N/2) + ...
j*chirp(t,0,1,N/2,'linear',90)
(f ) The response to a signal of length 1024 samples containing a cosine of frequency 128.
(g) The response to a signal of length 1024 samples containing a cosine of frequency 256.
Use the script to evaluate the LTI systems defined by the following difference equations or b and
a coefficients. You should note that some of the systems are not stable. Compare the plot of DTFT
magnitude to the two chirp responses for each of the difference equations below. Where can the steady-
state magnitude of the responses specified in (b), (f ), and (g) above be found on the DTFT magnitude
plot? State whether each of the systems is stable or unstable.
(I) y[n] = x[n] + x[n-1] + 0.9y[n-1]
(II) y[n] = x[n] + 1.4y[n-1] - 0.81y[n-2]
(III) y[n] = x[n] + 1.4y[n-1] + 0.81y[n-2]
(IV) y[n] = x[n] - 2.45y[n-1] +2.37y[n-2] -0.945y[n-3]
(V) y[n] = x[n] +1.05y[n-1]
(VI) y[n] = 0.094x[n] + 0.3759x[n-1] + 0.5639x[n-2] + 0.3759x[n-3] + ...
0.094x[n-4] + 0.486y[n-2] + 0.0177y[n-4]
(VII) b = [0.6066,0,2.4264,0,3.6396,0,2.4264,0,0.6066];
a = [1,0,3.1004,0,3.7156,0,2.0314,0,0.4332]
4. For the following different functions, compute the DTFT, then plot the function on a first subplot
and its DTFT magnitude on a second subplot. The sinc function can be evaluated using the function
Search WWH ::




Custom Search