资源简介
用来仿真可见光通信中完整的PPM调制的功能,
代码片段和文件信息
%PPM调制技术
close all;
clear all;
sumber=0; %误码率累加的初值
times=100; %求误码率的次数
for t=1:times;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
signal_Num=1024; %发送信号的个数
singal = zeros(1signal_Num) ; %为发送信号开辟存储空间
count_A = 0;%发送信号和接收信号相同个数初值
S_N = 0; %误码个数的初值
singal(1:1024) = round(rand(11024)); %产生伪随机序列(即发送信号)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ppm = zeros(1289); %ppm调制信号位宽288
decodeppm = zeros(1289); %解码后的信号位宽288
ppm_data_daly = zeros(128289); %延时后的信号
position_decode= zeros(1128);%PPM解调存储位置
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for k1 = 8:8:1024 ;%PPM调制
position1(k1) = singal(k1-7)*128 + singal(k1-6)*64 + singal(k1-5)*32 + singal(k1-4)*16 + singal(k1-3)*8 +singal(k1-2)*4 + singal(k1-1)*2 + singal(k1)*1 +1;
%可以打开工作区中的值查看
end
position = position1(position1 ~= 0); %8位调制在1-256中的某一位置,可以打开工作区中的值查看
for k5 = 1:1:128 %ppm调制的所有帧保留下来
ppm(1:30)=[000000000000000011110000000000] ; %帧头信息17-20位上是1其他均为0
ppm(31:( position(k5)+31))=0; %从31位到信息位都置0
ppm( position(k5)+32)= 1;%信息位置1
ppm(( position(k5)+33):289)= 0; %信息位之后的置0
ppm_data1(k5:) = ppm; %调制后的信号存在ppm_data1矩阵中
end
%%%delay对调制后的信号进行延时%%%
delay_time = 80;%延时时间
for i =1:128-delay_time
ppm_data_daly(i+delay_time:) = ppm_data1(i:);
end
for i=1:delay_time
ppm_data_daly(i:) = ppm_data1(i+128-delay_time:);
end
goa=[517.943287 523.8627052 514.1529329 542.2816282 530.3362154 529.0399798 514.9687343 505.6451645 510.2503082 504.95709 501.5287563 520.4613572 528.9791426 515.9445824 519.563331 500.2208329 522.7659846 510.4007484 520.9900452 532.8721589 497.4188406 527.5942596 516.1205636 510.4652708 527.9417009 514.9714637 519.3665952 516.5447053 513.3470655 508.1186798 519.2382727 509.5030725 526.0331691 535.3134194 522.4551698 533.1520781 512.1886342 513.4762893 514.5763536 526.6864208 527.5524488 515.2095901 500.9092329 512.8682131 509.9085933 512.2625004 507.248797 508.8779543 533.7903838 518.7602365 516.3743701 508.5749823 525.3916065 500.9615278 520.1561616 509.4255867 516.5235927 522.3367039 522.1849544 525.0490201 516.8541591 524.1629803 510.7484902 515.3049965 515.1648823 520.7582326 520.3773756 514.872992 527.8916723 514.6107572 521.6829119 517.7487064 517.1514216 520.7673007 509.7215764 512.7693249 517.9431018 537.2566777 505.7150553 534.3323731 524.7142236 520.8767935 518.6703005 521.3531924 515.3461293 509.7463798 514.6049667 525.6241584 516.5225145 512.1406982 514.3931608 529.2422744 529.6202518 520.0772685 517.1117834 518.2171564 526.7795163 505.3034002 525.9661036 521.9191368 515.2323932 520.9158097 520.587369 506.5816091 516.4210209 512.5957428 523.1729458 523.2065417 525.5029654 518.1018518 524.193027 530.6666454 532.1604574 511.0335806 514.2966682 507.6356213 516.2976587 521.7684137 512.4458109 507.8336468 525.9124058 525.3087059 509.6548543 520.689957
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 445169 2020-01-09 22:07 PPM.m
----------- --------- ---------- ----- ----
445169 1
- 上一篇:混沌tent映射tent分叉程序
- 下一篇:稀疏恢复算法 focuss
相关资源
- pbm/pgm/ppm图片的读写Matlab
- OFDM可见光通信系统仿真.zip
- vlc可见光通信室内建模
- 室内可见光通信一次反射功率分布m
- 室内可见光通信信噪比计算MATLAB代码
- 2PPM-TH.m文件是关于UWB调制技术的代码
- UWB无线通信系统采用脉冲位置调制P
- 可见光通信计算室内光强分布
- 计算可见光通信OOK调制方式的BER mat
- 室内可见光通信光照分布MATLAB代码
- Simulate BER of OOKNRZ 可见光通信中
- 计算室内光强分布情况的代码 (Opt
- 可见光通信MIMO和OFDM系统仿真
- visible-led-communication 这里给出了几个可
- visible_light_communication 可见光通信系统
- 可见光通信matlab仿真代码
- 可见光通信室内光照分布仿真
评论
共有 条评论