How do we make sure that the magnitude response of W(e^jw) is being calculated at the same set of frequencies in W’ by the command 'freqz' at every iteration?
2 views (last 30 days)
Show older comments
For the equation in the attached file, FB(e^jw) is the Fourier transform of the feedback filter fb and W(e^jw) is the Fourier transform of adaptive filter w.
%%Feedback Path declared
fb=fir1(50,[0.2500 0.8750]); % feedback coefficients
[a1,b1]=freqz(fb,1,80000); % Frequency response of feedback path fb
%%For loop for traversing iterations
for n = 1:ITER %%ITER = length (input signal)
[a2,b2]=freqz(w,1,80000); %Frequency response of adaptive filter w
% code for computing misalignment
num1=abs(a1-a2).^2;
num2=cumtrapz(b1,num1);%numerator of misalignment eqn mentioned above
den1=abs(a1).^2;
den2=cumtrapz(b1,den1);%denominator of misalignment eqn mentioned above
MSL(n)=mean(num2./den2); % vector MSL contains misalignment values for
% every iteration
end
The MATLAB command freqz calculates the frequency response of a digital filter with zeros vector B and poles vector A as: [H, W’] = freqz (B, A, N) returns the N-point complex frequency response vector H and the N-point frequency vector W’ in radians/sample of the filter. When traversing iterations n = 1: length (input signal), FB(e^jw) remains same for every iteration because fb is defined as a fixed FIR filter. However, W(e^jw) changes for every iteration, because the adaptive filter w changes after every iteration. In order to plot the Misalignment curve, i must make sure that for every iteration, W(e^jw) is calculated at the same frequencies in frequency vector W’. Question :How do we make sure that the magnitude response of W(e^jw) is being calculated at the same set of frequencies in W’ at every iteration?
0 Comments
Answers (0)
See Also
Categories
Find more on Digital Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!