You are on page 1of 5

IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

SIMULINK BASED DESIGN SIMULATIONS OF BAND PASS FIR FILTER

Lalit Maurya1, Vijay Kr. Srivastava2, Rajesh Mehra3


1, 2
M.E. Student, 3Associate Professor Electronics and Communication, National Institute of Technical Teacher
Trainingand Research, Punjab University, Chandigarh

Abstract
In this paper, window function method is used to design digital filters. The Band Pass filter has been design with help of Simulink in
MATLAB, which have better characteristics of devising filter in fast and effective way. The band pass filter has been design and
simulated using Kaiser window technique. This model is established by using Simulink in MATLAB and the filtered waveforms are
observed by spectrum scope to analyze the performance of the filter.

Keywords: FIR, window function method, Kaiser, Simulink, MATLAB.


----------------------------------------------------------------------***---------------------------------------------------------------------

1. INTRODUCTION the delay chain of x(n) , thus FIR horizontal structure is as


follows:
Digital filter is a type of digital system that filters discrete-
time signal and main objective performing frequency domain
filtering by processing sample data. It can be divided into two
types in accordance with the time domain features of unit
impulse response function: Infinite impulse response (IIR) and
finite impulse response (FIR).Compared with IIR filter, FIR
filter can have exactly linear phase characteristic while
satisfying amplitude frequency response. The implication of Fig 1 Direct- form Structure
this is that no phase distortion is introduced into the signal by
filter [1]. Therefore, it is widely used in high-fidelity signal Structures in which the multiplier coefficients are precisely the
processing, such as digital audio, image processing, data coefficients of the transfer function are called direct form
transmission, biomedicine and other fields. SIMULINK is a structures. Noting that N represents tap numbers of the FIR
software package in MATLAB which is specially used for filter; x(n) is for the input sample of nth time; h(m) acts as the
dynamic system modeling, simulation and analysis. We can mlevel tap coefficients of the FIR filter [3].
see the simulation result in a virtual way by using Simulink
built in MATLAB that how the filter specification meet to A higher - order FIR transfer function can also be realized as a
perform the filtering operation [2]. cascade of FIR section with each section describe by either a
first-order or a second-order transfer function. Now the system
2. FILTER STRUCTURE function H(z) can be decomposed into second-order real
coefficients factor form as show in (3):
Assuming the unit impulse response h(n) is a sequence of N
points of the filter, 0 ≤n ≤N-1 , thus the system function of the N
N−1 2
filter is expressed as follows:
H z = h n z −n = (β0i + β1i z −1 + β2i z −2 ) (3)
N−1 n=0 i=1
H z = h n z −n (1)
Its structure form as follows:
n=0

The function above can be expressed as a difference equation:

N−1

y n = h m x n−m (2)
m=0

Obviously, equation(2) is a convolution sum formula of


linear shift-invariant system as well as a horizontal structure of Fig 2 Cascade Structure

__________________________________________________________________________________________
Volume: 03 Issue: 02 | Feb-2014, Available @ http://www.ijret.org 157
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

Conjugate poles are controlled by every joint among the Its linear network structure is presented as following picture:
structure for conveniently transmitting zeros. This type of
structure requires more coefficients and multiplication than the
direct one so it is not often used[4].

We are familiar with that if unit impulse response function


h(n) of FIR filter is real and satisfies the following conditions:

h n = h(N − 1 − n)
(4)
h n = −h(N − 1 − n)
Fig 3 h(n) for the dual symmetry, N is an even
From the above equation it can be realized that the center of
the symmetry has the coordinate of (N-1)/2 which shows that When h(n) is for the dual symmetry, N is an odd number, its
the filter is linear phase. [5]. The symmetrical characteristic of linear network structure is presented as follows [6]:
the FIR filter can simplify network structure (here only for
discussion when h(n) is an even-symmetry case and N is an
even number. It’s the same theory when h(n) is an odd-
symmetry presentation) when h(n) is even symmetry and N is
an even number:

If a given unit impulse response of linear FIR filter is h(n) , 0


≤n ≤N -1, and it satisfies either of the symmetrical conditions
as represented in (4).

When h(n) is for the dual symmetry, N is an even number: Fig 4 h(n) for the dual symmetry, N is an odd
N−1
From the above analysis we conclude that: linear phase FIR
H z = h n z −n filter require half of multiplications compared with a direct-
n=0 form one. However, we choose the direct form due to its
(N/2)−1 N−1 design convenience and the same linear phase restrictions will
−n
= h n z + h n z −n (5) be satisfied when it is consistent with linear restrictions [7].
n=0 n=N/2
3. WINDOW FUNCTION
Among the second∑ , we put n = N -1-m, and change m with
The most straightforward approach to obtain a causal finite
n to get the expression:
impulse response (FIR) is to truncate and smooth the ideal
(N/2)−1 response. We begin with the desired frequency response
specification Hd(ejω ) and determine its unit sample
H z = h n z −n
responsehd(n). Indeed, hd(n) is related to Hd(ejω ) by the
n=0
(N/2)−1 Fourier Transform relation:
+ h N − 1 − n z −(N−1−n) (6) N−1

n=0 H e = h n e−jωn (8)
n=0
On the basis of linear parity- symmetry conditions: h(n) = Where
±h(N -1- n) , with (6) it modified into new formula as follows: π
1
N hd n = Hd ejω ejωn dω (9)
( )−1
2

−π
H z = h n [z −n ± z − N−1−n ] (7)
n=0
In general, the unit sample response hd(n) obtained from (9) is
infinite in duration and must be truncated at some point to
devise an FIR filter of length M. One effective way for
truncation of hd(n) to some finite length is equivalent to
multiplying hd(n) by a length-finite window sequence namely:
h(n)= ω(n)hd(n), and turning noncasual sequence into a casual
one[8].

__________________________________________________________________________________________
Volume: 03 Issue: 02 | Feb-2014, Available @ http://www.ijret.org 158
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

Frequently-used window functions can be listed as Triangular 1) Given the desired frequency response functionHd(ejω ).
windows, Hann window, Hamming window, Kaiser windows 2) Calculating hd (n) = IDTFT [ Hd(ejω )].
and Blackman windows and so forth. All kinds of functional 3) Judging by the chart tableI, The shape of the window and
parameters list is as follows: the size of N should be certain due to the requirements of the
transition bandwidth and the minimum stopband attenuation.
4) Determine the unit sampling response of the FIR design
h(n),n=0,1,…N-1
5) Calculating Hd(ejω )) = DTFT [hd(n)], and verifying if it
meets the requirements otherwise redesign it[11].
In short, window function method is most simple and effective
way as well as the most common way for designing FIR filter.

The kaiser window function don't have fixed characteristics,


such as transition width and stopband attenuation. This type of
problem is overcome by incorporating a ripple control
parameter, β, which allows the designer to trade-off the
transition width against ripple [9]. In this paper the kaiser
window function is used. The parameters of kaiser window is
as follows:

Normalized transition zone:

ωs − ωp
∆f =

ωp represents the passband cutoff frequency , ωs represents


the stopband cutoff frequency.

The order of the filter


As − 7.95 Fig 5.Design flow of filter design by window function
M=
14.36Δf
4. SIMULINK BASED DESIGN SIMULATION
As is the minimum stopband attenuation. In this paper we will apply a sinusoidal wave which is a mixed
signal of 100Hz, 250Hz and 400 Hz frequencies to FIR band
When As is separately defined as: pass filter which is design by the Simulink in MATLAB. The
As < 21, 21<As < 50, As < 50. We can obtain values of β Required Parameters for designing the filter are Fs = 1KHz,
correspondently as follows: lower cut-off frequency fc1 = 150Hz, upper cut-off frequency
of passband fc2 = 350Hz to fulfill Kaiser Window.
β=0
0.4
β = 0.584(As − 21) + 0.07886 As − 21 … (12) The simulation model on Simulink in MATLAB for filters
β = 0.1102(As − 8.7) output observation on the application of given sinusoidal wave
is as follows [12].
The performance of various window functions has been listed
in the table and the appropriate window function can be
selected according to the parameters in order to accomplish a
given design [10].

The design steps for the window function as follows:


__________________________________________________________________________________________
Volume: 03 Issue: 02 | Feb-2014, Available @ http://www.ijret.org 159
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

Fig 6: Simulink Simulation Model


Fig 9: Spectral response of the output of the filter
The Magnitude response of FIR filter which is design in
Simulink with Kaiser window function of specified order n = Further we can use minimum order FIR filter which is itself
38 and beta = 3.5 as follows provided by the FDAtool with Kaiser window function to
filter to mixed signal and magnitude response of design filter
and output spectrum shown in figure 10 an 11.

Fig: 7 Magnitude response of specified order filter


Fig 10: Magnitude response of minimum order kaiser window
The spectral response for the given mixed sinusoidal signal filter (generated itself by FDAtool)
which is applied at the input of the filter is shown in figure 8
and spectral response of the output of the filter is shown in
figure 9.

Fig 8: Spectral response of mixed sinusoidal signal Fig 11: output spectrum of minimum order filter

__________________________________________________________________________________________
Volume: 03 Issue: 02 | Feb-2014, Available @ http://www.ijret.org 160
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

CONCLUSIONS
Window function method is used to achieve the finite impulse
response with the help of window function with certain width
to intercept an infinite impulse response. We can design and
analyze the filter output effectively, precisely, easily with the
help of Simulink in MATLAB. It is more practical and
adjustable at any time by contrasting characteristics of the
filter, in order to achieve the optimal design of the filter.
Judging the output spectrum of mixed signal the filter design
is achieved with the given specified parameters to fulfill the
designer requirement. Further we observed that the side lobe
attenuation decreases as the filter order increases, resulting the
better performance of the filter which leads to fulfill the
requirement.

REFERENCES
[1]. Cetin A E, Gerek O N, Yardimci Y, “Equiripple FIR filter
design by the FFT algorithm,” Signal Processing Magazine,
1997,14(2), pp. 60-64.
[2]. Yagyu M, Yoshida T, Nishihara A, “Design of FIR
Digital Filters with Minimum Weight Representation,” IEEE
Transactions on Circuits and Systems, 1995, 40(3), pp. 227-
230.
[3]. Bougas P, Kalivas P, “Pipelined array-based FIR filter
folding,” IEEE Transactions on Circuits and Systems, 2005,
52(1), pp. 108-118.
[4]. Gang G Y, Qing Z, Yuanjin L, “Discrete-time
Approximation of Filters,” Journal of Control Theory and
Applications, 2004, pp 1-10.
[5]. Jongsun P, Muhammad K, Roy K, “High-performance
FIR filter design based on sharing multiplication,” IEEE
Transactions on VLSI, 2003, 11(2), pp. 244-253.
[6]. Cheng C, Parhi K K, “Low-cast Parallel FIR Filter
Structures with 2- stage Parallelism,” IEEE Transactions on
Circuits and Systems,2007, 54(2), pp. 280-290.
[7]. Hermanowicz E, Johansson H, “A Complex Variable
Fractional-Delay FIR filter Structure,” IEEE Transactions on
Circuits and Systems II, 2007, 54(9), pp 785-789.
[8]. J. Proakis and D. G. Manolakis, “Digital Signal
Processing” fourth edition, Prentice-Hall, 2007
[9]. Emmanuel C. Ifeachor and Barrie W. Jervis, "Digital
Signal Processing"second edition, Pearson Education Limited,
2002
[10]. Shengli Yan, “FIR filter principle and design method,”
Changchun Engineering college journal, 2003, 4(1), pp 63-65.
[11]. Kaiyu Xu, Zhongming Zhu, Yaling Lu, “Digital signal
processing,” Electronics and industry press, 2005, pp. 137-
138.
[12]. Zhenhe Sun, Wei Yu, Chen He, "FIR digital filter design
and MATLAB simulation", 2012 International Conference on
Measurement, Information and Control (MIC) pp 677 - 680

__________________________________________________________________________________________
Volume: 03 Issue: 02 | Feb-2014, Available @ http://www.ijret.org 161

You might also like