- 69 Views
- Uploaded on
- Presentation posted in: General

Lecture 2: February 27, 2007

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Lecture 2: February 27, 2007

Topics:

1. Introduction to Digital Filters

2. Linear Phase FIR Digital Filter. Introduction

3. Linear-Phase FIR Digital Filter Design: Window (Windowing) Method

Lecture 2: February 27, 2007

Topic:

1. Introduction to Digital Filters

- basic terminology and definitions: filtering, filter, analogue filtering, digital/discrete-time filtering and filters,
- frequency-selective filter classification,
- basic parameter specification for filter design.

Lecture 2: February 27, 2007

Topic:

2. Linear Phase FIR Digital Filter. Introduction

- advantages and disadvantages of linear phase FIR digital filters,
- linear phase conditions for FIR filters,
- four groups/kinds of linear phase FIR digital filters.

Lecture 2: February 27, 2007

Topic:

3. Linear-Phase FIR Digital Filter Design:

Window (Windowing) Method

- basic principles and algorithms,
- method description in time- and frequency-domain,
- Example A.: FIR filter design-rectangular window application,
- Gibbs’ phenomenon and different windowing applications,
- Example B.: FIR filter design at different window applications.

2. Introduction to Digital Filters

2.1. Definitions of Basic Terms

Filtering: process of extraction of desired signal from noise

Filter:system performing filtering

Analogue filtering:filtering performed on continuous-time signals and yields continuous-time signals

Digital/discrete-time filtering:filtering performed on digital/discrete-time signals and yields digital/ discrete-time signals

Examples of filtering applications

A. Noise suppression

- Received radio signals.
- Signals received by imaging sensors, such as television cameras or infrared imaging devices.
- Electrical signals measured from the human body (such as brain, heart or neurological signals).

B. Enhancement of selected frequency range

- Treble and bass control or graphic equalizers in audio systems.
- Enhancement of edges in image processing.

C. Bandwith limiting

- Bandwidth limiting as a means of aliasing prevention in sampling.
- Application in FDMA communication systems (Frequency Division Multiple Access - FDMA).

D. Removal or attenuation of specific frequencies

- Blocking of the DC component of a signal.
- Attenuation of interference from powerline (50 Hz).

Differentiation:

Integration:

Hilbert transform:

E. Special operations

Ideal magnitude frequency response

2.2. Filter Specifications

2.2.1. Ideal Filters

Low-Pass Filters:Low-pass filters are designed to pass low frequencies, from zero to a certain cut off frequency and to block high frequencies.

Ideal magnitude frequency response

2.2. Filter Specifications

2.2.1. Ideal Filters

Low-Pass Filters:

Ideal magnitude frequency response

High-Pass Filters:High-pass filters are designed to pass high frequencies, from a certain cut off frequency to , and to block low frequencies.

Ideal magnitude frequency response

High-Pass Filters:

Ideal magnitude frequency response

Band-Pass Filters:Band-pass filters are designed to pass a certain frequency range, which does not include zero, and to block other frequencies.

Ideal magnitude frequency response

Band-Pass Filters:

Ideal magnitude frequency response

Band-Stop Filters:Band-stop filters are designed to block a certain frequency range, which does not include zero, and to pass other frequencies.

Ideal magnitude frequency response

Band-Stop Filters:

Multiband Filters:This type of filters generalizes the previous four types of filters in that it allows for different gains or attenuations in different frequency bands. A piecewise –constant multiband filter is characterized by the following parameters:

Possible ideal magnitude frequency response

- A division of the frequency range to a finite union of intervals. Some of these intervals are pass bands, some are stop bands, and the remaining can be transition bands.
- A desired gain and a permitted tolerance for each pass band.
- An attenuation threshold for each stop band.

Possible ideal magnitude frequency response

A. Comments on phase response:The phase response of ideal filters is linear:

B. Comments on group delay function:Group delay function of ideal filters is constant:

C. Note: It will be proved for linear phase FIR filters:

Example:

All-Pass Filters:A filter is called all-pass if its magnitude response is identically a positive constant ( ) at all frequencies. The phase response of an all-pass filter is not restricted and is allowed to vary arbitrarily as a function of the frequency.

In general, a rational filter is all-pass if only if it has the same number of poles and zeros (including multiplicities), and each zero is the conjugate inverse of a corresponding pole: zk=1/pk.

Ideal normalized frequency response

Differentiator:The ideal frequency response of a digital differentiator is

Ideal normalized frequency response

Hilbert Transformer:The frequency response of an ideal Hilbert transformer is

2.2.2. Practical (Real, Causal) Filters:

Description by a Set of Parameters

- pass band (bands),
- stop band (bands),
- transition band (bands),

- pass band cut off frequency/frequencies,
- stop band cut off frequency/frequencies,

- pass band ripple/ripples,
- stop band ripple/attenuation (ripples/attenuations).

pass band

stop bands

transition bands

pass-band ripple

stop-band ripple

(attenuation)

3. Linear PhaseFIR Digital Filter. Introduction

3.1. Advantages and Disadvantages

of

Linear Phase FIR Digital Filters

Mathematical model of a causal FIR digital filter:

FIR digital filter has a finite number of non-zero coefficients of its impulse response:

Digital FIR filters cannot be derived from analogue filters, since causal analogue filters cannot have a finite impulse response. In many digital signal processing applications, FIR filters are preferred over their IIR counterparts.

The advantages of FIR filters (1):

- FIR filters with exactly linear phase can be easily designed. This simplifies the approximation problem, in many cases, when one is only interested in designing of a filter that approximates an arbitrary magnitude response. Linear phase filters are important for applications where frequency dispersion due to nonlinear phase is harmful (e.g. speech processing and data transmission).
- There are computationally efficient realizations for implementing FIR filters. These include both non-recursive and recursive realizations.

The advantages of FIR filters (2):

- FIR filters realized non-recursively are inherently stable and free of limit cycle oscillations when implemented on a finite-word length digital system.
- The output noise due to multiplication round off errors in FIR filters is usually very low and the sensitivity to variations in the filter coefficients is also low.
- Excellent design methods are available for various kinds of FIR filters with arbitrary specifications.

The disadvantages of FIR filters:

- The relative computational complexity of FIR filter is higher than that of IIR filters. This situation can be met especially in applications demanding narrow transition bands or if it is required to approximate sharp cut off frequency. The cost of implementation of an FIR filter can be reduced e.g. by using multiplier-efficient realizations, fast convolution algorithms and multirate filtering.
- The group delay function of linear phase FIR filters need not always be an integer number of samples.

3.2. Frequency Response of Linear Phase FIR Digital Filters

FIR filter of length M :

A. Symmetrical impulse response:

B. Antisymmetrical impulse response:

It will be shown that the linear phase condition is obtained by imposing symmetry conditions on the impulse response of the filter. In particular, we consider two different symmetry conditions for h(k):

The length of the impulse responseof the FIR filter (M)can be even or odd. Then, the four cases of linear phase FIR filters can be obtained.

3.2.1. Symmetrical Impulse Response, M:Even

h(7)=h(8)

h(2)=h(13)

h(1)=h(14)

h(0)=h(15)

Example:M=4 (even), symmetrical impulse response

End.

Here, the real-valued frequency response is given by

We observe that the phase response is a linear function of provided that is positive or negative. When changes the sign from positive to negative (or vice versa), the phase undergoes an abrupt change of radians. If these phase changes occur outside the pass-band of the filter we do not care, since the desired signal passing through the filter has no frequency content in the stop-band.

“h(7)=h(7)”

h(1)=h(13)

h(6)=h(8)

h(0)=h(14)

3.2.2. Symmetrical Impulse Response, M:Odd

Example:M=5 (odd), symmetrical impulse response

the real-valued frequency response

h(1)=-h(14)

h(0)=-h(15)

h(7)=-h(8)

3.2.3. Antisymmetrical Impulse Response, M:Even

Example:M=4 (even), antisymmetrical impulse response

the real-valued frequency response

!

!

Low-pass and band-stop filters cannot possess an antisymetrical impulse response because

Here, the real-valued frequency response is given by

3.2.4. Antisymmetrical Impulse Response, M:Odd

h(1)=-h(15)

!

h(8)=-h(8)=0

h(0)=-h(16)

h(7)=-h(9)

Example:M=5 (odd), antisymmetrical impulse response

the real-valued frequency response

!

!

Low-pass and band-stop filters cannot possess an antisymetrical impulse response because

Here, the real-valued frequency response is given by

4. Linear-Phase FIR Digital Filter Design

4.1. Window (Windowing) Method

The coefficients of the Fourier series are easily recognized as being identical to the impulse response of a digital filter. There are two difficulties with the application of the above given expressions for designing of FIR digital filters:

4.1.1. Basic Principles and Algorithms

Since , the frequency response of any digital filter is a periodic in frequency, it can be expended in a Fourier series. The resultant series is of the form

1. The filter impulse response is infinite in duration, since the above given summation extends to .

2. The filter is unrealizable (non-causal) because the impulse response begins at ; i.e. no finite amount of delay can make the impulse response realizable.

Hence the filter resulting from a Fourier series representation of is an unrealizable (non-causal) IIR filter. In spite of that fact, the causal FIR filter can be designed by the approach illustrated in the next figures.

Causal filter :

FIR filter :

Causal FIR filter of lengthM:

4.1.1. Summary

Non-Causal IIR filter:

Window (Windowing) Method: Time-Domain

Rectangular window

red

red

Windows (Windowing) Method: Frequency-Domain

No ripple!

Central (main) lobe

Side lobes

Ripple!

Gibbs Phenomenon

Low-pass filter:

Example:

By the impulse response truncation method (by the windowing method at rectangular window application) design a low-pass filter of order N=15 with pass-band cut off frequency (pass-band edge frequency) . Frequency sampling is .

Solution:

?

Problem:

Solution (1):

Rectangular window application:

for

Solution (2):

Example: Impulse Responses

g(0)=f(-7)

g(14)=f(7)

g(1)=f(-6)

Example: Magnitude Response

Example: Phase Response

4.1.2. Gibbs Phenomenon and Different Windowing

Direct truncation of impulse response leads to well known Gibbs phenomenon. Itmanifests itself as a fixed percentage overshoot and ripple before and after discontinuity in the frequency response. E.g. standard filters, the largest ripple in the frequency response is about 9% of the size of discontinuity and its amplitude does not decrease with increasing impulse response duration – i.e. including more and more terms in the Fourier series does not decrease the amplitude of the largest ripple. Instead, the overshoot is confined to a smaller and smaller frequency range as is increased.

Example: Gibbs phenomenon illustration

Next figures: Magnitude responses of the N-th order FIR low-pass digital filters with normalized cut off frequency , for N=5, 25, 50, 100. The figures confirm the above given statements concerning the Gibbs phenomenon.

Low-Pass FIR Filter: Rectangular Window Application

Comments:

The major effect is that discontinuities of became transition bands between values on the either side of the discontinuity. Since the final frequency response of the filter is the circular convolution of the ideal frequency response with the window’s frequency response

it is clear that the width of these transition bands depends on the width of the main (central) lobe of .

The second effect of the windowing is that the ripple from the side lobes produces a ripple in the resulting frequency response. Finally, since the filter frequency response is obtained via convolution relation, it is clear that the resulting filters are never optimal in any sense, even though the windows from which they are obtained may satisfy some reasonable optimality criterion:

- Small width of the main lobe of the frequency response of the window containing as much the total energy as possible.
- Side lobes of the frequency response that decrease in energy rapidly as tends to .

Rectangular:

Bartlett:

Hann:

Hamming:

Blackmann:

4.1.2.1. Some Commonly Used Windows

: the modified zero-th-order Bessel function of the first kind, which has the simple power series expansion.

For most practical applications, about 20 terms in the above summation are sufficient to arrive at reasonably accurate

Kaiser (adjustable window): parameter

Window Function: A Review (M=55, N=27)

Bartlett

Hann

Hamming

Blackman

Kaiser Window

=15

=1

=3

=30

=8

Example:

By the windowing method, design a low-pass filter of order N=55 with pass-band cut off frequency . Frequency sampling is .

Solution:MATLAB function fir1.m. For the results see the next figures.

Example:FIR Filter Design by Windowing Method

N=55

[dB]

Bartlett Window

Rectangular Window

Hamming Window

Example:FIR Filter Design by Windowing Method

[dB]

Rectangular Window

Kaiser Window: alfa=3

Kaiser Window: alfa=10

Kaiser Window: alfa=15

Kaiser Window: alfa=30