Вы находитесь на странице: 1из 5

1 | P a g e

LMS Implementation of Adaptive Volterra Filter to Compensate


for Speaker Non-Linearity
Submitted by: Pranav S Koundinya, Devanjan Maiti, Nikhil Ravishankar, Sreekar V
Mentor: Dr. S Ravishankar
Rasthriya Vidyalaya College of Engineering (RVCE), Mysore Road, Bangalore, KA-560059

Abstract:
In a scenario where the non-linear factors of the system are multiplicative in nature, non-linear
adaptive filters are used to model such a system. Many such filters exist; with Volterra series filters
being one of them. This paper describes the LMS (Least mean square) implementation of a third order,
five tap Volterra filter that has been used to successfully model the non-linearity of a speaker in an
environment with no real room impulse-response. The algorithm has been successfully tested on the
MATLAB and the Xtensa Xplorer 5.0.5 environment with almost similar results. The algorithm has
shown satisfactory performance and has been developed keeping the Xtensa HiFi2_std audio-
coprocessor as the target hardware in mind. The algorithm has a lot of scope of improvement in the
future, and better results might be obtained by introducing some modifications to our algorithm.
Architecture/design of the algorithm used:
Volterra series is a model for nonlinear behaviour, and it represents the non-linearity in the
system as a sum of linear elements. In principle it is similar to the Taylor Series, but with memory. The
linear elements in the series are time delayed samples of the input. Also known as the Volterra kernels,
the weighted sum of the kernels gives the non-linear output of the speaker.
Given below is the mathematical representation of a Volterra series:
() =
1
(
1
)
0
+
2
(
1
,
2
)(
1
)(
2
) +

2
=0

1
=0

1
=0

3
(
1
,
2
,
3
)(
1
)(
2
)(
3
) + .

(
1
,
2
.

)(

=0

2
=0

1
=0

3
=0

2
=0

1
=0

1
)(
2
) (

)
A diagrammatic representation of a 2
nd
order Volterra model is shown below.

2 | P a g e

To counter varying degrees of non-linearity, the calculation of the weights for the kernels is
done using adaptive algorithms. Least Mean Square (LMS) and Recursive Least Square (RLS) are two
such algorithms. The LMS algorithm works on the minimization of the Mean Square Error between the
speaker output and the filter output.
Our implementation employs the LMS algorithm, a description of which is given below.

1. Adaptive filter output:

() =

()()

2. Resultant error:

() = ()

()()

3. Minimizing error by LMS algorithm:

1
( +1) =

1
() + 2
1
()(
1
)

1
,

2
( + 1) =

1
,

2
() + 2
1
()(
1
)(
2
)

1 and 2 are known as convergence factors for the algorithm. These factors are instrumental in
guaranteeing the convergence of the filter coefficients. Typically 2 is a smaller value than 1 to
ensure convergence. Values of 1 and 2 are given as
0 <
1
,
2
<
1
()
<
1



R is the autocorrelation matrix of the input signal vector = [()

()].

Novel ideas and modifications:
Our implementation of the Volterra filter is based on the design proposed in [1]. It makes use
of the RLS algorithm for a third order Volterra filter implementation.
The choice of the algorithm for implementation depends on many factors. The LMS algorithm
has lesser computational complexity but requires longer time for convergence. Another deciding
factor is the stability of the output, which is dependent on the weight associated with the kernels.
Keeping the requirements in mind, the LMS algorithm is much better suited to the problem
statement under consideration, especially for a real time implementation.
LMS algorithm is more stable and for a large number of iterations, the error is significantly
reduced. The RLS algorithm has a high convergence rate but low stability. Consequently the error may
increase or decrease even after a large number of iterations. The LMS algorithm is very effective with
Gaussian input (as this makes the Volterra model orthogonal). Also, the complexity of the algorithm
makes it unsuitable for hardware implementation.
3 | P a g e

Further, the order of the filter as well as the number of taps chosen for the filter design are
two important parameters that have a significant impact on the rate of convergence, residual error
and its stability.
In our implementation, we are utilising a third order Volterra filter. The design in [1] proposes
a third order filter. However, owing to the uniformly distributed nature of the input samples, the effect
of the higher order elements is ignored. Uniformly distributed samples is not an appropriate
representation of typical input audio signals. Consequently our design does not restrict the input
samples to uniform distribution. Also, the Xtensa hardware is capable of supporting computational
requirements of a third order Volterra filter.
Greater the number of taps in a tapped delay line, better is the accuracy of the non-linear
output of the Volterra filter. However, it must be kept in mind that the effect of the effect of the initial
taps is more than the effect of the subsequent taps in the output. Indiscriminately increasing the
number of taps increases the computational complexity of the filter as well. Our proposed filter design
uses five taps to model the non-linear output of the speaker.
Test strategy:
The data that has been used in our code has been provided using text (.txt) files. Since, our
implementation involves tests with various types of input samples, these samples have been
generated using standard MATLAB functions and then put in the .txt file for testing on the Xplorer
5.0.5 environment.
The digital representation of the speaker output has been taken to be in the form
z = (x + bx^2 + cx^3)/(1 + |b| + |c|)
The model of the surroundings and its effects plays an important part of the test strategy. The
surroundings of the speaker signal have been assumed to be negligible. Hence no form of real room-
impulse-response is considered and the speaker signal that feeds back to the microphone is
considered to be only attenuated by 15dB.
The audio samples have been considered to be sampled at a rate of 16 kHz, and each sample
has a size of 16 bits. Non-linear distortion in the speaker output is up to 10% of the linear component
of the output.

The effect of noise is up to 1% of the feedback signal from the speaker.

The weights for the higher order elements were chosen after extensive trials of the algorithm
for optimal performance. The convergence factors for the algorithm have also been chosen
experimentally and adhere to the restrictions on them to obtain optimal outputs.
We designed our code keeping the target hardware in the simulation environment as the
HiFi2_std, since it is an audio co - processor and we have designed a sound based model. The code has
been tested on both the MATLAB as well as the Xplorer 5.0.5 environments successfully. Input samples
with Normal, Uniform as well as Laplacian distributions have been tested on both the environments.
The results obtained are as shown below:

4 | P a g e

MATLAB Outputs:

1. Laplacian Distribution 2. Normal Distribution

3. Uniform Distribution
Xplorer 5.0.5 Outputs:

1. Laplacian Distribution 2. Normal Distribution

3. Uniform Distribution
5 | P a g e


Conclusion:
Our algorithm has been successfully tested and verified for desired results on the Xplorer 5.0.5
environment.
There is a lot of scope for improving our algorithm from the convergence time and the efficiency
perspective. Our implementation of the Volterra filter uses a step-size that has been determined
experimentally. Calculating the step-size adaptively can also ensure better and more efficient
performance of the filter. We can even orthogonalize the model that we have developed using the
Gramm Schmidt method or Weiner series with some orthonormal basis, which will make it work for
any sort of input. These modifications might produce significant improvements over the existing model
that we have designed.
References:
[1] Georgeta Budura and Corina Botoca, Efficient Implementation of the Third Order RLS Adaptive
Volterra Filter, FACTA UNIVERSITATIS (NIS) SER.: ELEC. ENERG. vol. 19, no. 1, April 2006.

[2] Paulo S. R. Diniz, Adaptive Filtering, 3ed., Springer, 2008. (ISBN 0387312749)

[3] Taiho Koh and Edward J. Powers, Second-Order Volterra Filtering and Its Application to
Nonlinear System Identification, IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL
PROCESSING, VOL. ASSP-33, NO. 6,December 1985.

Appendix:

Link to the source code:

https://github.com/DevanjanMaiti/LMS_Volterra_filter