Impulse response€ y n[ ]= bkx n − k[ ]k= 0M∑FIR filter€ x n[ ]=δ[n] =1 n = 00 otherwise Delta function€ y n[ ]x=δ[n ]= h[n] = bkδn − k[ ]k= 0M∑impulse response€ y n[ ]= h[n]x n − k[ ]k=−∞∞∑convolution sumLTI: FIR, IIRFrequency response€ y n[ ]= h k[ ]x n − k[ ]k= 0M∑convolution€ x n[ ]= Aejφejˆ ω nComplex exponential input€ y n[ ]= h k[ ]Aejφejˆ ω n−k( )k= 0M∑frequency response€ = h k[ ]e− jˆ ω kk= 0M∑ Aejφejˆ ω n€ = Hˆ ω ( )Aejφejˆ ω n€ Hˆ ω ( )€ Hˆ ω ( )= h[k]ejˆ ω kk= 0M∑let€ ˆ ω =ωTs€ y n[ ]= h k[ ]x n − k[ ]k= 0M∑convolution€ x n[ ]= Aejφejˆ ω ncomplex exponential input€ y n[ ]= Hˆ ω ( )Aejφejˆ ω nfrequency responsecomplex€ Hˆ ω ( )= h[k]ejˆ ω kk= 0M∑€ y n[ ]= Hˆ ω ( )Aejφ+∠Hˆ ω ( )( )ejˆ ω noutput same frequencyas input, but amplitude scaledand a phase shiftLTI: FIR & IIRsystem€ x n[ ]=δn[ ]€ n x n[ ]0 11 02 03 04 0> 5 0 € h n[ ]= y n[ ]x[n ]=δ[ n ]€ y[n]1/ 301/ 301/ 30 € y n[ ]= ?Ex.€ y n[ ]=13x n[ ]+13x n − 2[ ]+13x n − 4[ ]€ h n[ ]=13δn[ ]+13δn − 2[ ]+13δn − 4[ ]€ Hˆ ω ( )= h[k]e− jˆ ω kk=04∑= h[0]e− jˆ ω 0+ h[2]e− jˆ ω 2+ h[4]e− jˆ ω 4=13+13e− jˆ ω 2+13e− jˆ ω 4=131+ e− jˆ ω 2+ e− j 2ˆ ω 4( )=13e− jˆ ω 2ejˆ ω 2+1+ e− jˆ ω 2( )=13e− jˆ ω 21+ 2 cos 2ˆ ω ( )FIRif bk’s symmetric, then factor out where M is the order ofthe filter. This leaves complex conjugate paired exponentialsto transform into trigonometricfunctions (cosines/sines).€ e− jˆ ω ( M /2)Also try by inspection-3 -2 -1 0 1 2 3-1-0.500.51-3 -2 -1 0 1 2 3-3-2-10123€ Hˆ ω ( )=13e− jˆ ω 21+ 2 cos 2ˆ ω ( )€ Hˆ ω ( )=131+ 2 cos 2ˆ ω ( )€ ∠Hˆ ω ( )= −2ˆ ω € ∠H −ˆ ω ( )= −∠Hˆ ω ( )€ Hπ3( )= 0Note:linear phase€ Hˆ ω ( )€ ∠Hˆ ω ( )principal value of phase fnzeros€ 131+ 2 cos 2ˆ ω ( )€ −π< ∠Hˆ ω ( )<πif not, add multiples of € 2πWant positive magnitudes, so absorb negative sign into phase by addingan additional at each zero€ Hˆ ω ( )≥ 0€ H2π3( )= 0€ π€ ˆ ω-3 -2 -1 0 1 2 3-1-0.500.51-3 -2 -1 0 1 2 3-3-2-10123€ ∠Hˆ ω ( )= −2ˆ ω =−2ˆ ω 0 ≤ˆ ω <π3−2ˆ ω +π π3 ≤ˆ ω < 2π3−2ˆ ω + 2π2π/ 3 ≤ˆ ω <π Note:€ Hˆ ω ( )=13e− j 2ˆ ω 1+ 2 cos 2ˆ ω ( )€ Hˆ ω ( )=131+ 2 cos 2ˆ ω ( )€ ∠H −ˆ ω ( )= −∠Hˆ ω ( )linear phase€ Hˆ ω ( )€ ∠Hˆ ω ( )€ ˆ ω principal value of phase fnzero€ −π< ∠Hˆ ω ( )<πphase odd functionband stop filter€ Hπ3( )= 0€ H2π3( )= 0€ 131+ 2 cos 2ˆ ω ( )-3 -2 -1 0 1 2 3-3-2-10123€ ∠Hˆ ω ( )= −2ˆ ω =−2ˆ ω 0 ≤ˆ ω <π2−2ˆ ω + 2π π2 ≤ˆ ω < 3π2 linear phase,2 sample delay€ ∠Hˆ ω ( )€ ˆ ω delay of n0 sample periods€ y[n] = x n − n0[ ]€ Hˆ ω ( )= e− jˆ ω n0€ Hˆ ω ( )= 1€ ∠Hˆ ω ( )= −n0ˆ ω linear phaseFIR filters are linear phase ifthe coefficients are symmetrichigher frequencies need larger phase shiftsthan lower frequencies to achieve same timedelay€ y = sinω(t + nTs)( )= sin(ωt +ωnTs)= sin(ωt +φ)€ φ= TsnωLinear PhaseLinear Phase“These are the pulse responses of each of the filters.The pulse response is nothing more than a positivegoing step response followed by a negative going step response. The pulse response is usedhere because it displays what happens to both the rising and falling edges in a signal. Here is the important part: zero and linear phase filters have left and right edges that look the same,while nonlinear phase filters have left and right edges that look different. Many applications cannot tolerate the left and right edges looking different. One example is thedisplay of an oscilloscope, where this difference could be misinterpreted as a feature of the signal beingmeasured. Another example is in video processing. Can you imagine turning on your TV tofind the left ear of your favorite actor looking different from his right ear?”http://www.dspguide.com/ch19/4.htm“For data transmission, a nonlinearphase delay causes intersymbolinterference which increases errorrate, particulary if the signal-to-noise ration is poor” - Digital SignalProcessing in CommunicationSystems By Marvin E. Frerking“It turns out that, within very generoustolerances, humans are insensitive to[audio] phase shifts. …”- Floyd E. Toole,PhDVice President Acoustical EngineeringHarman International Industries, Inc.FREQZ Z-transform digital filter frequency response. When N is an integer, [H,W] = FREQZ(B,A,N) returns the N-point frequency vector W in radians and the N-point complex frequency response vector H of the filter B/A: -1 -nb jw B(z) b(1) + b(2)z + .... + b(nb+1)z H(e) = ---- = ---------------------------- -1 -na A(z) 1 + a(2)z + .... + a(na+1)z given numerator and denominator coefficients in vectors B and A.<snip> FREQZ(B,A,...) with no output arguments plots the magnitude and unwrapped phase of B/A in the current figure window.€ Hˆ ω ( )=13e−2 jˆ ω 1+ 2 cos 2ˆ ω ( )=13+13e− jˆ ω 2+13e− jˆ ω 4€ Hˆ ω ( )=13+13z−2+13z−41€ z−1= e− jˆ ω € b(1) =13,b (2) = 0,b(3) =13,b(4) = 0,b(5) =13a(1) = 1>> freqz([1/3,0,1/3,0,1/3],[1])0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-150-100-50050100150Normalized frequency (Nyquist == 1)Phase (degrees)TextEnd0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-60-50-40-30-20-100Normalized frequency (Nyquist == 1)Magnitude Response (dB)TextEnddecibels (dB) = 20log10(|H|)Bode Plot (frequency response curve, amp and phase)>> freqz([1/3,0,1/3,0,1/3],[1])€ Hˆ ω ( )=13e− j 2ˆ ω 1+ 2 cos 2ˆ ω ( )=13+13e− jˆ ω 2+13e− jˆ ω 4Note: In this plot thenormalized frequency goesfrom DC to Nyquist (ω =π ),so this is just one side.We normally plot from-π< ω < π.Remember:For real filter coefficients,magnitude is an even function;phase is an odd function∧∧Magnitude response is plottedon a logarithmic
View Full Document