📄 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)% f_max: maximum Doppler frequency% m_s: sampling rate ratio% 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%--------------------------------------------------------------------% The following matrices are generated in F_S_K_p.m:% F1, F2: discrete Doppler frequencies% C1, C2: Doppler coefficients% TH1, TH2: Doppler phases% 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%--------------------------------------------------------------------% 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;% 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(y_t)-1)*T_s,20*log10(abs(y_t)),'g-')end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -