下载频道> 资源分类> matlab源码> 通信信号> VLC

标题:VLC
分享到:

所属分类: 通信信号 资源类型:程序源码 文件大小: 5.21 KB 上传时间: 2020-04-23 17:12:41 下载次数: 0 资源积分:1分 提 供 者: rui0921 VLC简单模型(470786)
内容:
clear all;

close all;

clc;

 

 

[length,width] = meshgrid(0.5:0.05:5);

%length=5;

%width=5;

height=3;%��������

Aroom=length.*width;%��������

Arx=50;%the receiveing area

d=3;

psi=30;%������

psic=70;%��������

phi_half=pi/3;

Tf=1%transmission coefficient

g=6;%the concentrator gain ������������

Ba=4.5E6;  %amplifier bandwidth

amplifier_current = 0.01;%����������

Pn=3.3*5.84E-3; %the noise power of the ambient light��������������

q=1.602176487E-19;

R=0.4;  %photodiode responsivity������������������

 

nLED=4;%LED����

pLED=0.02;%����LED����

 

Rf = 0.15;  %��������

Rc = 0.8; %����������

Rw = 0.9; %��������

Af=Aroom;%��������

Ac=Aroom;%����������

Aw=length*d;%��������

 

m=-log(2)./log(cos(phi_half));%the order of Lambertian emission 

Ro=real(((m+1)./(2*pi))*cos(phi_half*2)^m);%Lambertian radiant intensity

 

%hlos = HLOS(Arx,d,psi,psic,Ro);

%Hlos = ones(1,length(Ro));

if ((psi >= 0) && (psic >= psi)) 

    Hlos = Arx/(d^2)*Ro*cos(psi);

elseif (psi>psic)         

        Hlos = Hlos*0;         

end;

 

Ptx=pLED*Ro;

Prxlos=Ptx.*Hlos*nLED;

 

 

I2=0.562;  %the noise-bandwidth factor

Rb=5120000;  %date rate

 

 

 

 

Bn=I2*Rb;  %the nosie-bandwidth

 

rhof=Rf.*Af;%

rhoc=Rc.*Ac;

rhow=Rw.*Aw;

rho = (1./Aroom) .* (rhof + rhoc + rhow);%the average reflectivity

 

 

%����

PtotalLED=nLED*pLED;%the total power of all the LEDs

Ii = rho .* (PtotalLED./Aroom);%i����������

I = Ii./(1-rho);%the total intensity

Pdiff=Arx.*I;%the received diffuse power 

%Pdiffloss=Pdiff/PtotalLED;

Prx=(Prxlos+Pdiff)*Tf*g;

%PDoutput_current=Prx*R;

 

 

%%����

%Ba=4.5E6;  %amplifier bandwidth

%amplifier_current = 0.01;%����������

%Pn=3.3*5.84E-3; %the noise power of the ambient light

%q=1.602176487E-19;

%R=0.4;  %photodiode responsivity

sigmaamp=amplifier_current^2*Ba; %the amplifier noise variance

sigmaamb=2*q*R*(Prx+Pn)*I2*Rb;%the ambient noise

sigmatotal=sigmaamp+sigmaamb;

 

 

%%SNR

SNR=(R*Prx)^2./sigmatotal;%

SNRdb = 10*log10(SNR);

%length=0.5:0.05:5;

%[length,width] = meshgrid(length);

figure

mesh(length,width,SNRdb);

xlabel('Roomlength');ylabel('Roomwidth');zlabel('SNRdb');

 

%%������

Q = (1/2)*erfc((sigmatotal./(R*Prx.^2)./sqrt(2)));

BER=Q*sqrt(SNR);

figure

mesh(length,width,BER);

xlabel('Roomlength');ylabel('Roomwidth');zlabel('BER');

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

文件列表(点击上边下载按钮,如果是垃圾文件请在下面评价差评或者投诉):

VLC模型
VLC模型\VLC.asv
VLC模型\VLC.m
VLC模型\VLC2.asv
VLC模型\VLC2.m

关键词: 可见光

Top_arrow
回到顶部
联系方式| 版权声明| 招聘信息| 广告服务| 银行汇款| 法律顾问| 兼职技术| 付款方式| 关于我们|
网站客服网站客服 程序员兼职招聘 程序员兼职招聘
沪ICP备19040327号-3
公安备案号:沪公网安备 31011802003874号
谷速代码 版权所有
Copyright © 1999-2014, GUSUCODE.COM, All Rights Reserved