Which filter should I use to remove the high frequency component from this signal?

Hi,
I have a time-varing signal and I would like to figure out what is the best filter (low-pass, band-pass, high-pass) to apply in order to remove the high frequency component. I've plotted the signal vs time, and then applied fft and pwelch seperately on the signal. Here are the results:
It seems that the frequency domain doesn't give me much more information than time domain. Am I missing something here? Any hint/input would be greatly appreciated.

 Accepted Answer

What about smoothdata(). Experiment with the filter types
x = rand(1,1000)+50;
y = smoothdata(x, 'gaussian', 20);
plot(x);
figure
plot(y);
Unfiltered:
filtered:

4 Comments

Thank you very much for your quick reply. I really appreciate it.
I've got a question for you and any input would be greatly appreciated. If I recall corectly, there are 4 steps in filtering a signal, please put me right if I am wrong. 1) Detrend the signal, 2) look at the signal's power spectrum to figure out which filter I need to use, 3) creat the filter and smooth the signal, and 4) Compensate for the delay caused by the filter. The "smoothdata()" that you mentioned above, will cover steps 2-4?
Btw, I plotted "spectrogram() " to underestand what freq. does with respect to time. But I cannot interpret the results. Could you please help me with that?
smoothdata() does not consider the frequency domain spectrum of the signal. smoothdata() only considers the time-domain profile of the signal and smooth the waveform by applying a window-based filtering method on the signal. Also, it does not detrend the data. As far as the frequency domain spectrum, I don't have much hands-on experience with that, so I cannot be of much help in that regard.
Thanks for the information. It was benefitial. I appreciate your time and help.

Sign in to comment.

More Answers (0)

Asked:

on 2 May 2020

Commented:

on 5 May 2020

Community Treasure Hunt

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

Start Hunting!