HOW DO I GET FREQUENCY AND PHASE ANGLE FROM A WAVE SIGNAL
Mostrar comentarios más antiguos
If i have a wave signal data collected at site as below, how can i get the frequency and phase angle from it?
Arrival Time: 0, 0.00013, 0.00025, 0.00038, 0.0005
Amplitude: 0.060643, 0.083724, 0.004865, 0.038468, 0.11925
4 comentarios
Azzi Abdelmalek
el 26 de Ag. de 2012
Editada: Azzi Abdelmalek
el 26 de Ag. de 2012
can you tell us which function represent your signal ? when i ploted your signal , i did'nt find it sinusoidal
Ron
el 27 de Ag. de 2012
Walter Roberson
el 27 de Ag. de 2012
Please do not send people files without asking them first.
Ron
el 27 de Ag. de 2012
Respuestas (2)
Walter Roberson
el 27 de Ag. de 2012
0 votos
As your times are not uniform, you need a non-uniform discrete fft, sometimes abbreviated nfft and sometimes nufft and sometimes other things.
There does not appear to be any MATLAB routine or any MATLAB File Exchange routine for nfft, but see
Azzi Abdelmalek
el 27 de Ag. de 2012
Editada: Azzi Abdelmalek
el 27 de Ag. de 2012
%your signal don't contain just one frequency

num=xlsread('FileName');t=num(:,1);y=num(:,2);
Y=fft(y);
[wc,w0,a0,ak,bk,c0,ck]=get_harmonics(Y,t(2)-t(1),2)
%the ck contains your frequencies
% wc contains the pulses (rd/s)
stem(wc,abs(ck)) %your Amplitude spectrum
stem(wc,angle(ck)) % your phase spectrum
% get get_harmonics on
3 comentarios
Walter Roberson
el 27 de Ag. de 2012
Azzi, in your FEX routine, what is the input argument "pas" ? It does not appear to be documented. It appears to be something like a frequency.
Walter Roberson
el 27 de Ag. de 2012
Ron's question implies that the signals are arriving at irregular times, but you seem to be skipping the times in this analysis.
Azzi Abdelmalek
el 27 de Ag. de 2012
Editada: Azzi Abdelmalek
el 28 de Ag. de 2012
Walter, pas is a sample time, and you are right it is not constant. maybe we can interpolate to have a constant sample time. I don't know why the sample time is changing?
pas=min(abs(diff(t)));
t1=min(t):te:max(t);
y1=interp1(t,y,t1)
Y=fft(y);
[wc,w0,a0,ak,bk,c0,ck]=get_harmonics(Y,pas,2)
Categorías
Más información sobre Fourier Analysis and Filtering en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!