# Correct way to add AWGN to a signal

I have a signal, S whose bandwidth is bw Hertz and is sampled at fs Hertz.

To contaminate it with a noise corresponding to SNR x dB, I used the matlab function

out = awgn(S,x);

But I have came across some codes doing it instead like the following.

out = awgn(S,corrected_x);

Where corrected_x = x + 10*log(bw/fs);

Which is the correct method and why?

10*log(bw/fs) to take into account the oversampling operation because the awgn() function specifies the signal-to-noise ratio per sample, in dB.

The discrete time AWGN model is

$$Y = X+N$$

where X is data from continuous time $X(t)$, N is noise sequence from AWGN process $N(t)$ and Y is receive symbols.

If $X(t)$ is characterized by its baseband equivalent limited between $[-W/2, +W/2] \textrm{ (Hz)}$, then we can identify $X(t)$ by observing $Y$ at a rate $W$ symbols per second. See chapter 2, sampling theorem and Theorem of irrelevance.

Call $P$ the average power (joules per second). The sample power $E_s= P/W$ and the noise symbol power is $N_0$. The signal noise ratio per symbol is defined $\mathrm{SNR} = \frac{P}{BW_0} = E_s/N_0$.

If the complex baseband signal is oversampled $\alpha = f_s/W$, the noise sample power is still $N_0$ while the data sample power is reduced $\alpha$ times, thus $E_s/N_0 = \mathrm{SNR} \times W/f_s$.

In dB, $E_s/N_0 = \mathrm{SNR} + 10\log_{10}{(W/f_s)}$.

The awgn() function add AWG noise by the previously defined $E_s/N_0$.

• here SNR = Es/N0, so when over sampling is there, Es is reduced by factor of alpha, which would make SNR = (Es/alpha)/N0 right?? then isnt it Es/N0 = SNR * Fs/W ? Oct 9 '17 at 8:55
• By definition, SNR = Es_no_oversampled/N0. With oversampling, awgn() function paramater snr is Es_oversampled/N0 = (Es_no_oversampled/alpha)/N0 = SNR/alpha = SNR*W/Fs Oct 9 '17 at 11:06
• Why is noise still N0 is it because the noise has infinite bandwidth so the images overlap? What if it's bandlimited won't it scale with the symbol Sep 14 at 12:59
• @LewisKelsey because the continous AWGN process is only observed via instruments and, therefore, the noise power is independent of bandwidth. Actually I did ask the same question and got a thorough answer from MBaz Sep 14 at 13:18
• @LewisKelsey this is correct if by SNR you mean the ratio (the power of oversampled signal sample)/(the power of noise sample). Sep 15 at 8:50