# Noise Variance N0 of AWGN

1. ## Noise Variance N0 of AWGN

Hi,

I am trying to calculate the SNR from the source to the destination of a Rayleigh flat-fading channel with AWGN using the following formula:

SNR = (P*(h_sd^2))/N0;

where P=transmit power
h_sd=channel gain
N0=noise variance

I know the transmit power is going to be a constant so I considered it to be 27dB.

I have modeled the channel gain as
h_sd=abs((sqrt(0.5))*(randn(1)+j*randn(1)));

Am I on the right track? and I have no idea how to get N0

•

2. ## Re: Noise Variance N0 of AWGN

Actually sir, the formula of the received SNR over flat-fading channel is $3\frac{P|h_{sd}|^2}{N_0\,W}=\frac{E|h_{sd}|^2}{N_0}$. Now for $3N_0$ problem, you can define using MATLAB syntax the SNR, $3E/N_0$ as:

Code:
```SNRdB=0:2:20 % in dB scale
SNR=10.^(SNRdB./10)% in linear scale```
and continue using the linear scale in your calculation. You have to compute the BER over a range of SNRs, so $3P$ or equivalently $3E$ is not constant. I mean, if $3P$ is constant you will get a point, not a curve of BER. Later on, you can fix $3P$ after you see the performance of the system versus SNR, and which SNR satisfies the target BER.

Please refer to the following link BER for BPSK in Rayleigh channel which includes the MATLAB how to simulate the BER of a coherent BPSK signaling over flat Rayleigh fading channel. If you have more questions, do not hesitate to ask.

Regards

3. ## Re: Noise Variance N0 of AWGN

thank you for the reply. however i am working on relay selection based on hybrid forwarding schemes such as AF and DF.
The calculation I mentioned earlier is only a part of the over all code.

This is the formula that I wish to simulate:

SNR_af = ((P1*|h_sd|^2)/N0) + (P1*P2*|h_sr|^2*|h_rd|^2)/((P1*|h_sr|^2 + P2*|h_rd|^2 + N0)*N0)

where P1=transmit power at the source
P2=transmit power at the relay

So is N0 just another constant (noise power) like the transmit power? Do I have to relate it to the BER?

4. ## Re: Noise Variance N0 of AWGN

You just include the noise in the SNR term, and yes it is constant, this is the characteristic of white noise, that it has a flat power spectral density.

Regarding the AF relaying, the end-to-end SNR is:

$3\frac{\frac{E_1|h_{sr}|^2}{N_0}\frac{E_2|h_{rd}|^2}{N_0}}{\frac{E_1|h_{sr}|^2}{N_0}+\frac{E_2|h_{rd}|^2}{N_0}+1}=\frac{\gamma_1\gamma_2}{\gamma_1+\gamma_2+1}$
Actually, I am looking for this simulation, too. So, if you come up with some thing new, please post it here.

Note: Why you continue to use $3P$ instead of $3E$? In bandlimited channel of bandwidth $3W$, the SNR is given in one of two equivalent forms: $3\frac{P}{N_0W}$ or $3\frac{E}{N_0}$, where $3W\approx\frac{1}{T}$, which means that $3\frac{P}{N_0W}=\frac{PT}{N_0}$, where $3PT=E$.

Thanks

•

5. ## Re: Noise Variance N0 of AWGN

I do not understand with Noise Variance NO of AWGN who can explain to me.
help me. thanks.

•

6. ## Re: Noise Variance N0 of AWGN

Originally Posted by angel18
I do not understand with Noise Variance NO of AWGN who can explain to me.
help me. thanks.

What do not you understand about noise variance?

7. ## Re: Noise Variance N0 of AWGN

no i understand it, its jus that in the matlab program would i consider it fixed or varying randomly

8. ## Re: Noise Variance N0 of AWGN

Originally Posted by mish111990
no i understand it, its jus that in the matlab program would i consider it fixed or varying randomly
As I said, $3N_0$ is in the SNRdB variable. I will give you a simple example for coherent BPSK signaling over AWGN channel:

Code:
```SNRdB=0:2:30;
SNR=10.^(SNRdB./10);
Pe=0.5.*erfc(sqrt(SNR));
semilogy(SNRdB,Pe);
axis([0 30 10^-6 1]);```
So, again, you don't have to define $3N_0$ explicitly. However, it is constant. For example, when you say that the SNR=1, it means that the signal power equals the noise power in effective bandwidth. If SNR<1, then the signal power is less than the noise power, and likewise if SNR>1, then the signal power is greater than the noise power.

I hope it is more clear now.

•

9. ## Re: Noise Variance N0 of AWGN

GREAT the expressing power of david is excellent hatsoff

10. ## Re: Noise Variance N0 of AWGN

i agree thanks

11. ## Re: Noise Variance N0 of AWGN

hello guys,

i am trying to code the below SINR equation

any clue how to calculate the path gain and if i should keep everything in dB or not

--[[ ]]--