-
Notifications
You must be signed in to change notification settings - Fork 2
/
compPrecodMethods.m
40 lines (38 loc) · 1.47 KB
/
compPrecodMethods.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
clc;clear;
rng(122);
%% Ñèñòåìà
numTx = 32;
numUsers = 4;
numRxUsers = [1 1 1 1];
numSTSVec = [1 1 1 1];
mod = 4;
config = SystemConfig('numUsers',numUsers,'numTx',numTx,'numRxUsers',numRxUsers,'numSTSVec',numSTSVec);
%% Ñîçäàíèå êàíàëà
channel = StaticChannel('sysconf',config); % StaticChannel % RaylSpecialChannel
%% Ñèìóëÿöèÿ
snr = 0:40;
maxNumSimulation = 1;
sim = SimulationConfig('snr',snr,'maxNumSimulation',maxNumSimulation);
%% Ñîçäàíèå ìîäåëåé
modelZF = MassiveMimo('main',config,'downChannel',channel,'sim',sim,'precoderType','ZF');
modelMF = MassiveMimo('main',config,'downChannel',channel,'sim',sim,'precoderType','MF');
modelEBM = MassiveMimo('main',config,'downChannel',channel,'sim',sim,'precoderType','EBM');
modelRZF = MassiveMimo('main',config,'downChannel',channel,'sim',sim,'precoderType','RZF');
modelDIAG = MassiveMimo('main',config,'downChannel',channel,'sim',sim,'precoderType','DIAG');
modelMF.simulate();
modelZF.simulate();
modelEBM.simulate();
modelRZF.simulate();
modelDIAG.simulate();
%% Ïîñòðîåíèå ãðàôèêîâ
fig = figure();
modelMF.plotMeanBER('lineStyle','k','figObj',fig);
modelZF.plotMeanBER('lineStyle','--k','figObj',fig);
modelEBM.plotMeanBER('lineStyle','-.k','figObj',fig);
modelRZF.plotMeanBER('lineStyle',':k','figObj',fig);
modelDIAG.plotMeanBER('lineStyle','*-k','figObj',fig);
modelMF.downChannel.dispChannel();
modelZF.downChannel.dispChannel();
modelEBM.downChannel.dispChannel();
modelRZF.downChannel.dispChannel();
modelDIAG.downChannel.dispChannel();