資源簡介
ofdm 正交頻分復(fù)用的matlab仿真程序

代碼片段和文件信息
%?一個(gè)OFDM符號128個(gè)有效符號,插入128個(gè)虛擬子載波
%?符號率(即有效數(shù)據(jù)率)fsymbol,而發(fā)送速率(需要包括虛擬子載波)2fsymbol
%?輸入的數(shù)據(jù)需要2倍的發(fā)送數(shù)據(jù)率,以便進(jìn)行內(nèi)插,實(shí)現(xiàn)位定時(shí)跟蹤,即4倍fsymbol采樣率的調(diào)制信號
%?OFDM?symbol?Nfft=128?points
%?一個(gè)OFDM符號數(shù)據(jù)點(diǎn)?Nfft*2?=?256?,?Guard?Interval點(diǎn)?=Ng*2=64
%?------------------------------------------------------------------------------------
close?all;
clear;
initializing_now?=?[‘please?wait...‘]
%?------------------------------------------------------------------------------------
%?參數(shù)設(shè)置
%?系統(tǒng)參數(shù)設(shè)置
%?FFT點(diǎn)數(shù)為256,子載波個(gè)數(shù)為128,虛擬子載波個(gè)數(shù)為128
Nfft?=?128;
Ng?=?32;
Ntotal?=?Nfft+Ng;
M_pilot?=?8;?%?每個(gè)OFDM符號加入的導(dǎo)頻數(shù)目
Max_symbols?=?50;
%?讀取訓(xùn)練字
%?短訓(xùn)練字的內(nèi)容
%?10重復(fù)的個(gè)短訓(xùn)練字,每個(gè)是一個(gè)Guard?Interval的長度
%?可以看成2個(gè)重復(fù)的長訓(xùn)練字,每個(gè)長訓(xùn)練字是由5個(gè)重復(fù)的部分組成的
%?這里讀入的是這樣一個(gè)假設(shè)的長訓(xùn)練字的頻域上的值
%?I,Q兩路分別讀入
fid3=fopen(‘data_I_train_word_re_i0_256.txt‘‘r‘);
I_train_word_re_temp=fscanf(fid3‘%f‘);
fclose(fid3);
I_train_word_re?=?(I_train_word_re_temp)‘;
fid3=fopen(‘data_Q_train_word_re_i0_256.txt‘‘r‘);
Q_train_word_re_temp=fscanf(fid3‘%f‘);
fclose(fid3);
Q_train_word_re?=?(Q_train_word_re_temp)‘;
train_word_re?=?I_train_word_re?+?j*Q_train_word_re;
%?第一個(gè)訓(xùn)練字的內(nèi)容
%?這里讀入的是第一個(gè)長訓(xùn)練字的頻域上的值
%?I,Q兩路分別讀入
fid3=fopen(‘data_I_train_word_1_i0_256.txt‘‘r‘);
I_train_word_1_temp=fscanf(fid3‘%f‘);
fclose(fid3);
I_train_word_1?=?(I_train_word_1_temp)‘;
fid3=fopen(‘data_Q_train_word_1_i0_256.txt‘‘r‘);
Q_train_word_1_temp=fscanf(fid3‘%f‘);
fclose(fid3);
Q_train_word_1?=?(Q_train_word_1_temp)‘;
train_word_1?=?I_train_word_1?+?j*Q_train_word_1;
%?第二個(gè)訓(xùn)練字的內(nèi)容
%?這里讀入的是第二個(gè)長訓(xùn)練字的頻域上的值
%?I,Q兩路分別讀入
fid3=fopen(‘data_I_train_word_2_i0_256.txt‘‘r‘);
I_train_word_2_temp=fscanf(fid3‘%f‘);
fclose(fid3);
I_train_word_2?=?(I_train_word_2_temp)‘;
fid3=fopen(‘data_Q_train_word_2_i0_256.txt‘‘r‘);
Q_train_word_2_temp=fscanf(fid3‘%f‘);
fclose(fid3);
Q_train_word_2?=?(Q_train_word_2_temp)‘;
train_word_2?=?I_train_word_2?+?j*Q_train_word_2;
%?第二個(gè)長訓(xùn)練字與第一個(gè)長訓(xùn)練字對應(yīng)子載波位置上的值的比值
%?用于整數(shù)倍頻偏估計(jì),具體算法參考Schmidl和Cox的文章
%?“Robust?Frequency?and?Timing?Synchronization?for?OFDM“
for?temp_i=1:1:Nfft/2
????if(rem(temp_i2)==1)
????????vv(temp_i)=sqrt(2)*train_word_2(temp_i)/train_word_1(temp_i);
????end
end
%?緩沖區(qū)參數(shù)設(shè)置
%?采用兩個(gè)緩沖區(qū),當(dāng)對一個(gè)緩沖區(qū)里的數(shù)據(jù)進(jìn)行處理的時(shí)候,對另一個(gè)緩沖區(qū)進(jìn)行數(shù)據(jù)寫入
%?同一個(gè)緩沖區(qū)不同時(shí)進(jìn)行讀和寫的操作
%?軟件仿真這一個(gè)過程跟實(shí)際過程中的一個(gè)極端情況,可以應(yīng)用于實(shí)際情況
MI_IN_1(1:Ntotal*2*8)?=?0;
MQ_IN_1(1:Ntotal*2*8)?=?0;
MI_IN_2(1:Ntotal*2*8)?=?0;
MQ_IN_2(1:Ntotal*2*8)?=?0;?%?直接從已經(jīng)準(zhǔn)備好的文件里讀出來的數(shù)據(jù)的存儲空間
???????????????????????????%?此時(shí)是完全理想的數(shù)據(jù),沒有加任何噪聲以及偏移量
???????????????????????????%?I、Q是區(qū)分I、Q兩路信號
???????????????????????????%?1、2是區(qū)分兩個(gè)交替使用的緩沖區(qū)
I_INnoised_1(1:Ntotal*2*8)?=?0;
Q_INnoised_1(1:Ntotal*2*8)?=?0;
I_INnoised_2(1:Ntotal*2*8)?=?0;
Q_INnoised_2(1:Ntotal*2*8)?=?0;?%?加過高斯白噪聲后的數(shù)據(jù)的存儲空間
????????????????????????????????%?I、Q是區(qū)分I、Q兩路信號
????????????????????????????????%?1、2是區(qū)分兩個(gè)交替使用的緩沖區(qū)
I_INnoised_error_f_1(1:Ntotal*2*8)?=?0;
Q_INnoised_error_f_1(1:Ntotal*2*8)?=?0;
I_INnoised_error_f_2(1:Ntotal*2*8)?=?0;
Q_INnoised_error_f_2(1:Ntotal*2*8)?=?0;?%?
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????????55??2018-08-27?11:33??OFDM?matlab程序\【源碼使用必讀】.url
?????文件???????3870??2003-03-14?21:49??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\data_I_train_word_1_i0_256.txt
?????文件???????3903??2003-03-14?21:49??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\data_I_train_word_2_i0_256.txt
?????文件???????3853??2003-03-16?13:54??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\data_I_train_word_re_i0_256.txt
?????文件???????3867??2003-03-14?21:49??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\data_Q_train_word_1_i0_256.txt
?????文件???????3908??2003-03-14?21:49??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\data_Q_train_word_2_i0_256.txt
?????文件???????3854??2003-03-16?13:54??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\data_Q_train_word_re_i0_256.txt
?????文件?????496240??2003-08-02?15:07??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\OFDM_mod_I_ser_2up_sam_50.dat
?????文件???????3908??2003-08-02?15:07??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\OFDM_mod_original_data_I_ser_2up_sam_50.dat
?????文件???????3895??2003-08-02?15:07??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\OFDM_mod_original_data_Q_ser_2up_sam_50.dat
?????文件?????495175??2003-08-02?15:07??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\OFDM_mod_Q_ser_2up_sam_50.dat
?????文件??????43884??2005-01-22?16:44??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab\v06_03_dem_2up_arrange.m
?????文件???????3870??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\data_I_train_word_1_i0_256.txt
?????文件???????3903??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\data_I_train_word_2_i0_256.txt
?????文件???????3853??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\data_I_train_word_re_i0_256.txt
?????文件???????3867??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\data_Q_train_word_1_i0_256.txt
?????文件???????3908??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\data_Q_train_word_2_i0_256.txt
?????文件???????3854??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\data_Q_train_word_re_i0_256.txt
?????文件????????212??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\HBF23.txt
?????文件???????3840??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\I1.txt
?????文件???????3840??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\I2.txt
?????文件???????3840??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\I3.txt
?????文件???????3840??2004-01-02?14:03??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\I4.txt
?????文件???????8936??2005-01-22?18:58??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\ofdm_mod.m
?????文件??????92654??2004-01-02?14:07??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\SoutI_4_BF.txt
?????文件?????185308??2004-01-02?14:07??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab\SoutI_4_IF.txt
?????文件??????41472??2003-12-29?11:04??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\程序流程說明.doc
?????目錄??????????0??2011-03-24?17:12??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_rece_matlab
?????目錄??????????0??2011-03-24?17:12??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)\OFDM_send_matlab
?????目錄??????????0??2011-03-30?18:57??OFDM?matlab程序\完美的OFDM仿真程序MATLAB(20cnttr)
............此處省略4個(gè)文件信息
- 上一篇:維納濾波器
- 下一篇:差分進(jìn)化算法的Matlab代碼,可運(yùn)行
評論
共有 條評論