Peak coming at 50Hz in every data file. How to get rid of that
1 view (last 30 days)
Show older comments
I have amplitude and time data with me. After doing FFT of the data I plot amplitude vs frequency graph and after calculating power I plotted power vs frequency graph but everytime in my graph there is a peak at 50hz. and it comes in every data file. Please help me how to get rid of that. I have attached pictures of graph for your reference
1 Comment
Mathieu NOE
on 3 Jun 2024
you probably have a signal pollution coming from the main supply
you either need a better supply, a better galvanic isolation or use in last option a notch filter centered at 50 Hz
Answers (2)
Image Analyst
on 3 Jun 2024
Find out what index the 50 Hz spike is in and zero it out. Something like
f = fft(signal)
[peakSignal, indexOfMax] = max(f)
f(indexOfMax) = 0;
% Back to time domain
signal = ifft(f);
That would be if the peak is always at 50 Hz. If it's not, then identify the 50 Hz index some other way.
Maybe use a lock-in amplifier to extract your signal -- separate it from the 50 Hz signal it's riding on or affecting it.
0 Comments
Star Strider
on 3 Jun 2024
Fs = ...; % Sampling Frequency (Hz)
signal_filt = bandstop(signal, [48 52], Fs, 'ImpulseResponse','iir'); % Filter Signals
If all the signals have the same sampling frequency and length, you can combine them all column-wise in ‘signal’ and filter them all at once. Note that this will almost completely zero-out that frequency, so the signal in ‘Picture1’ (that is vanishingly small) might have to be interpolated (perhaps using the fillmissing function) to correct for that. It would be easier to illustrate this with your actual signals.
jpgs = dir('*.jpg');
for k = 1:numel(jpgs)
figure
imshow(imread(jpgs(k).name))
title(jpgs(k).name)
end
.
0 Comments
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!