• 大小: 2KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-10
  • 语言: Matlab
  • 标签: 信道衰弱  

资源简介

信道衰弱模型,包括信道模型,simulink仿真代码

资源截图

代码片段和文件信息

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Jakes fading simulator
% designed by Kevin Jungclear;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear;
clc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Model the received complex low-pass envelope

N1=10; N2=100;                                            % Number of the sinusoids
D=1;                                                        % “D“ denotes variance
fmax=91;                                                    % Maxium Doppler frequency
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%Compute correlation of UU1 and U2.
K=0;
rUU=zeros(10.2/0.001);
rU1U1=zeros(10.2/0.001);
rU2U2=zeros(10.2/0.001);
rU1U2=zeros(10.2/0.001);
  for T=0:0.001:0.2
      K=K+1;
      rUU(K)=2*(D^2)*besselj(02*pi*fmax*T);
      rU1U1(K)=(D^2)*besselj(02*pi*fmax*T);
      rU2U2(K)=rU1U1(K);
      rU1U2(K)=rU1U1(K);
  end
  figure(12);
  plot(rUU(1:0.2/0.001));
  figure(13);
  plot(rU1U1(1:0.2/0.001));

  % N=10 ; compute discrete Doppler frequencies fin
    f=zeros(1N1);
    for n=1:(N1-1)
              f(n)=fmax*cos(n*pi/(2*N1-1));                            
    end
    f(N1)=fmax;
  
  % compute the gains cin
  % compute the gains c1n
      c1=zeros(1N1);
      for n=1:(N1-1)
          c1(n)=(2*sqrt(D))*sin(pi*n/(N1-1))/sqrt(N1-0.5);
      end
      c1(N1)=sqrt(D)/sqrt(N1-0.5);
  % compute the gains c2n
      c2=zeros(1N1);
      for n=1:(N1-1)
          c2(n)=(2*sqrt(D))*cos(pi*n/(N1-1))/sqrt(N1-0.5);
      end
      c2(N1)=sqrt(D)/sqrt(N1-0.5);
  
  % compute the complex envelpe 
      M=2000;                                          % M denotes the time interval area 
      u1=zeros(1M);                                   % u1 denotes μ1(t)
      u2=zeros(1M);                                   % u2 denotes μ2(t)
      u=zeros(1M);                                    % u denotes μ(t)
      k=0;
  % compute μ1(t)
      for t=0:0.01:20-0.01
          w1=cos(2*pi*f*t);
          ut1=c1*w1‘;
          k=k+1;
          u1(k)=ut1;
      end
  % compute μ2(t) 
      k=0;
      for t=0:0.01:20-0.01
          w2=cos(2*pi*f*t);
          ut2=c2*w2‘;
          k=k+1;
          u2(k)=ut2;
      end
  % compute μ(t) 
    for n=1:M
        u(n)=u1(n)+i*u2(n);
    end
    figure(1);
    plot(abs(u));

%%%%%%%%%%%%%%%%%%%%%%%%%
% N=Inf ; compute discrete Doppler frequencies fin
    ff=zeros(1N2);
    for n=1:(N2-1)
              ff(n)=fmax*cos(n*pi/(2*N2-1));                            
    end
    ff(N2)=fmax;
  
  % compute the gains cin
  % compute the gains c1n
      cf1=zeros(1N2);
      for n=1:(N2-1)
          cf1(n)=(2*sqrt(D))*sin(pi*n/(N2-1))/sqrt(N2-0.5);
      end
      cf1(N2)=sqrt(D)/sqrt(N2-0.5);
  % compute the gains c2n
      cf2=zeros(1N2);
      for n=1:(N2-1)
          cf2(n)=(2*sqrt(D))*cos(pi*n/(N2-1))/sqrt(N2-0.5);
      end
      cf2(N2)=sqrt(D)/sqrt(N2-0.5);
  
  % compute the complex envelpe 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       8149  2011-11-04 10:15  Jakes\Jakes.m

     目录          0  2011-11-04 10:15  Jakes\NewFolder1

     目录          0  2011-11-04 10:15  Jakes

----------- ---------  ---------- -----  ----

                 8367                    4


评论

共有 条评论

相关资源