How to get the exact amplitudes of an irregular wave?
18 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Martin Thomas
am 15 Aug. 2020
Kommentiert: Star Strider
am 27 Aug. 2020
I have time and displacement data of an irregular wave, and generated the amplitude spectrum by fft but the spectrum is very peaky it has lot of amplitudes (figure2). I need to extract the exact amplitude from that spectrum. For eg: given fig 1 has two peak amplitudes i need to get those amplitude at one time. If there was only one peak then it is easy to check by giving max command but for multiple peaks i dont know how to get that.
After fft i got the below figure, how to i get the exact amplitude values from the below figure?. Is there is any other way to extract the amplitudes?
The code i used for irregular sinwave to get the amplitude is,
T=time
X=Displacement
L = length(T);
nfft = 2^nextpow2(L);
f = Fs/2*linspace(0,1,nfft/2+1);
xfft = fft(X,nfft)/L;
xfftwant = 2*xfft(1:length(xfft)/2+1);
plot(f,abs(xfftwant ))
0 Kommentare
Akzeptierte Antwort
Star Strider
am 15 Aug. 2020
The second figure displays broadband noise. The easiest way to deal with that would be to denoise the original time-domain signal, either using the smoothdata function, the Wavelet Toolbox functions, or the Signal Processing Toolbox sgolayfilt function. The reason is that denoising the time-domain signal may be the easiest, since that allows interactive visual determination of the smoothed signal and the original signal. Then take the fft of the denoised signal to get the spectrum you want.
With broadband noise, frequency-selective filters will not work.
19 Kommentare
Star Strider
am 27 Aug. 2020
I am not certain what you want to do. I would not change the fft call to produce fewer points, although that is an option using the optional second argument to the fft function. Depending on what you want, you can just trim the end of the ‘FTD2rs’ matrix, or decimate it, for example as:
FTD2rsd = FTD2rs(1:10:end,:);
to keep only every tenth value. Change the ‘step’ value (10 here) to produce different results and different row-length ‘FTD2rsd’ variables. There are other possibilities as well, such as interpolating it to a new frequency vector, using linspace to define the interopolation vector and interp1 to do the actual interpolation. The choice is yours.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!