Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

gaussian noise generation

Status
Not open for further replies.

sa gharibi

Newbie level 3
Newbie level 3
Joined
Dec 3, 2013
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
19
hello my dear friends
i wnat to generate a complex whaite gaussian noise with average power of 20 dB.
can any one help me?
tnx
 

You should provide us some more info.

Think of: spectral power density (for example in dBm/Hz), or spectral voltage density (for example nV/rt(Hz) ),
Frequency range (for example center frequency and bandwidth), flatness within the frequency range, sampling frequency, etc.
 
thanx for your reply!
I want to generate a complex gaussian noise with power of 15 dB and add it to my signal!
 

You can generate N samples of complex white Gaussian noise with power sigma2 in Matlab or GNU Octave using the randn function:
Code:
n = (randn(1,N) + 1j*randn(1,N))*sqrt(sigma2/2);
To check the sample power of this noise is approximately equal to sigma2 (for sufficiently large N), you can then use:
Code:
Pn = n*n'/N
So, to get your SNR of 15dB, you first need to know the power of your signal. Then, you must set the noise power at 15dB below this. Putting this together:
Code:
% An example signal: complex exponential
N = 1000;
t = linspace(0,5,N);
s = exp(1j*2*pi*t);

% Sample power of signal
Ps = s*s'/N;

% Generate noise
SNRdb = 15;
sigma2 = Ps/10^(SNRdb/10);
n = (randn(1,N) + 1j*randn(1,N))*sqrt(sigma2/2);

% Add noise to signal
x = s + n;

% Plot noisy signal
plot(t, real(x));
hold on;
plot(t, imag(x), 'r');
legend('real(x)', 'imag(x)');
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top