필터 지우기
필터 지우기

How do I find the period of a random signal?

조회 수: 8 (최근 30일)
Henrique Moura
Henrique Moura 2017년 5월 26일
댓글: Mousumi Nag 2017년 7월 7일
Let's imagine that a friend of mine made a vector with this following attributes:
x = 0:0.001:20
y = exp(-x/30).*sin((2*pi/5)*x)
xx = x(end);
t = [x x+xx x+2*xx x+3*xx];
f = [y y y y];
Then, I got a function like this
He saved the vector t and f and then he sent them to me.
What I have to do is to find the period of the signal f(t) at matlab using the data of t and f. I'm having some issues trying to do this... I can't find 20 as my period valor. I have already tried finding period with zero-crossing strategies, autocorelation, but nothing that I did was effective. Could you guys help me solving this?

채택된 답변

MathReallyWorks
MathReallyWorks 2017년 5월 26일
Hello henrique,
Did you see Mohammad Abouali's answer on a similar question? How to calculate period of signal with matlab
If not then check it out. Autocorrelation is being used to find the period of signal.
  댓글 수: 3
Henrique Moura
Henrique Moura 2017년 5월 26일
Ok, here's my code using the data my friend sent me.
clc %limpa comandos
clear %limpa variáveis
load('funcaoperiodica.mat'); %load the function
% f is my amplitude vector
% t is my time vector
% My fuction f = exp(-t/20).*sin((2*pi/5)*t) repeats itself at each 20 seconds
%as you guys can see in the graph I uploaded, then my period should be 20s.
%using the autocorrelation
esp = (t(end)-t(1))/length(t) %here I get the the space between my samples
ac=xcorr(f,f); %here the correlation
[~,locs]=findpeaks(ac); %here the peaks of the function
T = mean(diff(locs)*esp) %here te calculos of the period that shows me 5 instead of 20
If you don't understand something I said, just tell me that I will rewrite. I'm still learning english. ;)
Mousumi Nag
Mousumi Nag 2017년 7월 7일
@Henrique Moura: I am also working with a random signal to find its period. If you come across the way to solve your problem (that gives period value as 20), can you please share the steps here. Thanks in advance.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by