📄 f_s_k.m
字号:
%--------------------------------------------------------------------% F_S_K.m -----------------------------------------------------------%% Program for the simulation of deterministic frequency-selective% mobile radio channels.仿真频率选择性衰落信道的程序%%--------------------------------------------------------------------% [y_t,T,t_0]=F_S_K(x_t,f_max,m_s,T,t_0,q_l,...% C1,F1,TH1,C2,F2,TH2,F01,F02,RHO,F_RHO,PLOT)%--------------------------------------------------------------------% Explanation of the input parameters:%% x_t: time-domain input signal of the channel simulator (sampled% with T_s=0.2E-6 s) 信道仿真器的输入信号(采样间隔0.2us)% f_max: maximum Doppler frequency % m_s: sampling rate ratio 采样速率比m% T: contents of the delay elements of the time variant FIR filter% 时变滤波器延时单元% t_0: offset in time 时偏% q_l: q_l=tau_l/T_s+1 路径数L%--------------------------------------------------------------------% The following matrices are generated in F_S_K_p.m:% F1, F2: discrete Doppler frequencies Doppler频率f1 f2 % C1, C2: Doppler coefficients Doppler系数c1 c2% TH1, TH2: Doppler phases Doppler相位th1 th2 % F01, F02: frequency shift value of the Doppler PSD according to% Gauss I and Gauss II, respectively 频移% RHO: amplitude of the direct component 直接分量的幅度% F_RHO: Doppler frequency of the direct component 直接分量的Doppler频率%--------------------------------------------------------------------% PLOT: plot of the output signal of the channel, if PLOT==1 function [y_t,T,t_0]=F_S_K(x_t,f_max,m_s,T,t_0,q_l,... C1,F1,TH1,C2,F2,TH2,F01,F02,RHO,F_RHO,PLOT)T_s=0.2E-6; %0.2us % Initialization:mu_l=zeros(size(q_l)); %乘数y_t=zeros(size(x_t)); %输出信号for n=0:length(x_t)-1, if rem(n/m_s,m_s)-fix(rem(n/m_s,m_s))==0, mu_l=sum((C1.*cos(2*pi*F1*f_max*(n*T_s+t_0)+TH1)).').*... exp(-j*2*pi*F01*f_max*(n*T_s+t_0))+j*... (sum((C2.*cos(2*pi*F2*f_max*(n*T_s+t_0)+TH2)).').*... exp(-j*2*pi*F02*f_max*(n*T_s+t_0)))+... RHO.*exp(j*2*pi*F_RHO*f_max*(n*T_s+t_0)); end T(1)=x_t(n+1); y_t(n+1)=sum(mu_l.*T(q_l)); T(2:length(T))=T(1:length(T)-1);endt_0=length(x_t)*T_s+t_0;if PLOT==1, plot((0:length(x_t)-1)*T_s,20*log10(abs(x_t)),'r-'); hold on; plot((0:length(y_t)-1)*T_s,20*log10(abs(y_t)),'g-');end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -