Find the start and end position of a data frame in a pulsed signal

4 ビュー (過去 30 日間)
Paul Vicioso
Paul Vicioso 2014 年 8 月 26 日
コメント済み: Paul Vicioso 2014 年 9 月 16 日
Hello everyone,
I have a signal like this:
and would like a good way to find the start and end of each frame. Note that the size of each frame can be variable and sometimes the flat part in between could have an offset.
Thanks for your time and effort,
Paul

採用された回答

Joseph Cheng
Joseph Cheng 2014 年 8 月 27 日
so what one would do first is threshold a signal and perform an edge detection on it. something like this:
close all;
figure(1)
x = 0:.001:10;
y = 10*sin(50*pi*x);
bduration = [996 830 449 898 680 200];
bpoints = [1 3275 4582 5758 8211 9800];
for ind = 1:length(bduration)
y(bpoints(ind):bpoints(ind)+bduration(ind)) = 0;
end
y = y+(2*rand(1,length(x))-1);
minL = 160; %minimum samples for signal burst.
Ty = zeros(size(y));
Ty(abs(y)>5) = y(abs(y)>5);
edgefilt = [ones(1,minL) -ones(1,minL )];
Edges = [zeros(1,minL-1) conv(abs(Ty),edgefilt/160,'valid') zeros(1,minL)];
plot(x,y,x,Edges,'r');
and as you can see from the final plot just find the locations of the peaks.
  1 件のコメント
Paul Vicioso
Paul Vicioso 2014 年 9 月 16 日
Hi Joseph, thanks for your answer, and now it is partially working, but I have a problem detecting the edges of small signals, for example, in the next graph:
I can detect the edges of the first few frames but not (consistently) the smaller ones (to the right), can you give me a hint of how to do it or even how to tweak your function to detect these signals?
Thanks for your help,
Paul Vicioso

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by