第四章 QAM调制方案仿真

1、LTE调制方案

LTE中采用的调制方案QPSK、16QAM、64QAM,5G已到256QAM。越高阶调制方案对信道条件要求越高,一般64QAM在接收侧信噪比snr达到15db上才会选择。

2、星座图功率归一化问题讨论

LTE物理层在处理调制符号时,会将星座图功率做归一化处理,即是调制符号统一乘以的系数,如16QAM为1/sqrt(10),这么做的目的,为了保证基带处理完的数据功率一致。发送功率将会在后级做统一处理,不需要考虑基带处理带来的功率不一致。

仿真思路:

step1:生成随机bit作为待调制信号sig;

step2:将sig经64QAM调制,画出调制信号的星座图;

step3:调制后信号过awgn信道,改变snr,观察过信道后信号星座图变化;

step4:采用LLR软判决64QAM解调,观察误码率随信噪比变化;

左图为发送端调制星座图,右图经过信噪比snr = 25db后的星座图 

%% Constants
clc;clear;close all;
FRM=6000;
Trellis=poly2trellis(4, [13 15], 13);
Indices=randperm(FRM);
MaxNumErrs=200;MaxNumBits=1e7;
EbNo_vector=0:10;BER_vector=zeros(size(EbNo_vector));
%% Initializations
Modulator      = comm.QPSKModulator('BitInput',true);
AWGN             = comm.AWGNChannel;
DeModulator =  comm.QPSKDemodulator('BitOutput',true,...
    'DecisionMethod','Log-likelihood ratio',...
    'VarianceSource', 'Input port');
BitError           = comm.ErrorRate;
TurboEncoder=comm.TurboEncoder(...
    'TrellisStructure',Trellis,...
    'InterleaverIndices',Indices);
TurboDecoder=comm.TurboDecoder(...
    'TrellisStructure',Trellis,...
    'InterleaverIndices',Indices,...
    'NumIterations',6);
QAM64      = comm.RectangularQAMModulator(64, 'BitInput',true,...
    'NormalizationMethod','Average power',...
    'SymbolMapping', 'Custom', ...
    'CustomSymbolMapping', [47 46 42 43 59 58 62 63 45 44 40 41 ...
    57 56 60 61 37 36 32 33 49 48 52 53 39 38 34 35 51 50 54 55 7 ...
    6 2 3 19 18 22 23 5 4 0 1 17 16 20 21 13 12 8 9 25 24 28 29 15 ...
    14 10 11 27 26 30 31]);

Dmod_QAM64 = comm.RectangularQAMDemodulator(...
    'ModulationOrder', 64, ...
    'BitOutput', true, ...
    'NormalizationMethod', 'Average power', 'SymbolMapping', 'Custom', ...
    'CustomSymbolMapping', ...
    [47 46 42 43 59 58 62 63 45 44 40 41 57 56 60 61 37 36 32 33 ...
    49 48 52 53 39 38 34 35 51 50 54 55 7 6 2 3 19 18 22 23 5 4 0 1 ...
    17 16 20 21 13 12 8 9 25 24 28 29 15 14 10 11 27 26 30 31],...
    'DecisionMethod',  'Approximate log-likelihood ratio', ...
     'VarianceSource', 'Input port');
%% Outer Loop computing Bit-error rate as a function of EbNo
    snr = 25;
    noise_var = 10.^(-snr/10);
    AWGN.EbNo=snr;
    results = zeros(3,1);
    %% Inner loop modeling transmitter, channel model and receiver for each EbNo
%     while ((numErrs < MaxNumErrs) && (numBits < MaxNumBits))  
        % Transmitter
        u             = randi([0 1], FRM,1);                  % Generate random bits
%         encoded      = TurboEncoder.step(u);                                   % Turbo Encoder
%         mod_sig = step(Modulator,   u);                % QPSK Modulator
        mod_sig = step(QAM64,  u);                % QPSK Modulator 
               
        scatterplot(mod_sig); 
        % Channel
        rx_sig  = step(AWGN,        mod_sig);        % AWGN channel
     
        scatterplot(rx_sig); 
        
        llr   = step(Dmod_QAM64, rx_sig, noise_var)     
        y     = sign(-llr);
        y(find(y == -1)) = 0;
        results        = BitError.step(u, y);                       % Update BER

        numErrs = results(2);
        numBits = results(3);
% end

 

  • 6
    点赞
  • 32
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值