I have done a fourier transform of some experimental data to calculate the dominant frequency of the vibration in a flow, but I get a spike at 1000, which is from interferences. How do I ignore or filter this frequency to get the right frequency distribution?
Asked
Active
Viewed 7,333 times
1
-
1you can take a look at the answers to a [previous question on hi-pass filtering](http://stackoverflow.com/questions/5591278/high-pass-filtering-in-matlab). There is a lot of detail in them and you can simply change your pass-band from high pass to low pass to get the desired effect. – Apr 18 '11 at 15:17
-
1I would suggest designing a notch filter if you only need to remove a single frequency component – Phonon Apr 18 '11 at 15:54
1 Answers
0
The easiest approach is probably to use the Matlab function iirnotch
.
x = ; % Populate this with your input signal
fsHz = ; % Populate this with your sample rate
notchFreqHz = 1000; % The frequency you with to notch
notchWidthHz = 50; % Notch width (-3 dB bandwidth)
w0 = notchFreqHz / fsHz; % Normalized notch frequency
bw = notchWidthHz / fsHz; % Normalized bandwidth
[num,den] = iirnotch(w0, bw);
y = filter(num, den, x); % Apply the filter, y is the output signal
See Second-order IIR notch filter - MATLAB iirnotch for more details.

GrapefruitIsAwesome
- 484
- 4
- 10