⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 det_mod_loo.m

📁 《移动衰落信道》Mobiel_Fading_Channels一书后面的相关仿真程序。
💻 M
字号:
%-------------------------------------------------------------------- 
% det_mod_Loo.m ----------------------------------------------------- 
% 
% Program for the simulation of modified Loo processes. 
% 
% Used m-files: parameter_Jakes.m, parameter_Gauss.m, Mu_i_t.m 
%-------------------------------------------------------------------- 
% rho_t=det_mod_Loo(N_1,N_2,N_3,sigma_1_2,kappa_1,sigma_2_2,... 
%                   kappa_2,f_max,sigma_3,m_3,f_rho,... 
%                   theta_rho,f_c,T_s,T_sim,PLOT) 
%-------------------------------------------------------------------- 
% Explanation of the input parameters: 
% 
% N_1, N_2, N_3: number of harmonic functions of the real determi- 
%                nistic Gaussian processes nu_1(t), nu_2(t), and  
%                nu_3(t), respectively 
% sigma_1_2: average power of the real deterministic Gaussian  
%            process nu_1(t) 
% kappa_1: frequency ratio f_min/f_max (0<=kappa_0<=1) of nu_1(t) 
% sigma_2_2: average power of the real deterministic Gaussian  
%            process nu_2(t) 
% kappa_2: frequency ratio f_min/f_max (0<=kappa_0<=1) of nu_2(t) 
% f_max: maximum Doppler frequency 
% sigma_3: square root of the average power of the real deterministic    
%          Gaussian process nu_3(t) 
% m_3: average value of the third real deterministic Gaussian  
%      process mu_3(t) 
% f_rho: Doppler frequency of the LOS component m(t) 
% theta_rho: phase of the LOS component m(t) 
% f_c: 3-dB-cut-off frequency 
% T_s: sampling interval 
% T_sim: duration of the simulation 
% PLOT: plot of the time-domain signal rho(t), if PLOT==1  
 
function rho_t=det_mod_Loo(N_1,N_2,N_3,sigma_1_2,kappa_1,... 
               sigma_2_2,kappa_2,f_max,sigma_3,m_3,f_rho,... 
               theta_rho,f_c,T_s,T_sim,PLOT) 
 
if nargin==15, 
   PLOT=0; 
end 
 
sigma_1=sqrt(sigma_1_2); 
sigma_2=sqrt(sigma_2_2); 
 
N_1_s=ceil(N_1/(2/pi*asin(kappa_1))); 
[f1,c1,th1]=parameter_Jakes('es_j',N_1_s,sigma_1_2,f_max,'rand',0); 
f1 =f1(1:N_1); 
c1 =c1(1:N_1)/sqrt(2); 
th1=th1(1:N_1); 
 
N_2_s=ceil(N_2/(2/pi*asin(kappa_2))); 
[f2,c2,th2]=parameter_Jakes('es_j',N_2_s,sigma_2_2,f_max,'rand',0); 
f2 =f2(1:N_2); 
c2 =c2(1:N_2)/sqrt(2); 
th2=th2(1:N_2); 
 
[f3,c3,th3]=parameter_Gauss('es_g',N_3,1,f_max,f_c,'rand',0); 
gaMma=(2*pi*f_c/sqrt(2*log(2)))^2; 
f3(N_3)=sqrt(gaMma*N_3/(2*pi)^2-sum(f3(1:N_3-1).^2)); 
 
N=ceil(T_sim/T_s); 
t=(0:N-1)*T_s; 
 
arg=2*pi*f_rho*t+theta_rho; 
 
RHO_t=exp(Mu_i_t(c3,f3,th3,T_s,T_sim)*sigma_3+m_3); 
 
rho_t=abs(Mu_i_t(c1,f1,th1,T_s,T_sim)+... 
          Mu_i_t(c2,f2,th2,T_s,T_sim)+RHO_t.*cos(arg)+... 
          j*(Mu_i_t(c1,f1,th1-pi/2,T_s,T_sim)-... 
          Mu_i_t(c2,f2,th2-pi/2,T_s,T_sim)+RHO_t.*sin(arg))); 
 
if PLOT==1, 
   plot(t,20*log10(rho_t),'b-',t,20*log10(RHO_t),'y--') 
   xlabel('t (s)') 
   ylabel('20 log rho(t)') 
end 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -