📄 sui-3.m
字号:
close all;
clear all;
N=10000; %number of independent realization
OR=4; %observation rate in Hz
M=256; %number of taps of the Doppler filter
Dop_res=0.1; %Doppler resolution of SUI parameter in Hz(used in resampling-process)
res_accu=20; %accuracy of resampling
P=[0 -5 -10]; %power in each tap in dB
K=[1 0 0]; %Reciean K-factor in linear scale
tau=[0.0 0.5 1.0]; %tap delay in us
Dop=[0.4 0.4 0.4]; %Doppler maximal frequency parameter in Hz
ant_corr=0.4; %antenna correlation (envelope correlation coefficient)
Fnorm=-1.5113; %gain normalization
P=10.^(P/10); %calculate linear power
s2=P./(K+1); %calculate variance
m2=P.*(K./(K+1)); %calculate constant power
m=sqrt(m2);
%Addition info:RMS delay spread
rmsdel= sqrt( sum(P.*(tau.^2))/sum(P) -( sum(P.*tau)/sum(P))^2 );
fprintf('rms delay spread %6.3f us\n',rmsdel);
%Now we create the Ricean channel coefficients with the specified powers
L=length(P);
paths_r=sqrt(1/2) *(randn(L,N)+j*randn(L,N)) .*((sqrt(s2))'*ones(1,N));
paths_c=m'*ones(1,N);
for p=1:L
D=Dop(p)/max(Dop)/2; %normalize to highest Doppler
f0=[0:M*D]/(M*D); %frequency vector
PSD=0.785*f0.^4-1.72*f0.^2+1.0;
filt=[ PSD(1:end-1) zeros(1,M-2*M*D) PSD(end:-1:2)]; %S(f)
filt=sqrt(filt); %from S(f) to |H(f)|
filt=ifftshift(ifft(filt)); %get impulse response
filt=real(filt); %want a real-valued filter
filt=filt/sqrt(sum(filt.^2)); %normalize filter
path=fftfilt(filt,[ paths_r(p,:) zeros(1,M) ]);
paths_r(p,:)=path(1+M/2:end-M/2);
end;
paths=paths_r+paths_c;
paths=paths*10^(Fnorm/20); %Multiply all coefficients with F
%Additional Info:average total tap power
Pest=mean(abs(paths).^2,2);
fprintf('tap mean power level:%0.2f dB\n',10*log10(Pest));
%Additional Info:spectral power distribution
%figure,psd(paths(1,:),512,max(Dop) );
figure,psd(paths(1,:),512,2*max(Dop) ); %should be 2 times max(Dop)
SR=max(Dop)*2; %implicit sample rate
m=lcm(SR/Dop_res,OR/Dop_res);
P=m/SR*Dop_res; %find nominator
Q=m/OR*Dop_res; %find denominator
path_OR=zeros(L,ceil(N*P/Q)); %create new array
for p=1:L
paths_OR(p,:)=resample(paths(p,:),P,Q,res_accu);
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -