1. Introduction
Adaptive algorithms are employed in system identification configurations, such as acoustic echo cancellation (AEC) setups, in order to continuously track acoustic impulse responses and estimate their corresponding outputs [
1,
2]. An acoustic echo causes the speaker to hear a delayed replica of their own voice, which is caused by acoustic reflections created in the environment in which the other interlocutors are located.
Least-mean-square (LMS) adaptive methods are strongly preferred for hardware implementation in the industry, due to their reduced associated computational costs [
3,
4,
5]. However, they offer poor performance when working with highly correlated input signals, such as in the case of speech. Consequently, a lot of research resources are invested in other types of adaptive algorithms, which are more capable of mitigating the statistical properties of the input signals.
Least-squares (LS) methods represent an attractive alternative to LMS, due to their abilities to “decorrelate” the input signals and achieve superior tracking speeds [
1,
6,
7,
8,
9]. For example, the exponentially weighted recursive least-squares (RLS) algorithm based on Woodbury’s inversion lemma is often employed as a reference in research works, and it can outperform the popular normalized LMS (NLMS) algorithm in terms of tracking speed and steady-state accuracy. The memory of RLS adaptive algorithms is adjusted using their main parameter, the
forgetting factor , which is usually chosen as a fixed value in the numerical interval
[
1,
4,
10]. As the name would suggest, when
has a lower value, the memory of the RLS is reduced, and it has the benefit of adapting faster to potential changes in the unknown system. When
is closer to 1, the memory of the algorithm favors the accuracy at steady-state, when no relevant changes happen in the unknown impulse response. In the standard approach, a compromise is made between the two capabilities through the choice of a fixed value of
.
Many RLS variants have several flaws, which make them prohibitive in practice. They manifest occasional numerical stability issues and have high computational requirements for hardware implementations (the corresponding arithmetic complexity is proportional to the square of the adaptive filter’s length). Consequently, an important part of the mentioned research effort is invested in alternative versions of the RLS, which can preserve the performances associated with the Woodbury RLS approach. Such is the case of exponentially weighted RLS methods combined with line search methods (LSMs) [
6,
8,
11]. The RLS-LSM approach employs an alternative solution for the classical associated matrix inversion problem and is designed to favor iterative methods, which exploit the statistical properties of the input signals.
In this paper, the forgetting factor is analyzed as a variable value for the combination between the RLS and the conjugate gradient (CG) LSM [
12,
13]. The purpose is to present a method for adjusting
depending on the circumstances in which the adaptive system is working. If the tracking capabilities of RLS-CG need to be increased, the value of
is set to a lower value. Vice versa, at steady-state, the value of
is expected to increase and be closer to the value 1. The proposed solution requires no extra adjustment of other parameters or control mechanisms, as in the cases of other similar methods, which are difficult to apply in real-world scenarios [
14,
15,
16,
17,
18,
19,
20,
21].
Section 2 of this paper comprises a general presentation of RLS-LSM adaptive algorithms. In
Section 3, the value of
is theoretically developed as a function of the discrete time index
n [i.e., as
] in order to match the general criteria mentioned above. The proposed variable forgetting factor (VFF) approach [
22] is applied to RLS-CG in
Section 4, while the simulation results are presented in
Section 5, in order to validate the VFF-RLS-CG adaptive algorithm. These simulation results are shown for AEC scenarios using different types of input signals and tracking scenarios. Conclusions are described in
Section 6 with respect to the theoretical information, simulation results, and the implications for hardware applications.
2. RLS Algorithm with Line Search Methods
In the system identification process for AEC scenarios, the adaptive filter’s purpose is to estimate the unknown system defined by an impulse response vector
of length
L. The
reference (or microphone) signal is obtained as
where
is a buffer vector containing the most recent
L samples of the input signal, the superscript
T denotes the transposition, and
is a zero-mean additive noise signal corrupting the output
of the system [
1,
4]. The noise is considered to be uncorrelated with the samples comprising
. The a priori error signal is defined as the following difference:
where
is the reference (i.e., microphone) signal, and
is the set of coefficients used to estimate the unknown impulse response
. The LS approach for estimating
is associated with the minimization of the cost function:
where
controls the memory of the algorithm and is called the forgetting factor. Minimizing the cost function leads to the following system of linear equations:
where
is the estimated
positive definite covariance matrix associated with the samples of the input signal
, and
is the
cross-correlation vector between the samples of
and
[
1,
2,
6]. The
known quantities in (
4) are
and
, which can be recursively updated using
as
In order to avoid applying direct solutions for solving the system in (
4), the associated expression can be reinterpreted in order to solve an auxiliary system of equations [
6,
23]. New notations are introduced to track the variations in the covariance matrix
and the cross-correlation vector
from consecutive time indices:
where
is an
matrix, and
is an
L-valued vector. Moreover, the variation in the filter’s coefficients between consecutive time indices is denoted using the
vector:
The new purpose is to replace the direct determination of the estimate
with the computation of the estimate
, which is called the
solution vector. By considering that at time index
n, the estimate
is already known, the expression in (
9) can be used in (
4) to obtain
where the
residual component is defined as
The system of equations in (
10) is the new problem, which requires a solution in order to perform the adaptive filter update [
7,
8]. After
is determined, the column vector of filter coefficients can be updated, yielding
as
Solving (
10) is equivalent to finding the global minimum of the quadratic function
by computing its gradient and setting it equal to zero [
7]. The concept of the
residual vector is also used as
which is computed at the end of the adaptive filter’s iteration. The residual vector can be seen as an error measure regarding the accuracy of the adaptive filter at time index
n and is part of the adaptation process at the next time index. Moreover, the residual component can be recursively expressed using (
7) and (
8), then (
14), in (
11), in order to obtain
where it can be noticed that the update for
can be performed with the most recent input samples, the error signal, and the residual vector from the previous time index [
6].
The framework based on the described auxiliary system of equations is summarized in
Table 1. The constant
multiplied by the
identity matrix
is used for the initialization of
and ensures the non-singular property of the matrix in the initial stages of the algorithm. The vectors
and
are initialized using zero-valued
column vectors (
). The algorithm is suitable for using LSMs, which perform two roles: they compute the estimate
and provide an updated version of the residual vector
(step 6). The RLS-LSM combination can exploit the properties of the input signals and does not manifest the numerical stability issues specific to the RLS based on Woodbury’s identity.
3. Variable Forgetting Factor for RLS-LSM Algorithms
In most RLS versions, the forgetting factor is chosen as a constant with the following form:
where the constant
K is usually chosen as a non-zero natural number [
22]. Considering that an adaptive filter for AEC scenarios can perform the update of thousands of coefficients, the possibility of dynamically improving the adaptation energy in tracking intervals, with respect to increasing the accuracy level in steady-state intervals, can allow for a customized behavior of the RLS in accordance with the environmental conditions. The purpose of the VFF approach is to define a mechanism for adjusting
in order to obtain a good balance between tracking capabilities and accuracy at steady-state, depending on the most important requirement at the moment of the computation [
22]. Different VFF-based techniques can be found in the literature, in the framework of various applications, e.g., see [
21,
24,
25,
26,
27,
28,
29] and the references therein. Nevertheless, most of the existing VFF-RLS algorithms require extra tuning parameters related to the evaluation of their forgetting factors and/or additional decision mechanisms (e.g., threshold-based), which are not easy to handle in practice, especially in real-time applications.
The development of the expression for
takes into consideration the basic RLS algorithm, which determines the error signal in (
2) and updates the filter coefficients (with an arithmetic complexity proportional to the cube of
L) as
Considering that the RLS-LSM family of adaptive methods is designed to achieve the performances of the basic RLS, the following considerations can be applied to the former method, just as in the case of the latter.
The a posteriori error can be expressed after each update of the filter coefficients as
which can also be written using (
2) and (
17)
then rewritten considering the form of the reference signal in (
1) as
In an ideal situation, the a posteriori error is equal to the noise influencing the microphone signal, i.e.,
. The condition was replaced in [
22] by
where
expresses the mathematical expectation, and
is the noise power, which is considered to be constant.
In order to develop (
21), several approximations will be employed considering the statistical properties of the input signal. Firstly, the covariance matrix is considered to be close to a diagonal matrix so that we can write
where
is the variance in the input signal. This represents a key approximation for the upcoming development. Indeed, this assumption holds especially for white Gaussian signals or mild correlated inputs, when the covariance matrix is close to a diagonal one. The reason behind using this approximation is basically twofold: (A) It allows for an important simplification of the development related to the VFF design, which results in a practical and easy way to handle the formula for the time-dependent forgetting factor. (B) Even for highly correlated input signals (like speech), when this assumption is biased, the resulting RLS-type algorithm still uses the full estimate of the covariance matrix based on (
5) so that information about the true character of the input signal is still available. This aspect will also be supported in
Section 5, in terms of the simulation results, showing that the proposed VFF-type algorithm obtains good performance for various inputs, including highly correlated ones (e.g., autoregressive processes with a pole very close to 1 and speech sequences).
Secondly, after the algorithm has run for a reasonable amount of time (i.e., for
n large enough), the covariance matrix can be expressed as
By also taking into consideration that
, we can write
The approximations can be used to rewrite
by using (
23), then (
24), in (
19), and we obtain
Consequently, when squaring (
20) and applying the mathematical expectation operator, the condition in (
21) is transformed into
where
.
The process of developing a variable
can be considered equivalent to rewriting the expression in (
16) as
where the variable form
can be expressed as
. Thus, the variable
can also be written as
The form in (
28) and the developed condition in (
26) lead to the following quadratic equation:
where
is considered the unknown quantity. The corresponding valid solution is
where
can be recursively determined using the exponential window
with
. In practice, the value of
can be chosen as (or similar to)
[
30].
It can be noticed that when the algorithm converges (i.e., it is at steady-state), the values of
and
become similar, and the value of
becomes closer to 1. Otherwise,
increases considerably with respect to
, the value of the forgetting factor decreases, and it favors an RLS behavior with smaller memory, suitable for tracking intervals. Although the value of
should always be positive subunitary, the corresponding expression can be written to avoid potential numerical issues as
where
is a very small positive number employed to avoid division by zero.
Finally, the VFF-RLS-LSM adaptive algorithm is described in
Table 2, with the corresponding arithmetic costs in terms of multiplications and divisions for each step of the adaptive filter iteration
n. The most costly steps are the ones performing operations with vectors, as they require amounts of multiplications proportional to
L. The computational complexity associated with step 9 depends on the employed LSM and cannot be specified in this generic form. The VFF portion of the algorithm is developed from (
21) and is applied to the RLS-LSM general algorithm (steps 4 to 8). It requires a single division for step 5. For step 6, it was considered that the length of the adaptive filter is employed as a power of 2, and the corresponding division can be replaced by a bit-shift. This methodology is remarkable given the fact that it can be applied to RLS-based algorithms without following the conventional RLS version based on the matrix inversion lemma. It relies on assumptions made on the statistical properties of the input signal, which also impact the covariance matrix. However, the algorithm is expected to maintain good convergence and accuracy features even with strongly correlated signals, such as speech. The simulation results presented in this paper will demonstrate the validity of the theoretical model using the CG LSM for solving the auxiliary system of equations in (
10).
4. VFF-RLS-CG
The CG iterative method can be employed in VFF-RLS-LSM to generate a solution for the system in (
10) (i.e., at step 9 in
Table 2). Similarly to other LSMs, it generates the solution vector
and the residual vector
. The RLS-CG combination can achieve performances comparable to the RLS based on Woodbury’s identity, with similar arithmetic complexity and without manifesting numerical stability issues. The former will be used as a benchmark for its VFF counterpart. The steps of the CG method are described in
Table 3. For simplicity and fluency, the time index
n is dropped in some places. Information regarding arithmetic complexity was also added, with respect to the numbers of multiplications and divisions for each step of the CG iterations. It can be noticed that steps 2 and 4 perform multiplications with the entire covariance matrix and require amounts of such operations proportional to the square of the adaptive filter’s length. Thus, the overall complexity of the RLS-CG is set to a value proportional to
. Moreover, a division is required for every value of
, and another one is employed for the computation of the term
.
The CG generates successive approximations for the solution vector
by exploiting the A-conjugacy property [
6]. Two vectors
and
,
, are said to be A-conjugate if
and
is a symmetric and positive definite matrix (as is the case for the covariance matrix). The minimum of the quadratic function can be obtained by adding a single A-conjugated vector, with respect to all the previous ones, at every new iteration. Each new iteration is considered to bring the estimate
closer to the ideal solution.
The algorithm starts by initializing with a zero-valued vector. Then it sets the residual vector as the value of . For the rest of the iterations, the solution vector is not zero-valued as in the initialization stage, and the values comprising the residual vector are determined as the difference between and .
In step 1, the new form of the vector
can be seen as a direction vector that needs to go through a process similar to the Gramm–Schmidt method, in order to ensure it is A-conjugated to all the previous
directions. The direction vector is also multiplied by the term
calculated at step 2, which scales the estimate
in the direction of minimizing the function in (
13). The update of the solution vector is then performed in step 3, and the residual vector is also changed (step 4) to reflect the new form of
. The parameter
controls the number of conjugate directions contained in the set of vectors. The overall arithmetic complexity of RLS-CG is proportional to the square of the adaptive filter’s length, which is similar to the RLS based on Woodbury’s method. Moreover, the extra operations necessary for the VFF portion of the algorithm are the same when being employed for any RLS variant, such as RLS-LSMs or the RLS based on the matrix inversion lemma.
5. Simulation Results
Simulations are performed in the AEC context in order to validate the theoretical content. Several scenarios are studied using various types of input signals and different real-world unknown acoustic impulse responses decimated in order to obtain the corresponding desired lengths, which are changed between scenarios.
The proposed VFF-RLS-CG algorithm is compared to RLS-CG variants using fixed values for the forgetting factor and
, which is enough to match the performances of the RLS based on the matrix inversion lemma. The initial convergence of the adaptive methods is not illustrated as it is not considered relevant [
8]. The criterion for evaluating the performance of the adaptive algorithms is the normalized misalignment, which is measured in dB as
where
denotes the Euclidean norm.
For all simulations, the echo-to-noise ratio (ENR) is experimentally set to 20 dB, and the unknown impulse responses are changed one or two times per scenario in order to evaluate the tracking capabilities of the adaptive algorithms. The variance in the noise signal, , is considered known for VFF-RLS-CG unless otherwise specified.
In the first scenario (
Figure 1), the input signal is Gaussian noise, and the length of the echo path is set to
. Considering (
16), the RLS-CG with
is simulated as a reference method with high tracking capabilities. The echo path is changed after 10 s of simulation by switching the sign of all the corresponding coefficients.
It can be noticed that VFF-RLS-CG matches the tracking of RLS-CG with when the echo path changes. Moreover, at steady-state, the former adjusts the variable forgetting factor to increase its accuracy. The performances of the RLS-CG with are also added to the graphic in order to demonstrate the compromise made when the algorithm has a forgetting factor chosen to match the performances of VFF-RLS-CG at steady-state. When the tracking situation occurs, the RLS-CG with identifies the new impulse response much slower than the RLS-CG with , namely VFF-RLS-CG. The scenario shows that a constant value for cannot ensure the maximum efficiency for tracking and steady-state accuracy at the same time.
A tracking scenario is also simulated using (as input signal) a Gaussian noise filtered through an autoregressive system with a single pole [AR(1)] with the value
. The length of the echo path is set to
, and a tracking situation is obtained by shifting its coefficients by 25 positions at time index 24 s. VFF-RLS-CG is again compared with the RLS-CG with
, with respect to an RLS-CG variant matching VFF-RLS-CG accuracy at steady-state (
). The results in
Figure 2 show that the VFF reproduces the desired behavior of its counterparts without manifesting their weaknesses. When the unknown impulse response changes, the value of
decreases, and the tracking capabilities increase to match the performances of the RLS-CG with the lower forgetting factor value. Moreover, at steady-state, VFF-RLS-CG increases the value of
to ensure improved accuracy. The classical compromise made when choosing the constant value of
is eliminated. The proposed algorithm demonstrates the mentioned performances despite working with a highly correlated input signal (see the approximation employed in
Section 3).
In the third experiment, the correlation properties of the input signal are further considered by employing a speech sequence, which is also non-stationary [
31]. The length of the unknown system is set to a value closer to that in scenarios associated with real-world acoustic applications (
). The unknown system is changed twice by using both methods employed in the previous simulations. Tracking is expected to be more challenging for any adaptive algorithm performing AEC.
Furthermore, in order to demonstrate the practical value of VFF-RLS-CG, the variance in the noise signal,
, is estimated in real time using an exponential window similar to (
31) by determining
as
with
ensuring that the value of
is estimated using a longer exponential window, with respect to the case of
[
22,
30]. The corresponding results are displayed in
Figure 3, while the evolution of the forgetting factor associated with VFF-RLS-CG is shown in
Figure 4. Additionally, the variation in the condition number corresponding to the covariance matrix
is depicted in
Figure 5, showing a stable behavior [
32].
It can be noticed that VFF-RLS-CG can match the tracking performances of the RLS-CG variant with reduced memory and the steady-state accuracy of the RLS-CG with the higher memory set through a higher value of
. The evolution of the variable
shown in
Figure 4 indicates the corresponding values decreasing in the intervals in which the tracking should be optimized. When convergence is achieved, the values of
oscillate closer to the value 1. In this context, we should outline that the additional control of
from Equation (
32) avoids numerical issues (which should be considered in practical implementations), while it could disrupt the continuity of the solution. Nevertheless, this truncation does not affect the algorithm’s performance, as indicated in
Figure 4. As can be noticed, the lower limit (zero) is never reached, while the upper bound (one) is used for a short period of time, especially after the system changes (i.e., for tracking situations). However, using the maximum value of the forgetting factor does not affect but it rather favors the stability of the algorithm, which is a well-known conclusion reported in many convergence analyses of RLS-type algorithms [
1,
4,
5].
The previous experiment was repeated in
Figure 6 for ENR = 10 dB. Similar conclusions can be outlined. The RLS-CG variant with low (constant)
demonstrates poor performances, while the version with the higher constant forgetting factor demonstrates good accuracy at steady-state, with degradation in terms of tracking. However, VFF-RLS-CG demonstrates high tracking capabilities and the capacity to adjust its
in order to attain accurate steady-state performances.