Professional Documents
Culture Documents
H (Z) Z bz+1 Z BZ + : % Define Sinusoidal Signal
H (Z) Z bz+1 Z BZ + : % Define Sinusoidal Signal
H (Z) Z bz+1 Z BZ + : % Define Sinusoidal Signal
z 2 +bz+ 1
z 2+ bz +2
The parameter controls the width of the notch in the filters frequency response, and can be set
as a constant. The b parameter is adjusted with the derivative of the filtered signal so that the
notch falls at the frequency of the signal.
figure
subplot(2,1,1)
plot(fest)
title(['ANF for k =' num2str(k) ' a =' num2str(a)])
xlabel('time')
ylabel('estimated frequency')
subplot(2,1,2)
plot(b)
xlabel('time')
ylabel('tuning parameter')
end
Here, we start with a pure tone and add Gaussian random noise of amplitudes
0.25,0.75, and 2 times the signal amplitude to test the performance of the filter. For
k = 0.25 and k = 0.75, the filter is fairly accurate at predicting the frequency of the
signal. For k = 2, the behavior is erratic, which we would expect since the SNR is
now less than 1.