How can I simulate the MIMO section only?

3 vues (au cours des 30 derniers jours)
Liam
Liam le 18 Avr 2024
Commenté : Hengrun le 1 Avr 2025
How can I just simulate the MIMO section without using the helperMIMOBER function in the example? as the version of MATLAB I am using does not support the function nargin.
I need to simulate this so I can compared existing SISO results which I have obtained previously.
  3 commentaires
Liam
Liam le 21 Avr 2024
But what I am stuck with is how this: xt = 1/sqrt(Ntx)*(2*x-1)*wt maps to BPSK. and how would i map it to QPSK? would I square it or multiply it all by 2?
Hengrun
Hengrun le 1 Avr 2025
Hello Liam,
I'm afraid you cannot. QPSK is different in mapping."(2*x-1)"is used to map 1s,0s to 1 and -1. You can for sure use 1/sqrt(Ntx). For the mapping part, you can choose to use pskmod or qammod.

Connectez-vous pour commenter.

Réponses (1)

Sam Chak
Sam Chak le 21 Avr 2024
While I'm not an expert in BPSK and QPSK, I haven't encountered any problems when running the script in the link you provided and 'helperMIMOBER()' code on this MATLAB Answers forum.
%% The Script:
c = 3e8; % propagation speed
fc = 60e9; % carrier frequency
lambda = c/fc; % wavelength
txcenter = [0;0;0];
rxcenter = [1500;500;0];
[~,txang] = rangeangle(rxcenter,txcenter);
[~,rxang] = rangeangle(txcenter,rxcenter);
txsipos = [0;0;0];
rxsopos = [0;0;0];
g = 1; % gain for the path
sisochan = scatteringchanmtx(txsipos,rxsopos,txang,rxang,g);
Nsamp = 1e6;
x = randi([0 1],Nsamp,1);
ebn0_param = -10:2:10;
Nsnr = numel(ebn0_param);
% Now, we call the helperMIMOBER() function:
ber_siso = helperMIMOBER(sisochan,x,ebn0_param)/Nsamp
ber_siso = 1x11
0.3274 0.2866 0.2396 0.1861 0.1310 0.0789 0.0374 0.0123 0.0023 0.0002 0.0000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
%% the helperMIMOBER() function
function nber = helperMIMOBER(chan, x, snr_param, wt, wr)
Nsamp = size(x,1);
Nrx = size(chan,2);
Ntx = size(chan,1);
if nargin < 4
wt = ones(1,Ntx);
end
if nargin < 5
wr = ones(Nrx,1);
end
xt = 1/sqrt(Ntx)*(2*x-1)*wt; % map to bpsk
nber = zeros(Nrx,numel(snr_param), 'like', 1); % real
for m = 1:numel(snr_param)
n = sqrt(db2pow(-snr_param(m))/2)*(randn(Nsamp,Nrx)+1i*randn(Nsamp,Nrx));
y = xt*chan*wr+n*wr;
xe = real(y)>0;
nber(:,m) = sum(x~=xe);
end
end

Catégories

En savoir plus sur Propagation and Channel Models dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by