CHAPTER 7 filter design techniques

Slides:



Advertisements
Similar presentations
Design of Digital IIR Filter
Advertisements

Chapter 8. FIR Filter Design
Digital Signal Processing IIR Filter IIR Filter Design by Approximation of Derivatives Analogue filters having rational transfer function H(s) can be.
Nonrecursive Digital Filters
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: Filters and Difference Equations Signal Flow Graphs FIR and IIR Filters.
Signal and System IIR Filter Filbert H. Juwono
Chapter 6 Infinite Impulse Response Filter Design.
CHAPTER 7 Digital Filter Design Wang Weilian School of Information Science and Technology Yunnan University.
Husheng Li, UTK-EECS, Fall The specification of filter is usually given by the tolerance scheme.
Filtering Filtering is one of the most widely used complex signal processing operations The system implementing this operation is called a filter A filter.
Infinite Impulse Response (IIR) Filters
ECE651 Digital Signal Processing I Digital IIR Filter Design.
So far We have introduced the Z transform
Hossein Sameti Department of Computer Engineering Sharif University of Technology.
Digital Signal Processing – Chapter 11 Introduction to the Design of Discrete Filters Prof. Yasser Mostafa Kadah
Unit 9 IIR Filter Design 1. Introduction The ideal filter Constant gain of at least unity in the pass band Constant gain of zero in the stop band The.
LINEAR-PHASE FIR FILTERS DESIGN
Chapter 8 FIR Filter Design
IIR Filter Design: Basic Approaches Most common approach to IIR filter design: (1)Convert specifications for the digital filter into equivalent specifications.
Discrete-Time IIR Filter Design from Continuous-Time Filters Quote of the Day Experience is the name everyone gives to their mistakes. Oscar Wilde Content.
5.1 the frequency response of LTI system 5.2 system function 5.3 frequency response for rational system function 5.4 relationship between magnitude and.
AGC DSP AGC DSP Professor A G Constantinides 1 Digital Filter Specifications Only the magnitude approximation problem Four basic types of ideal filters.
EE313 Linear Systems and Signals Fall 2010 Initial conversion of content to PowerPoint by Dr. Wade C. Schwartzkopf Prof. Brian L. Evans Dept. of Electrical.
Relationship between Magnitude and Phase (cf. Oppenheim, 1999)
1 Lecture 2: February 27, 2007 Topics: 2. Linear Phase FIR Digital Filter. Introduction 3. Linear-Phase FIR Digital Filter Design: Window (Windowing)
Practical Signal Processing Concepts and Algorithms using MATLAB
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
DSP. What is DSP? DSP: Digital Signal Processing---Using a digital process (e.g., a program running on a microprocessor) to modify a digital representation.
1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase.
Chapter 7 IIR Filter Design
Filter Design Techniques
Zhongguo Liu_Biomedical Engineering_Shandong Univ. Biomedical Signal processing Chapter 7 Filter Design Techniques Zhongguo Liu Biomedical.
Chapter 8 IIR Filter Design
MATLAB for Signal Processing The MathWorks Inc. Natick, MA USA Filter Design.
IIR Filter design (cf. Shenoi, 2006) The transfer function of the IIR filter is given by Its frequency responses are (where w is the normalized frequency.
Chapter 8 Design of infinite impulse response digital filter.
Copyright ©2010, ©1999, ©1989 by Pearson Education, Inc. All rights reserved. Discrete-Time Signal Processing, Third Edition Alan V. Oppenheim Ronald W.
Lecture 10: IIR Filter Designs XILIANG LUO 2014/11 1.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 8: Filter Design: IIR 1.Filter Design Specifications 2.Analog Filter Design 3.Digital.
Fundamentals of Digital Signal Processing. Fourier Transform of continuous time signals with t in sec and F in Hz (1/sec). Examples:
Chapter 7 Finite Impulse Response(FIR) Filter Design
Signals and Systems Lecture 9
1 Introduction to Digital Filters Filter: A filter is essentially a system or network that selectively changes the wave shape, amplitude/frequency and/or.
Chapter 9-10 Digital Filter Design. Objective - Determination of a realizable transfer function G(z) approximating a given frequency response specification.
Chapter 7. Filter Design Techniques
1 Digital Signal Processing Digital Signal Processing  IIR digital filter structures  Filter design.
Signals and Systems Filter Design. Part III Design.
DISP 2003 Lecture 5 – Part 1 Digital Filters 1 Frequency Response Difference Equations FIR versus IIR FIR Filters Properties and Design Philippe Baudrenghien,
Zhongguo Liu_Biomedical Engineering_Shandong Univ. Biomedical Signal processing Chapter 7 Filter Design Techniques Zhongguo Liu Biomedical.
Digital Signal Processing Lecture 6 Frequency Selective Filters
Chapter 6. Digital Filter Structures and Designs Section
Finite Impulse Response Filtering EMU-E&E Engineering Erhan A. Ince Dec 2015.
Chapter 6 Design of FIR Digital Filter
Professor A G Constantinides 1 Digital Filter Specifications We discuss in this course only the magnitude approximation problem There are four basic types.
Digital Signal Processing
IIR Filter design (cf. Shenoi, 2006)
Figure 8.1 (p. 615) Time-domain condition for distortionless transmission of a signal through a linear time-invariant system. Signals and Systems, 2/E.
UNIT - 5 IIR FILTER DESIGN.
Lecture: IIR Filter Design
Speech Signal Processing
IIR Filters FIR vs. IIR IIR filter design procedure
Infinite Impulse Response (IIR) Filters
Filter Design Techniques
Chapter 8 Design of Infinite Impulse Response (IIR) Digital Filter
LINEAR-PHASE FIR FILTERS DESIGN
Ideal Filters One of the reasons why we design a filter is to remove disturbances Filter SIGNAL NOISE We discriminate between signal and noise in terms.
Usıng the impulse sampling method Prepared by: Dr. Erhan A. INCE
Chapter 7 Finite Impulse Response(FIR) Filter Design
Chapter 7 Finite Impulse Response(FIR) Filter Design
Presentation transcript:

CHAPTER 7 filter design techniques 7.0 introduction 7.1design of discrete-time IIR filters from continuous-time filters 7.1.1 filter design by impulse invariance 7.1.2 filter design by bilinear transform 7.1.3 not low pass filter design and other method 7.2 design of FIR filters by windowing. 7.3 summary

ideal frequency selective filter 7.0 introduction ideal frequency selective filter band-stop filter:notch filter;quality factor of band-pass filter=pass-band width/center frequency

impulse response of ideal low-pass filter,noncausal,unrealizable Figure 7.1 impulse response of ideal low-pass filter,noncausal,unrealizable Specifications for filter design :given in frequency domain phase:linear? magnitude:given by a tolerance scheme analog or digital,absolute or relative

Figure 7.2 absolute specification magnitude response of equivalent analog system monotonous descent passband tolerance stopband tolerance passband cutoff frequency stopband cutoff frequency 3dB cutoff frequency absolute specification

digital specification, finally: relative specifications:maximum magnitude in passband is normalized to 1, viz. 0dB maximum attenuation in passband minimum attenuation in stopband 3dB cutoff frequency: magnitude response of equivalent analog system: digital specification, finally:

Specifications for bandpass and bandstop filters: up and down passband cutoff frequency, up and down stopband cutoff frequency Design steps: (1)decide specifications according to application (2)decide type according to specification:generally , if the phase is required , choose FIR. (3)approach specifications using causal and stable discrete-time system: viz. design H(z0) or h[n],nonuniform (4)choose a software or hardware realization structure, take effects of limited word length into consideration H(z) or h[n]

7.1 design of discrete-time IIR filters from continuous-time filters attention:original analog filter and equivalent analog filter is different, their frequency response is not always the same 7.1.0 introduction of analogy filter 7.1.1filter design by impulse invariance 7.1.2 filter design by bilinear transform

7.1.0 introduction of analog filter comparison: 1.wave 2.the same order, increase performance 3.increase design complexity (A)(C)small aliasing in the impulse invariance design technique

magnitude frequency function: BW design formula: specificationsystem function magnitude frequency function: take the specifications into system function and get the results from equation group: OR confirm the poles of system function: (in the left half plane) get system function:

design a low pass analogy filter: EXAMPLE   design a low pass analogy filter: [N,Wc]=buttord(2000*pi,4000*pi,1,15, 's') [Bs,As]=butter(N,Wc, 's') [H,W]=freqs(Bs,As); plot(W/2/pi,20*(log10(abs(H)))) axis([1000,2000,-16,0]) grid on OUTPUT: N = 4 Wc = 8.1932e+003 Bs = 1.0e+015 * 0 0 0 0 4.5063 As = 1.0e+015 * 0.0000 0.0000 0.0000 0.0014 4.5063

Or:  [N,Wc]=buttord(2000*pi,4000*pi,1,15, 's') [z,p,k]=butter(N,Wc, 's' ) Output: z = Empty matrix: 0-by-1 p = 1.0e+003 * -7.5695 + 3.1354i -7.5695 - 3.1354i -3.1354 + 7.5695i -3.1354 - 7.5695i k = 4.5063e+015

design a low pass cheby analogy filter: EXAMPLE   design a low pass cheby analogy filter: [N,Wc]=cheb1ord(2000*pi,4000*pi,1,15, 's') [Bs,As]=cheby1(N,1,Wc, 's') [H,W]=freqs(Bs,As); plot(W/2/pi,20*(log10(abs(H)))) axis([0,4000,-30,0]) grid on

design a low pass cheby analogy filter: EXAMPLE   design a low pass cheby analogy filter: [N,Wc]=cheb2ord(2000*pi,4000*pi,1,15, 's') [Bs,As]=cheby2(N,15,Wc, 's') [H,W]=freqs(Bs,As); plot(W/2/pi,20*(log10(abs(H)))) axis([0,4000,-30,0]) grid on

design a high pass analogy filter: EXAMPLE   design a high pass analogy filter: [N,Wc]=buttord(4000*pi,2000*pi,1,15, 's') [Bs,As]=butter(N,Wc, 'high', 's') [H,W]=freqs(Bs,As); plot(W/2/pi,20*(log10(abs(H)))) axis([0,4000,-16,0]) grid on

transformation from analog filter to digital filter: H(s)H(z),viz. mapping from S plane to Z plane, must satisfy: the same frequency response(map imaginary axis to the unit circle); causality and stability is preserved(map poles from left half plane to the inside circle)。 imaginary axis the unit circle poles in left half plane inside the unit circle S plane  Z plane

7.1.1 filter design by impulse invariance according to : conversion formula:

Relationship between poles(causal and stable): relation between frequencies: S plane Z plane

relation between frequency response: when aliasing is small, the frequency response is the same. strongpoint:linear frequency mapping; shortcoming:aliasing in frequency response。 restriction in application:can not used in high-pass and bandstop filter

Design steps: (3) about Td: independent of T; do not influence aliasing; arbitrary value,generally, take 1(attention(1)and(3)have the same value).

Td=1; Wp=wp/Td; Ws=ws/Td [N,Wc]=buttord(Wp,Ws, ap , as, 's') EXAMPLE wp=0.2*pi; ws=0.4*pi ap=1; as=12 Td=1; Wp=wp/Td; Ws=ws/Td [N,Wc]=buttord(Wp,Ws, ap , as, 's') [Bs,As]=butter(N,Wc, 's') [Bz,Az]=impinvar(Bs,As,1/Td) [H,W]=freqs(Bs,As); plot(W/pi,20*(log10(abs(H))), 'r*') hold on [H,w]=freqz(Bz,Az); plot(w/pi,20*(log10(abs(H)))) axis([0.2,0.4,-20,0]) grid

7.1.2 filter design by bilinear transform design thought: design formula:

relation between frequencies: left half s-plane  inside the unit circle in the z-plane(causality and stability are preserved); imaginary axis of the s-plane the unit circle in z-plane (the same frequency response), one-by-one mapping relation between frequencies:

relation between frequency response: strongpoint:no aliasing; shortcoming:nonlinear。 restriction in application: can not used in differentiator.

design steps: (1) (3) about Td: independent of T; (1)  (3) about Td: independent of T; arbitrary value,generally, take 1(attention(1)and(3)have the same value).

wp=0.2613*pi; ws=0.4018*pi; ap=0.75; as=20; EXAMPLE wp=0.2613*pi; ws=0.4018*pi; ap=0.75; as=20; Td=1; Ws=2/Td*tan(ws/2); Wp=2/Td*tan(wp/2) [N,Wc]=buttord(Wp,Ws,ap,as,’s’) [Bs,As]=butter(N,Wc, ‘s’) [Bz,Az]=bilinear(Bs,As,1/Td) [H,W]=freqs(Bs,As); plot(W/pi,20*(log10(abs(H))),’Rx‘) hold on [H,w]=freqz(Bz,Az); plot(w/pi,20*(log10(abs(H)))) ylabel(‘虚线:模拟滤波器幅度[dB] 实线:数字滤波器幅度[dB]’) xlabel(‘虚线:模拟角频率[*π弧度/秒] 实线:数字角频率[*π弧度]’) axis([0.25,0.5,-20,-0.45]) grid

OR wp=0.2613*pi; ws=0.4018*pi; ap=0.75; as=20 [N,wc]=buttord(wp/pi,ws/pi,ap,as) [Bz,Az]=butter(N,wc) [H,w]=freqz(Bz,Az); plot(w/pi,20*(log10(abs(H))))

[Bz,Az]=butter(N,Wc, 'high') [H,w]=freqz(Bz,Az); EXAMPLE [N,Wc]=buttord(0.6,0.5,ap,as) [Bz,Az]=butter(N,Wc, 'high') [H,w]=freqz(Bz,Az); plot(w/pi,20*(log10(abs(H)))) grid

EXAMPLE

[N,wc]=buttord([0.45 0.55],[0.4 0.6],3,10) %双线性变换法 [B,A]=butter(N,wc) [H,w]=freqz(B,A); plot(w/pi,20*(log10(abs(H)))) ylabel(‘20log|H(ejω)| [dB]’) xlabel(‘数字角频率[*π弧度]’) axis([0.4,0.6,-10,0]); grid on Output: N = 2 wc = 0.4410 0.5590 B = 0.0271 0 -0.0541 0 0.0271 A = 1.0000 0 1.4838 0 0.5920

7.1.3 IIR summary 1.design steps 2. impulse invariance: frequency axis is linear many-to-one mapping , aliasing in frequency response, inapplicable to high-pass filter. bilinear transformation: frequency axis is one-to-one mapping with aberrance, no aliasing in frequency response, inapplicable to differentiator

7.1.4 frequency conversion Frequency conversion in analog domain:

Frequency conversion in digital domain:

7.2 design of FIR filters by windowing 7.2.1 design ideas 7.2.2 properties of commonly used windows 7.2.3 effect to frequency response 7.2.4 design step

7.2.1 design ideas

Gibbs phenomenon: frequency response oscillate at wc. transition width of filer’smainlobe width of window spectrum length and shape of window’s passband-stopband error of filter’ssidelobe amplitude of window spectrum window’s shape The smaller mainlobe width, the narrower transition width of filter’s; The smaller sidelobe amplitude of window spectrum, the smaller relative error of filter’s. M increases mainlobe width of window spectrum minishes filter oscillate more quickly, transition width minishes, relative amplitude of oscillation is preserved. In order to improve relative amplitude of oscillation, we need to change the shape of window’s.

7.2.2 properties of commonly used windows

A general designation: Blackman window family, except triangular window Figure 7.21

Figure 7.24(a)

(a)-(e) attenuation of sidelobe increases, width of mainlobe increases.

As B increases, attenuation of sidelobe increases, width of mainlobe increases. As N increases: attenuation of sidelobe is preserved, width of mainlobe decreases. Figure 7.24(b)(c)

Transition width is a little less than mainlobe width Table 7.1

7.2.3 effect to frequency response attenuation of window spectrum’s sidelobe attenuation of filter’s stopband width of window spectrum’s mainlobetransition width of filter’s check the table for Blackman window; formulas of Kaiser window: A:attenuation of stopband, Δω:transition width

7.2.4 design step 1. Write the ideal impulse response: 2.Comfirm the shape of window’s based on attenuation of stopband: (1)check the table for Blackman window (2)calculation for Kaiser window

(2) calculation for Kaiser window : 3.Comfirm length of window’s based on transition width(M is even): (1) check the table for Blackman window: compute the length of window’s based on width of mainlobe: (2) calculation for Kaiser window : 4.Cut the ideal impulse response 5. We can think that the 4 specifications is transformed into: The same with IIR, maybe the specification is equivalent analog one.

Example 1 Blackman family (1) (2) hamming (3) (4)

(5)validate the frequency response in MATLAB h=fir1(26,0.62, 'high',hamming(27)) H=fft(h,512); plot([0:511]/256,20*log10(abs(H))) axis([0.5,0.7,-50,0]); grid on

h=fir1(24,0.665, 'high',hamming(25)) H=fft(h,512); (6)correct h=fir1(24,0.665, 'high',hamming(25)) H=fft(h,512); plot([0:511]/256,20*log10(abs(H))) axis([0.5,0.7,-80,0]); grid on h= 0.0001 0.0023 -0.0040 0.0004 0.0104 -0.0170 0.0009 0.0358 -0.0538 0.0014 0.1288 -0.2727 0.3357 -0.2727 0.1288 0.0014 -0.0538 0.0358 0.0009 -0.0170 0.0104 0.0004 -0.0040 0.0023 0.0001

Example 2 Kaiser family Solution1: (1) (2) (3) (4)

(5)validate and correct in MATLAB h=fir1(18,0.662, 'high', kaiser (19,3.2953)); H=fft(h,512); k=0:511; subplot(1,2,1); plot(k/256,20*log10(abs(H))); grid on; subplot(2,2,2); plot(k/256,20*log10(abs(H))); axis([0.5,0.55,-50,-0]); grid on subplot(2,2,4); plot(k/256,20*log10(abs(H))); axis([0.65,0.75,-5,0]); grid on

Example 3 plot the response to signal h=fir1(18,0.5, 'high',kaiser(19,6)); n=[0:100]; x=10*cos(0.1*pi*n)+3*sin(0.8*pi*n) ; subplot(2,1,1); plot(n,x) y=filter(h,1,x) ; subplot(2,1,2); plot(n,y)

7.2.5 FIR summary shape attenuation of sidelobe attenuation of stopband (the first row in the table)( the third row in the table) length width of mainlobe transition width (the second row) (the second row /2)

7.3 brief introduction of other filter design techniques using matlab IIR: minimum mean square error in frequency domain: invfreqz( ) FIR: frequency sampling :fir2( ) FIR: minimum mean square error :firls( ) FIR: Parks-McCellan/Remez arithmetic: remez( )

7.4 summary FIR digital filter IIR digital filter finite-length IR infinite-length IR no non-zero poles, stable non-zero poles, stable? realization: convolution /recursion recursion realize linear phase easily can not realize linear phase in deed stable maybe instable because of rounding higher order lower order because of recursion FFT no fast arithmetic

summary 7.1 design of IIR(continuous-time filter) 7.1.1 impulse invariance 7.1.2 bilinear transform 7.2 design of FIR(windowing) 7.2.1 design ideas 7.2.2 properties of commonly used windows 7.2.3 effect to frequency response 7.2.4 design step 7.3 comparison between IIR and FIR

requirements: understand the principles of impulse invariance and bilinear transform and their mapping characteristic, implication; understand design ideas of windowing; design various filters using MATLAB. difficulties: relationship among prototype analog filter, digital filter and equivalent analog filter; effects of shape and length of window’s to system characteristic; why impulse invariance and bilinear transform can not be used in high-pass filter design。

exercise and experiment 7.16 7.18 7.22(a)(b) 7.23 the second experiment 50 52 56 57 59