当前位置:网站首页>M simulation of cooperative MIMO distributed space-time coding technology based on MATLAB
M simulation of cooperative MIMO distributed space-time coding technology based on MATLAB
2022-07-19 07:07:00 【I love c programming】
Catalog
3. Preview of some simulation drawings
4. Source code acquisition method
1. Algorithm description
be based on matlab Cooperation mimo Simulation of distributed space-time coding technology , Including rules LDPC cascade D-STBC,ML,ZF,DFE equilibrium ,Fincke-Pohst-MAP Algorithm detection . take The rules LDPC Join this collaboration MIMO Of D-STBC in , That is, will LDPC Code and D-STBC cascade , The sender uses LDPC Send the code to the collaboration node , Then the collaboration node uses D-STBC Forward to the sender in the form of code . To make a ML、ZF-OSIC and ,RLS-MIMO-DFE Performance comparison of bit error rate of three detection algorithms ( Be careful : During the process from the sender to the relay cooperation node , There are three protocols for the processing of source signals by relay cooperative nodes : Amplify and forward , Decoding, forwarding and coding cooperation , Therefore, the three detection algorithms under these three protocols should be done separately ), as well as LDPC And D-STBC Combined collaboration MIMO The system has nothing to do with LDPC Code collaboration MIMO Of D-STBC The system is in ML Performance comparison under detection algorithm ( Only do “ Coding collaboration agreement ” Next ). Compare LDPC cascade D-STBC Cooperation MIMO Under the system , The detection at the receiving end adopts ML Algorithm and Fincke-Pohst MAP.
2. Partial procedure
clc;
clear;
close all;
warning off;
addpath(genpath(pwd));
% QQ : 1480526168
% WeChat : lovemike121
% matlab/FPGA Project cooperation
Nt = 2;
Nr = 2;
Frame_Length = 512;
Error_Num = 1000000;% Count the number of errors
EbNo = 0.5:0.5:4.5;
P = 2;
QMod = modem.pskmod('M',P,'PhaseOffset',0);
QDemod = modem.pskdemod(QMod);
q = modulate(QMod,0:1);
Q = q;
for i = 2:Nt
Q = [q(reshape(repmat(1:2, length(Q),1),1,2*length(Q)));repmat(Q,1,2)];
end
%LDPC Parameters
N = Frame_Length;% Set parity matrix size
M = N/2;
max_iter = 99; % Maximum number of iterations
load H2;
load G2;
BERs = zeros(1, length(EbNo));
for kk = 1:length(EbNo)
kk
totalNumErr = 0;
count = 0;
SNR = 10^(EbNo(kk)/10);
N0 = 2*10^(-EbNo(kk)/10);
sigma = 1/(sqrt(SNR)/2);
ii = 0;
Dsd = 36; %db Count
Dsr = 36;
Drd = 36;
Qsd = sqrt(10^(Dsd/10));
Qsr = sqrt(10^(Dsr/10));
Qrd = sqrt(10^(Drd/10));
LL = 2;
while (totalNumErr < Error_Num)
kk
totalNumErr
% Generate data
data = round(rand(1,N-M));
%LDPC code
u = mod(data*G,2);
%BPSK
tx = 2*u - 1;
% Coding collaboration agreement
Trans_N1 = tx(1:N-M); %N1 Sequence
Trans_N2 = tx(N-M+1:2*(N-M));%N2 Sequence
%ii=1 When , Send your own codeword , and ii=2 Send the cooperative codeword when , So as to achieve the effect of time slot
ii = ii + 1;
% take N1 Send to destination
% take N1 Send to destination
% As the sending source
% Conduct AF relay
% Channel gain
Hsd=Qsd*(randn);
Hsr=Qsr*(randn);
Hrd=Qrd*(randn);
% Amplification gain of cooperative nodes
B=sqrt(1/(abs(Qsr)^2*1));
%===============================
% The weighting factor of the maximum merger ratio is calculated ( The first i The variable gain weighting coefficient of each branch is the ratio of the signal amplitude of the diversity path to the noise power )
% Calculate the gain
A0=conj(Hsd)/(1/(sqrt(LL)*EbNo(kk)));
A1=B*conj(Hsr)*conj(Hrd)/((B^2*(abs(Hsr))^2+1)*(1/(sqrt(LL)*EbNo(kk))));
% receive
MIMO_Rx = Trans_N1/max(abs(Trans_N1))+ 1/(sqrt(SNR))*randn(size(Trans_N1));
Ysr = Hsr*MIMO_Rx;
Yrd = Hrd*Ysr*B;
Ysd = Hsd*MIMO_Rx;
Y = A0*Ysd+A1*Yrd;
% Received binary signal
MIMO_Rx1 = Y;
Rec_data1= sign(MIMO_Rx1);
% take N1 Send to user 2
% take N1 Send to user 2
% receive
MIMO_Rx2 = Trans_N1/max(max(Trans_N1))+ 1/(sqrt(SNR))*randn(size(Trans_N1));
Ysr = Hsr*MIMO_Rx2;
Yrd = Hrd*Ysr*B;
Ysd = Hsd*MIMO_Rx2;
Y = A0*Ysd+A1*Yrd;
% Received binary signal
MIMO_Rx12 = Y;
Rec_data12 = sign(MIMO_Rx2);
% Second time slot , user 2 Send the user to the destination 1 The second frame signal of , The user 2 Recoded about U1 In groups N2 Bit check the modulation signal corresponding to the codeword
% stay USER2 in , Will receive N1 The sequence is recoded , Then put the sequence N2 Send to destination
rec_datas = -1*(Rec_data12-1)/2;
Ldpc_trans_data_user2 = mod(data*G,2);
Trans_N2_user2 = Ldpc_trans_data_user2(N-M+1:2*(N-M));%N2 Sequence
Trans_N2_user3 = 2*Trans_N2_user2-1;
%--------------------- Collaboration MIMO----------------------------------
Hsd=Qsd*(randn);
Hsr=Qsr*(randn);
Hrd=Qrd*(randn);
% Amplification gain of cooperative nodes
B=sqrt(1/(abs(Qsr)^2*1));
%===============================
% The weighting factor of the maximum merger ratio is calculated ( The first i The variable gain weighting coefficient of each branch is the ratio of the signal amplitude of the diversity path to the noise power )
% Calculate the gain
A0=conj(Hsd)/(1/(sqrt(LL)*EbNo(kk)));
A1=B*conj(Hsr)*conj(Hrd)/((B^2*(abs(Hsr))^2+1)*(1/(sqrt(LL)*EbNo(kk))));
% receive
MIMO_Rx = Trans_N2/max(abs(Trans_N2))+ 1/(sqrt(SNR))*randn(size(Trans_N2));
Ysr = Hsr*MIMO_Rx;
Yrd = Hrd*Ysr*B;
Ysd = Hsd*MIMO_Rx;
Y = A0*Ysd+A1*Yrd;
% Received binary signal
MIMO_Rx2 = Y;
Rec_data2= sign(MIMO_Rx2);
YY1 = [MIMO_Rx12,MIMO_Rx2]';
YY2 = [Rec_data12,Rec_data2]';
Tx = reshape(YY2,Nt, Frame_Length/Nt);
RayleighMat = (rand(Nr, Nt) + j*rand(Nr, Nt));
rr = size(RayleighMat*Tx,1);
cc = size(RayleighMat*Tx,2);
r = awgn(RayleighMat*Tx, inf);
Hs = RayleighMat;
HQ = Hs*Q;
ahat = zeros(Nt,Frame_Length/Nt);
yy2 = func_FP_MAP(r',(2*Nt)*(2/(SNR)),RayleighMat,[-1 1]);
tmps = demodulate(QDemod,yy2);
Rec_data = reshape(tmps,1,Frame_Length);
%LDPC decoding
Rec_data(find(Rec_data==0)) =-1;
Rec_data =-1*Rec_data;
z_hat = func_Dec(Rec_data,N0,H,max_iter);
x_hat = z_hat(size(G,2)+1-size(G,1):size(G,2));
%===========================================================================
count = count + 1;
totalNumErr = totalNumErr + biterr(x_hat', data);
end
BERs(kk) = totalNumErr/(count*Frame_Length);
end
figure;
semilogy(EbNo,BERs,'r-o');
grid on;
% save Fincke_Pohst_MAP.mat EbNo BERs
3. Preview of some simulation drawings
4. Source code acquisition method
Get the way 1:
Click the download link :
Access method 2:
Blog resource item , Search for resources with the same name as blog .
Access method 3:
If the download link fails , Blogger wechat contact .
01_050_m
边栏推荐
- IP fragment是什么意思?如何防御IP fragment攻击?
- 1. What is a server?
- pytorch张量
- Mingming loves drinking water
- Évaluation des performances de la machine virtuelle Tianyi Cloud Hangzhou (VPS)
- CDN是什么?使用CDN有什么优势?
- m在VBLAST协作MIMO系统分部使用LDPC,Turbo,卷积三种信道编译码进行误码率matlab仿真
- IP103.53.125.xxx IP地址段 详解
- SNN学习日记——安装SpikingJelly
- Weight matching (greedy)
猜你喜欢
Minecraft bedrock BDS service tutorial
高防服务器是如何确认哪些是恶意IP/流量?ip:103.88.32.XXX
m基于matlab的超宽带MIMO雷达对目标的检测仿真,考虑时间反转
PyTorch学习日记(二)
IP103.53.125.xxx IP地址段 详解
爬虫基础—多线程和多进程的基本原理
[automated testing] - robotframework practice (II) new test cases
Quickly learn to use cut command and uniq command
wcdma软切换性能matlab仿真m,对比平均激活集数(MASN)、激活集更新率(ASUR)及呼叫中断概率(OP)三个性能指标
字典、元组和列表的使用及区别,
随机推荐
Tower of Hanoi 2 (function)
Xiaodi network security - Notes (3)
University
剑指Offer刷题记录——Offer 04. 二维数组中的查找
华为云 鲲鹏ARM云服务器 和 x86云服务器 性能评测对比
Galaxy Kirin server system building local and LAN Yum source
Xiaodi network security notes - Information Collection - architecture, construction, WAF (8)
传奇手游怎么开服?需要投资多少?需要那些东西?
[automated testing] - robotframework practice (I) building environment
Sed command of text three swordsman -- text replacement; Grep command - text filtering
Mingming loves drinking water
正则表达式
mysql的复习总结
Decipher password (comprehensive)
My world 1.18.1 forge version open service tutorial, can install mod, with panel
1.服务器是什么?
传奇游戏架设教程
Data protection / disk array raid protection IP segment 103.103.188 xxx
PyTorch学习日记(二)
闭包与装饰器