信道仿真的很好程序,可以实现不同参数情况下的信道仿真,比如超宽带系统的室内多径环境信道仿真 - matlab通信信号 - 谷速源码
下载频道> 资源分类> matlab源码> 通信信号> 信道仿真的很好程序,可以实现不同参数情况下的信道仿真,比如超宽带系统的室内多径环境信道仿真

标题:信道仿真的很好程序,可以实现不同参数情况下的信道仿真,比如超宽带系统的室内多径环境信道仿真
分享到:

所属分类: 通信信号 资源类型:程序源码 文件大小: 7.75 KB 上传时间: 2019-06-16 16:12:46 下载次数: 8 资源积分:1分 提 供 者: zhangsan456 code
内容:
信道仿真的很好程序,可以实现不同参数情况下的信道仿真,比如超宽带系统的室内多径环境信道仿真
clear
%Gayatari Prabhu and P. M. Shankar
%loggen1.m   
%generates a lognormally faded signal with  multipaths (10) and  multiple scattering (5)
%iterated 1000 times to see of the mean is lognormally distributed.
%gives the chi-squate test value as well
close all
numscat = 8; %number of scatterers
numpaths = 10; %number of paths
Fc = 900e6; %carrier frequency
Fs = 4*Fc; %sampling frequency
Ts = 1/Fs; %sampling period
t = [0:Ts:4999*Ts]; %time array
wc = 2*pi*Fc; %radian frequency
v = 1; %vehicle speed in m/s
bins = 20; %bins for chi-square test
numit = 2000; %number of iterations for Rayleigh
meanval = 0;
for i = 1:numit
ray = zeros(1,length(t)); %received signal
    for j = 1:numpaths
wd = 2*pi*v*Fc*cos(unifrnd(0,2*pi))/3e8;
a = prod(raylrnd(1,1,numscat));
ray = ray + a*cos((wc+wd)*t+unifrnd(0,2*pi,1,length(t)));
    end;
[rayi rayq] = demod(ray,Fc,Fs,'qam'); %demodulated signal 
env_ray = sqrt(rayi.^2+rayq.^2); %envelope of received signal 
meanval(i) = mean(env_ray); % mean of Rayleigh envelope
end;
 
y=sort(meanval./mean(meanval));%mean of y has been made equal to 1
sig=sqrt(log(std(y)^2+1));%parameter sigma for lognormal....... mean of y has been made equal to 1 (inside the bracket)
mu=-sig^2/2; %second parameter for lognormal
fylog=lognpdf(y,mu,sig);% theoretical lognormal pdf d on the data
[h xx]=hist(y,40);%histogram
plot(y/max(y),fylog/max(fylog),'r')
xlabel('Envelope r');
ylabel('Probability density function f(r)');
hold on
plot(xx/max(xx),h/max(h),'k-.')
 
chi_square=logtest(y,20)%chi square test

关键词: 信道仿真

Top_arrow
回到顶部
联系方式| 版权声明| 招聘信息| 广告服务| 银行汇款| 法律顾问| 兼职技术| 付款方式| 关于我们|
网站客服网站客服 程序员兼职招聘 程序员兼职招聘
沪ICP备19040327号-3
公安备案号:沪公网安备 31011802003874号
库纳格流体控制系统(上海)有限公司 版权所有
Copyright © 1999-2014, GUSUCODE.COM, All Rights Reserved