Filtering the data with fft
38 views (last 30 days)
Show older comments
Hello community, I hope someone would have a clear answer for me...
First, I watched this video ( https://www.youtube.com/watch?v=VFt3UVw7VrE ,Designing Digital Filters with MATLAB) about designing filter with Matlab. This video deals with FFT, and LPF, HPF etc. to delete the noise in the data.
In this video, when they FFT their signals, it is very clear that which frequency should be cut-off. See below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/818074/image.jpeg)
So motivated from this video, I plan to 1. FFT my signal, 2. Find the frequency to cut-off, 3. and get the data(or a plot) without noises.
Look at the my data. This data has 88Hz sampling frequency, and has a noise on the signal. Obvously it is a sine wave with noises, so final goal is to get the sine curve without noise, obviously.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/818079/image.png)
To eliminate the noises so I did the fft plot.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/818084/image.png)
However plot shows kind of impulses on 10.446Hz, 76.6038Hz, which is not really similar like Matlab video example. They have some bands to cut off, not the impulse.
So I want to ask;
Am I approaching in right way?
Is that the impulse making the noises?
How can I cut them off?
Thank you very much.
0 Comments
Accepted Answer
Hiro Yoshino
on 30 Nov 2021
(1) Am I approaching in right way?
It seems not.
I suppose you have ~ 90 sample points and just plot the absolute values of fft(y).
The left half of the "plot" corresponds to the negative frequency, i.e., it is just the phase that is different from the right hand side.
The two impulses correspond to the frequency of the sine wave (positive and negative).
If you have no idea about negative frequency, you should hit the book to learn the basics of FFT.
(2) Is that the impulse making the noises?
Threfore no, it is not.
What kind of noise did you add? If it were a Gaussian, the shape of it in the frequency domain is also Gaussian.
(3) How can I cut them off?
In Signal processing manner, you should apply filter(s) to it.
For simplicity, you can just remove the certain elements from the signal directly. This effectively applies a rectangle shaped filter, which causes some other side effects.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!