Zero-mean Gaussian white-noise process with known power spectral density (PSD)

Hello everybody
How can I generate zero-mean Gaussian white-noise process with known power spectral density (PSD)which is a constant ? (I want to add this noise to some acceleration data to model an accelerometer sensor)
Thanks in advance.

 Accepted Answer

Just use randn() and multiply by the square root of the variance.
The theoretical PSD of WGN is \sigma^2 (\Delta t) where \sigma^2 is the variance and \Delta t is the sampling interval.
For example:
sigma2 = 2;
x = sqrt(sigma2)*randn(100,1);

1 Comment

I question this answer. pcov(2*randn(10000,1)) = 1 pcov(10*randn(10000,1)) = 15 pcov(100*randn(10000,1) = 35 How does this fit into "The theoretical PSD of WGN is \sigma^2 (\Delta t) where \sigma^2 is the variance and \Delta t is the sampling interval."

Sign in to comment.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Asked:

on 14 May 2012

Community Treasure Hunt

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

Start Hunting!