简体   繁体   中英

BER result for QAM modulation Matlab

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) 

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.

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM