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

📄 jakes_case3.m

📁 信源信号经过Jakes信道后的冲激响应仿真
💻 M
字号:
% Simulation Of Jakes Model
function [Burstout,Chan]=Jakes_Case3(Burstin,FrameNum,FrameSizes)

%---------------------------------------------------------------%
%  多径衰落,幅度规一化
AverageamplitudedB=[0 -3 -6 -9]; 
Averageamplitude=10.^(AverageamplitudedB/10);
Averageamplitude=sqrt(Averageamplitude/sum(Averageamplitude));
%  参数描述
% 产生多普勒频移; 振荡器
f_max =200/9;                          
M = 8;                                  
N = 4*M+2;                               
sq = 2/sqrt(N);                          
sigma = 1;
CPLen=FrameSizes/8;

%---------------------------------------------------------------%
%  每径相移分别取一次,,保证各径之间相移的独立性
%  第一径的随机时延,作为标准为0
theta(1,:)=zeros(1,M+1)
%  第二径的随机时延
theta(2,:)=2*pi*rand(1,M+1);
%  第三径的随机时延
theta(3,:)=2*pi*rand(1,M+1);                 
%  第四径的随机时延
theta(4,:)=2*pi*rand(1,M+1);                 

%----------------------------------------------------------------%
%  参数描述,Jakes_Case3
r = 0;
Tap_Symbol=5*10^(-7);
    for t =Tap_Symbol : Tap_Symbol : Tap_Symbol*(FrameSizes+CPLen)      
% Tap_Symbol*(frame-1)*6400=5ms*(frame-1)
        r = r + 1;
        for n = 1 : M+1
            if n <= M
               c_q(r,n) = 2*sigma*sin(pi*n/M);  %相关正交分量
               c_i(r,n) = 2*sigma*cos(pi*n/M);  % 相关同相分量
               f_i(r,n) = f_max*cos(2*pi*n/N);  % 同相分量多普勒频移
               f_q(r,n) = f_max*sin(2*pi*n/N);  % 正交分量多普勒频移
           else
               c_i(r,n) = sqrt(2)*cos(pi/4);
               c_q(r,n) = sqrt(2)*sin(pi/4);
               f_i(r,n) = f_max;
               f_q(r,n) = f_max;
           end
               g_i1(r,n) =  c_i(r,n)*cos(2*pi*f_i(r,n)*t + theta(1,n)); % 每一径,每一振荡器的同相分量
               g_q1(r,n) =  c_q(r,n)*cos(2*pi*f_q(r,n)*t + theta(1,n)); % 每一径,每一振荡器的正交分量
               g_i2(r,n) =  c_i(r,n)*cos(2*pi*f_i(r,n)*t + theta(2,n)); 
               g_q2(r,n)=  c_q(r,n)*cos(2*pi*f_i(r,n)*t + theta(2,n));
               g_i3(r,n) =  c_i(r,n)*cos(2*pi*f_i(r,n)*t + theta(3,n)); 
               g_q3(r,n)=   c_q(r,n)*cos(2*pi*f_i(r,n)*t +theta(3,n));
               g_i4(r,n) =  c_i(r,n)*cos(2*pi*f_i(r,n)*t + theta(4,n)); 
               g_q4(r,n)=   c_q(r,n)*cos(2*pi*f_i(r,n)*t +theta(4,n));
           end  
       ti1(r) =  sq*sum(g_i1(r,1:M+1));% 总同相分量
       tq1(r) =  sq*sum(g_q1(r,1:M+1));% 总正交分量 
       ti2(r) =  sq*sum(g_i2(r,1:M+1));
       tq2(r) =  sq*sum(g_q2(r,1:M+1));
       ti3(r) =  sq*sum(g_i3(r,1:M+1));
       tq3(r) =  sq*sum(g_q3(r,1:M+1));
       ti4(r) =  sq*sum(g_i4(r,1:M+1));
       tq4(r) =  sq*sum(g_q4(r,1:M+1));
       %Rayleigh分布
       Rayleigh1=ti1+i*tq1;
       Rayleigh2=ti2+i*tq2;
       Rayleigh3=ti3+i*tq3;
       Rayleigh4=ti4+i*tq4;
   end
%----------------------------------------------------------------%
%  输出经过Jakes信道模型的符号流和Jakes模型的信号冲击响应
   Burstout1=Averageamplitude(1).*Rayleigh1.*Burstin.';
   Burstout2=Averageamplitude(2).*Rayleigh2.*Burstin.';
   Burstout3=Averageamplitude(3).*Rayleigh3.*Burstin.';
   Burstout4=Averageamplitude(4).*Rayleigh4.*Burstin.';
   
   Burstout1=Burstout1.';
   Burstout2=Burstout2.';
   Burstout3=Burstout3.';
   Burstout4=Burstout4.';
   Burstout_User=zeros(FrameSizes+CPLen,1);
%  每径时延
   Burstout2=[zeros(1,1);Burstout2(1:(FrameSizes+CPLen-1),1)];
   Burstout3=[zeros(2,1);Burstout3(1:(FrameSizes+CPLen-2),1)];
   Burstout4=[zeros(3,1);Burstout4(1:(FrameSizes+CPLen-3),1)];
   
   Burstout=zeros(FrameSizes+CPLen,1);
   Burstout_User=Burstout1+Burstout2+Burstout3+Burstout4;
   Burstout=Burstout+Burstout_User;
   Chan=(Averageamplitude(1).*Rayleigh1+Averageamplitude(2).*Rayleigh2+Averageamplitude(3).*Rayleigh3+Averageamplitude(4).*Rayleigh4)/4;
   
   


⌨️ 快捷键说明

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