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

Article1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Article1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

ISSN (Print) : 0974-6846

Indian Journal of Science and Technology, Vol 10(36), DOI: 10.17485/ijst/2017/v10i36/119177, September 2017 ISSN (Online) : 0974-5645

Design of IIR Filter Using PSO Algorithm and its


Implementation in FPGA
Umema Tasleem Shaikh1, Imtiaz Hussain Kalwar2, Tayab Din Memon1 and Faiza Shaikh1
1
Mehran University of Engineering and Technology, Indus Hwy, Jamshoro 76062, Pakistan;
[email protected], [email protected], [email protected]
2
DHA Suffa University, [email protected]

Abstract
In this paper, Particle Swarm Optimization (PSO) algorithm based Adaptive Infinite Impulse Response (IIR) filter is designed.
PSO algorithm is inspired by bird or fish swarm movement. PSO as global optimization technique provides advantages of
simple implementation, quickly convergence providing better results and robustness for avoiding local minima problem.
The designed PSO based Adaptive filter is then implemented to work as a noise canceller. Simulation results shows that the
designed filter is effective with good noise suppression. The PSO based filter is also synthesized in FPGA and run fittings in
small commercial devices Stratix-II and cyclone-II

Keywords: Adaptive Infinite Impulse Response (IIR) Filter, FPGA implementation, Particle Swarm Optimization, VHDL

1. Introduction implementation and may requires few parameters to con-


trol its convergence.
Filter is usually used to retrieve the desired information Kennedy and Eberhart developed the evolutionary
and avoid all the undesired information such as noise, computation technique of PSO algorithm in 19951. PSO
which is created due to inevitable conditions of the envi- as global optimization technique offers advantages of
ronment, from the input signal. Digital filters are popular robustness, fast convergence rate and simplicity in imple-
to reduce the undesired noise as it provides reliability mentation. The PSO algorithm is a social-psychological
and high accuracy, reduced sensitivity and small physi- based adaptive algorithm; an individual from population
cal size to component tolerances as compared to analog adjusts by returning random value towards formally suc-
filters. Digital filters are now favorable for applications cessful regions. Velocity and position updates are the two
like wideband image processing systems and digital com- primary operators of Particle Swarm. It is basically an
munication systems having high data rate. Digital filters iterative process and during iteration, particle velocity is
updated from current to new value, global best position
are generally classified into two main types namely;
and previous best position and the next position will be
Finite Impulse Response (FIR) filter and Infinite Impulse
assigned from the new assigned velocity. This process will
Response (IIR) filter. IIR digital filters offer computational
be iterated until the error will be minimized.
efficiency, reduced system delay and improved selectivity Field Programmable Gate Arrays (FPGAs) are
as compared to FIR digital filters with comparable approx- becoming popular for digital circuits implementation
imated accuracy. However, the digital IIR filters lacks in as dedicated hardwired realization of digital filters is
efficiency, practical applicability and global optimization essential for high-speed and small area digital filtering
robustness. To overcome these in-capabilities PSO offers applications and FPGA has aided them to practically
viable digital IIR filter designing tool because of its simple realize the adaptive filter algorithm. The PSO algorithm

*Author for correspondence


Design of IIR Filter Using PSO Algorithm and its Implementation in FPGA

mapping on FPGA will be straight-forward as it will be 2.4.3 Update Global Best


composed of following three modules: PSO module, Select the global best particles which have the minimum
adaptive filter module and unknown IIR filter module. fitness value.

2. IIR Filter Design 2.4.4 Update Personal Best


By comparing each particle’s newly calculated fitness
Following are the five steps for designing a digital IIR fil-
value, with the previous value, select particle’s personal
ter using PSO Algorithm:
best.
2.1 Filter Specification
2.4.5 Update Velocity of the Particles
In this step, for designing low pass IIR filter following
Using the following equation, update each particle’s veloc-
specifications are used: Sampling Frequency Fs=1000Hz,
ity:
cutoff frequency=0.3, stop and ripple=0.01 and pass band
ripple=0.1.
Vijk +=
1
( )
w (Vijk + c1r1k pbestijk − xik ) + c2 r2k ( gbestijk − xik ) (3)

2.2 Coefficient Calculation 2.4.6 Update Position of the Particle


At this step, the reference coefficients will be determined
Using the following equation, update the each particle’s
which will act as global best coefficient for the PSO algorithm
position:
implementation. For this, Butterworth filter coefficient can
be used which follows the above specification xijk +=
1
xijk + vijk +1 (4)

2.3 Fitness Function Generation


PSO algorithm basically minimized the error by using fit-
ness function. In fitness function, error between ideal and
a designed filter is taken. As mentioned earlier, for IIR
Butterworth filter is used. Fitness function is defined as:
1 N
Fitness
=
N
∑(ideal ( k ) − actual (k ))
k +1
(1)

Whereas, the ideal response is defined as:


ideal ( k ) = (2)
Where, ideal (K) and actual (K) are the magnitude
response of the ideal and the actual filter, where N is the
number of samples2.

2.4 PSO Algorithm Implementation


Following are the steps for implementing PSO algorithm:

2.4.1 Initial Particles


Randomly generate initial population matrix of order (i x j).

2.4.2 Evaluate Particles


The fitness value for each set of particles in the population
is need to be calculated using Equation1. Figure 1. PSO algorithm flow chart.

2 Vol 10 (36) | September 2017 | www.indjst.org Indian Journal of Science and Technology
Umema Tasleem Shaikh, Imtiaz Hussain Kalwar, Tayab Din Memon and Faiza Shaikh

0.4, max number of iterations = 125, number of cascaded


k k
In the above equations, xij and vij represents the posi- IIR filter coefficients= 14 (for order 6).

tion and the speed of the particle “i” at its k th times


3.1 MATLAB Simulation
k
dimension; pbest represents the parti-
th
having the j ij
The PSO algorithm based 6th order low pass IIR filter is
simulated using MATLAB R2014b and obtained follow-
th
cle’s optimist position having the j dimension quantity ing coefficients (Table 1).
k The plot of PSO based IIR filter using above specifica-
times. gbestij is swarm’s opti-
th
of individual “i” at its k tion obtained in Matlab as (Figure 2):
Passband: 0 ≤ ω ≤ 0.27π
mist position. Speed limits −V jmax , and V jmax are used
Stopband: 0.3 ≤ ω ≤ π
to keepparticle within the desired searching space. c1 and Pass-band Ripple Magnitude:

0.9945 ≤ |H( e )| ≤ 1.013
c2 are the cognitive acceleration and social acceleration
(0.0185)
coefficients, which aid in deciding the length flying of the Stop-band Ripple magnitude:
particle to select optimal position of the particle. r1 and |H( e jω )| ≤ 0.0957

r2 represents random number having value between 0-13. (0.0957)

2.4.7 Termination
Unless the maximum number of iteration is reached
repeat the whole process from second step.
PSO algorithm flow chart is shown below in Figure 1.

3. Simulation and Discussion


IIR filter is implemented using following specification. For
initial global best filter coefficients, Butterworth filter coef-
ficients is used having Sampling Frequency Fs= 1000Hz,
cutoff frequency= 0.3, stop b and ripple= 0.01, pass b and
ripple= 0.1. Initial global best particle=Butterworth fil-
ter coefficients (for reference), swarm size =50, cognitive
constant = 2.05, Society constant= 2.05, inertia weight = Figure 2. 6th order IIR Filter frequency response.

Table 1. PSO Optimized Coefficients: (order: 6)


h(N) PSO Butter- h(N) PSO Butter-
Nume-rator worth Denomi-nator worth
Co-efficients Co-efficient
hn(0) 0.03201 0.00258 hn(0) 1.05193 1
hn(1) 0.02841 0.01551 hn(1) -2.43369 -2.37972
hn(2) 0.04848 0.038775 hn(2) 3.02459 2.910406
hn(3) 0.05506 0.051701 hn(3) -2.06931 -2.055131
hn(4) 0.04854 0.038775 hn(4) 0.88002 0.877923
hn(5) 0.02835 0.01551 hn(5) -0.21204 -0.20986
hn(6) 0.0322 0.002585 hn(6) 0.03284 0.021831

Vol 10 (36) | September 2017 | www.indjst.org Indian Journal of Science and Technology 3
Design of IIR Filter Using PSO Algorithm and its Implementation in FPGA

Figure 3. IIR filter implementation on a sinusoidal signal.

Figure 4. RTL view of IIR filter in FPGA.

Figure 3 shows the implementation of designed filter lization. The logic utilization for PSO based IIR Filter is
on a sinusoidal signal. shown in Table 2.

3.2 FPGA Implementation Table 2. Results of area-performance of two devices in


FPGA
The PSO based Low pass IIR filter is simulated to VHDL
Device N Logic Utilization LUTs Clock
and realized on various FPGAs using Quartus-II 9.1. The
purposed filter’s RTL view is shown in Figure 4. A test Cyclone II 6 3722 7631 111MHz
bench is also generated. The results show that the output STRATIX II 6 4138 8113 139MHz
of filter was available after 185ns delay while the initially
1000ns time limit was selected for simulation. Hardware
utilization of different devices like, Stratix-II and 4. Conclusion and Future Work
Cyclone-II, has also been compared for the algorithm. Swarm intelligence based PSO is a new exploratory opti-
The completed analyses were based on 6 input LUTs uti- mization method, which can be implemented on vast

4 Vol 10 (36) | September 2017 | www.indjst.org Indian Journal of Science and Technology
Umema Tasleem Shaikh, Imtiaz Hussain Kalwar, Tayab Din Memon and Faiza Shaikh

variety of applications. In comparison with other, PSO 4. Sharbari Banerjee, Amitabha Sinha. Performance analysis
algorithm is very simple and only requires few param- of different DSP algorithms on advanced microcontroller
eters to make fully functionally developed application. and FPGA, ACTEA 2009, IEEE International Conference;
Here PSO algorithm is used for designing IIR filter in July 15 2009. DOI: 10.1109/ACTEA.2009.5227848
MATLAB and synthesized in FPGA’s small commercial 5. Sheng Chen, Bing L. Luk. Digital IIR filter design using par-
ticle swarm optimization, Int. J. Modelling, Identification
devices cyclone-II and Stratix-II. The results show that,
and Control. 2010; 9(4). Crossref.
Stratix-II shows better performance while Cyclone-II
6. Neha Gupta, Mohammad Junaid Khan. Analysis of the IIR
provides better chip area perspective. So as per applica- filter design using particle swarm optimization method,
tion, this tradeoff may be used. As far as future work is International Journal of Scientific Research in Recent
concern, we can compare the PSO based filter results with Sciences. IJSRRS, 2015; 1(1):34−38.
GA based filter and some other optimization technique 7. Tim Hendtlass. Fitness estimation and the particle
and implement this designed filter on real time applica- swarm optimisation algorithm, IEEE Congress on
tions. Evolutionary Computation; 2007. https://doi.org/10.1109/
CEC.2007.4425028.
8. Dean J Krusienski, Kenneth Jenkins. The application of
5. References particle swarm optimization to adaptive IIR phase equal-
1. Krusienski DJ, Jenkins WK. Particle swarm optimiza- ization. Conference Paper in Acoustics, Speech, and
tion for adaptive IIR filter structures, IEEE Congress on Signal Processing; 1988. DOI: Crossref ICASSP-88., 1988
Evolutionary Computation, CEC 2004. 2004; 1. Crossref. International Conference on June; 2004.
2. Ranjit Kaur, Damanpreet Singh. Particle swarm opti- 9. Lipika Gupta, Rajesh Mehra. Modified PSO based adap-
mization algorithm for designing optimal IIR digital tive IIR filter design for system identification on FPGA,
filter, International Journal of Emerging Technologies in International Journal of Computer Applications (0975 –
Computational and Applied Sciences –IJETCAS; 2014. p. 8887). May 2011; 22(5).
225−30. 10. Ranjit Singh, Sandeep K Arya. Application of particle
3. Qinghai Bai. Analysis of particle swarm optimization algo- swarm optimization for the design of IIR digital filters, Int.
rithm, Computer and Information Science. 2010; 3(1). J. on Recent Trends in Engineering and Technology. Mar
DOI: Crossref. 2012; 7(2).

Vol 10 (36) | September 2017 | www.indjst.org Indian Journal of Science and Technology 5

You might also like