You are on page 1of 65

UNIT IV DESIGN OF DIGITAL FILTERS

(i) DESIGN OF IIR FILTERS

cascade and parallel realization forms of digital filters.

Cascade form structures : To obtain the cascade form realization, the numerator and
denominator of given transfer function H(z) is factored into the product of second order
terms.

Then the total transfer function H(z) is expressed as:

Here H1(z), H2(z) Hk(z) are second order polynomials Then each subtransfer function (H 1,
H2 etc.) can be realised using direct form I or direct form II structures. The total transfer
function is obtained by connecting all second order subsystems in series as shown in fig
below.

Now we have the general difference equation for discrete time Lii system given by.

Since H1(z), H2(z) are second order polynomials.

We can write the second order differential equation for H k(z) by putting M = N =2 in eq.
(2).
We can obtain direct form-Il structure of eq. (3)

So all such subsystems should be connected in series to obtain the cascade form
realization of hR system.

Parallel form structure:•

We have the general difference equation for HR system given by:

By using partial fraction expansion we can express the overall transfer function

H(z)as:
Here C is constant and are second order subsystems.

The general block schematic of parallel realization structure for hR system is shown
below:

Here H1(z), H2(z) etc. can be realised by using direct-I or direct-Il structures. Then all
these structures are connected in parallel to obtain parallel form realization for hR
system.

direct form-I, direct form-Il, cascade and parallel structure for the system described
by:

Ans. We take z-transform both sides of difference equation, we have

1. Direct form-I
the order of
1. Direct form-Il : To obtain direct form-Il realization, we change H 1(z) and
H2(z), then resulting structure is shown below.

The direct form-Il realization is shown below:

1. Cascade form structure:


The cascade form structure is shown in fig.

1. Parallel form structure : To obtain parallel form structure, H(z) must be


expanded in partial fraction i.e.

After some arithmetic calculation, we find that

The parallel form structure is shown below:


limitations of IIR filter design by impulse invariance method ? How are they over
come by bilinear transformation method. Convert the analog filter with system
function.

into digital IIR filter by means of bilinear transformation.

Ans. In impulse invariant method we have replace analog filter by digital filter. The
limitations of impulse invariance method are given below:

1. We know that is analog frequency and its range is from . While

the digital frequency varies from That means from to maps


from

. Let k be any integer. Then we can write the general range of


butforthisrange also maps from . Thus

mapping from analog frequency to digital frequency is many to one. This mapping
is not one to one.
2. Analog filters are not band limited so there will be aliasing due to sampling process.
Because of this aliasing, the frequency response of resulting digital filter will not be
identical to the original frequency response of analog filter.

3. The change in the value of sampling time has no effect on the amount of

aliasing. Bilinear transformation method improves the limitations of in invariance

method as follows

1. There is one to one transformation from this domain to z domain.

2. The mapping is one to one.

3. There is no aliasing effect.

4. Stable analog filter is transformed into the stable digital ifiter.

Given

From eq. (1) we can say that

The value of is given as

Now we will find the value of sampling time using the relation.
Using bilinear transformation H(z) can be obtained by putting, in

the equation of H(s)

This is the required transfer function for digital hR filter.

difference between butterworth and chebyshev filters in terms of frequency


response

Ans. Butterworth filters are all pole filters characterized by the magnitude required
frequency response.

where N is the order of the filter, is its —3dB frequency (àsually called the out- off

frequency), is the passband edge frequency and is the band edge value

(i+e)

of The frequency response characteristics of Butterworth filters are shown in


figure below.

There are two types of chebyshev filters. Type I chebyshev filters are all pole filters that
exhibit equiripple behaviour in the passband and a monotonic characteristic in the
stopbond. On the other hand the family of type II Chebyshev filters contains both poles
and zeros and exhibits a monotonic behaviour in the passband. The magnitude squared of
the frequency response characteristics of a type I Chebyshev filter is given as:

Where e is a parameter of the filter related to the ripple in the passband and

is the Nth order chebyshev polynomial defined as

The frequency response of chebyshev-I filter is given below.


analog filter system function into digital HR filter by means of

bilinear z-transformation. Digital filter is to have resonant frequency

Ans. The given transfer function is:

……….(1)

From eq. (1) we can say that f = 4

The value of is given as

Now we will find out the value of sampling time (T5) using we relation.

Using bilinear transformation H(z) can be obtained by puffing

in the eq. of H (s).


This is the required transfer function for digital hR filter.

IIR low pass filter is to be designed to meet the following specifications.

(a) Pass-band frequency = 0 to 1.2 kHz

(b) Stop-band edge = 2KHz

(c)Pass-band attenuation 8.5db

(d) Stop-band attenuation 15 db

Using Butterworth approximation and Bilinear transformation obtain the desired


IIR digital filter.
Ans. In the problem the specifications of required digital filter will be given and it will
be asked to design a particular, discrete time butlerworth’s filter. Then the following steps
should be used.

1. For Bilinear transformation method.

2. Calculate the order ‘N’ of filter using

1. Calculate cut off frequency


1. Calculate the poles.

1. Calculate the system transfer function of analog filter using


chebyshev low pass filter has the following specifications:

(a) Order of the filter = 3

(b) Ripple in pass-band = 1 db

(c) Cut off frequency = 100 Hz

(d) Sampling frequency = 1 kHz.

Determine H(z) of the corresponding hR digital filter using bilinear transformation


technique.

Ans. First we will calculate the values of the edge frequency for analog filter.

Given : Order of filter = N 3

1. Calculation of required design specification of digital filter.

1. Given

3. For normalized filter

4. Calculation of poles

First we calculate parameter


Now we will calculate the values of and R

5. Calculate roles:
6 Calculation of system function

7 Calculation of transfer function of digital filter

impulse invariant method, obtain the digital filter realization of the analog filter
shown in fig.
Ans. Let

Let us find y (t) i.e. the ‘impulse response .

The transformed circuit is shown below:

Taking inverse Laplace transform on both sides, we get,


The analog system function is

The unit sample response derived by sampling every second is given by:

Digital frequency response is given by

Digital filter system function is obtained by substituting z for


The digital filter structure is as follows:

Convert the analog filter with system functions

into the digital hR filter by means of the impulse invariance method.

Ans. The partial fraction expansion of is given as:

The corresponding digital filter is then

It should be noted that zero of is not obtained by transforming the


zero at s = -z into a zero at
Design a chebyshev filter for the following specification using (a) bilinear
transformation (b) Impulse invariance method.

Ans. Given
Using bilinear transformation

(b) Impulse Invariance Method:


Taking Inverse Laplace transform we obtain

Let

Taking z-Transform

Assume T =1 sec.
frequency transformation in analog domain is done. Discuss in detail.

Frequency Transformations

Uptil now we have studied the design of low pass filter only. Now if it is asked to design
other filter like high pass, band pass or band reject filter then we have to use the
frequency transformation.

If the cut-off frequency of LPF is equal to I that means if then, it is called as


normalized filter. To design the other types of filters; first the system function of
normalized LPF is obtained. Then using frequency transformation we can get the system
function of the required filter. The following formulae are used for the frequency
transformation.

Let, we have a normalized L.P.F. having cut-off frequency

1.Low pass to low pass : Suppose it is asked to design another LPF with new passband
edge frequency Then use the transformation,

That means replace ‘s’ by in the given equation of H(s).

LP

2.Low pass to high pass: Suppose we have to design HPF with cut off frequency

then use,

3.Low pass to bandpass : Suppose we have to design bandpass filter with higher

cutoff frequency and lower cut off frequency then use the transformation,

4.Low pass to bandstop or notch or band reject : Suppose we have to design notch filter
with higher cut-off frequency and lower cut off frequency then use the
transformation,
The following Table gives the summary of frequency transformation

Note : These formulae are applicable for analog frequency transformation. Similarly, we
can transform the LPF in digital domain by using the formulae for digital frequency
transformation.
FIR FILTER DESIGN

cascade realization using minimum number of multiplications for the system.

We can consider that H(z) is product of factors and

These two factors are having linear phase


symmetry. The realization is shown in fig below :
Q. 2. Realize the system function.

by using direct form structure.

Ans. Given that

The realization is shown in fig below:

signal flow graph representation and lattice form structures for FIR

systems.
Ans. Lattice Structure for FIR Filters : Consider Mth order FIR system with the transfer
function.

Here M denotes the degree of polynomial and is coefficient.

Thus when M = 0 we get

Basically is the transfer function which can be written as

Putting Equation (I) in Equation (3) we get.

Taking IZT of both sides we get,

Let M = I then Equation (5) becomes,

In the simplest way Equation (6) can be realized as shown in Fig. (a).
Now the same output can be obtained by using the structure shown in Fig. (b). This

structure is called as single stage lattice structure. This structure provides two outputs

namely A1(n) and B1(n).

A0 and B0 are constant multipliers.

In terms of x (n) we can write,

Similarly, the other output can be written as,

In terms of x (n) we can write,


We know that Equation (7 (b)) is obtained by using single stage lattice structure.

Equations (6) and (7 (b)) are same if,

Similarly, Equation (6) and (7 (a)) are matching if,

Here ‘k’ is called as reflection coefficient.

That means the same output can be obtained using single stage lattice structure.

Now for M = 2; Equation (5) becomes,

As M = 2 we have to cascade two stages to obtain two stage lattice structure as shown in
Fig. (c).

From fig. (c) we can write,

Output of first stage:


And the output of second stage is,

Now putting equation (10) in equation (12) we get,

From Equation (11) we can write,

Putting this value in equation (14) we get,

Observe that equations (9) and (15) are matching.

Here k1 and k2 are reflection coefficients The same way we can increase the number of
stages Finally Mth stage lattice structure is obtained as shown in Fig (d)
the magnitude and phase response of FIR filters. How is linear phase FIR filter
defined.

Ans. The FIR filter can be characterized by its system function.

Which we consider as polynomial of degree N-1 in the variable .The roots of

this polynomial constitute the zeroes of the filter. The frequency response of eq. (1) is
givr’ .by

which is periodic in frequency with period

where is magnitude response and is phase response

For FIR filters with linear phase we can define

where a is a constant phase delay in sample. Symmetric Condition

We can write

which gives us
By taking ratio. (3) to (2), we have

Simplifying the above equation we get

The eq. (4) will be zero when

Therefore, FIR filters will have constant phase and when the impulse response is

symmetrical about , then its phase is piecewise linear. Fig. below shows the
property of. eq. (5), for N = 6 and N = 5.

In both the cases when N = 6 and N = 5 in the general case, the unit impulse

response sequence satisfying eq. (5). is symmetrical about For N odd, there is

one sample , that is not matched to any other sample.


Antisymmetric Condition:

For this

Then

Therefore FIR filters have constant group delay and not constant phase delay when

impulse response is antisymmetric about


The filters that satisfy the above conditions and have a delay of N—i samples but

their impulse response are antisymmetric around the centre of the sequence, as opposed
to the true linear phase sequence that are symmetric around the centre of the sequence.

Magnitude Specifications : It is shown in fig below:

Hence
Magnitude specification of FIR filter can be written as

design of FIR filter using window method Also compare design using Kaiser and
Hanrnng Windows

Ans. FIR Filter Design using Windows Different types of windows are used to design
FIR filter First we will discuss the design of FIR filter using rectangular window The
rectangular window is as shown in fig.

It is denoted by Its magnitude is 1 for the range, n = 0 to M -1 Now ????? the


impulse response having infinite duration If hd (n) is multiplied by then impulse
response is obtained as shown in Fig (a) That means we will get only ??? not all
pulse Since we are truncating the input sequence by using a “process is called as
truncation process Since the shape of window function is react in called as rectangular
window.
Magnitude response of rectangular window:

The rectangular window is defined as,

Let be infinite duration impulse response. We know that the finite impulse
response h(n) is obtained by multiplying

We will denote Fourier transform of . Thus using the definition of


fourier transform we can write,

the design of FIR filters by rectangular and hamming windows. Compare their
performance.
Ans. The design of FIR filters by rectangular Window technique as given below.

The rectangular window is denoted as and it is defined as

We can obtain the spectrum of by taking fourier transform of equation (1) as

Hence the above equation becomes

Figure below illustrates the plot of equation (2). The transition width of the main labe is
approximate . The first sidelobe will be 13dB down the peak of main lobe and the
roll off will be at 20dB per decade. For a causal rectangular window, the frequency
response can be written as
From equation (2) and (3), it may be noted that the linear phase response of the the causal

filter is written as and the non causal impulse response will have a
zero phase shift.

The design of FIR filters by Hamming Window technique as given below.

The Harmming window function is denoted as and is given by

The hamming window function (non-causal) is expressed as

It may be observed that the non-causal Hamming Window function is related to the

rectangular window function as shown below

The spectrum of Hamming window can be obtained as.


We note that the width of the main lobe is approximately &r/M and the peak of the

first side lobe is at —43dB. The side lobe roll off is 20 dB/decade.

Represent system function using linear phase FIR structure.

Ans. FIR filter is said to be having a linear phase structure if its unit impulse

sequence is either symmetric or antisymmetric about some point in time. That means FIR
filter has linear phase if it satisfies the condition.

Here

The transfer function of FIR filter is given by

Let us split the summation into two points

But for linear phase we have


Puffing this condition in the second summation of eq. (3) we get

eq. (4) can be written as,

Case (1) for even M:

We know that thus eq. (5) becomes

Now expanding the sjimmation we get,


………(6)

Taking IZT of both sides we get,

………(7)

Let M = 6 Thus equation (7) becomes

……….
(8)

The realization of eq (8) is shown below m fig

Case H For Odd M: -

When M is odd (let M = 5) we can simply write the difference as


But we have the condition for
symmetry

Here M = 5. Then form eq. (10) we get, -

For

Thus eq. (9) becomes

The realization of eq. (11) is shown in fig below:

Design an ideal low pass filter with a frequency response


Find the values of h (n) for N 1. Also find the filter transfer and frequency
magnitude frequency function.

Sol. Step 1. Draw the desired frequency response:

Given,

From the frequency response, we can find that the given response is a symmetrical

N odd response.

Step 2. To find

In general,
Step 3. To find h(n):

For symmetric response,

So

But we know that

Step 4. To find the filter transfer function.


Step 5. To find the realizable filter transfer function.

From the realizable filter transfer function, we have

Step 6. To find the magnitude frequency response


Design a low pass FIR filter using hamming window to meet the following
specifications.

use 10 tap filter and obtain the impulse response of the desired filter.

Ans. The filter co-efficients are given by :

Given M = 10. The filter co-efficients are:

The hamming window function is


The filter co-efficients of the resultant filter are then

Therefore

The frequency response is given by

Design an ideal band pass filter with a frequency response.


Find the values of h(n) for N 7. Find the realizable filter transfer function and
magnitude function of

Sol. Step 1. Draw the ideal desired frequency response of bandpass filter.

Form the desired frequency response, we can find that the given response is symmetric N
odd

Step 2. To find

Step 3. To find h(n).

For symmetry response


Step 4. To find filter transfer function,

Step 5. To find the realizable filter transfer function

Therefore, the filter co-efficients of the causal filters are,

Step 6. To find the magnitude response of


Design an ideal band reject filter with a desired frequency response

Find the value of h(n) for N = 7. Find H(z) and

Sol. Step 1. Draw the ideal desired frequency response of band reject filtr.

From the desired frequency response, we can find that the given response is symmertric,
N-odd.

Step 2. To find
In general,

Step 3. To find h(n)

For symetric response,

Step 4. To find filter transfer function,


Step 5. To find the realizable filter transfer function.

Therefore, the filter co-efficients of the causal filters are,

Step 6. To find magnitude function

Design an ideal highpass filter with a frequency response


Find the value of h(n) for N = 11 using

(a) Hamming window

(b) Hanning window.

Sol. (a) Hamming Window

Step 1. Draw the desired frequency response of ideal highpass filter.

From the desired frequency response, we can find that the given response is

symmetric.

Step 2. To find

We know that,

Step3. To find the Hamming window sequence.


Step 4. To find the filter co-efficents
Step 5. To find the filter co-efficients using Hamming window sequence.

Step 6. To find the transfer function of the filter.


Step 7. To find transfer function of the realizable filter

The filter co-efficients of causal filters are,

(b) Hanning Window

Step 1. The filter co-efficients can be obtained from part (a), step (2) and step (5)

Step 2. To find the Hanning window sequence

The Hanning window sequence is given by


Step 3. To find the filter co-efficients using Hanning window.

The filter co-efficients using Hanning window are

Step 4. To find the transfer function of the filter.

The transfer function of the filter is given by,


Step 5. To find the transfer function of realizable filter.

signal flow graph representation and lattice structures for hR systems.

It is noted that the computational algorithm of an LTI digital filter is conveniently


represented as block diagram using basic building blocks tepresenting the unit
delay or storage element, the multiplier and the adder. Figure shows these basic
building blocks.

As an example, for a first-order digital system (i.e., filter), we can write the difference
equation as under:

Figure illustrates the basic realization block diagram for equation (4) and also the
corresponding structure of the signal flow graph.
Note : From fig., it is quite obvious that there is a direct correspondence between
branches in the digital realization structure and branches in the corresponding signal flow
graph. However, in the signal flow graph, the nodes represent both branch points and
adders in the digital realization block diagram.

Lattice Structure of an hR System: Let us consider an all-pole system with system


function

……….(1)

The difference equation for this hR system will be

………(3)

for N=1,we have


The equation can be realised in lattice structure as shown in figure from which we

can obtain

Now, let us consider for the case N = 2, then, we have

This output can also be obtained from a two-stage lattice filter as shown in figure

from which we have.


In a similar manner, we have

On comparing equation (9) and equation (17), we get

For a N-stage hR filter realized in lattice structure as shown in figure we get

Conversion from Lattice Structure to Direct form Structure For N = 3 we can write the
difference equation for an hR filter as below
and from the lattice structure, we can write

Substituting m = 2 in equation (20) and in eqation (21), we get

And

Now, substituting equations (27) and equation (29) in eqauation (25), we obtain

comparing equation (23) and equation we get

The equation (32) canbe used to convert lattice structure to direct form.
various steps for the design of linear phase FIR filters using window method.

Design of Linear Phase FIR Filters Using Windows: Let us consider that the digital filter
which is to the designed have the frequency response This is also called the
desired frequency response. As discussed earlier, the required frequency response of a
digital filter is periodic in frequency and may be expanded in a Fourier series, i.e.,

Let the corresponding unit sample response (desired) be

Then, we have

The Fourier Series coefficients of the series h (n) are similar to the impulse response of a
digital filter. Infect, there are two difficulties in the implementation of expression in
equation (33) for designing a digital filter. Firstly, the impulse response is of infinite
duration and secondly, the filter is non-causal and unrealisable. No finite amount of delay
can make the impulse response realisable. Therefore, the filter resulting from a Fourier
series representation of is an unrealisable hR filter.

The finite duration impulse response may be converted to a finite duration impulse
response simply by truncating the infinite series n ± N. However, this results in
undesirable oscillations in the passband and stop band of the digital filter. This is because
of the slow convergence of the Fourier series near the points of discontinuity. These
undesirable oscillations can be reduced by using a set of time, limited weighting
functions, to known as window functions, to modify the Fourier coefficients. The
windowing technique has been illustrated in Fig.
The required frequency response and its Fourier coefficients {h (n)} have been
shown at the top of this figure The finite duration weighting function and is Fourier
transform are shown in the second row. The Fourier transform of the weighting
function contains a main label, which consists of most of the energy of the

window function and side lobes which decay rapidly. The sequence

is obtained to get an FIR approximation of The sequence is exactly zero

outside the interval The sequence and its Fourier transform


are shown In the thfrd row. is nothing but thecircular convolution of
and The realisable causal sequence g (n), which is obtained by shifting is
shown in the !ast row and this can be used as the desired filter impulse response.

A major effect of windowing is that the discontinuities in are converted into transi,
ion bands between values on either side of the discontinuity. The width of these transition
bands depends on the width of the main lobe of produces approximation errors for
all w. Based on the above discussion, the desirable characteristics can be listed as under

(i) The Fourier transform of the window functin must have a small width of main
lobe having as mush of the total energy as possible.

(ii) The Fourier transform of the window function should have side lobeswhich
decrease in energy rapidly as w tends to r. Some of the most frequently used window
functions are described in the following sections to follow

Rectangular Window Function (i.e., Technique)

The rectangular window is denoted as and it is defined as

We can obtain the spectrum of by taking Fourier transform of equation as


Hence, above equation becomes

Figure illustrates the plot of eqation. The transition width of the main lobe is

approximaty . The first sidelobe will be 13dB down the peak of the main lobe and
the roll off will be at 20 d19 per decade. For a causal rectangular window, the frequency
resiponse can be written as:

From above equations, it may be noted that the linear phase response of the causal

filter is written as and the non-causal impulse response will have a


zero phase shift.

You might also like