Lecture 6 - Design of Digital Filters



Similar documents
gloser og kommentarer til Macbeth ( sidetal henviser til "Illustrated Shakespeare") GS 96

Design of FIR Filters

Design of Efficient Digital Interpolation Filters for Integer Upsampling. Daniel B. Turek

ELEN E4810: Digital Signal Processing Topic 8: Filter Design: IIR

Lecture 9. Poles, Zeros & Filters (Lathi 4.10) Effects of Poles & Zeros on Frequency Response (1) Effects of Poles & Zeros on Frequency Response (3)

First, we show how to use known design specifications to determine filter order and 3dB cut-off

3.1 State Space Models

Time series analysis Matlab tutorial. Joachim Gross

Digital Signal Processing IIR Filter Design via Impulse Invariance

Em bedded DSP : I ntroduction to Digital Filters

Controllability and Observability

CHAPTER 6 Frequency Response, Bode Plots, and Resonance

Filter Comparison. Match #1: Analog vs. Digital Filters

Positive Feedback and Oscillators

SECTION 6 DIGITAL FILTERS

Controller Design in Frequency Domain

Transition Bandwidth Analysis of Infinite Impulse Response Filters

Frequency Response of Filters

HYBRID FIR-IIR FILTERS By John F. Ehlers

Introduction to Digital Filters

EE 402 RECITATION #13 REPORT

The Z transform (3) 1

Understanding Poles and Zeros

(Refer Slide Time: 01:11-01:27)

ECE 3510 Final given: Spring 11

CHAPTER 8 ANALOG FILTERS

The front end of the receiver performs the frequency translation, channel selection and amplification of the signal.

PYKC Jan Lecture 1 Slide 1

1995 Mixed-Signal Products SLAA013

Bode Diagrams of Transfer Functions and Impedances ECEN 2260 Supplementary Notes R. W. Erickson

Auto-Tuning Using Fourier Coefficients

The continuous and discrete Fourier transforms

UNIVERSITY OF CALIFORNIA AT BERKELEY College of Engineering Department of Electrical Engineering and Computer Sciences. EE105 Lab Experiments

Analog IIR Filter Design

A Basic Introduction to Filters Active Passive and Switched-Capacitor

8 Filtering. 8.1 Mathematical operation

LM833,LMF100,MF10. Application Note 779 A Basic Introduction to Filters - Active, Passive,and. Switched Capacitor. Literature Number: SNOA224A

chapter Introduction to Digital Signal Processing and Digital Filtering 1.1 Introduction 1.2 Historical Perspective

Designing a Linear FIR filter

Chapter Eight Root Locus Control Design. 8.3 Common Dynamic Controllers

Agilent Time Domain Analysis Using a Network Analyzer

Short-time FFT, Multi-taper analysis & Filtering in SPM12

SOFTWARE FOR GENERATION OF SPECTRUM COMPATIBLE TIME HISTORY

ANALYZER BASICS WHAT IS AN FFT SPECTRUM ANALYZER? 2-1

CIRCUITS LABORATORY EXPERIMENT 3. AC Circuit Analysis

Sampling and Interpolation. Yao Wang Polytechnic University, Brooklyn, NY11201

SIGNAL PROCESSING & SIMULATION NEWSLETTER

Time Series Analysis: Introduction to Signal Processing Concepts. Liam Kilmartin Discipline of Electrical & Electronic Engineering, NUI, Galway

SGN-1158 Introduction to Signal Processing Test. Solutions

The Effective Number of Bits (ENOB) of my R&S Digital Oscilloscope Technical Paper

Analog Filters. A common instrumentation filter application is the attenuation of high frequencies to avoid frequency aliasing in the sampled data.

EECE 460 : Control System Design

Continued Fractions and the Euclidean Algorithm

L9: Cepstral analysis

Frequency Response of FIR Filters

3.2. Solving quadratic equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

B3. Short Time Fourier Transform (STFT)

PRACTICAL GUIDE TO DATA SMOOTHING AND FILTERING

Applications of the DFT

The ASCII Character Set

SWISS ARMY KNIFE INDICATOR John F. Ehlers

Laboratory 4: Feedback and Compensation

Introduction to the Z-transform

2.161 Signal Processing: Continuous and Discrete Fall 2008

Laboratory #5: RF Filter Design

Appendix D Digital Modulation and GMSK

Digital Signal Processing Complete Bandpass Filter Design Example

Analog and Digital Signals, Time and Frequency Representation of Signals

24 Butterworth Filters

Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

Lecture 14. Point Spread Function (PSF)

Lab #9: AC Steady State Analysis

ADC and DAC. Quantization

ROUTH S STABILITY CRITERION

Analysis/resynthesis with the short time Fourier transform

Σ _. Feedback Amplifiers: One and Two Pole cases. Negative Feedback:

FFT Algorithms. Chapter 6. Contents 6.1

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

How to Design 10 khz filter. (Using Butterworth filter design) Application notes. By Vadim Kim

The Calculation of G rms

Fig. 1 :Block diagram symbol of the operational amplifier. Characteristics ideal op-amp real op-amp

Chapter 9: Controller design

Understanding CIC Compensation Filters

Probability and Random Variables. Generation of random variables (r.v.)

3.6. Partial Fractions. Introduction. Prerequisites. Learning Outcomes

Review of Fundamental Mathematics

DSP-I DSP-I DSP-I DSP-I

Sampling Theory For Digital Audio By Dan Lavry, Lavry Engineering, Inc.

Chapter 8 - Power Density Spectrum

Bipolar Transistor Amplifiers

NAPIER University School of Engineering. Electronic Systems Module : SE32102 Analogue Filters Design And Simulation. 4 th order Butterworth response

UNIVERSITY OF CALIFORNIA, SAN DIEGO Electrical & Computer Engineering Department ECE Fall 2010 Linear Systems Fundamentals

Implementation of the LMS Algorithm for Noise Cancellation on Speech Using the ARM LPC2378 Processor.

Introduction to Digital Audio

Digital filter design for electrophysiological data a practical approach

Understanding Power Impedance Supply for Optimum Decoupling

ab = c a If the coefficients a,b and c are real then either α and β are real or α and β are complex conjugates

AN105. Introduction: The Nature of VCRs. Resistance Properties of FETs

Sequences. A sequence is a list of numbers, or a pattern, which obeys a rule.

Correlation and Convolution Class Notes for CMSC 426, Fall 2005 David Jacobs

Transcription:

Lecture 6 - Design of Digital Filters 6.1 Simple filters There are two methods for smoothing a sequence of numbers in order to approximate a low-pass filter: the polynomial fit, as just described, and the moving average. In the first case, the approximation to a LPF can be improved by using a higher-degree polynomial: for example, instead of using a quadratic as in the example given in the previous lecture, we could have fitted a least-squares quartic to the original noisy data. The effect of using a higher-degree polynomial is to give both a higher degree of tangency at and a sharper cut-off in the amplitude response. An example of a simple moving-average filter is the Hanning filter, for which: This filter produces an output which is a scaled average of three successive inputs, with the centre point of the three weighted twice as heavily as its two adjacent neighbours. 6.1.1 Design by z-domain "! arguments #!$&% Taking the z-transfom we obtain a transfer "!!$' function of the form ' i.e.! ). Remember at!'(! which has two zeroes that this corresponds to a double damping at the Nyquist frequency. This will give attenuation of HF signals i.e. a LPF effect. Alternatively we could argue to put a 71

sampling ] function. pole at DC, some fraction *,+* -!!.+.+!$&% of the way along the real axis. This gives / -!.+!$&%!$&%12"! and thus 3 +4 5 6 and in difference terms in the digital time domain which gives a LPF as a recurrent filter (which is thus an IIR filter). In general, we may use out knowledge of the Laplace design of transfer functions to argue the design in the z-domain as well. This is simple for low-order filters (as above), but would be tedious at higher orders there are other ways. 6.2 FIR designs based on window functions FIR filters can also be designed from a frequency response specification. The equivalent sampled impulse response, which determines the coefficients of the FIR filter, can <;= (>4?A@ then be found by inverse (discrete) Fourier transformation (Discrete Fourier Transforms are not covered until later in the course but the example filter design below should still be easy to follow). Consider an ideal low-pass characteristic (brick-wall filter)798 :with a cutoff frequency where@ DBE period: We know that the continuous impulse > F,G $G 7H8 :JILK1MNCOA response CBis given by (and shown in Fig. 6.1): <; >QPSRUT9V <;BXW =;B (6.1) The sampled impulse responsed (which would be obtained by taking the inverse DFT of the discrete equivalent brick-wall frequency characteristics) is the sampled version of the continuousy9z\[] It is not possible to implement the corresponding low-pass filter design because: 72

^^ an the.25.25.2.2.15.15 g(t).1.5 g[k].1.5.5.5.1 1 5 5 1 t.1 1 5 5 1 kt (T=1) Figure 6.1: Impulse response of brick wall filter in (left) continuous and (right) discrete time domains. _a` and b c. A first solution infinite number of coefficients would be required impulse response is that of a non-causal systemd exists between hence we could, 1. Truncate the expression ford at some reasonable value of, say 1. 2. Shift all the coefficients by the same number. 3 fgihdkj 'ed g lm" This is shown in Fig 6.2. Now that we have the difference equation 7"!k fgnhdj 'ed g!$g for the filter, we can also obtain its transfer function As before, we can obtain the actual frequency response of the filter by evaluating7-!on the unit circle (i.e.7ik1mpo). This is shown in Fig 6.3 using both linear and logarithmic plots for the amplitude response. 73

.25.2.15 shift g[k].1.5.5.1 5 1 15 2 k Figure 6.2: Impulse response of brick wall filter shifted. 1.4 1 1 1.2 1 1.8.6 1 1.4 1 2.2 2 4 6 8 1 12 14 1 3 π/4 2 4 6 8 1 12 14 π/4 Figure 6.3: Linear (left) and log (right) responses for 21 and 11 coefficients in the brick wall filter. Better solution The truncation of the impulse response is equivalent to multiplying it by a rectangular window function. This leads to an overshoot and ripple before and after the discontinuity in the frequency response a phenomenom known as Gibb s phenomenom (the overshoot is about 9% see previous Fig). The amplitude of the overshoot does not decrease if more and more coefficients are included in the digital filter. A more successful way of designing an FIR filter is to use a finite weighting sequenceq. There are a number of such sequences, for example the Hamming, 74

q sr +t.+svuxwrsyuz {. E}( ~} Hanning or Kaiser windows. elsewhere If+ ( v ƒ this is the Hamming window, if+ ( v ƒ this is the Hanning, or raised cosine, window. Fig 6.4 shows the 11 point Hamming window. The Fourier 1.8 w[k].6.4.2 2 4 6 8 1 12 k Figure 6.4: 11 point Hamming window. transform of these windows consists of a central lobe which contains most of the energy and side lobes which generally decay very rapidly. The use of such a window to reduce the Fourier coefficients for the higher frequency terms leads to a reduction in ripple amplitude, at the expense of a slightly worse initial cut-off slope. The frequency response of the 21-coefficient FIR filter Fig. 6.3 is shown in Fig. 6.5 together with that of the equivalent windowed filter (the filter weights on this case being computed fromd5 3 D5 " q )using a Hamming window. 6.2.1 FIR filter design conclusion FIR filters are usually found in applications where waveform distortion due to non-linear phase is harmful. As the 2 examples of filters studied illustrate, FIR filters with exactly linear phase can be designed (they must have an impulse response which is either symmetrical i.e. palindromic coefficients or purely 75

1.4 1.2 1 π/4.8.6.4.2 2 4 6 8 1 12 14 Figure 6.5: Hamming window removing overshoot. anti-symmetrical). FIR filters are mostly realised as non-recursive structures; such filters are always stable. However, if a sharp cut-off in the amplitude response is required, a large number of coefficients are needed (usually 1). 76

sampling ' 6.3 Design of IIR filters Most recursive filters have an infinite impulse response, because of the feedback of previous outputs. Practical Infinite-Impulse-Response (IIR) filters are usually based upon analogue equivalents (Butterworth, Chebyshev, etc.), using a transformation known as the bilinear transformation which maps the -plane poles and zeros of the analogue filter into hand,7ik1mpo the!-plane. However, ` it is quite possible to design an IIR filter without any reference to analogue designs, for example by choosing appropriate locations for the poles zeroes on the unit circle (Remember: 7IKeMok wherever there is a zero on the unit circle, i.e. complete attenuation of that frequency; on the other when there is a pole near the unit circle, i.e. high gain at that frequency). 6.4 Bilinear transformation The technique of digitizing an analogue design is the most popular IIR filter design technique, since there is a large amount of theory on standard analogue filters available (some of which was explored in the first half of this lecture course). The bilinear!-transform @!$&% is a mathematical transformation from the -domain to the!-domain which preserves the frequency characteristics and is defined by: where@ period Under this mapping, the entire8 axis in the -plane is mapped onto the unit circle in the!-plane; the left-half -plane is mapped inside the unit circle and the right-half -plane is mapped outside the unit circle. The bilinear transformation gives a non-linear relationship between analogue frequency <ˆand digital frequency <. Since the frequency response of a digital filter is evaluated ˆŠ by setting! bik1mpo: 8 =ˆ @.I$K1M Œeo 2I$K1MŒo @ IK1MŒo '.I$K1MŒo ' 2I$K1MŒo ' @Ž V 8 < @ <ˆŠ @Ž V < @ ie. 77

^ the ^ Finally, The form of this non-linearity is shown in Fig. 6.6 for the case@.for small values of <, the mapping is almost linear; for most of the frequency scale, however, the mapping is highly non-linear. ω a 3.5 3 2.5 2 1.5 1.5.5 1 1.5 ω d Figure 6.6: The bilinear mapping function. The cut-off frequencies of a digital filter will therefore be tangentially warped compared with those of the analogue filter from which it was designed. In order to compensate for this undesirable effect, it is necessary to = % pre-warp < ' the required cut-off frequencies before designing the analogue filter. Thus <ˆ% desired <ˆ' set of digital filter cut-off frequencies is determined first. For example, if there are four critcial cut-off frequencies, < 1 and = e ). Using the frequency warping relationship derived above, the filter cut-off frequencies are converted to a new set of analogue cut-off frequencies, <Ĵ and =ˆ1. an analogue filter is designed with the appropriate warped cut-off frequencies. Applying the bilinear transformation to this analogue filter gives a digital filter with the desired cut-off frequencies. 78

o in ; ; 6.4.1 Example: design of IIR filter using bilinear z-transform š Design a digital low-pass Butterworth filter with a 3dB cut-off frequency of 2kHz and minimum attenuation of 3dB at 4.25kHz for a sampling rate of 1kHz. < % œ>ž Ÿ Answer Hz; hence@ = ' > $ sec. <ˆ% rads/sec; rads/sec. @#ŽL V = %@ b ŽL V v ƒp> œ v ƒ AA c @ A Apply pre-warping transformation: rads/sec <ˆ' @ ŽL V < '@ (ie.šˆ% andšˆ' b ŽL V v > ( v rads/sec khz «- DM ± C D v khz M ² ³ C D%-d C D%-dcµ U % % e A 7 k ' p' <;k ¾ ƒ c ' <; ' o%e$à Á  7"!k ' o' ƒ c ' %"à ÀÁ Â: ' o'%e$àá  %"à ÀÁ Â' ' o' v A c %e$àáaâ %"à ÀÁAÂÄ ' o' v A ' this shows the warping effect near "ª ') The order of filter required can now be worked out as before: For a second-order Butterworth LPF, above equation and use the bilinear transfor- <ˆ% b Substitute mation ' ¹»º½¼meets the specification 79

^ ^ dc 3dB (NB:' ofactor 7-! v AÄ cancels out) %e$àáaâ %"à ÀÁAÂ' c %e$àáaâ %"à ÀÁ ÂÄ v 7-!k œ v AÄ A c Å v!$&% v A A!$' #!$&%!$' 7-! b v A c #!$&%!$' < Æ v ƒ c vç v v ç c È2p, v A c A ÇvÇ v ç A 5 l 3. v ç A!$&% v ç A!$' from which we can finally write the following difference equation: In order to check 7-! b v A c A the magnitude characteristics of the frequency response, rewrite7"!as:!' v ç! v ç A!'#! < @ œ È! < %@ ( v > gain: 7Id zk k œ v ƒ c cut-off frequency uxwr >Ê uxwr v >Ê 8RUT9V v >Í v ç A uîwr v >Ê 8RUT9V >ÊuxwR v >Ê 8RUTËV >ÌÄ 8RJTËV v >4Ä2 v ç A c Thus 7Id zk k ( v A c a v ƒa A 8 v # 8 givesé\7~é œ v A c ie. which givesé\7é which 8

You can also check the 3dB minimum attenuation requirement by working out 7Id µ zk. 6.4.2 Conclusion With recursive IIR filters, we can generally achieve a desired frequency response characteristic with a filter of lower order than for a non-recursive filter (especially if elliptic designs are used). A recursive filter has both poles and zeroes which can be selected by the designer, hence there are more free parameters than for a non-recursive filter of the same order (only zeroes can be varied). However, when the poles of an IIR filter are close to the unit circle, they need to be specified very accurately (typically 3 to 6 decimal places) if instability is to be avoided. 81