无线信道是除了发射机和接收机外最重要的部分,无线电信号从发射机的天线发射出来,经过不可干预的无线信道,到达接收机的天线。无线通信的接收机和发射机在设计时,必须考虑克服信道的不利因素。这些不利因素包括噪声、多径等。克服噪声可以通过增大发射功率的方法,或者利用信号的相关性。多径的危害主要是衰落。这些衰落包括平坦衰落和频率选择性衰落。其中平坦衰落是指在信道的所有频点,衰落是相同的。而选择性衰落是指在频带内不同频点信号的衰落不同。
平坦衰落信道包含三种:1、随机衰落信道;2、静态衰落信道;3、具有相关性的衰落信道(Rice信达、FIR滤波器法、IFFT滤波器法)。
下面是仿真代码:
#include <itpp/itcomm.h>
#include <iomanip>
using namespace std;
using namespace itpp;
int main()
{
cout.setf(ios::fixed);
cout.precision(3);
double Ts = 100e-9; // channel sampling time Ts = 100ns
double fd_norm = 100e3 * Ts; // normalised Doppler fd_norm = 10kHz * Ts
Channel_Specification cost207ra(COST207_RA);
Channel_Specification cost207bu(COST207_BU);
TDL_Channel tdl_207ra(cost207ra, Ts);
TDL_Channel tdl_207bu(cost207bu, Ts);
cmat ch_coeffs;
tdl_207ra.set_fading_type(Independent);
tdl_207ra.generate(10, ch_coeffs);
cout << "Independent Fading Generator\n"
<< "----------------------------\n"
<< ch_coeffs << "\n\n";
tdl_207bu.set_fading_type(Static);
tdl_207bu.generate(5, ch_coeffs);
cout << "Static Fading Generator\n"
<< "-----------------------\n"
<< ch_coeffs << "\n\n";
tdl_207bu.set_fading_type(Correlated);
tdl_207bu.set_norm_doppler(fd_norm);
tdl_207bu.generate(10, ch_coeffs);
cout << "Correlated Fading Generator (Rice method)\n"
<< "-----------------------------------------\n"
<< round_to_zero(ch_coeffs) << "\n\n";
tdl_207ra.set_correlated_method(FIR);
tdl_207ra.set_norm_doppler(fd_norm);
tdl_207ra.generate(10, ch_coeffs);
cout << "Correlated Fading Generator (FIR method)\n"
<< "----------------------------------------\n"
<< round_to_zero(ch_coeffs) << "\n\n";
tdl_207ra.set_correlated_method(IFFT);
tdl_207ra.generate(200, ch_coeffs);
cout << "Correlated Fading Generator (IFFT method)\n"
<< "-----------------------------------------\n"
<< round_to_zero(ch_coeffs.get_rows(0, 9)) << "\n\n";
return 0;
}