Lecture 09b Finite Impulse Response (FIR) Filters

Slides:



Advertisements
Similar presentations
Chapter 14 Finite Impulse Response (FIR) Filters
Advertisements

Digital filters: Design of FIR filters
Chapter 8. FIR Filter Design
Chapter 14 Finite Impulse Response (FIR) Filters.
Nonrecursive Digital Filters
EE513 Audio Signals and Systems Digital Signal Processing (Synthesis) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
So far We have introduced the Z transform
Digital Signal Processing – Chapter 11 Introduction to the Design of Discrete Filters Prof. Yasser Mostafa Kadah
Real-time Digital Signal Processing with the TMS320C6x
AMI 4622 Digital Signal Processing
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.
LINEAR-PHASE FIR FILTERS DESIGN
Sampling, Reconstruction, and Elementary Digital Filters R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.
Chapter 15 Infinite Impulse Response (IIR) Filters.
EEE422 Signals and Systems Laboratory Filters (FIR) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Dan Ellis 1 ELEN E4810: Digital Signal Processing Topic 6: Filters - Introduction 1.Simple Filters 2.Ideal Filters 3.Linear Phase and FIR filter.
Finite Impuse Response Filters. Filters A filter is a system that processes a signal in some desired fashion. –A continuous-time signal or continuous.
Analysis of Discrete Linear Time Invariant Systems
Lecture 9 FIR and IIR Filter design using Matlab
Digital Signals and Systems
Unit III FIR Filter Design
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Discrete-Time and System (A Review)
Nov'04CS3291: Section 41 University of Manchester Department of Computer Science CS3291 Digital Signal Processing '04-'05 Section 4: ‘A design technique.
(Lecture #08)1 Digital Signal Processing Lecture# 8 Chapter 5.
Chapter 6 Digital Filter Structures
EE Audio Signals and Systems Digital Signal Processing (Synthesis) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
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.
Digital Signal Processing FIR Filter Design
Prof. Nizamettin AYDIN Digital Signal Processing 1.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Lecture 10a Infinite Impulse Response (IIR) Filters.
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
1 Introduction to Digital Filters Filter: A filter is essentially a system or network that selectively changes the wave shape, amplitude/frequency and/or.
FIR Filter Design & Implementation
Copyright 2004 Ken Greenebaum Introduction to Interactive Sound Synthesis Lecture 20:Spectral Filtering Ken Greenebaum.
Digital filters Honza Černocký, ÚPGM. Aliases Numerical filters Discrete systems Discrete-time systems etc. 2.
ES97H Biomedical Signal Processing
Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Neural Networks Laboratory Slide 1 FOURIER TRANSFORMATION.
Chapter 7. Filter Design Techniques
1 Digital Signal Processing Digital Signal Processing  IIR digital filter structures  Filter design.
Digital Signal Processing
Chapter 4 LTI Discrete-Time Systems in the Transform Domain
Summary of Widowed Fourier Series Method for Calculating FIR Filter Coefficients Step 1: Specify ‘ideal’ or desired frequency response of filter Step 2:
Technological Educational Institute Of Crete Department Of Applied Informatics and Multimedia Neural Networks Laboratory Slide 1 DISCRETE SIGNALS AND SYSTEMS.
ECE 8443 – Pattern Recognition EE 3512 – Signals: Continuous and Discrete Objectives: FIR Filters Design of Ideal Lowpass Filters Filter Design Example.
DISP 2003 Lecture 5 – Part 1 Digital Filters 1 Frequency Response Difference Equations FIR versus IIR FIR Filters Properties and Design Philippe Baudrenghien,
What is filter ? A filter is a circuit that passes certain frequencies and rejects all others. The passband is the range of frequencies allowed through.
Lecture 14: Generalized Linear Phase Instructor: Dr. Ghazi Al Sukkar Dept. of Electrical Engineering The University of Jordan
EEE4176 Application of Digital Signal Processing
Finite Impuse Response Filters. Filters A filter is a system that processes a signal in some desired fashion. –A continuous-time signal or continuous.
Prepared by:D K Rout DSP-Chapter 2 Prepared by  Deepak Kumar Rout.
IIR Filter design (cf. Shenoi, 2006)
CEN352 Dr. Nassim Ammour King Saud University
Discrete-time Systems
Speech Signal Processing
Linear Constant-coefficient Difference Equations
Digital Signal Processing Lecture 4 DTFT
LINEAR-PHASE FIR FILTERS DESIGN
Lect5 A framework for digital filter design
Everything You Ever Wanted to Know About Filters*
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.
UNIT V Linear Time Invariant Discrete-Time Systems
Lecture 16a FIR Filter Design via Windowing
Chapter 7 Finite Impulse Response(FIR) Filter Design
Signal Processing First
Tania Stathaki 811b LTI Discrete-Time Systems in Transform Domain Ideal Filters Zero Phase Transfer Functions Linear Phase Transfer.
Chapter 7 Finite Impulse Response(FIR) Filter Design
Lecture 22 IIR Filters: Feedback and H(z)
Presentation transcript:

Lecture 09b Finite Impulse Response (FIR) Filters

Learning Objectives Introduction to the theory behind FIR filters: Properties (including aliasing). Coefficient calculation. Structure selection. Implementation in Matlab and C

Introduction Amongst all the obvious advantages that digital filters offer, the FIR filter can guarantee linear phase characteristics. Neither analogue or IIR filters can achieve this. There are many commercially available software packages for filter design. However, without basic theoretical knowledge of the FIR filter, it will be difficult to use them.

Properties of an FIR Filter Filter coefficients: x[n] represents the filter input, bk represents the filter coefficients, y[n] represents the filter output, N is the number of filter coefficients (order of the filter).

Properties of an FIR Filter Filter coefficients: FIR equation Filter structure

Properties of an FIR Filter Filter coefficients: If the signal x[n] is replaced by an impulse [n] then:

Properties of an FIR Filter Filter coefficients: If the signal x[n] is replaced by an impulse [n] then:

Properties of an FIR Filter Filter coefficients: If the signal x[n] is replaced by an impulse [n] then:

Properties of an FIR Filter Filter coefficients: Finally:

Properties of an FIR Filter Filter coefficients: With: The coefficients of a filter are the same as the impulse response samples of the filter.

Frequency Response of an FIR Filter By taking the z-transform of h[n], H(z): Replacing z by ej in order to find the frequency response leads to:

Frequency Response of an FIR Filter Since e-j2k = 1 then: Therefore: FIR filters have a periodic frequency response and the period is 2.

Frequency Response of an FIR Filter y[n] x[n] Fs/2 x[n] y[n] Freq Freq Fs/2

Frequency Response of an FIR Filter Solution: Use an anti-aliasing filter. x[n] x(t) ADC FIR y[n] Analogue Anti-Aliasing Fs/2 x(t) y[n] Freq Freq Fs/2

Phase Linearity of an FIR Filter A causal FIR filter whose impulse response is symmetrical is guaranteed to have a linear phase response. Even symmetry Odd symmetry

Phase Linearity of an FIR Filter A causal FIR filter whose impulse response is symmetrical (ie h[n] = h[N-1-n] for n = 0, 1, …, N-1) is guaranteed to have a linear phase response.

Phase Linearity of an FIR Filter Application of 90° linear phase shift: IH 90o I + Reverse delay + Signal separation delay - Forward 90o Q + QH

Design Procedure To fully design and implement a filter five steps are required: (1) Filter specification. (2) Coefficient calculation. (3) Structure selection. (4) Simulation (optional). (5) Implementation.

Filter Specification - Step 1

Coefficient Calculation - Step 2 There are several different methods available, the most popular are: Window method. Frequency sampling. Parks-McClellan. We will just consider the window method.

Window Method First stage of this method is to calculate the coefficients of the ideal filter. This is calculated as follows:

Window Method Using the Hamming Window: Second stage of this method is to select a window function based on the passband or attenuation specifications, then determine the filter length based on the required width of the transition band. Using the Hamming Window:

Window Method The third stage is to calculate the set of truncated or windowed impulse response coefficients, h[n]: for Where: for

Window Method Matlab code for calculating coefficients: close all; clear all; fc = 8000/44100; % cut-off frequency N = 133; % number of taps n = [-((N-1)/2):((N-1)/2)]; n = n+(n==0)*eps; % avoiding division by zero [h] = sin(n.*2*pi*fc)./(n.*pi); % generate sequence of ideal coefficients [w] = 0.54 + (0.46).*cos(2*pi.*n/N); % generate window function d = h.*w; % window the ideal coefficients [g,f] = freqz(d,1,512,44100); % transform into frequency domain for plotting figure(1) plot(f,20*log10(abs(g))); % plot transfer function axis([0 2*10^4 -70 10]); figure(2); stem(d); % plot coefficient values xlabel('Coefficient number'); ylabel ('Value'); title('Truncated Impulse Response'); figure(3) freqz(d,1,512,44100); % use freqz to plot magnitude and phase response

Truncated Impulse Response Window Method 20 40 60 80 100 120 140 -0.1 0.1 0.2 0.3 0.4 Truncated Impulse Response h(n) Coefficient number, n

Realisation Structure Selection - Step 3 Direct form structure for an FIR filter:

Realisation Structure Selection - Step 3 Direct form structure for an FIR filter: Linear phase structures: N even: N Odd:

Realisation Structure Selection - Step 3 (a) N even. (b) N odd.

Realisation Structure Selection - Step 3 Direct form structure for an FIR filter: Cascade structures:

Realisation Structure Selection - Step 3 Direct form structure for an FIR filter: Cascade structures:

Implementation - Step 5 Implementation procedure in ‘C’ with fixed-point: Set up the codec (CodecSetup.pdf). Transform: to ‘C’ code. (FIRFixed.pdf) Configure timer 1 to generate an interrupt at 8000Hz (TimerSetup.pdf). Set the interrupt generator to generate an interrupt to invoke the Interrupt Service Routine (ISR) (InterruptSetup.pdf).

Implementation - Step 5 Implementation procedure in ‘C’ with floating-point: Same set up as fixed-point plus: Convert the input signal to floating-point format. Convert the coefficients to floating-point format. With floating-point multiplications there is no need for the shift required when using Q15 format. See FIRFloat.pdf

FIR Code Projects: Fixed Point in C: \FIR_C_Fixed\ Floating Point in C: \FIR_C_Float\

Lecture 09b Finite Impulse Response (FIR) Filters - End -