I have a written qpsk Code but am not getting correct ber o/p please help.

4 ビュー (過去 30 日間)
Nitin Sapre
Nitin Sapre 2019 年 8 月 6 日
コメント済み: Renato SL 2019 年 8 月 7 日
FRM=100;
EbNo_vector=0:10;
Modulator = comm.QPSKModulator('BitInput',true);
AWGN = comm.AWGNChannel;
DeModulator = comm.QPSKDemodulator('BitOutput',true,'DecisionMethod','Log-likelihood ratio');
for EbNo = EbNo_vector
snr = EbNo + 10*log10(2);
u = randi([0 1], FRM,1); % Generate random bits
mod_sig = Modulator(u); % QPSK Modulator
rx_sig = AWGN(mod_sig); % AWGN channel% Receiver
y = DeModulator(rx_sig); % QPSK Demodulator
x = DeModulator(rx_sig);
for s = 1:10
if y(s) > 0
y(s) = 0;
else
y(s) = 1;
end
errorRate = comm.ErrorRate('ComputationDelay',3);
errors = errorRate(u,y);
BER(s) = errors(1);
end
end
  10 件のコメント
Nitin Sapre
Nitin Sapre 2019 年 8 月 7 日
btw i got the ans thanks for all your help
instead of objects i Defined ber
nErrors = biterr(u,y);
numErrs = numErrs + nErrors;
numBits = numBits + k;
berEst(EbNo) = numErrs/numBits;
Renato SL
Renato SL 2019 年 8 月 7 日
I'm glad you found something that works for you.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeQPSK についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by