You are on page 1of 18

Planning Wireless Network using Graph Theory

Made By: πoneers

Mohamed Alaa Elden Atfat


Mahmoud Mohamed Abdul-Hamid
Mostafa Khaled Khalifa
Mostafa Amr Mohamed
Mostafa Magdy Ibrahim
Mostafa Mohamed Rabie
Yousef Tamer Salah-Eldin
Yousef Essam Abobakr

Presented to:
Prof. Samah El-Shafiey El-Tantawy
Simulation and Experimental Work
Three topology control centralization methods were suggested. In this paper, it is required to find the
best among them according to multiple parameters.

The three topology controls are:

1. Minimum Spanning Tree (MST)


2. Minimum Connected Dominating Set (MCDS)
3. Gabriel Graph (GG)

It is needed to find the best among them in different scenarios according to:

1. Energy consumption: how much energy on average each connection would consume.
2. Congestion: How many connections on average each car has to handle at any given moment.
3. Signal path: How many hops on average a signal has to take from the sender to the receiver.

Each parameter tests an aspect of the network. Energy consumption measures the economic aspect of
the network. It measures how hungry is the network to energy. To sustain the connectivity of the
established connections, and according to the energy model discussed in the mathematical modelling
process, the energy needed to sustain the connection between two nodes is directly proportional to the
squares of their Euclidean distances. The average energy consumption on a certain topology is indicated
by averaging the squares of the weights of the existent edges in a network over the number of the
edges. It determines the types of vehicles that can participate in network. For example, small battery
vehicles can’t participate in energy consuming network.

Congestion measures the technological requirements of the network. If the network requires every
vehicle to handle a high number of connections, then this topology isn’t suitable for simple devices and
requires more sophisticated transmitting devices.

Signal path parameter determines the dependency of each any two nodes on the rest of the network.
Two nodes are dependent if they have intermediate nodes that handle the connection. The more the
number of intermediate nodes the more dependent is the two end nodes. This parameter can be used
as an indication of the stability of the network.

To begin with, a platform was needed to handle the simulation, but it should have:

1. The ability and ease to handle multiple dimensional arrays


2. The ability and enough libraries to deal with graphs of nodes and edges
3. The ability to deal with multiple plots at the same time

Data Utilized in the Simulation:

Several data are required to run the simulation:

Several types of data will be used to create our simulation, it consists of:

1- An image for a map.


2- The number of cars moving on the map.
3- Transmission range of each car in the map.
1- Image of the map:

Different maps are chosen to test every topology against different scenarios. This helps to obtain results
that matches the reality and to observe the environments that suites each topology.

At first, images of actual streets in Cairo were taken from google maps. Then, these images were passed
on multiple levels of image processing to obtain a graph that matches the map. A graph matches the
map if and only if its edges coincide on the streets of the map. Four steps were done to transfer the
image of the map to a graph.

Fig.1: (A) The original map before processing


(B) The map after contrasting (the roads in white pixels) (C) Flipping the contrasted map
(D) Skeletonizing the roads (Reducing their thicknesses) (E) Transforming the skeleton into a road network graph
(F) The road network graph on the original graph

1. The image was binarized according to its luminosity, this step was done from fig.(1A) to fig.(1B).
the result was that streets are in white while everything else is in black.
2. The image’s white pixels were eroded outward, this step was done from fig.(1B) to fig.(1C). This
was to fill the black dots inside the streets and also to get any white detached pixels back to the
streets. The result was clear image of streets being white without any tiny white clusters.
3. Skeleton is then obtained from the white streets, this step is shown from fig.(1C) to fig.(1D). This
step was done to prepare for forming the graph.
4. Graph is formed from the skeleton. This step is shown from fig.(1D) to fig.(1E). At this step,
white segments are exchanged with edges and intersection of segments was exchanged with
nodes.

In fig.(1F), the initial photo is then compared to the final graph to judge the output graph. This graph
represents the streets upon which the moving nodes (which represents the actual cars) would move.

Three different maps, with specific characteristics for each one, are used:
1. Tahrir square: This map has a mix of straight and curved wide streets. It represents an example
of well-planned streets, shown in Table(1.A)
2. El-Dokki: This map contains narrow streets mixed with narrow rings. It represents an example of
a map which has some poorly designed streets which are common among Cairo. Shown in
Table(1.B)
3. Helwan: This map represents narrow, close and unplanned streets which are the norm in slums
that are spread across Cairo, shown in Table(1.C)

2- Number of nodes per trial:

This data will be chosen according to real data from google maps which shows the traffic in our three
studied locations at different times on Sunday (1/5/2022) and Monday (2/5/2022). It is assumed that
the degree of traffic jam is on a scale from 0 to 5 so if the studied location has the degree of 5 that
means that it will have the maximum number of nodes in the simulation and if it has a degree of 1 it will
have one-fifth of the maximum number of nodes. Applying these different maps aims to simulate real
life settings. (That will be shown in the next table).

Note: the number below each map represents the degree of the traffic jam

Table(1): Traffic Data for different timestamps for 3 maps


Location Date 8:00 AM 12:00 PM 6:00 PM 10:00 PM

Sunday
(1/5/2022)

(A)
(1) (3)
El- (4) (2)
Tahrir
Square

Monday
(2/5/2022)

(2) (4) (5) (3)


Sunday
(1/5/2022)

El-
Dokki (2) (4) (5) (3)

Monday
(2/5/2022)

(2) (3) (3) (3)

Sunday
(1/5/2022)

Nasr
City (2) (3) (3)
(4)

Monday
(2/5/2022)

(2) (3) (4) (4)


3- Transmission Range:

The connection between moving vehicles (V2V) depends on the transmission range of the OBUs
(on-board units) which is a specific feature for the type of OBU so it will be used as input data which will
be essential information to create the connection between moving vehicles. In the simulation, we will
assume the transmission range R based on equation (3) in the mathematical modeling report.

Topology Control Algorithms Implementation Details

1- Minimum Connected Dominating Sets (MCDS):

In MCDS, there are two types of nodes: Covered Nodes, and Uncovered nodes.

In order to implement some efficient logic to classify these nodes, A simple but effective trick was used
based on digraphs. Although, digraphs are not used in this research to create and simulate our
networks, digraphs were just used as a means for implementing the d-MCDS algorithm.

Def.: Digraphs DG (aka.: Directed Graphs) are defined in a similar manner to normal undirected graphs.
They are defined as an ordered pair of two sets (V, E). V (also written as 𝑉(𝐷𝐺)) is the traditional set of
vertices of the graph DG, while the set E is a set of ordered pairs (𝑣 , 𝑣 ) where 𝑣 , 𝑣 ∈ 𝑉(𝐷𝐺). This
definition extends the concepts of edges to hold directions. An edge directed towards a certain node, is
called an in-edge of the node, while an edge directed away from the node is called an out-edge of the
node. The concept of a degree is extended then to hold this information. The indegree of a node is the
number of in-edges incident on the node, while the outdegree of a node is the number of out-edges
incident on the node. If an edge is directed from 𝑣 𝑡𝑜 𝑣 , it is said that 𝑣 is a predecessor of 𝑣 , and 𝑣 is
a successor of 𝑣 .

With these necessary concepts introduced, Digraphs are used in the d-MCDS algorithm to track the
states of the nodes. In the algorithm, we define the pDegree of a node at a certain state to be the
number of uncovered neighboring nodes at this state. To classify the nodes at a certain state using
digraphs, covered nodes have no in-edges. Accordingly, the neighboring uncovered nodes of a certain
node are determined by the number of successors of the node, since covered nodes have no in-edges. In
other words, covered nodes have an in-degree of zero, and the number of uncovered neighboring nodes
of a certain node at a certain state is the outdegree of the node. The pDegree is then determined by the
outdegree of the nodes.

The following steps are iterated: It is required at each state to determine the covered node with the
maximum pDegree to be elected as a dominator. In the next state, the new dominator and the newly
covered nodes are covered by removing their in-edges.

These steps are iterated until the outdegree of all the nodes in the digraph are zeros.

2- Gabriel Graphs (GG):

Gabriel Graphs have simple and straightforward implementation. The elements of the original edge set
of the UDG are iterated, to find the coordinates of the midpoint of the edge. It needed to know if there
are nodes that are present in the circle whose diameter is the edge weight and centered at the edge
midpoint. A node can only exist in this circle when they are neighbors to the end nodes of this edge. We
then iterate on the neighboring of the two end nodes of the edge and calculate the distance from each
of these nodes to the midpoint of the edge. This distance is compared to the radius of the circle and
accordingly, it is determined whether this node is present in the circle or not. This algorithm has a worst-
case complexity of 𝑂(𝐸𝑉) where E is the number of edges of the UDG, and V is the number of vertices
of the UDG.

Simulation Design

At this point we have two graphs:

- The graph of the map which represents the street


- The graph of the moving cars and the network to be analyzed

The cars (moving nodes) were given random starting point and ending point in the map graph.

1. The shortest path between the starting point and ending point was found by Dijkstra’s
algorithm. The random end points are subset from the points which are at the edges of the map.
2. Nodes that reach their end points are destroyed and taken out of the graph.
3. All cars were given the same transmission range and were all moving with speeds proportional
to the length of the edge on which they move on‫ز‬
4. The measured distances between the moving cars are compared to transmission range. If they a
given car is in the range of the other, edge is assigned between them. This was done based on
the unit disc model.
5. The topology control is then applied after all edges are assigned at each specific frame to
remove the excess edges according to topology.
6. Then results are measured by the end of each frame.
7. The simulation will end after 75% of the cars reach their destination. At that point the
simulation will no longer be realistic.
8. The simulation is run 12 times, 4 per map. In the first run, UDG is applied without any topology,
acts as reference, then three topologies are run one after the other.
9. In each run results were obtained plotted separately.

Results Calculation Methods

1. Energy consumed is proportional to the square of the distance between the two connecting
nodes, as demonstrated in the mathematical mode. So, to test this parameter, weights were
assigned to the edges according to the distance between them. After each frame, each weight is
squared. Then, all the squared weights were summed. At that point we have, we have the sum
of squared distances at a given frame 𝑆 . 𝑆 is then added to the sum of all frames distance
squared 𝑆. finally, 𝑆 is divided by the total number of frames at any given frame to obtain the 𝑅
averaged over the number of present edges. The data is then plotted on a graph
2. Congestion parameter is measured by counting the number of nodes that have connections
from 1 to 40 each frame. Then the number of nodes having same degrees are averaged over all
the frames. The data is then plotted on bar chart.
3. Dependency, in fact, has limit. In the best-case scenario, the dependency (the number of
intermediate nodes) should be equal to Dijkstra’s path length when applied to UDG. So, it is
needed to compare each topology dependency relative to the ideal case. In each frame. Two
matrices that have dimensions of 𝑛 × 𝑛 were created. In the first matrix 1, each cell holds the
length of the nodes between node I and J calculated after applying the topology. In the second
matrix 2, each cell holds the length of the nodes between node I and J calculated without
applying any topology. Then each cell in matrix 1 was divided by the corresponding cell in matrix
2. After that, the ratio of all cells to their corresponding are added and divided by the number of
paths. The result is the averaged multiple of shortest path in the ideal case due to each
topology.
4. The connectivity was measured once after applying the UDG to ensure that the network is
connected enough to conduct the other three tests. Connectivity wasn’t measured for each
topology because each topology is supposed to maintain the same conductivity.

Fig.2: Connectivity analysis on different maps


(a) Map 1 with the UDG
before applying any topology
control methods

(b) Map 1 after applying MST

(c) Map 1 after applying


MCDS

(d) Map 1 after applying GG


Power consumption Congestion Stability

Before
applying
any
topology
control
methods

(a) (b) (c)

MST

(d) (e) (f)

MCDS

(g) (h) (i)

GG

(j) (k) (l)

Table(2): Simulation Results and Parameters Testing on El-Tahrir Square Map


(a) Map 2 with the UDG
before applying any topology
control methods

(b) Map 2 after applying MST

(c) Map 2 after applying


MCDS

(d) Map 2 after applying GG


Power consumption Congestion Stability

Before
applying
any
topology
control
methods

(a) (b) (c)

MST

(d) (e) (f)

MCDS

(g) (h) (i)

GG

(j) (k) (l)


Table(3): Simulation Results and Parameters Testing on El-Dokki Map
(a) Map 3 with the UDG
before applying any
topology control methods

(b) Map 3 after applying


MST

(c) Map 3 after applying


MCDS

(d) Map 3 after applying GG


Power consumption Congestion Stability

Before
applying
any
topology
control
methods

(a) (b) (c)

MST

(d) (e) (f)

MCDS

(g) (h) (i)

GG

(j) (k) (l)


Table (4): Simulation Results and Parameters Testing on Nasr City Map
Results Evaluation

- Degrees vs Number of nodes (Congestion):

1. It is evident from the Table(2-3-4)-Fig.(a-b-c) that the distribution of nodes among their degrees of the
UDG graph in all of the three maps resembles normal distribution graph, which is expected since nodes
starting points and end points are chosen randomly.

2. MST shows positively skewed normal distribution in all the three maps with a tight standard
deviation. So, on average the nodes would have low range of low degrees.

3. Due to the nature of dominating sets and as expected from the way the d-MCDS algorithm is applied,
there are a large number of dominatees “they are nodes with degree of 1” and on the other side nodes
with large degrees “since the algorithm is degree based”, in some cases as shown in the results, the
degree of the dominators may even surpass 27 or even 30. This leads to high congestion at the
backbone nodes.

4. GG shows positively skewed normal distribution with a moderate standard deviation in all the three
maps. So, on average the nodes can have a wide range of low degrees.

- Average 𝑅 over the number of present edges vs frames:

1. MST have average 𝑅 over the number of present edges at steady state that is below the 1/3 of the
maximum UDG value. It also appears that the energy consumption per edge is stable after reaching the
steady state. It is clear in all maps except for the last map.

2. MCDS has average 𝑅 over the number of present edges that is higher than the UDG. Also, it has a
narrow range of variation with respect to the maximum. It also has unpredictable trend, which means
that the trend is dependent on the map.

3. GG has average 𝑅 over the number of present edges that is below the ½ of the maximum UDG value
most of the time. It also shows a decreasing trend as the simulation goes on. It has a moderate range of
variation with respect to the maximum.

- Average Path Lengths Ratio (The ratio of the average path length of the applied topologies to
the average path length of the original UDG):

1. The result of this test with UDG always yield 1. It is predictable because we use the shortest path in
UDG as our reference.

2. MST shows aggressively varying multiple. It has values that range between 3 and 7 in all the three
maps.

3. MCDS has varying multiple but in narrow range. It ranges between 1.35 and 1.7 in all the three maps.

4. GG has moderately varying multiple. It ranges between 1.6 and 2.6 in all the three maps.

Connectivity:

The connectivity of the UDG is always greater than 0.7 at steady state in all the three maps. This was
chosen in order for the simulation to be realistic and connectivity sustaining.
Analysis

From the previous results, graphs, and observations, the three topology controls are read to be
compared.

- Energy Consumption:

According to Tables(2-3-4)-Fig.(d-e-f) and the observations, MST is most efficient topology in that
discipline, followed by GG and MCDS comes at last. MST consumes on average less than 1/3 of the
energy consumed by the MCDS and 5/6 of GG.

MCDS relies more on centralizing the network since it is more degree based than weight based. In other
words, the topology is unconcerned with the weights of the edges. The result is graph that has the same
connectivity as the UDG but with the shortest edges more likely to be eliminated.

GG relies on the positions of the nodes to remove unneeded connections in the UDG which, in a similar
manner to MCDS, is unconcerned with the edge weight, but it is still relatively better than MCDS since it
at least depends on the positions of the nodes and accordingly, indirectly, relaying on the distance
between the nodes.

MST is optimized for removing the highest weight edges in the graph. When having a cycle, the MST
starts by adding the lowest weight edges avoiding forming a cycle in the network. This helps in filtering
long range connections which have a huge load on energy consumption. GG does something nearly
similar as edges with large weights since they are more likely to be removed but also normal weight
edges can still be included. This is not the case in MCDS since it is more likely for small weight edges to
be removed as the topology is more concerned with the degrees of the nodes than the edges.

- Congestion:

There is no certain topology that can excel here since each topology control has its own advantages and
disadvantages.

MST has most of its nodes concentrated below the a degree of 5. This topology can be advantageous in
cases when the devices in the network are homogenous and has limited number of connecting channels.
Practical examples are myriad:

1. A group of drones communicating automatically.


2. A bunch of mobile phones that want to connect without infrastructure.
3. Wild-fire sensors transferring data to a control unit.

MST can achieve low degree at high number of nodes since the topology is less concerned with the node
degrees and the connections are elected independent on the degrees of the nodes. Instead, the
topology chooses the minimum weight edges which can proved to be contrasting with the node degree
effect on the topology.

On the other hand: MCDS proved to give contrasting congestion results where most of its nodes
“dominatees” have a degree of one, but the dominator elements are at very high degrees. This makes
this topology the best choice for routing centralization “giving a pseudo-infrastructure feature to an ad-
hoc network”. This topology is especially advantageous in case of heterogenous network devices, where
there exists a set of multichannel devices and set of uni-channel devices.
GG gave intermediate congestion results between MST and MCDS. It allows for a wide range of degrees,
as most of its nodes fall below 15 degrees (but much more than MST). This topology is perfect for
application in places where it is unknown the types of the devices that could participate.

This property is achieved since Gabriel Graphs are neither degree based nor weight based placing it at a
medium point between the two former topology controls

- Dependency:

Dependency can be used as an indication of the stability of a network. The higher the dependency (in
other words, higher average paths ratio), the more likely it is for the connection to get rerouted and
controlled by nodes that aren’t beneficiary for the signal. So, to achieve higher stability, a low average
paths ratio is a good indication for this criterion. The lowest achievable value is 1.

According to the data obtained from the graphs in Tables(2-3-4)-Fig.(g-h-i),MCDS is the most stable
topology among the three because it has the lowest average paths ratio, followed by GG and the least
stable topology is MST. From the results, MCDS is from 5.18 to 1.7 times more stable than MST. GG is
from 3.88 to 1.15 more stable than MST.

The reason of the high stability of MCDS is that all the paths are routed through a certain elected
backbone where minor weight connections are removed from the network. GG achieves a relatively
high stability since not all large weight edges are removed

From the previous analysis, it can be concluded that a certain topology excels in the performance at a
certain parameter but for another parameter, another topology can achieve better results.

Conclusion

In this paper, we managed to apply VANET techniques on moving objects (A mobility driven
environment) and give the network a sense of mobility on real life situations and settings.
These kinds of systems have many applications in real life problems. In this paper, we applied
some topology control centralization driven algorithms which are: Minimum Spanning Tree
(MST), Minimum connecting dominating set (MCDS), and Gabriel Graphs (GG). We tested these
algorithms and compared their performance in terms of the network parameters (Energy
consumption, congestion, and signal path). These results were analyzed, and basic conclusions
were drawn on the applied topology control methods.
References:
1- Chartrand, G., Zhang, P., & Chartrand, G. (2012). A first course in graph theory. Dover
Publications,Inc.
2- Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2022). Introduction to algorithms.
The MIT Press.

Appendix:

- Software and Simulation Technology


The software environment used in in the testing, implementation and simulating VANETs was
done using MATLAB scripting language. MATLAB was chosen as it is a scripting language mainly
directed to be used with mathematical objects. It’s no surprise to know that MATLAB stands for
MATrix LABoratory. It has a large community that works on its development. It has many built-
in APIs and classes for graph theory objects as well as built-in functions that can be used to plot
the graphs of edges and nodes with the required specifications. The code and functions created
in this research are portable in MATLAB versions starting from MATLAB R2018a.
- GITHUB Repository for the simulation code
https://github.com/Yousef-Essam/VANET-planning-with-Graph-theory

You might also like