Professional Documents
Culture Documents
CP_11_11_2016_Solved
CP_11_11_2016_Solved
CP_11_11_2016_Solved
1.- Compute the z-transform and ROC for the following discrete-time signal: (2p)
𝒏
𝒙(𝒏) = 𝟐 𝒏 > 𝟎 𝒂𝒏𝒅 𝒆𝒗𝒆𝒏 𝒏
x(n) = 0 n ≤ 0 or odd n
∞
𝑟
∑ 𝑘𝑟 𝑘 =
(1 − 𝑟)2
0
𝑋(𝑧) = 𝑧 −2 + 2𝑧 −4 + 3𝑧 −6 + 4𝑧 −8 + ⋯
∞
𝑧 −2
𝑋(𝑧) = ∑ 𝑘(𝑧 −2 )𝑘 =
(1 − 𝑧 −2 )2
0
2.-In matlab pseudocode, design the best filter that meets the following conditions using the
window method: (2p)
The filter that achieves the best ripple and attenuation fulfilling the transition band is Hamming
(with 33 coefficients). Once Hamming window is selected, incrementing the number of
coefficients will not improve ripple and attenuation. Steps:
2.b.- Which are the stopband attenuation and ripple of the filter? (0.5 p.)
Ripple: 0.0149 dB. Attenuation: 53 dB.
3.- Explain the main advantages and disadvantages of FIR and IIR filters (2p.)
1.- FIR filters can have (usually have) linear phase, whereas IIR cannot.
2.- FIR filters are always stable (no poles). IIR filters can be unstable.
3.- Quantization issues are more sever for IIR than for FIR, due to the feedback.
4.- In Matlab pseudocode, write the implementation for a IIR filter of order N (2p.)
INPUT: x, OUTPUT: y
NUMBER OF SAMPLES L
x_last=zeros(1,N);
y_last=zeros(1,N);
for l=0:L-1
x_last=[x(l), x_last(1:N-1)];
for n=0:N-1
y_now=y_now+b(n+1)x_last(n+1);
if (n<N-1) y_now=y_now+a(n+2)y_last(n+1);
end;
y(l)=y_now;
end;
y_last=[y, y_last(1:N-1)];
end
5.- Design a high-pass IIR filter parting from the following analog filter with digital
normalized cut-off frequency of 0.2 (Q and H0 are just constants): (2p.)
Desired w0=ktan(2*pi*0.2/2)=0.72
Useful material:
Window functions: