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)..