TWO-DIMENSIONAL ERROR CONTROL BASED ON MODULAR CORRECTING CODES

: The paper presents a method of detecting and correcting packet errors in the block of data based on the modular corrective codes. Check symbols are calculated separately in rows and columns of the data matrix. Herewith, the same data matrix coefficients are used for calculating the check symbols in rows and columns. This allows the detection and correction of errors packets that are in the same row or column. When two or more distorted information symbols are in the same row (assuming that there is only one error in the column) then errors can be corrected through the analysis of the column syndrome. The possible cases of the distorted symbols placement in a block of data and ways of their fixing are considered. The algorithm for detecting and correcting errors packets is elaborated. In the general case the offered method of error correction, based on modular correcting code, provides a correction of: n errors, which are in the same row or column of the data matrix of n size; 2 1 n   errors that are in the same row and column. The proposed method of encoding / decoding is designed in Verilog and implemented on FPGA in the Quartus II of Altera company. Copyright © Research Institute for Intelligent Computer Systems, 2015. All rights reserved.


INTRODUCTION
Nowadays with the development and widespread implementation of wireless technologies, the improvement of reliability of data transmission is becoming increasingly important. In accordance with this, the control of data integrity, which is transmitted and processed by modern digital systems, is an actual scientific problem especially for the area of wireless sensor networks (WSN) [1].
While providing the required level of WSN reliability, in contrast to the wireless computer networks, it is necessary to take into account the limitations of computing resources of computer units and the use of autonomous power. In addition, packages retransmission mode, which is used in most WSN applications, causes extra complications.
Whereas the techniques of traffic redundancy reduction by data compressing, correlated data filtering and excluding of sensors redundant data being applied for WSN [2], the demands for reliable transmission of each data package correspondingly increase.
The optimal correcting codes for the WSN were widely studied by the researchers in the last decade [1, [3][4][5], but the type of error correcting codes has not been standardized yet.
There are two main types of error correcting codes, block codes and convolutional codes. Among the most common block codes, the following ones can be mentioned: Hemet Golay (Golay) codes, Bouza-Chadhuri-Hocquenghem (BCH), Reed-Solomon code and low density parity code (LDPCcode), which also refers to the class of block codes [6]. BCH code, Reed-Solomon code and convolutional code were studied in [7] from the perspective of implementation complexity and power consumption on FPGA and applicationspecific integrated circuits (ASIC). The results show that convolutional codes have advantages over BCH and Reed-Solomon codes, but at the same time Viterbi decoder consumes more energy than the uncoded data transmission. Thus, convolutional codes are not very suitable for self-powered WSN nodes. This indicates that the binary BCH code, implemented on ASIC, is the better alternative for WSN that work in open space.
The results, obtained in [8], show that energy efficiency of ARQ mechanism does not depend on package retransmission, but depends on the size of the package and the distance between nodes.
In [9] the authors suggest using of low density parity check codes both for channel coding and In [10] the adaptive scheme is proposed, where the output node has the ability to change the error correction circuit for each transmission. The results of studies of energy efficiency of adaptive and nonadaptive error correction schemes with different distances and sizes of communications packages show that the adaptive scheme has a higher energy efficiency compared to non-adaptive one with all the distances and sizes of packages.
In [11] Reed-Solomon (RS) codes were used for a source node coding and decoding only at the base station to save energy at the node level, and thereby to extend the network.
The study of energy costs for different modulation schemes and Reed-Solomon codes of different lengths [12,13] has shown that Reed-Solomon code with parameters (63, 59, 5) is the most suitable compared to the transmission without coding. In [14] a scheme is proposed in which LDPC-code is used for data encoding in the transmitting node and the partial decoding is performed in the intermediate nodes and full decoding is performed only at the base station.
Performance evaluation of the use of various error-correcting codes [1] shows that stronger codes provide better performance, but they are energy inefficient in comparison with simple codes. The latter have lower performance but are more energy efficient.
A strategy of error control (node -node, from end-to-end) should be taken into account while selecting a scheme of error control in WSN. Powerful codes are the most suitable for the use of error control scheme from end to end while simple codes are optimal to control errors in each node.
As it is shown above, many studies prove the benefits of the use of WSN Reed -Solomon codes [1,15]. However, Reed-Solomon codes make impossible to use adaptive error control schemes, as all check symbols should be calculated when there is an increase / decrease in the number of check symbols [16].
Due to the limited functional characteristics of wireless sensors, the selection of correcting codes for WSN is considered an actual problem. Thus, correcting codes for WSN should meet the following needs: -low complexity of coding / decoding algorithms; -low hardware requirements to the algorithms implementation (microcontroller capacity and clock speed, memory capacity); -adaptive change of a number of check symbols due to the changes of the channel parameters.

CORRECTING CODES OF RESIDUAL NUMBER SYSTEM
It should be noted that processing and transmission of data in the residual number system (RNS) has certain advantages due to the equality between residues, their independence, low capacity and possibility of parallel execution of arithmetic operations. Due to these advantages of RNS while data processing and transmission, corrective codes, based on modular arithmetic, is of particular interest for the use in WSN [17,18].
In addition to the mentioned above advantages of RNS, the effective correcting codes, which are able to detect and correct errors packages were also developed [18,19]. However, in order to use them in the existing digital systems of data transmission, including WSN, you must first convert RNS data that requires additional effort and computing resources.
Let's consider the residual number system with modules where number A is represented by a set of residues due to the corresponding modules ) ( Modules i p are selected under the condition that the greatest common divisor is In correcting codes RNS (R -RNS codes) the value of the redundant check symbol [18] is calculated due to i.e. while calculating the value of the redundant check symbol you need to return to the value of the original A , and this requires additional computing resources.
R-RNS codes have also certain constraints, depending on the selection of the increasing sequence of relatively prime modules. Thus, all test modules must be identical in capacity. Otherwise, the problem of efficient (optimal) storage of check symbols arises.
In [19] weak arithmetic codes (WA -RNS codes) were developed which have certain constraints while controlling arithmetic operations. However, these codes can be effectively used to detect and correct errors during data transfer, as they allow to form check symbols easily.
The value of the redundant check symbol in weak arithmetic codes RNS is [19]   Suppose that in the process of transmission error occurred in one of the residues and ' A is received instead of A : The value of the redundant check symbol is calculated due to the formula Then, the difference between the calculated and adopted check symbols is calculated as The disadvantage of weak arithmetic RNS codes is that the data, which has to be processed or transmitted, should be presented in RNS and this limits its use.
In [20] modular correcting codes (M -codes), which have the advantages of weak arithmetic codes, but process input data, represented in a positional number system (binary, octal, decimal) that extends their scope, have been developed and researched. However, to correct error packages, it is necessary to calculate two or more check symbols and this causes an increase of redundancy code.

THE METHOD OF TWO-DIMENSIONAL ERROR CONTROL
The authors proposed correcting codes, based on modular arithmetic, which provide two-dimensional error control. Two-dimensional control refers to the formation of check symbols in rows and columns of data matrix.
Check symbol in a row: where m -capacity of information symbol, k -a number of information symbols. Check symbol in a column: ( Two-dimensional error control can be presented as a matrix: On the receiving side, the check symbols ' x 1 and ' j + k x 2, for the received data are calculated according to the decoder formulas (1), (3). As a result, we obtain a matrix calculation: Error detection occurs according to the analysis of the syndrome, which is calculated due to the formula When two or more data symbols are distorted in the same raw (providing that there is one error in a column), an error is corrected according to the analysis of the syndrome of the appropriate column.
Similarly, if two or more data symbols, located in the same column, are distorted, then an error is corrected according to the analysis of the syndrome of the appropriate row.
To correct data symbols errors, located in 1  n row and in 1  n column, it is necessary to solve the equation: (4) If the greatest common divisor are relatively prime numbers, then the equation (4) has a unique solution that will match the correct information symbols.
Let's consider the probabilities of information symbols distortion.
must be solved for error correction. Suppose that four symbols, located at the intersection of two rows and two columns, are distorted.
At first, suppose that errors occurred in two symbols, located in the first row. As there is no error , the equation (5) can be written as:   Table 1 we find an   error, matching the syndrome   1  ,  2 δ , and correct it in the following way: In case an assumption is wrong, check the following group of symbols.
Data encryption algorithm hardware complexity has been compared, while implementing FPGA encoders, correcting RNS codes and the developed modular correcting codes (MCC) with such parameters as: input symbols capacity -8 bits; a number of information symbols -8 2  bits (Fig. 1).   1 shows that hardware encoding complexity of modular correcting codes is on average 16 times less than the corrective RNS codes.
Due to the low hardware complexity of the noiseimmune data encoding algorithm, the developed two-dimensional error control could be applied in wireless sensor networks, used in high electromagnetic interference environments [21].

CONCLUSIONS
The proposed two-dimensional error control, based on modular correcting codes, provides detection and correction of k errors that are in the same row or column of the data matrix of k k size, k  2 errors, provided that they are in two rows or two columns of the data matrix. Thus, the hardware complexity of modular correcting codes encoding on average is 16 times less than the corrective RNS codes.