Filter structures ELEC-E5410
Contents FIR filter basics Ideal impulse responses Polyphase decomposition Fractional delay by polyphase structure Nyquist filters Half-band filters Gibbs phenomenon Discrete-time differentiator Hilbert transformer 2
Basic concepts Finite impulse response filters (FIR) Infinite impulse response filters (IIR) 3
Basic concepts Linear-phase FIR filters, types I-IV Odd/even length, symmetrical/anti-symmetrical Group delay Magnitude response H(e jω )
Basic concepts Impulse responses of FIR types I-IV Symmetric/antisymmetric odd/even length Ceil(N/2) independent parameters, N is the filter order Structure implies linear phase 5
Basic concepts Zero-phase/amplitude response Impossible to implement in practice, but easy to implement when causality is relaxed Unlike magnitude response, can be negative Zero-phase response of symmetric even-order N (Type I) FIR filter H(e j! )=e j!n/2 H(!) X H(!) =h[ N N/2 2 ]+2 X n=1 h[ N 2 n] cos(n!) Zero-phase response of Type I-IV FIR filters H(e j! )=e j!n/2 e j H(!) 6
Basic concepts Translation of filter s pass-band Modulation of filter coefficients Complementary filter G(z) = z -N/2 H(z) 7
Some ideal filter types Ideal lowpass filter Ideal highpass filter Ideal bandpass filter Ideal bandstop filter Ideal Hilbert transformer (90 deg phase shifter) Ideal integrator Ideal differentiator 8
Polyphase decomposition R.W. 9
Polyphase decomposition Consider the z-transform of sequence x[n] X(z) can be rewritten as Subsequences x k [n] are called polyphase components of x[n] Functions X k (z) are called polyphase components of X(z) R.W. 10
Type 1 polyphase decomposition Polyphase decomposition of FIR filter H(z) The structure is used to change filtering and downsampling to down-sampling and filtering The number of operations remains the same but the filter operates at lower frequency
Type 1 polyphase decomposition Transpose of the polyphase decomposition of FIR filter H(z) The structure is used to change up-sampling and filtering into filtering and upsampling
Type 2 polyphase decomposition Obtained by setting R i (z M ) = E M-i (z M ) In case of fractional sampling rate change L/M, polyphase decomposition can be used to filter at rate F s /M instead of LF s where F s refers to the original sampling rate
Computationally efficient decimator R.W. 14
Computationally efficient interpolator Type I Type II R.W. 15
Commutator representation of interpolation and decimation with polyphase structure interpolation decimation 16
Polyphase fractional sampling/ fractional delay filter Polyphase structure for P/Q fractional sampling Stage r provides a delay equal to r/p of the input sampling interval. Number of stages sets the resolution. h 0 (n) 1:Q h 1 (n) h P-2 (n) Commutator steps through branches with the increments of Q. h P-1 (n)
Polyphase fractional sampling/ fractional delay filter Suppose that we want to calculate the output in the place r+d (r +d needn t be rational any more) between the stages r and r+1. Linear interpolation of filter outputs between the nearest neighbors can be interpreted as interpolation of filter coefficients.
Nyquist filters
Nyquist filters/lth-band filters Under certain conditions, a low-pass filter can be designed to have a number of zero-valued coefficients When used as interpolation filters these filters preserve the nonzero samples of the up-sampler output at the interpolator output Due to the presence of zero-valued coefficients, these filters are computationally more efficient than other low-pass filters of the same order The structure is computationally attractive This is different from the sparse filter F(z L ) in IFIR, though Nyquist filters (root raised cosine) are typically used for pulse shaping in wireless transceivers
Nyquist filters Consider the factor-of-l interpolator x[n] X ΗL H(z) y[n] The input-output relation of the interpolator in the z-domain is Y (z) =H(z)X(z L ) H(z) in the L-branch polyphase form H(z) = LX 1 k=0 z k E k (z L ) 21
Nyquist filters Suppose that the ith polyphase component is a constant Then we can express Y(z) as H(z) =E 0 (z L )+ + z i+1 E i 1 (z L )+ z i + z i 1 E i+1 (z L )+ + z L+1 E L 1 (z L ) X Y (z) = z i X(z L )+ LX 1 k=0 k6=i X z k E k (z L )X(z L ) Therefore, ( y[ln + i] = x[n], 8n Thus, the input samples appear at the output without any distortion for all values of n, whereas, in-between output samples are determined by interpolation 22
Nyquist filters X Impulse response of an Lth band filter for i=0 satisfies h(ln) = (, n =0 0, otherwise X Example: Impulse response of a 2 nd -band (half-band) low-pass filter Every 2 nd coefficient is zero, except the center point 23
Half-band filters Impulse response of the half-band filter (L=2) satisfies The length is constrained to 4k + 3, k= 0,1,2, The transfer function is given by Therefore, 24
Half-band filters If the filter has real coefficients Thus, The frequency response is symmetrical w.r.t. half-band frequency π/2 25
Half-band filters Zero-phase response of a half-band filter Here in linear scale Can be negative Non-causal Symmetrical w.r.t. π/2 26
Design of Nyquist filters Several different ways to design A low-pass linear-phase Lth-band FIR filter can be readily designed via the windowed Fourier series approach The impulse response coefficients of the low-pass filter are given by h[n] = h lp [n] w[n], where h lp [n] is the impulse response of Xthe ideal low-pass filter with cut-off π/l and w[n] is a window function The impulse response of the ideal low-pass filter with cut-off π/l h lp [n] = sin( n/l), 1 apple n apple1 n Every Lth filter coefficient is zero 27
Design of Nyquist filters Impulse responses of ideal low-pass filter (sinc) with cut-off π/2, Hamming window used to weight the sinc pulse and the resulting half-band filter Hamming window w[n] = 0.54 + 0.46 cos 2 n 2N +1 Other windows: Bartlett, Hann, Blackman, Kaiser, Chebyshev, N apple n apple N 28
Design of Nyquist filters Magnitude responses of the half-band filters using Hamming window or rectangular window The latter gives rise to Gibbs phenomenon 29
Gibbs phenomenon Oscillatory behavior in the magnitude responses of causal FIR filters obtained by truncating the impulse response coefficients of ideal filters Reasons for oscillations: - h lp [n] is infinitely long and not absolutely summable, and hence filter is unstable - Rectangular window has an abrupt transition to zero Gibbs phenomenon can be reduced either: - Using a window that tapers smoothly to zero at each end, or - Providing a smooth transition from passband to stopband in the magnitude specifications 30
Gibbs phenomenon As the length of the lowpass filter is increased, the number of ripples in both pass-band and stop-band increases, with a corresponding decrease in the ripple widths Height of the largest ripples remain the same independent of the length 31
Gibbs phenomenon One instance of convolution of the sinc and rectangle in frequency domain corresponding to rectangular windowing of the ideal low-pass filter in time domain 32
Gibbs phenomenon Two-sided magnitude response after rectangular windowing of the ideal lowpass filter 33
Differentiator
Differentiator Employed to perform the differentiation operation on the discrete-time version of a continuous-time signal A practical discrete-time differentiator is used to perform the differentiation operation in the low frequency range and is thus designed to have a linear magnitude response from dc to a frequency smaller than π No need to boost high-frequency noise
Digital differentiator in time From inverse Fourier transform Ideal frequency response of discrete-time differentiator Ideal impulse response
Digital differentiator First-difference differentiator/ zero-order FIR high-pass filter Main drawback of the firstdifference differentiator is that it also amplifies the high frequency noise Does not match to the impulse response in the previous page 37
Digital differentiator first-order differentiator Matches to the differentiator s impulse response Attenuates high frequencies Correponds to the formula of numerical derivation 38
Design Example: Applying rectangular window to the impulse response of the order 40 Gibbs phenomenon hits again One design option is to apply windowing, other than rectangular, to the ideal impulse response 39
Design by Taylor series Consider the impulse response of the form On the unit circle The approximation becomes 40
Design by Taylor series Taylor series expansion of sin() The first approximation: The second approximation: Choose coefficients to cancel higher order terms 41
Design by Taylor series Magnitude responses of different approximations 42
Hilbert transformer 43
Analytic signal A discrete-time analytic signal has a zero-valued spectrum for all negative frequencies Such a signal finds applications in, e.g., single-sideband digital communication systems and in envelope detection Analytic signal is a complex signal whose imaginary part is the Hilbert transform of a real signal
Hilbert transform Consider the analytic signal when x[n] and x [n] are real signals and x [n] is the Hilbert transform of x[n] When y[n] is an analytic signal This is satisfied when 45
Hilbert transform Imaginary part of the analytic signal is obtained by passing the real signal x[n] through the filter There is discontinuity in spectrum at π so the impulse response if of infinite length 46
Design Option 1: Apply windowing to the ideal impulse response Option 2: Take a half-band filter, subtract the center tap and do a frequency translation by modulating filter coefficients by exp(jnπ/2), and scale by 2. When H (z) is a half-band filter + several other ways 47