Peak coming at 50Hz in every data file. How to get rid of that

1 回表示 (過去 30 日間)
Kashish
Kashish 2024 年 6 月 3 日
回答済み: Star Strider 2024 年 6 月 3 日
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 件のコメント
Mathieu NOE
Mathieu NOE 2024 年 6 月 3 日
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

サインインしてコメントする。

回答 (2 件)

Image Analyst
Image Analyst 2024 年 6 月 3 日
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.

Star Strider
Star Strider 2024 年 6 月 3 日
If you have the Signal Processing Toolbox, use the bandstop function:
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
.

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by