资源简介
计算可见光通信OOK调制方式的BER matlab代码 自己调通了
代码片段和文件信息
clear
clear all
close all
q=1.6e-19;
% Charge of Electron
Ib=202e-6;
% Background Noise Current+interfernce
N0=2*q*Ib;
% Noise Spectral Density 2*q*Ib
Rb=1e6;
% bit rate.
Tb=1/Rb;
% bit duration
R=1;
% Receiver responsivity.
sig_length=1e5;
% No. of bits in the input OOK symbols.
snr_dB=0:9;
% signal-to-noise ratio in dB.
SNR=10.^(snr_dB./10);
% signal-to-noise ratio
for i=1:length(snr_dB)
P_avg(i)=sqrt(N0*Rb*SNR(i)/(2*R^2));
% average optical power
i_peak(i)=2*R*P_avg(i);
% peak photocurrent
Ep(i)=i_peak(i)^2*Tb;
% Peak Energy
sgma(i)=sqrt(N0*Ep(i)/2);
% sigma standard deviation
- 上一篇:粒子群算法优化问题matlab程序
- 下一篇:可见光通信计算室内光强分布
评论
共有 条评论