You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/261056925

Network routing by artificial neural network

Conference Paper · January 2012

CITATIONS READS

20 745

1 author:

Michal Turcanik
General Milan Rastislav stefanik Armed Forces Academy
28 PUBLICATIONS   97 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Cyber threats and defense of military information systems View project

Hashing by neural networks View project

All content following this page was uploaded by Michal Turcanik on 23 May 2017.

The user has requested enhancement of the downloaded file.


Network Routing by Artificial Neural Network

Michal Turčaník
Department of Informatics
Armed Forces Academy
Liptovský Mikuláš, Slovakia
michal.turcanik@aos.sk

Abstract—Author presents a design of the artificial neural (e.g., dropped from an airplane) or can be planted manually
network for routing in the sensor network in this paper. The (e.g., fire alarm sensors in a facility). For example, in a disaster
routing table is replaced by artificial neural network. The main management application, a large number of sensors can be
aim is to realize this operation as fast as possible. Optimized dropped from a helicopter. Networking these sensors can assist
neural network is implemented in the reconfigurable hardware. rescue operations by locating survivors, identifying risky areas,
The paper concludes with possible future research areas. and making the rescue team more aware of the overall situation
in the disaster area [1].
Keywords: artificial neural network, FPGA, network routing

I. INTRODUCTION
Sensor networks consist of small nodes with sensing, S4  S4 S4
computation, and wireless communications capabilities. Many
routing, power management, and data dissemination protocols S4
have been specially designed for sensor network where saving R1  R2 
energy is an essential design issue. The focus, however, has R11
R3
been given to the routing protocols which might differ
depending on the application and network architecture.
S4 R7 
A new approach has been proposed for the routing problem Gateway 
R4 S4
in the sensor network in this paper. The routing table is
replaced by artificial neural network in this approach. The main R10
aim is to realize this operation as fast as possible. R8 
R6 
In this paper author used offline learning method. Offline
R9
training regards to learning procedure on a general-purpose R5
S4
computing platform before the trained system is implemented
in hardware. The software that was chosen for offline training S4  S4  S4 
is MATLAB. Also was used Xilinx ISE to synthesize of S4
VHDL code and simulate.
Figure 1. Sensor network (R - router, S - sensor)
This paper is organized as follows: part II introduces the
sensor network topology. Part III presents artificial neural
network (ANN). Using ANN for network routing and ANN
optimization is presented in part IV. Part V presents the results In the past few years, an intensive research that addresses
and discussion about results, and finally part VI concludes the the potential of collaboration among sensors in data gathering
paper. and processing and in the coordination and management of the
sensing activity were conducted. However, sensor nodes are
constrained in energy supply and bandwidth. Thus, innovative
techniques that eliminate energy inefficiencies that would
II. SENSOR NETWORK TOPOLOGY
shorten the lifetime of the network are highly required. Such
constraints combined with a typical deployment of large
Networking unattended sensor nodes may have profound number of sensor nodes pose many challenges to the design
effect on the efficiency of many military and civil applications and management sensor networks and necessitate energy-
such as target field imaging, intrusion detection, weather awareness at all layers of the networking protocol stack. For
monitoring, security and tactical surveillance, distributed example, at the network layer, it is highly desirable to find
computing, detecting ambient conditions such as temperature, methods for energy-efficient route discovery and relaying of
movement, sound, light, or the presence of certain objects, data from the sensor nodes so that the lifetime of the network is
inventory control, and disaster management. Deployment of a maximized [2].
sensor network in these applications can be in random fashion
and output neurons. The input units receive the input data, and
the output units provide the output [8].
The calculation of the final output values proceeds layer by
layer. First, the input signals are applied to the input layer, and
each neuron of the input layer calculates its output value. Next,
these values are propagated to the next layer; until the output
layer is reached.
IV. USING THE ARTIFICIAL NEURAL NETWORK FOR
NETWORK ROUTING

A. Clasical table look-up aproach in the sensor network


The primary role of routers is to forward data towards their
final destination. A router must decide for each incoming
packet where to send it next. More exactly, the forwarding
decision consists in finding the address of the next-hop router
as well as the egress interface through which the packet should
be sent. This forwarding information is stored in a forwarding
table that the router computes based on the information
Figure 2. Multilayer perceptron gathered by routing protocols. To consult the forwarding table,
the router uses the packet’s destination address as a key; this
III. ARTIFICIAL NEURAL NETWORK operation is called address lookup.
Artificial neural networks have been trained to perform Specifically, the address lookup operation is a major
complex functions in various fields, including pattern bottleneck in the forwarding performance of today’s routers.
recognition, identification, classification, speach, vision, and This paper presents a proposal a new method to realize
control systems [9, 10, 11]. Neural networks are composed of algorithm for efficient address lookup.
simple elements operating in parallel. These elements are
inspired by biological nervous systems. As in the nature, the B. Artificial neural network topology
connections between elements largely determine the network Neural networks map between a data set of numeric inputs
function. A neural network can be trained to perform a and a set of numeric targets. To solve a problem of routing in
particular function by adjusting the values of the connections the mash topology of the sensor network (Fig.1) was used
(weights) between elements. Typically, neural networks are artificial neural network. A three layer feed-forward network
adjusted, or trained, so that a particular input leads to a specific with sigmoid hidden neurons and linear output neurons are
target output. There, the network is adjusted, based on a used to solve multi-dimensional problems.
comparison of the output and the target, until the network
output matches the target. Typically, many such input/target Input layer Hidden layer  Output layer
pairs are needed to train a network [3].
Many variations of the perceptron were created by
Rosenblatt [4]. One of the simplest was a single-layer network Interface 0
whose weights and biases could be trained to produce a correct
target vector when presented with the corresponding input
vector. The training technique used is called the perceptron Node ID Interface 1
learning rule. The perceptron generated great interest due to its
ability to generalize from its training vectors and learn from Interface  ...
initially randomly distributed connections. Perceptrons are status 
especially suited for simple problems in pattern classification.
They are fast and reliable networks for the problems they can
...  Interface N

solve. Feedforward networks often have one or more hidden


layers of sigmoid neurons followed by an output layer of linear
neurons. Multiple layers of neurons with nonlinear transfer
functions allow the network to learn nonlinear relationships Figure 3. The structure of the multilayer perceptron for network routing
between input and output vectors. The linear output layer is
most often used for function fitting (or nonlinear regression) The structure of the multilayer perceptron is shown in
problems [7]. Fig.3. The input layer of the neural network receives input data
A multi-layer perceptron (Fig. 2) consists of neurons and for routing in the sensor network. Input data represent address
synapsies (connections). Each neuron has an input, activation (node ID) of the data packet that should be transferred through
and output function. Each synapsy between two neurons has a sensor network (Fig. 1). The interface status represents
weight. The units are organized in layers. Three different types information about status of all interfaces for single router. All
of neurons are distinguished: input neurons, hidden neurons active interfaces can be used to route data. Data
communications using inactive interfaces are rerouted to active Mean squared error (MSE) is the average squared
interfaces. Some sensor nodes may fail or be blocked due to difference between outputs and targets. Lower values are
lack of power, physical damage, or environmental interference. better. Zero means no error. The lowest value of MSE is for
The failure of sensor nodes should not affect the overall task of ANN with 20 neurons in the hidden layer.
the sensor network. If many nodes fail, routing protocols must
accommodate formation of new links and routes to the data TABLE II. REGRESSION FOR ANALYZED ANN
collection base stations. Number Regression
of hidden
The number of the input layer neurons corresponds to the neurons Training Validation Testing
input information for multilayer perceptron. The number of the
10 9.690e-1 9.074e-2 4.225e-1
neurons of the hidden layer is a target of the optimization. The
number of the neurons of the output layer corresponds to the 15 7.458e-1 6.926e-1 6.661e-1
number of the interfaces of the router of the sensor network.
20 9.999e-1 9.999e-1 9.999e-1
The value of the output layer´s neurons represents index of
the interface that will be used to send data packet to the
destination. If the value of the output neuron is equal to 1, Regression R values measure the correlation between
interface will be used. Otherwise, this interface will not be outputs and target. An R value of 1 means a close relationship,
used. All layers are fully interconnected and there are not 0 a random relationship. R values are again the best for ANN
feedback connections between the hidden and input layers. with 20 neurons in the hidden layer.
C. ANN optimization ANNs with higher number of neurons in the hidden are not
To optimize neural network structure must be done analysis shown in the tables, because the value of MSE and R value are
of the number of neurons in hidden layer from point of view of worse than ANN with 20 neurons. The following regression
correct classification [5, 6]. To solve this problem three plots display the network outputs with respect to targets for
training sets and several models of neural network were training, validation, and test sets (Fig. 1, Fig. 2 and Fig. 3). For
created. a perfect fit, the data should fall along a 45 degree line, where
the network outputs are equal to the targets. For this problem,
Number of neurons for input and output layer is equal to the fit is reasonably good for all data sets, with R values in
each other for all models of neural network. Number of each case of 0.93 or above. The ANN with 20 neurons in the
neurons in hidden layer is variable and it changes in interval hidden layer has the best results.
from 10 to 100 neurons for training, validation and testing sets.
Training, validation and testing sets were created on the
base of topology of the sensor network shown in Fig. 1. The
number of samples for neural network training depends on
router, for which is ANN created. Each sample is represented
by one rule of the routing table. There are two main routing
rule groups. One group of rules represents situation when all
interfaces are in active state. The second group of rules are
applied when some interface is inactive and another interface
must be used to forward data packet.
Training set was used during network training to adjust
error and it consists of 70 % of samples. Validation set was
used to measure network generalization and it consists of 15 %
of samples. Training is halted when generalization stops
improving. Testing set have no effect on training phase and
provide independent measure of network performance during
and after training. Testing set consists of 15 % of samples.
The results of Matlab simulation are shown in following
tables and graphs.

TABLE I. MEAN SQUARED ERROR FOR ANALYZED ANN


Number Mean Squared Error
of hidden Figure 4. Regression R for ANN with 10 neurons in the hidden layer
neurons Training Validation Testing

10 8.487e-3 2.453e-2 1.526e-1

15 6.954e-2 7.843e-2 9.085e-2

20 7.743e-17 1.081e-16 1.099e-16


synthesis possible, weights and biases of the artificial neural
network are expressed using fixed-point numbers (range scale
was multiplied by 1000) in the FPGA-based implementation.
There is no difference in results between FPGA-based
implementation and simulation.
The Virtex®-5 LXT ML505 is a general purpose FPGA
and RocketIO™ GTP development board. Provides feature rich
general purpose evaluation and development platform. Includes
on-board memory and industry standard connectivity
interfaces. It delivers a versatile development platform for
embedded applications. Virtex®-5 LXT ML505 was used as a
platform for realization of the analyzed ANN.

TABLE III. ANALYSIS OF ANN FPGA REALISATION

FPGA
ANN
Delay Number of LUT Slices
10 142 ns 1098 524

15 149 ns 1527 714

20 152 ns 1822 865

Figure 5. Regression R for ANN with 15 neurons in the hidden layer


The results of the practical realisation of the ANN are
summarized in previous table. Main parameters to compare
were delay, number of slices and number of 4-inputs LUTs.
FPGA (Field Programmable Gate Array) is an integrated
circuit containing a matrix of user-programmable logic cells,
being able to implement complex digital circuitry. The
elementary programmable logic block in Xilinx FPGAs is
called slice. LUTs (Look-Up Tables) can implement any 4-
input boolean function, used as combinational function
generators. They are usually the number of LUTs and the
number of slices (and not the number of registers) that are used
to compare the size of FPGA designs.
Delay for all ANN has almost the same value. The highest
number of slices and 4-inputs LUTs has ANN with neurons in
the hidden layer. The lowest requirement has ANN with 10
neurons in the hidden layer. The modern FPGA circuits (thanks
to their size) can accommodate easily requirements of the
proposed ANNs.
VI. CONCLUSION
In this paper, was presented a new method for sensor
routing table realisation using neural networks. It was proposed
artificial neural network topology and optimization criterions to
solve a problem of routing in the mash topology of the sensor
Figure 6. Regression R for ANN with 20 neurons in the hidden layer
network. The main advantage of the using ANN for table look-
up process is speed. The size of the look-up table in this
V. SIMULATION AND SYNTHESIS RESULTS approach could not influence the speed of decision where to
send packet next as it is in other methods. Time to get decision
VHDL (VHSIC hardware description language) is a from ANN is always the same. ANN could be trained to
hardware description language used in electronic design change the routes in case of topology changes that could be
automation to describe digital and mixed-signal systems such predicted in the training phase. Thanks to this ANN does not
as field-programmable gate arrays and integrated circuits [7]. have to be retrained in the real environment after topology
ANN was implemented by VHDL language and synthesized changes. Analyzed ANNs were practically realised in hardware
using Xilinx ISE 13.3. platform. Execution of the training process in the hardware can
Weights and biases that are obtained from Matlab improve this proposal. Future work can be oriented to
simulation after training phase are floating point. To be realisation embedded system based on MicroBlaze processor to
train ANN in FPGA architecture. This method can be executed
in parallel on an FPGA chip.
Another interesting issue for routing protocols is the
consideration of node mobility. Most of the current protocols
assume that the sensor nodes and the sink are stationary.
However, there might be situations such as battle environments
where the sink and possibly the sensors need to be mobile.
In such cases, the frequent update of the position of the
command node and the sensor nodes and the propagation of
that information through the network may excessively drain the
energy of nodes. New routing algorithms are needed in order to
handle the overhead of mobility and topology changes in such
energy constrained environment.
Other possible future research for routing protocols
includes the integration of sensor networks with wired
networks (i.e. Internet). Most of the applications in security and
environmental monitoring require the data collected from the
sensor nodes to be transmitted to a server so that further
analysis can be done. On the other hand, the requests from the
user should be made to the sink through Internet. Since the
routing requirements of each environment are different, further
research is necessary for handling these kinds of situations.
This work has been supported by the MOD of Slovak
Republic grants No. 4/2011 "Partial dynamic reconfiguration
of the digital systems in military applications".

REFERENCES
[1] Al-Karaki, J. N. and A. E. Kamal, "Routing Techniques in Wireless
Sensor Networks: A Survey", IEEE Wireless Communications, Volume
11, No. 6, Dec. 2004, pp. 6-28.
[2] Al-Kofahi, O. and A. E. Kamal, " Survivability Strategies in Multihop
Wireless Networks", IEEE Wireless Communications, Vol. 17, No. 5,
Oct. 2010, pp. 71-80.
[3] J.L. Elman,”Finding structure in time, Cognitive Science,” Vol. 14,
1990, pp. 179-211.
[4] F. Rosenblatt, “Principles of Neurodynamics,” Washington D.C.,
Spartan Press, 1961.
[5] I. Mokriš and M. Turčaník,”Contribution to the analysis of multilayer
perceptrons for pattern recognition,” Neural Network World. Vol. 10,
No. 6 (2000), ISSN 1210-0552, p. 969-982.
[6] Turčaník, M. - Mokriš, I.: Possible Approach to Optimization of Neural
Network Structure. Proc. of Conf. SECON 97, Warsaw, pp. 326 - 335.
[7] Pattreson D.: Artificial Neural networks - Theory and Applications,
Prentice Hall, 1996.
[8] S. Melacci, L. Sarti, M. Maggini, M. Bianchini, “A Neural Network
Approach to Similarity Learning,” Lecture Notes in Computer Science,
Artificial Neural Networks in Pattern Recognition, June 30, 2008, pp.
133-136.
[9] S. Ezzati, H. R. Naji, A. Chegini, P. Habibimehr, “Intelligent Firewall
on Reconfigurable Hardware,“ European Journal of Scientific Research.
ISSN 1450-216X Vol.47 No.4 (2010), pp.509-516.
[10] HARAKAĽ, M. - CHMÚRNY, J.: The Tesseral Processor for Image
Processing Based on Hierarchical Data Structures, Radioengineering,
Vol.6, No.4, 1997, pp. 1-5. ISSN 1210-2512
[11] Kuffová, M.: Simulation of fatigue process. In: Mechanics. - ISSN
1734-8927. - Vol. 27, No. 3 (2008), p. 110-112.

View publication stats

You might also like