フィルターのクリア

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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by