0% found this document useful (0 votes)
16 views

Unit - III Concepts of Digital Filtering: By:-Mr. B.M.Daxini

This document discusses digital filters. It begins by explaining that digital filters operate on discrete samples of a continuous signal, unlike analog filters which operate continuously. It then lists several advantages of digital filters such as programmability, stability, and versatility. The document goes on to explain concepts relevant to digital filters such as the z-transform, common filter elements like delay, multiplication and addition, and types of filters. It also discusses the transfer function and stability criteria in the z-domain.

Uploaded by

Bhautik Daxini
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)
16 views

Unit - III Concepts of Digital Filtering: By:-Mr. B.M.Daxini

This document discusses digital filters. It begins by explaining that digital filters operate on discrete samples of a continuous signal, unlike analog filters which operate continuously. It then lists several advantages of digital filters such as programmability, stability, and versatility. The document goes on to explain concepts relevant to digital filters such as the z-transform, common filter elements like delay, multiplication and addition, and types of filters. It also discusses the transfer function and stability criteria in the z-domain.

Uploaded by

Bhautik Daxini
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/ 38

Unit III

Concepts of Digital Filtering


By :- Mr. B.M.Daxini

DIGITAL FILTERS
The function of a digital filter is the same as its analog
counterpart, but its implementation is very different.
Analog filters are implemented using = ???
either active or passive electronic circuits, and they operate on
continuous waveforms.
Digital filters, are implemented using either a digital logic
circuit or a computer program and they operate on a sequence
of numbers that are obtained by sampling the continuous
waveform.
A.V.P.T.I

Mr. B. M. Daxini

Advantages of using digital filters


1. A digital filter is programmable, i.e. its operation is determined by a
program stored in the processor's memory. This means the digital
filter can easily be changed without affecting the circuitry (hardware).
An analog filter can only be changed by redesigning the filter circuit.
2. Digital filters are easily designed, tested and implemented on a
general-purpose computer or workstation.
3. The characteristics of analog filter circuits (particularly those
containing active components) are subject to drift and are dependent
on temperature. Digital filters do not suffer from these problems, and
so are extremely stable with respect both to time and temperature.

A.V.P.T.I

Mr. B. M. Daxini

4. Unlike their analog counterparts, digital filters can handle low


frequency signals accurately. As the speed of DSP technology
continues to increase, digital filters are being applied to high
frequency signals in the RF (radio frequency) domain, which in the
past was the exclusive preserve of analog technology
5. Digital filters are very much more versatile in their ability to process
signals in a variety of ways; this includes the ability of some types of
digital filter to adapt to changes in the characteristics of the signal.
6. Fast DSP processors can handle complex combinations of filters in
parallel or cascade (series), making the hardware requirements
relatively simple and compact in comparison with the equivalent
analog circuitry.

A.V.P.T.I

Mr. B. M. Daxini

7. Accuracy is dependent only on round-off error, which is directly


determined by the number of bits that the designer chooses for
representing the variables in the filter. Also it is generally easy and
inexpensive to change a filters operating characteristics (e.g., cutoff
frequency).

A.V.P.T.I

Mr. B. M. Daxini

THE z TRANSFORM
The sampling process reduces a continuous signal to a sequence of numbers.
Figure below is a representation of this process which yields the sequence {a(0), a(T),
a(2T), a(3T), , a(kT)}
This set of numbers summarizes the samples of the waveform a(t) at times 0, T, , kT,
where T is the sampling period.

A.V.P.T.I

Mr. B. M. Daxini

7
By definition, the z transform of any sequence {f(0), f(T), f(2T), , f(kT)} (4.2) is
F(z) = f(0) + f(T)z1 + f(2T)z2 + + f(kT)zk
In general

By this definition, then the z transform of the sequence of {a(0), a(T), a(2T), a(3T), , a(kT)}
is
A(z) = a(0) + a(T) z1 + a(2T) z2 + + a(kT) zk
OR

A.V.P.T.I

Mr. B. M. Daxini

8
Question :- Find the z transform of a signal represented
{1, 2, 5, 3, 0, 0, }
The z transform is important in digital filtering because it describes the sampling process and
plays a role in the digital domain similar to that of the Laplace transform in analog filtering.
Z transform of Unit Impulse signal = ???
Unit impulse Signal is represent as
f(nT) = 1 for n = 0
f(nT) = 0 for n > 0
This can be represented in sequence form as = ????
Therefore, the z transform of the unit impulse function is
F(z) = 1
A.V.P.T.I

Mr. B. M. Daxini

9
Unit Step Function is given as

f(nT) = 1 for n 0
In sequence form it is represented as = ???
Therefore, the z transform of the unit step is

F(z) = 1 + z1 + z2 + z3 +
This transform is an infinite summation of nonzero terms. We can convert this sum to a more
convenient ratio of polynomials by using the binomial theorem

If we let v = z1 in the above equation, the z transform of the unit step becomes

A.V.P.T.I

Mr. B. M. Daxini

10

ELEMENTS OF A DIGITAL FILTER


We need only three types of operations to implement any digital filter: (1) storage
for an interval of time, (2) multiplication by a constant, and (3) addition.
Figure below shows the symbols used to represent these operations.

A.V.P.T.I

Mr. B. M. Daxini

11
Consider the sequence {x(0), x(T), x(2T), , x(nT)}
Its z transform is
X(z) = x(0) + x(T)z1 + x(2T)z2 + + x(nT)zn
If we apply this sequence to the input of the storage element , we obtain the output sequence as
{0, x(0), x(T), x(2T), , x(nT)}
The z trasform of the above sequence is
Y(z) = 0 + x(0)z1 + x(T)z2 + + x(nT T)zn
The output sequence is identical to the input sequence except that the whole sequence has been
delayed by T seconds.

A.V.P.T.I

Mr. B. M. Daxini

12
By dividing the output by the input we verify that the relation between the output z transform
and the input z transform is
Y(z) = X(z) z1
and the transfer function of the delay block is

The second function necessary for implementing a digital filtermultiplication by a


constant. For each number in the sequence of numbers that appears at the input of the
multiplier, the product of that number and the constant appears instantaneously at the
output
Y(z) = X(z)
Where is constant

A.V.P.T.I

Mr. B. M. Daxini

13
Multiplication of the sequence {5, 9, 0, 6} by the constant 5 would produce a new sequence at
the output of the multiplier {25, 45, 0, 30} where each number in the output sequence is said to
occur exactly at the same point in time as the corresponding number in the input sequence.

The final operation necessary to implement a digital filter is addition


At a clock tick, the numbers from two different sequences are summed to produce an output
number instantaneously.
Again we assume zero delay time for the ideal case.
The relation between the output and the input z transforms is Y(z) = X1(z) + X2(z)

A.V.P.T.I

Mr. B. M. Daxini

14

TYPES OF DIGITAL FILTERS


The transfer function of a digital filter is the z transform of the output sequence divided by the z
transform of the input sequence

There are two basic types of digital filtersnonrecursive and recursive.


For nonrecursive filters, the transfer function contains a finite number of elements and
is in the form of a polynomial

A.V.P.T.I

Mr. B. M. Daxini

15
For recursive filters, the transfer function is expressed as the ratio of two such
Polynomials

The values of z for which H(z) equals zero are called the zeros of the transfer function, and the
values of z for which H(z) goes to infinity are called the poles.
We find the zeros of a filter by equating the numerator to 0 and evaluating for z. To find the poles
of a filter, we equate the denominator to 0 and evaluate for z.
Thus, we can see that the transfer function (and hence the output) goes to zero at the zeros
of the transfer function and becomes indeterminate at the poles of the transfer function.
We can see from the transfer functions of nonrecursive filters that they have poles only at z = 0.
The location of the poles in the z plane determines the stability of the filter.
Since nonrecursive filters have poles only at z = 0, they are always stable.

A.V.P.T.I

Mr. B. M. Daxini

16

A.V.P.T.I

Mr. B. M. Daxini

17
TRANSFER FUNCTION OF A DIFFERENCE EQUATION
Once we have the difference equation representing the numerical algorithm for
implementing a digital filter, we can quickly determine the transfer equation that totally
characterizes the performance of the filter.
Consider the difference equation
y(nT) = x(nT) + 2x(nT T) + x(nT 2T)
Here x(nT) and y(nT) are points in the input and output sequences associated with the
current sample time, they are analogous to the undelayed zdomain variables,
There fore We can then write an equation for output Y(z) as a function of input X(z)
Y(z) = X(z) + 2X(z)z1 + X(z)z2

A.V.P.T.I

Mr. B. M. Daxini

18
Thus the transfer function of this difference equation is
H(z) = Y(z)
X(z) = 1 + 2z1 + z2
THE z-PLANE POLE-ZERO PLOT
mathematics of the z transform are based on the definition
z = esT
where the complex frequency is

s = + j

Therefore z = e T e T
By definition, the magnitude of z is |z| = e T
and the phase angle is z =T
A.V.P.T.I

Mr. B. M. Daxini

19
If we set = 0, the magnitude of z is 1 and we have
z = ej T= cos T + j sin T
This is the equation of a circle of unity radius called the unit circle in the z plane.
Mapping the s plane to the z plane shows that the imaginary axis (j ) in the s plane maps
to points on the unit circle in the z plane.
Negative values of describe the left half of the s plane and map to the interior of the unit
circle in the z plane.
Positive values of correspond to the right half of the s plane and map to points outside
the unit circle in the z plane.
What is the criteria for stability in Z domain ????

A.V.P.T.I

Mr. B. M. Daxini

20
All poles must lie either inside or on the unit circle.
Zeros do not influence stability and can be anywhere in the z plane.

A.V.P.T.I

Mr. B. M. Daxini

21
Any angle T specifies a point on the unit circle.
Since = 2f and T = 1/fs,
This angle is
T = 2 f/fs
The angular location of any point on the unit circle is then designated by the ratio
of a specified frequency f to the sampling frequency fs.
If f = fs, T = 2;
thus the sampling frequency corresponds to an angular location of 2 radians.
For f = 0,
T = 0; hence, dc is located at an angle of 0.

A.V.P.T.I

Mr. B. M. Daxini

22
Another important frequency is f = fs/2 = f0 at T = .
This frequency, called the foldover frequency, equals one-half the sampling rate.
Since sampling theory requires a sample rate of twice the highest frequency present in a
signal, the foldover frequency represents the maximum frequency that a digital filter can
process properly.
Thus, unlike the frequency axis for the continuous world which extends linearly to
infinite frequency, the meaningful frequency axis in the discrete world extends only from
0 to radians corresponding to a frequency range of dc to fs/2.

A.V.P.T.I

Mr. B. M. Daxini

23
Finite Impulse Response Filters
A finite impulse response (FIR) filter has a unit impulse response that has a limited
number of terms.
Infinite impulse response (IIR) filter which produces an infinite number of output terms
when a unit impulse is applied to its input.
FIR filters are generally realized nonrecursively, which means that there is no feedback
involved in computation of the output data.
The output of the filter depends only on the present and past inputs.

A.V.P.T.I

Mr. B. M. Daxini

24
CHARACTERISTICS OF FIR FILTERS
1) Finite impulse response
Finite impulse response implies that the effect of transients or initial conditions on
the filter output will eventually die away.

Signal-flow graph (SFG) of a FIR filter realized nonrecursively


The filter is merely a set of tap weights of the delay stages
A.V.P.T.I

Mr. B. M. Daxini

25
The difference equation and the transfer function of the FIR filter is given as

A.V.P.T.I

Mr. B. M. Daxini

26
2) Linear phase
In many biomedical signal processing applications, it is important to preserve certain
characteristics of a signal throughout the filtering operation, such as the height and
duration of the QRS pulse. A filter with linear phase has a pure time delay as its phase
response, so phase distortion is minimized.
A filter has linear phase if its frequency response H(ej ) can be expressed as

where H1( ) is a real and even function, since the phase of H(ej ) is

A.V.P.T.I

Mr. B. M. Daxini

27
FIR filters can easily be designed to have a linear phase characteristic.
3) Stability
Since a nonrecursive filter does not use feedback, it has no poles except those that are
located at z = 0. Thus there is no possibility for a pole to exist outside the unit circle.
This means that it is inherently stable. As long as the input to the filter is bounded, the
output of the filter will also be bounded. This contributes to ease of design, and makes
FIR filters especially useful for adaptive filtering where filter coefficients change as a
function of the input data.
4) Desirable finite-length register effects
When data are converted from analog form to digital form, some information is lost due
to the finite number of storage bits. Likewise, when coefficient values for a filter are
calculated, digital implementation can only approximate the desired values. The
limitations introduced by digital storage are termed finite-length register effects

A.V.P.T.I

Mr. B. M. Daxini

28
Its negative effects include quantization error, roundoff noise, limit cycles, conditional
stability, and coefficient sensitivity. In FIR filters, these effects are much less significant
and easier to analyze than in IIR filters since the errors are not fed back into the filter.
5) Ease of design
All of the above properties contribute to the ease in designing FIR filters. There are
many straightforward techniques for designing FIR filters to meet arbitrary frequency
and phase response specifications, such as window design or frequency sampling.
6) Realizations
There are three methods of realizing an FIR filter.
1) Convolution
2) Fast Convolution
3) Advanced, recursive technique involving a comb filter and a bank of parallel digital
resonators

A.V.P.T.I

Mr. B. M. Daxini

29
Infinite Impulse Response Filters
Infinite impulse response (IIR) digital filters that have the potential of sharp rolloffs
GENERIC EQUATIONS OF IIR FILTERS
The generic format of transfer function of IIR filters is expressed as the ratio of
two polynomials.

30
Rearranging the terms gives

The Y(z) terms on the right side of this equation are delayed feedback terms.
The output of an IIR filter is delayed and fed back.
These feedback terms as recursive loops; hence, these types of filters are also called
recursive filters.

A.V.P.T.I

Mr. B. M. Daxini

31

A.V.P.T.I

Mr. B. M. Daxini

32
CHARACTERISTICS OF IIR FILTERS
1) IIR filter requires not only the current value of the input x(nT) but also the previous
value of the output itself y(nT T).
2) Since past history of the output influences the next output value, which in turn
influences the next successive output value, a transient requires a large number or
sample points before it disappears from an output signal. This does not occur in an FIR
filter because it has no feedback.
3) IIR filters are not stable as they are recursive in nature and feedback is also involved
in the process of calculating output sample values.
4) IIR filter need more power due to more coefficients in the design.
5) IIR filters have analog equivalent.
6) IIR filter need lower order to achieve same performance

A.V.P.T.I

Mr. B. M. Daxini

33
Difference between IIR and FIR filters
IIR FILTER

FIR FILTER

1) Phase of IIR filter is non linear.

1) FIR filter have linear phase.

2) IIR filters can be unstable.

2) FIR filters always stable.

3) Can have limit cycles.

3) No limit cycles.

4) IIR filters have analog equivalent.

4) FIR filters have no analog equivalent.

5) IIR filters are more efficient.

5) FIR filters are less efficient.

6) IIR filters are recursive in nature.

6) FIR filters are non recursive.

7) Feedback is present in IIR filters.

7) Feedback is absent in IIR filters.

8) Transfer function IIR filters have both


zeros and poles.

8) Transfer function of FIR filters have


only zeros.

9) IIR filters requires less memory.

9) FIR filters requires more memory.

10) IIR filters have sharp roll off


characteristics.

10) FIR filters do not have sharp roll off.

11) IIR filters are used as notch(band


stop),band pass functions

11) FIR filters are used as anti-aliasing,low


pass and baseband filters.

A.V.P.T.I

Mr. B. M. Daxini

34
IIR FILTER

FIR FILTER

12) IIR filters need lower order than FIR


filter to achieve same performance.

12) FIR filter need higher order than IIR


filter to achieve same performance.

13) Delay is less than FIR filter.

13) Delay is more than IIR filter.

14) It has higher sensitivity than FIR filter.

14) It has lower sensitivity than IIR filter.

15) Polyphase implementation is not


possible .

15) Polyphase implementation possible

A.V.P.T.I

Mr. B. M. Daxini

35
Adaptive Filters
Adaptive techniques are advantageous because they do not require a priori knowledge of
the signal or noise characteristics as do fixed filters.
Adaptive filters employ a method of learning through an estimated synthesis of a desired
signal and error feedback to modify the filter parameters.
Adaptive techniques have been used in filtering of 60-Hz line frequency noise from ECG
signals, extracting fetal ECG signals, and enhancing P waves, as well as for removing
other artifacts from the ECG signal.
In digital signal processing applications, frequently a desired signal is corrupted by
interfering noise. In fixed filter methods, the basic premise behind optimal filtering is
that we must have knowledge of both the signal and noise characteristics. It is also
generally assumed that the statistics of both sources are well behaved or wide-sense
stationary.
An adaptive filter learns the statistics of the input sources and tracks them if they vary
slowly.
A.V.P.T.I

Mr. B. M. Daxini

36

The structure of an adaptive filter noise canceler

A.V.P.T.I

Mr. B. M. Daxini

37
Figure shows a general model of an adaptive filter noise canceler. In the discrete time
case, we can model the primary input as s(nT) + n0(nT).
The noise is additive and considered uncorrelated with the signal source. A secondary
reference input to the filter feeds a noise n1(nT) into the filter to produce output (nT)
that is a close estimate of n0(nT). The noise n1(nT) is correlated in an unknown way to
n0(nT).
The output (nT) is subtracted from the primary input to produce the system output
y(nT). This output is also the error (nT) that is used to adjust the taps of the adaptive
filter coefficients {w(1,, p)}.
y(nT) = s(nT) + n0(nT) (nT)

A.V.P.T.I

Mr. B. M. Daxini

38
APPLICATIONS OF ADAPTIVE FILTERING
1)
2)
3)
4)

To suppress 60-Hz interference.


Maternal ECG in fetal ECG.
Cardiogenic artifact.
Detection of ventricular fibrillation and tachycardia.

A.V.P.T.I

Mr. B. M. Daxini

You might also like