DSPRelated.com
Forums

how to generate a signal with prescribed psd

Started by npast October 17, 2008
hi,

Is there a way to generate a random signal which has a prescribed power
spectral density, psd?

I have analytic formula for the broadband power spectral density, and I
need to generate a random time signal that is supposed to model acoustic
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 signal somehow?

Thank you,

npast 


On Oct 17, 2:02&#4294967295;pm, "npast" <npastouche...@gmail.com> wrote:
> hi, > > Is there a way to generate a random signal which has a prescribed power > spectral density, psd? > > I have analytic formula for the broadband power spectral density, and I > need to generate a random time signal that is supposed to model acoustic > 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 signal somehow? > > Thank you, > > npast
Depending on your analytic function, you may be able to transform a differenct function into what you need. But barring that, there is always the rejection method. Look here: http://www.nrbook.com/a/bookcpdf.php in chapter 7.3 IHTH, Clay
On Fri, 17 Oct 2008 13:02:42 -0500, "npast" <npastouchenko@gmail.com>
wrote:

>hi, > >Is there a way to generate a random signal which has a prescribed power >spectral density, psd? > >I have analytic formula for the broadband power spectral density, and I >need to generate a random time signal that is supposed to model acoustic >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 signal somehow? > >Thank you, > >npast >
I'd think the most straightforward approach would be to create a filter that has the response of the desired psd and run white noise through it. Eric Jacobsen Minister of Algorithms Abineau Communications http://www.ericjacobsen.org Blog: http://www.dsprelated.com/blogs-1/hf/Eric_Jacobsen.php
On Oct 18, 7:02&#4294967295;am, "npast" <npastouche...@gmail.com> wrote:
> hi, > > Is there a way to generate a random signal which has a prescribed power > spectral density, psd? > > I have analytic formula for the broadband power spectral density, and I > need to generate a random time signal that is supposed to model acoustic > 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 signal somehow? > > Thank you, > > npast
Easy. First you must do what is called a Spectral Factorisation on the PSD expression. This will give you a rational transfer function. You then pass white noise through it. This is for teh stationary case. ie Sxx(w) = W(jw)W(-jw)*noise power Hardy
On Oct 17, 11:02&#4294967295;pm, "npast" <npastouche...@gmail.com> wrote:
> hi, > > Is there a way to generate a random signal which has a prescribed power > spectral density, psd? > > I have analytic formula for the broadband power spectral density, and I > need to generate a random time signal that is supposed to model acoustic > 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 signal somehow? > > Thank you, > > npast
I didnt understand by a signal with a prescribed psd. Generally psd is attributed to an ensemble of signals.correct me if i am wrong
"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 prescribed power > spectral density, psd? > > I have analytic formula for the broadband power spectral density, and I > need to generate a random time signal that is supposed to model acoustic > 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 signal somehow?
Well, as a humble (aerospace) engineer, I usually just read and try to learn from this ng, as my maths and dsp knowledge is at the beginner-end of the scale, 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 amplitude am 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 the complex 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 i use 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
Martin Gerhold wrote:
> "npast" <npastouchenko@gmail.com> wrote in message > news:QeadnWtmn_HfTmXVnZ2dnUVZ_jednZ2d@giganews.com...
>> Is there a way to generate a random signal which has a >> prescribed power spectral density, psd?
> Well, as a humble (aerospace) engineer, I usually just read and > try to learn from this ng, as my maths and dsp knowledge is at > the beginner-end of the scale, but as no-one else has said so: > you could simply create the full complex spectrum whilst > randomising the phase:
You need to randomize the magnitude too, as recently mentioned but better described here: http://groups.google.com/group/comp.dsp/msg/bc793b60650ab877 Martin -- The difference between genius and stupidity is that genius has limits.
npast wrote:
> hi, > > Is there a way to generate a random signal which has a prescribed power > spectral density, psd?
There are many. Apart from the FFT (FIR) based methods, you can also try IIR filters. This has just recently been discussed here in the context of this paper: http://math.mit.edu/~stevenj/preprints/iir-colored-noise-2007-03-13.pdf Regards, Andor
On Oct 17, 2:02 pm, "npast" <npastouche...@gmail.com> wrote:
> hi, > > Is there a way to generate a random signal which has a prescribed power > spectral density, psd? > > I have analytic formula for the broadband power spectral density, and I > need to generate a random time signal that is supposed to model acoustic > 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 signal somehow? > > Thank you, > > npast
You may want to check out papers by Steven Kay and by Fred Harris. I don't have the exact references handy at the moment, but the topic was Arbitrary psd generation. Note: The are 2 separate papers i.e. not one paper by both authors. Kay's paper was in the IEEE, Harris' is not. Cheers, David
On Oct 27, 9:22 am, Dave <dspg...@netscape.net> wrote:
> On Oct 17, 2:02 pm, "npast" <npastouche...@gmail.com> wrote: > > > hi, > > > Is there a way to generate a random signal which has a prescribed power > > spectral density, psd? > > > I have analytic formula for the broadband power spectral density, and I > > need to generate a random time signal that is supposed to model acoustic > > 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 signal somehow? > > > Thank you, > > > npast > > You may want to check out papers by Steven Kay and by Fred Harris. I > don't have the exact references handy at the moment, but the topic was > Arbitrary psd generation. Note: The are 2 separate papers i.e. not one > paper by both authors. Kay's paper was in the IEEE, Harris' is not. > > Cheers, > David
Actually, I did find the Harris paper in the IEEE. It in 2005 Autotestcon, and it is titled "Using the FFT as an arbitrary function generator". It deals with gernerating slowly varying sinusoids. Kay's paper is in the Proc. of the IEEE in 1981 titled "Efficient generation of colored noise" Cheers, David