EEE443 Digital Signal Processing - Digital Filter Design
Total Page:16
File Type:pdf, Size:1020Kb
- EEE443 Digital Signal Processing - Digital Filter Design Dr. Shahrel A. Suandi PPKEE, Engineering Campus, USM Introduction • Filter design needs – The filter specifications • Constraints on magnitude and/or phase of the frequency response • Constraints on the unit sample response or step response of the filter • Specifications of the type of filter (i.e. FIR or IIR) • Filter order – A set of filter coefficients – Implementation in hardware or software – Quantization the filter coefficients (if necessary) – Choosing an appropriate filter structure Filter Specifications (1) • Prior to designing a filter, we need to define a set of filter specifications – Filter type (e.g.: low-pass filter) – Cutoff frequency – Frequency response (of an ideal low-pass filter with linear phase) – which has a unit sample response • Due to this filter is unrealizable (non-causal and unstable), it is necessary to relax the ideal constraints on the frequency response and allow some deviation from the ideal response Filter Specifications (2) • The specifications for a low-pass filter are as shown in the figure below Passband Stopband Transition Passband deviation Band Passband cutoff frequency Stopband cutoff frequency Stopband deviation FIR Filter Design • The frequency response of an Nth-order causal FIR filter is • Designing FIR filter involves – Finding the coefficients that result in a frequency response satisfies a given set of filter specifications • Advantages over IIR filters – Guaranteed to be stable (even after the filter coefficients have been quantized) – Easy to be constrained to have linear phase (we will consider the design of linear phase FIR filters) Methods to Design FIR Filters • There are two methods exist to design FIR filters – Window method – Optimal method (Equiripple method) Window Method • : unit sample response of an ideal with linear phase • Because will generally be infinite in length, we need to find an FIR approximation to • With this window design method, the filter is designed by windowing the unit sample response Window Method (Cont’d) • is a finite-length window – equal to zero outside the interval and is symmetric about its midpoint: • Effect of the window on the frequency response – Frequency response is smoothed by the DTFT of the window Windows for Window Design Window Type Mathematical Expression Rectangular Hanning Hamming Blackman Determination of how well the filter is designed… • How well the frequency response of a filter designed with the window design method approximates the desired response is determined by two factors: – The width of the main lobe of – The peak sidelobe amplitude of • Ideal case: – Main lobe shall be narrow However, cannot be minimized independently due to it is a – Side-lobe shall be small fixed-length window General Properties of Windows 1. As the length N of the window increases, the width of the main lobe decreases, which results in a decrease n the transition width between passbands and stopbands. This relationship is given approximately by . where is the transition width and is a parameter that depends on the window 2. The peak side-lobe amplitude of the window is determined by the shape of the window, and it is essentially independent of the window length 3. If the window shape is changed to decrease the side lobe amplitude, the width of the main lobe will generally increase Graphical Representation of Main-lobe and Side-lobe Rectangular window 30 main lobe 20 M = 10 side lobe 10 M = 4 Amplitude 0 -10 -1 -0.5 0 0.5 1 w/p Table of side-lobe amplitudes of several windows, transition width and stopband attenuation Side-Lobe Transition Width Stopband Window Amplitude (dB) (∆f) Attenuation Rectangular -13 0.9/N -21 Hanning -31 3.1/N -44 Hamming -41 3.3/N -53 Blackman -57 5.5/N -74 Example 1 Optimal Method (Equiripple Method) • Problems arised from window method – the filter is not optimal – The passband and stopband deviations and are approximately equal. Although it is common to require to be much smaller than , these parameters cannot be independently controlled in the window design method. Therefore, with the window design method, it is necessary to overdesign the filter in the passband in order to satisfy the stricter requirements in the stopband – For most windows, the ripple is not uniform in either the passband or the stopband and generally decreases when moving away from the transition band. Allowing the ripple to be uniformly distributed over the entire band would produce a smaller peak ripple. • Equiripple linear phase filter – optimal in the sense that the magnitude of the ripple is minimized in all bands of interest for a given filter order N – Consider only on the type I linear phase digital filter • Optimal method (equiripple method) of calculation FIR filter coefficients is very powerful, very flexible and very easy to apply. What is this actually? Not equal ripple (if window method is used) Basic Concepts • Please refer to the documents provided (Additional Notes) .