Low Rank Parity Check Codes and their application in Power Line Communications smart grid networks

We investigate the use of Low Rank Parity Check Codes, originally designed for cryptography applications in the context of Power Line Communication. Particularly, we propose a new code design and an efficient probabilistic decoding algorithm. The main idea of decoding Low Rank Parity Check Codes is based on calculations of vector spaces over a finite field Fq . Low Rank Parity Check Codes can be seen as the identical of Low Density Parity check codes. We compare the performance of this code against the Reed‐Solomon Code through a Power Line Communication channel.


INTRODUCTION
Power grids require new systems to manage the energy consumption. For example, these requirements integrate air conditioning, electrical heating, and video or audio devices. More precisely, a smart grid includes a combination of energy management measures which mainly contain smart meters and renewable efficient energy resources. A common element to the planned smart grid systems is the need of digital processing techniques to obtain rapidly highly reliable information about power consumption at the customer's premises. In other words, real-time information management is a crucial point for a smart grid.
Concerning information transmission, the Power Line Communication (PLC) network has been recognized as a key solution for connecting the different entities of the smart grid system. For example, in a previous study, 1 different technologies are studied including PLC. The authors in a previous study 2 provide a survey of the potential opportunities offered by PLC for smart grid applications and describe the potential application of PLC within the smart grid. However, because of the presence of a severe propagation channel, ensuring reliable communications over PLC channels still remains a challenging task. In fact, the PLC channel is doubly time and frequency selective 3 ; it is affected by colored impulsive background noise and by other sources of impulsive noise and narrow band interference as shown in Figure 1.
The main difficulties in PLC communications is that we have to cope with impulsive and narrowband noises and mitigating them is a difficult signal processing problem. To combat the influence of impulsive and narrowband noises, classical solutions in the literature suggest to employ Forward Error Coding techniques such as the combination of a Reed-Solomon (RS) block code concatenated with a Convolutional Code and separated by an interleaver to obtain isolated error patterns at the convolutional decoder input. 4 Among these codes based on Hamming metric, Reed-Solomon codes can detect and correct block errors but are not immunized against the criss-cross error patterns which often appear in PLC communications. Criss-cross error patterns are error blocks which are concentrated on a given part of the time-frequency grid of the transmission. 5 It means that several frequency adjacent sub-bands together with several consecutive time-slots encounter severe distortions because of the presence of interfering signals. Gabidulin codes or rank-metric codes which are able to recover complete error subspaces clearly outperform Reed-Solomon codes for this kind of errors. The scheme we propose in this paper is based on the design of rank metric codes using a particular original structure which is named Low Rank Parity Check (LRPC) code.
The main objective of our present work is to investigate and compare the performances of LRPC codes with those of RS codes already mentioned in the various Narrowband (NB) PLC standards. The authors in a previous study 5 employ rank metric code to combat criss-cross errors in the context of an Orthogonal frequency-division multiplexing (OFDM) transmission. In a previous work done by Sarr et al,6 authors studied the impact of narrowband impulsive noise in a ZigBee narrowband receiver for additive white Gaussian noise, Rayleigh, and Rician channels. The results showed that the impulsive noise influence is close to those of a Gaussian noise or a Rayleigh noise according to the Signal-to-noise ratio. In addition, a number of smart grid applications require a high data rate and a large bandwidth. Given the characteristics of PLC channel, rank metric codes can be used to combat impulse noise and narrowband interference existing in PLC. Furthermore, in addition to the results presented in a previous study, 4 we investigate the performance of rank metric codes over PLC channels using RS codes of the various NB-PLC's standards as benchmarks.
This paper is organized as follows. In Section 2, we give a description of the NB-PLC characteristics. Section 3 states the construction of a new low-parity check matrix used for our new LRPC encoding-decoding scheme. Section 4 presents the simulation results based on the above LRPC codes, and Section 5 shows different probabilities of failure decoding for LRPC codes. Finally, Section 6 concludes this paper.

DESCRIPTION OF POWER LINE COMMUNICATION CHANNEL
Power line communication (PLC) has been applied as a network access method in both public electricity distribution and indoor networks. In fact, a lot of applications, including heat pumps or electric cars power supply can be supported by PLC communication channels. The features of PLCs and the applications of different digital modulation methods have been thoroughly investigated. However, because mainly of regulation problems, the idea of implementing internet services through the distribution network was partially suspended. In spite of this limitation, PLC is recognized as a good tool to control transfer data and to monitor remote devices each time the required transmit bandwidth is not too much large. An illustrating example is data transfer related to the monitoring of industrial low voltage electrical motors. There exists 2 possible methods for the modelling of power line channels. The first one applies the methods used for the modeling of radio channels. The power line channel is assumed to be a multi-path propagation environment. The second alternative applies the methods used to model electricity distribution networks. The chain parameter matrices describing the relation between input and output voltage and current of 2-port network can be applied for the modeling the transfer function of a communications channel.

Power Line Communication channel transfer function
Building reliable PLC communication channels is a challenging task. This is due mainly to the presence of unmatched loads, and this results in doubly time and frequency selective channels. 7 The channel transfer function parameters can be empirically determined according to multi-path propagation environment. 8,9 A statistical model of channel can be derived by considering the parameters in the transfer function expression as random variables. In this paper, we reuse the channel model derived from a previous study. 10 1-NB-PLC noise: The Narrowband interference is considered in a frequency band up to 500 kHz; this source of noise is a time and frequency cyclo-stationnary process superposed on the main current at 50 Hz. To get its features in both time and frequency domain, the authors in a previous study 3 have proposed a model which has been adopted by the IEEE1901.2 standard. In the aforementioned model, each period of noise is separated into L blocks (L = 3). During each block the perturbations are stationary. Each block is defined by a spectral shape and its own shaping filter. With the help of the above model, the PLC noise can be seen equivalent as the convolution of an additive white Gaussian noise signal m[ ] with a are matched to the spectral shaping filters for each block of the frequency spectrum.

Power Line Communication systems
Power Line Communication-G3 is a standard which has been developed by industry (Maxim and Electricite Reseau Distribution France) for PLC systems. 1-Practical considerations, PLC-G3 10 : Here, we considered the Physical layer parameters of PLC-G3. The sampling frequency of the system is f s = 400kHz. Because of the frequency selectivity, PLC-G3 includes a Fast Fourier Transform of size 256, with a spacing of ▵f = 1.65625kHz. Figure 2 shows the schematic diagram of the aforementioned transmitter. We have 3 types of standard modes for data transmission: Robust, Differential Quaternary Phase Shift Keying, and Differential Binary Phase Shift Keying. Thus, according to the channel quality, we change the spectral efficiency of the transmit signals to optimize the data rate. We have 2 data sizes of 133 and 235 bytes with a maximum data rate of 33, 4 kbps for Differential Quaternary Phase Shift Keying mode.
As shown on the Figure 2, a half rate convolutional code with generator polynomials G = [171,133] is used to protect the Frame Control Header data in all of these modes. In the robust mode, in case of severe fading channels, data can be repeated 4 and 6 times before Differential Binary Phase Shift Keying mapping. Non-Frame Control Header data are protected with the concatenation of a Reed-Solomon Code and the convolutional code already mentioned. The Reed-Solomon code has the following RS(n, k) parameters, n = 255 and k = 247 for Robust, and n = 255 and k = 239 for the other modes. In PLC-G3 system, it was experimentally  observed that the periodic impulsive noise parameters vary according to the following Table 1: For more information regarding this system, refer to a previous study. 11 2-PLC-PoweRline Intelligent Metering Evolution (PRIME): The 3rd column of the above Table 2 contains an overview of PRIMEs parameters. More details for PRIME can be found in a previous study. 11

PRELIMINARIES
In this section concerning low rank metric codes, we give the necessary material to understand the basis of channel coding with rank metric codes. For more details about rank code, the reader can refer to a previous study. 12 We define a new type of rank code called LRPC with a different construction of the parity-check and the generator matrix. Also, we will describe a new decoding algorithm based on calculations of vector spaces over a finite field F q . 13 : it has rank d, dimension k, and length n over F q m such that its parity check matrix H = (h ij ) is a (n − k) × n matrix that exhibits the following property: the sub-vector space of F q m generated by its coefficients h ij has dimension at most d. We call this dimension the weight of H.

Definition 1. Low Rank Parity Check (LRPC)
We will present a specific construction of the parity check matrix H(h ij ) from which we derive the generator matrix G in systematic form. 14 This method leads to find a low rank matrix. We present the steps of construction below: Remark: H is called the parity check matrix with low rank = d.

3.1
Writing the matrix Hin the base field F q The particular structure of LRPC codes permits to express formally the syndrome equations in F q . It permits to obtain a very efficient decoding algorithm, that will be detailed in the next section. We describe in the following section the way to obtain such a transformation, we introduce a particular matrix A r H , that will be used for the decoding procedure.
Suppose that the error e = (e 1 , … , e n ) of weight r lies in the error space E of dimension r generated by a basis {E 1 , E 2 ,,E r }. Then, all e i (1 ⩽ i ⩽ n) can be written as e i = ∑ r j=1 e ij E j . The matrix H = (h ij ) is constructed such that h ij belongs to a space F of dimension d generated by {F 1 ,F 2 ,,F d }, then for all 1 ⩽ i ⩽ n − k,1 ⩽ j ⩽ n, h ij = ∑ d l=1 h ijl F l , for h ijl ∈ F q . Suppose moreover that the dimension of the space < F 1 E 1 , F 1 E 2 ,.., F 1 E r , F 2 E 1 , … , F d E r > is exactly rd. It is then possible to express the syndrome equations H.e t = s over F q m into equations over F q , by formally expressing the e i in the basis {E 1 ,E 2 ,, E r } and the syndrome coordinates in the product basis After multiplication, we obtain ⎧ ⎪ ⎨ ⎪ ⎩ h 1,1 e 1 + h 1,2 e 2 + … + h 1,n e n = s 1 h 2,1 e 1 + h 2,2 e 2 + … + h 2,n e n = s 2 ⋮ ⋮ h n−k,1 e 1 + h n−k,2 e 2 + … + h n−k,n e n = s n−k Then, matrix H is written in the product basis < E.F > , Then, we express clearly this relations as below: Finally, we define the following (n − k)rd × nr matrix using the coefficients h ij .
H .e ′ t = s ′ , where e ′ = (e 11 , e 12 , … , e 1r , e 21 , e 22 , … ) and s ′ = (s 111 , … , s 11r , … , s (n−k)dr ). Then, we extract the matrix A H which is a non-singular matrix with dimension nr × nr from A r H , and we note D H = A −1 H the decoding matrix. Note that the matrix A r H does not depend on the error received, and it is independent of the chosen basis {E 1 , E 2 ,,E r }. In fact, it only depends on its rank weights. Thus, if one knows the resulting product H , A H , and especially D H can be generated and used directly in decoding which significantly reduces the decoding complexity.

Definition 2.
We consider a (n − k)rd × nr matrix A r H = (a ij ). We first set all a ij and then write:

Decoding algorithm for Low Rank Parity Check Codes
Consider a [n,k] LRPC code C of low weight d over F q m , with generator matrix G and dual (n − k) × n matrix H, such that all coordinates h ij of H belong to a space F of rank d with basis {F 1 , F 2 ,,F d }. Suppose that the received word is y = xG + e for x and e in (F q m ) n , and where e = (e 1 , … ,e n ) is the error vector of rank r, which means that for any 1 ⩽ i ⩽ n, we have e i ∈E, a vector space of dimension r with basis {E 1 , E 2 ,,E r }. Decoding starts with computing syndrome vector s(s 1 , … ,s n − k ) = H.y t and the syndrome space S =< s 1 , … ,s n − k > . We suppose that S is exactly the product space < E.F > .
Here we define S i = F −1 i S, the subspace where all generators of S are multiplied by F −1 i ; we have F i .E j ∈ S, ∀1 ⩽ j ⩽ r, hence E j ∈ S i ; therefore, E⊂S i , and then E∈S 1 ∩ S 2 ∩ ... ∩ S d . If we suppose dim(S 1 ∩ S 2 ∩ ... ∩ S d ) = r, we have E = S 1 ∩ S 2 ∩ ... ∩ S d , and we compute the support of error which is the basis {E 1 , E 2 ,,E r } of E. We write e i (1 ⩽ i ⩽ n) in the error support as e i = ∑ r j=1 e ij E j and s i in the basis Finally, we recover the error vector e = (e 1 , … ,e n ) from e ′ = (e 11 , e 12 , … , e 1r , e 21 , e 22 , … ) in order to obtain the message x.
Let us consider an example with small parameter values to explain the construction of the matrix A r H and the operation of the decoding algorithm. Selecting a code F 2 11 where Conway polynomial is chosen as a primitive polynomial P(X) = X 11 + X 2 + 1. We choose a code of length n = 6 and dimension k = 3. Let's assume that the error belongs to a subspace of dimension 1 (r = 1) generated by E 1 = . It is assumed that the coefficients of the matrix H belong to a space of dimension 2 (d = 2) generated by F 1 = 1 and F 2 = 2 . Assume that the matrix H is given by and we receive a word y = x + e where x is a code word and e is an error vector of rank 1 equal to e = (0, , 0, 0, 0, ) The decoding algorithm then process as follows.
1. Determination of syndrome space As and 3 are linearly independent over F 2 , the space S generated by the syndrome coordinates is S =< , 3 > . 2. Computation of error support: The element − 1 does not belong to S 1 , so S 1 ∩ S 2 =< >= E. 3. Determination of error by writing coordinates in the product basis: decompose the syndrome coordinates s in the basis {F 1 E 1 , F 2 E 1 }. We obtain s F 2 : Now, writing each coefficient of H in a column vector in the basis {F 1 , The matrix H has been chosen to ensure that A r H is a non-singular and square matrix, thus A r H = A H :  Finally, to recover the error vector, we calculate: We recover the coordinates of the written error vector (2) in the basis {E 1 } .

Orthogonal frequency-division multiplexing mapping desription
Signals of multi-carrier transmission can be represented in matrix form. The matrix column represents an OFDM symbol. According to the Reed-Solomon encoder, the signal is encoded firstly by using a convolutional encoder then a 2D interleaver is employed, for more details on this interleaver the reader can refer to a previouse study. 10 A simple mapping transformation Serial/Parallel described in Figure 3 is used in our simulations.
According to the LRPC encoder, transmitted signal is a matrix with elements belonging to F 2 , or a vector of elements over the extension field F 2 N . To better illustrate this mapping, we consider a vector from the encoder with elements in F 2 N : a = M × G = (a 1 , a 2 ,· · ·,a n ), M = (m 1 ,· · ·,m k ) being the message to send. Now, we can present the vector a with entries in GF(2 N ) as a matrix A with entries in F 2 : where: We note here that the 2 codes (Low rank parity check and Reed-Solomon codes) are mapped using the equal number of sub-carriers.
In order to clarify this different types of noise, Figure 4 visualize errors on a very small frame, transmitted in time as columns and frequency as rows. These matrices correspond to the error pattern, the values "x" corresponding to error locations and 0 indicating the absence of errors.

SIMULATION RESULTS
To evaluate the performance of LRPC code, a complete G3 system has been implemented in MATLAB. Here, we will compare the LRPC code (46, 23) with the (255, 127) Reed-Solomon code, this one uses a code rate 1/2 (typically concatenation of Convolutional Code and RS code when they are not associated with repetition codes). The codeword of the LRPC code is a (46 × 46) matrix of binary symbols in the time-frequency domain. This size has been chosen in order to guarantee that the decoding complexity of LRPC is roughly similar to those of RS codes, refer to Table 3. Reed-Solomon Code decoding is performed using the Berlekamp-Massey algorithm. 17 We simulate a PLC channel with all the independent noise characteristics (Impulsive noise, NarrowBand interference). We note that the codewords used are of equal size for the 2 codes. Briefly, one obtains that for the selected parameters for the 2 codes, LRPC codes operate with roughly the same complexity as RS codes, see Table 3.  The communications system block diagram of the proposed LRPC code is depicted in Figure 5.
In the different simulation results, LRPC (i,j) denotes a rank metric code with i OFDM symbols affected by impulsive noise and j sub-carriers affected by narrowband interference.

4.0.1
Scheme with Narrowband-Power Line Communication interference Figure 6 illustrates the performances of LRPC code against the RS code in presence of background noise and  NarrowBand interference which affect 3 sub-carriers. We begin to compare the 2 codes without Impulsive noise and NB-interference that mean LRPC (0,0) and RS (0,0): the only perturbation is the background noise. We observe that the LRPC code are more efficient when errors are confined in rows and columns.

4.0.2
Scheme with impulsive noise Figure 7 shows that LRPC code are better than code RS for a given number of OFDM symbols in cases of LRPC (0, 1) and LRPC (0, 2). However, for values 3 and 4, we notice that the RS codes become better than the LRPC. This is due to the probabilistic nature of codes LRPC. We now give an example on this case. To better illustrate this weakness, we choose a target rate of 10 − 6 for a code LRPC . Indeed, to be able to correct with a probability higher than 1 − 10 − 6 , it is necessary to respect these relations: We observe that is the capacity of correction for RS code, i.e., CAP RS − ⩾ CAP LRPC .
Note: n and d are the length and the dimension of the code, respectively; e is the rank error of code, and denotes the incorrect errors because of the lack of correction capacity.
That means that provided the error subspace spans less then 119 OFDM symbols, LRPC will decode successfully. For larger sizes successful decoding is not guaranteed.

PROBABILITY OF FAILURE
In order to understand the probability of failure for the LRPC codes, there are 3 cases to be considered. Dimensions of product basis E.F = rd demonstrated in proposition 1 introduced in a previous study 13 then the case E = S 1 ∩ S 2 ∩ ... ∩ S d corresponds to proposition 2 introduced in a previous study. 13 The probability can be reduced expontentially in the aforementioned cases owing to the parameters. The third case is dimension S=rd; the proposition can be simplified to Proposition 5.1. The probability that the (n − k) syndromes does not generate the product space P =< E.F > is less then That means the first 2 cases concludes that there is a minor dependence on the probability of decoding failure. The important probability that is to be considered is the probability shown from Proposition 5.1. This is not an upper bound but a situation that occurs in practice.

CONCLUSION
In this paper, we have developed a new system that is robust to impulsive noise and NarrowBand interference. We have studied also the performance of this new low rank code with a complete transmission scheme according to PLC G3 standard in a noisy environment of a Narrowband PLC interference. The LRPC code (46, 23) over GF (2 46 ) has been implemented and compared with a (255, 127) RS code; the size of codewords used are of sensibly equal. We have chosen OFDM with 256 subcarriers and BPSK modulation in accordance with current NB-PLC standards. The results indicate that under the considered channel and noise conditions, the introduced rank code outperforms the RS code used in the PLC standard.