mazdaspring
Advanced Member level 4
I am working on simulation of bpsk in Rayleigh channel. From the code below, I do not understand why you only scale the noise ( n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)] ) with 10^(-Eb_N0_dB(ii)/20) for the required Eb/No. But why don't you scale transmitted signal as well.
As I understand based on the code below,
s is in voltage scale, n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)] is also in voltage scale...
but why "s" is not scaled to be in dB like we did to "n"
can you please explain. Thank you.
...............................................................................
Matlab:
N=10^5;
ip = rand(1,N)>0.5;
s = 2*ip-1;
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)];
Eb_N0_dB = [-3:10];
for ii = 1:length(Eb_N0_dB)
.........................................................
y = s + 10^(-Eb_N0_dB(ii)/20)*n;
As I understand based on the code below,
s is in voltage scale, n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)] is also in voltage scale...
but why "s" is not scaled to be in dB like we did to "n"
can you please explain. Thank you.
...............................................................................
Matlab:
N=10^5;
ip = rand(1,N)>0.5;
s = 2*ip-1;
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)];
Eb_N0_dB = [-3:10];
for ii = 1:length(Eb_N0_dB)
.........................................................
y = s + 10^(-Eb_N0_dB(ii)/20)*n;