资源简介
这是一个在瑞利信道下的BER的仿真图的程序,共有三个调制方式:bpsk qpsk 和16qam
代码片段和文件信息
% SNR_start=0;
% SNR_delta=1;
% SNR_stop=40;
% BER_stop=0.00001;
% sigma=0.5;
%
% % Choose a file to save the results into.
% filename = [‘results_‘num2str(SNR_start)‘.mat‘];
% % Doing the simulation frame-by-frame rather than bit-by-bit speeds it up. This is because we can use vector operations instead of longer loops.
% frame_length = 10000;
% % Setup the SNR for the first iteration of the loop.
% SNR_count = 1;
% SNR = SNR_start;
% BER = 1;
%
% % Loop until the job is killed or until the SNR or BER target is reached.
% while SNR <= SNR_stop && BER >= BER_stop
%
% % Convert from SNR (in dB) to noise power spectral density.
% N0 = 1/(10^((SNR+3.0103)/10));
%
% % Counters to store the number of errors and bits simulated so far.
% error_count=0;
% bit_count=0;
%
% % Keep going until enough errors have been observed. This runs the simulation only as long as is required to keep the BER vs SNR curve smooth.
% while error_count < 100
% %--------------------------------------------------------------------------
%
% % BPSK Generate 10000 symbols each contain 2 bits
% % rand(‘seed‘1);
% realpart=round(rand(1frame_length));
% imagpart=round(rand(1frame_length));
% a=2^(-1/2);
% xk=2*a*((realpart-0.5)+i*(imagpart-0.5));
%
% % passing channel
%
% xt=xk; % no phase and amplitude distortion
%
%
% % additive white Gaussian noise (AWGN)
% snr=1/N0;
% Ls = length(xt);
% sigma_x=std(xt);
% sigma_n = 1/sqrt(2*snr);
% noise=sigma_x*sigma_n*(randn(1Ls)+i*randn(1Ls));
%
% % fading channel
% channel = sqrt(sigma)*(randn(1Ls)+i*randn(1Ls));
%
% xt_addnoise = xt.*(channel) + noise;
%
% % decode the signal
% xk_hat=xt_addnoise; % down-sample the signal
%
%
% b_1hat=real(xk_hat)>0;
% b_2hat=imag(xk_hat)>0;
%
% error_count=(sum(b_1hat~=realpart)+sum(b_2hat~=imagpart))+error_count;
% bit_count=bit_count+frame_length*2;
%
% % BER=(sum(b_1hat~=realpart)+sum(b_2hat~=imagpart))/20000
%
% end
%
% % Calculate the BER.
% BER = error_count/bit_count;
%
% % Store the SNR and BER in a matrix and display it.
% results(SNR_count1) = SNR;
% results(SNR_count2) = BER
%
% % Save the results into binary files. This avoids the loss of precision that is associated with ASCII files.
% save(filename ‘results‘ ‘-MAT‘);
% semilogy(results(:1)results(:2)‘bv-‘);
%
% xlabel(‘Eb/No (in dB)‘)
% if BER_stop ~= 0
% ylim([BER_stop1]);
% end
% if SNR_stop ~= inf
% xlim([SNR_start SNR_stop]);
% end
%
% % Setup the SNR for the next iteration of the loop.
% SNR = SNR + SNR_delta;
% SNR_count = SNR_count + 1;
% end
% results1=res
- 上一篇:MATLAB时域有限差分法程序
- 下一篇:MATLAB傅里叶变换程序
相关资源
- QPSK调制解调代码
- QPSK with matlab code and pi/4 DQPSK
- Matlab _ MIMO + QPSK + ML/MMSE/ZF
- 基于matlab的QPSK仿真
- 瑞利衰落信道下无分集,2分集,4分集
- 16QAM调制解调
- 2份BPSK调制解调仿真的MATLAB代码,其中
- LDPC仿真,matlab BP算法 LDPC编解码的m
- BPSK和QPSK调制解调原理及MATLAB程序
- 基于-MATLAB-的QPSK系统仿真设计与实现
- 一个完整的BPSK仿真MATLAB代码,发射机
- 单载波为、BPSK、QPSK三种情况下锁相环
- 5份基于MATLAB的关于扩频+BPSK/QPSK仿真代
- 4份直接序列扩频+BPSK/QPSK的MATLAB仿真程
- RS码编码所需关键步骤为自行编写实现
- 一个小通信系统的MATLAB源代码仿真或
-
OFDM的QPSK的simuli
nk仿真,matlab 2016a版 - BPSK调制解调 科斯塔斯环载波同步 加
- 多进制空时分组码(STBC)matlab仿真
- 卷积编码和viterbi译码,调制方式为
- QPSK信号+白噪声程序MATLAB
- 16qam调制识别matlab
-
QPSK调制simuli
nk实现 - matlab的qpsk通信仿真
- DQPSK调制与解调
- LDPC的matlab 仿真 BP算法 BPSK调制
- QPSK松尾环载波同步MATLAB仿真
- 基于Matlab的PI/4 DQPSK的调制解调源代吗
- QPSK高斯白噪声信道和瑞利信道的误码
-
OQPSK调制解调器Simuli
nk仿真
评论
共有 条评论