Verify the Wiener Algorithms matlab code and Ws are zeros ?
2 views (last 30 days)
Show older comments
Hello, I am new in filtering, I wrote a code for Wiener Algorithm Please verify it and pls guide me weight all Ws are zeros. Please anyone guide me Thanks in advance
% Wiener Algo
N = length(myData);
ord = 20;
x = myData;
w=zeros(1,ord);
mu =0.05;
for i=1:N
e(i) = d(i) - w(i)' * x(i);
w(i+1) = w(i);
end
for i=1:N
yd(i) = sum(w(i)' * x(i));
end
0 Comments
Accepted Answer
Honglei Chen
on 30 Oct 2013
Are you trying to run LMS algorithm? If that's the case, the code as is does not really modify the weights, w, i.e. the error signal was never put into use. But even then, you need to update the entire weights. In algorithm, w(i) refers to the entire weight vector at iteration i.
3 Comments
Honglei Chen
on 30 Oct 2013
Wiener filter has an inversion of covariance matrix. What you did here looks like its LMS implementation. You are not updating the weights right. The error signal needs to come into the picture and the entire weights need to be updated. Right now you are updating each element in the array, that's not what it means by w(i). HTH.
More 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!