Affine Projection Adaptive Filter - psambit9791/jdsp GitHub Wiki
The examples provided here use a sinusoid signal mixed with Gaussian noise.
Affine Projection Adaptive Filter
The parameters for this filter are as follows:
- Order ⇨ 3 [The projection order for the filter]
- Learning Rate (mu) ⇨ 0.25 [The learning rate to determine how fast the adaptive filter updates the filter weights]
- Initial Offset Covariance (eps) ⇨ 0.001
- Length ⇨ 20 [Number of taps in the filter]
Code
int order = 3;
double mu = 0.25;
double eps = 0.001;
int length = 20;
AP filt1 = new AP(length, order, mu, eps, AP.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