CETCME-2020 - NIET - Vineet Shekher
CETCME-2020 - NIET - Vineet Shekher
CETCME-2020 - NIET - Vineet Shekher
ABSTRACT
An ECG is a simple and useful test which records the rhythm and electrical activity of the
heart of the patient that suffers from any heart disease. An ECG can detect problems you may
have with your heart rhythm. It can help doctors whether you are having a heart attack or if
enlarged or thickened. Digital Filter Design problem involves the determination of a set of
filter co-efficient to meet a set of design specifications. These specifications typically consist
of the width of the pass band and the corresponding gain, the width of the stop band(s) and
the attenuation therein; the band edge frequencies (which give an indication of the transition
band) and the peak ripple tolerable in the pass band and stop band(s). There are many
techniques for selecting coefficients. We can use a spreadsheet like Microsoft Excel, or there
are many design packages which will do the job. I have used MATLAB for this purpose as it
is the most advanced tool for DSP applications. Also it helps to verify the design and results
that comes from the hardware.
INTRODUCTION
Digital filters are involved to reduce the noise of ECG signals, IIR or FIR filter each has its
own advantages and disadvantages. FIR filter because of its finite impulse response is always
stable but its number of coefficients is very large, so it needs a larger memory space to store
its coefficients. On the other hand the IIR filter has less number of coefficients and can be
unstable sometimes due feedback loop involved in it. Essentially, Equation for FIR filtering
is a 1-D convolution between the filter coefficients and the input data. In performing
The resulting stream of numbers is found by taking the sum of the multiplications at each
sliding interval. Like the IIR structure, the FIR realization can be highly replica table, which
becomes important in the hardware design. One important aspect of FIRs is the linear phase
characteristic, which makes it ideal for most digital signal processing applications [1,2]. Non
recursive filters are always stable unlike the recursive or IIR filters which have to keep the
pole placements in perspective. Again, FIRs have to have twice the order of an IIR because
they cannot achieve the smaller side lobes in the stop band of the frequency response given
the same number of parameters as an IIR. Despite the higher order of the FIR filter, the
implementation is feasible in hardware and possesses the necessary linear phase property
needed by channel models .Filter properties, design criteria, and the application at hand
determine from which filter to choose.
ISBN: 978-9-35-561590-1 37
CETCME - 2020
are used to calculate minimum order and coefficients of filter. To calculate each output of the
FIR filter, we multiply a set of samples by a set of coefficients. When a new sample arrives, it
is added to the sample set, and the oldest sample is disposed of. This can be performed using
the circular addressing hardware [5,6,7].
ISBN: 978-9-35-561590-1 38
CETCME - 2020
1. Filter Specification
2. Find filter coefficients that meet the specification
3. Calculation of Coefficient quantization and quantization noise effects
4. Realization of filter structure (Direct Form, Transposed Form, Cascade, or Lattice)
These specifications typically consist of the width of the pass band and the corresponding
gain, the width of the stop band(s) and the attenuation therein; the band edge frequencies
(which give an indication of the transition band) and the peak ripple tolerable in the pass band
and stop band(s).Many signal processing tasks frequently necessitate an immense amount of
floating-point or fixed-point calculations for real-time or near real-time speeds. Such tasks
ISBN: 978-9-35-561590-1 39
CETCME - 2020
Devices, field programmable gate arrays (FPGAs) are becoming increasingly popular for
rapid prototyping of designs with the aid of software simulation and synthesis. Software
synthesis tools translate high-level language descriptions of the implementation into formats
that may be loaded directly into the FPGAs. An increasing number of design changes through
software synthesis become more cost effective than similar changes done for hardware
prototypes. In addition, the implementation may be constructed on existing hardware to
help further reduce the cost [8, 9].
When considering trade-offs between hardware resources and performance, it can be useful
to evaluate the effects of filter taps and finite precision arithmetic on the filter response.
However, some of the following plots can be misleading. Finite precision arithmetic places a
noise floor on plots which can easily be misinterpreted as a floor of the filter response. The
Comparison of the complexity of different IIR filters has been shown in table.
ISBN: 978-9-35-561590-1 40
CETCME - 2020
However, it is possible to replace a general purpose DSP chip and design special hardware
digital filters which will operate at video-speed sampling rates. In other cases, the speed
limitations can be overcome by first storing the high speed ADC data in a buffer memory.
The buffer memory is then read at a rate which is compatible with the speed of the DSP-
based digital filter. A comparison also can be done between IIR and FIR on basis of adders
and multipliers shown in the following table:
Bandwidth and distortion limitations and filtering requirements must then be met using
purely passive components [9, 10].
CONCLUSION
By observing the VHDL simulation results of IIR and FIR filters we conclude that both the
filters perform their filtering functions correctly which matches the MATLAB design of the
filters. Low pass IIR filter gave the correct pre-synthesis and post-synthesis simulation results
and post place and route simulation was used to find the actual delays caused by the hardware
implementation of the IIR filter on FPGA. We found that the delay between FSCLK and
MCLK is 6.5 ns and delay between input and output signal is 998396.5 ns.
ISBN: 978-9-35-561590-1 41
CETCME - 2020
The VHDL code of the digital IIR filter was simulated in Modelsim and the following
waveforms were obtained. After checking the filtered output the delay between the input
signal and the output signal was calculated from the Modelsim wave window.
The input wave consisting of the two waves has been shown in fig below
ISBN: 978-9-35-561590-1 42
CETCME - 2020
When input wave has been applied to digital filter the output consists of one wave form
which is desired wave and all other waves has been removed by the filter.As shown below
out of two input waves only required wave is obtained in output.Basically all other waves are
Noises which are added in ECG signal .
Figure 3: Output of the filter when the input of figure 2 was given as input
ISBN: 978-9-35-561590-1 43
CETCME - 2020
REFERENCES
[1] Lihuang She, Zhongqiang Xu, Shi Zhang, Yuning Song., De-noisng Of ECG Based on
EMD Improved thresholding and Mathematical Morphology rd International Conference
on Biomedical Engineering and Informatics, October 2010.
[2] ShanthalaS, S.Y.Kulkarni, High speed and low power FPGA Implementation for DSP
applications ,European Journal of Scientific Research, ISSN 1450-216X, vol. 31, no.1 , pp.
19-28, November 2009.
[3] Maheshs.Chavan,AGARWALA, Comparative Study of Chebyshev I And Chebyshev II
Filter used For Noise Reduction in ECG Signal , International Journal of Circuits, Systems
and Signal Processing Issue
1,vol. 2, December 2008.
[4] A.Peled and B. Liu., A New Hardware Realization of Digital Filters , IEETrans. on
Acoust., Speech, Signal Process., vol. 22, pp. 456-462, December 2007.
[5] Mahesh S. Chavan, R.A. Agarwala, M.D. Uplane, Application of Chebyshev II digital
filter for noise reduction in ECG Signal , WSEAStransactions on Circuits and
Systems,vol. 4, no.10, pp.
1260-1267, Oct 2005.
[6] X. Hu, L. S. DeBrunner, and V. DeBrunner, An efficient design for FIR filters with
Variable precisio , IEEE Int. Symp. on Circuits and Systems,vol. 4, pp. 365-368,May 2002.
[7] S. C. Chan, W. Liu, and K. L. Ho., Multiplier less perfect reconstruction
Modulate filterbanks with sum-of-powers-of-two coefficients , IEEE Signal Processing
Letters, vol. 8, no. 6, pp.
163-166, June 2001.
ISBN: 978-9-35-561590-1 44
CETCME - 2020
[8] Christov II., Dynamic power line interference subtraction from biosignals ,J Med
Technology, vol. 24, pp. 169-172, July2000.
[9] Y. C. Lim, R. Yang, D. Li and J. Song., Signed-power-of-two term allocation scheme
for the design of digital filters , IEEE Transactions on Circuits and Systems II, vol. 46, pp.
577-584, May 1999.
[10] Sanjit K. Mitra James F Kaiser, Handbook for Digital Signal
Processing , John Wiley & Sons, Inc 1993.
[11] VHDL, Douglas L. Perry , Second Edition, McGraw Hill,1993 .
[12] Escalona OJ, Mitchell RH, BaldersonDE, Harron DW, Fast and reliable QRS
alignment technique for high frequency analysis of signal-averaged ECG , Med Biology
Suppl, pp. 137-146,october1993.
[13] Yi-Sheng, Zhu,et al., P-wave detection by an adaptive QRS-T cancellation
technique ,IEEE. Friesen GM, Jannett TC, Jadallah MA,1987.
[14] Levkov C, Michov G, Ivanov R, Daskalov I., Subtraction of 50 Hz interference from
the electrocardiogram , IEEE Trans. on Med. & Biol. Eng.,vol. 22,pp. 371-373,Dec 1984.
ISBN: 978-9-35-561590-1 45