Yulewalk filter - Problems with cleaning spectra

5 次查看(过去 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 个评论
Bran
Bran 2014-8-21
Also just a thought could it be that the peaks are too close together and thats why the function isnt working?

请先登录,再进行评论。

回答(1 个)

Star Strider
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 个评论
Bran
Bran 2014-8-22
Hi there well my spectra is pretty complex, lots of harmonics. The three peaks I am thinking of are quite close together. When I looked at the yulewalk filter it simply zoned in on one peak? Thats why I was thinking perhaps they are too close together. Well originally I was using this approach, three filters however, I will soon be zoning in on some twenty peaks or more as I am trying to find out which need to be included and which do not. And so I need something a bit more practical but thank you so much for the suggestion! It really will help me understand what's going on
Star Strider
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 CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by