0% found this document useful (0 votes)
31 views21 pages

Lecture 6 - FIR Filters

This document discusses the design of FIR filters using the window method. It begins by explaining that FIR filters can be implemented using DSP chips in real-time to operate on discrete-time signals. It then provides an overview of different window functions that can be used in the window method to design FIR filters, including rectangular, Bartlett, Hann, Hamming, Blackman, and Kaiser windows. The document concludes by noting that increasing the window size can improve the transition width in the frequency response when using window functions to design FIR filters.

Uploaded by

ali ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views21 pages

Lecture 6 - FIR Filters

This document discusses the design of FIR filters using the window method. It begins by explaining that FIR filters can be implemented using DSP chips in real-time to operate on discrete-time signals. It then provides an overview of different window functions that can be used in the window method to design FIR filters, including rectangular, Bartlett, Hann, Hamming, Blackman, and Kaiser windows. The document concludes by noting that increasing the window size can improve the transition width in the frequency response when using window functions to design FIR filters.

Uploaded by

ali ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Fundamental Principles of Physiological

Signal Measurement, Synthesis and


Processing

FIR Filters
DSPs are now available to implement digital filters in real-
time. A digital filter, such as an FIR filter, operates on
discrete - time signals and can be implemented with a DSP
such as the TMS320C6x.

•Process: This involves the use of ADC to capture an


external input signal, process the input samples, and send
FIR filters the resulting output through a DAC.

•Tool: Several tools are available to design an FIR filter in


real time and implement within a few minutes using the
TMS320C6x-based DSK. The filter design consists of the
approximation of a transfer function with a resulting set of
coefficients.

N.B. FIR filters are transversal and tapped - delay filters.


Overview of Approximation Techniques

Digital filter design techniques fall into either IIR or FIR approaches:

• General Approximation Approaches:


- Placement of poles and zeros
- Numerical solution of differential equations
- Impulse invariant (step invariant etc.)
- Bilinear transformation
- Minimum mean-square error (frequency domain)

• FIR Approximation Approaches


- Truncated impulse response of ideal brickwall responses using window functions
- Frequency sampling desired response using transition samples
- Optimum equiripple approximations (use the Parks-McClellan algorithm via the Remez
exchange algorithm, firpm()in MATLAB)
- Minimum mean-square error in the frequency domain

• In the FIR approaches the additional constraint of linear phase is usually imposed
Fig. 6.5. FIR filter structure showing delays

Linear phase filters are FIR filters. However, not all FIR filters have linear phase. A useful feature of an
FIR filter is that it can guarantee linear phase. The linear phase feature is useful in various applications
such as speech analysis, where phase distortion can be critical.
Characteristics of FIR
Filters
• Impulse response has a finite duration (N cycles)
• Linear phase, constant group delay (N must be odd)
• FIR filters have only zeros (no poles), all zero filters, or called feedforward, non recursive or transversal
Why bother?
• unconditionally stable, can be designed to have a linear phase
• can be adaptive, flexibly in shaping their magnitude response
• computational advantages when decimating output
• easy to understand and design via:
• Window sinc method
• Fourier series expansion with windowing
• frequency sampling using inverse FFT – arbitrary frequency
Desired (Ideal) Frequency Response of different Filters

Fig. 6.6. Desired transfer function for FIR filters: (a) lowpass, (b) highpass, (c) bandpass, (d) bandstop
Determining the Filter coefficients of FIR Filter
Calculation Methods
The filter coefficients can be calculated by using several methods as:

o Windowing
o Optimal sampling methods
o Frequency sampling methods.

Impulse response truncation - the simplest design methods, has undesirable frequency domain
characteristic, not very useful
Windowing design method - simple and convenient but not optimal

N.B. All of these methods can lead to linear phase FIR filter
Window Design Technique
The basic idea behind the window design is to choose a proper ideal frequency-selective filter (which always
has a noncausal, infinite-duration impulse response) and then to truncate (or window) its impulse response to
obtain a linear-phase and causal FIR filter.
The emphasis in this approach is on selecting an appropriate windowing function and an appropriate ideal
filter. We will denote an ideal frequency-selective filter by , which has a unity magnitude gain and linear-
phase characteristics over its passband, and zero response over its stopband.

An ideal LPF of bandwidth c   is given by:

H d e  {
1.e j ,   c
j
0, c    

where is the cut-off frequency and α is the sample delay


Window Design Method
Effects of window size
• As we increase the width of the window (n), the spectrum of filter would be sharper and the result of
convolution will be near to ideal.
• As the resulting ideal impulse response does not lead to fir filter, the ideal impulse response can be
truncated by setting hD(n)=0; for n>m (say). but this introduces the so called Gibb’s oscillations.
• filter designed by windowing method has equal passband and stopband ripples
Common Window Functions for FIR Design

• Practical approach to design an FIR filter is by


multiplying the ideal impulse response by a
window function, w(n), whose duration is
finite other than the rectangular window.
• This leads to the resulting impulse response
decaying smoothly towards zero, so the
Gibb's oscillations will be reduced.
• But the transition width will be wider than
the case when the rectangular window is
used.
Rectangular Window
The rectangular window is the simplest window function but
provides the worst performance from the viewpoint of
stopband attenuation. It is defined as:
1, 0  n  M 1
 n  {
0, otherwise

The frequency response function of the rectangular window


is:   M    M 
 sin  2    j M 1 sin  
W e       2 
j
e 2
 Wr   

 sin     
   sin  
 2  2
Note: The exact transition bandwidth is:
1.8
s   p 
M
which is less than half the approximate bandwidth of
Bartlett Window

Unlike the sudden transition from 0 to 1 (or 1 to 0), i.e. Gibbs


phenomenon, Bartlett allows a more gradual transition in the
form of a triangular window, and is give by:

 2n M 1
 M 1 , 0n
2

 2n M 1
  n   2  ,  n  M 1
 M 1 2
 0, otherwise


Hann Window
The Hanning or raised cosine window function is given by:

Note: The Hanning window has the highest or first sidelobe level at approximately -31dB from the peak of
the mainlobe.
Hamming Window
The Hamming window is similar to the Hann window except that it has a small amount of discontinuity and is
given by :

Note: The Hamming window which has the highest or first sidelobe level at approximately -43dB from the peak
of the main lobe.
Blackman Window
The Blackman window function is also similar to the previous two but contains a second harmonic term and
is given by:

Note: Blackman window has the highest sidelobe level down to approximately −58dB from the peak of the
mainlobe. Also, whilst the Blackman window produces the largest reduction in the sidelobe compared with
previous window functions, it has the widest mainlobe.
Kaiser Window
The Kaiser window function is an adjustable window function that is widely used in practice. The Kaiser
window function is given by:
  2n  
2

I 0   1  1   
  M  1  
 n  , 0  n  M 1
I0  
 
k 2

 x 
where is the modified Bessel function given by I 0  x   1    2 
k 0 k!
 

Time Frequency
There are much less ripples
for the Hanning window
but that the transition
width has increased

Transition width can


be improved by
increasing the size of
the Hanning window
to M = 40
FIR Filter Specification for Window Method

The band-edge frequencies are often


called corner frequencies, particularly
when associated with specified gain or
attenuation (e.g. gain =-3dB).
FIR Filter Specification for Window
Method
Equal transition bandwidth on both sides of the ideal
cut-off frequency

Equal peak approximation error in the passband and


stopband

Key Properties of the Distance between approximation error peaks is


Window Design approximately equal to the width of the window
main-lobe
Method
The width of the main-lobe is wider than the
transition band

Peak approximation error is determined by the


window shape, independent of the filter order

You might also like