資源簡介
關(guān)于室內(nèi)可見光通信的仿真,利用Led作為照明光源和信號源,同時承擔(dān)照明和通信兩方面的作用,進行了通信性能的分析。

代碼片段和文件信息
N=5000;?????????????????????????????????%每次仿真的點數(shù)
ber=zeros(18);????????????????????????%誤比特率值,應(yīng)與信噪比取值個數(shù)一致
for?EbN0=2:2:16????????????????????????%信噪比的取值范圍
????ErrorBits=0;????????????????????????%每個信噪比下誤比特數(shù)?
????Nframe=0;???????????????????????????%每個信噪比下產(chǎn)生幾次隨機信號?
????while?ErrorBits<100????????????????%每個信噪比下仿真結(jié)束的條件,誤比特數(shù)達(dá)到100
????????N_source?=?randint(1N);???????%產(chǎn)生隨機信號
??????%編碼后的符號
??????
???????%插值
???????%濾波,采用平方根升余弦濾波器?
????????%進行卷積運算?
????????%進行時域疊加
???????%根據(jù)SNR值,加入高斯白噪聲
?????%匹配濾波
??????%下采樣
???????%?判決
????????ErrorBits=ErrorBits+length(find(r_data~=N_source));???%統(tǒng)計誤比特數(shù)
????????Nframe=Nframe+1;
????end?
????ber(EbN0/2)=ErrorBits/N/Nframe;
end
%?EbN0=2:2:16;?
%?error_theory=(1-(1-(2*(1-1/sqrt(64))*1/2*erfc(1/sqrt(2)*sqrt(3*4*10.^(EbN0/10)/(64-1))))).^2)/4;?%理論誤比特率
figure;
semilogy(EbN0ber‘x-‘);%實際誤比特率
xlabel(‘Eb/N0(dB)‘)ylabel(‘BER‘)
title(‘……‘);
legend(‘……‘)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1076??2016-12-14?16:55??VLC_simulation\ber_sample.m
?????文件????????893??2017-02-19?20:50??VLC_simulation\channel_part.m
?????文件????????615??2017-02-19?20:48??VLC_simulation\final_part.m
?????文件????????800??2017-02-19?20:48??VLC_simulation\interp_part.m
?????文件???????1141??2017-02-19?20:47??VLC_simulation\main.m
?????文件????????359??2017-02-06?11:09??VLC_simulation\myDTFT.m
?????文件????????337??2017-02-04?10:57??VLC_simulation\myexDTFT.m
?????文件????????359??2014-05-29?18:31??VLC_simulation\myFT.m
?????文件????????391??2014-05-29?21:19??VLC_simulation\myIFT.m
?????文件????????148??2014-05-27?10:09??VLC_simulation\myINTER.m
?????文件????????523??2017-02-19?21:50??VLC_simulation\noise_part.m
?????文件????????610??2017-02-19?20:48??VLC_simulation\pr_part.m
?????目錄??????????0??2017-11-21?17:45??VLC_simulation
-----------?---------??----------?-----??----
?????????????????7252????????????????????13
評論
共有 條評論