Reduced Least Squares Adaptive Filter - psambit9791/jdsp GitHub Wiki
The examples provided here use a sinusoid signal mixed with Gaussian noise.
Reduced Least Squares Adaptive Filter
The parameters for this filter are as follows:
- Learning Rate (mu) ⇨ 0.5 [The learning rate to determine how fast the adaptive filter updates the filter weights]
- Initialisation Value (eps) ⇨ 0.25
- Length ⇨ 20 [Number of taps in the filter]
Code
double mu = 0.5;
double eps = 0.25;
int length = 20;
RLS filt1 = new RLS(length, mu, eps, RLS.WeightsFillMethod.ZEROS); // Initialising weights to zero
filt1.filter(desired, signal); // Weights are adapted so that the input signal can be modified to the desired signal