• PUDN用户
    了解作者
  • matlab
    开发工具
  • 1KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 56
    下载次数
  • 2009-11-20 19:16
    上传日期
超宽带信道模型的四种方案下的冲激响应源程序及其绘图
IEEE802.15SG3a.rar
  • cp0802_15SG3a.m
    2.8KB
内容介绍
function [h0,hf,OT,ts,X] = cp0802_15SG3a(fc,TMG); fc = 50e9; dt = 1 / fc; LAMBDA1 = [0.0233e9 0.4e9 0.0667e9 0.0667e9]; %IEEE UWB信道模型四种不同方案值 簇平均到达速率 lambda1 = [2.5e9 0.5e9 2.1e9 2.1e9]; %脉冲平均到达速率 GAMMA1 = [7.1e-9 5.5e-9 14e-9 24e-9]; %簇的功率衰减因子 gamma1 = [4.3e-9 6.7e-9 7.9e-9 12e-9]; %簇内脉冲的功率衰减因子 sigma1 = 10^(3.3941/10); %簇的信道系数标准偏差 sigma2 = 10^(3.3941/10); %簇内脉冲的信道系数标准偏差 sigmax = 10^(3/10);%%信道幅度增益的标准偏差 for zz=1:4 LAMBDA=LAMBDA1(:,zz) ; lambda=lambda1(:,zz); GAMMA=GAMMA1(:,zz); gamma=gamma1(:,zz); PT = 50; OT = 200e-9; ts = 1e-9; rdt = 0.001; T = 1 / LAMBDA; t = 1 / lambda; i = 1; CAT(i)=0; next = 0; while next < OT i = i + 1; next = next + expinv(rand,T); if next < OT CAT(i)= next; end end NC = length(CAT); logvar = (1/20)*((sigma1^2)+(sigma2^2))*log(10); omega = 1; pc = 0; for i = 1 : NC pc = pc + 1; CT = CAT(i); HT(pc) = CT; next = 0; mx = 10*log(omega)-(10*CT/GAMMA); mu = (mx/log(10))-logvar; a = 10^((mu+(sigma1*randn)+(sigma2*randn))/20); HA(pc) = ((rand>0.5)*2-1).*a; ccoeff = sigma1*randn; while exp(-next/gamma)>rdt pc = pc + 1; next = next + expinv(rand,t); HT(pc) = CT + next; mx = 10*log(omega)-(10*CT/GAMMA)-(10*next/GAMMA); mu = (mx/log(10))-logvar; a = 10^((mu+ccoeff+(sigma2*randn))/20); HA(pc) = ((rand>0.5)*2-1).*a; end end peak = abs(max(HA)); limit = peak/10^(PT/10); HA = HA .* (abs(HA)>(limit.*ones(1,length(HA)))); for i = 1 : pc itk = floor(HT(i)/dt); h(itk+1) = HA(i); end N = floor(ts/dt); L = N*ceil(length(h)/N); h0 = zeros(1,L); hf = h0; h0(1:length(h)) = h; for i = 1 : (length(h0)/N) tmp = 0; for j = 1 : N tmp = tmp + h0(j+(i-1)*N); end hf(1+(i-1)*N) = tmp; end E_tot=sum(h.^2); h0 = h0 / sqrt(E_tot); E_tot=sum(hf.^2); hf = hf / sqrt(E_tot); %-------------四种方案下不同的参考衰减、传输距离即TMG------- A0=[47 51 51 51]; aa=A0(1,zz); c0=10^(-aa/20); d0=[2 2 10 10]; d=d0(1,zz); gamma0=[1.7 3.5 3.5 3.5]; gamma=gamma0(1,zz); ag=(c0/sqrt(d^gamma)); TMG=ag^2; %%%%%------------------------------------- mux = ((10*log(TMG))/log(10)) - (((sigmax^2)*log(10))/20); X = 10^((mux+(sigmax*randn))/20); h0 = X.*h0; hf = X.*hf; G=1; if G figure(2) subplot(2,2,zz) Tmax = dt*length(h0); time = (0:dt:Tmax-dt); S2=stairs(time,hf); AX=gca; set(AX,'FontSize',14); T=title('Discrete Time Impulse Response'); set(T,'FontSize',14); x=xlabel('Time [s]'); set(x,'FontSize',14); y=ylabel('Amplitude Gain'); set(y,'FontSize',14); end end
评论
    相关推荐