DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING
MINI PROJECT REPORT
Title: Simulation of Handover in Cellular Networks using
MATLAB
Subject Name: MOBILE COMMUNICATION NETWORK
SUBMITTED BY
YUVARAJ A
Name of the Student
R. OHM KUMARESH
23TC0346
Register Number
23TC0298
Year / Sem. / Sec.
III/VI/B
Topic
Simulation of Handover in Cellular Networks
using MATLAB
Date of Submission
Academic Year
2023-2027(Even Sem.)
Verified by
(Signature)
Simulation of Handover in Cellular Networks using MATLAB
INTRODUCTION
Wireless communication plays a major role in modern mobile communication systems.
Cellular networks are designed by dividing a large geographical area into smaller regions called
cells, where each cell is controlled by a base station. As users move from one cell to another
while communicating, maintaining continuous connectivity becomes an important
requirement. This is achieved through a process called handover or handoff.
Handover is the process of transferring an active call or data session from one base station to
another without interrupting communication. Efficient handover improves network
performance, reduces call drops, and ensures seamless communication for mobile users.
Handover techniques are widely used in GSM, LTE, and 5G cellular networks.
In this project, a MATLAB and Simulink based simulation of handover in cellular networks is
implemented. The simulation models the movement of a mobile user between two base stations
and calculates the Received Signal Strength Indicator (RSSI) continuously. Based on the RSSI
values and predefined conditions, the system decides when handover should occur.
The project also analyzes important parameters such as Signal-to-Interference Ratio (SIR),
handover delay, coverage regions, and handover event detection. This simulation helps in
understanding the practical working of mobility management and handover mechanisms in
wireless communication systems.
OBJECTIVE
To simulate handover in a cellular communication network using MATLAB and
Simulink.
To analyze the variation of RSSI as the mobile user moves between two base
stations.
To implement an RSSI-based handover decision algorithm.
To study the effect of hysteresis margin and Time-to-Trigger (TTT) in reducing
unnecessary handovers.
To visualize handover events, coverage regions, and serving base station changes
using graphical outputs.
To evaluate network performance parameters such as Signal-to-Interference Ratio
(SIR) and handover delay.
COMPONENTS REQUIRED
Software Requirements
1. MATLAB Software
2. Simulink Tool
3. MATLAB Signal Processing and Communication Toolboxes (optional)
Simulink Blocks Required
1. Ramp Block
2. Constant Block
3. Sum Block
4. Abs Block
5. MATLAB Function Block
6. Relational Operator Block
7. Switch Block
8. Scope Block
9. Mux Block
10. Display Block (optional)
THEORY OF OPERATION
The handover simulation is based on the movement of a mobile user between two cellular base
stations. Each base station continuously transmits signals, and the mobile device measures the
strength of the received signals.
The Received Signal Strength Indicator (RSSI) depends on the distance between the mobile
user and the base station. As the user moves away from one base station, the signal strength
decreases, while the signal from the neighbouring base station increases.
The RSSI is calculated using the path loss equation:
𝑅𝑆𝑆𝐼 = 𝑃𝑡 − 10𝑛log10 (𝑑)
Where:
𝑃𝑡 = Transmit Power
𝑛= Path Loss Exponent
𝑑= Distance between user and base station
Initially, the mobile user is connected to Base Station 1 (BS1). As the user moves closer to
Base Station 2 (BS2), the RSSI from BS2 becomes stronger. When the RSSI from BS2 exceeds
the RSSI from BS1 by a predefined hysteresis margin, the handover process is triggered.
To avoid unnecessary switching between base stations (ping-pong effect), a Time-to-Trigger
(TTT) delay is introduced. The handover occurs only if the target base station remains stronger
for a specified duration.
The simulation generates multiple outputs including:
RSSI variation graphs
Handover event detection
Signal-to-Interference Ratio (SIR)
Coverage region analysis
Serving base station plots
Handover delay analysis
Thus, the project demonstrates how cellular systems maintain seamless communication during
user mobility through efficient handover management.
Simulation Setup:
1. User Movement
A Ramp block is used to simulate the movement of the mobile user from 0 m to 1000 m
between two base stations.
2. Distance Calculation
The distance between the user and each base station is calculated using:
Sum Block
Abs Block
𝑑1 =∣ 𝑈𝑠𝑒𝑟 − 𝐵𝑆1 ∣
𝑑2 =∣ 𝑈𝑠𝑒𝑟 − 𝐵𝑆2 ∣
3. RSSI Calculation
A MATLAB Function block calculates the RSSI values using:
𝑅𝑆𝑆𝐼 = 𝑃𝑡 − 10𝑛log10 (𝑑)
Where:
𝑃𝑡 = Transmit Power
𝑛= Path Loss Exponent
𝑑= Distance
4. Handover Decision
The RSSI values are compared using a Relational Operator block.
Condition:
𝑅𝑆𝑆𝐼2 > 𝑅𝑆𝑆𝐼1 + 3𝑑𝐵
If the condition becomes true, handover is triggered.
5. Serving Base Station Selection
A Switch block selects the serving base station:
Output 1 → BS1
Output 2 → BS2
6. Output Display
A Scope block displays:
1. RSSI from BS1
2. RSSI from BS2
3. Serving Base Station
MATLAB CODE:
clc;
clear;
close all;
%% PARAMETERS
BS1 = 0;
BS2 = 1000;
% Base Station 1 position
% Base Station 2 position
user_pos = 0:10:1000; % User movement
Pt = 50;
% Transmit power (dBm)
n = 3;
% Path loss exponent
handover_margin = 3; % Hysteresis margin
TTT = 3;
% Time-to-trigger (samples)
%% ARRAYS
RSSI1 = zeros(size(user_pos));
RSSI2 = zeros(size(user_pos));
connected_BS = ones(size(user_pos)); % Initially connected to BS1
handover_timer = 0;
%% RSSI CALCULATION
for i = 1:length(user_pos)
d1 = abs(user_pos(i)-BS1);
d2 = abs(user_pos(i)-BS2);
if d1 == 0
d1 = 1;
end
if d2 == 0
d2 = 1;
end
RSSI1(i) = Pt - 10*n*log10(d1);
RSSI2(i) = Pt - 10*n*log10(d2);
end
%% HANDOVER DECISION WITH DELAY (TTT)
for i = 2:length(user_pos)
connected_BS(i) = connected_BS(i-1);
% Check if BS2 stronger than BS1 by margin
if RSSI2(i) > RSSI1(i) + handover_margin
handover_timer = handover_timer + 1;
else
handover_timer = 0;
end
% Handover only after delay
if handover_timer >= TTT
connected_BS(i:end) = 2;
break
end
end
%% HANDOVER LOCATION
handover_index = find(diff(connected_BS) ~= 0);
%% ==============================
%% 1. RSSI PLOT + HANDOVER EVENT
%% ==============================
figure;
plot(user_pos,RSSI1,'b','LineWidth',2);
hold on;
plot(user_pos,RSSI2,'r','LineWidth',2);
if ~isempty(handover_index)
scatter(user_pos(handover_index), ...
RSSI2(handover_index), ...
120,'filled','k');
end
xlabel('User Position (m)');
ylabel('RSSI (dBm)');
title('RSSI and Handover Event Marker');
legend('BS1','BS2','Handover Point');
grid on;
%% ==========================
%% 2. SIGNAL TO INTERFERENCE
%% ==========================
SIR = RSSI2 - RSSI1;
figure;
plot(user_pos,SIR,'m','LineWidth',2);
hold on;
yline(handover_margin,'--r','Handover Margin');
xlabel('User Position (m)');
ylabel('SIR (dB)');
title('Signal-to-Interference Ratio');
legend('SIR','Threshold');
grid on;
%% ====================================
%% 3. HANDOVER DELAY / DECISION TIME
%% ====================================
delay_signal = zeros(size(user_pos));
if ~isempty(handover_index)
delay_signal(handover_index-TTT+1:handover_index) = 1;
end
figure;
stairs(user_pos,delay_signal,'LineWidth',2);
xlabel('User Position (m)');
ylabel('Decision Active');
title('Handover Delay / Time-to-Trigger');
ylim([-0.2 1.2]);
grid on;
%% =====================
%% 4. COVERAGE REGIONS
%% =====================
coverage1 = RSSI1 > -85;
coverage2 = RSSI2 > -85;
figure;
area(user_pos,coverage1);
hold on;
area(user_pos,coverage2);
xlabel('User Position (m)');
ylabel('Coverage Availability');
title('Coverage Region Plot');
legend('BS1 Coverage','BS2 Coverage');
grid on;
%% ==========================
%% EXTRA: Serving Base Station
%% ==========================
figure;
stairs(user_pos,connected_BS,'LineWidth',2);
xlabel('User Position (m)');
ylabel('Connected BS');
title('Serving Base Station');
ylim([0.5 2.5]);
yticks([1 2]);
grid on;
%% DISPLAY RESULT
if ~isempty(handover_index)
fprintf('Handover occurred at %.2f meters\n', ...
user_pos(handover_index));
else
fprintf('No handover occurred\n');
end
WORKING PRINCIPLE
. A mobile user moves from Base Station 1 (BS1) toward Base Station 2 (BS2). As the user
moves away from BS1, its RSSI decreases, while the RSSI from BS2 increases.
The RSSI values are calculated using the path loss equation:
𝑅𝑆𝑆𝐼 = 𝑃𝑡 − 10𝑛log10 (𝑑)
The system continuously compares both RSSI values. When the RSSI from BS2 becomes
greater than the RSSI from BS1 by the hysteresis margin (3 dB), the handover process is
triggered.
The Switch block then changes the serving base station from BS1 to BS2, ensuring continuous
communication without interrupt
OUTPUT
This graph measures which cell tower (base station) the mobile user is connected to as the
user moves across position.
This graph shows how signal strength from both base stations changes as the user moves and
where the handover happens.
This graph is the Signal-to-Interference Ratio (SIR) Plot. It shows how much stronger BS2’s signal is
compared to BS1 as the user moves
This graph is the Handover Delay / Time-to-Trigger (TTT) Plot. It shows when the handover
decision logic becomes active before actually switching to the new base station.
OBSERVATIONS
1. The RSSI from Base Station 1 decreases as the user moves away from it.
2. The RSSI from Base Station 2 increases as the user moves closer to it.
3. Handover occurs when the RSSI from BS2 becomes greater than the RSSI from BS1
by the hysteresis margin.
4. The serving base station changes smoothly from BS1 to BS2 without communication
interruption.
5. The hysteresis margin helps to reduce unnecessary handovers and avoids the ping-pong
effect.
6. The simulation successfully demonstrates mobility management in cellular networks.
APPLICATIONS
Used in GSM, LTE, and 5G cellular communication systems.
Helps maintain uninterrupted voice calls and data transfer during user movement.
Used in mobile communication network planning and optimization.
Useful in studying mobility management and wireless communication concepts.
Applied in smart transportation and vehicular communication systems.
Used in research and development of advanced handover algorithms.
CONCLUSION
The simulation of handover in cellular networks using MATLAB and Simulink was
successfully implemented. The project demonstrated how a mobile user can move between two
base stations while maintaining continuous communication. RSSI-based handover decision
making was used to transfer the connection from BS1 to BS2 efficiently. The simulation also
showed the importance of hysteresis margin in reducing unnecessary switching. Overall, the
project provided a clear understanding of handover mechanisms and mobility management in
modern wireless communication systems.