Hello I am trying this method but I have 2 questions: -the spectrum of the real part of the noise generated by the algorithme follows the initial spectral density but is very noisy -there is a deacreasing in amplitude of the signal to zero where the two vectors (initial and conjugte) meets, if for instance, I use the psd : [1:2500] on 2500 samples. Is it the same for you ?>"npast" <npastouchenko@gmail.com> wrote in message >news:QeadnWtmn_HfTmXVnZ2dnUVZ_jednZ2d@giganews.com... >> hi, >> >> Is there a way to generate a random signal which has a prescribedpower>> spectral density, psd? >> >> I have analytic formula for the broadband power spectral density, andI>> need to generate a random time signal that is supposed to modelacoustic>> pressure, p(t), as a function of time, having given psd. Phase is not >> important, so I think it should be possible to generate a signalsomehow?> >Well, as a humble (aerospace) engineer, I usually just read and try tolearn>from this ng, as my maths and dsp knowledge is at the beginner-end of thescale,>but as no-one else has said so: you could simply create the full complex>spectrum whilst randomising the phase: for an N-pt spectrum, of amplitudeam at>freq f, set the amplitude of the +ve frequency bin [i] as follows: >real[i] = am*cos(phase[i])/2 >imag[i] = am*sin(phase[i])/2 > >and put the other half in the -ve frequency bins (j=N-i) to create thecomplex>conjugate part: >real[j] = real[i] >imag[j] = -imag[i] > >where phase[] is an array of random values between -pi and +pi. > >Then perform an inverse FT on the real-imag arrays (watching out for 1/N>factors) to give a time signal. > >There may be howls of protest at this - and I am willing to learn - but iuse>this to create exactly the sort of signal you want. If it isn't right,then i>am doing something else wrong when I analyse the results! > >HTH, Martin > >
how to generate a signal with prescribed psd
Started by ●October 17, 2008
Reply by ●May 27, 20092009-05-27






