This is the MATLAB implementation of the Variable Forgetting Factor Recursive Least-Squares (VFF-RLS) algorithm, as described in the paper:
A Robust Variable Forgetting Factor Recursive Least-Squares Algorithm for System Identification by Constantin Paleologu, Jacob Benesty, and Silviu Ciochină.
The project reproduces the results of the paper, demonstrating the performance of the VFF-RLS algorithm in system identification tasks, particularly in the presence of noise and abrupt system changes.
This project is part of the course Adaptive Learning, Estimation And Supervision Of Dynamical Systems in the master's degree program in Computer Engineering.
Course Overview: During the Adaptive Learning, Estimation, And Supervision Of Dynamical Systems course, we dived into many topics like:
- Recursive and Adaptive Estimation
- Closed-Loop Identification
- Subspace Identification
- Supervision and Diagnosis
This project aims to study and reproduce the results of the paper mentioned above, which is related to Recursive and Adaptive Estimation.
The goal of this project is to implement and evaluate the VFF-RLS algorithm for system identification. The algorithm improves upon the classical Recursive Least-Squares (RLS) method by dynamically adjusting the forgetting factor λ based on the system noise and error signal. This allows for better tracking of system changes and improved robustness to noise.
Key features of the project:
- Implementation of both RLS and VFF-RLS algorithms.
- Simulation of system identification with white Gaussian noise (GWN) and AR(1) process input signals.
- Introduction of abrupt system changes to test tracking capabilities.
- Visualization of results, including misalignment, forgetting factor evolution, and condition number.
The problem addressed in this project is system identification in the presence of noise. The goal is to estimate the impulse response of an unknown system using an adaptive filter. The system is modeled as a FIR filter with an impulse response h, and the output is corrupted by additive noise.
-
Input Signal:
$$\mathbf{x}(n)$$ (white Gaussian noise or AR(1) process). -
Output Signal:
$$y(n) = \mathbf{h}^T \mathbf{x}(n) + v(n)$$ where:$$\mathbf{x}(n) = [x(n), x(n-1), \dots, x(n-M+1)]^T \text{ is the input vector.} \quad v(n) \text{ is additive white Gaussian noise.}$$
$$\text{Noise } v(n) \text{ corrupts the output.}$$ - Trade-off between tracking speed and stability in adaptive filtering.
- Classical RLS algorithm with a fixed forgetting factor λ.
- Provides a baseline for comparison with VFF-RLS.
- Forgetting factor
$$λ(n)$$ is adjusted dynamically based on the system noise and error signal. - Ensures fast tracking during system changes and low misadjustment in steady-state.
- Key equations:
$$\lambda(n) = \min\left(\frac{\sigma_q(n) \sigma_v}{\sigma_e(n) - \sigma_v}, \lambda_{\text{max}}\right)$$ where$$\sigma_e(n)$$ ,$$\sigma_q(n)$$ , and$$\sigma_v$$ are power estimates.
The project is implemented in MATLAB. The main script (main.m) performs the following steps:
- Generates input signals (white Gaussian noise and AR(1) process).
- Simulates the unknown system using a FIR filter.
- Adds noise to the output to create the desired signal.
- Implements RLS and VFF-RLS algorithms to estimate the system impulse response.
- Plots the results, including misalignment, forgetting factor evolution.
main.m: Main script for running simulations and generating results.rls_function.m: Implementation of the RLS algorithm.vff_rls_function.m: Implementation of the VFF-RLS algorithm.
The results demonstrate the performance of the VFF-RLS algorithm compared to the classical RLS method. Key observations:
- Misalignment: VFF-RLS achieves lower misalignment and faster convergence.
- Forgetting Factor: λ(n) adapts dynamically to system changes.
- Condition Number: The algorithm maintains numerical stability.
- Misalignment Comparison: RLS vs VFF-RLS for white Gaussian noise and AR(1) process inputs.
- Evolution of Forgetting Factor: λ(n) over iterations.

