A problem with my digital communication code
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
DM
am 19 Okt. 2014
Kommentiert: Rick Rosson
am 19 Okt. 2014
I have a problem in writing in MATLAB a program that modulates data bits, adds noise, then demodulates it and calculates the bit error and the symbol error rate. The modulation used first should be QPSK. I have done the following:
N=100;
databits = randi([0 3],N,1);
hModulator = comm.QPSKModulator;
hModulator.PhaseOffset = pi/4;
txsig = step(hModulator, databits);
scatterplot(txsig)
grid on
SNRdB=-10
rxsig = awgn(txsig,SNRdB);
H = comm.QPSKDemodulator
hH.PhaseOffset = pi/4;
symdecoded=step(H,rxsig)
symerr(symdecoded,databits)
biterr(symdecoded, databits)
My first question is I don't think I am doing the bit error rate and symbol error rate correctly, can someone help me spot where the problem is? Where am I missing out?
I am then asked to repeat the same problem but make the changes needed to make it work with 16-QAM and 64-QAM by changing a parameter called CONSTELLATION.
I have tried using demod() and ddemodce() but these two functions have been removed from MATLAB? Does anyone know how to proceed?
0 Kommentare
Akzeptierte Antwort
Rick Rosson
am 19 Okt. 2014
Bearbeitet: Rick Rosson
am 19 Okt. 2014
2 Kommentare
Rick Rosson
am 19 Okt. 2014
Please try:
[ ~, SER ] = symerr(symdecoded,databits)
[ ~, BER ] = biterr(symdecoded, databits)
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu QAM finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!