EFFECTIVE ERROR CONTROL SCHEME IN REAL-TIME WIRELESS SENSOR NETWORKS

Wireless Sensor Networks (WSNs) subsist on network of huge numbers of hubs that are distributed in unfriendly environments used for habitat monitoring and to observe changes in phenomena. These hubs are susceptible to faults such as energy exhaustion, hardware glitches, communication link errors, malicious attacks, which may lead to errors in message delivery. However, these systems are typically utilized to convey vital information in remote places. Thus, efficient error identification and correction is thereby required in order to maintain the accuracy of the received message. This paper aimed at designing high speed reverse converter for effective error control codes using Redundant Residue Number System in order to enhance the accuracy of messages delivered for real-time WSNs. In order to attain a greater error correction, a reverse converter which was based on Mixed Radix Conversion was designed for the moduli set {2n+1-1, 2n, 2n-1}. In addition to this moduli, an extra redundant moduli set{2n+1+3, 22n - 3} is also designed for higher correctness. For correction and identification of corrupted values in the original data, maximum likelihood was used. The results obtained show that the suggested moduli set offers low energy utilization and consistency of the received message in real time WSNs.


Introduction
Wireless Sensor Networks (WSNs) comprise of network of enormous number of randomly arrayed minute devices called nodes. These networks have inbuilt storage with computational and communication capabilities. They function in an unattended mode and collect required data from its coverage area [1,2,3].
WSNs are capable to sense data and then forward the collected data and process the data to generate suitable reactions depending on the nature of received data. It consists of two node. One is sensor nodes that sense the data and the other is sink node where information is transferred. The sensor nodes commonly are cheap. Their energy supply is restricted. There transmission range is also low. These transmission ranges are function for event detection or sensing data from the environmental. Conversely, the sink nodes are resource-richer nodes with abundant energy sources, higher communication and computation capability, and the ability to perform powerful reactions [4].
A sensor hub is a gadget which has three parts: first is a processing unit. It is utilized to information processing from the neighborhood, second part is a sensing subsystem. This system is used for obtaining information from its surroundings. Third part is a wireless communication transceiver. This part exchanges the detected data to the sink. These sensor hubs perform information detecting and preparing errands and furthermore communicate with each other [5]. In order to maintain the message reliability, it is obligatory for WSN to be capable of detecting the errors and take appropriate measures to correct them [2, 6,]. However, Residue Number System (RNS) has been utilized as a tool to reduce communication energy and increase integrity in WSNs [7]. A few more studies observed that for numerous reasons, the Redundant Residue Number Systems (RRNSs) are appropriate for utilizationin realtime WSNs' applications. They improve the real time operations and are fault tolerant. The capability to control error control is also improved. It also provides security and energy saving. [8,9].
However, it has been established that energy, speed and reliability are the major challenges affecting many WSNs applications. This is because WSNs are furnished with limited energy and are used to collect vital information from the environment. Thus, WSNs need to be energy efficient, fast and reliable [2,10]. A substantial efforts have been made by researches been with a focus on the development of techniques for high speed and reliability in WSNs. It was observed that none of the several researches has offered extensive reliability support for WSNs. Hence, this article presents an efficient energy utilization reverse converter with error detection and error correction that make use of RRNS to enhance the reliability of a received message in real-time WSNs. The scheme employed the moduli set {2 n+1 -1, 2 n , 2 n -1} to design the Mixed Radix Conversion (MRC)-based reverse converter and Chinese Remainder Theorem (CRT)-based error-control scheme with supplementary redundant moduli set {2 n+1 +3, 2 2n -3} so as to attain an enhanced error controllability. The results obtained indicate that the recommended scheme delivers low energy consumption and consistency of the received message in real-time WSNs.

Literature Review
Security and reliable information communications have been increasingly critical during the last decades [11].
It is vital to for a functioning of a sensor network to choose a perfect fault correcting mechanism, taking in consideration the vitality and execution [12].
It is necessary to find a novel solution with little vitality utilization and at the same time, provide proper reliability in real-time WSNs' applications. Hamamreh et al (2018) presented a new energy-aware algorithm. This algorithm is known as Minimum Residual Hop Capacity (MRHC) [3]. This algorithm is incorporated into the frequently adopted protocol commonly identified as Low Energy Adaptive Cluster Hierarchical (LEACH) within the broadcast procedure in the clusters. This reduces energy utilization in the transmission process, extends network durability and improves the amount of data delivered to the base station. Usually, nodes communicate within cluster through multi-hop communications and data is sent via other nodes in the cluster till it reaches the CH. This result in few duplicates of a similar packet could get to the CH, hence there is need for data aggregation which usually result in communication suspension between the CH and the sink [3]. In addition, other studies also reported that the simplicity in the design of sensor hardware and limited utilization of power necessitate prevention of deployment of high complexity codes along with energy efficiency and error control [6,13,7]. Moreover, WSNs are naturally unprotected to numerous sources of unpredictability such as errors generated by hardware noise, transmission errors and errors in hubs, hence, these require the need for reliability measures [6,3]. Similarly, when a message is corrupted, not just the errors ought to be recognised, but they also need to be corrected so that the message can return to its original and useful form [14,15].
An upgraded moduli-set {2 n -1, 2 n +1, 2 pn -1} reverse converter was proposed by Habibi and Salehnamadi 2016 which was based on CRT algorithm. The recommended moduli set improveD complexity of circuit, energy consumption but there is need to reduce hardware requirements, improve the speed and is applicable to WSNs [16]. Additionally, Bankas and Gbolagade (2014) recommend a noveleffective reverse converter for the 4-moduli set {2 n , 2 n + 1, 2 n − 1, 2 2n+1 -1} which was built on an improved CRT and MRC. The area cost of reverse converter is (12n + 2) Fas, (5n + 1) HAs with an impeded (9n + 6)tFA+ tMUX. The converter is found to be faster, to the detriment of slightly more hardware assets, which surpass the state of the art reverse converter. Barati et al, 2014 present a new scheme with improved vitality and rapid control of error that relies on the RRNS in real-time WSNs. The theoretical outcome implemented by simulation outperforms renowned error control methods for WSNs with respect to vitality productivity, error controllability and reduction of end-to-end delay though with a little high hardware requirement [14]. Therefore, it is indispensable to provide an efficient, rapid operation and reliable error correction scheme for real-time WSN while still preserving the little vitality of the network.

Residue Number System
Residue Number System (RNS) is characterized as a non-weighted numeral system that was introduced by Garner, in 1959. It delivers a high speed, carry-free, parallel secure arithmetic operation which is fault-tolerant [14,17]. In RNS, instead of represented by the original number itself, the remainders of the original number with reference to moduli set is commonly used for representation. Hence, the number will be fragmented into some smaller independent numbers. Thus, operations can be accomplished on them separately. This makes the computations much simpler and swift [16,18]. However, RNS are very useful in detection and correction of errors because no other digit is corrupted by error in one digit. Furthermore, RNS are founded on the congruence relation, which is described in terms of relatively prime moduli set {m1, m2, … mn} that is the greatest common divisor gcd(mi, mj) = 1 for (i ≠ j). Therefore, a weighted number X can be given as follows: This depiction is distinctive for any integer X which is in the range [0, M) when M = (m1m2 …mn) is referred to as dynamic range of the moduli set {m1, m2,…mn}. Conversely, RRNS is a kind of RNS which detects and corrects the errors, due to adding redundant modules to the original modules. RRNS is indicated by moduli set {m1, m2, m3, …mn, mn+1, mn+2, … mn+r} and mi> mi-1for i=2,3,..,n+r. Given that all the moduli set are pairwise prime, the Dynamic Range (DR) of the system is given by

Methodology
In order to realize the proposed scheme, the moduli set {2 n+1 -1, 2 n , 2 n -1} is applied to design MRC-based reverse converter and CRT-based error control scheme utilizing supplementary redundant moduli set{2 n+1 +3, 2 2n -3}. As shown in Figure 1, a node will send a residue of the sensed message to the cluster head (CH), the CH will in turn forward the gathered residues in its cluster to the sink node which will in turn convert the received residues to binary equivalent. Then the sink will check for errors, locate, correct the errors, and then recover the sink from error to have error free message. Proposed Error Detection and Correction Process
Next is to substitute values for 2 a in equation (3) and simplify to decrease the hardware requirements: To obtain X based on the equation (1) Therefore, the implementation of X based on equation (10) and (11) is given in Figure  2: In order to implement , consider equations 10 and 11, it needs (2 ) bits and (3 +2) bits Regular Carry Propagate Adder (CPA). There is also need for Operand Preparation Unit-2 (OPU-2) and OPU (3) for preparing the 1's complements respectively. However, (n) bits and (n+1) bits are 1 in equations 10 and 11 respectively. Therefore ( ) and (n+1) Full Adders (FAs) can be substituted with ( ) and ( +1) pairs of OR/XNOR gates respectively.

RRNS Error Control Scheme
When the base station received the collected residues from the CH, it reconstructs the original information using the information moduli as well as their residues. The remainders of the calculated number is divided by redundant moduli. The remainders collected for those redundant moduli are unequal, an error is discovered, and which will initiate a process for error correction. Then, three residues out of five can be utilized by the base station to restructure the original data. Thus, RRNS codes which has ann redundant modulus can identify n errors and correct n-1given that the condition m1<m2<…<mk<mk+1 is met. However, for the purposes of error detection and correction, the complete moduli set will now contain {2 n+1 -1, 2 n , 2 n -1, 2 n+1 +3, 2 2n -3} where {2 n+1 -1, 2 n , 2 n -1} are information moduli while {2 n+1 +3, 2 2n -3} are redundant moduli. The actual number can be represented by just the residues obtained using the main moduli. The legitimate range is defined by the product of the information moduli whereas the illegitimate range is characterized by product of the entire moduli set.
However, error can be detected if aj≠0 with j [k+1, n]. Assuming a single error corrupts the i th residue digit which appeared in the residue of the received integer X, this is signified as an adding of a number ei to the residue when 0 <ei<mi, that is: Accordingly, aj≠0 specifies the residue digit has been corrupted, else no error occurs.
For example, if the gathered message X = 52 is to be conveyed from CH to the sink using the moduli set above. The number would then be represented as the residue set In order to correct the error, the maximum likelihood principle is utilized and obtained the original data. To achieve this, extra combinations of information and redundant residues are created. Each combination can then be changed utilizing the CRT. In this case, the value within the legitimate range that appears the most often will be the correct value of the original data as indicated in Table 1 in blue background.
Consider the previous instance where residue x2 for the decimal number 52 of X = (3, 0, 1, 8, 0) was corrupted into the incorrect value from 0 to 3, now with the residue digits of X = (3, 3, 1, 8, 0) corresponding to it. With CRT's approach, the integer X in the dynamic range [0, 84) can be recovered by raising any of the three moduli and their equivalent residue numbers given that no errors happened in the received RNS representation. Then, reflect all likely cases and aim at recovering the number X represented by (3, 3, 1, 8, 0) from moduli set (7,4,3,11,13). The additional residue mixture can be formed from likely combinations of three residue digits out of five residue digits as shown in Table 1:

Performance Evaluation and Discussion of Results
The reverse converter was compared with the existing advance reverse converters. The results of theoretical analysis depicts that the suggested error correction scheme is efficient with regard to area and delay when compare with Barati et al, 2014 [14] and better in terms of delay as compared to Habibi & Salehnamadi, 2016 [16] as shown in  Additionally, the proposed error-control scheme is effective in terms of speed and energy utilizationin comparison with the study of Roshanzadeh and Saqaeeyan [6].
The suggested converter has an area Full Adders of (6n +2)AFA with low cost hardware requirements and power usage and also a delay Full Adder of (9n +2)tFA that provides relatively low conversion delay and high performance for the WSNs in terms of energy usage and improved reliability when compared with other reverse converters. Similarly, conversion using the CRT that yields different values of X was displayed in table 1. Xijk signifies the yielded result by applying moduli mi, mj and mk and their analogous residue digits' xi, xj and xk. From the table 1, X124, X125, X235 and X245 all represents the illegitimate numbers, because the numbers are out of the legitimate range [0, 84). Of the six cases which were remaining, four cases (X134, X135, X145, X345) all the results are the same and equal to 52. For this case, the value within the legitimate range that appears the most often will be the correct value of the original data. As 52 appears the greatest number of times it is known to be the accurate original data. Furthermore, these results were obtained from three moduli excluding x2. Consequently, it might be concluded that the accurate result is 52 or there might be an error in x2, which can be amended by calculating: x2 = 52 (mod 4) = 0.