generation of time series by given spetrum( ifft)
조회 수: 5 (최근 30일)
이전 댓글 표시
Hello!
i am trying to generate a time serie from a given kaimal spectrum.i am using ifft function but propably not in the correct way.I made a code but if i reverse by calculating the spectrum of the output time serie it give me different results. here is how i do it: =============================================================================== close all
clear all
%altitude 70meters
z=70;
%parameters of kaimal spectrum
U=20;
u=1;
%frequency
f=-0.5:0.001:0.5;
%n parameter of kaimal spectrum
n=f*z/U;
%definition of kaimal spectrum
%results of kaimal spectrum
S=u^2*(52.5*z/U)./((1+33*n).^(5/3));
%StD of S
StD_S=std(S);
%figure of the spectrum
figure
loglog(f,2*pi*S)
%generation of time series
N=1000;
a=randn(1,N/2);
b=randn(1,N/2);
X=StD_S*(a+1i*b);
A=conj(X);
B=[X A(end:-1:1)];
C=abs(ifft(B));
figure
plot(C)
======================================================================
In generation of time serie i make a list of random complex number of N/2 length and multiply with the standard deviation of kaimail spectrum(i got it from theory that,so it sould be correct)
The problem i think is in ifft.
Thanks anyway
댓글 수: 0
답변 (1개)
Dr. Seis
2012년 11월 6일
편집: Dr. Seis
2012년 11월 6일
In your case, you have:
Nyq = 0.5; % Nyquist frequency
df = 0.001; % frequency increment
Therefore, your array containing frequencies should be:
f = -Nyq : df : Nyq-df;
If you have amplitudes at each one of the frequencies described above (stored as B), you will then perform the IFFT by:
C = abs(ifft(ifftshift(B)));
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Signal Generation and Preprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!