# How to Simulate AWGN (Additive White Gaussian Noise) in Communication Systems for Specific Bandwidth

I am trying to generate a AWGN waveform to add it to the signal of my simulated communication system. The operating bandwidth of the communication system is about B=3GHz and suppose that T=300K (my signal is comprised of very short pulses, I am simulating an IR-UWB system).

What I have done so far is:

N = k*T*B
sigma = sqrt(N./2)
noise = sigma.*randn(1,s_length)


where s_length is the number of samples for my useful signal and noise the awgn waveform.

Is this procedure correct? I have browsed through different questions but was unable to clarify it.

To create Band Limited AWGN all you need is randn in MATLAB.

The question lies only in how to set its Standard Deviation. To illustrate that, let's assume our AWGN generator has PSD which equals to ${N}_{0}$.
Namely we have AWGN with zero mean and variance equals to $\delta(0) {N}_{0}$.

Assuming we have limited bandwidth channel, hence an ideal LPF is applied. Assume its cutoff frequency is ${F}_{LPF} = \frac{{F}_{S}}{2}$.

Hence the Variance of the band limited AWGN is (Multiplication in frequency) the integral over its PSD multiplied by the Norm of the LPF (The factor 2 is for integration over the range $-{F}_{LPF}:{F}_{LPF}$):

$${Var}_{BandLimitedAWGN} = 2 {F}_{LPF} {N}_{0} = {F}_{S} {N}_{0}$$

Now, generate in MATLAB, using randn noise with the corresponding STD (By the data of your simulation).

Good Luck!

### Some Remarks

• The Variance of the noise is independent of the signal (At least in the classic model).
• The Variance of the noise is a function only of the analog channel and the Analog to Digital converter.
The classic model assumes that if the signal is sampled at ${F}_{s}$ an ideal LPF with a cut off frequency of ${F}_{LPF} = \frac{{F}_{S}}{2}$.
As I said, this is the frequency which sets the variance of the Band Limited noise.
• The input signal (Which is the transmitted signal + noise) may have any bandwidth it might have, after the LPF its bandwidth is limited.
• In order to minimize the energy of the noise in the system the LPF band width and the sampling rate should be as low as possible (Namely, the bandwidth of the signal in interest).
Though if the next step is "Matched Filter" the SNR will be maximized for any finite energy white noise (Or colored if the "Colorization" is known and the Matched Filter is accordingly updated).
• thanks for the answer but I haven't understood what you are implying. I don't want to generate arbitrary AWGN, I want to generate thermal noise modeled by AWGN. You say that I should use N0, can I calculate that using the formula kTB? Also what is Fs? The bandwidth of the signal or the sampling frequency and why do I have to scale the standard deviation like that? Are there any particular references you could point me to? Thanks again. – user113478 Jul 26 '14 at 15:59
• Hi. It is simple. The "Physics" will give you the PSD of White Noise - N / N0. Now, according to the sampling frequency of your ADC set the other parameter. Using all that gives you the finite STD of the band limited white noise. Once you have the STD / Variance of the band limited noise it is easy to generate it by MATLAB's randn. This is it. Simple as that. – Royi Jul 26 '14 at 16:08
• If you want to know why the STD of the noise is computed like that you should search for filtering White Noise in LTI system. – Royi Jul 26 '14 at 16:09
• again, what is Fs? sampling frequency or bandwidth of the signal? and what do you mean "Physics" will give me the PSD? how could I calculate it? – user113478 Jul 26 '14 at 16:18
• It is assumed you have a sampling device with LPF at the Fs frequency and sampling rate accordingly. Usually the signal broadcasted are also limited in their energy beyond that frequency. – Royi Jul 26 '14 at 16:20