synthesize PSD, scaling and units of ifft(X)

I want to recover a time signals from a given power spectral density, assuming a normal distribution of the original signal:
PSD; % [(m/s)^2/Hz] given spectrum
T = 60; % [s] length of original signal
dt = 0.005; % [s] time step of original signal
N = T/dt; % [-] number of samples
NFFT = 2^nextpow2(N); % [-] number of bins for FFT
fs = 1/dt; % [Hz] sampling frequency
ASD = sqrt(PSD); % [(m/s)/sqrt(Hz)] get amplitude spectrum
omega = 2*pi*rand(NFFT/2,1); % [rad] generate phase vector
Z = ASD.*exp(1i*omega); % create complex amplitude vector
Z = [0;Z;flipud(conj(Z))]; % extend to satisfy symmetry
Y = real(ifft(Z)); % inverse FFT
[PSDY,f] = pwelch(Y,[],[],NFFT,fs); % generate PSD from Y to compare
The results show a power spectrum several orders of magnitude lower than the original, but the shape matches very good. I guess there is something wrong with the units or there might be a scaling factor missing. I'm not sure about the units of the time signal after ifft, since the amplitude has [(m/s)/sqrt(Hz)].

답변 (1개)

Rick Rosson
Rick Rosson 2014년 9월 15일

0 개 추천

ASD = sqrt(PSD*fs/N);

댓글 수: 2

Felipe
Felipe 2014년 9월 15일
편집: Felipe 2014년 9월 15일
There's still a large offset between the spectra. But I found the following scaling that worked:
ASD = sqrt(PSD*fs/2);
...
Y = real(ifft(Z)*sqrt(NFFT+1));
Since I don't fully understand the scaling factors, I'm still interested in any comments.
I've been bugged by this for quite some time. Would also appreciate input on this.

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

카테고리

도움말 센터 및 File Exchange에서 Parametric Spectral Estimation에 대해 자세히 알아보기

질문:

2014년 9월 10일

댓글:

2018년 11월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by