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
2 次查看(过去 30 天)
显示 更早的评论
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
回答(1 个)
Star Strider
2014-8-22
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 个评论
Star Strider
2014-8-22
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.)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!