⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.m

📁 是一个根据最新LTE标准写的一个链路实现程序和信道估计程序
💻 M
字号:
clear all;clc
a=rand(1,2752)>0.5;
turbo_code=turbo_code(a);
[flag_p1,flag_p2,daopin1,daopin2]=polit_gen();
[data1,data2,test]=enframe(turbo_code);
[TrData_p1,TrData_p2]=ofdm(data1,daopin1,data2,daopin2);
[anten_one,anten_two] = channel(TrData_p1,TrData_p2);
[polit_re_p1,polit_re_p2,receive_data1,receive_data2] = data_get(anten_one,anten_two,flag_p1,flag_p2);
[estchan_one_one,estchan_two_one,estchan_one_two,estchan_two_two]=channelestimation();
[data_one,data_two] = mimo_decoder(receive_data1,receive_data2,estchan_one_one,estchan_two_one,estchan_one_two,estchan_two_two);
[data_re_p1,data_re_p2] = deframe(data_one,data_two);
turbo_re = demodulation(data_re_p1,data_re_p2);
signal = decode(turbo_re);
% ***********计算误码率***********
M = 4; EbNo = [0:20];
% Convert from EbNo to SNR.
% Note: Because No = 2*noiseVariance^2, we must add 3 dB to get SNR. For details, 
% see Proakis book listed in "Selected Bibliography for Performance Evaluation."
snr = EbNo+3+10*log10(k);
ynoisy=zeros(n,length(snr)); % Preallocate to save time.
% Compute symbol error rate from simulation.
[num,rt] = symerr(a,signal);
hold on; semilogy(EbNo,rt,'b.');
title('Comparing  Error Rates');
hold off;
% ********************************
% 测试误码
ber_data = turbo_code - turbo_re
ber_polit = polit_re_p1 - daopin1
ber_data_1 = data_re_p1 - test

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -