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

Design and Simulation of Optimum Digital Filters Using Labview

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Design and Simulation of Optimum Digital Filters Using Labview

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

DESIGN AND SIMULATION OF OPTIMUM DIGITAL FILTERS USING

LABVIEW

Project report submitted in partial fulfillment of the requirement for the degree of

BACHELOR OF TECHNOLOGY

IN

ELECTRONICS AND COMMUNICATION ENGINEERING

By

SHAILU SRIVASTAVA (161045)

UNDER THE GUIDANCE OF

DR. SHRUTI JAIN

JAYPEE UNIVERSITY OF INFORMATION TECHNOLOGY, WAKNAGHAT

May 2020

i
TABLE OF CONTENTS

CAPTION PAGE NO.

DECLARATION i
ACKNOWLEDGEMENT ii
LIST OF ACRONYMS AND ABBREVIATIONS iii
LIST OF SYMBOLS iv
LIST OF FIGURES v
LIST OF TABLES viii
ABSTRACT ix

CHAPTER-1: INTRODUCTION 1
1.1 CLASSIFICATION 1
1.2 SOFTWARE USED FOR SIMULATION 15
1.2.1 LabVIEW 15
1.2.2 MATLAB 21
1.3 MOTIVATION 25
1.4 OBJECTIVE 26
1.5 OUTLINE OF REPORT 26

CHAPTER-2: LITERATURE REVIEW & DESIGN STEPS 27


2.1 LITERATURE REVIEW 27
2.2 DESIGN STEPS 28
2.3 WINDOWS 30

CHAPTER-3: ELIMINATION OF POWER SUPPLY NOISE USING WINDOWING


TECHNIQUES 32
3.1 IMPLEMENTATION OF BANDPASS FILTER 35
3.1.1 EFFECT OF ORDER (N) 39
3.1.2 EFFECT OF CUT OFF FREQUENCY 40
3.2 IMPLEMENTATION OF NOTCH FILTER 41
3.2.1 EFFECT OF GAIN OF NOTCH FILTER FOR NULL FREQUENCY 50HZ 48

ii
CHAPTER-4: ELIMINATION OF LOW AND HIGH FREQUECNY NOISES USING
DIGITAL FILTERING TECHNIQUES 51

4.1. ELIMINATION OF HIGH FREQUECNY NOISES 54


4.1.1. IMPLEMENTATION OF IIR FILTER USING BUTTERWORTH
APPROXIMATIONS 55
4.1.2. IMPLEMENTATION OF FIR FILTER USING WINDOWING TECHNIQUES
56
4.2. ELIMINATION OF LOW FREQUECNY NOISES 60
4.2.1. IMPLEMENTATION OF IIR FILTER USING BUTTERWORTH
APPROXIMATIONS 61
4.2.2. IMPLEMENTATION OF FIR FILTER USING WINDOWING TECHNIQUES
63
4.2.3. EFFECT OF ORDER ON THE GAIN USING KAISER WINDOW 66

CONCLUSION 69
PUBLICATIONS 70
REFERENCES 71
PLAGIARISM REPORT 73

iii
DECLARATION

I hereby declare that the work reported in the B.Tech Project Report entitled “Design and

Simulation of Optimum Digital Filters using LABVIEW” submitted at Jaypee University of

Information Technology, Waknaghat, India is an authentic record of my work carried out under

the supervision of Dr. Shruti Jain. I have not submitted this work elsewhere for any other degree

or diploma.

SHAILU SRIVASTAVA
161045

This is to certify that the above statement made by the candidates is correct to the best of my
knowledge.

Dr. Shruti Jain


Associate Professor
Jaypee University of Information Technology
Waknaghat, Distt. Solan,
Himachal Pradesh.

Date: 25/05/2020

iv
ACKNOWLEDGEMENT

I would like to express my special thanks of gratitude to my project guide Dr. Shruti Jain as well

as HoD sir Prof. M. J. Nigam who gave us the golden opportunity to do this wonderful

project on the topic “Design and Simulation of Optimum Digital Filters using LABVIEW”, and

helping me throughout during my project work which also helped us n doing a lot of Research and

came to know about so many new things we are really thankful to them.

The success and final outcome of my project required lot of guidance and assistance from many

people and we are extremely privileged to have got this all along the completion of this project.

SHAILU SRIVASTAVA

161045

v
LIST OF ACRONYMS AND ABBREVIATIONS

IIR Infinite Impulse Response

FIR Finite Impulse Response

VI Virtual Instruments

NI National Instruments

DAQ Data Acquisition

G-Program Graphical Program

HP Highpass

LP Lowpass

BP Bandpass

BS Bandstop

PB Passband

SB Stopband

dB Decibels

PLC Programmable Logic

DLL Dynamic Link Libraries

GPIB General Purpose Interface Bus

FFT Fast Fourier Transform

NF Notch Filter.

vi
LIST OF SYMBOLS

fc Cutoff Frequency

xi Input

yi Output

ai Filter Coefficients

n Discrete Time Index


τ Time Constant

ak Set of Reverse Coefficients

bj Set of Forward Coefficients

bk kth Feedforward Taps

Na Numbers of Reverse Coefficients

Nb Numbers of Forward Coefficients

N Order

& And

β Beta (Kaiser Window, side lobe attenuation factor)

vii
LIST OF FIGURES

Figure1. 1 Block Diagram of Different types of Filter 2

Figure1. 2 Analog Filter 3

Figure1. 3 Digital Filter 3

Figure1. 4 Low pass filter specifications [1] 6

Figure 1. 5 High pass filter specifications [1] 7

Figure1. 6 BandiPassifilter specifications [1] 8

Figure1. 7 Bandistop passifilter specifications [1] 9

Figure1. 8 Front panel 18

Figure 1. 9 Block diagram 20

Figure 1. 10 Tool palette 20

Figure 1. 11 Control Palette 21

Figure 1. 12 Specification mask [8] 24

Figure 1. 13 Marking Data Points [8] 24

Figure 1. 14 Design Optimization [8] 25

Figure 2.1. Digital Filter design steps 28

Figure 3. 1: BPF Frequency response 36


Figure3.2: Block Diagram for Band Pass filter using LabVIEW 36

Figure3. 2: a. LabVIEW, b.MATLAB Hamming Window BPF at 50Hz 37

Figure 3. 3: a. LabVIEW, b.MATLAB Hanning Window BPF at 50Hz 37

Figure 3. 4: a. LabVIEW, b.MATLAB Gaussian Window BPF at 50Hz 38

Figure 3. 5: a. LabVIEW, b.MATLAB Blackmann Window BPF at 50Hz 38

Figure 3. 6: a. LabVIEW, b.MATLAB KaiserWindow BPF at 50Hz 39

Figure 3. 7: a. LabVIEW, b.MATLAB Rectangular Window BPF at 50Hz 39

Figure 3. 8:Effect of order (N) on the magnitude of the designed filter

(a) when N = 50 (b) when N = 150 40

viii
Figure 3. 9: Effect of cut off frequencies fc1 and fc2 in the output of the designed filter

(a) fc1 =39Hz and fc2=41Hz (b) when fc1 =59Hz and fc2 =61Hz 41

Figure 3. 10: Notch Filter Response 42


Figure 3. 12:Block Diagram For Notch Filter Using LabVIEW 42
Figure 3. 13: a. LabVIEW, b.MATLAB Hamming Window NF at 50Hz 43

Figure 3. 14: a. LabVIEW, b.MATLAB Hamming Window NF at 60 Hz 43

Figure 3.15: a. LabVIEW, b.MATLAB Hanning Window NF at 50 Hz 43

Figure 3.16: a. LabVIEW, b.MATLAB Hanning Window NF at 60 43

Figure 3. 17: a. LabVIEW, b.MATLAB Gaussian Window NF at 50 Hz 44

Figure 3. 18: a. LabVIEW, b.MATLAB Gaussian Window NF at 60 Hz 44

Figure 3.19: a. LabVIEW, b.MATLAB Rectangular Window NF at 50 Hz 44

Figure 3.20: a. LabVIEW, b.MATLAB Rectangular Window NF at 60 Hz 45

Figure 3.21: a. LabVIEW, b.MATLAB Blackmann Window NF at 50 Hz 45

Figure 3.22: a. LabVIEW, b.MATLAB Blackmann Window NF at 60 Hz 45

Figure 3.23: a. LabVIEW, b.MATLAB Kaiser Window NF at 50 Hz 46

Figure 3.24: a. LabVIEW, b.MATLAB Kaiser Window NF at 60 Hz 46

Figure 3.25:Magnitude response on effect of order 49

Figure 4.1: Filtering of AWGN noisy signal using different filters 54

Figure 4.2: Frequency response of Low passes Filter[1] 55

Figure 4.3: Frequency response of Butterworth low pass filter at fc = 100Hz 56

Figure 4.4: Butterworth filter of order 2,Pole Zero Plot 56

Figure 4.5: Implementation of Low Pass filter Using LabVIEW 57

Figure 4.6: a. LabVIEW, b.MATLAB Hamming Window LPF at 100Hz 57

Figure 4.7: LabVIEW, b.MATLAB Hanning Window LPF at 100Hz 58

Figure 4.8: LabVIEW, b.MATLAB Kaiser Window LPF at 100Hz 58

Figure 4.9: LabVIEW, b.MATLAB RectangularWindow LPF at 100Hz 58

ix
Figure 4.10: LabVIEW, b.MATLAB Blackmann Window LPF at 100Hz 59

Figure 4.11: LabVIEW, b.MATLAB Gaussian Window LPF at 100Hz 59


Figure 4.12:LPF of order 10 Frequency Response for Kaiser Window 60

Figure 4.13: LPF of order 100 Frequency Response for Kaiser Window 60

Figurei4.14: Frequencyiresponseiof High Pass Filter [1] 61

Figurei4.15: Frequencyiresponseiof IIR High Pass Filter of Order 2 61

Figurei4.16:IIR HPF order 2iiButterworthiPoleiZeroiPlot 62

Figurei4.17: HPF impulse response iorder 2 62

Figurei4.18: Implementation of High pass filter using Labview 63

Figure 4.19: a. LabVIEW, b.MATLAB Hamming Window HPF at 0.5Hz 63

Figure 4.20: a. LabVIEW, b.MATLAB Hanning Window HPF at 0.5Hz 64

Figure 4.21: a. LabVIEW, b.MATLAB Kaiser Window HPF at 0.5Hz 64

Figure 4.22: a. LabVIEW, b.MATLAB Blackmann Window HPF at 0.5Hz 65

Figure 4.23: a. LabVIEW, b.MATLAB GaussianWindow HPF at 0.5Hz 65

Figure 4.24: a. LabVIEW, b.MATLAB RectangularWindow HPF at 0.5Hz 66

Figure 4.25: FIR HPF order 11 at fc=0.5Hz 67

Figure 4.26: FIR HPF order 301 at fc=0.5Hz 67

Figure 4.27: Impulse response of FIR HPF of order 11 67

Figure 4.28: High Pass Filter(order 11) Pole zero plot 68

x
LIST OF TABLES

Table1.1 Classification of filters[1] 3

Table1.2 Pole Zero Configuration and corresponding frequency response

of various kinds of analog filters[1] 5

Table 1.3 Difference between FIR Digital Filter and IIR Digital Filter[1] 10

Table 1.4 Value of Coefficient a, b and c from 12

Table 3.1: Window function and their equation 34

Table 3.2: Effect of order on the magnitude using different iwindow functions

keeping fc1 = 49Hz & fc2 = 51Hz 40

Table 3.3: Effect iof iorder ion the magnitude using different window functions keeping order 100

41
Table 3.4: Calculation of null frequency and Q 47

Table 3. 5: Effect iof β on the inotch ifilter for null frequency 50Hz 47

Table 3. 1: Effect of Order on Gain of Kaiser Window 49

Table 3. 2: Effect of threshold frequencies on gain 50

Table 3. 3: Effect of β for Kaiser window on Gain with fixed threshold frequency 50

Table 4.1: SNR calculation of AWGN noisy and denoised signals 54

Table 4.2: Gain effect on filter order of Kaiser Window of fc = 100 59

Table 4.3: Effect of order on the gain of FIR HPF 66

xi
ABSTRACT

Digital filter design is a part of digital signal processing and it is essential to remove noise from any
signal. The major issue regarding the implementation is the computational complexity that may
cause difficulties in its practical applications. There is an approach for a designing of the digital
filter using Laboratory Virtual Instrument Engineering Workbench (LabVIEW). It is extracted from
the theoretical and experimental results that the design method with the help of window function is
simpler and quite easy to use as compared to others because of the availability of a well-structured
equation.

A Notch, High Pass and Low Pass filter is designed using different windowing techniques like
Rectangular, Blackmann, Gaussian, Hamming, Kaiser, Hanning windows which are implemented
using LabVIEW. The results were also compared using MATLAB in terms of magnitude response
and frequency response. To remove the 50 Hz power supply interference from any of the
biomedical signal Finite Impulse Response notch filter is designed, FIR and IIR High pass filter
were designed to remove Baseline Wander noise and FIR and IIR Low pass filter were designed to
remove high frequency noises such as EMG from any biomedical signlas. The filter is designed on
LabVIEW considering the order as 100, lower cut off frequency ( fc1) as 49 Hz, upper cut off
frequency ( fc2) as 51 Hz for notch and lower cut off frequency ( fc ) as 0.5Hz for High Pass , higher
cut off frequency ( fc) as 100Hz for Low Pass filter with sampling frequency ( f S) is considered as
1000 Hz.

The work has achieved the target to remove various noise cancellation. Among all the filtering
techniques FIR is proved best and among different windows the Kaiser window’s results are well
fitted and wiely acceptable.

xii
CHAPTER 1

INTRODUCTION

In the field of electronics engineering the processing of signals plays an important role which is
purely based on synthesizing, modifying and analyzing, different signals such as images, sounds,
and biological measurements. Signal processing is widely used to enhance the transmission,
efficiency of storage, & subjective quality. Signals rise up in almost every field of engineering and
technology. Two different categories of signals are classified as continuous signals and discrete
time signals. A continuous-time signal is defined in such a way that it is present at each and every
instant of time. Typical examples are a voltage waveform and the velocity of a space vehicle as a
function of time. A discrete-time signal, on the other hand, is not a function of continuous
argument. Examples of this type of signal can be Stock Exchange where the closing price of a
particular product and the daily precipitation as function of time. The discrete time signals can be
expressed like continuous time signals by a different kind of frequency function known as the
frequency spectrum of the signal.

The process of reshaping, modification of signal frequency spectrum is known as filtering.


These objectives are :
i. To put off the unwanted noises present in the signal.
ii. To avoid distortion of signals due to transmission channel imperfection.
iii. To separate the different signals which were purposely blended to maximize channel
capacity.
iv. To resolve signals into their frequency components.
v. To get the desired output at the receiver side by demodulating the signals.
vi. To limit the bandwidth of the signals.

1.1 CLASSIFICATION OF FILTERS

The filter is a electronic circuit which is efficient in allowing, amplifying and attenuating the
frequencies altogether. Thus, a filter are able to get the essential frequency components from signals
that also contain unwanted and irrelevant frequencies in the field of electronics, there are many
useful applications for filters which includes:

1
i. Wireless communications: Filters are capable to select the desired signals while
eliminating all other signals .
ii. Direct Current suppliers: To remove the undesired high frequencies which are considered
as noise that are present in these suppliers and additionally it reduce ripple content from the
power supply.
iii. Audio Signals: In order to use different frequencies in different audio devises such woofers
require audio of low frequencies, speakers need frequency in mid range .
iv. ADCs: To minimize the aliasing effect the ADC are place in front of filters.
Filters can be classified as shown in Fig 1.1.

Figure 1.15 Block Diagram of Different types of Filter

2
Depending upon the type of signals the ifilters iare ifurther iclassified as:

Analog Filters: Analog filter is a type of system where the input and the output signals are
continuous in nature whose lock diagram of analog filter is shown in Fig. 1.2.

Analog
Input Continuous-time Signals Filter Output Continuous-time Signals

Figure 1.16 Analog Filter

Digital Filters: Digital filter is a kind of system which the input and the output are discrete-in
nature whose block diagram of analog filter is shown in Fig. 1.3

Digital
Input Discrete-time Signals Filter Output Discrete-time Signals

Figure 1.17 Digital Filter

A comparative study between digital and analog filter is given in Table 1.1.

Table 1.1 Classification of Filters [1]

Sr. No. Analog Filters Digital Filters


1 The aim of analog filter is to filter out The aim of digital filter is to filter out the
the signals whose input is continuous in signals whose input is discrete in nature
nature and accordingly gives the and accordingly gives the discrete filtered
continuous filtered output. output.
2 For designing of analog filters the For designing of digital filters different
components such as resistors, units such as adders multipliers ae used
capacitors and inductors are used with help of software such as MATLAB
LABVIEW.

3
3 Analog filters are less accurate and Digital filters are less sensitive ito
because of component tolerance of environmental changes, noise and
active components and more sensitive disturbances. Thus periodic calibration
to environmental changes. can be avoided. Also ithey iare extremely
stable.

4 Difficult in Adjustment Compared to analog Filter digita filters are


more flexible because of software ans
programming.
5 Filter representation is in the term of Digitalifiltersiare represented by
System Components difference equation.
6 Not easily portable. Easily portable.

Depending ion ithe itype iof ielements filters can further beicategorizediintoitwoitypes : Active and
Passive Filter.

Active Filters: An active element namely Operational Amplifiers are widely use in Active filters .
Resistors and capacitors are together used with Op-amps to get an appropriate filter response and
this avoid the use of inductors. The performance of the filter usually restricted because of some gain
and bandwidth related issues with the use of Op-amp. Initially active filter were restricted below the
frequency which makes the filter suitable for filtering of video signals. The main edge of active
filter over the passive one is that it is smaller in size and it can also be miniaturized further. But the
active filters have disadvantages too i.e the active filter made up of op-amp which can add noise and
limits the signal’s amplitude and the supply voltage. Active filters are mostly used where there is
frequent shift in the amplitude with respect to frequency.

Passive Filters: The resistors, capacitors and inductors are only used by the Passive filters. To pass
a current of above 1 mA the Passive filters comes into play and also to the area when it is required
to design more specialized applications namely in high frequency filtering and where a wide
frequency range is needed. One of the main advantage with passive filter is that it generally
consumes less power and this advantage of passive filter can be used in the low power systems.

4
Along with the advantage there is some disadvantage of the Passive filter which is, the designing of
passive filters use inductors which in turn makes the system little bulky. A the huge diameter wires
are used to pass high currents the filters are designed in such a way which can cope up with the
.magnetic flux. .With the help of resistors and capacitors network or the RC network can be used to
construct simple analog high pass and low pass filter.
In the Table 1.2 , all poles and zeros are seen to be located on a circle of radius ro. This design was
given by Butterworth therefore, is called Butterworth Analog filter design. Here Q is the quality
factor of the circuit at resonance. In the pole-zero plots given in Table 1.2 location of poles and
zeros are shown by cross (x) and circle (o) respectively.

Table 1. 2 Pole-Zero Configuration and Corresponding Frequency Responses of various kinds of Analog
Filters [1]

5
On the basis of different frequency range filter is classified as :
1. Low Pass
2. High Pass
3. Band Pass
4. Band Reject

Low Pass Filter: A series connection of single Resistor and Capacitor can turns into the designing
of LP filter. In LP filter the input signal is applied to the combination of resistor and capacitor
which are connected in series and the output signal is taken extracted through the capacitor. When
the frequency of the signal changes the value of resistor does not change but the capacitor reactance
changes according to the frequency there is a inverse effect of frequency . The capacitive reactance
has the larger value as compared with the resistive value at the lower frequency which states that the
voltage drop across the resistor is less as compared to the potential drop through the capacitor. For
the high frequency the opposite is true i.e potential drop through the capacitor is less than the
voltage drop through resistor. Frequency response of LPF shown in Fig. 1.4.

Figure 1. 18 .Low aPass filter specifications [1]

High Pass Filter : A HPF is considered to be the reverse case of the LPF. In this filter there is
only change in the place of the components now in the high pass filter the output signal is taken
through the resistor. HPF allows the signal to pass above the cutoff frequency fc, which is opposite

6
of the LPF which passes the signal below fc rejecting any signals at low frequency from the
waveform. In the HPF case there is a reduction in capacitor reactance above the cutoff frequency
this leads to the circuit behaving like short circuiting which allows the whole input siggnal to pass
to the output side.. The response of the HPF is shown in Fig1.5

Figure 1. 19 High pass filter specifications [1]

Band Pass Filter : A BP filter s composed of LP and HP filter filter. The main task of BPF is to
filter out certain range of frequencies within the given range.Using the help of resistors and
capacitors the cutoff frequency of BPF can be easily controlled, provided they are connected n
proper form.

Different kind of RC filter can be introduced by cascading a LP and HP filter together, which can
allow a certain range of afrequencies which can either be anarrow band or wide band while
dattenuating outside range. The passive filter which is frequency selective filters commonly known
as BP Filter which allows the signals within a limited range of frequenzies without distroying input
signal. A response of BPF is shown n Fig. 1.6.

7
Figure 1.20: Band Pass filter specifications [1]

Band Stop Filter: A BS filter also commonly known as notch filter or the Band Reject filter which
has the ability to reject the certain range of frequency components within the specified
frequencies(fc1 and fc2 ). This band stop filter, pass all frequency range within a specified frequency
range. If the stop band is highly attenuated, then this band reject filter is most commonly called as
a notch filter. The Notch Filter is a type of selective filter which functions opposite to the Band Pass
Filter. BS filter consists of two cut-off frequencies(fc1 and fc2 ), which are said to be half power
point or -3dB points.

8
The bandwidth of the Band stop or Notch filter is defined because the difference in high frequency
and low frequency (ƒH – ƒL). Because this filter out pass all the frequencies as much as ƒL and all of
the other frequency variety above ƒH while blocking the range of frequencies within this low and
excessive cutoff. The band prevent wide band filter attenuates any frequency that lies within the
higher and lower -3dB points. In order to explain the characteristics of band pass filter the
parameters which include ƒL, ƒH and ƒC are determined to be equal, the motive is that the band
prevent filter is the opposite case of the band skip filter out. Along with a lot of these parameters
the definitions used for bandwidth, pass band, forestall band and center frequency are the similar as
before, and awe can use the equal formulas to calculate bandwidth, ƒC, and Quality Factor. The
filter having an stop band of limitless attenuation and zero bypass band attenuation are termed as
perfect band forestall filter. The frequency reaction of band stop filter out is shown in Fig. 1.7.

Figure 1. 21 Band stop pass filter specifications [1]

9
Further on the basis of Impulse Responses, filters iare iclassified ias iInfinite iImpulse iResponse
and iFinite iImpulse iResponse. A comparison between IIR and FIR digital filter is given in Table
1.3.

Table 1. 3 Difference between FIR Digital Filter and IIR Digital Filter [1]

S.NO FIR IIR

Generally known as Finite Impulse Generally known as Infinite Impulse


1.
Response Response

This type of filter is non recursive in


2 This is recursive in nature
nature

3 Stable Unstable

There is presence of both poles and


4 Also known as All Zero filter
zeroes

5. Limited memory Infinite memory

For the requirement of exact linear phase application the FIR filters are mainly used. The non-

recursive way of filter implementation can make the filter stable, this filter designing basically

consisting of two components:

10
i. Approximation Stage
ii. Realization Stage

In the approximation stage first it draws up the specification and accord a transfer function via these
four steps.
i. The proper filter length iis ichosen.
ii. From the best suited filter transfer function the optimum function is chosen.

After the approximation stage the main task is to choose a suitable structure to get the transfer
function. There are basically two famous methods which are:
i. windowing techniques
ii. freuency sampling method

The Windowing techniques

In this technique, [2], [3], [4] Hd(w) is calculated with the help of given equations.

( )= ∫ ( ) (1)

where
( )=∑ ℎ ( ) (2)

The process of hd (n) truncation to length M - 1 is quite same as multiplying rectangular window
K

with hd (n) using the Eq. (3)


w(n) = 1 0 ≤ n ≤ M-1
= 0 otherwise (3)

Thus the unit sample response of the FIR filter expressed by Eq. (4)
h(n) = hd(n) w(n) (4)
= hd(n) 0 ≤ n ≤ M-1
= 0 otherwise

11
The convolution of Hd(w) with W(w), is similar to the convolution hd(n) with the window function
w(n) .

( )=∑ ( ) (5)

The response of the filter obtained after the convolution of Hd(w) with W(w)
. l

( )= ∫ ( ) ( − ) (6)

H(w) can also be calculated using eq.7

( )=∑ ℎ( ) (7)

Due to the direct truncation of sample impulse response arises the problem of Gibbs phenomenon
effect which produces certain discontinuities and ringing effect on the response. Using Eq. 7 the
obtained response contains ripples which can be minimized by multiplying window function which
have the taper response and decays gradually towards zero because in case of rectangular window
function there is abrupt change rather than multiplying the rectangular window function with
sample impulse function. By using the windowing method the result of frequency response are as
follows:

(i) The main lobe width is related to the width of the transition bands the window function.

(ii) The width of main lobe decreases as the filter length increases and it also increases

the ripple content.

(iii) The ringing effects in the frequency response easily be eliminated with the help of window
function

12
Some of the commonly used windows [3] are Bartlett triangular window , Generalized cosine
windows

i. Bartlett window:

2( + 1) −1
( )= = 0,1,2 … … . ,
+1 2
( ) ( )
=2− = ,……….., −1

= 0, otherwise (8)

ii. Generalized cosine windows (Rectangular, Hanning, Hamming and Blackman)

2 ( + 1) 4 ( + 1)
( )= − cos + cos = 0,1,2 … … , −1
+1 +1
=0 ℎ (9)

The four unique forms that are mostly used y the general cosine window which are acknowledged
by parameter a, b and c
Table 1. 4 Value of Coefficients a, b and c from

Windows a b c

Blackman 0.41 0.6 0.07

Hamming 0.5 0.5 0

Hanning 0.54 0.46 0

Rectangular 1 0 0

iii. lKaiser lwindow lwith lparameter β :

( )
( ( ) )
l
( )= = 0,1, … … −1

=0 otherwise (10)

13
The overshoot value is comparatively reduced with the help of Bartlett window but there is a
significant increase in the transition region. In order to provide a smooth truncation of the filter’s
frequency response the more complicated cosine functions are used by the Hanning, Hamming
and Blackman windows. Among all the windows the Kaiser window is considered better of all only
because of the shape parameter β which allows reduction in ripples and transition width spreading..
There are lot many methods but due to the ease of use because of well structured equations for
calculating window coefficients the window methods are chosen.

The following problems arise by using window methods in filter designing are:

(i) This method is appropriate only if Eq.(1) can be evaluated and the function Hd(w) is
absolutely integrable .The evaluation of hd(n) becomes tedious when it is difficult to get
put mathematical expression and Hd(w) is quite complicated.

(ii) Since the use of windowing technique use to minimize the discontinuities in the frequency
response of the filter.

(iii) For the designing of any kind of filters this windowing technique is basically useful and
also useful in the applications such as image and speech processing applications.

Frequency Sampling Technique

Using this technique, [2], [3], [4] the filter coefficient easily be calculated using the IDFT formula

and the desired frequency response can be obtained.

( / )
ℎ( ) = ∑ ( ) (11)

With the interpolation of sampled frequency the N point filter response is obtained response the
continuous frequency response is calculated using the above N-point filter response. The error of
approximation would be finite in frequencies between them and tends to zero at the sampling

14
frequencies. As smaller as the the error frequency response will be more smoother. If the frequency
sample increases the errors will get reduced [3].

IN [4] a suitable method is discussed which is purely based on this sampling technique.

(i) Using N number of samples the desired magnitude response is obtained.

(ii) The desired response of filter is obtained with the given N values of Hk and by calculating
the inverse FFT h(n) is further calculated.

(iii) According to Rabiner, when N varied from 15 to 256, 16 to 1 interpolation can be used and
16N samples of H(w) lead to reliable computations.

Frequency sampling technique advantage

i. Just like windowing technique this method is very flexible to be used in any type of
magnitude response.

ii. Easier to understand and implement.

The main drawback of using this technique is the use of sampled points which creates
discontinuities in the desired frequency response

1.2 SOFTWARE USED FOR SIMULATION

1.2.1 LABVIEW : It is a virtual environment especially designed for educational purpose


industrial experiments and automation applications which is purely based on graphical
programming, in respect to textual programming however, textual programming is also
supported in Lab VIEW. For the visualization and designing of different formulas and
parameters Lab VIEW supports large number of functions for such applications. It
supports other built in functionality which is useful for further applications such as for
presentation of data its acquisition, instrument control and most important measurement

15
analysis. Another advantage of this Lab VIEW software is that it reduces the difficulty of
other development platform by providing the flexibility of a powerful programming
language support environment. Lab VIEW supplies substantial accession, analysis,
demonstration and inspection competencies in a single platform, so that it will be ease to
the user to choose various inputs on the same platform. Unlike other programming
languages, Lab VIEW software provides functionality specifically which is centered to the
use of automation applications, measurements control, development process. Lab VIEW
provides all necessary units which are useful in engineering aspects for designing and
testing purpose.The Lab iVIEW igraphical idevelopment ienvironment igives ipowerful
itools ito icreate iapplications iwithout iwriting iany ilines iof itext ibased icode. iWith
iLab iVIEW, ione ican idrag iand idrop ipre-built iobjects ito iquickly iand isimply icreate
iuser iinterfaces ifor ithe iapplication. iThen, ione ican ispecify isystem ifunctionality iby
iassembling iblock idiagrams ia inatural idesign inotation ifor iscientist iand iengineers.
Lab VIEW has tight Integration with lots of Instruments and Measurement gadgets and
introduced seamless connectivity with dimension hardware, in an effort to quickly
configure and use truely any measurement device, consisting of the entirety from stand- by
myself devices to plug-in information acquisition devices, motion controllers, photograph
acquisition structures, and programmable logic controllers (PLCs).

Lab VIEW has open connectivity with Other Applications and furthermore, Lab VIEW
can assist you to connect with other applications and percentage records thru ActiveX, the
Web, DLLs, shared libraries, SQL, TCP/IP, XML, OPC, wireless verbal exchange and
different techniques. Lab VIEW's open connectivity permits you to create open, bendy
applications which can talk with other applications across your enterprise.

With Lab VIEW, one can expand systems that meet even the maximum traumatic overall
performance requirements across a ramification of platforms consisting of Windows,
Macintosh, UNIX, or real-time systems. Lab VIEW additionally includes conventional
program improvement tools. You can set breakpoints, animate program execution to look
how the program executes through this system to make debugging and application
improvement easier.

16
Purpose of using Lab VIEW

The use of LAB VIEW software allows user to develop their own solution for engineering
problems. Along with this it gives student the freedom to perform and analyze powerful
programming without any complexity and difficulty.

It provides a economical aspect to implement programs and algorithms. The use of Lab VIEW is
to design systems and programs where system development time can be reduced and
productivity of system gradually increases. Lab VIEW also provide user the flexibility to their
users, to give their valuable feedbacks related to the product, and along with powerful toolkits
add on.

Working of Lab VIEW Software

Laboratory Virtual Instrument Engineering Workbench commonly known as Lab VIEWL. It has

several physical instruments such as voltmeter, millimeters and oscilloscope etc. and the operation

of such instruments are just like the physical one and sometimes they are called virtual instruments,

or simply as Vis. The user inputs gets manipulated by the functions of VI and the corresponding

output is displayed.

The three main components a VI contain:

i. The Front panel: Front panel is directly connected to the user here user can
l

manupulate the inputs and corresponding output can be seen

ii. Block diagram panel: The backbone of Lab VIEW where the codes or the
blocks of particular function is arranged.

iii. Tools and connector Palette: These Palettes supports the VI, which contains
essential blocks and tools which are required for the implementation of VI.

17
Front Panel: Using the front panel user can give the inputs and can control different indicators and
along with this output can also be observed here. This panel consists of interactive controllers unit
for the input purpose and for the output purpose it includes several graphs and indicators
respectively. Controllers used in the front panel consists of dials, pushbuttons and many more units
are the indicators in Lab VIEW. Indicators are used for the output measurement and indications
depicted in fig 1.8

Figure 1. 22 Front panel

The front panel mainly contains of following:


1. Input probe(Control Unit)
2. Output probe (Indicator).

18
The input devices such as push button, dials and knob are the control unit which alters the input The

block diagram of the VI are purely rely on the input controllers as they gets the initiation from the

input probe connected to it. After the input the block diagram is connected to the output probe such

as graphs LEDs and other displaying devices depends on the user’s need.

Block Diagram: The block diagram unit of Lab VIEW incorporates with the VI source code. This

unit gives you the flexibility to create and modify a VI. The block diagram contains different

objects such as sub VIs different structures and wires which is the key to connect to next block.

Block diagram is shown in Fig1.9.

Figure 1. 23 Block diagram

Palettes: This option of Lab VIEW gives the flexibility to edit and modify block diagram and front
panel.

19
Tools Palette: The block diagram and the front panel Tools palette each has the selection for

this tool palette. Select the Window then Show Tools Palette to show the Tools palette. You can

vicinity the Tools palette everywhere at the screen. If computerized device choice is enabled and

also you pass the cursor over items at the the front panel or block diagram, Lab VIEW robotically

selects the corresponding tool from the Tools palette Shown in Fig1.10.

Figure 1. 24 Tool palette

Controls Palette: The Controls palette is available best on the front panel. The Control palette

contains the controls and signs you use to create the the front panel. Select the Window then click

20
on on display controls palette or actually do proper-click on anywhere at the front panel workspace

to get the Controls palette. The Controls palette is proven in Fig1.11.

Figure 1. 25 Control Palette

Functions Palette: The block diagram unit of Lab VIEWS ha only the option of functions palette.
The Functions palette contains all necessary blocks needed to build the block diagram. Simply
right-click anywhere on the block diagram workspace to get the Functions palette or go to the
Window option then choose functions palette which can be placed anywhere on the screen.

1.2.2 MATLAB: Matrix Laboratory or generally called as MATLAB is commercially available


programming available environment generally used for the mathematical computation,
which also include MathCAD, Maple and Mathematica. This software is purely based on
the matrix based calculations. Out of the different mathematical environment tool none of
them can be considered best each one has its own strengths and weaknesses and allows
performing basic computations. The only difference in these tools is its function to handle
complicated mathematical and symbolic calculations. For example, the Maple tool is good
for doing symbolic calculations where as the Matrix Laboratory is efficient for
computations involving matrices. In most of engineering applications the Matrix
Laboratory is widely used for the calculation than to the traditional computer
programming. Although programs inclusive of MATLAB turn out to be widespread tool
for engineers and scientists, this doesn’t mean that you shouldn’t learn a high-level
language such as C++, JAVA, or FORTRAN.

21
Because MATLAB is so easy to use, you can perform many programming tasks with it,
but it isn’t always the best tool for a programming task. It excels at numerical
calculations—especially matrix calculations—and graphics, but you wouldn’t want to use
it to write a word-processing program. For large applications, such as operating systems or
design software, C++, JAVA, or FORTRAN would be the programs of choice.

The primary area of overlap between MATLAB and high-level programs is “number
crunching”—repetitive calculations or the processing of large quantities of data. Both
MATLAB and high-level programs are good at processing numbers.

A “number-crunching” program is generally easier to write in MATLAB, but usually it


will execute faster in C++ or FORTRAN. The one exception to this rule is calculations
involving matrices. MATLAB is optimized for matrices. Thus, if a problem can be
formulated with a matrix solution, MATLAB executes substantially faster than a similar
program in a high-level language. MATLAB is available in both a professional and a
student version. The professional version is probably installed in your college or university
computer laboratory, but you may enjoy having the student version at home.

How Does a MATLAB Work

The potential to apply gadget along with MATLAB is speedy becoming a call for for plenty
engineering positions. Extensively utilized in each technical and engineering fields, MATLAB is
extraordinarily well-known for electrical engineering packages. Matrix laboratory is used
substantially in electrical engineering for signal-processing packages. Different research resulted
within the design and manufacture of a laptop chip that detects drawing near collisions. This has the
potential to use within the design of protection car application and for the navigation functions. The
Digital Imaging and Communications in Medicine preferred documents typically referred to as
dicom are used to shop scientific snap shots. These files use the record extension .Dcm. The Math
Works offers an Signal processing toolbox which might be capable of analyzing enter files, making
their statistics available to MATLAB .The toolbox also consists of a extensive range of capabilities
which can be used to do extensive variety of calculations with trendy MATLAB application.

22
Introduction to Filter Designer
The Filter Designer software which is an incredible graphical GUI in the Signal Processing Toolbox
for the purpose of analyzing and designing and filters. By only setting the required filter
specifications such as adding or removing zeroes and poles or other specifications the requited FIR
or IIR filters can be easily designed. This tool can further be extended for the analysis of magnitude
and phase response plots and pole-zero plots. This filter design Graphical User Interface has three
important areas:

i. Design panel of GUI


ii. Current Filter Information region of GUI
iii. Filter Display region of GUI

The design panel of GUI is one of the important areas where the whole designing work takes place
this area is responsible of what is displayed this panel is quite interactive to the user and is found in
the lower region.

The other main important panel is the filter information region which is found on the upper half of
the GUI. The role of this region is to collect the filter information and it also includes information
such as filter structure order number of section used and also whether the filter is stable or not.
Along with this in order to work with multiple filters it provided access to the filter manager.

On the upper right region the he Filter Display is found which displays the filter output such as its
magnitude response, phase response, impulse response, filter coefficients etc.

Viewing other Analyses


Once the filter is designed, there are certain filter analysis options are present in the window display
which can be easily accessed by clicking the required options such as:

 Magnitude and phase responses

 Different delay Parameters

 Step and Inpulse response

 Filter Coefficients

23
Design comparison with filter specifications: Using the specification mask of the MatLab allows
the designer to compare its designed filter to the filter specifications. Magnitude response of the
filter with Specification mask is shown in Fig1.12.

Figure 1. 26 Specification mask [8]

Data points markings: By clicking at any point in the displayed region a data marker gets
automatically added which gives the information of that point as shown in Fig 1.13.

Figure 1. 27 Marking Data Points [8]

Design Optimization: The main aim in the filter designing is to minimize its manufacturing cost
and it is only possible by reducing the filter order. This software gives the user flexibility to reduce
the filter order by using minimum order option in the design panel. As the order of the filter

24
decreases the ripple content decreased The pass band and the stop band specifications of the filter is
shown in Fig1.14.

Figure 1. 28 Optimization of the design [8]

Additional Features
Apart from all the functions discusses above there are some additional features supported by Matrix
Laboratory which are:
i. Simulink Toolkit- This tool allows the user to design filter using filter blocks.

ii. Digital Signal Processing Toolbox- It provides advanced FIR and IIR design techniques

which generates equivalent block for the filter

iii. Embedded Coder- For Texas Instruments C6000 processors it builds and generates code

iv. HDL Coder- This function generates the Verilog code of the designed filter which can

further be connected to FPGA.

1.3 MOTIVATION

For adaptive design, FIR is the best choice. The telephone line is a good example of the filter
because the range of frequencies gets limits which are less than the range of human beings can
hear frequencies. Structure, hardware utilization, design method are the main elements need to
take care while designing FIR filter which directly results in lesser error, robust, reduced cost,
and area. In the literature it is found that the Direct-Form structure gives better results and
simpler implementation.

25
1.4 OBJECTIVE

The fundamental objective of this project is to present a methodology for an upgraded framework of
a FIR filter in the digital domain to eliminate the unwanted noises. Our specific objectives are:

1. To layout a notch filter with the help of LABVIEW to eliminate power supply noise

2. To layout a HPF with the help of LABVIEW to eliminate LF noises.

3. To layout a LPF with the help of LABVIEW to eliminate HF noises.

1.5 REPORT OUTLINE

Chapter 1:-In this chapter, various types of filters based on different parameters like elements,
signal processing techniques, depending on their frequency and impulse response were discussed.
The different techniques used to implement FIR filters and software used in our project for
implementation purpose has also been discussed.

Chapter 2: In this chapter, we discuss about various research paper which we have read for our
better understanding of the concept. This chapter also discusses about designing step of different
windows we are used for the implementation of FIR filters.

Chapter 3: In this chapter, we discuss about results obtained for the implementation of Notch Filter
for the removal of the Power line interference from the biomedical signals and compare the output
of LABVIEW and MATLAB.

Chapter 4: In this chapter, we discuss about results obtained for the implementation of FIR and IIR

High and low pass filter for the removal of the Base line Wander Noise and Electromyography

noises from the biomedical signals and compare the output of LABVIEW and MATLAB

26
CHAPTER 2
LITERATURE REVIEW & DESIGN STEPS

In this chapter, the different research papers on FIR (Finite Impulse Response) Filters are studied
and also the steps on the designing of FIR Windowing functions are discussed.

2.1 LITERATURE REVIEW

Park & Meher [10] suggested the Efficient FIR digital filter layout using FPGA and ASIC
realizations of DA-based totally reconfigurable. Ray et al [11] advised the use of variable partition
hybrid shape structures for shift-add implementation of FIR Filters. Pun et al [12] recommended the
FIR and IIR digital filters design with variable frequency traits. Barnela et al [13] implemented FIR
filter the use of MATLAB and evaluated diverse parameters. Joshi & Ainapure [14] implemented
FIR filter wth the use of FPGA. Wang & Meng [15] proposed designing of Finite Impulse Response
Filters using a novel Neural Networks-based which is totally different method.

The examine in [10] suggests approximately the want of systematic design approach in place of
locating the constant length partitions by means of trial and errors method for existing hybrid form
filter implementation . In [11] it is counseled that by sharing the same registers of the DA devices
for unique bit slices the hardware price will be considerably reduced. In [12] & [14] it is concluded
that Kaiser Window in area of hamming window can be used due to the fact Kaiser window has
sharp cut-off with minimal primary lobe width.

In [13] it's far counseled that as opposed to direct form, Transposed shape filter is more efficient.
Then in [15] and [16] it's far emphasized that the adaptive advantage of the activation characteristic
for enhancing the overall performance of the BP algorithm and then again propagation may be
sensitive to noisy facts and outliers.

In [13] & [15] the design of FIR filters the use of Hamming Window. In [13] the performance
estimation of Direct shape of 1D and 2D FIR filter. In [15] and [16] it became proposed for the
linear segment FIR filter design a new weighted lower back propagation neural network (BPNN)
algorithm may be used.

27
In [17] authors have studied distinct studies papers on specific filtering techniques .Alarcon G et al.
recursive three pole Butterworth filters of a given cut-off frequency an set of rules is proposed [17].
Gaikwad and Chavan advised the Digital IIR filtering approach for the elimination of HF noise
from ECG Signal [19]. Md. Asadur Rahman et al. [20] removes the baseline wandering through the
usage of the Wandering route finding set of rules. Authors in [21] worked on FPGA for removal of
High-Frequency noise from Electromyogram (EMG) signal FIR LPF for the Noise from
Electrocardiogram. Authors in [22] discussed the numerous noises in biomedical signals and
strategies to eliminate these noises.
2.2 DESIGN STEPS

The design of FIR filters using windowing is a simple and quick technique. The designing steps of
the FIR windowing function is shown in Fig 2.1.

Figure 2.1: Digital Filter design steps

28
In the filter designing the first aim is to find the identify the purpose of designing the filter In this

report the main aim of the filter designing is to eliminate the different noises which is present in any

biomedical signal, then after identifying problem the filter selection becomes the crucial task in

order to give the optimum filtering here IIR and FIR filters both are designed to find the optimum

filtering. The next step in this design technique is to find the appropriate filter type both in FIR and

IIR which can eliminate particular noise. In FIR filtering technique different windows are used

which is discussed in latter part. After the designing part magnitude calculation and ripples analysis

is done and on that basis the optimum filter is selected. Apart from the designing of filter the signal

is also gets modified, the time domain signal converted in frequency domain by IDTFT method.

The main reason to convert time domain signal to frequency domain is that time domain signal is

less efficient and takes more and also when two signal transmitted at same time then it creates

problem at the receiver side to separate these signals and by using the frequency domain signal

these problems can be eliminated. After processing of signal in frequency domain it again

converted back into time domain by using inverse FFT techniques, this method is known as duality

of Fourier transformation.

In realization of filter the selection of structure is really important to The realization part deals

with choosing the structure to implement the transfer function which may be in the form of software

program or any circuit diagram.

For discussing the windowing method we have the following steps -

1. Specification Determination: The determination of filter specification is completely based


on the application requirement. For example in order to eliminate the of 50-Hz noise from
the biomedical signal first we need to determine the notch frequency upon which the
filtering takes place.

29
2. Finding a transfer function: From the determined filter specification, the transfer function
is easily gets implemented which provide the essential filtering. The digital filter transfer
function is :

M 1

b k z k
k 0
H ( z )  N 1
a k zk
k 0
(12)

3. Selection of realization structure: After defining the transfer function H(z) next step is to
choose the reliable structure which gives the optimum filtering and choosing of structure
also depends upon the type of filter application is known. In the literature there are different
structures such as the direct form I, direct form II, cascade, parallel, transposed, or lattice
forms. The use of bit length makes the main difference between the realization structures. In
the final digital system the filter coefficient is represented by finite bit length. The direct
form realization structure is simplest but highly sensitive to the coefficients quantization so
to overcome this problem cascade and parallel form are more preferred over the direct form

4. Filter Implementing: This is the next and the final step of implementing a filter, after
selecting the realization structure according to the application. For implantation of filter thre
is both hardware and software options such as for software there is option for MATLAB and
LAB VIEW and for hardware implementation microcontrollers or an ASIC are available.

2.3 WINDOWS

As the impulse response is limitless and non causal, it can't be used without delay as a way to make
it finite use it the impulse characteristic is multiply it by a window function. A window function is a
mathematical function that is symmetric to the middle interval value zero outside of chosen interval,
normally symmetric and maximum at the middle of the interval, tapered at the end of interval and has zero
valued outside the interval.

30
For the designing of FIR filter the windows play a very important role and are most commonly
used. The ease in the designing process makes this method very ipopular. Because of the flexibility
provided by the window to adjust in the desirable requirement due to finite array consisting of
coefficients it is widely used. In this chapter some of the methods were discussed for calculating the
coefficients and basic filter characteristic for the designing of the filter provides a few methods.
According to the required application the filter order and the window function are two most
important specifications to the filter designing.

There is correlation between the two requirement i.e when the selectivity is higher the transition
region gets narrower and likewise greater is the unwanted frequency suppression the higher is stop
band attenuation. According to the specific requirement of filtering window function gives the
flexibility to uniquely distribute the leakage spectrum.
For the examination of time averaging spectrum of frequency and transient events there is need of
taking long duration of signal.

Other applications where there is need of bell shaped and smooth curve these window functions is
taken into account. There are many window function such as rectangle, triangle, and other functions
can also be used. Among these windows the use of rectangular window does not modify the data
sets.

As the main function of the window to do smoothing so the peak side lobe decreases but this results
in the increase of main lobe width and this is the tradeoff between two if one increase other
definitely decreases and vice versa. In order to achieve the same transition bandwidth the window
length is increased. Other than filtering techniques this windows can be efficiently used in the
antenna designing and beam forming. For a simple waveform like cos(ωt) the windowing technique
causes the FT of the signal spectral leakage at frequencies other than ω. Near ω the spectral leakage
is highest and gets fade at frequency far from ω. For a two signals of different frequencies there is
huge possibility of leakage interference but that can easily distinguished. But when there is
dissimilarity between the frequency components then the leakage of stronger component is more
dominant than the weaker one and for the similar frequencies, leakage can render.For a comparable
sinusoidal strength of signal the choice of rectangular window is good but this window choice is not
suitable for the sinusoids of disparate amplitudes.

31
At the opposite excessive some of the window features of dynamic variety are the poorest resolution
and sensitivity. High dynamic range windows are commonly utilized in wideband application in
which it supply the high-quality result. By using dynamic range window characteristic in region of
home windows with excessive resolution the noise produces a more potent response. Therefore,
where in the spectrum being analyzed is anticipated to contain many special additives of numerous
amplitudes.

Among these there are some windows Hanning and Hamming which are slight windows which
might be ordinarily useful in narrowband applications, for eg the phone channel spectrum In
precise, there's a tradeoff even as spectral evaluation is resolving similar power additives with
similar frequencies and resolving disparate electricity additives with assorted frequencies.

The effect of windowing strategies on the filter response are as follows:

i. The most important impact of this is seen is the presence of discontinuities present in the

frequency response.

ii. The width of window function’s principal lobe is definitely relies upon the transition

band width of filter response.

iii. The ringing effects get decreased with the aid of the window feature and it consequences

in reducing side lobe however on the price of increase in transition band width of clear

out.

iv. Since the filter frequency response is received via a convolution relation, it's clear that

the resulting filters are never optimal in any sense.

32
CHAPTER-3

ELIMINATION OF POWER SUPPLY NOISE USING


WINDOWING TECHNIQUES

The power noise of 50/60 Hz is the origin of interference and it corrupts the biomedical signals
recordings which might be very essential for the diagnosis of ailment from the sufferers. The
disturbance is precipitated because of the electrical and magnetic interference of the power line and
the EMF produced via the electric equipments that are stored nearby. The signal components holds
frequency, different harmonics and more than one amplitude, the frequencies are the integral more
than one of essential frequency inclusive of 50Hz, stray impact of the AC fields because of cables
loop and the flawed grounding of ECG machine, electrical equipments consisting of air conditioner,
elevators and X-ray units draw heavy electricity line contemporary, which attracts 50 Hz alerts in
the enter circuits of the ECG device.

Depending upon special techniques utilized in signal processing, filters are categorized on the idea
of signal processing, factors, construction filters, impulse response and frequency range. The filter
which fits on continuous-time alerts is referred to as analog clear out. On the other hand, the clear
out that is capable of doing special mathematical operations on a discrete-time sign is known as
digital filters. The digital filter out similarly labeled as IIR and FIR. An IIR filter encompasses zeros
and poles, and calls for lots much less memory than FIR filter out, at the same time as FIR filters
includes zeros only. FIR filters are usually favored over IIR filters because they're non recursive in
nature and has a linear phase reaction , whereas IIR filters involved remarks and are recursive in
nature. Depending at the form of elements in addition filters are classified into lively filters and
passive filters. An energetic clear out is built with transistors and operational amplifiers while
passive filters employ passive factors like resistors, capacitors. In sign processing, the characteristic
of a filter out is to get rid of undesirable components of the sign, which consist of random noise, or
to extract beneficial elements from the signal, along with components lying inside a positive range
of frequency.

Filter layout method has contained several ranges like filter out coefficients, Fourier analyses to
show value and segment reaction of the filter out. There are few strategies to design the FIR filters.

33
One of the maximum not unusual strategies due to its simple and analytical nature is to begin with a
box type perfect low pass filter out inside the frequency domain with a selected cut of frequency fc
and reworking this ideal filter out to the time domain and then descriptive the time in units of the
sampling time Ts.The ratio of fc / fs need to be a lot smaller than one half of, wherein is fs
sampling frequency. If the frequency is > fs/2 aliasing distortion will arise. Transforming a really
perfect LPF in time area consequences in sin x/ x characteristic. This feature represents the impulse
reaction of the filter h[t]. Since the sinc function extends to infinity in both facet, it results in an
limitless numbers of taps of the FIR filters. Then such filters aren't sensible and the quantity of
faucets ought to be truncated. This is done with the aid of the use of home windows. The simplest
window is the rectangular window. But this window has small stop band attenuation for the equal
number of taps. There are many sorts of home windows to reap the desired top band attenuation. It
is in order that because the stop band attenuation will increase the transition location from skip band
to forestall band increases. So, windows are used to form the reaction of the clear out.
Consequently, greater or much less clear out home windows are decided via required stop band
attenuation
In this project we have used the LabVIEW software to understand the FIR filter. The use of
LabVIEW gives us an added advantage over different other software as in LabVIEW we can change
the specification of the filter while running the simulation and can easily observe the result.
In this project our main aim is to remove the power supply noise from the biomedical signals.

Biomedical signals such as ECG, Electroencephalogram(EEG) contains the vital information about
humans body but the fundamental component of PLI 50Hz (in India) /60 Hz (in America) and its
harmonics is one of the most disturbing element present in the signals, which hampers the electric
signal from the human body. So, to achieve our target the notch filter with the help of various
windows such as Kaiser, Blackmann, Gaussian, and Rectangular has been implemented and the
results are verified using MATLAB

Table 3. 4: Window function and their equation


S.No Window Equation
1
Hamming 2π
( ) = 0.54 − 0.146 cos ,0 ≤ ≤ −1
−1
2
Hanning wH(n) = 0.51 (1 – cos (2πnN)) ,0 ≤ n ≤ N

34
3
Gaussian /
( )= / , 0≤ ≤ , ≤ 0.5
4
wB(n) = 0.42 − 0.5 cos (2πn/N−1) + 0.08 cos (4πn/N−1)
Blackmann 0≤n≤M
5
Kaiser ⎧ ⎫
⎪ 1− ⎪
/2
( )= −1 −1
⎨ , − ≤ ≤ ⎬
⎪ ( ) 2 2 ⎪
⎩ 0 ℎ ⎭
−1 −1
1 ,− ≤ n ≤
6. Rectangular ( )= 2 2
0 Otherwise

In the MATLAB for designing the required filter we have to select the type of filter here we have

to chose the type of filter and then to specify order cutoff frequency and .

We have implemented Band pass filter and Notch Filter, the implementation of Band pass filter is

only for the general application and understand the working of the low pass and high pass ifilter.

The notch filter is implemented for the removal of the PLI of the signals.

3.1 Implementation of Band pass Filter


i i i

A BPF is an digital circuit or tools that passes the signals between precise frequencies, however

discriminates in the direction of signals at exceptional frequencies. The example in Fig 3.1 is an

graph among frequency and amplitude that is additionally called a spectral plot, of the feature curve

of a band bypass filter out. F1 and f2, are the cutoff frequencies at which the output sign power falls

to 1/2 of its level at f0 which is the vital frequency of the clear out. The cost of f2 - f1,which may

be expressed in hertz (Hz), kilohertz (kHz), megahertz (MHz), or gigahertz (GHz), is called the

bandwidth of the clear out. The variety between the frequencies f1 and f2 is referred to as filter

pass band.

35
Figure 3.1: BPF Frequency Response

Figure 3. 11: Block Diagram for Bandpass filter using LabVIEW

BPF is implemented using labview as shown in Figure 3.2. In the designed block diagram, cutoff

frequency, taps, and windows can be varied as per the design requirement. The implementation of

the different windows are explained in later section.

36
Hamming Window: Fig.3.3 depicts the result of bandpass filter response of Hamming Window
using LABVIEW and MATLAB .

Figure 3. 12: a. LabVIEW, b.MATLAB Hamming Window BPF at 50Hz

Hanning window: Fig.3.4 depicts the result of bandpass filter response of Haning Window using
LABVIEW and MATLAB .

Figure 3. 13: a. LabVIEW, b.MATLAB Hanning Window BPF at 50Hz

37
Gaussian window: Fig 3.5 depicts the result of bandpass filter response of Gaussian window using
MATLAB and LABVIEW.

Figure 3. 14: a. LabVIEW, b.MATLAB Gaussian Window BPF at 50Hz

Blackmann Window: Fig 3.6 depicts the result of bandpass filter response of Blackmann window

using MATLAB and LABVIEW.

Figure 3. 15: a. LabVIEW, b.MATLAB Blackmann Window BPF at 50Hz

38
Kaiser window: Fig 3.7 depicts the result of bandpass filter response of Kaiser window using
MATLAB and LABVIEW

Figure 3. 16: a. LabVIEW, b.MATLAB Kaiser Window BPF at 50Hz

iRectangulariWindow: Fig 3.8 depicts the iresult of bandpass ifilter response of iKaiser window
using MATLAB and LABVIEW

Figure 3. 17: a. LabVIEW, b.MATLAB Rectangular Window BPF at 50Hz

After designing various windows kaiser window results found to be best because of the narrow
notch as compared to other and it is best fitted to pass single frequency. We have also seen the
effect of Order(N) and the effect of cutoff frequencies on the output for Kaiser window

39
3.1.1 Effect of order (N) :

Here we have observed the effect of order(N) in the output of the designed Kaiser Window filter..
We have tried to see the effect of order by considering value as 50 and 150. For N as 50, it is
observed that the main lobe amplitude is shifted to -19.95dB from -14.04dB (when N=100) and
lobes are wider than that of order as 100 (as shown in Fig 3.9(a)). For N as 150 it is observed that
the main lobe amplitude is shifted to -10.55dB from -14.04 dB (when N=100) and lobes are
narrower in comparison when consider order as 100 as shown in Fig.3.9(b)

Figure 3. 18: Effect of order (N) on the magnitude of the designed filter (a) when N = 50 (b) when N = 150

Table 3.2 tabulates the Matlab and Lab VIEW results of all the window function and also the
percentage improvement is shown in the Table 3.2

iTable 3. 5: iEffect of order on the magnitude using different window functions keeping fc1 = 49Hz & fc2 =
51Hz

N = 100 N = 50 N = 150

Window MATLA % % %
Labview Labview MATLAB Labview MATLAB
function B improvement improvement improvement

Hamming -19.43dB -19.52dB 0.463% -25.51dB -25.38dB 0.509% -15.91dB -15.92dB 0.062%

Hanning -20.10dB -20.02dB 0.497% -26.20dB -26.02dB 0.687% -16.58dB -16.53dB 0.301%

Kaiser -14.04dB -14.09dB 0.356% -19.95dB -20.16dB 1.05% -10.55dB -10.76dB 1.99%

Blackman -21.61dB -21.51dB 0.463% -27.71dB -27.54dB 0.613% -18.08dB -18.09dB 0.055%

Gaussian -20.11dB -20.10dB 0.049% -26.09dB -26.09dB 0% -16.61dB -16.77dB 0.96%

40
3.1.2 EFFECT OF CUT OFF FREQUENCIES

By changing the cutoff frequencies we have observed that the central frequency of main lobe is
shifted to 40Hz as in figure 3.10(a) for fc1 = 39Hz & fc2 = 41Hz and similarly for fc1=59Hzand fc2
=61Hz as shown in figure 3.10(b) the main lobe central frequency is shifted to 60Hz and there is a
significant change in the main lobe amplitude.

Figure 3. 19: Effect of cut off frequencies fc1 and fc2 in the output of the designed filter (a) fc1 =39Hz and
fc2=41Hz (b) when fc1 =59Hz and fc2 =61Hz

Table 3. 6: Effect of the cut-off frequencies on the magnitude using different window functions keeping
order as 100
fc1 =39Hz and fc2 =41Hz fc1 =49Hz and fc2 =51Hz fc1 =59Hz and fc2 =61Hz

Window MATLA % % %
Labview Labview MATLAB Labview MATLAB
function B improvement improvement improvement
-19.42dB -19.32dB 0.514% -19.43dB -19.52dB 0.463% -19.44dB -19.32dB 0.617%
Hamming

-20.10dB -20.10dB 0% -20.10dB -20.02dB 0.497% -20.11dB -20.01dB 0.497%


Hanning

-14.02dB -14.04dB 0.142% -14.04dB -14.09dB 0.356% -14.02dB -14.03dB -0.071%


Kaiser

-21.61dB -21.52dB 0.416% -21.61dB -21.51dB 0.463% -21.62dB -21.52dB 0.462%


Blackman

-20.11dB -20.01dB 0.497% -20.11dB -20.10dB 0.049% -20.12dB -20.09dB 0.149%


Gaussian

-14.02dB -13.85dB 1.12% -14.0dB -13.86dB 1% -14.02dB -13.85dB 1.21%


Rectangular

41
3.2 IMPLEMENTATION OF NOTCH FILTER

For any of the notch filter The ideal response is shown in Figure 3.11 which shows a completely
leveled response over the wide range aside from the notch frequency. Here it might fall down very
rapid providing a high level of attenuation that is capable in removing the unwanted signals.

Figure 3. 120: Notch Filter Response

For removal of 50Hz and 60 Hz interference in the biomedical signal processing the Notch filters
using different windowing techniques are implemented using LabVIEW and MATLAB. The block
diagram of Notch filter is designed (as shown in Figure 3.12) and implemented for different
window functions.

Figure 3. 12: Block Diagram iFor iNotch iFilter Using LabVIEW

42
HammingiWindow: The results of Hamming window for removal of 50 Hz and 60 Hz PLI noise is
shown in Fig. 3.13 and 3.14

Figure 3. 13: a. LabVIEW, b.MATLAB Hamming Window NF at 50Hz

Figure 3. 14: a. LabVIEW, b.MATLAB Hamming Window NF at 60Hz

Hanning Window: The results of Hanning window for removal of 50 Hz and 60 Hz PLI noise is
shown in Fig. 3.15 and 3.16

Figure 3. 15: a. LabVIEW, b.MATLAB Hanning Window NF at 60Hz

Figure 3. 16: a. LabVIEW, b.MATLAB Hanning Window NF at 60Hz

43
Gaussian Window: The results of Gaussian window for removal of 50 Hz and 60 Hz PLI noise is
shown in Fig. 3.17 and 3.18

Figure 3.17: a. LabVIEW, b.MATLAB Gaussian Window NF at 50Hz

Figure 3.18: a. LabVIEW, b.MATLAB Gaussian Window NF at 60Hz


Rectangular Window: The results of Rectangular window for removal of 50 Hz and 60 Hz PLI
noise is shown in figure 3.19 and 3.20

Figure 3.19: a. LabVIEW, b.MATLAB Rectangular Window NF at 50Hz

44
Figure 3.20: a. LabVIEW, b.MATLAB Rectangular Window NF at 60Hz

Blackmann Window: The results of Blackmann window for removal of 50 Hz and 60 Hz PLI noise
is shown in Fig 3.21 and 3.22

Figure 3.21: a. LabVIEW, b.MATLAB Blackmann Window NF at 50Hz

Figure 3.22: a. LabVIEW, b.MATLAB Blackmann Window NF at 60Hz

45
Kaiser Window: The results of Kaiser window for removal of 50 Hz and 60 Hz PLI noise is shown
in fig 3.23 and 3.24

Figure 3.23: a. LabVIEW, b.MATLAB Kaiser Window NF at 50Hz

Figure 3. 24: a. LabVIEW, b.MATLAB Kaiser Window NF at 60Hz


By using different windowing techniques it is linterpreted that the Kaiser Window result is better,
Notch in comparison to other window is better. From the results of different windowing techniques
Kaiser Window has better notch as compared to others but there is presence of ripples.
But the ripples can easily be eliminated by increasing the ishape parameterk (β). As this parameter
increases, ripples decreases but there is a significant increase in the notch width also. Due to this
reason there is a tradeoff between ripples and notch width. If the ratio of cutoff frequencies is less
than 1.1 then the notch is narrowband otherwise it’s a wideband filter. Eq. (13) represents the
formulation of calculation for null (notch) frequency when filter is narrowband. Eq. (14) is used for
calculating Quality factor.

= (13)

Q= (14)

46
Table 3. 7: Calculation of null frequency and Q
Window Type f0 Q

49 51 Narrowband 50 0.04 (-27.95dB)


Kaiser
59 61 Narrowband 60 0.033 (-29.62dB)

Table 3. 8:iEffect iof iβ ion ithe notch filter for null frequency 50Hz
β Output Ripples
0.5 Present

2 Present

3 less

4 less

47
4.5 Minute

5 Negligible

From the above results of notch filter it is interpreted that the responses or the notch of the filter

response in not going beyond -3dB point so to analyse the FIR filter using windowing technique for

notch filter , we have to either increase the order of the filter or to consider some threshold value i.e

along with the removal of the power line interference it removes some signals in the given

frequency range.

3.2.1 EFFECT OF GAIN OF NOTCH FILTER FOR NULL FREQUENCY 50HZ

In this section we have observed the effect of gain on the notch filter by varying order, threshold

frequencies, β value for the Kaiser Window. Figure 3.24(a-e) depicts the response of filter on the

order of the notch of Kaiser Window.

48
Figure 3. 25:Magnitude response on effect of order

Table 3. 9: Effect of Orderi on Gain of Kaiser Window


i

Window Order fc1 fc2 Gain(dB)


a 50 49 51 -0.899
b 100 49 51 -1.92
Kaiser c 150 49 51 -2.98
d 200 49 51 -4.25
e 300 49 51 -7.19

From the Table3.6 and figure3.24 it is noted that for the better notch and gain the order must be of
high value.

49
Tablei 3.10: iEffect ofi ithreshold ifrequencies oni igain
Window fc1 fc2 Gain(dB)

46 54 -11.475

Kaiser 47 53 -7.40

48 52 -4.36

49 51 -1.95

From the above results of Table 3.7 it is interpreted that as the threshold frequency band value

increases more sharper is the notch and more is the gain

Table 3. 11: Effect of β for Kaiser window on Gain with fixed threshold frequency ( = = )

Window β fc1 fc2 Gain(dB)


0.5 46 54 -11.47
1 46 54 -10.27
2 46 54 -7.89
3 46 54 -6.33
Kaiser
4 46 54 -5.35
5 46 54 -4.7
6 46 54 -4.2

As the β value is increasing the gain is decreasing but the ripples are reducing and at β value 6 the

pass band ripples gets vanished.

In this chapter the implementation of notch filter and the band pass filter is done successfully and it

is interpreted that for the removal of the Power Line Interference Noise from the biomedical signal

the FIR Windowing method is best suited and among the windows Kaiser Windows shows superior

results in terms of magnitude and notch width.

50
CHAPTER-4

ELIMINATION OF LOW AND HIGH FREQUECNY NOISES


USING DIGITAL FILTERING TECHNIQUES

Biomedical signals are electric additives accrued from the body. Some of the usual signals are the
ECG and the EEG. These signals are of outstanding cost because of the fact that they may be used
for diagnostic functions. Importantly, most of them can be accrued the usage of non-invasive
methods. These attributes, collectively with the great modern advances in electronic and virtual
processing technology, have made biomedical signal information an crucial supply of records
utilized in medical diagnostics.
Many of the digital indicators consist of noise which in this situation is any unwanted signal that
corrupts the signal of hobby. The heat generated inside the electric and electronics signals inside the
movement and surroundings between the situation and sensors are a number of the noise resources.
In order to extract vital records from the signal, noise should be eliminated. In the processing of the
biomedical signals, filtering is crucial.
The FT expresses the signal using the sinusoidal basis which might be expressed as a feature of
sines and cosines. This is regularly one of the several ways of remodeling the signal into frequency
domain. The frequency area representation basically tells approximately the frequency aspect in
signals and the amplitudes of those frequencies. This amplitude distribution across frequency easily
filters the undesirable indicators (noise). The filtered signalal can be transformed again into time
function using a inverse of Fourier transforms. However it a long way less difficult to manage the
signal within the frequency area. Therefore the signalal is usually retained within the frequency
domain for further processing.
The principal goal of this bankruptcy is to layout an optimum filter out to put off the specific noises
in the biomedical signals which include (Baseline Wander Noise) and Electromyography Noise
using High pass and Low pass filtering.

51
Low Frequency Noise
i i i

While obtaining the ECG signals the problem arises due to frame starching, walking, push-up,
walking, pull-up the body. In these instances, the ECG signals receives drifted from its unique
position with a excessive degree from the baseline. This waft from baseline is known as baseline
wandering. Baseline wander method that the lowest axis of ECG signals seems to move up and
down as opposed to being directly as anticipated. The HPF with cut off frequency of zero.5Hz may
be used to eliminate the effect because of the baseline wandering, which can be used to filter out
signals element with frequency below 0.5Hz.

High Frequency Noise


In biomedical application the presence of muscle noise creates a lot of problems, mainly in
recordings acquired during exercise, since low amplitude waveforms may become completely
obscured. 50/60 Hz interference and Muscle noise is, in contrast to baseline wander no longer
eliminated by using narrowband filtering, but presents a far more hard filtering problem since the
spectral content of muscle hobby extensively overlaps.

The main aim of this chapter is to choose the best filter which can remove Baseline Wander Noise
and Electromyography Noises.
There are many filters existing in literature with the help of which, different noises can be removed
namely : Gaussian Filter, Moving Average Filter, Savitzky Golay Filter.

Gaussian Filter A filter whose impulse response is a Gaussian function is termed as Gausian filter

in signal processing).It minimises the rise and fall time and also has the property of no overshoot to

the inputs having step. These behaviours of the Gaussian filter makes the group delay response

minimum.Just like the sinc which is considerd idealin the frequency domain this Gaussian Filter is

considered the ideal time domain filter which are very useful in areas such as digital

telecommunication systems and oscilloscopes.

The one-dimensional Gaussian filter has an impulse response given by Eq.(15).

( )= . where a is constant (15)

52
Moving Average Filter : For smoothing of a series of digital data a Low Pass FIR filter is

commonly used which is calld as Moving Average. For producing a single output this Moving

Average filter takes the M number of samples and calculates the averages of those samples.In

communication and digital engineering this filter is commonly used because of its simplicity in

designing which can be very useful and efficient in filtering out the noisy part from the signals.In

order to increase the smoothness of the filter output the number of samples,M increased but it blunts

the sharp transition of the data which results in less effective in frequency response and proven best

for the time domain response. The difference equation is given by eq.16:

[ ]= ∑ [ − ] (16)

In Eq.16 , x[n] represents current input ,y[n] represents current output, , x[n−1] denotes previous

input, and the length of the average filter is denoted as N.

Savitzky Golay Filter:

The main purpose of using savitzky golay filtering is to get the smoothed signal, It is mainly used

in filtering of High frequency noises also it gives the output without distorting the original signal

and it is widely used in the digital filtering. The main functioning of this filter is the convolution

process on the data set which is shown by equation 17

=∑ ≤ ≤ − (17)

53
Figure 4.1: Filtering of AWGN noisy signal using different filters

Table 4.1: SNR calculation of AWGN noisy and denoised signals


Type of Filter SNR(dB) before SNR(dB) after
filtering filtering
Gaussian -2.5069 1.1473
FIR (order 1) -2.5069 24.7763
IIR (order 1) -2.5069 17.4921
S Golay Filter -2.5069 16.0117
Moving Average -2.5069 3.6355

After calculating SNR of filtered signals from different filters, the FIR and IIR filters are showing
the remarkable results to remove the AWGN noises which are further used for our project work.

54
4.1 ELIMINATION OF HIGH FREQUENCY NOISES

A filter which is capable of passing range of frequencies lower than fc and attenuates the
frequencies above fc is known as Low Pass Filter(LPF) and this filter can eliminates the High
frequency noises present in Biomedical Signals. The ideal frequency response of the filter is shown
in Fig4.2.

Figure 4.2: Frequency response of Low passes Filter[1]

The equation of frequency response for iHigh iPass iFilter is given by Eq. (18).
1 | |<
i Hd ( f ) = (18)
0 ℎ

4.1.1 IMPLEMENTATION OF IIR FILTER USING BUTTERWORTH


APPROXIMATIONS

The frequency response of “ nth ” order of Butterworth filter is expressed by Eq. (19 )

1
( )= (19)
1+

n is the filter order and the result of frequency response of filter is depicted in Fig 4.3

55
Figure 4.3: Frequency response of Butterworth low pass filter at fc = 100Hz

Figure 4.4:Butterworth filter of order 2,Pole Zero Plot

From the results of fig 4.3 it is depicted that the transition is not sharp this is not acceptable so to
remove this disadvantage FIR filtering has been done.

4.1.2 IMPLEMENTATION OF FIR FILTER USING WINDOWING TECHNIQUES

In order to remove the High frequency noises from the biomedical signal the FIR windowing
method is chosen to overcome the problems occurred in the IIR low pass filtering. In this section
the Low Pass Filter is designed using the LabVIEW software where the responses of different
windows are studied and effect of order is also studied.

56
Figure 4.5: Implementation of Low Pass filter Using Labview

Hamming Window: The result of Hamming window for Electromyography noise removal as shown
in Fig.4.6

Figure 4.6: a. LabVIEW, b.MATLAB Hamming Window LPF at 100Hz

57
Hanning Window: The result of Hanning window for Low Frequency noise removal as shown in
Fig.4.7

Figure 4.7: a. LabVIEW, b.MATLAB Hanning Window LPF at 100Hz

Kaiser Window: The result of Kaiser Window for Low Frequency noise removal as shown in
Fig.4.8

Figure 4.8: a. LabVIEW, b.MATLAB Kaiser Window LPF at 100Hz

Rectangular Window: The result of Rectangular window for Low Frequency noise removal as
shown in Fig.4.9

Figure 4.9: a. LabVIEW, b.MATLAB Rectangular Window LPF at 100Hz

58
Blackman Window: The result of Blackman window for Electromyography noise removal as shown
in Fig. 4.10

Figure 4.10: a. LabVIEW, b.MATLAB Blackmann Window LPF at 100Hz

Gaussian Window: The result of Gaussian window for Electromyography noise removal as shown
in Fig. 4.11

Figure 4.11:a. LabVIEW, b.MATLAB Gaussian Window LPF at 100Hz

Table 4.2: Gain effect on filter order of Kaiser Window of fc = 100Hz

Order Gain(dB)
10 -60
50 -52
100 -38
200 -27
301 -22

59
Figure 4.12: LPF of order 10 Frequency response for Kaiser Window

Figure 4.13: LPF of order 100 Frequency response for Kaiser Window

From Table 4.2, Fig 4.12 and Fig 4.13 it is interpreted that as the order of the LPF increases, the
gain comparatively decreases but the transition is getting sharper. This is the major requirement for
removing of Low Frequency Noises. We have successfully designed a filter using LabVIEW which
removes HF noise from biological signals.

60
4.2 ELIMINATION OF LOW FREQUENCY NOISES

A filter which is capable of passing range of frequencies greater than the fc and attenuates the
frequencies below fc is known as High Pass Filter(HPF) and this filter can eliminates the Low
frequency noises present in Biomedical Signals. The ideal frequency response of the filter is shown
in Fig4.14.

Figure 4.14: Frequency response of High Pass Filter [1]

The equation of frequency response for High Pass Filter is given by:

0 | |<
Hd(f) = (15)
1 ℎ

4.2.1 IMPLEMENTATION OF IIR FILTER USING BUTTERWORTH


APPROXIMATION

The IIR High pass filter is implemented and its frequency response and pole zero is studied.

Figure 4.15: Frequency response of IIR High Pass Filter of Order 2

61
Figure 4.16: IIR HPF order 2 Butterworth Pole Zero plot

From results of IIR HPF implementation it is seen that for 1st order filter gain is approximately

-18.33dB and for 2nd order gain is -36.53dB which means that as orderof IIR filter increases the

value of gain increases because of several disadvantages of IIR filter it is not widely used and one

disadvantage is its infinite impulse response which is shown in Fig4.16

Figure 4.17:HPF Impulse Response order 2

From the above results it is interpreted that if the order of IIR filter increases the gain factor is
getting more better but the complexity also gets increase and the impulse response is infinite so to
reduce this complexity FIR filter using windowing technique is chosen.

62
4.2.2 IMPLEMENTATION OF FIR FILTER USING WINDOWING TECHNIQUES

In order to remove the Low Frequency noises from the biomedical signal the FIR windowing
method is chosen to overcome the problems occurred in the IIR low pass filtering. In this section
the High Pass Filter is designed using the LabVIEW software where the responses of different
windows are studied and effect of order is also studied.

Figure 4.18: Implementation of High pass filter using Labview

The effect of frequency response of the designed FIR HPF using different windows is shown in
later section.

Hamming Window: The result of Hamming window for Low Frequency noise removal as shown in
Fig.4.19

Figure 4.19:a. LabVIEW, b.MATLAB Hamming Window HPF at 0.5Hz

63
Hanning Window: The result of Hanning window for Low Frequency noise removal as shown in
Fig. 4.20

Figure 4.20: a. LabVIEW, b.MATLAB Hanning Window HPF at 0.5Hz

Kaiser Window: The result of Kaiser window for Low Frequency noise removal as shown in
Fig.4.21

Figure 4.21:a. LabVIEW, b.MATLAB Kaiser Window HPF at 0.5Hz

64
Backman Window: The result of Blackman window for Low Frequency noise removal as shown in
Fig. 4.22

Figure 4.22: a. LabVIEW, b.MATLAB Blackmann Window HPF at 0.5Hz

Gaussian Window: The result of Gaussian window for Low Frequency noise removal as shown in
Fig.4.23

Figure 4.23: a. LabVIEW, b.MATLAB Gaussian Window HPF at 0.5Hz

65
Rectangular Window: The result of Rectangular window for Low Frequency noise removal as
shown in Fig.4.24

Figure 4.24: a. LabVIEW, b.MATLAB Rectangular Window HPF at 0.5Hz

From the results of above responses of different filter it is found that Kaiser Windows is showing
best result in comparison to all filters in terms of gain.

4.2.3 EFFECT OF ORDER ON THE GAIN USING KAISER WINDOW

The Kaiser window response is studied with different order of ithe ifilter iin iorder ito iget the
optimum filter. However, for linear-phase (symmetric) FIR filters, the delay can be expressed as in
eq.16:

D = = samples (16)

Table 4.3: Effect of order on the gain of FIR HPF

Order Gain(dB)
11 -56.89
51 -44.13
101 -38.31
201 -32.48
251 -30.64
301 -29.16

The results depicted from Table 4.3, that as the filter order order increases, the gain value seems to
drop but transition is getting sharper.

66
Figure 4.25: FIR HPF order 11 at fc=0.5Hz

Figure 4.26: FIR HPF order 301 at fc=0.5Hz

Fig 4.27 and Fig 4.28 depicts impulse and pole zero response of order 11

Figure 4.27:FIR HPF order 11 Impulse iresponse

67
Figure 4.28:High Pass Filter(order 11) Pole zero plot

It is depicted that the impulse response length is even, anti-symmetric and has zero at z =1 this
represents that the filter is of Type 4 and is best suited for the high pass filtering. For the linear
phase filtering the order of the filter must be an odd integer.

In this chapter the implementation of FIR and IIR Low Pass, High Pass filter is done successfully

and it is interpreted that for the removal of the Low and High frequency noise from the biomedical

signal the FIR High Pass and Low Pass filter respectively using windowing method is best suited

and among the different windows Kaiser Windows shows better results in terms of magnitude and

transition width.

68
CONCLUSION

In this project the main aim is to design an optimum filters which are capable of removing the
various noises present in the biomedical signals. The main noises which are taken are 50/60 Hz
power supply noise baseline wander noise and electromyography noises. From the literature and
many research articles it is studied that these noises are removed by notch filter, highpass filter and
low pass filter respectively. For the filtering purpose there are many techniques available but here
main emphasis is given to the windowing techniques because of the availability of well structured
equations and its smooth tapering at the ends. For the implementation of filters the LABVIEW
software is used and the results are verified with the help of MATLAB. According to the Impulse
response the FIR filter are given priority because of its stability factor and its finite impulse
response nature, another reason to choose this filter is when the AWGN noisy signal is passed
through several filters and among all those filter the FIR filter’s SNR was comparatively better.
All the filters are designed using windows such as Hamming, Hanning, Kaiser, Rectangular,
Blackamnn and Gaussian, among all the windows the best one is found Kaiser because of its sharp
response and shape parameter(β) which can wisely be adjusted to get the desired response.
It is also interpreted that as the order of the filter increases the response is getting more better
because the high order filter provides better roll off rates between passband and stopband. These are
very necessary ito achieve required levels of attenuation or sharpness of cutoff.
Further in future this project can be taken to the Field Programmable Gate Array(FPGA) for the
practical implementation.

69
REFERENCES

[1] Husain F., “ Digital Signal Processing” , Umesh Publications, 4th Ed., 2007.
[2] Manolakis D., Proakis G.J., Digital Signal Processing Principles, Algorithms, and
Applications 4th Ed. Northeastern University Boston College T.W. Parks and C.S. Burrus,
Digital Filter Design. New York:Wiley,1987
[3] Rabiner L.R., Gold B.,McGonegal C.A., “An approach to the Approximation Problem for
Non recursive Digital Filters,” IEEE Trans. Audio and Electroacoustics, vol. AU-18, pp. 83-
105, June 1970.
[4] https://www.electronics-tutorials.ws/filter.html
[5] http://www.learningaboutelectronics.com/Articles/Bandpass-filter-calculator.php
[6] Moore H. “Matlab For Engineers”3rd Ed.,2011.
[7] https://www.mathworkks.com/help/signal/examples/introduction-to-filter-designer.html
[8] Jackson, B. Leland Digital Filters and Signal Processing: With MATLAB Exercises.
Springer Science & Business Media, 2013.
[9] Rolf S., Xiao H., and Van M., "Design of Analog Filters 2nd Edition, The Oxford Series in
Electrical and Computer Engineering)." (2009).
[10] Park S.Y., and Meher P.K., “Efficient FPGA and ASIC Realizations of DA-Based
Reconfigurable FIR Digital Filter” IEEE TRANSACTIONS on Circuits and Systems-II:
Express Briefs, pp 1-5.
[11] Ray D., George N. V., Meher P.K., “Efficient Shift-Add Implementation of FIR Filters Using
Variable Partition Hybrid Form Structures” IEEE TRANSACTIONS on Circuits and
Systems–I: REGULAR PAPERS, VOL. 65, NO. 12, December 2018, pp 4247-4257.
[12] Pun C. K. S., Chan S. C., Yeung K. S., Ho K. L., “On the Design and Implementation of FIR
and IIR Digital Filters With Variable Frequency Characteristics”. IEEE TRANSACTIONS on
Circuits and Systems—II: Analog and Digital Signal Processing, 49(11), 2002, pp 689-703.
[13] Barnela M., Kumar S., Kaushik A., Satvika, “Implementation and Performance Estimation of
FIR Digital Filters using MATLAB Simulink”, International Journal of Engineering and
Advanced Technology, 3(5), June 2014, pp 62-65.
[14] Joshi S., Ainapure B., “FPGA BASED FIR FILTER”, International Journal of Engineering
Science and Technology 2 (12), 2010, pp7320-7323.
[15] Wang X., Meng X., He Y., “A Novel Neural Networks-Based Approach for Designing FIR
Filters”. Proceedings of the 6th World Congress on Intelligent Control and Automation, June
21 - 23, 2006, Dalian, China, pp 4029-4032.

70
[16] Nawi N.M., Ransing R.S., Najib M., Salleh M. , Ghazali R., Hamid N.A., “An Improved
Back Propagation Neural Network Algorithm on Classification Problems” et al. (Eds.):
DTA/BSBT 2010, CCIS 118, 2010. Springer-Verlag Berlin Heidelberg 2010, pp. 177–188.
[17] Rahul “Signal Processing Techniques for Removing Noise from ECG Signals” Journal of
Biomedical Engineering and Research 2019 pp1-9.
[18] Alarcon G., Guy C.N., Binnie C.D., “A simple algorithm for a digital threepole Butterworth
filter of arbitrary cut-off frequency: application todigital electroencephalography”, J Neurosci
Methods. 2000 Dec 15; 104(1): 35-44.
[19] Gaikward K. M., and Chavan M. S., “Removal of High Frequency Noise from ECGSignal
Using Digital IIR Butterworth Filter” IEEE Global Conference on Wireless Computing and
Networking (GCWCN)2014 pp, 121-124
[20] Rahman M. A.,Milu M.M.H., Anjum A. , Farzana K., Ahmad M. “Baseline Wandering
Removal from ECG Signal by Wandering Path Finding Algorithm” 3rd International
Conference on Electrical Information and Communication Technology (EICT), 7-9 December
2017.
[21] Bhaskara P.C., Uplaneb M.D., “High Frequency Electromyogram Noise Removal from
Electrocardiogram Using FIR Low Pass Filter Based On FPGA” Global Colloquium in
Recent Advancement and Effectual Researches in Engineering, Science and Technology
(RAEREST 2016) pp 497-504.
[22] Aswathy V., Soniya P. “Noise Analysis and Different Denoising Techniques of ECG Signal -
A Survey” IOSR Journal of Electronics and Communication Engineering (IOSR-JECE) pp
40-44.
[23] Aparna R., Chithra P.L., “An effective method for continuous speech segmentation using
filters.” National Conference on Computing and Intelligence Systems. 1(1):17–23, 2012.
[24] Shenoi B.A, Introduction to Digital Signal Processing and Filter Design, John Wiley & Sons,
2005.
[25] Lutovac M. D., Tošić D. V., Evans B. L., Filter Design for Signal Processing Using
MATLAB and Mathematica, Miroslav Lutovac, 2001

71
LIST OF PUBLICATIONS

 Jain S., Kashyap M., Garg M., Srivastava S., “Design and Simulation of Optimum FIR
Digital Filters using Windowing Technique”, The 3rd International Conference on Recent
Innovations in Computing (ICRIC-2020),20th-21st March, 2020, Central University of
Jammu, J & K.

 Srivastava S. ,Jain S., “Optimum Digital Filter Design for Removal of different Noises from
Biomedical Signals” 1st International Conference ion Mobile Radio Communications and
5G Networks MRCN-2020 26th -28th March, 2020 U.I.E.T-KUK

72
PLAGIARISM REPORT

73

You might also like