%
% README Chapter 4
%
% by Hiroshi Harada
%
% If you have any bugs and questions in our simulation programs, please e-mail
% to [email protected]. We try to do our best to answer your questions.
%
In this directory, we can find the sixteen files. The relationship between file name and the number of program written in the book is shown in as follows.
Program4-1 ofdm.m
Program4-2 ofdm_fading.m
Program4-3 giins.m
Program4-4 girem.m
Program4-5 ofdmda.m
Program4-6 crmapping.m
Program4-7 crdemapping.m
Program4-8 ofdmce.m
Program4-9 ofdmci.m
Program4-10 interwave.m
Program2-4 comb.m
Program2-5 fade.m
Program2-6 sefade.m
Program2-7 delay.m
Program3-9 qpskmod.m
Program3-10 qpskdemod.m
If you would like to try to use the above programs by using MATLAB. First of all, please copy all of files to your created adequate directory. Then, you start to run MATLAB and you can see the following command prompt in the command window.
>>
Next, you can go to the directory that have all of programs in this section by using change directory (cd) command. If you copy all of files to /matlabR12/work/chapter4, you only type the following command.
>> cd /matlabR12/work/chapter4
In this directory, we can find five main functions, ofdm.m, ofdm_fading.m, ofdmda.m, ofdmce.m, and ofdmci.m.
##################################################
(I) Simulation of "ofdm.m"
This program simulates bit error rate (BER) and packet error rate (PER) performances under AWGN environment.
(1) Set paremeters
First of all, we set simulation parameters in "ofdm.m".
para=128; % Number of parallel channel to transmit (points)
fftlen=128; % FFT length
noc=128; % Number of carrier
nd=6; % Number of information OFDM symbol for one loop
ml=2; % Modulation level : QPSK
sr=250000; % OFDM symbol rate (256 ksyombol/s)
br=sr.*ml; % Bit rate per carrier
gilen=32; % Length of guard interval (points)
ebn0=3; % Eb/N0
nloop=100; % Number of simulation loops
(2) Type just the following command
>> clear
>> ofdm
(3) Then, you can see the following simulation result on your command window.
(example)
3.000000 3.694661e-002 1.000000e+000 100
where first number 3 is Eb/No, second number 3.694661e-002 is the BER performance, third number 1.000000e+000 is PER performance, and fourth number 100 is Number of simulation loops. And, simulation result is stored in the file (BERofdm.dat) .
##################################################
(II) Simulation of "ofdm_fading.m"
This program simulates bit error rate (BER) and packet error rate (PER) performances under fading environment.
(1) Set paremeters
First of all, we set simulation parameters in "ofdm_fading.m".
para=128; % Number of parallel channel to transmit (points)
fftlen=128; % FFT length
noc=128; % Number of carrier
nd=6; % Number of information OFDM symbol for one loop
ml=2; % Modulation level : QPSK
sr=250000; % OFDM symbol rate
br=sr.*ml; % Bit rate per carrier
gilen=32; % Length of guard interval (points)
ebn0=10; % Eb/N0
% Time resolution
tstp=1/sr/(fftlen+gilen);
% Arrival time for each multipath normalized by tstp
itau = [0];
% Mean power for each multipath normalized by direct wave.
dlvl = [0];
% Number of waves to generate fading for each multipath.
n0=[6];
% Initial Phase of delayed wave
th1=[0.0];
% Number of fading counter to skip
itnd0=nd*(fftlen+gilen)*10;
% Initial value of fading counter
itnd1=[1000];
% Number of directwave + Number of delayed wave
now1=1;
% Maximum Doppler frequency [Hz]
fd=320;
% You can decide two mode to simulate fading by changing the variable flat
% flat : flat fading or not
% (1->flat (only amplitude is fluctuated),0->nomal(phase and amplitude are fluctutated)
flat =1;
nloop=500; % Number of simulation loops
(2) Type just the following command
>> clear
>> ofdm_fading
(3) Then, you can see the following simulation result on your command window.
(example)
10.000000 2.153255e-002 4.660000e-001 500
where first number 10.000000 is Eb/No, second number 2.153255e-002 is the BER performance, third number 4.660000e-001 is PER performance, and fourth number 500 is Number of simulation loops. And, simulation result is stored in the file (BERofdmfad.dat) .
##################################################
(III) Simulation of "ofdmda.m"
This program simulates bit error rate (BER) and packet error rate (PER) performances under AWGN and fading environments. In this simulation, there are six OFDM
symbols in one packet, and number of FFT length is 64 and number of parallel channel is 52.
(1) Set paremeters
First of all, we set simulation parameters in "ofdmda.m".
%%%%%%%%%%%%% preparation part %%%%%%%%%%%%%%%%%
para=52; % Number of parallel channel to transmit (points)
fftlen=64; % FFT length
noc=53; % Number of carriers
nd=6; % Number of information OFDM symbol for one loop
ml=2; % Modulation level : QPSK
sr=250000; % OFDM symbol rate (250 ksyombol/s)
br=sr.*ml; % Bit rate per carrier
gilen=16; % Length of guard interval (points)
ebn0=3; % Eb/N0
%%%%%%%%%%%%% fading initialization %%%%%%%%%%%
tstp=1/sr/(fftlen+gilen); % Time resolution
itau=[0]; % Arrival time for each multipath normalized by tstp
dlvl1=[0]; % Mean power for each multipath normalized by direct wave.
n0=[6]; % Number of waves to generate fading n0(1),n0(2)
th1=[0.0]; % Initial Phase of delayed wave
itnd1=[1000]; % set fading counter
now1=1; % Number of directwave + Number of delayed wave
fd=150; % Maximum Doppler frequency
flat=0; % Flat or not (see ofdm_fading.m)
itnd0=nd*(fftlen+gilen)*20; % Number of fading counter to skip
%************************** main loop part **************************
nloop=1000; % Number of simulation loops
(2) Type just the following command
>> clear
>> ofdmda
(3) Then, you can see the following simulation result on your command window.
(example)
3.000000 3.704968e-002 1.000000e+000 1000 150
where first number 3 is Eb/No, second number 3.704968e-002 is the BER performance, third number 1.000000e+000 is PER performance, fourth number 1000 is number of simulation loops, and fifth number 150 is Doppler frequency. And, simulation result is stored in the file (BERofdmda.dat) .
(4) The default mode of "ofdmda.m" is BER and PER under AWGN environment. Therefore, the fifth number in the simulation result is nothing to mean. If you would like to simulate BER and PER performances under fading environment. You must remove "*" from the top of the following sentences in OFDMda.m.
%[ifade,qfade,ramp,rcos,rsin]=sefade(ich4,qch4,itau,dlvl1,th1,n0,itnd1,now1,length(ich4),tstp,fd,flat);
%itnd1 = itnd1+itnd0; % Updata fading counter
%ich4=ifade;
%qch4=qfade;
Then, type the following command again.
>> clear
>> ofdmda
Then, you can see the following simulation result on your command window.
(example when ebn0=10, flat=0, fd=150, and the others are same of the first simulation)
10.000000 4.986442e-001 9.320000e-001 1000 150
(5) The above simulation results show that BER=0.5. This means we need compensation of fading. If you would like to simulate the effect of perfect compensation under fading environment. You must remove "*" from the top of the following sentences in OFDMda.m.
%[ifade,qfade,ramp,rcos,rsin]=sefade(ich4,qch4,itau,dlvl1,th1,n0,itnd1,now1,length(ich4),tstp,fd,flat);
%itnd1 = itnd1+itnd0; % Updata fading counter
%ich4=ifade;
%qch4=qfade;
%ifade2=1./ramp.*(rcos(1,:).*ich5+rsin(1,:).*qch5);
%qfade2=1./ramp.*(-rsin(1,:).*ich5+rcos(1,:).*qch5);
%ich5=ifade2;
%qch5=qfade2;
This means that we obtain the information of fading from the fading simulator,
and multiply the complex reciprocal by the re
13967401.rar_barnlhx_ofdm_windows mobile_误码率
版权申诉
81 浏览量
2022-07-15
20:59:34
上传
评论
收藏 9KB RAR 举报
林当时
- 粉丝: 100
- 资源: 1万+
最新资源
- 基于matlab实现 powell算法 用matlab实现,使用方法内附详细说明.rar
- 基于matlab的手写字体识别程序,并对结果进行保存.rar
- 基于c语言指纹识别demo代码 包括了指纹图像方向图计算、频率计算、gabor滤波器增强,细化,特征点提取,特征点匹配.rar
- 基于c++NSGA-2思想的多目标优化程序,采用进化算法处理多目标实值优化问题.rar
- Linux系统中常用权限管理命令
- Coello Coello等人提出了MOPSO 该程序基于matlab实现针对测试函数matlab程序
- Linux系统中常用权限管理命令
- AIR-AP1815-K9-ME-8-5-182-0.tar For Cisco AP1815
- 实验七.zip
- ESP8266刷固件软件flash-download-tools-v3.6.5,AT固件,机智云固件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈