# Patent

## Title
Method for encoding data message K' for transmission from sending station to receiving station as well as method for decoding, sending station, receiving station and software

## Abstract

Irregular LDPC codes have a construction which allows one to obtain a number of codes with different length from a single prototype code with a parity check matrix given by H=[Hz Hi], where Hz specifies the well-known zigzag pattern in the corresponding Tanner graph. The parity check matrices for longer codes are obtained as [Hz′Πdiag(Hi, . . . , Hi)], where Hz′ specifies a longer zigzag pattern depending on the number of matrices Hi used, and Π represents some permutation. This allows one to construct the decoder for a longer code by reusing hardware components developed for decoding the prototype code.

## Background
CROSS REFERENCE TO RELATED APPLICATIONS
This application is based on and hereby claims priority to European Application No. 06008954 filed on Apr. 28, 2006, the contents of which are hereby incorporated by reference.
BACKGROUND
Described below is a method for encoding a data message K′ for transmission from a sending station to a receiving station as well as a respective method for decoding, a respective sending station, a respective receiving station and respective software.
Construction of good low-density parity-check codes (LDPC codes) became recently one of the hottest research topics in coding theory. In spite of substantial progress in the asymptotical analysis of LDPC codes, as described in T. Richardson et al., “Design of capacity-approaching irregular low-density parity-check codes,” IEEE Transactions On Information Theory, vol. 47, no. 2, pp. 619-637, February 2001, constructing practical codes of short and moderate length still remains an open problem. The main reason for this is that density evolution analysis requires one to construct irregular LDPC codes, while most of the algebraic code design techniques developed up to now can produce only regular constructions, which inherently lack the capacity approaching behavior. Furthermore, the performance of practical length LDPC codes depends not only on the asymptotic iterative decoding threshold, but also on code minimum distance.
For high-rate codes, minimum distance appears to be the dominant factor. This allows one to solve the code construction problem using traditional techniques of coding theory, like finite geometries, difference sets, etc (see for example Y. Kou et al., “Low-density parity-check codes on finite geometries: A rediscovery and new results,” IEEE Transactions on Information Theory, vol. 47, no. 7, November 2001; B. Ammar et al., “Construction of low-density parity-check codes based on balanced incomplete block designs,” IEEE Transactions on Information Theory, vol. 50, no. 6, June 2004, and S. J. Johnson et al., “Resolvable 2-designs for regular low-density parity-check codes,” IEEE Transactions on Communications, vol. 51, no. 9, September 2003). But for lower rate codes (e.g. rate 1⁄2) one has to find a trade-off between the minimum distance and iterative decoding threshold. This is typically achieved by performing some kind of conditioned random search, as described in X.-Y. Hu et al., “Regular and irregular progressive edge-growth Tanner graphs,” IEEE Transactions on Information Theory, vol. 51, no. 1, January 2005; T. Tian et al., “Selective avoidance of cycles in irregular LDPC code construction,” IEEE Transactions On Communications, vol. 52, no. 8, August 2004; and Hua Xiao et al., “Improved progressive-edge-growth (PEG) construction of irregular LDPC codes,” IEEE Communications Letters, vol. 8, no. 12, pp. 715-717, December 2004. Codes obtained with these methods exhibit very good performance, but are very difficult to implement due to absence of any structure. One way to solve this problem is to modify a structured regular parity check matrix so that it becomes irregular, as described in Dale E. Hocevar, “LDPC code construction with flexible hardware implementation,” in Proceedings of IEEE International Conference on Communications, May 2003, pp. 2708-2711 and Jingyu Kang et al., “Flexible construction of irregular partitioned permutation LDPC codes with low error floors,” IEEE Communications Letters, vol. 9, no. 6, June 2005. However, there is no formalized way to perform such modification, and many trials have to be performed before good code is found.
LDPC codes represent a sub-class of linear codes. Any codeword c of a linear code satisfies the equation HcT=0, where H is a parity check matrix of the code. On the other hand, for a given data message K the corresponding codeword can be obtained as c=KG, where G is a generator matrix of the code. This implies that the parity check matrix H and the generator matrix G must satisfy the equation HGT=0. For a given parity check matrix H, it is possible to construct many different generator matrices G. It is always possible (probably after applying a column permutation to the check matrix H) to construct a generator matrix in the form G=[A I], where I is the identity matrix, and A is some other matrix. In this case the codeword corresponding to a data message K looks like c=KG=[KA K], i.e. the data message K appears as a sub vector of the codeword. This is known as systematic encoding. The advantage of systematic encoding is that as soon as all channel errors are removed from the codeword, the data message can be immediately extracted from it, without any post-processing. In some cases it is possible to construct other methods for systematic encoding of data messages, more efficient than multiplication by the generator matrix in systematic form. However, the encoding method does not affect the error correction capability of the code.
It is also true that if H is a parity check matrix of some linear code, then product SH is also a parity check matrix for the same code, where S is a non-singular matrix. In particular, if S is a permutation matrix, and H is a low-density matrix, running the belief propagation LDPC decoding algorithm, as described in W. E. Ryan, “An introduction to LDPC codes,” in CRC Handbook for Coding and Signal Processing for Recording Systems, B. Vasic, Ed. CRC Press, 2004, over SH matrix would give exactly the same results as for the case of the original H matrix.
Many LDPC code constructions are based on expansion of a template matrix P by substituting given entries pij with p×p permutation matrices, where p is the expansion factor. Using the construction according to FIGS. 2 to 8, codes with different length but the same rate can be generated starting from a single template matrix. More specifically, their parity check matrix is given by two sub-matrices, the first one, Hz, is a double diagonal matrix implementing the so-called zigzag pattern, and the second one, Hi, is constructed based on the expansion of a template matrix, i.e. by substituting its entries with permutation and zero matrices. By changing the expansion factor, codes of different lengths are obtained. Obviously, this requires employing different permutation matrices. Despite of the simplicity of this operation, changing the expansion factor, requires a re-routing of the edges in the Tanner Graph corresponding to the parity check matrix. Since the Tanner Graph structure is implemented for the so called “message passing” or “belief propagation” decoding at the receiver, a change in its structure can afford significant hardware complexity when considering the whole code family.
A possibility to obtain longer codes from shorter codes is by using concatenated coding, as described in the B. Ammar et al. article cited above. However, this usually changes also the code rate. Furthermore, LDPC codes are known to perform not so well if employed in concatenated code constructions. The reason is that it is extremely difficult to obtain a good node degree distribution in the Tanner graph of the concatenated code.
SUMMARY
An aspect is to provide an improved method for encoding a data message using a code the length of which can be chosen such that the above mentioned disadvantages in respect of decoder structure and code rate are overcome. It is a aspect to provide a respective method for decoding, a respective sending station and a respective receiving station as well as respective software.
According to the method for encoding a data message K′ for transmission from a sending station to a receiving station, the encoding generates a codeword c′ of length n=w*n0, whereas w and no are integer numbers, and generating the codeword c′ is achieved by and/or mathematically writable as multiplication of the data message K′ with a generator matrix G′, c′=K′G′, whereas the generator matrix G′ is a solution of a matrix equation H′G′T=0, with H′=[Hz′ Hi′], where Hz′ is a w*m0×w*m0 matrix with two adjacent diagonals of 1's having 0 in all other positions and Hi′ is a w*m0×w*(n0−m0) matrix, and Hi′ is a matrix obtained by interleaving rows of a block-diagonal matrix Hi′(w) having w matrices Hi of dimension m0×(n0−m0) in the diagonal and 0 in all other positions, and whereas Hi is further chosen such that H=[Hz Hi] is a parity check matrix of a code with length n0, where Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions.
The method enables creation of codes with w times the length of a prototype code with length n0 without changing the respective Tanner graph structure. Therefore the decoder structure, e.g. hardware components, used for the prototype code of length n0 can also be used for decoding codewords encoded according to the method.
In addition to interleaving rows, it is also possible to interleave the columns of matrix H′. The resulting code is equivalent and has the same performance as the code generated without interleaving columns.
Advantageously Hi is further chosen such that encoding of a data message K using a generator matrix G generates a codeword c of length n0, c=KG, whereas the generator matrix G is a solution of a matrix equation HGT=0, with H=[Hz Hi], where Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions.
Advantageously Hi is obtained by interleaving rows of a first matrix Hu, which is a block matrix consisting of permutation matrices and zero matrices.
This means that the parity check matrix H of the respective code is given by H=[Hz SHu]=S[S−1Hz Hu], where S is a permutation matrix used for interleaving rows of the first matrix Hu. Since permuting rows of the parity check matrix does not change the code, one can use also a parity check matrix in the form [S−1Hz Hu].
Advantageously a generator matrix G′ is used, which satisfies the condition G′=[((Hz′)−1 Hi′)TI].
Therefore, if the codeword c′ is mathematically written as c′=[cz′ ci′], the multiplication of the data message K′ and this generator matrix G′ results in ci′ being the data message K′, while cz′ is given by cz′T=(Hz′)−1Hi′K′T. Multiplication by the sub matrix (Hz′)−1Hi′ can be implemented either straightforwardly, or as a sequence of the following transformations. Since Hi′=S′Hi′(w), where S′ is the permutation matrix used for interleaving rows of the block-diagonal matrix Hi′(w), one can either multiply the vector K′T (the data message) directly by Hi′, or multiply it first by Hi′(w), and then interleave elements of the obtained vector. Multiplication of a vector by matrix Hz′−1 may be implemented by using a filter with the transfer function 1/(1+D′).
Advantageously a rectangular interleaver is used for interleaving rows of the block-diagonal matrix Hi′(w), that is by using the permutation Π(i)=(i mod m0)w+└i/m0┘, i=0 . . . wm0−1.
Advantageously the first matrix Hu is generated by expansion of a template matrix P of dimension s×t, the expansion being made by replacing all elements pij of the template matrix P which satisfy the condition 0≦pij<∞ with cyclic permutation matrices of dimension p×p, having a value 1 at positions (r,(pij+r) mod p), with r=0 . . . p−1, i=0 . . . s−1 and j=0 . . . t−1, and replacing all other element of P which satisfy the condition pij=∞ or pij<0 with p×p zero matrices.
By changing the expansion factor p different values for n0 can be chosen because changing p changes the size of Hi and Hz, i.e. n0 and m0.
Advantageously a rectangular interleaver is used for interleaving rows of the first matrix Hu, that is by using the permutation Π(i)=(i mod p)s+└i/p┘, i=0 . . . sp−1.
The method for decoding a data message K′ from a codeword c′ received from a sending station shows all necessary steps to decode the codeword c′ and uses a parity check matrix H′ which is build according to the method for encoding. According to the method for encoding, the parity check matrix H′ is used in an equation H′G′T=0 which has to be satisfied by a generator matrix G′ that is usable for mathematically expressing encoding of the data message K′.
The sending station includes an encoding unit to encode a data message K′ into a codeword c′ of length n=w*n0, whereas w and n0 are integer numbers, and generating the codeword c′ is achieved by and/or mathematically writable as multiplication of the data message K with a generator matrix G′, c′=K′G′, whereas the generator matrix G′ is a solution of a matrix equation H′G′T=0, with H′=[Hz′ Hi′], where Hz′ is a w*m0×w*m0 matrix with two adjacent diagonals of 1's having 0 in all other positions and Hi′ is a w*m0×w*(n0−m0) matrix, and Hi′ is a matrix obtained by interleaving rows of a block-diagonal matrix Hi′(w) having w matrices Hi of dimension m0×(n0−m0) in the diagonal and 0 in all other positions, and whereas Hi is further chosen such that H=[Hz Hi] is a parity check matrix of a code with length n0, where Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions.
The receiving station includes at least one unit decoding a codeword c′ received from a sending station using a parity check matrix H′, build according to the method for encoding, for checking parity of codeword c′.
The software for encoding a data message K′ includes program code which outputs a codeword c′ from an input data message K′, if the software is running on a computer, by use of the method for encoding.
Further, the software for decoding a codeword c′ includes program code which outputs a data message K′ from an input codeword c′ and uses a parity check matrix H′ build according to the method for encoding, if the software is running on a computer.



BRIEF DESCRIPTION OF THE DRAWINGS
These and other aspects and advantages will become more apparent and more readily appreciated from the following description of exemplary embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a Tanner graph of an example code (state of the art),
FIG. 2 is a parity check matrix and Tanner graph with a zigzag pattern,
FIG. 3 is a block diagram of a first embodiment of an encoder,
FIG. 4 is a block diagram of a second embodiment of an encoder,
FIG. 5 is a template matrix P for rate 1⁄2 codes,
FIG. 6 is a graph illustrating performance of rate 1⁄2 codes
FIG. 7 is a graph illustrating performance of rate 2⁄3 codes
FIG. 8 is a template matrix P for rate 2⁄3 codes
FIG. 9 is a graph illustrating performance of rate 2⁄3 codes with lengths w*360, w=1, 2, 3, build according to the method of encoding and rate 2⁄3 codes with lengths 720 and 1080 build using different expansion factors p,



DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
Reference will now be made in detail to the preferred embodiments, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout.
A sending station is for example a terminal or a base station of a radio communications system.
A receiving station is for example a terminal or a base station of a radio communications system.
A terminal is for instance a mobile radio terminal, particularly a mobile phone or a flexible of fixed device, for transmission of picture data and/or sound data, for fax, short message service (SMS) messages and/or E-mail messages, and/or for internet access.
The method can advantageously be used in any kind of communications system. A communications system is for example a computer network or a radio communications system.
Radio communications systems are systems in which a data transmission between terminals is performed over an air interface. The data transmission can be both bidirectional and unidirectional. Radio communications systems are particularly cellular radio communication systems, e.g. according to the GSM (Global System for Mobile Communications) standard or the UMTS (Universal Mobile Telecommunication System) standard. Also future mobile radio communications systems, e.g. according to the fourth generation, as well as ad-hoc-networks shall be understood as radio communication systems. Radio communication systems are also wireless local area networks (WLAN) according to standards from the Institute of Electrical and Electronics Engineers (IEEE) like 802.11a-i, HiperLAN1 and HiperLAN2 (High Performance Radio Local Area Network) as well as Bluetooth-Networks.
An Overview of LDPC Codes
LDPC codes are defined as a class of linear binary codes having a sparse m0×n0 parity check matrix H. The dimension of the code is given by k≧n0−m0. Alternatively, the LDPC code can be characterized by a bi-partite graph (Tanner graph) with n0 variable nodes and m0 check nodes, as described in the W: E. Ryan article. An edge connects variable node j with check node i if and only if Hij=1. For example, consider the following parity check matrix:




  H
  =
  
    
      (
      
        
          
            1
          
          
            1
          
          
            1
          
          
            1
          
          
            0
          
          
            0
          
          
            0
          
          
            0
          
          
            0
          
          
            0
          
        
        
          
            1
          
          
            0
          
          
            0
          
          
            0
          
          
            1
          
          
            1
          
          
            1
          
          
            0
          
          
            0
          
          
            0
          
        
        
          
            0
          
          
            1
          
          
            0
          
          
            0
          
          
            1
          
          
            0
          
          
            0
          
          
            1
          
          
            1
          
          
            0
          
        
        
          
            0
          
          
            0
          
          
            1
          
          
            0
          
          
            0
          
          
            1
          
          
            0
          
          
            1
          
          
            0
          
          
            1
          
        
        
          
            0
          
          
            0
          
          
            0
          
          
            1
          
          
            0
          
          
            0
          
          
            1
          
          
            0
          
          
            1
          
          
            1
          
        
      
      )
    
    .
  




FIG. 1 presents the associated Tanner graph.
The degree of a node in the graph is the number of edges connected to this node. If different nodes in the Tanner graph have different degree, the code is called irregular. Otherwise, the code is the to be regular. The Tanner graph is characterized by its variable and check node degree distributions



  
    
      λ
      ⁡
      
        (
        x
        )
      
    
    =
    
      
        ∑
        i
        
          
        
      
      ⁢
      
        
      
      ⁢
      
        
          λ
          i
        
        ⁢
        
          x
          
            i
            -
            1
          
        
      
    
  




  and




  
    
      
        ρ
        ⁡
        
          (
          x
          )
        
      
      =
      
        
          ∑
          i
          
            
          
        
        ⁢
        
          
            ρ
            i
          
          ⁢
          
            x
            
              i
              -
              1
            
          
        
      
    
    ,
  



where λi and ρi are the fractions of edges connected to degree-i variable and check nodes, respectively. These edge perspective distributions can be translated into the node perspective distributions




  
    
      Λ
      ⁡
      
        (
        x
        )
      
    
    =
    
      
        ∑
        i
        
          
        
      
      ⁢
      
        
          Λ
          i
        
        ⁢
        
          x
          
            i
            -
            1
          
        
      
    
  




  and




  
    
      
        R
        ⁡
        
          (
          x
          )
        
      
      =
      
        
          ∑
          i
          
            
          
        
        ⁢
        
          
            R
            i
          
          ⁢
          
            x
            
              i
              -
              1
            
          
        
      
    
    ,
  



where Λi and Ri are the fractions of variable and check nodes of degree i. Graph-based description of LDPC code allows one to design an iterative message-passing decoding algorithm, as described in the W. E. Ryan article. This algorithm was analyzed in S.-Y. Chung et al., “On the design of low-density parity-check codes within 0.0045 dB of the Shannon limit,” IEEE Communications Letters, vol. 5, no. 2, February 2001 for the case of infinitely long codes and binary-input memoryless output-symmetric channels. It was shown that for a given ensemble of LDPC codes there exists a value of the channel parameter (e.g. signal-to-noise ratio), so that the iterative decoding is successful for all parameter values greater than this threshold. It is possible to design a numeric algorithm for computing the threshold for given node degree distributions, and even perform their optimization in order to minimize it, as described in the S.-Y. Chung et al. article.

For finite-length LDPC codes, the performance depends not only on the asymptotic iterative decoding threshold, but also on the loop structure of the code. The girth of a Tanner graph is the minimum cycle length of the graph. The girth of the graph on FIG. 1 is 6, since there is a length-6 loop v1-c1-v2-c3-v5-c2-v1 connecting its vertices. Short (especially, length 4) cycles are known to have negative impact on the performance of the message-passing decoding algorithm, so such Tanner graphs should be, in general, avoided. However, in the T. Tian et al. article cited above, it was shown that not all short loops are equally harmful. If the nodes in a loop are connected to the nodes not participating in this loop, the extrinsic information can still flow over the Tanner graph, and the decoding can proceed. It is possible to introduce the approximate cycle extrinsic message degree (ACE) of a loop as described in the T. Tian et al. article cited above




  
    
      
        
          
            A
            ⁢
            
              
            
            ⁢
            C
            ⁢
            
              
            
            ⁢
            E
          
          =
          
            
              ∑
              i
              
                
              
            
            ⁢
            
              (
              
                
                  d
                  i
                
                -
                2
              
              )
            
          
        
        ,
      
    
    
      
        (
        1
        )
      
    
  




where summation is performed over all variable nodes in the loop, and di is the degree of the i-th variable node. One can impose a constraint ACEmin>η on minimum ACE value over all loops of length l≦2lACE in a Tanner graph being constructed. In A. Ramamoorthy and R. Wesel, “Analysis of an algorithm for irregular LDPC code construction,” in Proceedings of IEEE International Symposium on Information Theory, 2004, p. 69, it was shown that in this case the number of stopping sets (i.e. erasure configurations unrecoverable by the message-passing algorithm) of size≦lACE decreases exponentially with η. Since positions of non-zero symbols of any codeword also constitute a stopping set, ACE conditioning improves also code minimum distance (and, in general, weight spectrum).

Equation (1) implies that ACE of a loop involving only degree-2 nodes is equal to zero. Furthermore, it is known that any loop of length 2l in a degree-2 part of the Tanner graph corresponds to a weight-l codeword. Since optimized node degree distributions usually have 1>Λ2>>0 (i.e. there should be substantial amount of degree-2 nodes), it is especially important to maximize the length of loops passing through the degree-2 part of the Tanner graph. This can be achieved by arranging as many as possible degree-2 nodes into the zigzag pattern shown on FIG. 2. If needed, the remaining degree-2 nodes may be packed into the part Hi. Zigzag pattern does also not need to involve all check nodes. This implies that the zigzag pattern is a very good starting point in the design of a LDPC code.
Observe, that systematic encoding of a data message K with such a code can be performed by multiplying K with a generator matrix G=[(Hz−1Hi)TI]
Description of Embodiments Showing a Possible Construction of LDPC Codes
The matrix Hi should be constructed under the following constraints:

    1. the Tanner graph of the obtained parity check matrix H=[Hz Hi] should have the node degree distribution approximately equal to the target one;
    2. low-weight codewords should be avoided;
    3. more generally, small stopping sets in H should be avoided, i.e. the constraint ACE≧η for some η should be satisfied;
    4. length-4 loops should be avoided;
    5. Hi should be structured.


These guidelines are implemented in an algorithm for constructing Hi.
We propose to construct Hi in two steps. First, let us expand a s×t template matrix P, i.e. replace its elements pij: 0≦pij<∞ with p×p cyclic permutation matrices having 1's in positions (r, (pij+r) mod p), r=0 . . . p−1, i=0 . . . s−1, j=0 . . . t−1. All other elements of P are replaced with p×p zero matrices. A first matrix Hu is obtained by expanding the template matrix P. Second, let us permute (interleave) the rows of the first matrix Hu. This leads to a sp×tp matrix Hi. One possible row permutation is given by a rectangular interleaver: Π(i)=(i mod p)s+└i/p┘, i=0 . . . sp−1. Here s, p and t are the parameters of the construction. Appending m0 zigzag columns to Hi, one obtains the m0×n0 parity check matrix H with m0=sp, n0=tp+m0. The template matrix P is the result of an optimization process described below, using a prototype matrix M, having 1's in positions (i,j): 0≦pij<∞, and 0 elsewhere.
Observe that Hi can be specified with at most M integers pij, where M is the number of 1's in the prototype matrix M.
FIGS. 3 and 4 illustrate embodiments of an encoder for the described code, used for encoding a data message K into a codeword c. The data message K is e.g. a vector of k Bits which has to be transmitted from a sending station NodeB to a receiving station UE. The receiving station UE has a processor PR to decode the codeword c, whereas decoding includes using the parity check matrix H to run the belief propagation decoding algorithm and parity check the codeword c.
In FIG. 3 the codeword c, which can mathematically be written as c=[cz ci], is generated by multiplying the data message K by a generator matrix G, which must satisfy the equation HGT=0. The parity check matrix is build as described in the very last paragraph.
In FIG. 4 an even more efficient approach is presented by using a generator matrix G which satisfies the condition G=[(Hz−1Hi)TI]. Therefore, if the codeword c is mathematically written as c=[cz ci], the multiplication of the data message K and this generator matrix G results in the first component ci being the data message K, while the second component cz is given by czT=Hz−1HiKT. I.e. the second component cz of the codeword c is calculated using row permutation by multiplying the data message K with the first matrix Hu and by permuting the rows of the result of this multiplication and by filtering the result. Alternatively, the row permutation can by applied to the first matrix Hu before multiplication with the data message K. The parity check matrix H, i.e. the matrices Hi and Hz are build in the same way as described for FIG. 3.
The prototype matrix M can be constructed by different methods, e.g. manually, or using the PEG algorithm, as described in the X.-Y Hu et al. article cited above, so that it satisfies approximately the given node degree distribution pair (Λ(x), R(x)). Particular values of pij integers in the template matrix P should be selected so that the obtained parity check matrix H satisfies the requirements 1-5 presented above. The following section presents a randomized algorithm for computing them.
Optimization Algorithm
The idea of the optimization algorithm presented below is that low-weight input words after multiplication by the first matrix Hu, the interleaver, and 1/(1+D) filter as shown in FIG. 4, should not transform into low-weight vectors (cz,ci). This is very similar to the problem of constructing interleavers for turbo codes.
The structure of the zigzag pattern allows one to calculate the weight of the y=Hz−1x vector as




  
    
      
        
          S
          ⁡
          
            (
            x
            )
          
        
        =
        
          {
          
            
              
                
                  
                    
                      ∑
                      
                        j
                        =
                        0
                      
                      
                        
                          ⌈
                          
                            l
                            /
                            2
                          
                          ⌉
                        
                        -
                        1
                      
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      (
                      
                        
                          x
                          
                            l
                            -
                            
                              2
                              ⁢
                              j
                            
                          
                        
                        -
                        
                          x
                          
                            l
                            -
                            
                              2
                              ⁢
                              j
                            
                            -
                            1
                          
                        
                      
                      )
                    
                  
                  ,
                
              
              
                
                  
                    if
                    ⁢
                    
                      
                    
                    ⁢
                    
                      x
                      l
                    
                  
                  <
                  z
                
              
            
            
              
                
                  ∞
                  ,
                
              
              
                otherwise
              
            
          
        
      
    
    
      
        (
        1
        )
      
    
  
  
    
      
        
          S
          ⁢
          
            (
            x
            )
          
        
        =
        
          {
          
            
              
                
                  
                    
                      ∑
                      
                        j
                        =
                        0
                      
                      
                        
                          ⌈
                          
                            l
                            /
                            2
                          
                          ⌉
                        
                        -
                        1
                      
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      (
                      
                        
                          x
                          
                            l
                            -
                            
                              2
                              ⁢
                              j
                            
                          
                        
                        -
                        
                          x
                          
                            l
                            -
                            
                              2
                              ⁢
                              j
                            
                            -
                            1
                          
                        
                      
                      )
                    
                  
                  ,
                
              
              
                
                  
                    if
                    ⁢
                    
                      
                    
                    ⁢
                    
                      x
                      l
                    
                  
                  <
                  z
                
              
            
            
              
                
                  ∞
                  ,
                
              
              
                otherwise
              
            
          
        
      
    
    
      
        (
        1
        )
      
    
  




In principle, this allows one to consider all possible input patterns, compute for a given pij set the input vector x=HiciT of the 1/(1+D) filter, find the weight of the filter output, and deduce the minimum distance dmin of the code obtained. Then one can perform maximization of dmin over all possible pij values. However, this approach is quite impractical due to exponential number of input patterns, and huge size of the search space. Therefore one has to limit the search scope to data messages K of k Bits having sufficiently small weight wt(K)≦α. Furthermore, the optimization of pij values can be performed on the column-by-column basis using a variation of a genetic algorithm:

    6. Construct a prototype matrix M with the required column and row degree distribution.
    7. Let j:=0.
    8. Generate pij randomly for all i s.t. Mij=1.
    9. Make sure that the matrix Ĥi obtained by expanding first j+1 columns of the template matrix P and by permuting rows of the expanded matrix appropriately, does not have length-4 loops and its minimal ACE is not less than a given threshold η. This can be implemented efficiently using the algorithms presented in Marc P. C. Fossorier, “Quasi-cyclic low-density parity check codes from circulant permutation matrices,” IEEE Transactions On Information Theory, vol. 50, no. 8, August 2004, and the T. Tian et al. article cited above. Go to step 3 in case of failure.
    10. Consider all possible input patterns KεGF(2)(j+1)p:wt(K)≦α. Determine the weights of the associated output vectors of the zigzag encoder using (1), and find the minimal codeword weight, which is denoted here by Smin.
    11. Repeat steps 3-5 a given number of times, and select pij values maximizing Smin. Let {circumflex over (d)}j be the maximal value of Smin.
    12. Let j:=j+1.
    13. if j<t, go to step 1.


Observe that {circumflex over (d)}=minj{circumflex over (d)}j gives an upper bound on the minimum distance of the code obtained. Clearly, increasing α, the weight of input vectors being analyzed, improves the accuracy of this estimate. In practice, for well-chosen prototype matrices M, it is sufficient to set α≈5 to obtain {circumflex over (d)} very close to the true minimum distance of the code.
The algorithm presented above optimizes the template matrix P for a fixed value of the expansion factor p. However, it is possible to consider simultaneously a number of different expansion factors, maximizing at step 6 the weighted sum of estimated minimum distances of the codes obtained for the same template matrix P, but different expansion factors p. As a consequence, a unique template matrix P for parity check matrices for a number of different code lengths, but the same rate, is obtained.
The proposed algorithm generalizes the methods presented in the Dale E. Hocevar article, the Jingyu Kang et al. article and Rich Echard et al., “Design considerations leading to the development of good □-rotation LDPC codes,” IEEE Communications Letters, vol. 9, no. 5, May 2005 in several ways. First, interleaving of rows of the first matrix Hu can be considered as an additional degree of freedom in optimization of the LDPC code. The optimization algorithm presented above does not depend on it explicitly. Second, there are no artificial restrictions on pij values coming from the original algebraic LDPC constructions (cf. the Dale E. Hocevar and R. M. Tanner, Deepak Sridhara, Arvind Sridharan, Thomas E. Fuja, and Daniel J. Costello, “LDPC block and convolutional codes based on circulant matrices,” IEEE Transactions on Information Theory, vol. 50, no. 12, December 2004). The price for this is absence of an explicit algorithm for computing pij. But since the number of these values is quite small compared to the size of the template matrix P (see FIGS. 5 and 8), this is not a serious drawback. Third, the process of finding good codes is formalized, and the number of trial-and-error attempts is reduced. Provided that sufficient computational power is available, the proposed algorithm can produce reliable estimates of the minimum distance of the code obtained, providing thus valuable feedback to the code designer.
Numeric Results
The template matrix P in FIG. 5 can be used for construction of rate 1⁄2 codes to be used e.g. in the embodiments according to FIG. 3 or 4. Each integer entry pij should be replaced with a p×p cyclic permutation matrix given by pij, while ∞ entries should be replaced with p×p zero matrices. m0=s*p zigzag columns should be added to it after expanding it and permuting the rows.
The row permutation used is (rectangular interleaver) Π(i)=(i mod p)s+└i/p┘, i=0 . . . sp−1. FIG. 6 presents simulation results illustrating the performance of the obtained codes in AWGN channel, as well as the performance of PEG and IEEE 802.16 codes with similar parameters (see B. Classon et al, “LDPC coding for OFDMA PHY,” Tech. Rep. C802.16e-05/066r3, IEEE 802.16 Broadband Wireless Access Working Group, 2005).
It can be seen that the proposed code outperforms IEEE codes, and in some cases even fully random PEG codes, which are currently considered to be the best ones from the point of view of performance.
FIG. 7 illustrates the performance of rate 2⁄3 codes, and FIG. 8 presents a compact representation of the corresponding template matrix P. The row permutation used is (rectangular interleaver) Π(i)=(i mod p)s+└i/p┘, i=0 . . . sp−1. It can be seen that the proposed code considerably outperforms the IEEE one.
A method for constructing structured irregular LDPC codes was presented. The code construction is based on a block-permutation matrix with additional row permutation. The parameters of the permutation matrix are filled by an optimization algorithm, which attempts to maximize the code minimum distance. The numeric results indicate that the codes obtained with this method have excellent minimum distance and no visible error floor.
The proposed construction allows many generalizations and improvements. For example, it is possible to replace the cyclic permutation matrices with some other parametric permutations, e.g. based on permutation polynomials. Second, additional LDPC performance criteria can be integrated into the optimization algorithm.
Construction of Codes with Different Lengths
It was determined that starting from a parity check matrix H=[Hz Hi] of a code with length no, whereas Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions and Hi is a m0×(n0−m0) matrix, codes with length w*n0 can be constructed by using a parity check matrix H′=[Hz′ Hi′], if Hz′ is chosen as w*m0×w*m0 matrix with two adjacent diagonals of 1's having 0 in all other positions and Hi′ is a w*m0×w*(n0−m0) matrix obtained by interleaving rows of a block-diagonal matrix Hi′(w) having w matrices Hi of dimension m0×(n0−m0) in the diagonal and 0 in all other positions.
The matrix H, in particular Hi, can for example be constructed as described above in respect of FIGS. 2 to 8. Certainly also other constructions of H can be used.
If for example w=2, Hi′(2) is given by:




  
    H
    i
    
      ′
      ⁡
      
        (
        2
        )
      
    
  
  =
  
    (
    
      
        
          
            H
            i
          
        
        
          0
        
      
      
        
          0
        
        
          
            H
            i
          
        
      
    
    )
  




And H′ is in this case given by H′=[Hz′ΠHi′(2)], e.g. with the permutation Π(i)=(i mod m0)2+└i/m0┘, i=0 . . . 2m0−1.
A codeword c′, which can mathematically be written as c′=[cz′ ci′], is generated by multiplying a data message K′ by a generator matrix G′, which must satisfy the equation H′G′T=0.
Observe, that systematic encoding of the data message K′ can be performed by multiplying K′ with the generator matrix G′ fulfilling the equation G′=[((Hz′)−1Hi′)TI].
The encoding and decoding for generating the codeword c′ with length w*n0 is equivalently performed as described in connection with FIGS. 3 and 4 using H′ and G′ instead of H and G.
By way of example, the performance (FER: Frame Error Rate as a function of signal-to-noise ratio Eb/N0) of rate 2⁄3 codes constructed according to the method and having lengths of w*360, w=1, 2, 3 and the performance of codes of the same lengths constructed using different expansion factors p is shown in FIG. 9. The performance of the codes is only slightly worse than the performance of codes using respective expansion factors p. But the advantage is that a decoder structure, which can be used for the code with length 360 and which is usually realized by respective hardware components, can be maintained for codes with length w*360, whereas the decoder structure changes for codes of the same length constructed by choosing an appropriate expansion factor p.
The method for obtaining longer LDPC codes can be based on other zigzag-based constructions as well, see for example the Rich Echard et al. article.
The system also includes permanent or removable storage, such as magnetic and optical discs, RAM, ROM, etc. on which the process and data structures of the present invention can be stored and distributed. The processes can also be distributed via, for example, downloading over a network such as the Internet. The system can output the results to a display device, printer, readily accessible memory or another computer on a network.
A description has been provided with particular reference to preferred embodiments thereof and examples, but it will be understood that variations and modifications can be effected within the spirit and scope of the claims which may include the phrase “at least one of A, B and C” as an alternative expression that means one or more of A, B and C may be used, contrary to the holding in Superguide v. DIRECTV, 358 F3d 870, 69 USPQ2d 1865 (Fed. Cir. 2004).

## Claims

1. A method for encoding a data message K′ for transmission from a sending station to a receiving station, comprising:
obtaining a matrix Hi′, where Hi′ is a w*m0×w*(n0−m0) matrix, by interleaving rows of a block-diagonal matrix Hi′(w) having w matrices Hi of dimension m0×(n0−m0) in the diagonal and 0 in all other positions, where w and n0 are integer numbers, H=[Hz Hi] is a parity check matrix of a code with length n0, and Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions; and
generating a codeword c′ of length n=w*n0 by and/or mathematically writable as multiplication of the data message K′ with a generator matrix G′, c′=K′G′, where the generator matrix G′ is a solution of a matrix equation H′G′T=0, with H′=[Hz′ Hi′], and Hz′ is a w*m0×w*m0 matrix with two adjacent diagonals of 1's having 0 in all other positions.

2. The method according to claim 1, further comprising encoding a data message K using a generator matrix G to generate a codeword c of length n0, c=KG, where the generator matrix G is a solution of a matrix equation HGT=0, with H=[Hz Hi] and Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions.

3. The method according to claim 2, further comprising obtaining Hi by interleaving rows of a first matrix Hu, which is a block matrix consisting of permutation matrices and zero matrices.

4. The method according to claim 3, wherein the generator matrix G′ is given by G′=[((Hz′)−1 Hi′)TI].

5. The method according to claim 4, wherein a rectangular interleaver is used for interleaving rows of the block-diagonal matrix Hi′(w), that is by using the permutation Π(i)=(i mod m0)w+└i/m0┘,i=0 . . . wm0−1.

6. The method according to claim 5, further comprising generating the first matrix Hu by expansion of a template matrix P of dimension s×t, the expansion made by replacing all elements pij of the template matrix P which satisfy the condition 0≦pij<∞ with cyclic permutation matrices of dimension p×p, having a value 1 at positions (r,(pij+r) mod p), with r=0 . . . p−1, i=0 . . . s−1 and j=0 . . . t−1, and replacing all other elements pij which satisfy the condition pij=∞ or pij<0 with p×p zero matrices, where pij are some integers.

7. The method according to claim 6, wherein a rectangular interleaver is used for interleaving rows of the first matrix Hu, that is by using the permutation




  
    
      ∏
      
        (
        i
        )
      
    
    =
    
      
        
          (
          
            i
            ⁢
            
              
            
            ⁢
            mod
            ⁢
            
              
            
            ⁢
            p
          
          )
        
        ⁢
        s
      
      +
      
        ⌊
        
          i
          p
        
        ⌋
      
    
  
  ,
  
    i
    =
    
      
        
          0
          ⁢
          
            
          
          ...
        
        ⁢
        
          
        
        ⁢
        sp
      
      -
      1.

8. A sending station, comprising;
an encoding unit encoding a data message K′ into a codeword c′ of length n=w*n0, where w and n0 are integer numbers, and generating the codeword c′ is achieved by and/or mathematically writable as multiplication of the data message K′ with a generator matrix G′, c′=K′G′, and the generator matrix G′ is a solution of a matrix equation H′G′T=0, with H′=[Hz′ Hi′], where Hz′ is a w*m0×w*m0 matrix with two adjacent diagonals of 1's having 0 in all other positions and Hi′ is a w*m0×w*(n0−m0) matrix, where Hi′ is a matrix obtained by interleaving rows of a block-diagonal matrix Hi′(w) having w matrices Hi of dimension m0×(n0−m0) in the diagonal and 0 in all other positions, and Hi is further chosen such that H=[Hz Hi] is a parity check matrix of a code with length n0, where Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions.

9. A method for decoding a data message K′ from a codeword c′ received from a sending station, comprising:
using a parity check matrix H′ to decode the codeword c′, where H′=[Hz′ Hi′], Hz′ is a w*m0×w*m0 matrix with two adjacent diagonals of 1's having 0 in all other positions, the codeword c′ is of length n=w*n0, where w and n0 are integer numbers, and the codeword c′ is generated by and/or mathematically writable as multiplication of the data message K′ with a generator matrix G′, c′=K′G′, where the generator matrix G′ is a solution of a matrix equation H′G′T=0, and Hi′ is a w*m0×w*(n0−m0) matrix obtained by interleaving rows of a block-diagonal matrix Hi′(w) having w matrices Hi of dimension m0×(n0−m0) in the diagonal and 0 in all other positions, where H=[Hz Hi] is a parity check matrix of a code with length n0, and Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions.

10. A receiving station, comprising
at least one unit decoding a codeword c′ received from a sending station, using a parity check matrix H′ to decode the codeword c′, where H′=[Hz′ Hi′], Hz′ is a w*m0×w*m0 matrix with two adjacent diagonals of 1's having 0 in all other positions, the codeword c′ is of length n=w* n0, where w and n0 are integer numbers, and the codeword c′ is generated by and/or mathematically writable as multiplication of the data message K′ with a generator matrix G′, c′=K′G′, where the generator matrix G′ is a solution of a matrix equation H′G′T=0, and Hi′ is a w*m0×w*(n0−m0) matrix obtained by interleaving rows of a block-diagonal matrix Hi′(w) having w matrices Hi of dimension m0×(n0−m0) in the diagonal and 0 in all other positions, where H=[Hz Hi] is a parity check matrix of a code with length n0, and Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions.

11. At least one computer-readable medium encoded with a computer program for encoding a data message K′ that when executed by a computer causes the computer to output a codeword c′ from an input data message K′, by a method comprising:
obtaining a matrix Hi′, where Hi′ is a w*m0×w*(n0−m0) matrix, by interleaving rows of a block-diagonal matrix Hi′(w) having w matrices Hi of dimension m0×(n0−m0) in the diagonal and 0 in all other positions, where w and n0 are integer numbers, H=[Hz Hi] is a parity check matrix of a code with length n0, and Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions; and
generating a codeword c′ of length n=w*n0 by and/or mathematically writable as multiplication of the data message K′ with a generator matrix G′, c′=K′G′, where the generator matrix G′ is a solution of a matrix equation H′G′T=0, with H′=[Hz′ Hi′], and Hz′ is a w*m0×w*m0 matrix with two adjacent diagonals of 1's having 0 in all other positions.

12. At least one computer-readable medium encoded with a computer program for decoding a codeword c′, that when executed by a computer causes the computer to output a data message K′ from an input codeword c′, by a method comprising:
using a parity check matrix H′ to decode the codeword c′, where H′=[Hz′ Hi′], is a w*m0×w*m0 matrix with two adjacent diagonals of 1's having 0 in all other positions, the codeword c′ is of length n=w*n0, where w and n0 are integer numbers, and the codeword c′ is generated by and/or mathematically writable as multiplication of the data message K′ with a generator matrix G′, c′=K′G′, where the generator matrix G′ is a solution of a matrix equation H′G′T=0, and Hi′ is a w*m0×w*(n0−m0) matrix obtained by interleaving rows of a block-diagonal matrix Hi′(w) having w matrices Hi of dimension m0×(n0−m0) in the diagonal and 0 in all other positions, where H=[Hz Hi] is a parity check matrix of a code with length n0, and Hz is a m0×m0 matrix with two adjacent diagonals of 1's having 0 in all other positions.