• mike123
    了解作者
  • matlab
    开发工具
  • 5KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 7
    下载次数
  • 2018-01-03 17:24
    上传日期
1在数字信号的调制方式中QPSK是最常用的一种卫星数字信号调制方式,它具有较高的频谱利用率、较强的抗干扰性、在电路上实现也较为简单。 2主要包括QPSK的调制解调
QPSK.rar
  • UnderstandingLTEwithMATLAB_Chapter3
  • aREADME.m
    1.5KB
  • chap3_ex01.m
    1.6KB
  • chap3_ex04_qpsk_viterbi_soft.m
    2.3KB
  • chap3_ex03_qpsk_viterbi.m
    1.6KB
  • chap5_ex05_qpsk_turbo.m
    2.1KB
  • chap3_ex02_qpsk.m
    1.3KB
内容介绍
function [ber, bits]=chap3_ex04_qpsk_viterbi_soft(EbNo, maxNumErrs, maxNumBits) %% Initializations persistent Modulator AWGN DeModulator BitError ConvEncoder Viterbi Quantizer if isempty(Modulator) Modulator = comm.QPSKModulator('BitInput',true); AWGN = comm.AWGNChannel; DeModulator = comm.QPSKDemodulator('BitOutput',true,... 'DecisionMethod','Log-likelihood ratio',... 'VarianceSource', 'Input port'); BitError = comm.ErrorRate; ConvEncoder=comm.ConvolutionalEncoder(... 'TerminationMethod','Terminated'); Viterbi=comm.ViterbiDecoder(... 'InputFormat','Soft',... 'SoftInputWordLength', 4,... 'OutputDataType', 'double',... 'TerminationMethod','Terminated'); Quantizer=dsp.ScalarQuantizerEncoder(... 'Partitioning', 'Unbounded',... 'BoundaryPoints', -7:7,... 'OutputIndexDataType','uint8'); end %% Constants FRM=2048; M=4; k=log2(M); codeRate=1/2; snr = EbNo + 10*log10(k) + 10*log10(codeRate); noise_var = 10.^(-snr/10); AWGN.EbNo=snr; %% Processsing loop modeling transmitter, channel model and receiver numErrs = 0; numBits = 0;results=zeros(3,1); while ((numErrs < maxNumErrs) && (numBits < maxNumBits)) % Transmitter u = randi([0 1], FRM,1); % Random bits generator encoded = ConvEncoder.step(u); % Convolutional encoder mod_sig = Modulator.step(encoded); % QPSK Modulator % Channel rx_sig = AWGN.step(mod_sig); % AWGN channel % Receiver demod = DeModulator.step(rx_sig, noise_var); % Soft-decision QPSK Demodulator llr = Quantizer.step(-demod); % Quantize Log-Likelihood Ratios decoded = Viterbi.step(llr); % Viterbi decoder with LLRs y = decoded(1:FRM); % Compute output bits results = BitError.step(u, y); % Update BER numErrs = results(2); numBits = results(3); end %% Clean up & collect results ber = results(1); bits= results(3); reset(BitError);
评论
    相关推荐