How to find peak or dip separation in frequency domain signal

조회 수: 23 (최근 30일)
Ozan Erturk
Ozan Erturk 2020년 5월 15일
댓글: Ozan Erturk 2021년 3월 31일
Hello all,
I have a frequency domain signal I got from a network analyzer. The signal (attached) has repetetive dips that are separated by some frequency (in this case it's about 5.5MHz). I would like to see the frequency separation through the data so I started using "findpeaks" by inverting the data making dips into peak, which sort of works. If I apply the findpeaks approach to an analytic function it's perfect. But since the data measured is noisy, even though tweaking findpeaks properties like minimum separation and prominance etc. can fail from time to time.
I am wondering if there is a more elegant approach to this by simply treaating this signal like a time domain signal and take the FFT. I am not sure how to map the frequency data from the measured data and map it to freqeuncy of the fft signal.
Thanks in advance
Findpeaks approach: (you can just load S_data.mat and run the code)
%% FSR with FindPeaks Method
f=S(:,1);
sig=S(:,2);
figure(1);
plot(f,sig); hold on
sig_neg=-sig;
[Dips, indexes] = findpeaks(sig_neg,f,'MinPeakDistance',4.3e6,'MinPeakProminence',.01);
Dip_freq=indexes;
figure(1);plot(Dip_freq,-Dips,'ok');
FSR=diff(Dip_freq); %find and plot the separation of each dip within the freq range
figure;
plot(Dip_freq(1:length(Dip_freq)-1),FSR*1e-6,'-ob');
xlabel('Hz');ylabel('FSR in MHz');

채택된 답변

Sergio Yanez-Pagans
Sergio Yanez-Pagans 2021년 3월 28일
These might work for you:
Hope you find this useful!
  댓글 수: 1
Ozan Erturk
Ozan Erturk 2021년 3월 31일
I was using some derivative of this but your code is put together much more nicely ! Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by