Presentation is loading. Please wait.

Presentation is loading. Please wait.

Filter Design Techniques

Similar presentations


Presentation on theme: "Filter Design Techniques"— Presentation transcript:

0 Chapter 7: FILTER DESIGN TECHNIQUES
Department of Computer Eng. Sharif University of Technology Discrete-time signal processing Chapter 7: FILTER DESIGN TECHNIQUES Content and Figures are from Discrete-Time Signal Processing, 2e by Oppenheim, Shafer and Buck, © Prentice Hall Inc.

1 Filter Design Techniques
DSP Filter: Any discrete-time system that modifies certain frequencies Frequency-selective filters pass only certain frequency components and totally reject all others Filter Design Steps: Specification Problem or application specific Approximation of specification with a discrete-time system Our focus is to go from spec to discrete-time system Implementation Realization of discrete-time systems depends on target technology Desired filter is generally implemented with digital computation It is used to filter a sampled and digitized continuous-time signal Chapter 7: Filter Design Techniques 1

2 Filter Design Techniques
DSP We have already studied the use of discrete-time systems to implement a continuous-time system If our specifications are given in continuous time we can use: It can be noted that the specifications for filters are typically given in frequency domain D/C xc(t) yr(t) C/D H(ej) Chapter 7: Filter Design Techniques 2

3 Filter Specifications
DSP Specifications Passband Stopband Parameters Specs in dB Ideal passband gain =20log(1) = 0 dB Max passband gain = 20log(1.01) = 0.086dB Max stopband gain = 20log(0.001) = -60 dB Chapter 7: Filter Design Techniques 3

4 Discrete Signal Processing
7.1 Discrete-Time IIR Filter Design from Continuous-Time Filters Chapter 7: Filter Design Techniques 4

5 7.1.1 Filter Design by Impulse Invariance
DSP Remember impulse invariance Mapping a continuous-time impulse response to discrete-time Mapping a continuous-time frequency response to discrete-time If the continuous-time filter is bandlimited to In this design procedure: Start with discrete-time spec in terms of  (Td has no role in the process) Go to continuous-time =  /T and design continuous-time filter Use impulse invariance to map it back to discrete-time = T Works best for practical filters due to possible aliasing Chapter 7: Filter Design Techniques 5

6 Impulse Invariance of System Functions
DSP Develop impulse invariance relation between system functions Partial fraction expansion of transfer function of continuous-time filter: Corresponding impulse response: Impulse response of discrete-time filter: System function: Pole s=sk in s-plane transforms into a pole at in the z-plane Chapter 7: Filter Design Techniques 6

7 Chapter 7: Filter Design Techniques
Example DSP Impulse invariance applied to Butterworth Since sampling rate Td cancels out we can assume Td=1 Map spec to continuous time Butterworth filter is monotonic so spec will be satisfied if Determine N and c to satisfy these conditions Chapter 7: Filter Design Techniques 7

8 Chapter 7: Filter Design Techniques
Example Cont’d DSP Satisfy both constrains Solve these equations to get N must be an integer so we round it up to meet the spec Poles of transfer function The transfer function Mapping to z-domain Chapter 7: Filter Design Techniques 8

9 Chapter 7: Filter Design Techniques
Example Cont’d DSP Chapter 7: Filter Design Techniques 9

10 Filter Design by Bilinear Transformation
DSP Avoids the aliasing problem of impulse invariance Maps the entire s-plane onto the unit-circle in the z-plane Nonlinear transformation Frequency response subject to warping Bilinear transformation Transformed system function Again Td cancels out so we can ignore it We can solve the transformation for z as Maps the left-half s-plane into the inside of the unit-circle in z Stable in one domain would stay in the other Chapter 7: Filter Design Techniques 10

11 Bilinear Transformation
DSP On the unit circle the transform becomes To derive the relation between  and  Which yields Chapter 7: Filter Design Techniques 11

12 Bilinear Transformation
DSP Chapter 7: Filter Design Techniques 12

13 Chapter 7: Filter Design Techniques
Example DSP Bilinear transform applied to Butterworth Apply bilinear transformation to specifications We can assume Td=1 and apply the specifications to To get Chapter 7: Filter Design Techniques 13

14 Chapter 7: Filter Design Techniques
Example Cont’d DSP Solve N and c The resulting transfer function has the following poles Resulting in Applying the bilinear transform yields Chapter 7: Filter Design Techniques 14

15 Chapter 7: Filter Design Techniques
Example Cont’d DSP Chapter 7: Filter Design Techniques 15

16 Chapter 7: Filter Design Techniques
DSP 7.2 Design of FIR Filters By Windowing Chapter 7: Filter Design Techniques 16

17 Filter Design by Windowing
DSP Simplest way of designing FIR filters Method is all discrete-time no continuous-time involved Start with ideal frequency response Choose ideal frequency response as desired response Most ideal impulse responses are of infinite length The easiest way to obtain a causal FIR filter from ideal is More generally Chapter 7: Filter Design Techniques 17

18 Windowing in Frequency Domain
DSP Windowed frequency response The windowed version is smeared version of desired response If w[n]=1 for all n, then W(ej) is pulse train with 2 period Chapter 7: Filter Design Techniques 18

19 Chapter 7: Filter Design Techniques
Properties of Windows DSP Prefer windows that concentrate around DC in frequency Less smearing, closer approximation Prefer window that has minimal span in time Less coefficient in designed filter, computationally efficient So we want concentration in time and in frequency Contradictory requirements Example: Rectangular window Chapter 7: Filter Design Techniques 19

20 Chapter 7: Filter Design Techniques
Rectangular Window DSP Narrowest main lobe 4/(M+1) Sharpest transitions at discontinuities in frequency Large side lobes -13 dB Large oscillation around discontinuities Simplest window possible Chapter 7: Filter Design Techniques 20

21 Bartlett (Triangular) Window
DSP Medium main lobe 8/M Side lobes -25 dB Hamming window performs better Simple equation Chapter 7: Filter Design Techniques 21

22 Chapter 7: Filter Design Techniques
Hanning Window DSP Medium main lobe 8/M Side lobes -31 dB Hamming window performs better Same complexity as Hamming Chapter 7: Filter Design Techniques 22

23 Chapter 7: Filter Design Techniques
Hamming Window DSP Medium main lobe 8/M Good side lobes -41 dB Simpler than Blackman Chapter 7: Filter Design Techniques 23

24 Chapter 7: Filter Design Techniques
Blackman Window DSP Large main lobe 12/M Very good side lobes -57 dB Complex equation Chapter 7: Filter Design Techniques 24

25

26 Incorporation of Generalized Linear Phase
DSP Windows are designed with linear phase in mind Symmetric around M/2 So their Fourier transform are of the form Will keep symmetry properties of the desired impulse response Assume symmetric desired response With symmetric window Periodic convolution of real functions Chapter 7: Filter Design Techniques 26

27 Linear-Phase Lowpass filter
DSP Desired frequency response Corresponding impulse response Desired response is even symmetric, use symmetric window Chapter 7: Filter Design Techniques 27

28 Kaiser Window Filter Design Method
DSP Parameterized equation forming a set of windows Parameter to change main-lobe width and side-lobe area trade-off I0(.) represents zeroth-order modified Bessel function of 1st kind Chapter 7: Filter Design Techniques 28

29 Determining Kaiser Window Parameters
DSP Given filter specifications Kaiser developed empirical equations Given the peak approximation error  or in dB as A=-20log10  and transition band width The shape parameter  should be The filter order M is determined approximately by Chapter 7: Filter Design Techniques 29

30 Example: Kaiser Window Design of a Lowpass Filter
DSP Specifications Window design methods assume Determine cut-off frequency Due to the symmetry we can choose it to be Compute And Kaiser window parameters Then the impulse response is given as Chapter 7: Filter Design Techniques 30

31 Chapter 7: Filter Design Techniques
Example Cont’d DSP Approximation Error Chapter 7: Filter Design Techniques 31

32 General Frequency Selective Filters
DSP A general multiband impulse response can be written as Window methods can be applied to multiband filters Example multiband frequency response Special cases of Bandpass Highpass Bandstop Chapter 7: Filter Design Techniques 32

33 Chapter 7: Filter Design Techniques
DSP 7.4 Optimum Approximation of FIR Filters Chapter 7: Filter Design Techniques 33

34 Chapter 7: Filter Design Techniques
Optimum Filter Design DSP Filter design by windows is simple but not optimal Like to design filters with minimal length Optimality Criterion Window design with rectangular filter is optimal in one sense Minimizes the mean-squared approximation error to desired response But causes large error around discontinuities Alternative criteria can give better results Minimax: Minimize maximum error Frequency-weighted error Most popular method: Parks-McClellan Algorithm Reformulates filter design problem as function approximation Chapter 7: Filter Design Techniques 34

35 Function Approximation
DSP Consider the design of type I FIR filter Assume zero-phase for simplicity Can delay by sufficient amount to make causal Assume L=M/2 an integer After delaying the resulting impulse response Example approximation mask Low-pass filter Chapter 7: Filter Design Techniques 35

36 Polynomial Approximation
DSP Using Chebyshev polynomials Express the following as a sum of powers Can also be represented as Parks and McClellan fix p, s, and L Convert filter design to an approximation problem The approximation error is defined as W() is the weighting function Hd(ej) is the desired frequency response Both defined only over the passpand and stopband Transition bands are unconstrained Chapter 7: Filter Design Techniques 36

37 Lowpass Filter Approximation
DSP The weighting function for lowpass filter is This choice will force the error to = 2 in both bands Criterion used is minmax F is the set of frequencies the approximations is made over Chapter 7: Filter Design Techniques 37

38 Chapter 7: Filter Design Techniques
Alternation Theorem DSP Fp denote the closed subset consisting of the disjoint union of closed subsets of the real axis x The following is an rth order polynomial Dp(x) denotes given desired function that is continuous on Fp Wp(x) is a positive function that is continuous on Fp The weighted error is given as The maximum error is defined as A necessary and sufficient condition that P(x) be the unique rth order polynomial that minimizes is that Ep(x) exhibit at least (r+2) alternations There must be at least (r+2) values xi in Fp such that x1<x2<…<xr+2 Chapter 7: Filter Design Techniques 38

39 Chapter 7: Filter Design Techniques
Example DSP Examine polynomials P(x) that approximate Fifth order polynomials shown Which satisfy the theorem? Not alternations Not alternations Chapter 7: Filter Design Techniques 39

40 Optimal Type I Lowpass Filters
DSP In this case the P(x) polynomial is the cosine polynomial The desired lowpass filter frequency response (x=cos) The weighting function is given as The approximation error is given as Chapter 7: Filter Design Techniques 40

41 Typical Example Lowpass Filter Approximation
DSP 7th order approximation Chapter 7: Filter Design Techniques 41

42 Properties of Type I Lowpass Filters
DSP Maximum possible number of alternations of the error is L+3 Alternations will always occur at p and s All points with zero slope inside the passpand and all points with zero slope inside the stopband will correspond to alternations The filter will be equiripple except possibly at 0 and  Chapter 7: Filter Design Techniques 42

43 Flowchart of Parks-McClellan Algorithm
DSP Chapter 7: Filter Design Techniques 43

44 Butterworth Lowpass Filters
DSP Passband is designed to be maximally flat The magnitude-squared function is of the form Chapter 7: Filter Design Techniques 44

45 Chapter 7: Filter Design Techniques
Chebyshev Filters DSP Equiripple in the passband and monotonic in the stopband Or equiripple in the stopband and monotonic in the passband Chapter 7: Filter Design Techniques 45


Download ppt "Filter Design Techniques"

Similar presentations


Ads by Google