1

I'm trying to put a binary vector through a 16-QAM modulator, AWGN channel, demodulator and measure the BER in the end. for some reason it keeps giving me BER=0, even after if I change the length of the vector. (I'm supposed to do it with a Rayleigh channel later, but I'm not even there yet).
when I do the same but without a modulator I get BER!=0 which is fine.
what am i missing here?
here's my code:

Sig = randi([0 1],1,1E5);
SigMod=qammod(Sig,16);
y=awgn(SigMod,50);
SigDemod=qamdemod(y,16);
z=SigDemod>0;
BER = biterr(Sig,z) 
Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
Jake
  • 15
  • 4

2 Answers2

0

The second input to awgn is SNR in dB. In your example you have a SNR of 50 dB, which gives a very small BER.

Try reducing the SNR, for example to 5 dB, and you will observe some bit errors.

Luis Mendo
  • 110,752
  • 13
  • 76
  • 147
  • 1
    lol. I tried reducing SNR to 10 and BER was still 0. Haven't tried lower. Can't believe it was this simple. Thank you very much! – Jake Mar 30 '15 at 11:30
0

Try to see this example in Matlab:

SNR = 3; frameLen = 100;

x = randi([0 1], frameLen, 1);

y = awgn(2*x-1, SNR);

z = y > 0;

biterr(x, z)