0% found this document useful (0 votes)
6 views

MIMO-EC3501

Uploaded by

Ramya Velmurugan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

MIMO-EC3501

Uploaded by

Ramya Velmurugan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

VALUE ADDED EXPERIMENTS - DESIGN AND PERFORMANCE ANALYSIS OF 4X4

MIMO SYSTEM

Aim
To Write a matlab program for design and analysis of 4*4 MIMO SYSTEM.

Software tool Required:

 PC with Windows 10
 Matlab R2021

Procedure:
1. Define the parameters of Number of antennas, QPSK MODULATION, range of SNR values
(in dB) and number of transmitted symbols.
2. Create random binary data for transmission
3. Create a random 4x4 MIMO channel Matrix with complex Gaussian entries.
4. Reshape the transmitted signal to represent multiple antennas and transmit through the MIMO
channel
5 Compute the noise power for each SNR value and add complex Gaussian noise to the
transmitted signal to simulate a noisy channel.
6. Apply the Zero forcing equalizer by computing the pseudo inverse of the channel matrix and
Estimate the transmitted symbols after equalization.
7. Demodulate the estimated symbols back to binary data
8. Calculate the Bit error rate
9. Plot the graph between BER and SNR to analyze system performance.

Program:
clc;
clear all;
close all;
% MIMO System Parameters
M = 4; % Number of antennas (4x4 MIMO)
modOrder = 4; % QPSK modulation (2 bits per symbol)
SNR_dB = 0:2:20; % SNR values (in dB)
numSymbols = 1e4; % Number of symbols (total bits are numSymbols*2)
modType = 'qam'; % Modulation type (QPSK)
% Initialize variables
BER = zeros(1, length(SNR_dB)); % To store BER for different SNR values
% QPSK Modulation and Demodulation functions
qamMod = @(x) pskmod(x, modOrder, pi/4); % QPSK modulation with pi/4 rotation
qamDemod = @(x) pskdemod(x, modOrder, pi/4); % QPSK demodulation with pi/4 rotation
% Loop over different SNR values
for snrIdx = 1:length(SNR_dB)
% Generate random bits
data = randi([0 1], numSymbols*2, 1); % 2 bits per symbol for QPSK
dataSymbols = bi2de(reshape(data, [], 2), 'left-msb'); % Map bits to symbols
modSignal = qamMod(dataSymbols); % Modulate the signal using QPSK
% Reshape the transmitted signal to a matrix (M x symbolsPerAntenna)
symbolsPerAntenna = numSymbols / M; % Symbols per antenna
if mod(numSymbols, M) ~= 0
error('Number of symbols (numSymbols) must be divisible by the number of antennas (M).');
end
modSignalMatrix = reshape(modSignal, M, symbolsPerAntenna); % Each row corresponds to
one antenna
% Generate random 4x4 MIMO channel matrix H
H = (1/sqrt(2)) * (randn(M, M) + 1i*randn(M, M)); % 4x4 complex channel matrix
% Add noise to the signal based on SNR
snrLinear = 10^(SNR_dB(snrIdx)/10); % Linear SNR
noisePower = 1 / snrLinear;
noise = sqrt(noisePower/2) * (randn(M, symbolsPerAntenna) + 1i*randn(M,
symbolsPerAntenna)); % Noise
% Transmit the signal through the MIMO channel
receivedSignal = H * modSignalMatrix + noise; % Received signal at the receiver
% MIMO Detection (Zero-Forcing equalizer)
H_inv = pinv(H); % Zero-Forcing equalizer
detectedSymbols = H_inv * receivedSignal; % Detected symbols matrix
% Reshape detected symbols back to vector form
detectedSymbolsVec = detectedSymbols(:);
% Demodulate the received signal
demodSignal = qamDemod(detectedSymbolsVec);
% Convert demodulated symbols back to bits
demodBits = de2bi(demodSignal, 2, 'left-msb'); % Map symbols back to 2 bits each
demodBits = demodBits(:); % Reshape to a column vector
% Calculate Bit Error Rate (BER)
errors = sum(data ~= demodBits); % Compare original and received bits
BER(snrIdx) = errors / (numSymbols * 2); % Normalize by total number of bits
end
% Plot the BER vs SNR curve
figure;
semilogy(SNR_dB, BER, 'b-o');
grid on;
xlabel('SNR (dB)');
ylabel('Bit Error Rate (BER)');
title('BER vs SNR for 4x4 MIMO with QPSK');

Result:
Thus the matlab program for design and analysis of Performance of 4x4 MIMO System have
been implemented and output is verified

You might also like