SPLAI : Computational finite element model for sensor networks

Wireless sensor network refers to a group of sensors, linked by a wireless medium to perform distributed sensing task. The primary interest is their capability in monitoring the physical environment through the deployment of numerous tiny, intelligent, wireless networked sensor nodes. Our interest consists of a sensor network, which includes a few specialized nodes called processing elements that can perform some limited computational capabilities. In this paper, we propose a model called SPLAI that allows the network to compute a finite element problem where the processing elements are modeled as the nodes in the linear triangular approximation problem. Our model also considers the case of some failures of the sensors. A simulation model to visualize this network has been developed using C++ on the Windows environment.


Introduction
Recent advances in micro-electro-mechanical systems (MEMS) have led to the rapid development of micro-sensors.Such sensors are generally equipped with data processing and communication capabilities.Wireless sensor networks are a new class of ad hoc networks that are expected to find increasing deployment in coming years.A sensor network is a collection of tiny disposable and low-power devices.A sensor node is a device that transforms a sensed attribute into something that provides information about its vicinity.Each sensor in the network sends such collected data, usually via radio transmitter, to a command center as a sink either directly or through a data concentration center as a gateway.
Sensor networks have been proposed for a wide variety of application areas.Some examples are such as intrusion detection and tracking, where sensors are deployed along the border of a battlefield to detect classify and track intruding personnel and vehicles.There also a lot of interest in the environmental monitoring, where specialized sensor nodes that are able to detect temperature changes and smoke can be deployed in high-risk of a forest, to give early warning of forest fires.In traffic analysis, traffic sensor network can monitor vehicle traffic on a highway or a congested part of a city.In security, surveillance sensor networks can be used to provide security in an art gallery or shopping mall.At the network layer of a sensor network, the main aim is to find ways for energy-efficient route setup and reliable relaying of data from the sensor nodes to the sink.So, a special multihop wireless routing protocol between the sensor nodes and the sink are needed to maximize the lifetime of the network.Problems encountered in effective implementation of the sensor networks include coverage area, data routing and power efficient.
In this paper, we discuss the data routing issues by considering the limited energy supply in sensor networks.The issues involve three phases: Interest Request, Message Transmission and Data Computation.We propose SPLAI, or Sensor Protocols for 2D-Linear Approximation Information, which is a dissemination algorithm based on the data-centric approach for modeling the finite element solution to sensor networks.Our routing technique in SPLAI requires finding the spanning tree and transmitting messages to the processing element by finding the shortest paths to optimize the routing.We also consider the self-organizing features of the network in the case when some nodes fail.The network adapt to the changes by updating the current information to the rest of the nodes.The computational model discussed in SPLAI consists of the two-dimensional (2D) linear triangular approximation of the finite element method.
The paper is organized into four sections.In Section 1, we review the application and implication of routing issues in sensor networks.Section 2 describes the routing protocol problem that considers the limited energy supply constraint.Several data-centric routing approaches are discussed in Section 3. We describe a method for locating the dynamic coordinates of the sensor nodes in the network in Section 4. This is followed by some discussion on SPLAI in Section 5. We further describe the development of SPLAI involving the dissemination method using Prim's Algorithm and data computation using the linear triangular approximation of the finite element method in Section 6. Section 7 is the summary and conclusion.

Problem formulation
The problem is stated as follows: Given a set of sensors and a few specialized nodes termed as processing elements (PEs) in a sensor network, how do the PEs react to the data provided by the sensors?Two sub-problems are associated here: first is locating the position of all the sensor nodes relative to the PEs in a process called training, and second is computing the data supplied by the sensors once training has been completed.The PEs in this context are assumed to have unlimited communication capability for transmitting and receiving messages to/from the sensors, and enough memory and processing capability to perform tasks such as mathematical calculations.
The sensor network in our discussion is modeled as an undirected graph.In this model, a node in the graph represents a sensor while an edge between two nodes represents the communication link between the sensors.The absence of a link between a pair of nodes means the two nodes are not within their transmission range.
Our case study in this paper involves the development of a finite element model for computing the temperature in a convex hull that is bounded by sensors in a sensor network.This problem involves finding a practical method for disseminating and transmitting messages in sensor networks.We also explore the problem of approximating a value at new location within the network.Disseminating involves the transmission of messages to a group of nodes in the network, which is a problem of broadcast through a spanning tree.Transmitting involves the transmission between a pair of nodes, which is from sensor node to the processing element.A term, approximating is the computation of a message to predict messages at new location within the network.Our contribution consists of a protocol for routing and improves its performances through the development of our model, SPLAI.

Overview of sensor network routing protocols
Advances in wireless communications and electronics have fostered the development of relatively in-expensive and low-power wireless sensor nodes.The sensor nodes are extremely small in size and communicate un-tethered in short distances.These small devices are incorporated with sensing, data processing and communicating components, to collect data, monitor equipment, and transmit information, which leverages the idea of sensor networks.Each sensor node in these networks operates autonomously with no central point of control in the network and communicates using infrared devices or radios.
The main goal in conventional wireless networks such as mobile ad-hoc network or MANET is to provide high quality of service and high bandwidth efficiency when mobility exists.In contrast, in a sensor network conservation of energy is considered to be important than the performance of the network.Therefore, the current routing protocols designed for traditional networks cannot be used directly in a sensor network due to the following reasons [1]: 1. Sensor networks are data-centric, where data is requested based on certain attributes.2. Application specific, where the requirements of the network will change with the application.3. Aggregated data in the case that adjacent nodes may have similar data.4. Since the model is data-centric, each sensor is assumed to have non-unique id.Additionally, large number of nodes in the network implies large ids, which might be substantially larger than the actual data being transmitted.
To comply with the above requirements, new routing schemes have been proposed.Routing protocols must select the best path to minimize the total power and to maximize the lifetime of all nodes.Due to such differences, many new algorithms have been proposed in the problem of routing data in sensor networks.Most of these routing mechanisms consider the characteristics of sensor nodes along with the application and architecture requirements [2].
Routing protocols in sensor networks can be classified as data-centric, hierarchical or location-based.Data-centric protocols are query-based and depend on the naming of desired data, which helps in eliminating many redundant transmissions.The sink sends queries to certain regions and waits for data from the sensors located in the selected regions.Since data is being requested through queries, attribute-based naming is necessary to specify the properties of data.
Some established data-centric routing protocols are Flooding and Gossiping, Sensor protocols for information via negotiation (SPIN) and Directed Diffusion.Flooding and Gossiping are two classical mechanisms to relay data in sensor networks without the need for any routing algorithms and topology maintenance.In flooding, a node wishing to disseminate a piece of data across the network starts by sending a copy of this data to all of its neighbors.Each sensor receiving a data packet broadcasts it to all of its neighbors except the node from which it just received the data.This process continues until the packet arrives at the destination or the maximum number of hops for the packet is reached.Gossiping is a slightly enhanced version of flooding where the receiving node sends the packet to a randomly selected neighbor, which picks another random neighbor to forward the packet to and so on [2].SPIN considers data negotiation between nodes in order to eliminate redundant data and save energy [7].Directed Diffusion has been developed and has become a breakthrough in data-centric routing [8].
A different approach from the hierarchical protocols is achieved by clustering the nodes so that cluster heads can do some aggregation and reduction of data in order to save energy.As mentioned in (Threshold sensitive Energy Efficient sensor Network protocol).Another approach uses the locationbased protocols, which utilize the information on the nodes location to relay data to the desired regions rather than the whole network.In most cases, location information is needed in order to calculate the distance between two particular nodes so that energy consumption can be estimated.MECN (Minimum Energy Communication Network), GAF (Geographic Adaptive Fidelity) and GEAR (Geographic and Energy-Aware Routing) are among the location-based protocols in sensor networks [1,3].

Training the sensor nodes
A wireless sensor network is a self-organized network which does not depend on external help in establishing itself.The position of each node in the network is determined through a process called training.Basically, training involves a repeated transmission of signals with varying strengths and directions from the PE (sink) to the sensor nodes.One difficulty in locating the nodes is the fact that the Cartesian or the xy-coordinate system is not practical for implementation as the exact location of each node may not be traced.It is not wise to assume each node has a position locating device such as the GPS as the sensor network as a whole is self-organized.Therefore, an approximation based on a dynamic coordinate system will be more appropriate and practical in its implementation.Dynamic coordinate, in this context, refers to a coordinate system relative to the position of the sink.Training is said to be successfully completed once all the nodes that lie within the transmission range to the sink have been assigned with the dynamic coordinates.
We assume only one processing element is used in this model.This processing element has enough computing power and memory to train the sensor nodes, and to perform all the necessary computations from the data gathered from the nodes.In addition, each sensor node is assumed to be awake at all time to respond to the signals from PE during the training.This assumption may not describe the real scenario of the sensor nodes which are in sleep most of the time for saving energy.However, this assumption is necessary in the simulation in order to focus to the computational aspect of the model.
Our model is based on the work of Haseebulla [6] which implements the coronas (c) and wedges (w), coordinate system.In this coordinate system, a corona is an annular area whose center is at PE.A wedge is a sector measured from the x−axis in the anti-clockwise direction with its center at PE.The origin of the coordinate system, or the sink, is the starting coordinate at (0,0) which lies in the first sector in the innermost circle.Figure 1 (left) shows a simple corona-wedge coordinate system with three coronas and eight wedges with their assigned coordinates.
Training the nodes in the network involves a successive transmission of signals from PE to the nodes.The strength of a signal corresponds directly to the corona number: the weakest indicates Corona 0 while the strongest is Corona C − 1, where C is the number of coronas in the network.In addition, for training the nodes according to the wedge number, PE transmits its strongest signals successively in angular, anti-clockwise directions starting from the x−axis.PE determines the corona and wedge numbers of a node only when a transmitted signal receives a respond from the node.If no respond is received then the node is assumed to be outside of the transmission range and the node is said to be untrained.
The first phase of the training involves the coronas only.For C coronas, c i for i = 0, 1, 2, . . ., C − 1, the training starts from the innermost corona, c 0 .The PE transmits its weakest signal in the circular region identified as Corona 0. Upon receiving the beacon, the nodes belonging to this corona immediately respond and they are instantly identified to belong to this corona.PE repeats by increasing the transmission strength to the second level, and the nodes that respond to the signal are those that may belong to Corona 0 or 1.However, the nodes in Corona 0 have been identified earlier and, therefore, their complements are assigned to Corona 1.The same process is repeated until the last corona, c C−1 , which corresponds to the maximum signal strength.It is obvious from this approach that only nodes that are within the transmission range will respond to the signals from PE.Those that don't respond are considered the outliers, and they are assumed to be outside of the network.
The next phase of training involves the wedges.Training is achieved by having the PE transmitting its maximum signals in directional positions according some predetermined angles measured from Wedge 0. In general, a network with W equal-width wedges requires a directional transmission of 2π/W as its angle.For example, the directional angle for a network with eight wedges is 2π/8, as illustrated in Fig. 1 (left).
Figure 1 (right) shows 12 nodes scattered randomly within the transmission range of PE.The figure shows the result from training using three coronas and eight wedges.Each node has a limited transmission range as illustrated as edges in the graph.Note that the dynamic coordinates may not be unique as a coordinate location may not be attached to one node only.As shown in the figure, node 1 is located at (2,3) while nodes 3, 4 and 5 share the same coordinate, (1, 1).
Assuming the origin of the Cartesian coordinates at the sink, the position at (c, w) can be transformed to the Cartesian coordinates (x, y) using the following relationships: Conversion to real coordinates using Eqs (1a) and (1b) is very useful especially in cases where the real location of the sink is known using a measuring device such as the GPS.
The training of nodes into the dynamic coordinates is implemented visually in SPLAI.Figure 2 shows a training simulation of 50 sensor nodes that are scattered randomly, which are grouped into 20 coronas and 32 wedges in SPLAI.Their location in (c, w) are determined through a series of repeated transmissions from the sink (PE), and these values are converted into their corresponding (x, y) values using Eqs (1a) and (1b).

Routing model
Once training is completed, the next step is to form a routing mechanism to allow communication among the sensor nodes.This step is important as a value sensed by a node needs to be passed to PE to be used in the computational stage.PE requires all data read from the nodes in the network before performing the necessary computation.However, it is not possible for a node to transmit its value directly to PE as it has a short and limited transmission capability.In order to transmit its value to PE, the node will have to form a routing path through other nodes until it reaches PE.
Basically, routing between the nodes and PE in the network involves finding the shortest paths between pairs of points in the graph.This approach requires finding the shortest path from every sensor node to PE, which may take a considerable computing time and overhead.Another practical approach is to compute the minimum spanning tree of the graph with PE as its root.This approach has the advantage of eliminating redundant paths that may result from the shortest paths.
Two modes of routing for allowing communication in the sensor network are discussed in SPLAI.First is the Interest Request Phase which is a message transmission from the sink (PE) to the sensor nodes using a routing path based on the minimum spanning tree of the network.This path is necessary to enable PE to send request for values to the nodes.The other mode is the Message Transmission Phase which is a message transmission on the sensed values from the nodes to PE.

Interest request phase using the minimum spanning tree
In SPLAI, we adopt the second approach of the training, that is, using the minimum spanning tree for routing from PE to the nodes.The training requires computing the minimum spanning tree of the graph with its root at PE using the Prim's algorithm.The task of finding the minimum spanning tree is performed by PE once the information about the network is known.The spanning tree is important in this context as it represents the interest request phase for PE as the processing unit needs to know the optimum path for communicating with all the sensor nodes in the network.
The main idea behind SPLAI is outlined as follows: PE disseminates an interest query packet for the values to each node in the network using the minimum spanning tree path.Upon receiving the interest packets, each node in the network starts periodically sending its temperature data or measurements back to the processing element using the same path.Since many or all of the nodes will be sending their data at the same time, it would be more efficient to combine these readings into a single packet.As data flows, it can be aggregated along the way.PE stores the data and performs the necessary computation to evaluate the temperature at any point based on the finite element technique.
SPLAI includes tasks such as training the nodes, routing for data communication and performing computation on the sensed data.The model consists of a data-centric algorithm as it involves the dissemination of data from the sensor nodes, and its transmission to PE. Upon receiving the required data, PE stores them in its memory before applying the necessary computational steps.
Figure 3 shows a sensor network consisting of a processing element (PE) and seven randomly distributed sensor nodes, n i for i = 1, 2, . . ., 7, scattered in a two-dimensional area Q.Each sensor node, n i , has the corona-wedge coordinates of (c i , w i ) which is transformed to (x i , y i ) using Eqs (1a) and (1b).Each sensor has a sensing range of R i , that is, it can sense a metric such as temperature (or pressure and sound in a similar situation), that is within a distance of R i from n i .The figure also shows message routing path from PE to the nodes on the minimum spanning tree (shown as arrows).The sensor network behaves like an ad hoc network where the nodes can both receive and transmit messages.Each node in the network has a transmitter and a receiver to perform these functions to act as a router.To facilitate message transmission, a routing protocol called DSDV, or Destination Sequenced Distance Vector, is adopted.In this protocol, a node updates its routing and neighbor information proactively whenever new information is received.
In our work, G represents a network of sensor nodes which is assumed to be connected and undirected in this model.The dissemination method of an interest query packet in the network is a graph-broadcasting model of sensor nodes.A crucial problem in this case is to find the minimum spanning tree of the graph with the root as the sender.This problem is solved using the Prim's algorithm, which is represented in its visual form in [11].
The algorithm begins with an empty graph, T .The strategy in the Prim's algorithm consists of building a tree in T one node at a time starting from any node in the graph.From the starting node, a link with the minimum weight to its neighboring node is added to T .Next, the shortest link emanating from the two nodes becomes the minimum link and added into T .This added link must not form a circuit in T , Fig. 7. Illustrating the data computation phase.otherwise the move is rejected.The step repeats from the second node to the third, and subsequently until all the nodes have been included.
The following steps summarize the Prim's algorithm for finding the minimum spanning tree of a graph: Read the information on the weighted graph G; Create an empty graph, T ; Choose the first node, and add into T ; do until T becomes a spanning tree of G Choose the minimum link, originating from the node; if the new link does not have a circuit Add the link and its new node into T ; else Reject the move;

Message transmission phase
The next step upon receiving the interest query packet of temperature value from the processing element is the message transmission phase.Each sensor node aggregates their sensed values to PE using the route determined from the DSDV routing protocol [9].DSDV provides the shortest paths of all pairs of nodes in the network.In DSDV, each node has a table for updating its routing information with its adjacent nodes, and this allows the simultaneous updates of the values all the way to the sink (PE).PE receives this vital information, and use these values for performing the subsequent computational steps.
Table 1 shows the routing information of the node n 2 in the graph from Fig. 3 using SPLAI.In a basic distance vector routing protocol, every host maintains a routing table containing the distances from it to all possible available destinations.In the table, destination refers to the address of the destination node, while next is the next hop along the path of the current node to get to the destination.h n is the total number of hops required to get to the destination.The sequence number originated from destination is represented by s n .
In DSDV, the number of hops is the metric for computing the path from the source to its destination.DSDV extends the basic Bellman-Ford and the Floyd-Warshall algorithms by attaching a sequence number to each route table entry.A route with a higher recent sequence numbers is always preferred as the basis for making the forwarding decision.In this case, the nodes can distinguish the stale routes from the new ones, and this avoids the formation of routing loops in the network.The message transmission phase is based on the DSDV routing protocol using shortest paths outlined by the Floyd-Warshall algorithm.The algorithm, as described in its visual form in [11], is summarized as follows: 1.Each sensor node is referred to its routing table entries.2. A sensor node sends its temperature data to the next sensor node that is its immediate neighbor in the network.3. The receiving sensor node then sends the value to its next sensor node until it reaches the PE. 4. If broken links occur in the network, the nearest sensor node will advertise a route table by assigning a metric of ∞ to its table.In this case, every sensor node in the network updates its table.Any new information will not be sent to the node in the next transmission.5.The sequence number is then increased by 1 for every broken link detected.
The source in our model is PE, which then disseminates interest packets to other nodes in the network.PE stores this value and shares the temperature data with other nodes.

Computational model using finite element method
In our model, PE is capable of performing numerical computations on the data provided by the sensor nodes.This step is performed once training has been completed, and the network has been successfully organized.The computational model is useful in many numerical applications such as in approximating the temperature of any point inside the network using the finite element method.We discuss the problem of computing the temperature of the points inside the network using the linear triangular approximation (LTA) technique in finite element method [4].The linear triangular approximation method computes the temperature in any point inside a triangle by taking the temperatures at the vertices of the triangle as the finite elements.
We describe our computational model using an example of a network with one processing element and seven sensor nodes, as shown in Fig. 3. Figure 4 shows the triangular elements formed from the graph in Fig. 3.There are seven areas in the bounded region of the network, marked as e i for i = 1, 2, . . ., 7.
One of the main constraints in a sensor network is its limited energy supply.The network needs to limit its activities that consume energy.To achieve this objective, only one PE is used for the computations, while the sensor networks supply the necessary data.Upon user query, PE performs the computation to approximate the value at other location, which is out of distance of R i from n i using the values at three other node or locations.
Figure 4 shows the finite element model formed from the sensor nodes which are scattered in the plane.Each sensor node reads the temperature at its location then transmits this value to PE through the shortest path route.The temperature field within an element is given by where θ i is a temperature and λ i is the shape function at n i .This is conveniently represented in terms of the pair α, β as follows: The shape function describes how the temperature varies in each element.Using the isoparametric representation, the displacements inside the element are now written using the shape functions and the nodal values of the unknown displacements field.We have where q 1 , q 2 , q 3 , q 4 , q 5 and q 6 show two directions for each node in the triangle, and u and v are the nodal values of the unknown displacements.The above equation can be written as Substituting the value of λ from Eq. ( 3) into Eqs (6a) and (6b) produce where (x 1 , y 1 ) , (x 2 , y 2 ) and (x 3 , y 3 ) are the coordinates of n 1 , n 2 and n 3 , respectively.Using the notation, x ij = x i − x j and y ij = y i − y j , Eq. ( 5) becomes x = x 13 α + x 23 β + x 3 , (8a) The values of λ 1 , λ 2 and λ 3 are obtained by solving Eqs (8a) and (8b).It follows that the temperature at location (x, y) in each element in the network can be calculated by substituting these values into Eq.( 2).
Table 2 shows the connectivity of the elements in the network.As depicted in the table, most standard finite element codes use the convention of going around the element in a counterclockwise direction to avoid calculating a negative area.
Table 3 is an illustration of the network in Fig. 3, which shows the temperature, location and element of each node.The temperature at e 5 is computed by referring to the information given in Tables 2 and 3.By substituting the readings from these tables into Eqs (8a) and (8b) at this node we obtain the following simultaneous equations:  Applying the above steps to all other elements in the network we get the results as shown in Table 4.This phase provides instant information including the case whereby one or more sensors in the network are weak or not functioning properly.
In general, the routing and computation protocols in SPLAI for a sensor network using one processing elements can be summarized as follows: 1.The processing element, PE broadcasts an interest query packet to get the temperature data in the region by following the path specified by the minimum spanning tree.2. When the packets reach the sensor nodes,they aggregate their temperatures to their nearest neighbors based on their routing table entries until the message reaches PE. 3. PE is responsible for receiving, storing, processing and sharing the temperature data with other networks.In the processing, PE can perform the computation to approximate the temperature of any location even if it is out of range from s i .7. SPLAI simulation model SPLAI was developed using the C++ programming language running on the Windows environment.Figure 5 shows the interface of our SPLAI model network for massively deployed sensor nodes.The sensor nodes are scattered randomly in a rectangular area with a transmission range of 250 units.We describe this model using a case study using 19 sensor nodes and one PE.Figure 5 shows this scenario where node 20 is the processing element, or the sink, while the other nodes numbered from 1 to 19 are the sensor nodes.SPLAI also displays the link table and temperature record table.
Table 5 shows the link table between the sensor nodes based on their distance apart from the case in Fig. 5.The values shown in the table provide a vital information about routing on the interest request phase from PE to the nodes and the message transmission phase from the nodes to PE.
Figure 6 shows the minimum spanning tree in the Interest Request Phase initiated by the PE to perform the path in the network before the sensors start sending and receiving the data.The tree is constructed using the Prim's algorithm.This phase provides an important step in having PE to present its request for values to the sensor nodes.
Once the values are received from the sensor nodes, PE becomes ready to perform the computational steps for computing the temperatures at the elements.Figure 7 shows the data computation phase in SPLAI for approximating the temperatures using the linear triangular approximation of the finite element method.The location of the nodes is indicated as bold number 1, 2, 3, 4 and * in the simulation.
Table 6 shows the results in the form of approximated temperature values of the 19 elements in the network using the finite element method.

Conclusion and future work
In this paper, we propose SPLAI as a tool for disseminating, transmitting and computing in a sensor network.Our protocol is based on the data-centric approach involving the creation of dynamic coordinates for each node before its real location is determined.The disseminating problem has been modeled as a spanning tree based on Prim's Algorithm, while the transmission is a table-driven shortest path protocol based on the DSDV algorithm.One obvious advantage from our approach is SPLAI considers the problem of limited energy supply among the sensor nodes through the computation phase of the finite element method using the linear triangular approximation (LTA) approach.
The computational model in SPLAI is based on one processing element.Obviously, it is possible to extend the work by incorporating more than one processing element.Two or more processing elements can be used to enhance the training and routing methods as well as transforming the computational step into a parallel model.The use of multiple processing elements has the advantage of speeding up training and routing which contributes in the energy constraint scenario of the sensor network.Energy saving is a crucial factor in a sensor network which has to be considered seriously before the network can be deployed.This requirement is an open problem that will definitely attract further research into this area.

Fig. 1 .
Fig. 1.Dynamic coordinates from PE in the form of coronas and wedges (left) and the location of the sensor nodes (right).

7 Fig. 3 .
Fig. 3.A route initiated by PE in Interest Request Phase using MST.

1 Fig. 4 .
Fig. 4. Sensor network with seven nodes and one processing element.

Table 1
Routing table structure for n2

Table 4
Temperature approximation at the finite elements

Table 6
Indicating the result shown in the TEMP.RECORD TABLE