You are on page 1of 4

2010 International Conference on Signal Acquisition and Processing

A Method of FPGA Implementation for Gradient Adaptive Lattice Joint Processing Filter
Haibing Qi1,2, Jianlan Feng1, Song Sun1
(1.School of Electric and Electronic Information Engineering, Huangshi Institute of Technology, Huangshi 435003, China 2. Institute of Optoelectronics Science and Engineering, Huazhong University of Science and Technology, Wuhan 430074, China) qhbcs@yahoo.com.cn
AbstractIn this paper, the optimal parameters of sections and step is decided by the outcome of the astringency and stability of reflectance in gradient adaptive lattice filter. An adaptive gradient lattice joint processing model of 3 sections for noise cancellation was established and simulated using a variety of EDA tools in a FPGA chip. Behavior level, register transfer level and gate level simulation results show that the design method can transfer the mathematical model into circuit model efficiently, and the method is suitable for handling the complex signal processing system such as adaptive filter. Keywords-adaptive filter; gradient adaptive lattice joint processing; FPGA; design method

the order of GAL filter is merely half than that of LMS filter with the same filtering effect. Wang [5] put forward a new scheme which the prediction module of AAC decoder was realized by the adaptive lattice algorithm and FPGA hardware, and it was verified that the scheme can meet the real-time forecast coding requirements. Based on a variety of EDA development tool in EP2C5T144C6 chip, a GALJP processor circuit model of 3 sections for noise cancellation was established and simulated. Finally the configuration file (.pof) has been downloaded into the target device through download cable. II. THEORY OF GALJP FILTERING ALGORITHM As GAL filtering algorithm can decouple the input signal and noise, it can greatly increase the signal to noise of input signal through reducing the expanding of autocorrelation matrix eigenvalue. Therefore, we can constitute the GALJP filter which consists of GAL filter and LMS liner combiner, the structure of as shown in Fig. 1. The reflection coefficients in the GAL filter are renewed every operations. The decoupled backward orthogonal output signal of the GAL filter is the one of input signal of LMS filter, which tracks the real time input signal of whole system too. Then the order of LMS filter is more than one that of M section of GAL filters. Suppose the backward orthogonal sequences of GAL filter is {b0 (n), b1 (n) , bM (n)} , the corresponding error

I.

INTRODUCTION

Adaptive filtering algorithms based on gradient method are widely used in the detection technology of optoelectronic signal. However, the non-stationary circumstance may bring about the optimum value vector of gradient filter such as transversal least mean square (LMS) changing as the nonstationary correlation matrix of input signal [1]. As the nonsensitive characteristic to covariance matrix eigenvalue of input signal, the gradient adaptive lattice (GAL) filtering algorithm exhibits the advantages of rapid astringency and excellent numeric character [2]. Recently we have investigated the performance of gradient adaptive lattice joint processing (GALJP) filter, which consists of the GAL filter and transversal LMS linear combiner, and the tracking ability and convergence stability of GALJP filter are proved to be superior to that of the transversal LMS algorithm [3]. Reconfigurable FPGAs with large capacity and high speed have a unique advantage in the digital signal processing field, especially for handling complex algorithm and single task. As the weight coefficients of adaptive filter are need to be updated after each operation, the implementation of adaptive filters based on FPGA has attracted many people engaged in the research of this field. However, on account of the complex structure and fuzzy program, the hardware realization of GALJP filters even GAL filters were reported with little. Hevey [4] designed a linear quadratic optimal controller with GAL algorithm filter on a DSP processor, the experimental results showed that the performance of controller exceeded than that of LMS filter under the circumstance of broadband and stationary noise, and the performance of two kind of algorithm have no great difference on the condition of narrowband and harmonic, but
978-0-7695-3960-7/10 $26.00 2010 IEEE DOI 10.1109/ICSAP.2010.46 259

signal of LMS filter {e0 (n), e1 (n),

, eM (n)} is used to adjust

the weight coefficient {W0 (n), W1 (n), ,WM (n)} respectively, then the two groups of adaptive coefficients are adopted to estimate the desired signal d (n) accurately and efficiently according to the principle of minimum mean square in the LMS linear combiner. In the applications of adaptive noise cancellation, the desired signal d (n) on the main feedback path represents the superposition of useful signal and noise signal n0. The reference path of the system received the reference signal x(n) related to the noise signal n0. After the system comes to convergent, the error output {e0 (n), e1 (n), , eM (n)} of GALJP filter is the enhancement of desired signal d (n) .
f b Assumed as K m = K m = K m , namely the forward and

the iterative process, whereas is immovability when the adaptive filter works stable. Therefore we can get the iterative step and section numbers through the outcome of the astringency and stability of reflectance.
M yi ( n) = wi (n)bi (n) i =0 ei (n) = d ( n) y0 (n) ei (n) = ei 1 (n) yi (n), i = 1, 2, M w ( n + 1) = w (n) + 2 ei ( n)bi ( n)

(3)

III.

MODELING AND SIMULATION OF GALJP FILTER

Fig. 1 Schemtic structure of GALJP filter

backward reflectance coefficient of GAL algorithm in mth section of the lattice filter is equal, as shows in Fig. 1. In the case of stationary circumstance signal the equation of feedback operation in the mth section between (n+1)th and nth iterative operation can be described as f m (n + 1) = f m 1 (n + 1) + K m (n + 1)bm 1 (n)
bm (n + 1) = bm 1 (n) + K m ( n + 1) f m 1 (n + 1)
(1)

f 0 (n) = b0 (n) = x(n) where f m (n + 1) and bm (n + 1) is the prediction error sequence of forward and backward respectively; K m (n + 1) is the reflection coefficient; m = 1,2, , M is the
section(order) of lattice filter; n is x(n) is the input digital signal. The optimum reflection coefficient of the mth section can be obtained by minimizing the cost function of gradient algorithm 2 m (n + 1) = E[ f m2 (n + 1)] + E[bm (n + 1)] (2)
2 2 where E[ f m (n + 1)] and E[bm (n + 1)] are the forward and backward prediction error power respectively, (n ) denotes the step factor for the estimate of reflection coefficients, we must choose it appropriately to satisfy the equation (2) to be convergent. In the other word, the coefficient value of forward and backward error power must less than 1 [6]. Usually the parameter of ( n ) should be normalized with the prediction error covariance value of the (m-1)th section. As the performance of lattice filtering algorithm mainly depend on the reflection coefficient K m of each section, the

Very efficient methods have been developed for the implementation of digital filters in FPGAs or VLSI. After we have got the optimum adaptive coefficients including order number M and step factors ( n) and from the simulation of algorithm, the mathematical modal can be transformed directly into circuit modal through some EDA tools such as DSP Builder software which links Simulink software and the function module of FPGA. The design process of this method need to be completed three stages simulation including behavior level, register transfer level and gate level, and then the program can be downloaded to the FPGA. The purpose of behavior level simulation is to verify the mathematical model. The register transfer level simulation can transform the .mdl file of Simulink into VHDL code and Tcl (tools command language) foot script, and then generate gate level circuit. The gate level is the basic logic gate components in FPGAs, and its simulation can check the logic function, delay and load characteristics, etc. Finally the configuration file (.pof or .sof) generated by QuartusII software is downloaded into the target device through download cable.
A. Modeling of GALJP filter GALJP filter consists of delay module, multiplication module, add and subtract module, and coefficient update module as shown in Fig.1. Then we can build up the mathematical modal of a three order GALJP filter in Simulink as for the Fig.2. After the desired signal {d (n)} access into the subsystem GAL filter, the processed

backward output signal {b(n)} of each section is transmitted into the subsystem linear combiner LMS. At the same time the reference signal {x(n)} input into the first order transversal LMS filter. The error signal {ei (n)} of LMS filter is regarded as the feedback signal of the section itself and the input signal of next section, then the error signal of last section of LMS filter is the output signal of the whole system.

optimum fixed step factor is closely correlated with iterative step and section number m. Through analysis of GAL algorithm, the prediction error powers include forward and backward tend to close to the desired signal, so the end of reflection coefficient will decline to zero. In addition the reflection coefficient in each section is all long variation in

260

(b) Fig.3. Subsystem structure of GALJP filter

In addition to the above basic modules, there are some bus control modules, which mainly used for control of data width. The AltBus module will convert float bus into fixedpoint type.
B. Behavior level simulation of GALJP filter
Fig. 2 the mathematical modal of GALJP filter

Fig.3 (a) shows the subsystem internal structure of a single GAL section, the modules main function is to update the reflection coefficient. The forward output signal f (n) and backward output signal b(n) of previous section is the backward and forward input signal of next section respectively. The module of adder (Adder, Adder1), product (Product2, Product3) and delay (Delay) is used to operation the input signal. At the meantime the module of Subtractor3 and Delay1 is used to update the reflection coefficient k (n) as Eq. (2) and corresponding simulation. f m (n)bm1 (n) and
bm (n) f m1 (n) are realized by the Product module. The module Gain plays a role to the step parameters. Fig. 3 (b) shows the subsystem internal structure of LMS linear combiner module, the product result of ue(n) and the desired signal d(n) is the input of weight coefficient in filter, Parallel Adder Subtractor1 and Delay1 modules are used to update the reflection coefficients, the renewed weight coefficient multiply the signal d(n) , then we can get the output signal yi(n).

We use the white noise which is in NoiseX-92 noise data packets as circumstance noise. The useful signal are 2FSK (frequency shift key) voice signals, the modulation frequency f1=1KHz, f2=3KHz respectively, and the sampling frequency fs = 8000Hz, the sampling points N = 2000.
2 0 -2

200

400

600

800

1000

1200

1400

1600

1800

2000

(a)
5

0 -5

200

400

600

800

1000

1200

1400

1600

1800

2000

(b)
2 0 -2

200

400

600

800

1000

1200

1400

1600

1800

2000

(c)

Fig. 4 Behavior level simulation of three sections GALIP filter (a)2FSK signal(b)desired signal(c)output signal

(a)

The section number M, the step factor ( n) and the iteration step are selected according to the principle that the absolute value of last reflection coefficient will tend to zero, while the sum of prediction error is close to the output signal with the lattice section number increasing. Through many times simulation, we can get the above coefficients through the convergence and stability of reflection coefficient [7]. At last, the corresponding parameters are selected as step factor ( n ) 0.01, iteration step 0.09, section number 3, and the LMS number 4 respectively.

261

Fig.4 (a) is the useful 2FSK signal. Fig. 4 (b) shows the useful signal mixed with White noise. Fig. 4 (c) is the output signal after GALJP filter. Compared to Fig.4 (a) we can find out the error signal is same as the useful signals after about 20 times iteration. The behavior level simulation shows that the selected parameters and the mathematical model are correct.
C. RTL level simulation of GALJP filter We can adopt the third party software such as ModelSim which is a Verilog/VHDL hybrid simulation tool based on single kernel to synthesize and simulate the program after behavior level simulation. ModelSim software is especially suitable for displaying complex signal waveform. It can bring out great convenience for the useful 2FSK signal mixed with white noise in our study. Utilizing the netlist and delay file generated by the adaptation operation through QUARTUSII, it will facilitate to RTL simulation and subsequent gate simulation through ModelSim. Fig. 5 shows the RTL simulation output waveform of three sections GALJP filter. It can be seen that the results of RTL simulation are basically identical to that of behavior simulation, and the noise in the desired signal is depressed greatly. The transformation form the mathematical modal to .HDL language is effective.

glitches can be cancelled by connecting a capacitance on the end of output.

Fig. 6 Gate level simulation of GALIP filter

IV.

CONCLUSION

As the complex structure and fuzzy program, the hardware realization of GALJP filters even GAL filters are very difficult. Based on a variety of EDA development tool, a GALJP processor circuit model of 3 sections for noise cancellation was established and simulated. Behavior level, register transfer level and gate level simulation results show that the design method can transfer the mathematical model into circuit model efficiently, and the method is suitable for handling the complex signal processing system such as adaptive filter. REFERENCES
[1] Paulo S.R. Diniz, Adaptive Filtering: Algorithms and Practical Implementation (Second Edition), Kluwer Academic Publishers, Boston, 2004. [2] K.K. Parhi, translation by H.Y. Chen, VLSI digital signal processing systems: design and implementation, Machine press, Beijing, 2004. [3] H. Qi, Analysis and application of gradient adaptive lattice filtering algorithm, International conference on computer and electrical engineering (ICCEE 2008), IEEE CS, Dec. 2008 , pp. 744~747. doi:101109/ICCEE.2008.72 [4] Stephen J. Heavy. Adaptive control using IIR lattice filters [ the degree of master paper]. Virginia: Virginia Polytechnic Institute and state university, 1998. [5] Y. Wang, T. Liu, L. Guo, An implementation of lattice adaptive filter applying in MPEG-2 AAC on FPGA, Microelectronics & Computer, vol. 21, 2004, pp.110~112. (In Chinese) [6] Z.Y. He, Adaptive signal processing, science press, Beijing, 2002. [7] H. Qi, Performance analysis of gradient adaptive lattice filtering algorithm, International Asia conference on informatics in control, automation and robotics (CAR 2009), IEEE CS, Feb. 2009 , pp. 199~202. doi:10-1109/CAR.2009.40

Fig. 5 RTL level simulation of GALIP filter

D. Gate level simulation of GALJP filter Then we can utilize software QuartusII to synthesize, compile, and adapt the .HDL file, only by doing these the configuration files .pof or .sof can be downloaded into the target device. The results of Gate simulation are basically identical to that of RTL simulation as Fig.6 shown. Due to the gate simulation consider not only the logic relation of program but also the delay of device, the output signal looks obvious glitch. The output signal cannot change with the input signal because of the device delay, then leading to the race and hazard phenomenon in the FPGA device. These

262