transmitter.m
来自「此代码是LDPC码进行BP算法的重要参考代码」· M 代码 · 共 38 行
M
38 行
function [tx_signal, inf_bits, tx_bits] = transmitter(sim_options)
% Generates transmitted signal for one packet.
global sim_consts;
global preamble;
% Generate the information bits
% 产生发送信息序列
inf_bits = round(rand(1, sim_options.PacketLength));
% LDPC encoding
% LDPC编码
tx_bits = tx_ldpc_encode(inf_bits);
% Generate number bits that is an integer multiple of OFDM symbols
% 在发送序列后面进行填补,使之刚好为OFDM符号的整数倍
rdy_to_mod_bits = tx_make_int_num_ofdm_syms(tx_bits, sim_options);
% Modulate
% 调制
mod_syms = tx_modulate(rdy_to_mod_bits, sim_options.Modulation);
% Add pilot symbols
% 插入导引符号
mod_ofdm_syms = tx_add_pilot_syms(mod_syms, sim_options);
% Tx symbols to time domain
% 发送符号由频域转到时域
time_syms = tx_freqd_to_timed(mod_ofdm_syms);
% Add cyclic prefix
% 插入循环前缀
time_signal = tx_add_cyclic_prefix(time_syms);
% Concatenate preamble and data part and normalize the average signal power to 1
% 连接前导和数据块并归一化平均信号功率
tx_signal = [preamble time_signal]*sqrt(64);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?