EEE443 Digital Signal Processing - Digital Filter Design

Total Page:16

File Type:pdf, Size:1020Kb

EEE443 Digital Signal Processing - Digital Filter Design - 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) .
Recommended publications
  • Classic Filters There Are 4 Classic Analogue Filter Types: Butterworth, Chebyshev, Elliptic and Bessel. There Is No Ideal Filter
    Classic Filters There are 4 classic analogue filter types: Butterworth, Chebyshev, Elliptic and Bessel. There is no ideal filter; each filter is good in some areas but poor in others. • Butterworth: Flattest pass-band but a poor roll-off rate. • Chebyshev: Some pass-band ripple but a better (steeper) roll-off rate. • Elliptic: Some pass- and stop-band ripple but with the steepest roll-off rate. • Bessel: Worst roll-off rate of all four filters but the best phase response. Filters with a poor phase response will react poorly to a change in signal level. Butterworth The first, and probably best-known filter approximation is the Butterworth or maximally-flat response. It exhibits a nearly flat passband with no ripple. The rolloff is smooth and monotonic, with a low-pass or high- pass rolloff rate of 20 dB/decade (6 dB/octave) for every pole. Thus, a 5th-order Butterworth low-pass filter would have an attenuation rate of 100 dB for every factor of ten increase in frequency beyond the cutoff frequency. It has a reasonably good phase response. Figure 1 Butterworth Filter Chebyshev The Chebyshev response is a mathematical strategy for achieving a faster roll-off by allowing ripple in the frequency response. As the ripple increases (bad), the roll-off becomes sharper (good). The Chebyshev response is an optimal trade-off between these two parameters. Chebyshev filters where the ripple is only allowed in the passband are called type 1 filters. Chebyshev filters that have ripple only in the stopband are called type 2 filters , but are are seldom used.
    [Show full text]
  • Electronic Filters Design Tutorial - 3
    Electronic filters design tutorial - 3 High pass, low pass and notch passive filters In the first and second part of this tutorial we visited the band pass filters, with lumped and distributed elements. In this third part we will discuss about low-pass, high-pass and notch filters. The approach will be without mathematics, the goal will be to introduce readers to a physical knowledge of filters. People interested in a mathematical analysis will find in the appendix some books on the topic. Fig.2 ∗ The constant K low-pass filter: it was invented in 1922 by George Campbell and the Running the simulation we can see the response meaning of constant K is the expression: of the filter in fig.3 2 ZL* ZC = K = R ZL and ZC are the impedances of inductors and capacitors in the filter, while R is the terminating impedance. A look at fig.1 will be clarifying. Fig.3 It is clear that the sharpness of the response increase as the order of the filter increase. The ripple near the edge of the cutoff moves from Fig 1 monotonic in 3 rd order to ringing of about 1.7 dB for the 9 th order. This due to the mismatch of the The two filter configurations, at T and π are various sections that are connected to a 50 Ω displayed, all the reactance are 50 Ω and the impedance at the edges of the filter and filter cells are all equal. In practice the two series connected to reactive impedances between cells.
    [Show full text]
  • Constant K Low Pass Filter
    Constant k Low pass Filter Presentation by: S.KARTHIE Assistant Professor/ECE SSN College of Engineering Objective At the end of this section students will be able to understand, • What is a constant k low pass filter section • Characteristic impedance, attenuation and phase constant of low pass filter. • Design equations of low pass filter. Low Pass Ladder Networks • A low-pass network arranged as a ladder or repetitive network. Such a network may be considered as a number of T or ∏ sections in cascade. Low Pass Ladder Networks • a T section may be taken from the ladder by removing ABED, producing the low-pass filter section shown A B L/2 L/2 L/2 L/2 D E Low Pass Ladder Networks • Similarly a ∏ -network is obtained from the ladder network as shown L L L C C C C 2 2 2 2 Constant- K Low Pass Filter • A ladder network is shown in Figure below, the elements being expressed in terms of impedances Z1 and Z 2. Z1 Z1 Z1 Z1 Z1 Z1 Z2 Z2 Z Z 2 2 Z2 Constant- K Low Pass Filter • The network shown below is equivalent one shown in the previous slide , where ( Z1/2) in series with ( Z1/2) equals Z1 and 2 Z2 in parallel with 2 Z2 equals Z2. AB F G Z1/2 Z1/2 Z1/2 Z1/2 Z1 Z1 Z1 2Z Z2 Z2 2Z 2 2Z 2 2Z 2 2Z 2 2 D E J H Constant- K Low Pass Filter • Removing sections ABED and FGJH from figure gives the T & ∏ sections which are terminated in its characteristic impedance Z OT &Z0∏ respectively.
    [Show full text]
  • And Elliptic Filter for Speech Signal Analysis Design And
    Design and Implementation of Butterworth, Chebyshev-I and Elliptic Filter for Speech Signal Analysis Prajoy Podder Md. Mehedi Hasan Md.Rafiqul Islam Department of ECE Department of ECE Department of EEE Khulna University of Khulna University of Khulna University of Engineering & Technology Engineering & Technology Engineering & Technology Khulna-9203, Bangladesh Khulna-9203, Bangladesh Khulna-9203, Bangladesh Mursalin Sayeed Department of EEE Khulna University of Engineering & Technology Khulna-9203, Bangladesh ABSTRACT and IIR filter. Analog electronic filters consisted of resistors, In the field of digital signal processing, the function of a filter capacitors and inductors are normally IIR filters [2]. On the is to remove unwanted parts of the signal such as random other hand, discrete-time filters (usually digital filters) based noise that is also undesirable. To remove noise from the on a tapped delay line that employs no feedback are speech signal transmission or to extract useful parts of the essentially FIR filters. The capacitors (or inductors) in the signal such as the components lying within a certain analog filter have a "memory" and their internal state never frequency range. Filters are broadly used in signal processing completely relaxes following an impulse. But after an impulse and communication systems in applications such as channel response has reached the end of the tapped delay line, the equalization, noise reduction, radar, audio processing, speech system has no further memory of that impulse. As a result, it signal processing, video processing, biomedical signal has returned to its initial state. Its impulse response beyond processing that is noisy ECG, EEG, EMG signal filtering, that point is exactly zero.
    [Show full text]
  • Filter Approximation Concepts
    622 (ESS) 1 Filter Approximation Concepts How do you translate filter specifications into a mathematical expression which can be synthesized ? • Approximation Techniques Why an ideal Brick Wall Filter can not be implemented ? • Causality: Ideal filter is non-causal • Rationality: No rational transfer function of finite degree (n) can have such abrupt transition |H(jω)| h(t) Passband Stopband ω t -ωc ωc -Tc Tc 2 Filter Approximation Concepts Practical Implementations are given via window specs. |H(jω)| 1 Amax Amin ω ωc ωs Amax = Ap is the maximum attenuation in the passband Amin = As is the minimum attenuation in the stopband ωs-ωc is the Transition Width 3 Approximation Types of Lowpass Filter 1 Definitions Ap As Ripple = 1-Ap wc ws Stopband attenuation =As Filter specs Maximally flat (Butterworth) Passband (cutoff frequency) = wc Stopband frequency = ws Equal-ripple (Chebyshev) Elliptic 4 Approximation of the Ideal Lowpass Filter Since the ideal LPF is unrealizable, we will accept a small error in the passband, a non-zero transition band, and a finite stopband attenuation 1 퐻 푗휔 2 = 1 + 퐾 푗휔 2 |H(jω)| • 퐻 푗휔 : filter’s transfer function • 퐾 푗휔 : Characteristic function (deviation of 푇 푗휔 from unity) For 0 ≤ 휔 ≤ 휔푐 → 0 ≤ 퐾 푗휔 ≤ 1 For 휔 > 휔푐 → 퐾 푗휔 increases very fast Passband Stopband ω ωc 5 Maximally Flat Approximation (Butterworth) Stephen Butterworth showed in 1930 that the gain of an nth order maximally flat magnitude filter is given by 1 퐻 푗휔 2 = 퐻 푗휔 퐻 −푗휔 = 1 + 휀2휔2푛 퐾 푗휔 ≅ 0 in the passband in a maximally flat sense 푑푘 퐾 푗휔
    [Show full text]
  • Design of a Cheap Compact Low-Pass Filter with Wide Stopband
    Advances in Modelling and Analysis C Vol. 73, No. 1, March, 2018, pp. 17-22 Journal homepage: http://iieta.org/Journals/AMA/AMA_C Design of a cheap compact low-pass filter with wide stopband Priyansha Bhowmik*, Tamasi Moyra Department of Electronics and Communication Engineering, National Institute of Technology, Agartala 799046, West Tripura, India Corresponding Author Email: [email protected] Received: 20 January 2018 ABSTRACT Accepted: 10 April 2018 In these work, a cheap and compact Low-Pass filter (LPF) with wide stopband is designed using modified hair-pin resonator. The first transmission zero is obtained from the transfer Keywords: function (TF) analysis of the hair-pin resonator. Further, open stubs are added to widen the low pass filter, wide stopband, hair-pin stopband. An approximate LC equivalent circuit of the proposed structure is derived and the resonator, open-stubs response is in accord with simulated result. A prototype of the proposed LPF is fabricated on FR4 substrate. The proposed LPF has -3 dB cut-off frequency at 1.1 GHz with wide stopband ranging from 1.6 GHz to 11.5 GHz. The size occupied by the proposed LPF is 15.8 mm x 14.3 mm. In the passband region, the insertion loss is -0.3 dB and return loss is better than -25 dB. The proposed LPF is measured and there is a good agreement between the simulated and measured results. 1. INTRODUCTION implemented using open stub to create transmission zero, the performance was satisfactory but the size was large compared Low-Pass Filter plays a dynamic role in supressing spurious to other circuits.
    [Show full text]
  • APPENDIX a to VOLUME A1 TIMS FILTER RESPONSES
    APPENDIX A to VOLUME A1 TIMS FILTER RESPONSES Appendix to Volume A1 A2 TIMS filter responses Appendix to Volume A1 TABLE OF CONTENTS TIMS filter responses ......................................................................................................... 5 Filter Specifications............................................................................................................ 7 3 kHz LPF (within the HEADPHONE AMPLIFIER)........................................................ 8 TUNEABLE LPF................................................................................................................ 9 BASEBAND CHANNEL FILTERS - #2 Butterworth 7th order lowpass ...................... 10 BASEBAND CHANNEL FILTERS - #3 Bessel 7th order lowpass ............................... 11 BASEBAND CHANNEL FILTERS - #4 ‘flat’ group delay 7th order lowpass ............. 12 60 kHz LOWPASS FILTER............................................................................................. 13 100 kHz CHANNEL FILTERS - #2 7th order lowpass .................................................. 14 100 kHz CHANNEL FILTERS - #3 6th order bandpass (type - 1)................................. 15 100 kHz CHANNEL FILTERS - #3 8th order bandpass (type - 2)................................. 16 TIMS filter responses A-3 Appendix to Volume A1 A4 TIMS filter responses Appendix to Volume A1 TIMS filter responses There are several filters in the TIMS system. In this appendix will be found the theoretical responses on which these filters are based. Except in the
    [Show full text]
  • The Scientist and Engineer's Guide to Digital Signal Processing
    CHAPTER 14 Introduction to Digital Filters Digital filters are used for two general purposes: (1) separation of signals that have been combined, and (2) restoration of signals that have been distorted in some way. Analog (electronic) filters can be used for these same tasks; however, digital filters can achieve far superior results. The most popular digital filters are described and compared in the next seven chapters. This introductory chapter describes the parameters you want to look for when learning about each of these filters. Filter Basics Digital filters are a very important part of DSP. In fact, their extraordinary performance is one of the key reasons that DSP has become so popular. As mentioned in the introduction, filters have two uses: signal separation and signal restoration. Signal separation is needed when a signal has been contaminated with interference, noise, or other signals. For example, imagine a device for measuring the electrical activity of a baby's heart (EKG) while still in the womb. The raw signal will likely be corrupted by the breathing and heartbeat of the mother. A filter might be used to separate these signals so that they can be individually analyzed. Signal restoration is used when a signal has been distorted in some way. For example, an audio recording made with poor equipment may be filtered to better represent the sound as it actually occurred. Another example is the deblurring of an image acquired with an improperly focused lens, or a shaky camera. These problems can be attacked with either analog or digital filters. Which is better? Analog filters are cheap, fast, and have a large dynamic range in both amplitude and frequency.
    [Show full text]
  • Analog Lowpass Filter Specifications
    Analog Lowpass Filter Analog Lowpass Filter Specifications Specifications • Typical magnitude response H a ( j Ω ) of an •In the passband, defined by 0 ≤ Ω ≤ Ω p , we analog lowpass filter may be given as require indicated below 1− δ p ≤ Ha ( jΩ) ≤1+ δ p , Ω ≤ Ω p i.e., H a ( j Ω ) approximates unity within an error of ± δ p •In the stopband, defined by Ω s ≤ Ω ≤ ∞ , we require Ha ( jΩ) ≤ δs , Ωs ≤ Ω ≤ ∞ i.e., H a ( j Ω ) approximates zero within an 1 2 error of δs Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra Analog Lowpass Filter Analog Lowpass Filter Specifications Specifications • Ω p - passband edge frequency • Magnitude specifications may alternately be •-Ωs stopband edge frequency given in a normalized form as indicated •-δ p peak ripple value in the passband below •-δs peak ripple value in the stopband • Peak passband ripple α p = −20log10 (1− δ p ) dB • Minimum stopband attenuation αs = −20log10(δs ) dB 3 4 Copyright © 2005, S. K. Mitra Copyright © 2005, S. K. Mitra Analog Lowpass Filter Analog Lowpass Filter Design Specifications • Two additional parameters are defined - • Here, the maximum value of the magnitude in the passband assumed to be unity Ω (1) Transition ratio k = p Ωs •-1/ 1+ ε 2 Maximum passband deviation, given by the minimum value of the For a lowpass filter k <1 magnitude in the passband ε (2) Discrimination parameter k = 1 A2 −1 •-1 Maximum stopband magnitude Usually k <<1 A 1 5 6 Copyright © 2005, S. K. Mitra Copyright © 2005, S.
    [Show full text]
  • Filter Banks – II Multi-Rate Signal Processing
    Filter Banks – II Multi-Rate Signal Processing Dr. Yogananda Isukapalli Concepts of Multi-Rate Signal Processing: 1. Decimation: Sampling rate reduction by integer factors after band-limiting the input signal The sampling rate of a sequence can be reduced by “sampling” it, i.e. by defining a new sequence xd[n] = x[nM] = xc(nMT) The Sampling rate compressor reduces the sampling rate from Fs to Fs /M. In frequency domain, it is equivalent to multiplying the original signal band-width by a factor M. Hence, if the signal is not band-limited to p / M, down-sampling results in aliasing as shown in this following Example. If this happens, the original signal cannot be recovered from the decimated version. -2p -p 0 p Decimation by M = ‘2’ -2p -p 0 p 2 Avoiding Aliasing: Aliasing can be avoided if x(n) is low-pass signal band-limited to the region |w| < p / M.. In most applications, the down-sampler is preceded by a low-pass digital filter called “decimation filter” x[n] w[n] y[n] h[n] ¯M Decimation filter Down-sampler To prevent aliasing at a lower rate, the digital filter h[k] is used to band-limit the input signal to less than Fs /2M beforehand. Sampling rate reduction is achieved by discarding M-1 samples for every M samples of the filtered signal w[n]. ¥ y[n] = w[nM ] = å h[k].x[nM - k] k=-¥ 3 2. Interpolation: Sampling rate increase by integer factors followed by anti-imaging filter. Interpolation is the digital equivalent of the digital-to-analog conversion where the analog signal is recovered by interpolating the digital samples applied to the D/A converter.
    [Show full text]
  • Chapter 4: Problem Solutions Digital Filters
    Chapter 4: Problem Solutions Digital Filters Problems on Non Ideal Filters à Problem 4.1 We want to design a Discrete Time Low Pass Filter for a voice signal. The specifications are: Passband Fp 4kHz, with 0.8dB ripple; Stopband FS 4.5kHz, with 50dB attenuation; Sampling Frequency Fs 22kHz. Determine a) the discrete time Passband and Stopband frequencies, b) the maximum and minimum values of H in the Passband and the Stopband, where H is the filter frequency response. Solution a) Recall the mapping from analog to digital frequency 2F Fs , with Fs the sampling fre- quency. Then the passband and stopband frequencies become p 2 4 22 rad 0.36 rad, s 2 4.5 22 rad 0.41 rad; b) A 0.8dB ripple means that the frequency response in the passband is within the interval 1 where is such that 20 log 1 0.8 This yields 100.04 1 0.096. Therefore the 10 frequency response within the passband is within the interval 0.9035 H 1.096. Similarly in the stopband the maximum value is H 1050 20 0.0031 à Problem 4.2 A Digital Filter has frequency response H such that 0.95 H 1.05 for 0 0.3 0 H 0.005 for 0.4 2 Solutions_Chapter4[1].nb Also let the sampling frequency be Fs 8kHz. Determine the Passband and Stopband frequencies in kHz, the Passband ripple and the Stopband attenuation in dB. Solution The passband ripple is given by 20 log10 1.05 0.42dB, and the attenuation in the stopband 20log100.005 46dB.
    [Show full text]
  • 3F3 – Digital Signal Processing (DSP)
    3F3 Digital Signal Processing Section 2: Digital Filters • A filter is a device which passes some signals 'more' than others (`selectivity’), e.g. a sinewave of one frequency more than one at another frequency. • We will deal with linear time-invariant (LTI) digital filters. • Recall that a linear system is defined by the principle of linear superposition: • If the linear system's parameters (coefficients) are constant, then it is Linear Time Invariant (LTI). [Some of the the material in this section is adapted from notes byDr Punskaya, Dr Doucet and Dr Macleod] TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A 3F3 Digital Signal Processing Write the input data sequence as: And the corresponding output sequence as: x 3F3 Digital Signal Processing The linear time-invariant digital filter can then be described by the difference equation: A direct form implementation of (3.1) is: xn = unit delay b0 bM yn a1 aN 3F3 Digital Signal Processing The operations shown in the Figure above are the full set of possible linear operations: • constant delays (by any number of samples), • addition or subtraction of signal paths, • multiplication (scaling) of signal paths by constants - (incl. -1), Any other operations make the system non-linear. Matlab filter functions 3F3 Digital Signal Processing Matlab has a filter command for implementation of linear digital filters. The format is y = filter( b, a, x); where b = [b0 b1 b2 ... bM ]; a = [ 1 a1 a2 a3 ... aN ]; So to compute the first P samples of the filter’s impulse
    [Show full text]