Jakes.m
资源名称:Jakes.rar [点击查看]
上传用户:ange8833
上传日期:2020-09-16
资源大小:2k
文件大小:1k
源码类别:
传真(Fax)编程
开发平台:
Matlab
- function [RayLeigh] = Jakes(fm,fs,M,N0) %jakes仿真器,输入参数:
- %多普勒频移fm,时间抽样频率fs,仿真点数M,振荡器数N0
- N = 2*(2*N0+1), %N条路径
- fi_0 = rand(1,1);
- fi_0 = 2*pi*fi_0; %0到2pi之间的随机相位
- FI= rand(1,N);
- FI = 2*pi*FI; %0到2pi之间的随机相位,待插入的随机相移
- fi= rand(1,N);
- fi = 2*pi*fi; %0到2pi之间的随机相位
- Tc0=0; %变量初始化
- Ts0=0; %变量初始化
- Tc=0; %变量初始化
- Ts=0; %变量初始化
- beta_N0_1 = pi/4, %相移
- ts = 1/fs; %抽样时间间隔
- t = [0 : ts*5 : M*ts*5]; %时间向量
- Tc0 = sqrt(2)*cos(beta_N0_1)*cos(2*pi*fm*t);%同相分量末值
- Ts0 = sqrt(2)*sin(beta_N0_1)*cos(2*pi*fm*t);%正交分量末值
- for i = 1 :N0; %累加各分量
- alpha=2*pi*i/N; %入射角参数定义
- beta = -fi(i);
- Tc = Tc + 2*cos(beta)*cos(2*pi*fm*cos(alpha)'*t+FI(i));%同相分量累加
- Ts = Ts + 2*sin(beta)*cos(2*pi*fm*cos(alpha)'*t+FI(i));%正交分量累加
- end
- Tc = Tc + Tc0;
- Tc = (2./sqrt(N))*Tc; %同相分量总值
- Ts =Ts + Ts0;
- Ts = (2./sqrt(N))*Ts; %正交分量总值
- T = Tc+sqrt(-1)*Ts; %接收信号复包络
- RayLeigh = T(1:M); %在复包络上采M个值进行仿真
- end