资源简介
OFDM发送端的MATLAB源代码 可出频域时域图和一个周期的载波时域图
代码片段和文件信息
IFFT_bin_length = 1024; % number of IFFT bin
carrier_count = 200; % carrier number
bits_per_symbol = 2; % binary number for each symbol
symbols_per_carrier = 50; % symbol used for each carriers
baseband_out_length=carrier_count*symbols_per_carrier*bits_per_symbol;% total number of bit
carriers = (1:carrier_count) + (floor(IFFT_bin_length/4) - floor(carrier_count/2));
conjugate_carriers = IFFT_bin_length - carriers + 2;
%--------------------transmitter--------------
baseband_out = round(rand(1baseband_out_length)); %generate random binary stream
convert_matrix=reshape(baseband_outbits_per_symbollength(baseband_out)/bits_per_symbol);
for k = 1:(length(baseband_out)/bits_per_symbol) modulo_baseband(k) = 0;
for i = 1:bits_per_symbol modulo_baseband(k)=modulo_baseband(k)+convert_matrix(ik)*2^(bits_per_symbol-i);
end
end
% --------------S/P transform ------------------
carrier_matrix = reshape(modulo_baseband carrier_count symbols_per_carrier)‘; % differential encoding QPSK
carrier_matrix = [zeros(1carrier_count);carrier_matrix];
%---------------------------IFFT---------------------
for i = 2:(symbols_per_carrier + 1)
carrier_matrix(i:)=rem(carrier_matrix(i:)+carrier_matrix(i-1:)2^bits_per_symbol);
end
% transfrom to phase for every modulate symbol
carrier_matrix = carrier_matrix * ((2*pi)/(2^bits_per_symbol)); % phase to complex number transform
[XY] = pol2cart(carrier_matrix ones(size(carrier_matrix1)size(carrier_matrix2)));
complex_carrier_matrix = complex(XY); % allocate carrier to corresponding IFFT position
IFFT_modulation = zeros(symbols_per_carrier + 1 IFFT_bin_length);
IFFT_modulation(:carriers) = complex_carrier_matrix;
IFFT_modulation(:conjugate_carriers) = conj(complex_carrier_matrix);
time_wave_matrix = ifft(IFFT_modulation‘); % IFFT frequency s
相关资源
- 使用matlab对采样数据文本进行fft变换
- 最小二乘估计MATLAB实现
- DCT系数直方图
- MATLAB视频转为图片
- kalman运动目标跟踪
- leach分簇算法仿真基于matlab
- RGB YIQ颜色转换matlab实现
- 矩阵的一致性检验程序matlab
- 风险投资问题matlab实现
- Anderson计算流力入门Matlab代码
- matlab仿真自抗扰控制器
- emd分解matlab代码
- pid zn整定方法
- 利用面积法求高阶微分方程系数
- DOA估计MATLAB代码
- DOA估计算法MATLAB程序
- 用matlab实现的图像二值化的三种方法
- TDOA/AOA定位的扩展卡尔曼滤波定位算法
- 可以批量输出患者dicom计划到excel文件
- Matlab模拟三体系统
- 机器人避障仿真matlab程序
- 时域随机子空间模态识别matlab编程
- OFDM MATLAB 通信系统仿真程序
- Matlab 串口调试助手带源码
- 小球沿空间螺旋线运动的动画
- matlab设计滤波器课程设计程序
- S变换 matlab源码
- ARIMA模型的MATLAB实现
- ARMA模型的MATLAB实现
- matlab 音调跟踪Pitch Tracking
评论
共有 条评论