SlideShare a Scribd company logo
1 of 5
Download to read offline
Harish V. Dixit, Dr. Vikas Gupta / International Journal of Engineering Research and
                     Applications (IJERA) ISSN: 2248-9622 www.ijera.com
                      Vol. 2, Issue 5, September- October 2012, pp.303-307
            IIR filters using Xilinx System Generator for FPGA
                               Implementation
                        Harish V. Dixit , Dr. Vikas Gupta; V.C.E.T

Abstract:
          This       paper       proposes       the
implementation of IIR filter using Xilinx System
Generator software on an FPGA. While
designing any digital filter, the overflow and
quantisation effects must be considered for
stability. The speed of computation is greatly
increased by implementing a filter on an FPGA,
rather than a Conventional DSP processor. We
first design the filter analytically from the given
specifications and simulate it using the Simulink
environment in Matlab. A method to implement
                                                         Fig1. Implementation of Filter on DSP device [1]
this filter using Xilinx System Generator is
proposed.
                                                                  The speed of computation can be
                                                        increased substantially without affecting the system
Keywords : Simulink, Xilinx, FPGA, System
                                                        complexity using the parallelism feature of FPGA.
Generator, Filter
                                                        The FPGA contains a large number of gates and
                                                        millions of transistors. Hence the filter can be
1. Introduction                                         implemented in a parallel manner as shown in the
         Digital signal processors or Application       fig. 2. The implementation consists of 256 registers
Specific Integrated Circuits (ASICs) are commonly       and 256 multiplier unit along with an adder for
used for implementing the digital filtering             final partial product. Hence what took 256 clock
algorithms. However recent advances in the              cycles on a DSP processor takes a single clock
technology of Field Programmable Gate Array             cycle on a FPGA. Fig. 2 shows the implementation
(FPGA) have led to the implementation of these          of the same filter on an FPGA.
algorithms on FPGAs. This paper proposes a
approach to implement an IIR filter on Field
Programmable Gate Arrays (FPGAs) using Xilinx
System Generator software.
     A conventional DSP processor is a serial
device and typically has 1-4 MAC units along with
barrel shifters and other circuits for efficient
computations. A substantial part of the
computations involves the use of multiplication and
accumulation operations. Supposing a DSP unit has
a single MAC unit. A 256 tap filter involves 256
                                                           Fig2. Implementation of Filter on FPGA [1]
MAC operations per sample. Hence with a single
MAC unit, it takes 256 clock cycles for the output
to be computed in a typical DSP processor. The              2.    Digital Filters
speed of computation can be increased by                          A digital filter uses a digital processor to
increasing the clock rate which in turn increases the   perform numerical calculations on sampled values
system complexity. The following figure shows the       of the signal. Based on the length of impulse
computation factors involved in a DSP device:           response, digital filters are classified into two types
                                                        1) Finite Impulse Response (FIR) Filters
                                                        2) Infinite Impulse Response (IIR) Filters
                                                                  The IIR filters are not well supported by
                                                        softwares and Intellectual Property cores as
                                                        compared to the FIR filters. In this paper, we
                                                        discuss the implementation of IIR Filters on
                                                        FPGAs.
                                                            3.    IIR Filters




                                                                                               303 | P a g e
Harish V. Dixit / International Journal of Engineering Research and Applications (IJERA)
            ISSN: 2248-9622                                          www.ijera.com
                          Vol. 2, Issue 5, September- October 2012, pp.
          The IIR filter can be implemented using            To ensure satisfactory performance of the fixed
the following structures:                               point implementation of IIR Filter, the following
     1) Direct Form I                                   factors should be considered [2]. These factors are-
     2) Direct Form II                                  1) Co-efficient Quantisation
In this paper, we use the Direct Form I approach.       2) Internal Quantisation
 IIR filter consists of a forward path as well as a     3) Overflow
feedback path, both paths contributing to the output    4) Stability
outgoing samples. A forward path is typically a         Coefficient Quantisation
short FIR like structure. The forward FIR filter,                 For implementing a digital filter, sofwares
also known as all-zero filter, comprises of the         are used to define the filter coefficients based on
numerator, or b, coefficients for the zeros, and a      the given filter specifications. The filter design
feedback FIR for the denominator, or a,                 software usually computes and displays the filter
coefficients for the poles. A way to express an IIR     coefficients with a high degree of precision. If the
Filter is as a z-transfer function with numerator       digital filter can be implemented using that same
coefficients bi and denominator coefficients ai.        degree of precision, then the filter will behave as
                                                        predicted by the filter design software.
Each output sample is a sum of a new input and                    In practice, only a finite number of bits
earlier input values and subtraction of previous        can be used to represent the digital filter
output values, all multiplied by their respective       coefficients. This reduction in each coefficient’s
                                                        precision causes the frequency response of the filter
                                                        to differ from the “ideal” response due to
                                                        coefficient quantization errors.
                                                                  When using B bits to represent the filter




                                                                 coefficients, the total number of possible
                                                        values that the filter coefficients can take on is 2B.
coefficients Computationally, feedback subtraction      Thus, instead of having an infinite range of values
equals to addition with inverted coefficient values.    for the coefficients, they are instead constrained to
The time domain expression for the IIR is shown in      one of the 2B levels.
following, and it can be seen that some delayed
version of the y(n) output is playing a part in the              The location of the poles and zeros of the
output:                                                 filter are also quantized. This is because they
                                                        depend on the value of the filter coefficients. The
a(i) and b(i) are the coefficients of the IIR filter.   quantization of the pole and zero locations will
                                                        typically move the poles and zeros of the filter to
        The expression is now showing
summation, multiplication, and subtraction, which
are basic DSP building blocks and can be
implemented in FPGA architecture using tools like
System Generator.                                                  locations that are different from the
                                                        “ideal” setting.
                                                        This can have drastic effects on the performance of
                                                        the filter.

                                                        Internal Quantisation
                                                                  A DSP function involves multiplication
                                                        and addition/subtraction operations. However, there
                                                        is bit growth due to these operations, and at some
                                                        point, the bit widths have to be reduced. Operations
                                                        like wrapping/saturation for the most significant
                                                        bits and rounding/truncation for the least significant
         Figure 3 - Structure For IIR Filter [2]        bits have to be used. The rounding process reduces
                                                        bit width but is a source of noise and contributes to
    4.     Implementation Issues of IIR Filter          output round-off noise and, hence, affects the
                                                        signal-to-noise ratio. The flexibility of FPGA


                                                                                              304 | P a g e
Harish V. Dixit / International Journal of Engineering Research and Applications (IJERA)
            ISSN: 2248-9622                                          www.ijera.com
                          Vol. 2, Issue 5, September- October 2012, pp.
architecture allows for increasing the word length     Step 6: Simulate and generate RTL schematic and
and reducing the round-off noise                       check for resource utilization

Overflow                                               Step 7: Run an automatic place and route program.
          For a fixed-point implementation, there is
a certain bit width and, hence, a range. As a result
of calculations, the filter may exceed its
maximum/minimum ranges. To minimize the
effects of overflows, scaling can be used.
Therefore, values can never overflow. There are
different kinds of scaling and these tend to be used
by DSP processors to fit within their fixed
structure. However, this has an effect on the signal
to noise ratios.
Stability
          The roots of the denominator polynomial      This will place the logic block in appropriate places
must be less than 1. It must be ensured that the       in FPGA and then route the interconnection
quantisation effects do not shift the roots to be      between logic blocks.
greater than 1 rendering the filter unstable.
                                                       Step 8: Run a program that will generate the bit
    5. Implementation Methodology                      pattern necessary to program FPGA.
         The       following       implementation
methodology is identified. Various steps according
to flow graph are:                                     Step 9: Download bit pattern into internal
Step 1: Design the Filter                              configuration, memory cells in FPGA and test
                                                       operation of FPGA.
Step 2: Create Simulink Model.

                                                            6. Filter Specifications
     Figure 4 - Implementation Methodology
                                                       An IIR Butterworth Low Pass Filter with the
                                                       following specifications is desired:
                                                       Attenuation in pass band, Ap = 1
Step 3: Implement Simulink model with the help of      Attenuation in stop band, As = 22
MATLAB.                                                Pass band Frequency, fp= 2.1Khz
                                                       Stob Band Frequency, fs = 2.9 Khz
Step 4: Code generation using SysGen/Accel DSP.        Sampling Frequency, fsamp = 6.5Khz
                                                       The transfer function of such a filter is obtained as
Step 5: Simulate and debug the logic program and       ∴H(z) =
make necessary correction to design of Step 3.
                                                           7.         Simulation Results
                                                                      The Simulink environment from
                                                       Mathworks MATLAB is used for the simulation of
                                                       the designed filter. Bandlimited white noise is
                                                       given as an input to the FDA Tool and the output is
                                                       obtained on the spectrum scope. The output on the
                                                       scope verifies the stop band frequency of 2.9 Khz.




                                                        Figure 5 – set up for Frequency response of filter




                                                                                            305 | P a g e
Harish V. Dixit / International Journal of Engineering Research and Applications (IJERA)
            ISSN: 2248-9622                                          www.ijera.com
                          Vol. 2, Issue 5, September- October 2012, pp.




      Figure 6 – frequency response of filter
                                                                   Figure 10 – output with filter
         Figure 7 – Illustration of filtering
                                                        Synthesis
                                                                  As seen, the simulation results have
We now illustrate the filtering action by giving the
                                                        matched the specifications and Xilinx System
filter two sinusoidal inputs of frequency 2.1Khz
                                                        Generator For DSP software is used to synthesise
and 2.9 Khz. The 2.1Khz input is passed to the
                                                        this filter. The following architecture is proposed
scope as it falls within the cutoff range and the 2.9
                                                        for the implementing the designed filter using the
Khz input is heavily attenuated as falls near the
cutoff frequency.                                       basic available blocks in the Xilinx DSP blockset
                                                        of System Generator like adders, multipliers and
                                                        delays




                                                        .
                                                          Figure 11 – Implementation of filter in System
                                                                             Generator
                                                        In the above figure the Third Order block is
                                                        modelled as follows.




                                                             Figure 12 – Implementation of Filter block
                                                        In the above figure the adder block is modelled as,

           Figure 8 – inputs to the filter




                                                            Figure 13 – Implementation of Adder block

                                                        Conclusion:
          Figure 9 – Output without filter                       This Paper discusses the implementation
                                                        of an IIR Digital filter on an FPGA. The parallel
                                                        processing capability of the FPGA greatly increases
                                                        the speed of operation in the implementation of the

                                                                                             306 | P a g e
Harish V. Dixit / International Journal of Engineering Research and Applications (IJERA)
            ISSN: 2248-9622                                          www.ijera.com
                          Vol. 2, Issue 5, September- October 2012, pp.
Digital filter. Simulink is used to obtain the
simulation of the designed filter. The filter may be
rendered unstable because of quantisation effects
and overflow errors. So, it must be carefully
designed and guarded against them. Finally, a
method is proposed to implement this filter using
Xilinx System Generator.

References:
  1.     Xilinx white paper number 213,
         www.xilinx.com
  2.     Xilinx white paper number 330,
         www.xilinx.com
  3.     Chi-Jui Chou, Satish Mohanakrishnan,
         Joseph B. Evans, FPGA implementation
         of digital filters, Proc. of ICSPAT, 1993.
  4.     Juan J. Rodriguez, Andina Maria J.
         Moure, Maria D. Valdes, Features, design
         tools and application domains of FPGA,
         IEEE       transactions       on   industrial
         electronics, 2007, pp: 1810-1823.
  5.     Louis Litwin, FIR and IIR digital filters,
         IEEE potentials, 2002.
  6.     Robert Esposito, Digital signal processing
         : A hardware based approach, proc of the
         2007 middle Atlantic section fall
         conference of the American society for
         engineering education.
  7.     Sanjit K. Mitra, Digital signal processing :
         a computer based approach, McGraw Hill,
         2006.
  8.     Xilinx system generator, basic tutorial,
         www.xilinx.com




                                                                                 307 | P a g e

More Related Content

What's hot

Digital Signal Processing Tutorial: Chapt 4 design of digital filters (FIR)
Digital Signal Processing Tutorial: Chapt 4 design of digital filters (FIR) Digital Signal Processing Tutorial: Chapt 4 design of digital filters (FIR)
Digital Signal Processing Tutorial: Chapt 4 design of digital filters (FIR)
Chandrashekhar Padole
 
A 15 bit third order power optimized continuous time sigma delta modulator fo...
A 15 bit third order power optimized continuous time sigma delta modulator fo...A 15 bit third order power optimized continuous time sigma delta modulator fo...
A 15 bit third order power optimized continuous time sigma delta modulator fo...
eSAT Publishing House
 
Convolution final slides
Convolution final slidesConvolution final slides
Convolution final slides
ramyasree_ssj
 

What's hot (20)

Analysis of different FIR Filter Design Method in terms of Resource Utilizati...
Analysis of different FIR Filter Design Method in terms of Resource Utilizati...Analysis of different FIR Filter Design Method in terms of Resource Utilizati...
Analysis of different FIR Filter Design Method in terms of Resource Utilizati...
 
Digital Signal Processing Tutorial: Chapt 4 design of digital filters (FIR)
Digital Signal Processing Tutorial: Chapt 4 design of digital filters (FIR) Digital Signal Processing Tutorial: Chapt 4 design of digital filters (FIR)
Digital Signal Processing Tutorial: Chapt 4 design of digital filters (FIR)
 
Performance Analysis and Simulation of Decimator for Multirate Applications
Performance Analysis and Simulation of Decimator for Multirate ApplicationsPerformance Analysis and Simulation of Decimator for Multirate Applications
Performance Analysis and Simulation of Decimator for Multirate Applications
 
Implementation Cost Analysis of the Interpolator for the Wimax Technology
Implementation Cost Analysis of the Interpolator for the Wimax TechnologyImplementation Cost Analysis of the Interpolator for the Wimax Technology
Implementation Cost Analysis of the Interpolator for the Wimax Technology
 
Performance Analysis of Fractional Sample Rate Converter Using Audio Applicat...
Performance Analysis of Fractional Sample Rate Converter Using Audio Applicat...Performance Analysis of Fractional Sample Rate Converter Using Audio Applicat...
Performance Analysis of Fractional Sample Rate Converter Using Audio Applicat...
 
Z4301132136
Z4301132136Z4301132136
Z4301132136
 
Basics of digital filters
Basics of digital filtersBasics of digital filters
Basics of digital filters
 
RISC Implementation Of Digital IIR Filter in DSP
RISC Implementation Of Digital IIR Filter in DSPRISC Implementation Of Digital IIR Filter in DSP
RISC Implementation Of Digital IIR Filter in DSP
 
IRJET- Decimator Filter for Hearing Aid Application Based on FPGA
IRJET-  	  Decimator Filter for Hearing Aid Application Based on FPGAIRJET-  	  Decimator Filter for Hearing Aid Application Based on FPGA
IRJET- Decimator Filter for Hearing Aid Application Based on FPGA
 
A 15 bit third order power optimized continuous time sigma delta modulator fo...
A 15 bit third order power optimized continuous time sigma delta modulator fo...A 15 bit third order power optimized continuous time sigma delta modulator fo...
A 15 bit third order power optimized continuous time sigma delta modulator fo...
 
Gg2612711275
Gg2612711275Gg2612711275
Gg2612711275
 
DIGITAL SIGNAL PROCESSOR OVERVIEW
DIGITAL SIGNAL PROCESSOR OVERVIEWDIGITAL SIGNAL PROCESSOR OVERVIEW
DIGITAL SIGNAL PROCESSOR OVERVIEW
 
Lecture 18 (5)
Lecture 18 (5)Lecture 18 (5)
Lecture 18 (5)
 
Introduction to digital signal processing 2
Introduction to digital signal processing 2Introduction to digital signal processing 2
Introduction to digital signal processing 2
 
Filtration and synthesis of different types of human voice signals
Filtration and synthesis of different types of human voice signalsFiltration and synthesis of different types of human voice signals
Filtration and synthesis of different types of human voice signals
 
Convolution final slides
Convolution final slidesConvolution final slides
Convolution final slides
 
Digital signal processor part4
Digital signal processor part4Digital signal processor part4
Digital signal processor part4
 
Introduction to DSP
Introduction to DSPIntroduction to DSP
Introduction to DSP
 
Real-Time Signal Processing: Implementation and Application
Real-Time Signal Processing:  Implementation and ApplicationReal-Time Signal Processing:  Implementation and Application
Real-Time Signal Processing: Implementation and Application
 
Introduction to dsp
Introduction to dspIntroduction to dsp
Introduction to dsp
 

Viewers also liked

Edital concurso
Edital concursoEdital concurso
Edital concurso
culturaceu
 
Casamento,rubem alves
Casamento,rubem alvesCasamento,rubem alves
Casamento,rubem alves
EgidioCampos
 
Pres3: Presentacion numero 3, caso 2
Pres3: Presentacion numero 3, caso 2Pres3: Presentacion numero 3, caso 2
Pres3: Presentacion numero 3, caso 2
marioracancoj
 
2009 prova, analítico, fevereiro
2009 prova, analítico, fevereiro2009 prova, analítico, fevereiro
2009 prova, analítico, fevereiro
Andre Somar
 
Abc de las preguntas segun el comercio.
Abc de las preguntas segun el comercio.Abc de las preguntas segun el comercio.
Abc de las preguntas segun el comercio.
Robert Gallegos
 

Viewers also liked (20)

Au25279287
Au25279287Au25279287
Au25279287
 
Bt25420424
Bt25420424Bt25420424
Bt25420424
 
De25628631
De25628631De25628631
De25628631
 
Bx25444449
Bx25444449Bx25444449
Bx25444449
 
Dj25659663
Dj25659663Dj25659663
Dj25659663
 
Cy25593598
Cy25593598Cy25593598
Cy25593598
 
Bl25375378
Bl25375378Bl25375378
Bl25375378
 
Cv25578584
Cv25578584Cv25578584
Cv25578584
 
Eb25778783
Eb25778783Eb25778783
Eb25778783
 
Ci25500508
Ci25500508Ci25500508
Ci25500508
 
Bb25322324
Bb25322324Bb25322324
Bb25322324
 
Dy25757763
Dy25757763Dy25757763
Dy25757763
 
Bo25391394
Bo25391394Bo25391394
Bo25391394
 
Dw25743750
Dw25743750Dw25743750
Dw25743750
 
Edital concurso
Edital concursoEdital concurso
Edital concurso
 
Casamento,rubem alves
Casamento,rubem alvesCasamento,rubem alves
Casamento,rubem alves
 
Pres3: Presentacion numero 3, caso 2
Pres3: Presentacion numero 3, caso 2Pres3: Presentacion numero 3, caso 2
Pres3: Presentacion numero 3, caso 2
 
2009 prova, analítico, fevereiro
2009 prova, analítico, fevereiro2009 prova, analítico, fevereiro
2009 prova, analítico, fevereiro
 
Plan gobiernoelectronicov1
Plan gobiernoelectronicov1Plan gobiernoelectronicov1
Plan gobiernoelectronicov1
 
Abc de las preguntas segun el comercio.
Abc de las preguntas segun el comercio.Abc de las preguntas segun el comercio.
Abc de las preguntas segun el comercio.
 

Similar to Ay25303307

Design of iir digital highpass butterworth filter using analog to digital map...
Design of iir digital highpass butterworth filter using analog to digital map...Design of iir digital highpass butterworth filter using analog to digital map...
Design of iir digital highpass butterworth filter using analog to digital map...
Subhadeep Chakraborty
 

Similar to Ay25303307 (20)

FPGA Based Design of 32 Tap Band Pass FIR Filter Using Multiplier- Less Techn...
FPGA Based Design of 32 Tap Band Pass FIR Filter Using Multiplier- Less Techn...FPGA Based Design of 32 Tap Band Pass FIR Filter Using Multiplier- Less Techn...
FPGA Based Design of 32 Tap Band Pass FIR Filter Using Multiplier- Less Techn...
 
Performance analysis of iir digital band stop filter
Performance analysis of iir digital band stop filterPerformance analysis of iir digital band stop filter
Performance analysis of iir digital band stop filter
 
1749 1756
1749 17561749 1756
1749 1756
 
Design of iir digital highpass butterworth filter using analog to digital map...
Design of iir digital highpass butterworth filter using analog to digital map...Design of iir digital highpass butterworth filter using analog to digital map...
Design of iir digital highpass butterworth filter using analog to digital map...
 
Design and Implementation of FIR Filter to Analyze Power Efficiency and Noise...
Design and Implementation of FIR Filter to Analyze Power Efficiency and Noise...Design and Implementation of FIR Filter to Analyze Power Efficiency and Noise...
Design and Implementation of FIR Filter to Analyze Power Efficiency and Noise...
 
FPGA Implementation of High Speed FIR Filters and less power consumption stru...
FPGA Implementation of High Speed FIR Filters and less power consumption stru...FPGA Implementation of High Speed FIR Filters and less power consumption stru...
FPGA Implementation of High Speed FIR Filters and less power consumption stru...
 
F0213137
F0213137F0213137
F0213137
 
Novel fpga design and implementation of digital up
Novel fpga design and implementation of digital upNovel fpga design and implementation of digital up
Novel fpga design and implementation of digital up
 
“FIELD PROGRAMMABLE DSP ARRAYS” - A NOVEL RECONFIGURABLE ARCHITECTURE FOR EFF...
“FIELD PROGRAMMABLE DSP ARRAYS” - A NOVEL RECONFIGURABLE ARCHITECTURE FOR EFF...“FIELD PROGRAMMABLE DSP ARRAYS” - A NOVEL RECONFIGURABLE ARCHITECTURE FOR EFF...
“FIELD PROGRAMMABLE DSP ARRAYS” - A NOVEL RECONFIGURABLE ARCHITECTURE FOR EFF...
 
PPT_1.pptx
PPT_1.pptxPPT_1.pptx
PPT_1.pptx
 
Design of Area Efficient Digital FIR Filter using MAC
Design of Area Efficient Digital FIR Filter using MACDesign of Area Efficient Digital FIR Filter using MAC
Design of Area Efficient Digital FIR Filter using MAC
 
IRJET-A Comparative Study of Digital FIR and IIR Band- Pass Filter
IRJET-A Comparative Study of Digital FIR and IIR Band- Pass FilterIRJET-A Comparative Study of Digital FIR and IIR Band- Pass Filter
IRJET-A Comparative Study of Digital FIR and IIR Band- Pass Filter
 
J017635664
J017635664J017635664
J017635664
 
Matlab Based Decimeter Design Analysis Wimax Appliacation
Matlab Based Decimeter Design Analysis Wimax AppliacationMatlab Based Decimeter Design Analysis Wimax Appliacation
Matlab Based Decimeter Design Analysis Wimax Appliacation
 
252 256
252 256252 256
252 256
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Design of Optimized FIR Filter Using FCSD Representation
Design  of  Optimized  FIR  Filter  Using  FCSD Representation Design  of  Optimized  FIR  Filter  Using  FCSD Representation
Design of Optimized FIR Filter Using FCSD Representation
 
Design of Multiplier Less 32 Tap FIR Filter using VHDL
Design of Multiplier Less 32 Tap FIR Filter using VHDLDesign of Multiplier Less 32 Tap FIR Filter using VHDL
Design of Multiplier Less 32 Tap FIR Filter using VHDL
 
Review On Design Of Digital FIR Filters
Review On Design Of Digital FIR FiltersReview On Design Of Digital FIR Filters
Review On Design Of Digital FIR Filters
 
Cr36560564
Cr36560564Cr36560564
Cr36560564
 

Ay25303307

  • 1. Harish V. Dixit, Dr. Vikas Gupta / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.com Vol. 2, Issue 5, September- October 2012, pp.303-307 IIR filters using Xilinx System Generator for FPGA Implementation Harish V. Dixit , Dr. Vikas Gupta; V.C.E.T Abstract: This paper proposes the implementation of IIR filter using Xilinx System Generator software on an FPGA. While designing any digital filter, the overflow and quantisation effects must be considered for stability. The speed of computation is greatly increased by implementing a filter on an FPGA, rather than a Conventional DSP processor. We first design the filter analytically from the given specifications and simulate it using the Simulink environment in Matlab. A method to implement Fig1. Implementation of Filter on DSP device [1] this filter using Xilinx System Generator is proposed. The speed of computation can be increased substantially without affecting the system Keywords : Simulink, Xilinx, FPGA, System complexity using the parallelism feature of FPGA. Generator, Filter The FPGA contains a large number of gates and millions of transistors. Hence the filter can be 1. Introduction implemented in a parallel manner as shown in the Digital signal processors or Application fig. 2. The implementation consists of 256 registers Specific Integrated Circuits (ASICs) are commonly and 256 multiplier unit along with an adder for used for implementing the digital filtering final partial product. Hence what took 256 clock algorithms. However recent advances in the cycles on a DSP processor takes a single clock technology of Field Programmable Gate Array cycle on a FPGA. Fig. 2 shows the implementation (FPGA) have led to the implementation of these of the same filter on an FPGA. algorithms on FPGAs. This paper proposes a approach to implement an IIR filter on Field Programmable Gate Arrays (FPGAs) using Xilinx System Generator software. A conventional DSP processor is a serial device and typically has 1-4 MAC units along with barrel shifters and other circuits for efficient computations. A substantial part of the computations involves the use of multiplication and accumulation operations. Supposing a DSP unit has a single MAC unit. A 256 tap filter involves 256 Fig2. Implementation of Filter on FPGA [1] MAC operations per sample. Hence with a single MAC unit, it takes 256 clock cycles for the output to be computed in a typical DSP processor. The 2. Digital Filters speed of computation can be increased by A digital filter uses a digital processor to increasing the clock rate which in turn increases the perform numerical calculations on sampled values system complexity. The following figure shows the of the signal. Based on the length of impulse computation factors involved in a DSP device: response, digital filters are classified into two types 1) Finite Impulse Response (FIR) Filters 2) Infinite Impulse Response (IIR) Filters The IIR filters are not well supported by softwares and Intellectual Property cores as compared to the FIR filters. In this paper, we discuss the implementation of IIR Filters on FPGAs. 3. IIR Filters 303 | P a g e
  • 2. Harish V. Dixit / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.com Vol. 2, Issue 5, September- October 2012, pp. The IIR filter can be implemented using To ensure satisfactory performance of the fixed the following structures: point implementation of IIR Filter, the following 1) Direct Form I factors should be considered [2]. These factors are- 2) Direct Form II 1) Co-efficient Quantisation In this paper, we use the Direct Form I approach. 2) Internal Quantisation IIR filter consists of a forward path as well as a 3) Overflow feedback path, both paths contributing to the output 4) Stability outgoing samples. A forward path is typically a Coefficient Quantisation short FIR like structure. The forward FIR filter, For implementing a digital filter, sofwares also known as all-zero filter, comprises of the are used to define the filter coefficients based on numerator, or b, coefficients for the zeros, and a the given filter specifications. The filter design feedback FIR for the denominator, or a, software usually computes and displays the filter coefficients for the poles. A way to express an IIR coefficients with a high degree of precision. If the Filter is as a z-transfer function with numerator digital filter can be implemented using that same coefficients bi and denominator coefficients ai. degree of precision, then the filter will behave as predicted by the filter design software. Each output sample is a sum of a new input and In practice, only a finite number of bits earlier input values and subtraction of previous can be used to represent the digital filter output values, all multiplied by their respective coefficients. This reduction in each coefficient’s precision causes the frequency response of the filter to differ from the “ideal” response due to coefficient quantization errors. When using B bits to represent the filter coefficients, the total number of possible values that the filter coefficients can take on is 2B. coefficients Computationally, feedback subtraction Thus, instead of having an infinite range of values equals to addition with inverted coefficient values. for the coefficients, they are instead constrained to The time domain expression for the IIR is shown in one of the 2B levels. following, and it can be seen that some delayed version of the y(n) output is playing a part in the The location of the poles and zeros of the output: filter are also quantized. This is because they depend on the value of the filter coefficients. The a(i) and b(i) are the coefficients of the IIR filter. quantization of the pole and zero locations will typically move the poles and zeros of the filter to The expression is now showing summation, multiplication, and subtraction, which are basic DSP building blocks and can be implemented in FPGA architecture using tools like System Generator. locations that are different from the “ideal” setting. This can have drastic effects on the performance of the filter. Internal Quantisation A DSP function involves multiplication and addition/subtraction operations. However, there is bit growth due to these operations, and at some point, the bit widths have to be reduced. Operations like wrapping/saturation for the most significant bits and rounding/truncation for the least significant Figure 3 - Structure For IIR Filter [2] bits have to be used. The rounding process reduces bit width but is a source of noise and contributes to 4. Implementation Issues of IIR Filter output round-off noise and, hence, affects the signal-to-noise ratio. The flexibility of FPGA 304 | P a g e
  • 3. Harish V. Dixit / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.com Vol. 2, Issue 5, September- October 2012, pp. architecture allows for increasing the word length Step 6: Simulate and generate RTL schematic and and reducing the round-off noise check for resource utilization Overflow Step 7: Run an automatic place and route program. For a fixed-point implementation, there is a certain bit width and, hence, a range. As a result of calculations, the filter may exceed its maximum/minimum ranges. To minimize the effects of overflows, scaling can be used. Therefore, values can never overflow. There are different kinds of scaling and these tend to be used by DSP processors to fit within their fixed structure. However, this has an effect on the signal to noise ratios. Stability The roots of the denominator polynomial This will place the logic block in appropriate places must be less than 1. It must be ensured that the in FPGA and then route the interconnection quantisation effects do not shift the roots to be between logic blocks. greater than 1 rendering the filter unstable. Step 8: Run a program that will generate the bit 5. Implementation Methodology pattern necessary to program FPGA. The following implementation methodology is identified. Various steps according to flow graph are: Step 9: Download bit pattern into internal Step 1: Design the Filter configuration, memory cells in FPGA and test operation of FPGA. Step 2: Create Simulink Model. 6. Filter Specifications Figure 4 - Implementation Methodology An IIR Butterworth Low Pass Filter with the following specifications is desired: Attenuation in pass band, Ap = 1 Step 3: Implement Simulink model with the help of Attenuation in stop band, As = 22 MATLAB. Pass band Frequency, fp= 2.1Khz Stob Band Frequency, fs = 2.9 Khz Step 4: Code generation using SysGen/Accel DSP. Sampling Frequency, fsamp = 6.5Khz The transfer function of such a filter is obtained as Step 5: Simulate and debug the logic program and ∴H(z) = make necessary correction to design of Step 3. 7. Simulation Results The Simulink environment from Mathworks MATLAB is used for the simulation of the designed filter. Bandlimited white noise is given as an input to the FDA Tool and the output is obtained on the spectrum scope. The output on the scope verifies the stop band frequency of 2.9 Khz. Figure 5 – set up for Frequency response of filter 305 | P a g e
  • 4. Harish V. Dixit / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.com Vol. 2, Issue 5, September- October 2012, pp. Figure 6 – frequency response of filter Figure 10 – output with filter Figure 7 – Illustration of filtering Synthesis As seen, the simulation results have We now illustrate the filtering action by giving the matched the specifications and Xilinx System filter two sinusoidal inputs of frequency 2.1Khz Generator For DSP software is used to synthesise and 2.9 Khz. The 2.1Khz input is passed to the this filter. The following architecture is proposed scope as it falls within the cutoff range and the 2.9 for the implementing the designed filter using the Khz input is heavily attenuated as falls near the cutoff frequency. basic available blocks in the Xilinx DSP blockset of System Generator like adders, multipliers and delays . Figure 11 – Implementation of filter in System Generator In the above figure the Third Order block is modelled as follows. Figure 12 – Implementation of Filter block In the above figure the adder block is modelled as, Figure 8 – inputs to the filter Figure 13 – Implementation of Adder block Conclusion: Figure 9 – Output without filter This Paper discusses the implementation of an IIR Digital filter on an FPGA. The parallel processing capability of the FPGA greatly increases the speed of operation in the implementation of the 306 | P a g e
  • 5. Harish V. Dixit / International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 www.ijera.com Vol. 2, Issue 5, September- October 2012, pp. Digital filter. Simulink is used to obtain the simulation of the designed filter. The filter may be rendered unstable because of quantisation effects and overflow errors. So, it must be carefully designed and guarded against them. Finally, a method is proposed to implement this filter using Xilinx System Generator. References: 1. Xilinx white paper number 213, www.xilinx.com 2. Xilinx white paper number 330, www.xilinx.com 3. Chi-Jui Chou, Satish Mohanakrishnan, Joseph B. Evans, FPGA implementation of digital filters, Proc. of ICSPAT, 1993. 4. Juan J. Rodriguez, Andina Maria J. Moure, Maria D. Valdes, Features, design tools and application domains of FPGA, IEEE transactions on industrial electronics, 2007, pp: 1810-1823. 5. Louis Litwin, FIR and IIR digital filters, IEEE potentials, 2002. 6. Robert Esposito, Digital signal processing : A hardware based approach, proc of the 2007 middle Atlantic section fall conference of the American society for engineering education. 7. Sanjit K. Mitra, Digital signal processing : a computer based approach, McGraw Hill, 2006. 8. Xilinx system generator, basic tutorial, www.xilinx.com 307 | P a g e