📄 readme-chap3.txt
字号:
This program simulates the transmission performance of MSK under Rayleigh fading environment.
(a) Set paremeters
First of all, we set simulation parameters in "msk_fading.m".
%******************** Preparation part **********************
sr=256000.0; % Symbol rate 256 ksymbol/s
ml=1; % Number of modulation levels
br=sr.*ml; % Bit rate (=symbol rate in this case)
nd = 100; % Number of symbols that simulates in each loop
ebn0=10; % Eb/N0
IPOINT=8; % Number of oversamples
%******************* Fading initialization ********************
% If you use fading function "sefade", you can initialize all of parameters.
% Otherwise you can comment out the following initialization.
% The detailed explanation of all of valiables are mentioned in Program 2-8.
% Time resolution
tstp=1/sr/IPOINT;
% Arrival time for each multipath normalized by tstp
% If you would like to simulate under one path fading model, you have only to set
% direct wave.
itau = [0];
% Mean power for each multipath normalized by direct wave.
% If you would like to simulate under one path fading model, you have only to set
% direct wave.
dlvl = [0];
% Number of waves to generate fading for each multipath.
% In normal case, more than six waves are needed to generate Rayleigh fading
n0=[6];
% Initial Phase of delayed wave
% In this simulation four-path Rayleigh fading are considered.
th1=[0.0];
% Number of fading counter to skip
itnd0=nd*IPOINT*100;
% Initial value of fading counter
% In this simulation one-path Rayleigh fading are considered.
% Therefore one fading counter are needed.
itnd1=[1000];
% Number of directwave + Number of delayed wave
% In this simulation one-path Rayleigh fading are considered
now1=1;
% Maximum Doppler frequency [Hz]
% You can insert your favorite value
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;
%******************** START CALCULATION *********************
nloop=1000; % Number of simulation loops
(b) Type just the following command
>> clear
>> msk_fading
(c) Then, you can see the following simulation result on your command window.
(example)
10 2058 100000 2.058000e-002
The meaning of each value is the same of the result from "bpsk.m".
The simulation result is stored in the file (BERmskfad.dat).
#########################################################
(9) Simulation of "msk2.m"
#########################################################
This program simulates the transmission performance of MSK2 under Additive White Gausian Noise (AWGN) environment.
(a) Set paremeters
First of all, we set simulation parameters in "msk2.m".
%******************** Preparation part **********************
sr=256000.0; % Symbol rate 256 ksymbol/s
ml=1; % Number of modulation levels
br=sr.*ml; % Bit rate (=symbol rate in this case)
nd = 1000; % Number of symbols that simulates in each loop
ebn0=5; % Eb/N0
IPOINT=8; % Number of oversamples
%******************** START CALCULATION *********************
nloop=100; % Number of simulation loops
(b) Type just the following command
>> clear
>> msk2
(c) Then, you can see the following simulation result on your command window.
(example)
5 1179 100000 1.179000e-002
The meaning of each value is the same of the result from "bpsk.m".
The simulation result is stored in the file (BERmsk2.dat).
#########################################################
(10) Simulation of "msk2_fading.m"
#########################################################
This program simulates the transmission performance of MSK2 under Rayleigh fading environment.
(a) Set paremeters
First of all, we set simulation parameters in "msk2_fading.m".
%******************** Preparation part **********************
sr=256000.0; % Symbol rate 256 ksymbol/s
ml=1; % Number of modulation levels
br=sr.*ml; % Bit rate (=symbol rate in this case)
nd = 100; % Number of symbols that simulates in each loop
ebn0=15; % Eb/N0
IPOINT=8; % Number of oversamples
%******************* Fading initialization ********************
% If you use fading function "sefade", you can initialize all of parameters.
% Otherwise you can comment out the following initialization.
% The detailed explanation of all of valiables are mentioned in Program 2-8.
% Time resolution
tstp=1/sr/IPOINT;
% Arrival time for each multipath normalized by tstp
% If you would like to simulate under one path fading model, you have only to set
% direct wave.
itau = [0];
% Mean power for each multipath normalized by direct wave.
% If you would like to simulate under one path fading model, you have only to set
% direct wave.
dlvl = [0];
% Number of waves to generate fading for each multipath.
% In normal case, more than six waves are needed to generate Rayleigh fading
n0=[6];
% Initial Phase of delayed wave
% In this simulation four-path Rayleigh fading are considered.
th1=[0.0];
% Number of fading counter to skip
itnd0=nd*IPOINT*100;
% Initial value of fading counter
% In this simulation one-path Rayleigh fading are considered.
% Therefore one fading counter are needed.
itnd1=[1000];
% Number of directwave + Number of delayed wave
% In this simulation one-path Rayleigh fading are considered
now1=1;
% Maximum Doppler frequency [Hz]
% You can insert your favorite value
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;
%******************** START CALCULATION *********************
nloop=1000; % Number of simulation loops
(b) Type just the following command
>> clear
>> msk2_fading
(c) Then, you can see the following simulation result on your command window.
(example)
15 1243 100000 1.243000e-002
The meaning of each value is the same of the result from "bpsk.m".
The simulation result is stored in the file (BERmsk2fad.dat).
#########################################################
(11) Simulation of "gmsk.m"
#########################################################
This program simulates the transmission performance of GMSK under Additive White Gausian Noise (AWGN) environment.
(a) Set paremeters
First of all, we set simulation parameters in "gmsk.m".
%******************** Preparation part **********************
sr=256000.0; % Symbol rate 256 ksymbol/s
ml=1; % Number of modulation levels
br=sr.*ml; % Bit rate (=symbol rate in this case)
nd = 1000; % Number of symbols that simulates in each loop
ebn0=5; % Eb/N0
IPOINT=8; % Number of oversamples
%******************** START CALCULATION *********************
nloop=100; % Number of simulation loops
(b) Type just the following command
>> clear
>> gmsk
(c) Then, you can see the following simulation result on your command window.
(example)
5 2634 100000 2.634000e-002
The meaning of each value is the same of the result from "bpsk.m".
The simulation result is stored in the file (BERgmsk.dat).
#########################################################
(12) Simulation of "gmsk_fading.m"
#########################################################
This program simulates the transmission performance of GMSK under Rayleigh fading environment.
(a) Set paremeters
First of all, we set simulation parameters in "gmsk_fading.m".
%******************** Preparation part **********************
sr=256000.0; % Symbol rate 256 ksymbol/s
ml=1; % Number of modulation levels
br=sr.*ml; % Bit rate (=symbol rate in this case)
nd = 100; % Number of symbols that simulates in each loop
ebn0=15; % Eb/N0
IPOINT=8; % Number of oversamples
%******************* Fading initialization ********************
% If you use fading function "sefade", you can initialize all of parameters.
% Otherwise you can comment out the following initialization.
% The detailed explanation of all of valiables are mentioned in Program 2-8.
% Time resolution
tstp=1/sr/IPOINT;
% Arrival time for each multipath normalized by tstp
% If you would like to simulate under one path fading model, you have only to set
% direct wave.
itau = [0];
% Mean power for each multipath normalized by direct wave.
% If you would like to simulate under one path fading model, you have only to set
% direct wave.
dlvl = [0];
% Number of waves to generate fading for each multipath.
% In normal case, more than six waves are needed to generate Rayleigh fading
n0=[6];
% Initial Phase of delayed wave
% In this simulation four-path Rayleigh fading are considered.
th1=[0.0];
% Number of fading counter to skip
itnd0=nd*IPOINT*100;
% Initial value of fading counter
% In this simulation one-path Rayleigh fading are considered.
% Therefore one fading counter are needed.
itnd1=[1000];
% Number of directwave + Number of delayed wave
% In this simulation one-path Rayleigh fading are considered
now1=1;
% Maximum Doppler frequency [Hz]
% You can insert your favorite value
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;
%******************** START CALCULATION *********************
nloop=1000; % Number of simulation loops
(b) Type just the following command
>> clear
>> gmsk_fading
(c) Then, you can see the following simulation result on your command window.
(example)
15 1546 100000 1.546000e-002
The meaning of each value is the same of the result from "bpsk.m".
The simulation result is stored in the file (BERgmskfad.dat).
#########################################################
(13) Simulation of "qam16.m"
#########################################################
This program simulates the transmission performance of 16QAM under Additive White Gausian Noise (AWGN) environment.
(a) Set paremeters
First of all, we set simulation parameters in "qam16.m".
%******************** Preparation part **********************
sr=256000.0; % Symbol rate 256 ksymbol/s
ml=4; % Number of modulation levels
br=sr.*ml; % Bit rate (=symbol rate in this case)
nd = 1000; % Number of symbols that simulates in each loop
ebn0=6; % Eb/N0
IPOINT=8; % Number of oversamples
%******************** START CALCULATION *********************
nloop=100; % Number of simulation loops
(b) Type just the following command
>> clear
>> qam
(c) Then, you can see the following simulation result on your command window.
(example)
6 11121 400000 2.780250e-002
The meaning of each value is the same of the result from "bpsk.m".
The simulation result is stored in the file (BERqam.dat).
#########################################################
(14) Simulation of "qam16_fading.m"
#########################################################
This program simulates the transmission performance of 16QAM under Rayleigh fading environment.
(a) Set paremeters
First of all, we set simulation parameters in "qam16_fading.m".
%******************** Preparation part **********************
sr=256000.0; % Symbol rate 256 ksymbol/s
ml=4; % Number of modulation levels
br=sr.*ml; % Bit rate (=symbol rate in this case)
nd = 100; % Number of symbols that simulates in each loop
ebn0=15; % Eb/N0
IPOINT=8; % Number of oversamples
%******************* Fading initialization ********************
% If you use fading function "sefade", you can initialize all of parameters.
% Otherwise you can comment out the following initialization.
% The detailed explanation of all of valiables are mentioned in Program 2-8.
% Time resolution
tstp=1/sr/IPOINT;
% Arrival time for each multipath normalized by tstp
% If you would like to simulate under one path fading model, you have only to set
% direct wave.
itau = [0];
% Mean power for each multipath normalized by direct wave.
% If you would like to simulate under one path fading model, you have only to set
% direct wave.
dlvl = [0];
% Number of waves to generate fading for each multipath.
% In normal case, more than six waves are needed to generate Rayleigh fading
n0=[6];
% Initial Phase of delayed wave
% In this simulation four-path Rayleigh fading are considered.
th1=[0.0];
% Number of fading counter to skip
itnd0=nd*IPOINT*100;
% Initial value of fading counter
% In this simulation one-path Rayleigh fading are considered.
% Therefore one fading counter are needed.
itnd1=[1000];
% Number of directwave + Number of delayed wave
% In this simulation one-path Rayleigh fading are considered
now1=1;
% Maximum Doppler frequency [Hz]
% You can insert your favorite value
fd=160;
% 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;
%******************** START CALCULATION *********************
nloop=1000; % Number of simulation loops
(b) Type just the following command
>> clear
>> qam16_fading
(c) Then, you can see the following simulation result on your command window.
(example)
15 5105 400000 1.276250e-002
The meaning of each value is the same of the result from "bpsk.m".
The simulation result is stored in the file (BERqamfad.dat).
By changing the value of Eb/N0 (variable ebn0), you can obtain the graph that shows the relationship between Eb/N0 and BER and that can been seen in the figures of the book.
********** end of file **********
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -