Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Abstract: This paper proposes an architecture for implementing the Least Mean Square (LMS) adaptive algorithm, using a 20 bit
fixed-point arithmetic representation. The architecture length was established to 16, but it can be easily modified. This is an
advantage for large filter orders. The method can also be applied to other LMS versions. This architecture is implemented using
the NI cRIO-9104 FPGA chassis. The NI cRIO-9012 is a real-time module used for signal control and storage. Experiments were
done regarding signal to noise ratio (SNR), filter length and type of input signals. The obtained results indicate the implemented
algorithm as having high performance, while still incurring some limitations. The design is evaluated in terms of SNR, filter length
and FPGA resources.
Keywords: LMS, FPGA, SNR, real-time module, noise cancelling, filter length, step-size.
d[N-1]} represent the input of the system; d[n] is the that the filter output y[n] is as close to the speech signal as
corresponding target (Figure 1). As each input is applied to possible in some mean or average sense.
the network, the output is compared to the target. The LMS Figure 2 shows the block diagram of the LMS algorithm
algorithm (Figure 2) adjusts the coefficients of the filter so to compute only one coefficient at instant k.
that the mean square error is minimized [5]:
d[n]
−
N −1 N −1 x[n] FIR Filter y[n]+ xk wk
∑ e [ n] = N ∑ d [ n] − y [ n]
1 2 1 2
MSE = (1) Model Σ × × Σ
N n=0 n =0
e[n] µ
LMS ek z-1
where e[n] is the error signal and d[n] is the desired output Update
signal. The LMS algorithm is a gradient descent algorithm
Figure 1. Adaptive noise Figure 2. Block diagram
as it uses the gradient vector of the filter coefficients to
cancelling block diagram. of LMS.
converge on the optimal Wiener solution. The filter
coefficients are updated per iteration according to: Figure 3 shows the LMS architecture implemented in
LabVIEW FPGA to compute a 16 coefficients FIR filter.
W [n] = W [n - 1] + 2 µ ⋅ e[n] ⋅ X [n - 1] (2)
1 1
where W[n] = [w0 w1 ... wL-1]T is the coefficients vector at
time index k, X[n] = [xn xn-1 ... xn-L+1]T is the data vector of 1
the L most recent input samples and µ is the convergence
factor or step-size. This factor controls the stability and 16
the convergence rate of the adaptive algorithm [8, 9]. The
output of the LMS filter is: 16
16
Y [n] = W [n - 1]T ⋅ X [n] (3)
6
Volume 50, Number 4, 2009 ACTA TECHNICA NAPOCENSIS
Electronics and Telecommunications
________________________________________________________________________________
7
Volume 50, Number 4, 2009 ACTA TECHNICA NAPOCENSIS
Electronics and Telecommunications
________________________________________________________________________________
a) a)
b) b)
c)
Figure 5. Tracking ability on a speech signal: a) original c)
speech; b) and c) - filtered waveforms with 8 and 16 Figure 6. Spectrum analysis on a speech signal: a)
coefficients LMS filter original spectrum; b) and c) - filtered spectra with 8 and
16 coefficients LMS filter
V. CONCLUSIONS
This paper presents a hardware architecture used to REFERENCES
[1] A. Elhossini, S. Areibi, R. Dony, “An FPGA Implementation
implement the LMS adaptive algorithm for several filter
of the LMS Adaptive Filter for Audio Processing”, IEEE
lengths. The architecture is aimed for speech processing International Conference on Reconfigurable Computing and
using the NI cRIO-9104 FPGA chassis and the LabVIEW FPGA's, 2006
FPGA toolkit. [2] S. Prakash, D.V. Venkatasubramanyam, B. Krishnan, R.
The performance of the LMS algorithm implemented by Nagendra, “Compact FPGA Controller Aircraft/Aerospace
hardware is comprehensively analyzed in terms of Structures”, Proceedings of the International Conference on
convergence performance, filtered signal’s SNR, filter Aerospace Science and Technology, India, 2008
length and tracking ability. The experimental results ensure [3] E. C. Ifeachor and B. W. Jervis, Digital Signal Procesing, A
the feasibility of the high-speed FPGA architecture of the Practical Approach, Prentice Hall, 2002
[4] B. Widrow and S.D.Stearns, ”Adaptive Signal Processing”,
LMS algorithm (Table 1). The noise cancelling system is
Prentice-Hall, Englewood Cliffs, N.J., 1985.
chosen to validate the performance of LabVIEW FPGA in [5] S. Haykin, “Adaptive Filter Theory”, Fourth Edition, Prentice
signal processing applications (Table 2); FPGA Hall, Upper Saddle River, N.J., 2002
implementation will be more effective for more complex [6] E. Szopos, M. Topa, I. Dornean, R. Groza, “Adaptive LMS
digital signal processing systems. Algorithm System Identification using LabVIEW”, IEEE
Various DSP applications that use LMS adaptive FIR International Conference on Automation, Quality and Testing,
filters, like echo cancellers, channel equalizers and noise Robotics, Romania, pp.254-257, 2008.
cancellers, can be added as a software layer on top of our [7] E. Szopos, M. Topa, R. Groza, “Adaptive LMS and Pade
Algorithms in System Identification”, Applied Electronics
system, without any hardware modifications.
International Conference Pilsen, pp.219-222, 2008
The presented architecture may be further enhanced so [8] Sinead Mullins, Conor Heneghan, “Alternative Least Mean
that it has the ability to initialize the filter coefficients. This Square Adaptive Filter Architectures for Implementation on
feature may be needed for applications requiring faster FPGA”, Digital Signal Processing Group, Department of
convergence. Electronic and Electrical Engineering, University College Dublin.
[9] www.ni.com
VI. ACKNOWLEDGEMENTS [10] T. Lan, J. Zhang, “FPGA Implementation of an Adaptive
The authors deeply thank National Instruments for Noise Canceller”, IEEE International Symposiums on Information
providing support of LabVIEW FPGA hardware/software Processing, 2008
tools and for their generous guidance, support and training.