📄 mimo_zeroforcing.m
字号:
function MIMO_zeroforcing
clear all;
close all;
M=2; % modulation constellation points
TX=2; % number of transmit antenna
RX=2; % number of receive antenna
N=5*TX*RX; %data stream length
% AWGN nosie generation
SNR=[1:1:15]; %signal to noise ratio in dB
No=(10.^((-SNR/10)))/2; %variance of the complex noise
%SNR=10*log(Eb/No), Eb=1 for BPSK mod. with +-1
%the 1/2 factor for determination complex noise
% MIMO channel
H=(randn(TX,N,length(No))+j*randn(TX,N,length(No)))/(sqrt(RX));
% to normalize power of channel every tansmited siganl power divided between all of receiver antennas: RX
% here "sqrt" is used because of change the power to amplitude
% the BER calculating loop
for k=1:length(No)
% BPSK data transmition
data=((2*round(rand(1,N)))-1); %BPSK modulation
% add AWGN nois
% Multiplexin for transmition on Multiple antenna
MultiplexData=reshape(data,TX,(N/TX));
TransData=H*MultiplexData;
% zeroforcing receiver
Hinv=pinv(H); % pseudoinverse of channel matrix
decorralator=Hinv*TransData; %projecting received data on channel space ( zeroforcing or interference nulling )
EstimData=pskdemod(decorralator,M);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -