Вы находитесь на странице: 1из 57

The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

CHAPTER -1

INTRODUCTION
1.1 Introduction to WSN

A Wireless sensor network can be defined as a network of devices that can communicate the
information gathered from a monitored field through wireless links.

WSN technology is to enhance the network lifetime and to reduce the energy consumption of the
sensor network. Wireless sensor nodes are dispersed typically in sensing area to monitor
earthquake, battle field, industrial environment, habitant monitoring, agriculture field, physical
atmosphere conditions and smart homes.

Sensor nodes sense the environment, gather information and transmit to BS through wireless
link. Due to escalating in Micro-Electro-Mechanical System technology, now it is possible to set
up thousands or millions of sensor nodes. The intense deployment of WSN makes it quite
difficult to recharge node batteries. Therefore, a key subject for WSNs is to curtail power
expenditure of sensor nodes to prolong network lifetime. Many clustering based algorithms are
proposed.

Clustering is a technique in which network energy consumption is well managed by minimizing


the transmission range of the sensors. In this modus CH manages the group communication with
the BS. Sensor nodes no longer transmit data directly to the BS instead CHs receive the whole
group messages, aggregates and forwards to the BS. All nodes in cluster transmit their data to
corresponding CH. The CH issues a Time Division Multiple Access (TDMA) schedule for its
member nodes to avoid collision. Each member node transmits its data to CH only in defined
allocated time slot therefore, sensor nodes turn off their transceivers otherwise. TDMA
scheduling encourages saving energy of sensor nodes and these nodes stay alive for longer
period. As a rule, each member node transmits its data to nearby CH therefore; sensor nodes
require minimum energy for data transmission. CHs perform computation on collected data and
filter out the redundant bits, it reduces the amount of data that has to forward to the BS.
Consequently, transmission energy of sensors reduce to significant amount. The impulse behind

Dept. of ECE, PESCE Mandya Page 1


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

this work is to trim down the energy consumption of sensor nodes by logically dividing the
network into four regions. We use different communication hierarchy in different regions. Nodes
in one region communicate directly to BS while nodes in region 2 communicate directly to
gateway node. Nodes in other two regions use clustering hierarchy and sensor nodes transmit
their data to gateway node through their CHs. Gateway node assists in defining clusters and
issues a TDMA schedule for CHs. Each CH issues its own TDMA schedule for its member
nodes.

Fig 1.1: Typical Structure of a WSN

Figure 1 shows a typical sensor network structure structure, in which sensor nodes are collecting
the information from the field, as well as transmitting sensed data back to the base station .many
sensor systems are deployed in harsh, unattended and often adversarial physical environments
such as battle fields and desert.

1.2 Characteristics of WSN

WSNs are characterised by:

 Limited power they can harvest or store


 Ability to cope with node failures
 Heterogeneity of nodes
 Large scale of deployment
 Mobility of nodes
 Communication failure
 Dynamic network topology
 Ability to withstand harsh environmental conditions

Dept. of ECE, PESCE Mandya Page 2


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

1.3 Routing Protocols

Recently, a number of energy efficient routing protocols designed for WSNs have
been proposed. The existing routing protocols can be classified into two categories.
The first category is non-hierarchical routing protocol in which source node floods
advertisement message to destination. When a destination receives an advertisement
message from its neighbor, it sets up a route to send data to neighbor.

The main problem of non-hierarchical routing protocol is that they have trouble to
decide route. The second category is a hierarchical (or clustering) routing protocol
which organizes sensor nodes into clusters based on the received signal strength and
uses local cluster headers as routers to base station.

Low Energy Adaptive Clustering Hierarchy (LEACH) is a typical example of the


hierarchical routing protocols the cluster structure provide several benefits. First a
cluster structure facilitates the spatial reuse of resources to increase the system
capacity. With the non-overlapping multi-cluster structure, two cluster may deploy
the same frequency or code set if they are not neighbor clusters. In addition, we can
find another benefit in routing, because the set of cluster headers can normally from
a virtual backbone for inter-cluster routing. Further, a cluster structure supports
scalability and energy efficiency. The main problem of then hierarchical routing
protocol is that it is not easy to elect cluster head.

Threshold Sensitive Energy Efficient Sensor Network(TEEN) Suited for time


critical data sensing applications and it is a reactive network. energy consumption in
this scheme is less than in the proactive network, because data transmission is done
less frequently. At every cluster change time, the attributes are broadcast afresh and
so, the user can change them as required. In TEEN Protocol higher authority called
Super Cluster Head is introduced for detecting and preventing the misbehaving cluster
heads . In this project we have proposed the technique for electing the authorities i.e. the
Cluster Head and Super Cluster Head in WSN.

Dept. of ECE, PESCE Mandya Page 3


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

1.4 Advantages of WSN

The following are the advantages of WSN:

 Network setups can be carried out without fixed infrastructure.

 Suitable for the non-reachable places such as over the sea, mountains, rural
areas or deep forests.

 Flexible if there is random situation when additional workstation is needed.

 Implementation pricing is cheap.

 It might accommodate new devices at any time.

1.5 Disadvantages of WSN

Some of the disadvantages of WSN are as follows:

 Lower speed as compared to a wired network.

 More complicated to configure compared to a wired network.

 It is easy for hackers to hack it we couldn’t control propagation of waves.

 Comparatively low speed of communication.

 Gets distracted by various elements like Blue-tooth.

 Still Costly (most importantly).

Dept. of ECE, PESCE Mandya Page 4


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

1.6 Applications of WSN

There are lots of applications of WSN:

1. Process Management: Area monitoring is a very common using WSNs. In


area monitoring, the WSN is deployed spanning a region where some
phenomenon is usually to be monitored. A military example may be the use of
sensors detect enemy intrusion; a civilian example would be the geo-fencing of
gas or oil pipelines. Area monitoring is most important part.

2. Healthcare monitoring: The medical applications might be of two sorts:


wearable and implanted. Wearable devices are applied to the body surface of
the human or maybe at close proximity from the user. The implantable medical
devices are the ones that are inserted inside your body.

3. Environmental/Earth sensing: There are numerous applications in


monitoring environmental parameters samples of which are given below. They
share any additional challenges of harsh environments and reduced power
supply.

4. Polluting of the environment monitoring: Wireless sensor networks have


been deployed in lots of cities (Stockholm, London and Brisbane) to monitor
the power of dangerous gases for citizens. These can leverage the random
wireless links instead of wired installations that also make them more mobile
for testing readings in several areas.

5. Forest fire detection: A network of Sensor Nodes is usually positioned in a


forest to detect every time a fire has begun. The nodes is usually with sensors
to measure temperature, humidity and gases which are produced by fire within
the trees or vegetation. The first detection is necessary to get a successful
action of the fire fighters; As a result of Wireless as Sensor Networks, the fire
brigade are able to know when a fire begins you bet it can be spreading.

Dept. of ECE, PESCE Mandya Page 5


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

6. Landslide detection: A landslide detection system uses a wireless sensor


network to detect the slight movements of soil and modifications to various
parameters that will occur before or throughout a landslide. With the data
gathered it may be possible to know the appearance of landslides before it
genuinely happens.

7. Water quality monitoring: Water quality monitoring involves analyzing


water properties in dams, rivers, lakes & oceans, and also underground water
reserves. The application of many wireless distributed sensors enables the
creation of a accurate map on the water status, and allows the permanent
deployment of monitoring stations in locations of difficult access, while not
manual data retrieval.

8. Natural disaster prevention: Wireless sensor networks can effectively act to


avoid the results of disasters, like floods .Wireless nodes have successfully
been deployed in rivers where changes in the water levels have to be monitored
in real time.

9. Industrial monitoring:

 Machine health monitoring: Wireless sensor networks happen to be


developed for machinery condition based maintenance (CBM) as they
offer significant personal savings and enable new functionality .In
wired systems, installing enough sensors can often be tied to the price
of wiring. Previously inaccessible locations, rotating machinery, and
hazardous or restricted areas.

 Data logging: Wireless sensor networks are also employed for the
gathering of web data for monitoring of environmental information, this
is often as easy as the monitoring from the temperature in a very fridge
to the level of water in overflow tanks in nuclear power plants..

Dept. of ECE, PESCE Mandya Page 6


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

 Water/Waste water monitoring: Monitoring the high quality and level


of water includes many activities including checking the quality of
underground or surface water and ensuring a country’s water
infrastructure for your benefit of both human and animal.

1.7 Existing System

Clustering is a technique used in mobile ad hoc networks for best utilization of available
bandwidth and for prolonging the network life time also. The entire group of nodes participate in
election of the Cluster Head which is most of the times used for network administration but
sometimes can also be used for the task of intrusion detection i.e. network security.

Disadvantages:
1. The main features used were Battery Backup of the node, Fairness, Hop Count and
Mobility. But none of these approaches for clustering in WSN used all these
important features together in a single approach to choose a Cluster Head.
2. The Clustering depends on the criteria like Communication range, Hop Count,
Battery Power, Relative Velocity and Fairness.

1.8 Proposed system:

An effective clustering technique has been proposed (TEEN) which is being used for the
election of Cluster Heads and Super Cluster Head. It uses five parameters i.e. Communication
range, Hop Count, Battery Power, Relative Velocity, Fairness at a time to select a Cluster Head.
Super Cluster Head as already defined is a node which can be a part of network but not itself a
cluster Head and is used to detect a misbehaving Cluster Head not doing the task of intrusion
detection properly.
A node is selected as a Super Cluster Head only if it is having maximum battery power
and it is not a Cluster Head.

Dept. of ECE, PESCE Mandya Page 7


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Advantages:
1. This technique seems to increase network life time also because of the slow
dissipation of the energy.
This Super Cluster introduced in our proposed technique adds one more authority entity for
detecting the Cluster Head intruder nodes which is very important from the security point of
view in WSN.

1.4 Brief outline of the project

The works carried out at each project phase are outlined below:-

Learning & Analysis Phase

This phase includes:

 Gathering knowledge about existing communicating techniques.


 Well understanding of the project design review from the client.
 Learning tools, technologies & programming Language for coding purpose.

Design & Implementation

This phase Includes:

 Designing the overall functional view i.e. system architecture of the project.
 Describing the language, platform used in the project implementation.
 Identification and design of the modules for implementing.
 Implementing the applications for accessing and controlling the different types of
services.

Testing Phase

This phase includes:

 Writing the test cases for testing the implemented modules.


 Executing the test cases manually, comparing and evaluating the actual result with the
expected result.

Dept. of ECE, PESCE Mandya Page 8


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

CHAPTER -2

LITERATURE SURVEY
Literature survey is mainly carried out in order to analyze the background of the current
project which helps to find out flaws in the existing system & guides on which unsolved
problems we can work out. So, the following topics not only illustrate the background of the
project but also uncover the problems and flaws which motivated to propose solutions and work
on this project. A variety of research has been done on power aware scheduling. Following
section explores different references that discuss about several topics related to power aware
scheduling.

2.1 Literature Survey

In paper[1] Introduce an energy factor when choosing a cluster head. Meanwhile, we learn to
conducted simulation specific to LEACH protocol and this improved algorithm in terms of
network lifetime, network stability, energy consumption.

In paper[2] LEACH arranges the nodes in the network into small clusters and chooses one of
them as the cluster-head. Node first senses its target and then sends the relevant information to its
cluster-head. Then the cluster head aggregates and compresses the information received from all
the nodes and sends it to the base station.

In paper[3] classification of sensor network as proactive and reactive networks. Reactive


networks, as opposed to passive data collecting proactive networks, respond immediately to
changes in the relevant parameters of interest. TEEN for reactive protocol is well suited for time
critical application and is also quite efficient in terms of energy consumption and response time.

In paper [4] two techniques: Cluster Based Intrusion Detection and Prevention Technique and
Super Cluster Based Intrusion Detection and Prevention Technique for the detection of JF
Periodic Dropping attack in MANET are proposed which result in better network performance.

Paper [5] presents a review of various clustering schemes for Mobile Ad hoc Network. The
analysis of different clustering schemes is done and suggestions for improvement are given.

Dept. of ECE, PESCE Mandya Page 9


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

In paper [6] a new weighted distributed clustering algorithm, called CBMD is proposed.
Connectivity (I), residual battery power (B), average mobility (M), and distance (D) of the nodes
are the parameters used to choose cluster heads so that less number of clusters are formed in
order to minimize the overhead involved and also to form stable clusters maximizing the life
span of the mobile nodes.

In paper [7] k-hop cluster maintaining mechanism for mobile ad hoc networks (KCMM) is
proposed. This is basically based on the Max-Min heuristic algorithm and results in the increase
in stability of multi-hop clusters for large-scale and dense scenario.

In paper [8] to enhance the network stability; an Enhanced Sectorized Clustering Scheme based
on Transmission Range for MANETS (ESCS) is proposed which considers the residual energy
and transmission range of the cluster head to be elected.

In paper [9] Weighted Clustering Algorithm (WCA) is used for cluster formation. Cluster
maintenance is done using Mobility Prediction. This reduces the overhead in communication.

In paper [10] selective prioritized clustering (SPC) is proposed. This algorithm uses makes use of
hierarchical clustering and topology control to divide the network into clusters and further into
sub clusters having two cluster heads each.

In paper [11] CBMD algorithm is proposed which uses connectivity (C), residual battery power
(B), average mobility (M) and distance (D) of the nodes to choose locally optimal cluster heads.
The algorithm produces a global path.

In paper [12] a new clustering protocol for MANETs is proposed. It uses the routing information
for maintenance of clusters formed.

In paper [13], IWCA is proposed which keeps a node with weak battery power from being
elected as a CH.

In paper [14] a Flexible Weighted Clustering Algorithm based on Battery Power (FWCABP) is
proposed which increases the stability. It avoids the node with weak battery power from being
elected as a cluster-head.

Dept. of ECE, PESCE Mandya Page 10


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Robust Clustering Algorithm proposed in paper [15] uses three parameters: remaining power,
mobility prediction and workload to choose cluster Head.

Summary

This chapter mainly discusses about the papers, websites that are referred while making
this dissertation report. All these papers and websites provide information related to learning of
collective behaviour, their existing solutions, methods used and also their advantages &
limitations.

Dept. of ECE, PESCE Mandya Page 11


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

CHAPTER-3

SYSTEM REQUIREMENT SPECIFICATION

Software requirement Specification is a fundamental document, which forms the


foundation of the software development process. It not only lists the requirements of a system
but also has a description of its major feature. An SRS is basically an organization's
understanding (in writing) of a customer or potential client's system requirements and
dependencies at a particular point in time (usually) prior to any actual design or development
work. It's a two-way insurance policy that assures that both the client and the organization
understand the other's requirements from that perspective at a given point in time. The SRS also
functions as a blueprint for completing a project with as little cost growth as possible. The SRS is
often referred to as the "parent" document because all subsequent project management
documents, such as design specifications, statements of work, software architecture
specifications, testing and validation plans, and documentation plans, are related to it. It is
important to note that an SRS contains functional and nonfunctional requirements only; it doesn't
offer design suggestions, possible solutions to technology or business issues, or any other
information other than what the development team understands the customer's system
requirements to be.

3.1 Functional Requirement

Functional Requirement defines a function of a software system and how the system must
behave when presented with specific inputs or conditions. These may include calculations, data
manipulation and processing and other specific functionality. In this system following are the
functional requirements:-

1. Cluster Head selection based on the important parameters i.e. Communication range, Hop
Count, Battery Power, Relative Velocity and Fairness

2. This project is implemented to increase network life time.

Dept. of ECE, PESCE Mandya Page 12


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

3.2 Non-functional Requirement


Non functional requirements are the requirements which are not directly concerned with
the specific function delivered by the system. They specify the criteria that can be used to judge
the operation of a system rather than specific behaviours. They may relate to emergent system
properties such as reliability, response time and store occupancy. Non functional requirements
arise through the user needs, because of budget constraints, organizational policies, the need for
interoperability with other software and hardware systems or because of external factors such
as:-

1. Product Requirements 2. Organizational Requirements 3.User Requirements 4. Basic


Operational Requirements

Product Requirements

Por tab i l i ty : Since the software is developed in NS2 it can be executed on any platform for
which is available with minor or no modifications.

Corre ctn ess: It followed a well-defined set of procedures and rules to compute and also
rigorous testing is performed to confirm the correctness of the data.

E as e of Use: The front end is designed in such a way that it provides an interface which
allows the user to interact in an easy manner.

Mod u l ari ty: The complete product is broken up into many modules and well-defined
interfaces are developed to explore the benefit of flexibility of the product.

Rob u s tn ess: This software is being developed in such a way that the overall performance is
optimized and the user can expect the results within a limited time with utmost relevancy and
correctness.

Non functional requirements are also called the qualities of a system. These qualities can
be divided into execution quality & evolution quality. Execution qualities are security &
usability of the system which are observed during run time, whereas evolution quality involves
testability, maintainability, extensibility or scalability.

Dept. of ECE, PESCE Mandya Page 13


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Organizational Requirements

Process Standards: IEEE standards are used to develop the application which is the standard
used by the most of the standard software developers all over the world.

Design Methods: Design is one of the important stages in the software engineering process. This
stage is the first step in moving from problem to the solution domain. In other words, starting
with what is needed design takes us to work how to satisfy the needs.

The design of the system is perhaps the most critical factor affecting the quality of the
software and has a major impact on the later phases, particularly testing and maintenance. We
have to design the product with the standards which has been understood by the developers of
the team.

User Requirements

 The user must be able to visualize NAM window.


 The user must be able to configure all the parameters in Simulation.

Basic Operational Requirements


The customers are those that perform the eight primary functions of systems engineering,
with special emphasis on the operator as the key customer. Operational requirements will define
the basic need and, at a minimum, will be related to these following points:-

Mission profile or scenario: It describes about the procedures used to accomplish mission
objective. It also finds out the effectiveness or efficiency of the system.

Performance and related parameters: It points out the critical system parameters to
accomplish the mission

Utilization environments: It gives a brief outline of system usage. Finds out appropriate
environments for effective system operation.

Operational life cycle: It defines the system lifetime.

Dept. of ECE, PESCE Mandya Page 14


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

3.3 Resource Requirement

NS2 Simulator:

NS2 is a discrete event simulator targeted at networking research. Ns provides substantial


support for simulation of TCP, routing, and multicast protocols over wired and wireless (local
and satellite) networks.

NS began as a variant of the REAL network simulator in 1989 and has evolved
substantially over the past few years. In 1995 ns development was supported by DARPA through
the VINT project at LBL, Xerox PARC, UCB, and USC/ISI. Currently ns development is support
through DARPA with SAMAN and through NSF with CONSER, both in collaboration with other
researchers including ACIRI. Ns has always included substantial contributions from other
researchers, including wireless code from the UCB Daedelus and CMU Monarch projects and
Sun Microsystems. For documentation on recent changes, see the version 2 change log.

In 1996-97, work on ns version 2 (ns-2) was initiated based on a refactoring by Steve


McCanne. Use of TCL was replaced by MIT's Object TCL (OTCL), an object-oriented dialect of
TCL. The core of ns-2 is also written in C++, but the C++ simulation objects are linked to
shadow objects in OTCL and variables can be linked between both language realms. Simulation
scripts are written in the OTCL language, an extension of the TCL scripting language. This
structure permits simulations to be written and modified in an interpreted environment without
having to resort to recompiling the simulator each time a structural change is made. In the
timeframe in which ns-2 was introduced (mid-1990s), this provided both a significant
convenience in avoiding many time-consuming recompilations, and also allowing potentially
easier scripting syntax for describing simulations. ns-2 has a companion animation object known
as the Network Animator, nam-1, originally written by Mark Handley, used for visualization of
the simulation output and for (limited) graphical configuration of simulation scenarios.

In 1997, the DARPA Virtual Inter Network Test bed (VINT) project was initiated,
including LBNL, Xerox PARC, UC Berkeley, and USC's Information Sciences Institute (ISI).
The bulk of ns-2 development occurred during this timeframe. Software maintenance activities
also migrated to ISI during this time period, eventually led by John Heidemann. After the

Dept. of ECE, PESCE Mandya Page 15


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

conclusion of the VINT project, ns-2 continued to be funded during the 2001-04 timeframe by
the DARPA SAMAN and NSF CONSER awards to USC/ISI.

Presently, ns-2 consists of over 300,000 lines of source code, and there is probably a
comparable amount of contributed code that is not integrated directly into the main distribution
(many forks of ns-2 exist, both maintained and unmaintained). It runs on GNU/Linux, FreeBSD,
Solaris, Mac OS X and Windows 95/98/NT/2000/XP. It is licensed for use under version 2 of the
GNU General Public License.

GNU Plot:

Gnu plot is a command-line program that can generate two- and three-dimensional plots
of functions, data, and data fits. It is frequently used for publication-quality graphics as well as
education. The program runs on all major computers and operating systems (GNU/Linux, Unix,
Microsoft Windows, Mac OS X, and others). It is a program with a fairly long history, dating
back to 1986. Despite its name, this software is not distributed under the GNU General Public
License (GPL), opting for its own more restrictive open source license instead.

Gnu plot can produce output directly on screen, or in many formats of graphics files,
including Portable Network Graphics (PNG), Encapsulated PostScript (EPS), Scalable Vector
Graphics (SVG), JPEG and many others. It is also capable of producing Latex code that can be
included directly in Latex documents, making use of Latex’s fonts and powerful formulae
abilities. The program can be used both interactively and in batch mode using scripts. The
program is well supported and documented. Extensive help can also be found on the Internet.

Gnu plot is used as the plotting engine of Maxima, and gretl, and it can be used from
various languages, including Perl (via CPAN), Python (via Gnu plot-py and SAGE), Java (via
JGNU plot), Ruby (via Ruby Gnu plot), Ch (via Ch Gnu plot), and Smalltalk (Squeak and GNU
Smalltalk). Gnu plot also supports piping. Gnu plot is programmed in C.

Dept. of ECE, PESCE Mandya Page 16


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

3.4 Hardware Requirements


Processors: Intel 2.1 GHz.

RAM : 3 GB.

Storage : 20GB.

Monitor : 15”

Keyboard : Standard 102 keys

Mouse : 3 buttons

3.5 Software (Tools &Technologies) Requirements

Platform : Ubuntu.

Language : TCL/C++

Visual Interface : Command line/Terminal

Networking : NS2 Packages.

IDE/tool : NS2

Summary
This chapter gives details of the functional requirements, non-functional requirements,
resource requirements, hardware requirements, software requirements etc. Again the non-
functional requirements in turn contain product requirements, organizational requirements, user
requirements, basic operational requirements etc.

Dept. of ECE, PESCE Mandya Page 17


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

CHAPTER-4
SYSTEM ANALYSIS

System analysis is the process by which we learn about the existing problems, define
objects and requirements and evaluates the solutions. It is the way of thinking about the
organization and the problem it involves, a set of technologies that helps in solving these
problems. Feasibility study plays an important role in system analysis which gives the target for
design and development.

4.1 Feasibility Study

Depending on the results of the initial investigation the survey is now expanded to a more
detailed feasibility study. “FEASIBILTY STUDY” is a test of system proposal according to its
workability, impact of the organization, ability to meet needs and effective use of the resources.

Eight steps involved in the feasibility analysis are:

Form a project team and appoint a project leader.

Enumerate potential proposed system.

Define and identify characteristics of proposed system.

Determine and evaluate performance and cost effective of each proposed system.

Weight system performance and cost data.

Select the best proposed system.

Prepare and report final project directive to management.

Three key considerations involved in the feasibility analysis are

ECONOMICAL FEASIBILITY

TECHNICAL FEASIBILITY

SOCIAL FEASIBILITY

Dept. of ECE, PESCE Mandya Page 18


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

4.1.1 ECONOMICAL FEASIBILITY

This study is carried out to check the economic impact that the system will have on the
organization. The amount of fund that the company can pour into the research and development
of the system is limited. The expenditures must be justified. Thus the developed system as well
within the budget and this was achieved because most of the technologies used are freely
available. Only the customized products had to be purchased.

4.1.2 TECHNICAL FEASIBILITY

This study is carried out to check the technical feasibility, that is, the technical requirements of
the system. Any system developed must not have a high demand on the available technical
resources. This will lead to high demands on the available technical resources. This will lead to
high demands being placed on the client. The developed system must have a modest
requirement, as only minimal or null changes are required for implementing this system.

4.1.3 SOCIAL FEASIBILITY

The aspect of study is to check the level of acceptance of the system by the user. This includes
the process of training the user to use the system efficiently. The user must not feel threatened by
the system, instead must accept it as a necessity. The level of acceptance by the users solely
depends on the methods that are employed to educate the user about the system and to make him
familiar with it. His level of confidence must be raised so that he is also able to make some
constructive criticism, which is welcomed, as he is the final user of the system.

Summary

The main aim of this chapter is to find out whether the system is feasible enough or not.
For these reasons different kinds of analysis, such as performance analysis, technical analysis,
economical analysis etc is performed.

Dept. of ECE, PESCE Mandya Page 19


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

CHAPTER-5

SYSTEM DESIGN

Design is a creative process; a good design is the key to effective system. The system
“Design” is defined as “The process of applying various techniques and principles for the
purpose of defining a process or a system in sufficient detail to permit its physical realization”.
Various design features are followed to develop the system. The design specification describes
the features of the system, the components or elements of the system and their appearance to
end-users.

5.1 Fundamental Design Concepts

A set of fundamental design concepts has evolved over the past three decades. Although
the degree of interest in each concept has varied over the years, each has stood the test of time.
Each provides the software designer with a foundation from which more sophisticated design
methods can be applied. The fundamental design concepts provide the necessary framework for
“getting it right”. The fundamental design concepts such as abstraction, refinement, modularity,
software architecture, control hierarchy, structural partitioning, data structure, software
procedure and information hiding are applied in this project to getting it right as per the
specification.

5.1.1 Input Design

The input Design is the process of converting the user-oriented inputs in to the computer-
based format. The goal of designing input data is to make the automation as easy and free from
errors as possible. Providing a good input design for the application easy data input and selection
features are adopted. The input design requirements such as user friendliness, consistent format
and interactive dialogue for giving the right message and help for the user at right time are also
considered for the development of the project. Input design is a part of overall system design
which requires very careful attention. Often the collection of input data is the most expensive
part of the system, which needs to be route through number of modules.

Dept. of ECE, PESCE Mandya Page 20


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

It is the point where the user ready to send the data to the destination machine along with known
IP address; if the IP address is unknown then it may prone to error.

5.1.2 Output Design

A quality output is one, which meets the requirements of the end user and presents the
information clearly. In any system results of processing are communicated to the users and to
other systems through outputs. It is most important and direct source information to the user.
Efficient and intelligent output improves the systems relationship with source and destination
machine. Outputs from computers are required primarily to get same packet that the user has
send instead of corrupted packet and spoofed packets. They are also used to provide to
permanent copy of these results for later consultation.

5.1.3 The MVC Design Method

Swing actually makes use of a simplified variant of the MVC design called the model-
delegate. This design combines the view and the controller object into a single element that
draws the component to the screen and handles GUI events known as the UI delegate.
Communication between the model and the UI delegate becomes a two-way street. Each Swing
component contains a model and a UI delegate. The model is responsible for maintaining
information about the component’s state. The UI delegate is responsible for maintaining
information about how to draw the component on the screen. The UI delegate (in conjunction
with AWT) reacts to various events that propagate through the component.

Fig 5.1- Combination of View & Controller into a UI delegate object

Dept. of ECE, PESCE Mandya Page 21


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

The design method that has been followed to design the architecture of the system is MVC
design pattern. Swing uses the model-view-controller (MVC) architecture as the fundamental
design behind each of its components. Essentially, MVC breaks GUI component into three
elements. Each of these elements plays a crucial role in how the component behaves. The MVC
design pattern separates a software component into three distinct pieces: a model, a view, and a
controller.

Model

The model is the piece that represents the state and low-level behavior of the component.
It manages the state and conducts all transformations on that state. It encompasses the state data
for each component. There are different models for different types of components. For example,
the model of a scrollbar component might contain information about its current position of its
adjustable “thumb”, its minimum and maximum values, and the thumb’s width. A menu on the
other hand, may simply contain a list of the menu items the user can select from. The system
itself maintains links between model and views and notifies the views when the model changes
state.

View

The view refers to how you see the component in the screen. It is the piece that manages
the visual display of the state represented by the model. Almost all window frames will have a
title bar spanning the top of the window. However the title bar may have a close box on the left
side or on the right side. These are the examples of different types of views for the same window
object. A model can have more than one view, but that is typically not the case in the Swing set.

Fig 5.2-Communication through the MVC architecture

Dept. of ECE, PESCE Mandya Page 22


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Controller

The controller is the piece that manages user interaction with the model. It provides the
mechanism by which changes are made to the state of the model. It is the portion of the user
interface that dictates how the component interacts with events.

The view cannot render the scrollbar correctly without obtaining information from the
model first. In this case the scrollbar will not know where to draw its “thumb” unless it can
obtain its current position and width relative to the minimum and maximum. Likewise the view
determines if the component is the recipient of user events, such as mouse clicks. The view
passes these events on to the controller, which decides how to handle them best. Based on the
controller’s decision the values in the model may need to be altered. If the user drags the
scrollbar thumb, the controller will react by incrementing the thumb’s position in the model. At
that point the whole cycle can repeat.

The JFC user interface component can be broken down into a model, view, and
controller. The view and controller are combined into one piece, a common adaptation of the
basic MVC pattern. They form the user interface for the component.

Fig 5.3- JFC user interface component

Dept. of ECE, PESCE Mandya Page 23


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

5.2 System development methodology

System development method is a process through which a product will get completed or a
product gets rid from any problem. Software development process is described as a number of
phases, procedures and steps that gives the complete software. It follows series of steps which is
used for product progress. The development method followed in this project is waterfall model.

5.2.1 Model phases

The waterfall model is a sequential software development process, in which progress is seen
as flowing steadily downwards (like a waterfall) through the phases of Requirement initiation,
Analysis, Design, Implementation, Testing and maintenance.

Requirement Analysis: This phase is concerned about collection of requirement of the system.
This process involves generating document and requirement review.

System Design: Keeping the requirements in mind the system specifications are translated in to
a software representation. In this phase the designer emphasizes on:-algorithm, data structure,
software architecture etc.

Coding: In this phase programmer starts his coding in order to give a full sketch of product. In
other words system specifications are only converted in to machine readable compute code.

Implementation: The implementation phase involves the actual coding or programming of the
software. The output of this phase is typically the library, executables, user manuals and
additional software documentation

Testing: In this phase all programs (models) are integrated and tested to ensure that the complete
system meets the software requirements. The testing is concerned with verification and
validation.

Maintenance: The maintenance phase is the longest phase in which the software is updated to
fulfill the changing customer need, adapt to accommodate change in the external environment,

Dept. of ECE, PESCE Mandya Page 24


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

correct errors and oversights previously undetected in the testing phase, enhance the efficiency of
the software.

5.2.2 Reason for choosing waterfall model as development method

 Clear project objectives.


 Stable project requirements.
 Progress of system is measurable.
 Strict sign-off requirements.
 Helps you to be perfect.
 Logic of software development is clearly understood.
 Production of a formal specification
 Better resource allocation.
 Improves quality. The emphasis on requirements and design before writing a single line
of code ensures minimal wastage of time and effort and reduces the risk of schedule
slippage.
 Less human resources required as once one phase is finished those people can start
working on to the next phase.

Fig 5.4:- Waterfall model

Dept. of ECE, PESCE Mandya Page 25


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

5.3 System Architecture


System architecture is the conceptual design that defines the structure and behavior of a
system. An architecture description is a formal description of a system, organized in a way that
supports reasoning about the structural properties of the system. It defines the system
components or building blocks and provides a plan from which products can be procured, and
systems developed, that will work together to implement the overall system.

No of Nodes,Area, <tcl>
Configuration
Initial Energy, Range

<cluster head, super cluster head>


Node

Cluster Creation Send/Recieve

NS2 Simulator

Cluster Routing

Fig.5.5 System Architecture

Here the main modules are cluster creation and cluster routing.

Configuration: In this module, the network is created with the help of number of nodes, area,
range and energy. This created network is simulated using the tcl script.

Node: This module tells that node as been added to the network by the user.

Cluster creation: In this module clustering of nodes done and cluster head selected for each for
every cluster group and based on the energy consumption, super cluster head node elected and
monitors the cluster heads.

Cluster Routing: Routing to cluster head, super cluster head and sink is done in this module.

Dept. of ECE, PESCE Mandya Page 26


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

5.4 Classes Designed for the system

A class diagram in the Unified Modelling Language (UML) is a type of static structure
diagram that describes the structure of a system by showing the system's classes, their attributes,
and the relationships between the classes.

The class diagram is shown below.

Main Simulator

+createNetwork() +createNode()
+clusterNetwork() +clusterNetwork() 1
+sendPacket() +retrieveLogs()
+viewReport()
0..*

Node

Report
+setPos()
+setRange()
+measureEnergyConsumed() +setRole()
+measureLifetime() +forward()

Sink
Cluster Head Super Cluster head
+collectpacket()
+forward() +forward()

Fig. 5.4.1 class diagram

The class diagram has the following classes

Main: The operations in this class are create network, cluster network, send packet, view report.
This class has dependent class called simulator.

Simulator: The operations in this class are create node, cluster network, retrieve logs. This class
aggregates the node class.

Node: The operations in this class are set position, set range, set role and forward. This class
generalizes the cluster head class and super cluster head class.

Dept. of ECE, PESCE Mandya Page 27


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Sink: This class has dependant class called report. The operation in this class is collect packets.

Cluster Head: The operation in this class is forward.

Super Cluster Head: The operation in this class is forward.

Report: The operations in this class are measure energy consumed and measure lifetime.

5.5 Use case Diagram of the system


A use case diagram is a type of behavioral diagram created from a Use-case analysis. Its
purpose is to present a graphical overview of the functionality provided by a system in terms of
actors, their goals (represented as use cases), and any dependencies between those use cases.

Create Network

Add Nodes

Cluster Network

Admin
Send Packets

Measure Energy
Consumption

Measure Lifetime

Fig. 5.5.1 use case diagram of system

The actor defined here is Admin. His roles are as follows

1. Create the network


2. Add the nodes
3. Cluster the network
4. Send the packets
5. Measure the energy consumption
6. Measure the lifetime

Dept. of ECE, PESCE Mandya Page 28


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

5.6 Sequence diagram of system operation

A sequence diagram in Unified Modeling Language (UML) is a kind of interaction


diagram that shows how processes operate with one another and in what order. It is a construct of
a Message Sequence Chart.

The sequence diagrams shows below.

Sequence Diagram for Network Creation

Admin Main Simulator Node

createNetwork

new

createNode
new

setPos

setRange

networkCreated

networkCreated

Fig. 5.6.1 Sequence diagram for network creation

Here Admin, Main, Simulator and Node are Objects.

Each object interacts with other objects in a sequential order through messages. As shown above.

Dept. of ECE, PESCE Mandya Page 29


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Sequence Diagram for Clustering

Admin Main Simulator Node

clusterNetwork

clusterNetwork

setRole(CH,SCH)

success

success

Fig. 5.6.2 Sequence diagram for clustering

Here Admin, Main, Simulator and Node are Objects.

Each object interacts with other objects in a sequential order through messages. As shown above.

Sequence Diagram for Packet Flow

Admin Main Node Cluster Head Super Cluster Head Sink

sendPacket

forward

forward

forward

collectPacket

Fig. 5.6.3 sequence diagram for packet flow

Dept. of ECE, PESCE Mandya Page 30


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Here Admin, Main, Node, Cluster Head, Super Cluster Head and Sink are Objects.

Each object interacts with other objects in a sequential order through messages. As shown above.

Sequence Diagram for Report Flow

Admin Main Report Simulator

viewReport

measueEnergyConsumption

retrieveLogs

logs

measureLifetime

report

Here Admin, Main, Report and Simulator are Objects.

Each object interacts with other objects in a sequential order through messages. As shown above.

5.7 Data Flow Diagram of the system

A data-flow diagram (DFD) is a graphical representation of the "flow" of data through an


information system. DFDs can also be used for the visualization of data processing (structured
design). On a DFD, data items flow from an external data source or an internal data store to an
internal data store or an external data sink, via an internal process.

Level 0 Data flow diagram

A context-level or level 0 data flow diagram shows the interaction between the system
and external agents which act as data sources and data sinks. On the context diagram (also
known as the Level 0 DFD) the system's interactions with the outside world are modeled purely

Dept. of ECE, PESCE Mandya Page 31


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

in terms of data flows across the system boundary. The context diagram shows the entire system
as a single process, and gives no clues as to its internal organization

Clustering Cluster the


Nodes in Network
1 Network

Here in level 0, nodes in network are taking as input and cluster the network is taken as output.
The first main process is Clustering.

Cluster
Packet Reaches
Sender Packets Routing
Sink
2

Here in level 0, sender packets are taking as input and packet reaches sink is taken as output. The
second main process is Cluster routing.

Level 1 Data flow diagram

The Level 1 DFD shows how the system is divided into sub-systems (processes), each of
which deals with one or more of the data flows to or from an external agent, and which together
provide all of the functionality of the system as a whole. It also identifies internal data stores that
must be present in order for the system to do its job, and shows the flow of data between the
various parts of the system.

Cluster head Super Cluster Cluster Heads,


Nodes in Network Selection Head Selection Super Cluster
1.0 1.1 Heads, Clusters

Dept. of ECE, PESCE Mandya Page 32


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

The level 1 worked with the sub processes of main process. The sub processes of first main
process are cluster head selection and super cluster head selection.

Routing to
Routing to
Super Cluster Routing to Sink
Sender Packets Cluster Head
Head 2.2
2.0
2.1

Packet Reaches
Sink

The level 1 worked with the sub processes of main process. The sub processes of second main
process are Routing to cluster head, routing to super cluster head and routing to sink.

Summary

This chapter mainly concentrates on system architecture, class diagram, sequence


diagram, use-case diagram, data flow diagram etc.

A data-flow diagram (DFD) is a graphical representation of the "flow" of data through an


information system. DFDs can also be used for the visualization of data processing (structured
design). On a DFD, data items flow from an external data source or an internal data store to an
internal data store or an external data sink, via an internal process.

Level 0 Data flow diagram

A context-level or level 0 data flow diagram shows the interaction between the system
and external agents which act as data sources and data sinks. On the context diagram (also
known as the Level 0 DFD) the system's interactions with the outside world are modeled purely

Dept. of ECE, PESCE Mandya Page 33


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

in terms of data flows across the system boundary. The context diagram shows the entire system
as a single process, and gives no clues as to its internal organization

No of Input Aggregation
Nodes at BS
Nodes 1.0

Find the Data


Validation
Aggregate Nodes whether it is
2.0
false / real

Level 1 Data flow diagram

The Level 1 DFD shows how the system is divided into sub-systems (processes), each of
which deals with one or more of the data flows to or from an external agent, and which together
provide all of the functionality of the system as a whole. It also identifies internal data stores that
must be present in order for the system to do its job, and shows the flow of data between the
various parts of the system.

Verification of
Find the Data
RPS Selection Sample
Aggregate Nodes whether it is
2.0.1 Messages
false / real
2.0.2

Summary

This chapter mainly concentrates on few fundamental design concepts such as input &
output design, system architecture, class diagram, sequence diagram, use-case diagram, data flow
diagram etc.

Dept. of ECE, PESCE Mandya Page 34


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Chapter 6

IMPLEMENTATION

Implementation is the stage of the project where the theoretical design is turned into a
working system. At this stage the main workload and the major impact on the existing system
shifts to the user department. If the implementation is not carefully planned and controlled, it can
cause chaos and confusion.

The implementation stage requires the following tasks.

 Careful planning.
 Investigation of system and constraints.
 Design of methods to achieve the changeover.
 Evaluation of the changeover method.
 Correct decisions regarding selection of the platform
 Appropriate selection of the language for application development
.

6.1 Language used for implementation

Implementation phase should perfectly map the design document in a suitable


programming language in order to achieve the necessary final and correct product. Often the
product contains flaws and gets ruined due to incorrect programming language chosen for
implementation.

In this project, for implementation purpose TCL/C++ is chosen as the programming


language. Few reasons for which TCL is selected as a programming language can be outlined as
follows:-

 TCL is simpler. Those without a C/Unix background generally find TCL syntax far easier
to learn and retain.
 TCLis smaller.
 TCLis easier to extend, embed, and customize.

Dept. of ECE, PESCE Mandya Page 35


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

 TCL source code traditionally is a model of lucidity. Perl source code traditionally is
dense in magic.
 TCL\TK is far more portable than PERL/TK and generally more current.
 TCP networking is more succinct and less intimidating.
 TCL'sexec, open and socket are gems of accessible and portable functionality, in
comparison to the analogous Perl offerings.
 TCL's unified channel API makes life much easier, particularly on Windows.
 As of spring 2001, TCL's Unicode [1] capabilities are considerably more mature.
 As of spring 2001, TCL's threading savvy (read "TCL and threads") is considerably more
mature.
 Subjective stuff: some people find Tcl a better fit to their own sensibilities.
 You can read your own code 6 months after you've forgotten how the program worked.
 (file)event, trace and friends often solve requirements for functionality better than
threads.
 TCL is way ahead of Perl in VFS capabilities; fuse provides an example of the potential
consequences.
 As "TCL's string handling has been written by paranoiacs", to quote DKF, TCL is
immune to many "format string vulnerabilities".

 All commands defined by TCL itself generate error messages on incorrect usage.
 Extensibility, via C, C++, Java, and TCL.
 Interpreted language using byte code.

6.2 Platform used for implementation

A platform is a crucial element in software development. A platform might be simply defined as


“a place to launch software”. In this project, for implementation purpose Linux (ubuntu)
platform is used & reasons for choosing this platform are Integrated Networking support, More
stable and secure than previous version, Enhanced device driver verifier, Dramatically reduced
reboot scenarios, Improved code protection, Side-by-side DLL support, Pre-emptive
multitasking architecture, Scalable memory and processor support, Encrypting File System

Dept. of ECE, PESCE Mandya Page 36


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

(EFS) with multi-user support, IP Security (IPSec), Kerberos support, Internet Explorer Add-on
Manager, NS2 Support.

The NS2 simulator is an open source simulation tool that runs on Linux. It is a discrete event
simulator targeted at networking research and provides substantial support for simulation of
routing, multicast protocols and IP protocols such as UDP, TCP, RTP and SRM over wired and
wireless(local and satellite) networks.

6.3 Algorithm used for implementation

6.3.1 Steps for cluster formation

Cluster_Formation ( )

1. hop_count : Number of hops that are connected with a node to reach the cluster head (less
value of hop_count is efficient)
2. rel_vel: relative velocity of a node in the network (Higher value is appreciable)
3. COM_RANGE: Node is present in Communication range
4. NCOM: Node is not present in communication range
5. G: G is the set of nodes that have not been cluster-heads in the last r rounds
6. BB: Node battery backup in joules
7. min_dist: the distance calculated between each node in the network and cluster head chosen
8. temp = distance calculation between cluster Head and other nodes.

Start

1) Node x check whether nodes are in communication range via temp

if (temp<min_dist) then node is COM_RANGE

ADD the node in cluster

otherwise

Node is NCOM

Dept. of ECE, PESCE Mandya Page 37


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

for each node do

ifhop_count<hop_count_limit then

Node x check whether nodes are in Communication range via temp

if (temp<min_dist) then

Node is COM_RANGE

ADD the node in cluster

otherwise

Node is NCOM Select Node x as Cluster Head

ADD the node in cluster

otherwise Node is NCOM

2) if (p<= p_thresh) then

call ELECT_CLUSTER_HEAD ( )

End

6.3.2 Steps to Elect Cluster Head

ELECT_CLUSTER_HEAD ( )

//hop_count_limit: Threshold for the hop count of the node

//rel_vel_limit: Relative velocity of the node movement

// BUFF: 3-dimentional Buffer

// p_thresh is the threshold value for the node to become cluster head here it is 0.00030

// do=Emp/Efs (Emp, Efs are transmit amplifier types)

Dept. of ECE, PESCE Mandya Page 38


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

//p= min_dis> do and hop_count< =hop_count_limit and rel_vel>rel_vel_limit and check G set
and BB>BB_thresh

//node_type shows the type of the node whether it is a normal node in the network or cluster
head.

for i=1 to hop_count_limit do

if (p<=p_thresh) then

ADD node with BB value and rel_vel in BUFF

for each node in BUFF do

select the node(z) with higher BB value and higher rel_vel

Elect the node (z) as cluster head

If node_type=N then

Compare BB of each node

Select node with the highest energy as Super Cluster Head.

Node (z) can perform the task of cluster head and it check the following condition periodically
for itself

if (p >p_thresh) then

call ELECT_CLUSTER_HEAD ( )

Summary

This chapter gives implementation details of the two major subsystems which are
developed for this project. With the help of data flow diagram, it also specifies the logic of
implementation for the different modules that have been specified during the system design.
Along with these, this chapter also highlights some of the important features of the platform and
language used for implementation purpose.

Dept. of ECE, PESCE Mandya Page 39


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Chapter 7

TESTING

System testing is actually a series of different tests whose primary purpose is to fully
exercise the computer-based system. Although each test has a different purpose, all work to
verify that all the system elements have been properly integrated and perform allocated
functions. The testing process is actually carried out to make sure that the product exactly does
the same thing what is supposed to do. Testing is the final verification and validation activity
within the organization itself. In the testing stage following goals are tried to achieve:-

 To affirm the quality of the project.


 To find and eliminate any residual errors from previous stages.
 To validate the software as a solution to the original problem.
 To provide operational reliability of the system.

7.1 Unit Testing

Here each module that comprises the overall system is tested individually. Unit testing
focuses verification efforts even in the smallest unit of software design in each module. This is
also known as “Module Testing”. The modules of the system are tested separately. This testing is
carried out in the programming style itself. Unit testing exercises specific paths in a module’s
control structure to ensure complete coverage and maximum error detection. This test focuses on
each module individually, ensuring that it functions properly as a unit. Hence, the naming is Unit
Testing. In this step each module is found to work satisfactorily as regard to the expected output
from the module. This testing is done to check for the individual block codes for their working.
It is done so that when we carry out functional testing then the units which are part of these
functionalities should have been tested for working.

The following unit testing table shows the functions that were tested at the time of
programming. The first column lists all the functions which were tested and the second column
gives the description of the tests done.

Dept. of ECE, PESCE Mandya Page 40


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Table 7.1:- Unit testing table

Function Tests done Remarks

createNetwork. Tested to check whether the nam Success

NAM window is created and nodes are


displayed

Create Node Tested for check whether nam Success


window display Nodes in green
color.

Clustering Tested whether the clustering Success


done based on cluster head and
supercluster head.

Routing Tested whether the routing done Success


from source node to cluster head
and supercluster head. And from
there to BS.

7.2 Integration
After successful completion of unit testing or module testing, individual functions are
integrated into classes. Again integration of different classes takes into place and finally
integration of front-end with back-end occurs.

Dept. of ECE, PESCE Mandya Page 41


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

 Integration of functions into classes

At the start of coding phase only the functions required in different parts of the program
are developed. Each of the functions is coded and tested independently. After verification
of correctness of the different functions, they are integrated into their respective classes.

 Integration of different classes

Here the different classes are tested independently for their functionality. After
verification of correctness of outputs after testing each class, they are integrated together
and tested again.

7.3 Integration Testing


Data can be lost across interface. One module can have an adverse effect on another. Sub
functions when combined, should not reduce the desired major function. Integration testing is a
systematic technique for constructing the program structure. It addresses the issues associated
with the dual problems of verification and program construction. The main objective in this
testing process is to take unit tested modules and build a program structure that has been dictated
by design.

After the software has been integrated, a set of high order tests are conducted. All the
modules are combined and tested as a whole. Here correction is difficult, because the isolation of
errors is complicated by the vast expanse of the entire program.

7.3.1 Top down Integration

This method is an incremental approach to the construction of program structure.


Modules are integrated by moving downward, beginning with the main program module.
Modules that subordinates to the main program module are incorporated into the structure in
either a depth first or breadth first manner.

Dept. of ECE, PESCE Mandya Page 42


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

7.3.2. Bottom-up Integration


This method begins the construction and testing with the modules at the lowest level in
the program structure. Since the modules are integrated from bottom to up, processing required
for modules subordinate to a given level is always available. Therefore in this case the need for
stubs is eliminated. The following integration testing table shows the functions that were
combined into different classes and the class as a whole tested for its functionality. This is
important to check for error-free interaction between various classes, and maintenance of data
integrity.

Table 7.2:- Integration testing table

Classes Functions integrated in Tests done Remarks


integrated each class

Class: Main Create Network() Class tested to Success


check whether all
Cluster Network()
commands that were
Send Report()
applied are working
View Report() correctly and
appropriately or not.
Class: Simulator Create Node() Class tested to Success
Cluster Network() check whether all
Retrieve Logs() network objects is
creating the nodes
and doing routing
Class: Report MeasureEnergy Class tested to Success
Consumption()
check whether all
Measure Lifetime() network objects is
creating the nodes
and doing routing

Dept. of ECE, PESCE Mandya Page 43


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

7.4Validation Testing
At the culmination of integration testing, software is completed and assembled as a
package. Interfacing errors are uncovered and corrected. Validation testing can be defined in
many ways. Here the testing validates the software function in a manner that is reasonably
expected by the customer.

Table 7.3:- Validation testing table

Functionality to Input Tests done Remarks


be tested
Working of NAM User interaction with NAM window appears with Success
help of a mouse and nodes placed
keyboard

Working of User configure the NAM window is displayed Success


simconfig network, Do clustering with differentiating the type
based on HEEDs Algo, of nodes
number of nodes, type
of nodes, and all other
configurable parameters.

Working of simrun Normal and sensor Packet transfer and the Success
nodes sense events and sensor range should be
forward the packet to displayed.
routers

Working of plot user runs the simulation Graph of No of Nodes v/s Success
graph and type ./plotgraph.sh Energy Consumption is
displayed .And Graph of No
of Nodes v/s Lifetime is
displayed

Dept. of ECE, PESCE Mandya Page 44


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

7.5 Output Testing

After performing the validation testing, the next step is output testing of the proposed
system, since no system could be useful if it does not produce the required output in the specified
format. Therefore the output testing involves first of all asking the users about the format
required by them and then to test the output generated or displayed by the system under
consideration. The output format is considered in 2 ways: –

(1) On screen (2) Printed format

7.6 User Acceptance Testing


User Acceptance of a system is the key factor to the success of any system. Performance
of an acceptance test is actually the user’s show. User motivation and knowledge are critical for
the successful performance of the system.

The system under consideration is tested for user acceptance by constantly in touch with
the prospective system users at time of developing and making changes wherever required in
regard to the following point:

 Input Screen design


 Output Screen design
 Menu driven system

7.6.1 White box testing

White box testing (clear box testing, glass box testing, and transparent box testingor
structural testing) uses an internal perspective of the system to design test cases based on internal
structure. It requires programming skills to identify all paths through the software. The tester
chooses test case inputs to exercise paths through the code and determines the appropriate
outputs. While white box testing is applicable at the unit, integration and system levels of the
software testing process, it is typically applied to the unit. While it normally tests paths within a

Dept. of ECE, PESCE Mandya Page 45


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

unit, it can also test paths between units during integration, and between subsystems during a
system level test.

Though this method of test design can uncover an overwhelming number of test cases, it
might not detect unimplemented parts of the specification or missing requirements, but one can
be sure that all paths through the test object are executed. Using white box testing we can derive
test cases that:

 Guarantee that all independent paths within a module have been exercised at least once.
 Exercise all logical decisions on their true and false sides.
 Execute all loops at their boundaries and within their operational bounds.
 Execute internal data structure to assure their validity

7.6.2Black box testing

Black box testing focuses on the functional requirements of the software. It is also known
as functional testing. It is a software testing technique whereby the internal workings of the item
being tested are not known by the tester. For example, in a black box test on software design the
tester only knows the inputs and what the expected outcomes should be and not how the program
arrives at those outputs.

The tester does not ever examine the programming code and does not need any further
knowledge of the program other than its specifications. It enables us to derive sets of input
conditions that will fully exercise all functional requirements for a program. Black box testing is
an alternative to white box technique. Rather it is a complementary approach that is likely to
uncover a different class of errors in the following categories:-

 Incorrect or missing function.

 Interface errors.

 Performance errors.

 Initialization and termination errors.

 Errors in objects.

Dept. of ECE, PESCE Mandya Page 46


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Advantages

 The test is unbiased as the designer and the tester are independent of each other.
 The tester does not need knowledge of any specific programming languages.
 The test is done from the point of view of the user, not the designer.
 Test cases can be designed as soon as the specifications are complete.

7.7 Preparation of Test Data

Preparation of test data plays a vital role in the system testing. After preparing the test
data, the system under study is tested using that test data. While testing the system by using test
data, errors are again uncovered and corrected by using above testing steps and corrections are
also noted for future use.

7.7.1 Using Live Test Data

Live test data are those that are actually extracted from organization files. After a system
is partially constructed, programmers or analysts often ask users to suggest data for test from
their normal activities. Then, the systems person uses this data as a way to partially test the
system. In other instances, programmers or analysts extract a set of live data from the files that
they have entered themselves.

It is difficult to obtain live data in sufficient amounts to conduct extensive testing and
although the realistic data that will show how the system will perform for the typical processing
requirement. Assuming that the live data entered are in fact typical; such data generally will not
test all combinations or formats that can enter the system. This bias toward typical values then
does not provide a true system test and in fact ignores the cases most likely to cause system
failure.

7.7.2 Using Artificial Test Data

Artificial test data are created solely for test purposes, since they can be generated to test
all combinations of formats and values. In other words, the artificial data, which can quickly be

Dept. of ECE, PESCE Mandya Page 47


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

prepared by a data generating utility program in the information systems department, make
possible the testing of all login and control paths through the program.

The most effective test programs use artificial test data generated by persons other than
those who wrote the programs. Often, an independent team of testers formulates a testing plan,
using the systems specifications.

7.8 Quality Assurance

Quality assurance consists of the auditing and reporting functions of management. The
goal of quality assurance is to provide management with the data necessary to be informed about
product quality, thereby gaining insight and confident that the product quality is meeting its
goals. This is an “umbrella activity” that is applied throughout the engineering process. Software
quality assurance encompasses:-
 Analysis, design, coding and testing methods and tools
 Formal technical reviews that are applied during each software engineering
 Mulitiered testing strategy
 Control of software documentation and the change made to it.
 A procedure to ensure compliance with software development standards.
 Measurement and reporting mechanisms.

7.8.1 Quality Factors

An important objective of quality assurance is to track the software quality and assess the
impact of methodological and procedural changes on improved software quality. The factors that
affect the quality can be categorized into two broad groups:

 Factors that can be directly measured.

 Factors that can be indirectly measured

These factors focus on three important aspects of a software product

 Its operational characteristics


 Its ability to undergo changes

Dept. of ECE, PESCE Mandya Page 48


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

 Its adaptability to a new environment.


 Effectiveness or efficiency in performing its mission
 Duration of its use by its customer.

7.8.2 Generic Risks


A risk is an unwanted event that has negative consequences. We can distinguish risks
from other project events by looking for three things:

 A loss associated with the event.


 The likelihood that the event will occur.
 The degree to which we can change the outcome

The generic risks such as the product size risk, business impact risks, customer–related
risks, process risks, technology risks, development environment risks, security risks etc. This
project is developed by considering all these important issues.

7.8.3 Security Technologies & Policies


The software quality assurance is comprised of a variety of tasks associated with seven
major activities:-
 Application of technical methods.
 Conduct of formal technical reviews
 Software testing
 Enforcement of standards
 Control of change
 Measurement
 Record keeping and reporting

Dept. of ECE, PESCE Mandya Page 49


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Summary

This chapter deals with several kinds of testing such as unit testing which is a method of
testing the accurate functioning of a particular module of the source code. It is also referred to as
module testing. It also gives a brief detail about different kinds of integration testing in which
individual software modules are combined and tested as a group. Other then these main two
kinds of testing, many other types such as validation testing, output testing, user acceptance
testing and preparation of test data also discussed here. This chapter also focuses on assuring
quality of the software.

Dept. of ECE, PESCE Mandya Page 50


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

CHAPTER-8

INTERPRETATION OF RESULT

The following snapshots define the results or outputs that we will get after step by step
execution of all the modules of the system.

Interpretation:-Enter into the folder where the project is place.

Fig 8.1 Average Energy Dissipation

Dept. of ECE, PESCE Mandya Page 51


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Fig 8.2 Network Life time

Dept. of ECE, PESCE Mandya Page 52


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Fig 8.3 Throughput

Summary

This chapter gives a brief interpretation of the expected and obtained result when each
and every module is executed in their proper sequence

Dept. of ECE, PESCE Mandya Page 53


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Chapter 9

CONCLUSION & FUTURE SCOPE

9.1 Conclusion

The proposed TEEN clustering technique is very effective because it considers all the five
parameters i.e. Communication range, Hop Count, Battery Power, Relative Velocity, Fairness at
a time, all of which play an important role in choosing the appropriate nodes as Cluster Heads.
The Super Cluster Head elected is the normal node (except Cluster Head) having maximum
battery power left after the Cluster Head election process. The Super Cluster Head can detect the
misbehaving Cluster Heads. The efficient node passes the criteria and becomes the Cluster Head.
The proposed technique of clustering increases the network life time as all the nodes acting as
Cluster Heads seem to dissipate energy at very less rate.

9.2 Future Scope


In future we can extend this technique by adding the authentication step among the nodes to
provide security against any kind of attack.

Dept. of ECE, PESCE Mandya Page 54


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

REFERENCES
[1] LI XingGuo, WANG JunFeng, Bai LinLin (2016). “LEACH protocol and its Improved
Algorithm in wireless sensor network”.

[2] Wendi Rabiner Heinzelman, Ananthachndrakasan, and Hari Balakrishnan.(2000). ”Energy


Efficient Communication Protocol for Wireless Micro sensor Network”.

[3] Arati Manjeswara and Dharma P Agarwal, .”TEEN: A Routing Protocol For Enhanced
Efficiency in Wireless Sensor Network”.

[4] AvitaKatal, Mohammad Wazid, Roshan Singh Sachan, R H Goudar, “Two Way Intrusion
Detection and Prevention Techniques for JF Periodic Dropping Attack”, IEEE International
Conference on Communication and Signal Processing (ICCSP), 2013.

[5] Uma Maheswari, G Radhamani, “Clustering Schemes for Mobile AdhocNetworks: A


Review”,IEEE International Conference on Computer Communication and Informatics
(ICCCI),2012.

[6] Abdel Rahman Hussein, SufianYousef, Samir Al-Khayatt,Omar S. Arabeyyat , “An Efficient
Weighted Distributed ClusteringAlgorithmfor Mobile Ad hoc Networks”, IEEE International
Conference on Computer Engineering and Systems (ICCES), 2010.

[7] Xufeng Ma, “A K-hop Cluster Maintaining Mechanism for Mobile AdHoc Networks”,
IEEE7th International Conference on Wireless Communications, Networking and Mobile
Computing (WiCOM), 2011.

[7] S.Muthuramalingam, M.Sujatha, R.Surya, R.Rajaram, “An Enhanced Sectorized Clustering


Scheme based on Transmission Range for MANETS”,IEEE-International Conference on Recent
Trends in Information Technology, ICRTIT 2011.

Dept. of ECE, PESCE Mandya Page 55


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

[9] S. Muthuramalingam, R. RajaRam, KothaiPethaperumal, V.KarthigaDevi, “A Dynamic


Clustering Algorithm for MANETs by modifying Weighted Clustering Algorithm with Mobility
Prediction”, IEEE International Journal of Computer and Electrical Engineering, Vol. 2, No. 4,
August, 2010.

[10] Vijeesh.T,Niranjan Kumar Ray, Ashok Kumar Turuk, “SPC: The Selective Prioritized
Clustering Algorithm for MANETs”,IEEEInternational Symposium on Electronic System
Design, 2010.

[11] Hussein, A. Yousef, S. Al-Khayatt, S. Arabeyyat, O.S, “An efficient weighted distributed
clustering algorithm for mobile ad hoc networks”, International Conference on Computer
Engineering and Systems (ICCES), pp.221-228, 2010.

[12] ChuangangWang,YanpingYU,YuanxinXU,MinjueMA,ShibinDIAO,“A Multi-hop


Clustering Protocol for MANETs”,IEEE 5thInternational Conference on Wireless
Communications, Networking and Mobile Computing, (WiCom) 2009.

[13] Jing An, Chang Li, Bin Li, “A Improved Weight Based Clustering Algorithm in Mobile Ad
Hoc Networks”,IEEE Youth Conference on Information,Computing and Telecommunication,
(YC-ICT) 2009.

[14] AbdulRahman H. Hussein, Amer O. Abu Salem, SufianYousef, “A Flexible Weighted


Clustering Algorithm Based on Battery Power for MobileAd Hoc Networks”,IEEE International
Symposium on Industrial Electronics, 2008.

[15] Zhaowen Xing, Le Gruenwald, K.K. Phang, “A Robust Clustering Algorithm for Mobile Ad
Hoc Networks”, Handbook of Research on Next Generation Networks and Ubiquitous
Computing, 2008.

Dept. of ECE, PESCE Mandya Page 56


The Comparison Analysis of TEEN Protocol With Existing LEACH Protocol In WSN

Dept. of ECE, PESCE Mandya Page 57

Вам также может понравиться