INTRODUCTION
Wireless Sensor Network (WSN) is used to check the physical conditions in different areas like office buildings, geographical regions, agriculture lands, industrial plants. The applications of WSNs are in different fields ranging from environment monitoring to battlefield scenarios. Wireless sensor networks consists of a large number of tiny sensor nodes equipped with limited computing and communication capabilities.
Each sensor node in WSN consist four units. They are,
(a) Sensor unit is composed of a sensor to sense the environmental conditions like weather, humidity etc. The sensed data are then converted into digital form using ADC (Analog Digital Converter).
(b) Processor unit comprises of processor such as microcontroller and memory.
(c) Transceiver unit contains wireless radio transmitter and receiver sections.
(d) Power unit makes use of batteries that provide necessary power to other remaining units. Every sensor node is operated by a battery, and it is not possible either to replace or recharge this battery after deployment. The lifetime of a sensor network is considered over as soon as the battery power of the critical nodes in the network is completely drains.
Sensor nodes are used to monitor environmental variations like temperature, pressure, humidity, rainfall, smoke, etc. These environmental variations are checked by exchanging the information among the sensor nodes which are in the coverage area with the help of communication protocols. Communication protocols are made to exchange such information among the nodes of a network and it should be designed in a way that adapts to the dynamic conditions of either static topology or dynamic topology of a network depending on the application for which it is designed.
The above application scenario describes, there is a major requirement to make the operation of a network without any type of faultiness. The faultiness in WSN are created by various reasons like network failure, node failure, link failure and unavailability of network due to
Faulty nodes that lead to inefficient performs of the network. Therefore it is necessary to identify those faults in a network and fix them appropriately.
CAUSES OF FAULTS IN WSN
Mostly sensor networks fail due to two reasons such as node failures or communication failures. Usually faults occur by using low-cost sensor nodes which are deployed in uncontrolled environment and thus result in faulty node. A sensor network may suffer from various faults such as environmental impacts, software bugs and hardware defects. These faults results in high loss rates, transmission delays and network disconnection, and hence majorly affects the normal operations of the sensor network. Because of all this, failures of nodes and network which reduces dramatically the overall network lifetime and make the communication infrastructure unusable.
There is a prime requirement to design an effective system architecture and new techniques to monitor the health of the network quickly and smartly to detect faults. It is thus important to detect the faulty sensor nodes, and remove them from the sensor network during normal transmission until and unless they need to be used as communication nodes. The status of every node in the network must be monitored frequently to identify and locate faults in the network and to check whether the node is in inactive or active status. Battery power level and interference model are the basic components to identify whether nodes are in active or inactive state.
We propose an idea of Active node based Fault Tolerance using Battery power and Interference model (AFTBI) in WSN where the node active condition is gained by using battery power level adjustment approach and interference model. Considering all these above models, we suggest fault tolerance solutions to retain the proper functioning of the network and hence enhance the network lifetime.
RESEARCH OBJECTIVE
We need to implement a design of an application which holds the normal functioning of the sensor network and increase the network lifetime by using an Active node based Fault Tolerance using Battery power level adjustment approach and Interference model (AFTBI) in WSN. The node active condition is achieved by considering battery power level adjustment approach and interference model.
MAIN CONTRIBUTIONS
Our contributions in this project are as follows.
(a) Modeling node active status to identify node faults using the parameters such as battery power of a node and interference.
(b) Designing fault tolerant technique based on sensor node interference and battery power level.
(c) Whenever a node battery power reduces automatically hand-off mechanism is implemented to a neighboring node.
(d) Dynamic power level adjustment of neighboring nodes if not involved in communication.
(e) Performance evaluation for Packet Delivery Ratio (PDR), fault recovery delay and control overhead are analyzed.
Literature survey
Some of the related works are: The work given in Lee and Choi (2008) proposes FDWSN—a distributed algorithm for detecting and isolating faulty sensor nodes in wireless sensor networks. Nodes with malfunctioning sensors are allowed to act as a communication node for routing, but they are logically isolated from the network as far as fault detection is concerned. It employs local comparisons of sensed data between neighbors and dissemination of the test results to increase the accuracy of diagnosis. Temporary faults in communication and sensor reading are tolerated by using time redundancy. By identifying fault-free nodes faulty nodes are isolated. Both the network connectivity and accuracy of diagnosis are taken into account since fault-free nodes isolated might be of little or no use even if they are determined to be fault-free, unless they can participate in the network via intermediate communication nodes with faulty sensors.
A tree-based aggregation techniques to detect faults in sensor network is proposed in Chitnis et al. (2009). A fault model identifies failure traits and the tree aggregation is analyzed with fault model. Redundant trees are removed by rebuilding or locally fixing the tree. The cost-benefit analysis is made using the hash functions. A fault-tolerant mechanism using out-of-band monitoring for WSN (Chen et al., 2012) uses some of the nodes as monitor nodes placed so that all sensor nodes are monitored. For smaller networks, Integer Linear Programming (ILP) problem is formulated for large networks, approximation and heuristic algorithms are used. The work given in Bari et al. (2012) proposes two-tier sensor network architecture, where some relay nodes are used as cluster heads with higher power. The relay nodes are resilient to node failures. Placement strategy for the relay nodes is based on ILP problem that assigns the sensor nodes to the clusters. Load-balanced routing scheme provides fault tolerance for both the sensor nodes and the relay nodes and enhances network lifetime by limiting the maximum energy consumption of the relay nodes.
The work in Challal et al. (2011) proposes intrusion–fault tolerant routing scheme that offers better reliability through a secure multipath routing construction. The protocol is based on a distributed and in-network verification scheme without the intervention of base station. Multipath selection is employed to enhance the tolerance of the network and conserve the
energy. In the consensus problem algorithm proposed in Hsieh et al. (2010) divides all sensors into different autonomous local networks, where all the nodes perform corresponding actions without the help of sink nodes which solves the single-point of failure problem and reduces the hopping process time. The proposed consensus based algorithm also improved the decision result even when the sensor fault and transmission media fault exist simultaneously.
The work given in Feng et al. (2011) proposes a fault tolerant data aggregation protocol that updates aggregation and reschedules the aggregation process after a node is out of service. Data is aggregated according to the basic aggregation scheduling strategy. The amendment strategy starts after a middle sensor node is out of service. Some properties of the original aggregation tree will be lost due to the change of aggregation path after the amendment. The amendment strategy consists of aggregation tree amendment strategy and aggregation rescheduling strategy. The work given in Zhaoa et al. (2011) proposed a fault diagnosis mechanism for WSNs.
The diagnosis model consists of probabilistic analysis of the local and global performances of approach. In this model, every node and its neighbor nodes form a cluster. The diagnosis mechanism is updated and operates in four sessions:
(a) Start a diagnosis session
(b) Testing session
(c) Comparison session
(d) Dissemination session.
The work in Kashyap et al. (2011) proposed relay placement for fault tolerance wherein a small number of additional relay nodes are added to a network of static nodes with limited communication range so that the induced communication graph is 2-connected. The work in Sa de Souza (2007) proposes a framework to improve fault tolerance in heterogeneous WSNs that satisfies six major requirements such as extensibility, transparency and support to heterogeneous WSNs, identify crash, omission, value and arbitrary failures, isolate failures, provide automatic recovery techniques. Group fault detection is used to identify, outlier readings and crash failures.
Anurag and Somprakash (2008) presents a work on routing algorithm that merges the structure of a hierarchical tree with Ad hoc On Demand Distance Vector Routing. New devices on a network are given an address to satisfy the hierarchical property. When hierarchical property is disturbed, a route table entry, similar to AODV, is created for this non-conforming node. This route table entry is also created when a node/link fails thus preventing other nodes from having to change their addresses or depth. The mechanism of making route table entries has implicit support for fault tolerance.
The work in Gupta and Younis (2003) proposes a run-time recovery mechanism based on consensus of healthy gateways to detect and handle faults in one faulty gateway. A two-phased detection and recovery mechanism is suggested to limit the performance impacts caused by a gateway failure. The work in Aslanyan and Rolim (2010) proposes a polynomial time approximation algorithm which finds a connected network with the minimal interference of the given network. The work in Xu et al. (2007) proposes channel surfing to reduce interference, where the sensor nodes adapt their channel assignments to restore network connectivity in the presence of interference. Two different approaches are discussed in channel surfing: (1) Coordinated channel switching, where the entire sensor network adjusts its channel (2) Spectral multiplexing, where nodes in a jammed region switch channels while nodes on the boundary of a jammed region act as radio relays between different spectral zones.
The work in Fussen (2004) proposes Nearest Component Connector (NCC) algorithm, which produces at most Oðlog nÞ interference in any network in polynomial time compared to any topology Control algorithm which constructs a resulting network with least interference. To reduce the node transmission power levels and drop long-range connections in a coordinated way, the concept of topology control encloses interference by having the network nodes. At the same time, transmission power is reduced in a controlled manner in order to conserve connectivity of the network.
In Hassan and Abuhaiba (2011), an Interference-Aware Connected Dominating Set-based topology construction algorithm (IACDS) algorithm is proposed, which has distributed, interference-aware and energy-efficient topology to find a suboptimal Connected Dominating Set (CDS). IACDS algorithm utilizes a weighted (distance-energy-interference)-based metric. It allows network operator to trade-off the lengths of the branches (distance) for the robustness and durability of the topology. The work given in Yoon et al. (2010) presents an Adaptive Channel Hopping (ACH) mechanism. It avoids interference from other sources and narrow-band jamming. During interference, ACH allows sensors to switch to a new operating channel. ACH reduces the channel scanning and selection latency by ordering available channels using link quality indicator measurements and weights.
The work given in Hassan and Chickadel (2011) proposes graph theoretical model to reduce interference. A graph coloring methods are used to model the interference reduction problem. To reduce the collisions and signal interference, the problem is modeled as a coloring problem on the interference graph. Nodes of different colors in the graph will be assigned separate channel of radio frequency. Effective channel selection method that lowers the wireless interference is obtained by efficient coloring algorithms.
A fault tolerance execution model by using of mobile agents to obtain consistent and correct performance with a required function for a specified period of time is proposed in Qu et al. (2009). Failures are classified into two intrinsic different effects on mobile agents. For each kind of failure, a specific handling method is adopted. The introduction of exceptional handling method allows performance improvements during mobile agent’s execution. The behaviors of mobile agents are analyzed through several key parameters, including the migration time from node to node, the life expectancy of mobile agents, and the population distribution of mobile agents, to evaluate the performance.
Work given in Guo et al. (2012) presents Hybrid Ondemand Distance Vector Multi-path (HODVM) routing protocol for Spatial Wireless Ad Hoc (SWAH) networks. It separates SWAH into backbone and non-backbone networks to perform static and dynamic routing. To provide load balancing, HODVM adaptively establishes and maintains multiple node-disjoint
routes by multipath routing. HODVM provides better performance in terms of scalability, survivability and load balancing.
Optimal cluster size minimization to reduce energy consumption in WSN is proposed in Amini et al. (2012) where all sensor nodes communicate data through their elected cluster heads to the base station. The paper compares three cluster based protocols such as LEACH, LEACH-Coverage, and DBS that do not require centralized support from a certain node. Energy consumption in each case is analyzed.
Above mentioned works performed the fault analysis in WSN by considering only either battery power or interference and none of them considered the integrated approach of battery power and interference. Our proposed AFTBI uses integrated model of battery power and interference to find active nodes in WSN thereby eliminating all possible types of faults in WSN and enhance the network lifetime.
SYSTEM ANALYSIS
EXISTING SYSTEM
Wireless Sensor Networks are prone to different types of failures because of various environmental threats like interference and internal failures such as battery failure, processor failure and transceiver failure. In such a condition, the data center cannot receive the sensed data properly and the very purpose of deploying WSNs is not effective. As manual operators cannot monitor the network continuously, the nodes in WSN need to be capable of overcoming the failures and transmit the sensed data in proper order to the data center.
DISADVANTAGES OF EXISTING SYSTEM
The disturbances in WSN are encountered by various reasons such as connectivity failure, network failure, node failure, link failure and unavailability of network due to misbehaving nodes, leads to inefficient functioning of the network.
Also common issues are as follows:
 There is no guarantee for data to reach the destination
 There is no back-up path for single link failure
 It is time consuming
 It has no precise knowledge of failure locations
 Battery drains if remaining power is not estimated before making transmission.
Proposed system
We propose a unique idea called AFTBI in wireless sensor network to identify the faulty nodes using battery power level adjustment approach model and interference model. Hand-off mechanism is achieved to overcome fault tolerance which is occurred due to minimum battery power. Where in the faulty node selects the neighboring node having highest battery power and transfers all the data and services that are to be performed by the faulty node to the selected neighboring node.
ADVANTAGES OF PROPOSED SYSTEM
 Path having highest battery power nodes is chosen for transmission.
 Scheme offers better reliability in transmission.
 Faultless transmission of data thus no packet loss.
 Alternate path selection in case of battery down in nodes.
SYSTEM STUDY
FEASIBILITY STUDY
The feasibility is examined in this phase of the project and business proposal is put forth with a very common plan for the project and some cost predict. During system analysis the feasibility study of the proposed system must be carried out. This feasibility study to ensure that the proposed system is not a burden to the company. For feasibility analysis, some understanding of the major requirements and concept for the system is essential.
Three key considerations involved in the feasibility analysis are
 Economic Feasibility
 Technical Feasibility
 Social Feasibility
ECONOMICAL FEASIBILITY
This feasibility 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 use into the research and development of the system will be limited. The expenditures of the systems must be justified. Because most of the technologies which were used are freely available thus the developed system was within the budget. Only the customized products had to be purchased.
TECHNICAL FEASIBILITY
This feasibility study is carried out to check the technical feasibility, that is, the technical requirements of the system. Any system developed should not have a high demand on the available technical resources. This will results in high demands on the available technical resources. This will results in high demands being placed on the client.
SOCIAL FEASIBILITY
The feasibility study is to check the level of acceptance of the system by the user. This contains the process of training the user to use the system efficiently. The user should not feel threatened by the system, instead must accept it as it is. The level of acceptance by the users only depends on the methods that are employed to educate the user about the system and to make user familiar with it. User level of confidence should be raised so that user is also able to make some constructive criticism, which is welcomed, as user is the final user of the system.
SYSTEM ARCHITECTURE
The above figure depicts the connection between server and clients.
REQUIREMENTS
FUNCTIONAL REQUIREMENTS
Functional requirements describes the fundamental actions that system must perform.
NON-FUNCTIONAL REQUIREMENTS
Non-Functional requirements define the needs in terms of performance, logical database requirements, design constraints, standards compliance, reliability, availability, security, maintainability, and portability.
SYSTEM REQUIREMENTS SOFTWARE REQUIREMENTS
Operating System : Windows Family.
Language : JDK 1.6
Front End : AWT, Swing
API : Sockets / IO, Substance L&F
Database : HeidiSQL
HARDWARE REQUIREMENTS
Processor : Any Processor above 500 MHz.
Ram : 512 MB min.
Hard Disk : 10 GB Free.
Input device : Standard Keyboard and Mouse.
Output device : VGA and High Resolution Monitor.
SOFTWARE ENVIRONMENT
 JAVA TECHNOLOGY
Java technology is both a platform and a programming language.
 THE JAVA PROGRAMMING LANGUAGE
The Java programming language is a high-level language that can be characterized as follows
 Simple
 Architecture neutral
 Object oriented
 Portable
 Distributed
 High performance
 Interpreted
 Multithreaded
 Robust
 Dynamic
 Secure
Most programming languages is either used compile or interpret a program so that it can run it on computer. With the compiler, first it has to be translated a program into an intermediate language called Java byte codes —the platform-independent codes interpreted by the interpreter on the Java platform. The interpreter parses and runs each Java byte code instruction on the computer. Compilation happens only once, interpretation occurs every time the program gets executed. The following figure shows how this works.
java process
We can think of Java byte codes as the machine code instructions for the Java Virtual Machine (Java VM). Is an implementation of the Java Virtual machine. One of the main characteristics of java byte code is “write once, run anywhere†property. We can compile our program into byte codes on any platform that contains a Java compiler. Then the byte codes can run any platform which contains Java VM. This indicates that the java is a platform independent language. Which means the program written in java can run on a Solaris workstation, on Windows 2000 or an iMac.
java Program
 THE JAVA PLATFORM
The Java platform varies from other platforms in its natural ways. A platform can be a hardware or software environment in which a program runs. Some of the most popular platforms are Windows 2000, Linux, Solaris, and MacOS. Generally platforms can be
combination it’s a software-only platform that runs on top of other hardware-based platforms.
The Java platform has main two components:
 The Java Virtual Machine (Java VM)
 The Java Application Programming Interface (Java API)
We know that java byte code only runs on a platform where Java VM is installed. JVM is the basic component for java platform and it helps java programs to run efficiently.
The Java Application Programming Interface (API) is a collection of available software components that provide many useful functions, like graphical user interface (GUI) capabilities. The Java API contains libraries of related classes and interfaces, these libraries are called as packages. The next section tells us about, What Can Java Technology Do? And what functionality does the packages in the Java API will provide to the users.
The following figure shows a program that’s running on the Java platform. As the figure depicts, the Java API and the virtual machine inherit the program from the hardware.
: Platform
Native code is computer programming that after you compile it, the compiled code runs on a specific processor and on a set of instructions. As java is platform-independent, the Java platform can be a slight slower than the native code. But sometimes, smart compilers and just-in-time byte code compilers can perform same as the native code.
 WHAT CAN JAVA TECHNOLOGY DO?
Most of the time the type of programs written in the Java programming language are applets and applications. An applet is a program that is internet based written in java. Which can be downloaded by any computer.
Since Java programming is not just for writing entertaining applets for the Web it’s general-purpose is to write high-level Java programming language which is powerful. Using the API, we can write many types of programs.
An application is a program that runs directly only the Java platform. There is a special kind of application called server serves and it supports clients on the network. For example proxy servers, servers are web servers, and print servers.
We can come across a specialized program called servlet. A servlet can is as an applet that runs only one the server side. Java Servlets can be used for building the interactive web applications, replacing the usage of CGI scripts. Servlets are very similar to applets. Servlets can be run within Java Web servers.
Most of the time API support all kinds of programs. It does so with packages of software components which provides a wide variety range of functionality. Java implementation gives us the following features:
 The essentials: Objects, threads, numbers, input and output, data structures, date and time etc.
 Applets: The set of conventions used by the applets.
 Networking: URLs, UDP (User Data gram Protocol) sockets, TCP (Transmission Control Protocol), and IP (Internet Protocol) addresses.
 Internationalization: Help for writing the programs that can be localized for users worldwide. The programs can automatically adapt to particular locales and it will get displayed in appropriate language.
Security: Both high level and low level, including electronic signatures, private and public key management and certificates.
DETAILED DESIGN
Flow diagram
System layout
Topology Construstion
Client1
Client2
Client3
ï‚· Add Node
ï‚· Add Path
ï‚· Maximum
Energy Path
ï‚· Message
Transmission
Choose 2nd Maximum
Energy Path
If link failure
USE CASE DIAGRAMS
User use-case diagram
Server use-case diagram
SYSTEM IMPLEMENTATION
MODULES
TOPOLOGY CREATION
In this module we let admin to select any kind of network topology structure. Admin first enters the number of nodes and then for each and every node provide the node information as node name, IP address and port number. Node information is updated in the database. In next step nodes are connecting the nodes with the path cost. Connected node information is updated in the database.
MESSAGE TRANSMISSION
In this module one node selects other node to transmit the message. In the initial stage, client gets connected to server via Sockets, destination node will be mentioned by selecting the combo box. Message will be entered in the text area to send. All possible paths with minimum cost from source to destination are calculated. If intermediate node is failed than an alternative path is detected and message is sent. Data packets are handled with care to maintain seamless transmission
ENERGY AWARE TRANSMISSION
The useful operational period or the lifetime of a sensor network is considered over as soon as the battery power of the critical nodes in the network is completely depleted. In this module energy of the path is checked so that maximum energy path can be selected for message transmission. This approach enables system to have maximized lifetime.
HAND-OFF MECHANISM FOR BATTERY POWER DRAIN
The link failure of a communicating node (hereafter, this node is called as faulty node) occurs due to the reduction of its battery power level beyond bth in active time window. Fault tolerance for such a link failure is addressed by monitoring battery power level of a faulty node and providing an alternate path for a failed link so as to maintain the connectivity of a failed link. To obtain better fault tolerance, hand-off mechanism is suitable for WSN where
in the faulty nodes are avoid without losing the information that is delivered to such nodes. In order to enhance the PDR and fault tolerance capability of WSN, we use hand-off mechanism that leads to reduce power required to recover the data from failed nodes. Our effort in the proposed work is to enhance the number of active nodes in network so as to provide better fault tolerance capability.
TESTING
PURPOSE OF TESTING The reason for testing is to find errors. Testing is the process of trying to find every possible fault or weakness in a given product. It checks the functionality of components, sub-assemblies, assemblies and finished product. It is the process of utilizing software with the intent of ensuring that the Software system meets its requirements and end user expectations and does not fail in an unacceptable manner. There are various types of test. Each test type addresses a specific testing requirement.
TYPES OF TESTS UNIT TESTING: Unit testing is conducted as part of a combined code, as a phase of the software lifecycle. It is common for coding and unit testing to be considered as two distinct phases. Test strategy and approach: Field testing will be performed manually whereas functional tests will be written in detail. Test objectives  All field entries must work properly.  Pages must be activated from the identified link.  The messages, entry screen and responses should not be delayed. 11.2.1.3 Features to be tested  Check that the entries are in the proper format  Every links should lead to the correct page. INTEGRATION TESTING Software integration testing is an incremental integration testing of two or more integrated software components, on a single platform to identify failures caused by interface defects.
ACCEPTANCE TESTING User Acceptance Testing is a critical phase of any project and requires significant involvement by the user. It ensures that the functional requirements of the system are met. TEST CASES OF PRESENT APPLICATION
Topology Creation
Collecting the number of nodes and node information
Topology gets created with the given information.
(information is seen in database)
Pass
1.2
Connection of nodes
Connecting the nodes by giving the path cost
Nodes are connected
(Information is seen in database)
Pass
2.1
Energy Aware Transmission.
Maximum Energy path will be calculated between source and destination
Message displayed in the destination node with Path Energy
Pass
2.2
Source node sends message
IP Header should encode path and node info in the packet and should get send along with packet
Path and node gets encoded and sent
Pass
3.1
Node Fails
Second Maximum Energy Path should be chosen and Message should be sent
Second maximum energy path is chosen and Packet reaches destination
Pass
Test Results: All the test cases mentioned above passed successfully. No defects encountered.