资源简介
OFDM系统信道估计matlab仿真程序
代码片段和文件信息
%OFDM Channel Estimation based on Comb Pilot
%IFFT_bin_length: IFFT和FFT的点数
%carrier_count: 子载波个数
%bits_per_symbol: 每符号上的比特数
%symbols_per_carrier: 每桢的OFDM符号数
%X:欲发送的二进制比特流
clear all;
clc;
IFFT_bin_length=128; %IFFT_bin_length: IFFT和FFT的点数
carrier_count=100; %carrier_count: 子载波个数
bits_per_symbol=2; %bits_per_symbol: 每符号上的比特数
symbols_per_carrier=12; %symbols_per_carrier: 每桢的OFDM符号数
LI=7 ; %导频之间的间隔
Np=ceil(carrier_count/LI)+1;%导频数 %加1的原因:使最后一列也是导频 %%ceil的用法:取最接近A但是大于等于A的整数结果取整不保留小数部分
N_number=carrier_count*symbols_per_carrier*bits_per_symbol;
carriers=1:carrier_count+Np;%相当于将载波标号一一列出
GI=8; % guard interval length
N_snr=40; % 每比特信噪比
snr=8; %信噪比间隔
%------------------------------------------------------------
% vector initialization
X=zeros(1N_number);
X1=[];
X2=[];
X3=[];
X4=[];
X5=[];
X6=[];
X7=[];
Y1=[];
Y2=[];
Y3=[];
Y4=[];
Y5=[];
Y6=[];
Y7=[];
XX=zeros(1N_number);
dif_bit=zeros(1N_number);
dif_bit1=zeros(1N_number);
dif_bit2=zeros(1N_number);
dif_bit3=zeros(1N_number);
X=randint(1N_number);%产生二进制随即序列(非0即1)
%--------------------------------------------------------
%QPSK调制:(1 1)->pi/4;(0 1)->3*pi/4;(0 0)->-3*pi/4;(10)->-pi/4;
s=(X.*2-1)/sqrt(2);%分子转化成双极性
sreal=s(1:2:N_number);
simage=s(2:2:N_number);
X1=sreal+1i.*simage;%QPSK调制后的信号
%---------------------------------------------------------
%产生随机导频信号
%--------------------------------------------------------
train_sym=randint(12*symbols_per_carrier);
t=(train_sym.*2-1)/sqrt(2);
treal=t(1:2:2*symbols_per_carrier);
timage=t(2:2:2*symbols_per_carrier);
training_symbols1=treal+1i.*timage;
training_symbols2=training_symbols1.‘;
training_symbols=repmat(training_symbols21Np);%%repmat表示复制矩阵training_symbols2成1行Np列(把矩阵training_symbols2当成一个元素)
%disp(training_symbols)tt
pilot=1:LI+1:carrier_count+Np;
if length(pilot)~=Np%导频数
pilot=[pilotcarrier_count+Np];
end
%--------------------------------------------------------
%串并转换
X2=reshape(X1carrier_countsymbols_per_carrier).‘;%%reshape表示变化矩阵X1将其按照carrier_count(数量)行symbols_per_carrier(数量)列存储
%---------------------------------------------------------
%插入导频
signal=1:carrier_count+Np;
signal(pilot)=[];
X3(:pilot)=training_symbols;
X3(:signal)=X2;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%为什么有重复赋值
%X3=cat(1training_symbolsX2);%排列成[training_symbols;X2]
IFFT_modulation=zeros(symbols_per_carrierIFFT_bin_length);
IFFT_modulation(:carriers)=X3;
%IFFT_modulation(:conjugate_carriers)=(X3);
X4=ifft(IFFT_modulationIFFT_bin_length2);%y = ifft(Xndim)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%为什么要ifft
%X5=X4.‘;
%加保护间隔(循环前缀)
for k=1:symbols_per_carrier;
for i=1:IFFT_bin_length;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%起点应该是GI
X6(ki+GI)=X4(ki);
end
for i=1:GI;
X6(ki)=X4(ki+IFFT_bin_length-GI);
end
end
%---------------------------------------------------------
%并串转换
X7=reshape(
- 上一篇:Matlab与蒙特卡洛仿真
- 下一篇:基于HMM的语音识别系统的matlab仿真
相关资源
- 基于导频的信道估计ls算法
- PTS matlab 代碼源
- OFDM MATLAB源码
- OFDM MATLAB 通信系统仿真程序
- ofdm1.m
- Volterra_均衡器
- 使用matlab的OFDM导频ls lmmse信道估计
- OFDM盲信道估计_基于子空间的盲信道估
- 降低OFDM系统PAPR算法(PTS-SLM-C变换)
- OFDM信道估计源代码
- OFDM-BER-BPSK的matlab
- OFDM matlab程序
- OFDM信道估计
- 基于matlab的OFDM
-
MIMO-OFDM的simuli
nk建模 - OFDM系统中基于导频的信道估计及其
- OFDM仿真(多径瑞利信道).rar
- UFMC matlab code
- MIMO-OFDM系统的Matlab仿真代码
- 信道估计的matlab仿真
- 超带宽信道估计模型仿真
- 降低OFDM峰均比的matlab仿真
- OFDM系统仿真
- ofdm_dmt.m
- 基于不同调制方式16QAM、64QAM、QPSKOF
- MIMO OFDM matlab仿真程序
- MIMO-OFDM不同信道估计的对比
- OFDM系统实现matlab程序发送到接收的每
- ofdm符号定时与频偏联合估计算法mat
- OFDM迭代注水算法
评论
共有 条评论