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

📄 testray.m

📁 WCDMA功率控制的下行链路算法的Matlab程序。
💻 M
字号:
%%Jakes of a Rayleigh fading channel//|
% jakes(fm,fs,M,N_0,index) |
% fm Doppler frequency//
% fs sampling frequency |
% M number of samples
% N_0 number of paths // |
% index (between 1 & N_0) /////////|

close all ;clear;clc;tic;
N_0=6; fm=180;fs=10^6;M=10000;index=6; %%//
%%//
N = 2*(2*N_0+1);
nn = 1 : N_0;
f = fm*cos(2*pi*nn/N);%frequency vector
Ts = 1/fs; 
onset = N_0*(1/fm); 
Te = 2*onset + M*Ts; %evaluation period
t = 0 : Ts : Te; %time vector/////

%%%%%%%%%%%%%%% =20
%Initial phases
alpha = 0;
beta_n = pi*(nn + 2*(index-1))/(N_0+1); 

%%%%%%%%%%%
%simulation
%%%%%%%%%%%
%real part
Xc0 = sqrt(2)*cos(alpha)*cos(2*pi*fm*t);
Xc = Xc0 + 2*cos(beta_n)*cos(2*pi*f'*t);
%imaginary part
Xs0 = sqrt(2)*sin(alpha)*cos(2*pi*fm*t);
Xs = Xs0 + 2*sin(beta_n)*cos(2*pi*f'*t);

%avoid onset and random start=20
%complex fading function
T = (1/sqrt(2*N_0+1))*(Xc+sqrt(-1)*Xs);
%%%%%%%%%
Tstart = onset + 0.9*rand(1)*onset;
Mstart = round(Tstart/Ts);
Mend = Mstart + M -1; ray = T(Mstart:Mend);

%//
tmp_1=xcorr(real(ray),real(ray)); %property//
tmp_2=xcorr(real(ray),imag(ray));
xl=M:1:2*M-1;
figure(1);plot(xl-M,tmp_1(xl),'k-.');
hold on; plot(xl-M,tmp_2(xl),'k-*');grid on; 

⌨️ 快捷键说明

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