Adaptive Filters In the Frequency Domain: Difference between revisions

From Class Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
To come up with a frequency domain example of an adaptive LMS filter, you can have an unknown transfer function in parallel with your adaptive filter, where the output of one is subtracted from the other creating an error signal. This is then squared and the steepest descent method is used to find a guess to the LMS error iteratively, after every N point FFT is done and at each frequency. The step size is adjusted to be independent of the amplitude of the input. The result converges nicely. See the derivation on the photo. [[Image:Adaptive_Filter_Frequency_Domain_Approach.JPG |1024px]]
To come up with a frequency domain example of an adaptive LMS filter, you can have an unknown transfer function in parallel with your adaptive filter, where the output of one is subtracted from the other creating an error signal. This is then squared and the steepest descent method is used to find a guess to the LMS error iteratively, after every N point FFT is done and at each frequency. The step size is adjusted to be independent of the amplitude of the input. The result converges nicely. See the derivation on the photo.
[[Image:Adaptive_Filter_Frequency_Domain_Approach.JPG |1024px]]


Here is a MATLAB or octave file that demonstrates the convergence.
Here is a MATLAB or octave file that demonstrates the convergence.

Revision as of 21:08, 26 March 2012

To come up with a frequency domain example of an adaptive LMS filter, you can have an unknown transfer function in parallel with your adaptive filter, where the output of one is subtracted from the other creating an error signal. This is then squared and the steepest descent method is used to find a guess to the LMS error iteratively, after every N point FFT is done and at each frequency. The step size is adjusted to be independent of the amplitude of the input. The result converges nicely. See the derivation on the photo. Adaptive Filter Frequency Domain Approach.JPG

Here is a MATLAB or octave file that demonstrates the convergence.

% This is to test the adaptive filter done in the frequency domain.
% It is supposed to converge to an unknown transfer function, Hu.
% Algorithm developed by Rob Frohne 3/22/2012.  Available under GPL.

mu = 1
N = 32
L = 2048;
M = L*N;
e = 0;
Hu = randn(1,N); 

H = zeros(size(Hu));

x = 100*randn(1,M);

for k=1:L-1
	X = fft(x(k*N+1:(k+1)*N));
	R = Hu.*X;
	E = R-H.*X;
	H = H + mu*2*E.*conj(X)/(X*X'); % Note: The (X*X') normalizes the
	% step size with respect to the input.
	e = [e,10*log10(norm(H-Hu))];
end

plot(e)
title('Error Norm')
ylabel('dB')
xlabel('Iteration')