chand2010
chand2010
can design LTI filter by generating the filter coefficients which passband, in order to satisfy the stricter requirements in the
represents the impulse response of filter design. Coefficients in stopband.
linear convolution with the input sequence give the desired
output. Let Second, for most windows, the ripple is not uniform neither
in the passband nor in the stopband and generally it decreases
Y = f *x (1) when moving away from the transition band.
Where: f represents the filters impulse response, x represents A typical description of filter contains the specification of
the input signal, and y represents the convolved output. The passband ωp frequency, stopband ωs frequency, ideal gain and
linear convolution process is formally defined by allowed deviation (ripple) from the desired transfer function. A
special class of filter that satisfies above said criteria is called
(2) equiripple FIR filter [10]. Equiripple design method minimizes
Y [ n] = x[ n] * f [ n] = ∑ x[ k ] f [ n − k ] = ∑ f [ k ] x[ n − k ]
k k
the maximum deviation (ripple error) from the ideal transfer
function. This method is formulated as Chebyshev
approximation problem. It spread the weighted approximation
Here, Y [n] represents the output of the filter, x[n] represents
error evenly between the desired frequency response and
the digital input to the filter, f[k] represents the impulse actual frequency response across the passband and stopband of
response of the LTI filter and the operator ‘*’represents the the filter to minimizing the maximum error. So the resulting
convolution operation. The extent of the summation is design has ripple in passband as well as in stopband. In this
governed by k, which represents the extent of the impulse method, [14] following terms are defined Hd ( ω ) represents
response of the filter [10], [12]. A filter with a finite value for
the desired (real) frequency response of the filter. H (ω ) is the
k is said to be a Finite Impulse Response (FIR) filter.
frequency response of the designed filter. w ( ω ) is the
Class of digital filters that use only current and past input
frequency response of the weighting function. Weighting
samples and none of the filter's previous output samples, to
function gives the ability to the designer to choose the relative
obtain a current output sample value [13] are called FIR filter.
size of the error in different frequency bands. Below given
Because of that FIR filters are sometimes called non-recursive
table is showing the frequency response of linear phase filters.
filters. From time-domain point of view, the operation of FIR
filter is sometimes called a moving-average filter [13]. − j ω ( M −1 ) / 2 j( p / 2)L
H (ω ) = e e H * (ω ) (3)
TABLE I
DIFFERENT EXPRESSION OF H * ( e j ω ) FOR DIFFERENT TYPE OF
FILTER[16]
Case L jω
H*( e )
Case1- M odd 0
Symmetrical
impulse ( M −1) / 2
response ∑ n =0
a (n) cos(ωn)
Case2-M even 0
Symmetrical
Fig. 2. FIR filter of order L.
impulse ( M −1) / 2
response ∑ n =1
b(n) cos(ω (n − 1 / 2))
Equiripple Design Method for Linear Phase FIR filter
Case3- M odd 1
The design of an FIR low-pass filter using the window Anti-
design technique is simple and generally results in a filter with symmetrical
impulse ( M −1) / 2
relatively good performance. However, in two respects these
filters are not optimal: response ∑ n =1
c(n) sin(ωn)
Now the expressions for H*(ω) can be written as product Here, ‘S’ represents the sign bit, ‘M’ represents the non
of fixed function of ω, Q(ω) and a term P(w) which is a fractional magnitude and ‘MF’ represents the fractional
the sum of cosines. magnitude.
TABLE II
VALUES OF P ( ω ) AND Q ( ω )
III. FIR FILTER ARCHITECTURE
Case Q(ω) P(ω)
Case 1 1 ( M −1) / 2 FIR filter can be realized in various ways depending on
∑ n =0
a ' (n) cos(ωn) design issues, latency and filter operation. FIR filter
Case 2 Cos(ω/2) ( M / 2 −1) architectures are described in paper [12], [15], [16], [17].
∑ n =0
b' (n) cos(ωn)
Case 3 Sin(ω) ( M − 3) A. Low Pass Serial FIR Filter architecture
∑ n =0
c' (n) cos(ωn)
Below show figure shows the architecture of series FIR
Case 4 Sin(ω/2) ( M / 2 −1) filter it require one adder, one multiplier and one delaying unit.
∑ n =0
d ' (n) cos(ωn)
So with respect to hardware efficiency it is a good option but
FIR filter made using this architecture is very slow and
The weighted error of approximation E(ω) can be defined as : throughput of the device is very low
E (ω ) = W (ω )[ H d (ω ) − H * (ω )] (4)
E(ω) = W (ω)[Hd (ω) − P(ω)Q(ω)] (5)
As Q(w) is a function of frequency,
E (ω ) = W (ω )Q(ω )[ H d (ω ) / Q(ω ) − P (ω )] (6)
Then two more terms are defined
W ' (ω ) = W (ω )Q(ω ) (7)
Hd*( ω ) = Hd( ω )/Q( ω )
Now we can error function can written be as
E (ω ) = W '[ Hd (ω ) − P (ω )Q(ω )] (8)
Thus the Chebyshev approximation is about finding the set of
Fig. 3. Architecture of serial FIR Filter.
coefficients to minimize the maximum absolute value of
E (ω ) over the frequency bands in which the B. Low Pass Parallel FIR Filter architecture
approximation is being performed. Mathematically the
Chebyshev approximation problem may be written as It is the type of FIR filter architecture that process data
E (ω ) = min[max E (ω ) ] (9) parallely instead of processing one by one. It gives high
throughput on the cost of hardware. We can see from
Coefficients of the FIR filter are generated using the
architecture shown below that all adders are connected with
Matlab2007a FDA tool. The accuracy of the filter response
the output of previous adder such that the output which we get
depends on the word length of the filter coefficients; ideal
at the output terminal is the sum of the output of the all adders.
filter requires the filter coefficients of the infinite word length
It gives the valid output after 38 clock cycle (being a 37 order
which is practically not possible to implement on hardware,
filter) or in other words we can say that it having the latency of
due to hardware constrain. One approach to solve the problem
38 clock cycles except that one more problem which is
is to round off coefficients to a b-bit representation. This
associated with it is critical delay, which is very high and equal
reduces the hardware use [12], so to minimize the hardware
to sum of delay of one multiplier and 38 adder which may
use; we quantized the filter coefficients in to 16 bit data using
create the problem, to get rid of the high critical delay
the format Q16.14 [12]. Means in the 16 bit data length 1st bit
branched adder architecture is proposed which is shown in the
form MSB side denotes the sign of data called sign bit than 2nd
figure no5.
bit denotes the integer bit and rest 14 bit denotes the fraction
magnitude. Although minimization of filter coefficients affects Input
the performance of filter especially when no. of Tabs are very
high. Cft
TABLE III 0
NUMERIC REPRESENTATION FORMAT Q16.14- BIT DISTRIBUTION
TABLE VI
HDL SYNTHESIS REPORT- MACRO STATICS
VII. REFERENCES
[1]. John R. Hampton”ECG Made Easy. Elsevier Health Sciences, 2008.
Component Name Number of Components [2]. Zainul Abedin and Robert,Conner ,ECG interpretation ‘The self
assessment approach, Blackwell Publishing, 2008.
[3]. John R. Hampton,”The ECG in Practice” Elsevier Health
#Multipliers 38 Sciences,2008.
[4]. A. Bayes de Luna, Basic Electrocardiography ‘normal and abnormal’
16x16-bit multiplier 38 ECG patterns, Blackwell Publishing,2007
[5]. S ChatlaPalli, H NAzeran, V Melarkod, R Krishnam, E Estrada, E.
Estrada, Y b Pamula, SCabrera, “Accurate Derivation of Heart Rate
#Adders/Subtractors 154 Variability Signal for Detection of Sleep Disordered Breathig in
Children” Proc.26th IEEE/EMBS Cancun Maxico sept. 1-5, 2004.
16-bit adder 76 [6]. Gary M. Friesen, Thomas C. Jannett, Manal Afify jadallah, Atandford L.
Yates, Stephen R. Quint, Troy Nagle ”A comparison of the Noise
sensitivity of Nine QRS Detection Algorithms” IEEE Tnas.Biol. Madi.
32-bit adder 78 Eng.vol37.no.1, 1990.
[7]. Gari D. Clifford, “Signal Processing Methods for Heart Rate
Variability” PhD. Thesis at St. Cross College, Oxford University, 2002.
64-bit adder 5 [8]. J.Fraden M.R. Neuman, ”QRS wave detection” Med. & Biol. Eng. &
Comput., 1980, vol.18, p.125-132.
# Registers 1808 [9]. Jiapu P and Tompkins WJ: A real-time QRS detection algorithm. IEEE
Trans.Bio med. Eng. 1985; vol.32: p. 230-236.
[10]. Dr. Ume Meyer-Basese ,Digital Singnal Processing with Field
Flip-Flops 1808 Programmable Gate Array, Springer-Verlag Berlin Heidelberg,
Newyork,2001.
# Xors 38 [11]. Shanthala S , S. Y. Kulkarni, 2009, High Speed and Low Power FPGA
Implementation of FIR Filter for DSP Applications, European Journal of
Scientific Research pp.19-28, Vol.31 No.1 (2009).
1-bit xor2 38 [12]. Richard G. Lyons, Understanding Digital signal Processing, New jersey
Prentice- Hall, 2004.
[13]. L.R. Rabiner and B. Gold, Theory and Applications of Digital Signal
Processing, New Jersey: Prentice-Hall, 1975.
VI. CONCLUSION [14]. Zhangwen Tang, Jie Zhang and Hao Min ,“A High-Speed,
Programmable,CSD Coefficient FIR Filter”, IEEE Transactions on
Powerful computer based software tools are commonly used Consumer Electronics, Vol 48, No. 4, 2002.
to perform the ECG signal filter. But when we talk about the [15]. Joseph B. Evans: Y. C. Limt and Bede Liu,“A High Speed
Programmable Digital FIR Filter” IEEE CH2847-2/90/0000 -0969
implementing filter on hardware, the biggest challenge is to '1990.
achieve specified speed of data processing at minimum [16]. Joseph B. Evans,” Efficient FIRFilter Architectures Suitable for FPGA
hardware cost. This paper presents a new design approach to Implementation” IEEE Trans on Circuits and Systems-11: Analog and
design the fast FIR lowpass filter for filtering EMG from ECG Digital.
[17]. John G. proakis, Dimitris G. Manoakis, Digital Signal Processing
signal. Figure1. showing the filter response and figure3. (Principles, algorithms, and applications), Prentice-Hall, New Delhi,
showing the MATLAB simulation result of designed filter. 1996.
The Filter has been designed, coded using Verilog-HDL and [18]. Practical FIR Filter Design in MATLAB R. Ricardo, A. Losada the
finally implemented on Virtex-5 FPGA (xc5vlx110t-3-ff1136) MathWorks, Inc. 2004.
device as a prototype to ASIC (Application Specific Integrated
Circuit).