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

24 views (last 30 days)
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

Wayne King
Wayne King on 14 May 2012
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
Noel
Noel on 8 May 2013
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)

Products

Community Treasure Hunt

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

Start Hunting!