资源简介
这是一个在瑞利信道下的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傅里叶变换程序
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- 用MATLAB(BPSK仿真 直接扩频)
- MATLAB实现的BPSK调制解调
- 基于matlab的BPSK调制解调
- MATLAB模拟MZM实现OOK和BPSK
- 16QAM调制与解调仿真代码
- 基于MATLAB的16QAM仿真代码
-
数字调制simuli
nk仿真.rar - DQPSK 调制解调器的MATLAB实现
- 基于MATLAB的数字调相系统的分析与仿
- 基于 MATLAB 的 DQPSK 调制解调器设计与
- 基于16QAM调制的OFDM系统仿真实现.zip
- 数字基带/带通仿真 含BPSK、QPSK、16Q
- 直接序列扩频系统MATLAB仿真(BPSK调制
- 基于MATLAB的QPSK建模仿真(小论文+m源
- qpsk调制解调fpga实现的非常完整工程,
- 16QAM信号调制解调Matlab仿真,可以运行
-
QPSK调制解调的simuli
nk仿真 - matlab高斯信道dbpsk分析
- 用matlab7.0软件对通信信号进行调制s
- QPSK的matlab
- 16qam仿真及注解
- 雷达波信号matlab仿真实现单频,线性
-
simuli
nk对QPSK系统的仿真 - matlab仿真qpsk gmsk msk fsk qam ask
- BPSK的matlab调制解调程序
- QPSK调制解调的Matlab仿真
- OFDM系统的MATLAB完整仿真
- OQPSK的matlab程序
- QPSK调制方式频带分析
评论
共有 条评论