Continue to Site

Welcome to

Welcome to our site! 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.

Adding White Gaussian noise to a signal

Not open for further replies.


Newbie level 5
Dec 1, 2012
Reaction score
Trophy points
Activity points
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)].


what does the above two equations represeent? i have seen quite a lot to define noise but is it exactly they means?


the first equation represents complex baseband noise of variance = 1.
In the second equation, the premultiplying term to noise is square root of variance (if signal power =1) by the formula.. SNR_dB=10*log(1/noise_variance)

HI! why is the noise variance=1? normally the variance of noise will No/2. also in the second equation, why -SNR and why divide by 20.


randn function is standard gaussian which has mean=0 and variance= 1, so when you calculate the overall variance of n it wiil be 1.
and " -SNR and why divide by 20." is answered by the equation
SNR_dB=10*log(base 10)(1/noise_variance).
standard deviation= sqrt(variance)
Hi Pulkit, why would we want the noise variance to be equal to 1. also have ever used the awgn function in matlab? when i used the function, my results are not correct but when using the equation u explained, my results are fine even though i don,t quite get why it works. regards

Hi Pulkit, why is that the rayleigh fading also has the same equation as n which u said represent complex baseband noise. thanks

- - - Updated - - -

h = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % Rayleigh channel

why this equation for rayleigh fading?

its not necessary that we want noise variance equal to one as you are changing your noise variance by the equation
10.^(-SNR_dB/20)*n.. where the premultiplying term to n is sqrt(noise variance) as i told earlier...

for h = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % Rayleigh channel

why this equation for rayleigh fading? follow any book on rayleigh fading.
the magnitude of this complex sum of two gaussian signals is rayleigh distributed and phase is uniformly distributed..
Rayleigh fading channel means magnitude is rayleigh distributed and phase is uniformly distributed.


    Points: 2
    Helpful Answer Positive Rating
Hi Pulkit, thanks for ur help and time, i am grateful.

hi pulkit! have u ever came across channel estimation in ofdm?


do u have the matlab code for gaussian noise generation without wgn or awgn functions.....i would like to generate statistical noise and i think the above functions are related to random noise....that is why i asked for a code other than the functions...

Thank you...

you can generate gaussain noise by using the command 'randn'..
search for its help in matlab command window

Hi Mr. Pulkit,,,

but 'randn' generates random noise na...? i wanna get statistical noise...
so will it be better to use this equation which creates gaussian distribution..?


where Q is the noise covariance matrix...

- - - Updated - - -

Do you have any idea about what the below expression means...? I read that it generates same random noise everytime you run the program...but what is the signaficance with the '0' in this expression?


ok mohammed...thank you..

So can we use randn('state',2) and so...if yes wht diz 0,1,2 etc.. .. .signify?
whn i use this, am getting same random numbers generated eveytime i run the code...what is its relation with the command??

hi Lekshmi B S ,
0,1,2 etc.. represent to the initial value of random number genrator every time you repeat identifing the generator you will take the same answer like...
>>randn('state',2).................................% define the initial value of random number genrato again
a=1.7491............................................%.the same answer as first
Not open for further replies.

Part and Inventory Search

Welcome to