简体   繁体   中英

Power spectral density of gussin white noise

I am trying to generate Gussin white noise with standard deviation 7% and sample frequency 2000 Hz . Then calculate the power spectral density of it (PSD). The problem is when I plotted PSD I know that I have to get flat PSD. however, I did not

I used below code

clear;
clc;
x =7*randn(1,10000);
N=10000;
sample_frequency=2000;
fax_bin=[0 :N/2-1];
fax_Hz=fax_bin*sample_frequency/N;
FFT_A=fft(x);
spectra=FFT_A.*conj(FFT_A);
figure
plot(fax_Hz,spectra(1,1:5000));

It is a random process so you will never get it truly flat, it gets better with more samples. Additionally, plotting it on a dB-scale makes more sense.

plot(fax_Hz,10*log10(spectra(1,1:N/2)));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM