⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 baogao.m

📁 运用matlab,实现16QAM调制与解调
💻 M
字号:
%1,导频正负符号
pilot_syms
%2,生成的随机序列,后面带六个尾bit
info_bits
%3,16QAM映射
TX
%4,星座图
        a=real(TX);
        b=imag(TX);
        plot(a,b,'bx')
%5,插入导频后的子载波映射
Nst = 52;                                     % Number of total subcarriers
Nsd = 48;                                     % Number of data subcarriers
OFDM_sym = reshape(TX, Nsd, N_SPF);           % Reshape the modulated symbols into OFDM symbols
OFDM_sym = OFDM_sym.';
time_sig = zeros(64, N_SPF);
pilot=[1,1,1,-1];
for m = 1: N_SPF
    pilot_num=1;
    temp_sym = OFDM_sym(m,:);% Modulate symbols to be allocated to the mth OFDM symbol of current frame  
    temp_pilot = pilot_sym(pilot_num).*pilot();      % Pilot symbols to be allocated to the mth OFDM symbol of current frame
    
    % Allocate the subcarrier frequency according to IEEE802.11a stand. P23,subclause (17.3.5.9)
    sym_minus_fre = [zeros(1,6),temp_sym(1:5),temp_pilot(1),temp_sym(6:18),temp_pilot(2),temp_sym(19:24)];  % Allocate symbol to the minus frequency band 
    sym_plus_fre = [0,temp_sym(25:30),temp_pilot(3),temp_sym(31:43),temp_pilot(4),temp_sym(44:48),zeros(1,5)]; % Allocate symbol to the plus frequency band 
    sym_IFFT = [sym_plus_fre,sym_minus_fre];  % Total IFFT symbols                          
    temp = ifft(sym_IFFT)*sqrt(64);
    temp = temp.';
    time_sig(:,m) = temp;  % IFFT, convert frequency symbols to time signals
    pilot_num = mod(pilot_num,128)+1;                % Pilot symbol index + 1 
end

cyc_sig = time_sig(49:64,:);                  % Cyclic prefix interval: T_GI = T_FFT/4 
signal_total = [cyc_sig;time_sig];            % Add cyclic prefix to the time signal
time_sig=signal_total(:).';  
%6,IFFT之前的序列形式
sym_IFFT'
%7,此时的导频正负号,
pilot_num   %第几个
pilot_syms(pilot_num)  %正一还是负一?
temp_pilot         %此时插入的导频
%8,循环前缀
time_sig
cyc_sig
signal_total   %完整的符号
%9,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -