Implementation of Digital IIR Filter Using VHDL on VIRTEX-6 (XC6VSX475T) FPGA B.Satyasai P.Raviumar,.tech Asst.Professor, Electronics and communication, Electronics and communication, GR Institue of Technology, GR Institute of Technology, Rajam, India, Rajam, India, ms.satyasai@gmail.com. raviumar.p@gmrit.org Abstract The development of digital IIR (Infinite Impulse Response) filter is done on VIRTEX-6 FPGA using VHDL (Very High Speed Integrated Circuit Hardware Description Language) in XILIX Integrated Software Environment. IIR filter is analytically simulated by simulin environment in ATLAB. The digital data output of A/D converter is sent through IIR module in FPGA. Testing and debugging IIR module is done in custom made VIRTEX-6 data acquisition hardware. The results obtained are cross checed with ATLAB results. Speed of computation greatly increased by developing digital filter in FPGA. Advantages of FPGA approach to develop IIR filter include higher sampling rates than traditional DSP chips, lower cost than ASICs for moderate applications. Key words: DAQ, IIR filter, ATLAB, XILIX, VHDL, FPGA (VIRTEX-6). I. ITRODUCTIO A filter is used to remove the undesirable signals or the noise of the signal. In naval there is requirement to remove the unwanted portion of the underwater acoustic signals. We now there are two types of digital filters. ) FIR (Finite Impulse Response) filter and 2) IIR (Infinite Impulse Response) filter. Impulse response of an LTI system which donot reach ero past a certain point and continues[8]. Such a response is called as Infinite Impulse Response. IIR filters [] are better to implement than FIR filters to meet the specifications lie passband, stopband etc... Computational time is saved by using digital IIR filters [2] which is a large factor. IIR filters gives the output such that the input is deformed without filter frequency which by means called as non linear phase characteristic. These filters are not believed to be stable when the output is mainly dependent on frequency domain rather than time domain. IIR filters are computationally more efficient than FIR filters as they require as they require fewer coefficients due to the usage of poles and feedbac [5], [7]. Generalied equation of IIR filter is y H [ n] = b[ ] x[ n ] + a[ ] y[ n ] = 0 =. () b + b + a + K + b + K + a 0 ( ) = + b = 0 = = a Transfer function of the filter (2). (3) Where a and b are the filter coefficients., 2. are the eros, p, p 2..p are the poles. II. DATA ACQUISITIO HARDWARE SYSTE DAQ system wors on the basis to measure a physical phenomenon such as light, temperature, sound and pressure. It includes transducer, signal conditioning, data acquisition software. It captures a signal and converts the physical signal into electrical signal, analog signal is converted to digital by an A to D converter. The obtained signal is filtered by FPGA using VHDL. Ultimately physical phenomenon is measured and analyed through computer. a) Transducer Fig. DAQ system Transducer converts a physical signal into an electrical signal. These transducers generate the electrical signal to measure temperature, sound, light etc.., All the signals are not computed in unique pattern. So these electrical signals are classified as 08
analog and digital signals. The maximum possible information you get from a signal are state, rate, level, frequency, shape. Using FDA (Filter Design Analysis) Tool we can select the specifications of the filter. The required specifications are passband (ripple), stopband (attenuation) [3]. b) Signal Conditioning : A signal cannot directly connected to a DAQ device. So that the signal is to be altered. To connect a signal suitably to a DAQ device the Signal conditioning is used. Signal Conditioning is the significant technology in computing any signal. It is important to convert a signal into the acceptable format of DAQ device. Amplification strengthens the transducer signals so that they match the input range of the A/D converter [0]. c) Data Acquisition Software : The data acquisition software transforms the PC and DAQ hardware into a complete DAQ, analysis, and display system. It can be the most critical factor in obtaining reliable, high performance operation. The main advantage of it is flexibility. III. IPLEETATIO OF IIR FILTER I ATLAB Digital IIR filters are partitioned into some of the solutions lie chebyshev filters(type I and type II), Butterworth filters, elliptical filters. Chebyshev type II filter is also nown as inverse chebyshev type I. For the implementation of IIR filter we need the difference equation. Chebyshev filters are having steeper roll off. Chebyshev type I filter has more passband ripple [6]. a) Filter specification. b) Order caliculation c) Coefficient calculation. d) Structure selection. e) Simulation (optional). f) Implementation. a)filter specification Fig 2. Filter Specifications Rp = ; % amax[db] Rs = 50; % amin[db] Fs = 44; % sampling frequency fp = 5; % passband frequency fs = 8, % stopband attenuation wp = 2*fp/Fs; %normalied passband ws = 2*fs/Fs; % normalied attenuation b) Order calculation: By default it shows the order of such filter in an FDA tool. While given some particular specifications the calculation is [,Wn] = chebord(wp,ws,rp,rs); This chebyshev type I filter order is obtained as 7. c) Coefficient calculation: The coefficients are calculated as [b,a] = cheby (,Rp,Wn).(4) The filter transfer function coefficients are obtained as b = 0-3* [0.076 0.232 0.3696 0.660 0.660 0.3696 0.232 0.076]; and a= [.0000-5.552 3.764-20.0229 8.2902-0.4726 3.479-0.578]. d) Structure selection : There are three types of structures used in IIR filters. ) Direct form 2) Cascade form 3) Parallel form. The generalied transfer function of IIR filter is H ( ) = + b = 0 = a (5) 09
This transfer function is decomposed as the product of number of transfer functions in the cascade form. P( ) P ( ) P2 ( ) P2 ( ) H ( ) = =... (6) D( ) D ( ) D ( ) D ( ) 2 Such that each transfer function is the first order or the second order function. Hence the error is greatly minimied at each stage using cascade structures. 2 H + β + β2 ( ) = p. (7) 0 + α + 2 α 2 The second order filter is usually called as the bi quadratic filter or biquad filter. A biquad filter is as follows. According to given specifications the order of the filter obtained is 7. We use the cascade form structure IIR filters such that the function results in three biquad filters (second order filters) and one first order filter. 3 a4 = [.0000 -.4707 0.9420]; e) Simulation: let us tae an input signal. Input signal code in ATLAB IPUT t=0:/44000:0.005; f = 2000; f2 = 9000; y = 2*sin (2*pi*f*t) +2*sin (2*pi*f2*t); Input signal is the sum of two individual signals with different frequencies 2 KH and 9 KH. Output code of ATLAB is as follows [9]. OUTPUT yy = filter (b, a*g4, y); yy2 = filter (b2, a2*g4, yy); yy3 = filter (b3, a3*g4, yy2); yy4 = filter (b4, a4*g4, yy3); Fig 3. Second order (Biquad) filter atlab code to modify b,a values into second order sections is [sos,g] = tf2sos(b,a); Constant g is distributed among the sections as g 4 =g^0.25. Where g is g =.7600*0-5 b and a values are obtained as follows b = [.000.0090 0]; a = [.0000-0.8577 0]; b2 = [.0000 2.03.03]; a2 = [.0000 -.6545 0.7642]; b3 = [.0000.9960 0.996]; a3 = [.0000 -.5320 0.8396]; b4 = [.0000.9837 0.9838]; f)implementation : Depending on these caliculations IIR filter program is developed in VHDL [4] language and is dumped inti an FPGA(Field Programmable Gate Array) using VHDL (Very High Speed Integrated Circuit Hardware Description Language) on Xilinx ISE(Integrated Software Environment) platform. IV. APPLICATIO OF IIR FILTER USIG VIRTEX-6 The underwater acoustic signals are to be filtered. A real time signal is captured and is converted into an electrical signal. The filtering is to be done in VIRTEX-6 FPGA using VHDL language [], [2]. The input signal is converted in a 32 bit data. The hexadecimal multiplication addition and subtraction are done in VHDL using CORE GEERATORS. These reduce the precision while multiplication, addition and subtraction. The captured real time signal is observed and is between 2 to 25 H frequency. A this particular band of frequencies 2 H to 25h a band-pass chebyshev filter is used to filter the input acoustic signal. Order of the filter is measured by FDA tool in ATLAB. At these particular ranges order of the filter obtained is 4. 0
c) Virtex-6 FPGA Input and Output Fig 4. Filter order calculation in ATLAB According to these specifications the filter coefficients are measured in ATLAB and the same are used in VHDL for simulation. Fig 8. Virtex-6 FPGA result d) Resource utiliation in Spartan-6 and Vitex- 6 FPGAs V. ADVATAGES OF VIRTEX-6 FPGA Virtex-6 FPGA meets the target easily. It stays within power budget without sacrificing the performance. It optimies the power, bandwidth and cost. Vitex-6 family FPGAs are easy to use relatively is operated on high speed connectivity technologies. VI. RESULTS a) Sum of two sinusoidal signals is given as input of IIR chebyshev type I filter. The output obtained is a pure sine wave. Spartan-6 Virtex-6 e) atlab and Virtex-6 FPGA output comparision Fig 6. Chebeshev filter result in ATLAB b) Simulation results in VHDL using XILIX ISE platform. Fig 7. VHDL Simulation results The same real time signal is filtered in both ATLAB and in VIRTEX-6 FPGA. The results are observed. VII. COCLUSIO The IIR filter is implemented on VIRTEX-6 FPGA to reduce the noise of underwater acoustic signal. From the results we observed that the IIR filter greatly reduces the noise of the signal and is efficiently implemented in FPGAs. Utiliation of resources in virtex-6 board are less compared to Spartan-6 board. So the computational time is less. Chebyshev type-i band-pass filter eliminates the unwanted signal. FPGA results are cross checed with ATLAB results. By using digital filters in FPGAs the computational speed increases.
References [] Bojan Jovanović, and ilun Jevtić An approach to Digital Low-Pass IIR Filter Design IEEE Small Systems Simulation Symposium pages:6-66, February 200. [2] Winder, S., Analog and Digital Filter Design, Supertex Inc., Ipswich, 2002. [3] Ingle, V., Proais, J., Digital signal processing using ATLAB, 2e, Thomson, Boston, 2007 [4] Pedroni, V., Circuit Design with VHDL, IT Press, London, 2004. [5] Sanjit K.itra, Digital signal processing, A computer based approach, Tata cgraw-hill,998. [6] John Wiley & Sons, Inc Introduction to Digital signal Processing and Filter design, B.A. Shenoi, 2006. [7] Oppenheim, A.V., Schafer, R.W., and Buc, J.R. Discrete- Time Signal Processing, Prentice Hall, 999 [8] Louis Litwin, FIR and IIR digital filters, IEEE potentials, 2002 [9] Amos gilat, ATLAB an introduction with applications. [0] Chi-Jui Chou, Satish ohanarishnan, Joseph B. Evans, FPGA implementation of digital filters, Proc. of ICSPAT, 993. [] Xilinx system generator, basic tutorial, www.xilinx.com [2] Xilinx white paper number 23, www.xilinx.com 2