Also just a thought could it be that the peaks are too close together and thats why the function isnt working?
Yulewalk filter - Problems with cleaning spectra
6 views (last 30 days)
Show older comments
I have decided to use a yulewalk filter to clean up my spectra I would like to zone in on three peaks but I am unable to do this. When I plot my data it comes out incorrectly, what am I doing wrong?
FF44 = [A large vector of frequencies between 0 and 1]
C = [ A vector of Zeros and three 1's where the peaks lie]
NFFT = 16384 % This is what I used to create my spectrum using fft(Signal,NFFT))
then I simply use;
[B,A] = yulewalk(36,FF44,C);
[H,q]=freqz(B,A,NFFT);
figure(5)
plot(FF44,C,q/pi,abs(H),'--');
However i just get one peak and not the three that I would expect? Also I wanted to check that in order to apply this filter then to my own spectra do I simply multiply H and so
H (or abs(H)) .*SIGNAL
Any help or advice would be great
Answers (1)
Star Strider
on 22 Aug 2014
I have no idea what your spectra look like or what you want your filter frequency response to be, but if yulewalk isn’t working, why not cascade three conventional bandpass filters? After you design the filters (as transfer function or zpk representations), implement them with second-order sections to be certain they are stable.
To cascade them, feed the signal into the first filter, its output into the second, and its output to the third to produce your filtered output.
2 Comments
Star Strider
on 22 Aug 2014
I don’t have your signal or a description of the process that created it, so I’m guessing here.
Are the harmonics necessary or do you just want to filter the fundamental frequencies? If the fundamental frequencies are close together, considering them as one band for filter purposes may work. Also, three peaks close together — especially two symmetrically placed around a central frequency — could suggest a ‘modulation’ effect, with a ‘carrier’ frequency and sidebands. The demod function could be appropriate. (‘Modulation’ could also explain the other harmonics.)
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!