[go: up one dir, main page]

CN106569906B - Code writing method and device based on sparse matrix - Google Patents

Code writing method and device based on sparse matrix Download PDF

Info

Publication number
CN106569906B
CN106569906B CN201610916426.0A CN201610916426A CN106569906B CN 106569906 B CN106569906 B CN 106569906B CN 201610916426 A CN201610916426 A CN 201610916426A CN 106569906 B CN106569906 B CN 106569906B
Authority
CN
China
Prior art keywords
check
node
nodes
variable
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201610916426.0A
Other languages
Chinese (zh)
Other versions
CN106569906A (en
Inventor
黄勤
芮佳依
王祖林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beijing University of Aeronautics and Astronautics
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Aeronautics and Astronautics filed Critical Beijing University of Aeronautics and Astronautics
Priority to CN201610916426.0A priority Critical patent/CN106569906B/en
Publication of CN106569906A publication Critical patent/CN106569906A/en
Application granted granted Critical
Publication of CN106569906B publication Critical patent/CN106569906B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1012Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices using codes or arrangements adapted for a specific type of error
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M13/00Coding, decoding or code conversion, for error detection or error correction; Coding theory basic assumptions; Coding bounds; Error probability evaluation methods; Channel models; Simulation or testing of codes
    • H03M13/03Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words
    • H03M13/05Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits
    • H03M13/11Error detection or forward error correction by redundancy in data representation, i.e. code words containing more digits than the source words using block codes, i.e. a predetermined number of check bits joined to a predetermined number of information bits using multiple parity bits
    • H03M13/1102Codes on graphs and decoding on graphs, e.g. low-density parity check [LDPC] codes
    • H03M13/1148Structural properties of the code parity-check or generator matrix
    • H03M13/1157Low-density generator matrices [LDGM]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Error Detection And Correction (AREA)

Abstract

The invention discloses a code writing method and device based on a sparse matrix, which can reduce the complexity of a capacity reaching scheme. The method comprises the following steps: s1, calculating a coset leader v corresponding to the information m to be writtenmWherein, in the step (A),m=(m1,m2,…,mk) The (n, k) block code corresponding to m is C, vm=(v1,v2,…,vn) (ii) a S2 sparse matrix-basedA vector b is calculated in which, among other things,i1,i2,…,isindicating the location of stuck cells, a1,a2,…,asFixed value, H, representing stuck cellszTo take the ith from the check matrix H of C1,i2,…,isA (n-k) x s order sub-matrix composed of columns; s3, writing m 'as a storage value into the storage unit, wherein m' is vm+bH。

Description

基于稀疏矩阵的编码写入方法及装置Code writing method and device based on sparse matrix

技术领域technical field

本发明涉及编码技术领域,具体涉及一种基于稀疏矩阵的编码写入方法及装置。The invention relates to the field of encoding technology, in particular to a sparse matrix-based encoding writing method and device.

背景技术Background technique

存储器(Memory)是一种记忆存储设备,用来保存信息,在现代信息技术中扮演着重要角色。存储器广泛应用于各种系统,如固态硬盘、手机、闪存卡、U盘、平板电脑等等,它无处不在,和我们的日常生活密不可分。Memory is a memory storage device used to store information and plays an important role in modern information technology. Memory is widely used in various systems, such as solid-state drives, mobile phones, flash memory cards, U disks, tablet computers, etc. It is ubiquitous and inseparable from our daily life.

然而,大多数存储系统(例如快闪存储器(flash memory)、相变存储器(phasechange memory,PCM))因为生产工艺都存在着缺陷:存储器中某些存储单元的值被固定住了,即这些存储单元的存储值不随着写入值的改变而改变,这类错误即是我们所要研究的stuck cell错误。stuck cell错误是不变的,是硬错误。stuck cell错误极大地影响了存储的可靠性。stuck cell错误将导致存储器成品率低、良品率低、寿命短等问题。However, most storage systems (such as flash memory (flash memory), phase change memory (PCM)) have defects because of the production process: the value of some storage cells in the memory is fixed, that is, these storage The storage value of the cell does not change with the change of the written value. This type of error is the stuck cell error we are going to study. The stuck cell error is constant and is a hard error. Stuck cell errors greatly affect storage reliability. A stuck cell error will lead to problems such as low memory yield, low yield, and short life.

针对Stuck Cell问题,研究者们普遍采用的一种解决方案是对需要写入的信息m做一个映射,F:m→m′,其中m与m′可记作m=(m1,m2,…,mk),m′=(m′1,m′2,…,m′n),使得m′中与stuck cells相对应的位置的值与stuck cells的固定值相同,即For the stuck cell problem, a solution generally adopted by researchers is to make a mapping for the information m to be written, F:m→m′, where m and m' can be written as m=(m 1 ,m 2 ,...,m k ), m'=(m' 1 ,m' 2 ,...,m' n ), so that m' corresponds to stuck cells The value of the position is the same as the fixed value of stuck cells, namely

i1,i2,…,is表示stuck cells的位置,a1,a2,…,as表示stuck cells的固定值。 i 1 , i 2 ,..., i s represent the position of stuck cells, and a 1 , a 2 ,..., a s represent the fixed values of stuck cells.

这个映射的过程就是编码写入的过程。This mapping process is the process of encoding and writing.

传统的信道编码可以将需要写入的信息m映射成m′,但这是一个一对一的映射过程,m′取不到二元域上n维向量空间上的所有向量。Traditional channel coding can map the information m to be written into m', but this is a one-to-one mapping process, and m' cannot get all the vectors in the n-dimensional vector space on the binary domain.

Mahdavifar和Vardy提出了容量达到方案来解决stuck cell问题,接下来将会介绍容量达到方案。Mahdavifar and Vardy proposed a capacity-achieving scheme to solve the stuck cell problem, and the capacity-achieving scheme will be introduced next.

码C是一个(n,k)线性码,其生成矩阵为Gk×n,校验矩阵为H(n-k)×n,同时,矩阵H也可被看作码C的对偶码C的生成矩阵。Code C is a (n,k) linear code, its generation matrix is G k×n , and its parity check matrix is H (nk)×n , meanwhile, matrix H can also be regarded as the generation of dual code C of code C matrix.

码C的所有陪集首记作v1,v2,…,虽然从每个陪集中挑选哪个向量作为陪集首都没有关系,但是若是要存储所有的陪集首,将会占用指数级的存储空间,因此为了避免存储所有的陪集首,我们将选出k个陪集首以行向量的形式作为矩阵的元素存入矩阵中,使得Hc中的行向量的线性组合能够生成一个包含码C⊥的所有陪集首的集合。Hc与H的所有行向量的线性组合能够张成整个二元域上的n维线性空间。All coset leaders of code C are denoted as v 1 ,v 2 ,…, Although it does not matter which vector is selected from each coset as the coset capital, if we want to store all the coset leaders, it will take up exponential storage space, so in order to avoid storing all the coset leaders, we will select k coset heads in the form of row vectors as a matrix The elements of are stored in the matrix , so that the linear combination of row vectors in Hc can generate a set containing all coset heads of code C⊥ . The linear combination of H c and all row vectors of H can form an n-dimensional linear space on the entire binary domain.

需要被编码的信息为i1,i2,…,is表示stuck cells的位置,a1,a2,…,as表示stuck cells的固定值,z表示stuck cells位置的指标集,从矩阵H中取出第i1,i2,…,is列组成矩阵H的(n-k)×s阶子矩阵Hz。vm=(v1,v2,…,vn)表示与信息相对应的陪集首,也就是说,vm=mHC。然后,求解下述方程求得向量 The information that needs to be encoded is i 1 , i 2 ,..., i s represent the position of stuck cells, a 1 , a 2 ,..., a s represents the fixed value of stuck cells, z represents the index set of the position of stuck cells, take the i 1 from the matrix H ,i 2 ,…,i s columns constitute the (nk)×s order sub-matrix H z of matrix H. v m =(v 1 ,v 2 ,...,v n ) represents the coset head corresponding to the information, that is, v m =mH C . Then, solve the following equation to find the vector

若方程(2.2)有解,那么解不一定唯一,则我们只需要给出向量b的一个解。最后,我们将m′=vm+bH作为存储值写入存储单元,此时,m′中第i1,i2,…,is个位置的值为a1,a2,…,as。这样,stuck cell问题就得以解决。If equation (2.2) has a solution, then the solution is not necessarily unique, so we only need to give one solution of vector b. Finally, we write m′=v m +bH as the storage value into the storage unit. At this time, the value of the i 1 , i 2 ,…,i s position in m′ is a 1 , a 2 ,…,a s . In this way, the stuck cell problem can be solved.

根据线性代数知识可知,线性方程组有解等价于它的系数矩阵与增广矩阵的秩相等。According to the knowledge of linear algebra, it can be known that a linear equation system has a solution, which is equivalent to the rank of its coefficient matrix and the augmented matrix being equal.

方程(2.2)的系数矩阵为增广矩阵为 The coefficient matrix of equation (2.2) is an augmented matrix as

因为向量可以取遍二元域上s维空间的所有向量,所以当行满秩时,方程(2.2)一定有解。because the vector All vectors in the s-dimensional space on the binary field can be taken, so when When the rank is full, equation (2.2) must have a solution.

容量达到方案中的译码算法主要的思想还是伴随式译码。假设译码器从存储器中读出了码字译码就等同于计算r关于码C的伴随式,因此,译码出来的消息就是rGTThe main idea of the decoding algorithm in the capacity-achieving scheme is adjoint decoding. Suppose the decoder reads the codeword from memory Decoding is equivalent to calculating the adjoint formula of r with respect to code C , therefore, the decoded message is rG T .

容量达到方案中编码算法中主要有两个部分,第一部分是计算vm=mHC,第二部分是解方程(2.2)求得向量b的一个解。There are two main parts in the coding algorithm in the capacity attainment scheme. The first part is to calculate v m =mH C , and the second part is to solve equation (2.2) to obtain a solution of vector b.

第一部分的计算复杂度为O(nlogn);第二部分,容量达到方案中采用了高斯消去法,因此,第二部分的计算复杂度是O(n3)。The computational complexity of the first part is O(nlogn); in the second part, the Gaussian elimination method is adopted in the capacity attainment scheme, so the computational complexity of the second part is O(n 3 ).

译码算法涉及向量乘法,可以在复杂度O(nlogn)内完成。The decoding algorithm involves vector multiplication, which can be done in complexity O(nlogn).

综上分析,整个容量达到方案的计算复杂度是O(n3)。Based on the above analysis, the computational complexity of the entire capacity attainment scheme is O(n 3 ).

容量达到方案运用陪集,给出了一套完整的编码方案,然而,O(n3)的复杂度还是太高,这使得这方案无法应用于实际,无法从实际角度真正解决stuck cell问题。The capacity-reaching scheme uses cosets to provide a complete coding scheme. However, the complexity of O(n 3 ) is still too high, which makes this scheme unable to be applied in practice, and cannot really solve the stuck cell problem from a practical point of view.

发明内容Contents of the invention

针对现有技术存在的不足和缺陷,本发明提供一种基于稀疏矩阵的编码写入方法及装置。Aiming at the deficiencies and defects of the prior art, the present invention provides a code writing method and device based on a sparse matrix.

一方面,本发明实施例提出一种基于稀疏矩阵的编码写入方法,包括:On the one hand, the embodiment of the present invention proposes a coding writing method based on a sparse matrix, including:

S1、计算与待写入的信息m相对应的陪集首vm,其中,m=(m1,m2,…,mk),m对应的(n,k)分组码为C,vm=(v1,v2,…,vn);S1. Calculate the coset leader v m corresponding to the information m to be written, where, m=(m 1 ,m 2 ,...,m k ), the (n,k) block code corresponding to m is C, v m =(v 1 ,v 2 ,...,v n );

S2、基于稀疏矩阵计算向量b,其中,i1,i2,…,is表示stuck cells的位置,a1,a2,…,as表示stuck cells的固定值,Hz为从C的校验矩阵H中取出第i1,i2,…,is列组成的(n-k)×s阶子矩阵;S2, based on sparse matrix Compute the vector b, where, i 1 , i 2 ,…,i s represent the position of stuck cells, a 1 , a 2 ,…, a s represent the fixed values of stuck cells, H z is the i 1 , i 2 ,...,i s sub-matrix composed of s columns;

S3、将m′作为存储值写入存储单元,其中,m′=vm+bH。S3. Write m' as a storage value into the storage unit, where m'=v m +bH.

优选地,所述S2,包括:Preferably, said S2 includes:

S210、从校验矩阵对应的Tanner图中选择度最小的校验节点cnkS210, from the parity check matrix The check node cn k with the smallest selectivity in the corresponding Tanner graph;

S211、给与cnk相连的一个变量节点vnt赋cnk的值ckS211. Assign the value c k of cn k to a variable node vn t connected to cn k ;

S212、判断变量节点vnt的值vt是否为1,若vt为1,则将所有与变量节点vnt相连的校验节点的值都进行翻转,即将0变为1,1变为0;S212. Determine whether the value v t of the variable node vn t is 1, if v t is 1, flip the values of all check nodes connected to the variable node vn t , that is, change 0 to 1, and 1 to 0 ;

S213、移除变量节点vnt及与之相连的所有边,并移除所述Tanner图中所有度变为0的校验节点;S213. Remove the variable node vn t and all edges connected thereto, and remove all check nodes whose degree becomes 0 in the Tanner graph;

S214、若判断获知有校验节点被移除,则检查被移除的校验节点的值是否为0,若所有被移除的校验节点的值均为0,且判断获知所述Tanner图中还有校验节点则回到步骤S210,否则,若判断获知所述Tanner图中没有校验节点则跳转至步骤S215;S214. If it is determined that a check node has been removed, check whether the value of the removed check node is 0, and if the value of all the removed check nodes is 0, and determine that the Tanner graph is known If there is still a check node in the Tanner graph, return to step S210; otherwise, if it is judged that there is no check node in the Tanner graph, then jump to step S215;

S215、获取变量节点的值,并将变量节点的值组成的向量确定为向量b。S215. Obtain the values of the variable nodes, and determine a vector composed of the values of the variable nodes as a vector b.

优选地,所述S2,包括解构部分和求解部分,其中,Preferably, said S2 includes a deconstruction part and a solution part, wherein,

所述解构部分包括:The deconstruction part includes:

S220、初始化y=m0,其中,m0为校验矩阵对应的Tanner图中校验节点的数量;S220. Initialize y=m 0 , where m 0 is the parity check matrix The number of check nodes in the corresponding Tanner graph;

S221、若判断获知所述Tanner图中有度为1的变量节点,则将与该变量节点相连的校验节点标记为y,更新y为y-1,移除该校验节点及与该校验节点相关的边,并移除度为0的变量节点;S221. If it is determined that there is a variable node with a degree of 1 in the Tanner graph, mark the check node connected to the variable node as y, update y to y-1, and remove the check node and the check node connected to the check node. Check the edges related to the nodes, and remove the variable nodes with degree 0;

S222、判断所述Tanner图中是否有度为1的变量节点,若所述Tanner图中有度为1的变量节点,则执行步骤S221,否则,则执行步骤S223;S222. Judging whether there is a variable node with a degree of 1 in the Tanner graph, if there is a variable node with a degree of 1 in the Tanner graph, then perform step S221, otherwise, perform step S223;

S223、若判断获知所述Tanner图中没有校验节点,则跳转至求解部分;S223. If it is judged that there is no check node in the Tanner graph, jump to the solution part;

所述求解部分包括:The solving part includes:

S224、对于按照标记由小到大的每一个校验节点,给与之相连的变量节点赋值,使得所述与之相连的变量节点的值的总和与该校验节点的值相等;S224. For each check node that is marked from small to large, assign a value to the variable node connected to it, so that the sum of the values of the variable nodes connected to it is equal to the value of the check node;

S225、若判断获知所述与之相连的变量节点中有值为1的变量节点,则将与所述与之相连的变量节点中值为1的变量节点相连的校验节点的值都翻转,即将0变为1,1变为0,移除所述与之相连的变量节点及与所述与之相连的变量节点相关的边,并移除所有度为0的校验节点,检查被移除的校验节点的值是否为0,如果所有校验节点的值均为0,则执行步骤S226;S225. If it is determined that there is a variable node with a value of 1 among the variable nodes connected to it, flip the values of the check nodes connected to the variable node with a value of 1 among the variable nodes connected to it, Change 0 to 1 and 1 to 0, remove the variable node connected to it and the edges related to the variable node connected to it, and remove all check nodes with a degree of 0, and check the moved Whether the value of the check node to be divided is 0, if the value of all check nodes is 0, then perform step S226;

S226、若判断获知所述Tanner图中有度为1的校验节点,则将该校验节点的值赋给与之相连的变量节点,若判断获知所述与之相连的变量节点的值为1,则将与所述与之相连的变量节点相连的所有校验节点的值翻转,即将0变为1,1变为0,移除所述与之相连的变量节点及与所述与之相连的变量节点相关的边,并移除所有度为0的校验节点,检查被移除的校验节点的值是否为0,如果所有校验节点的值均为0,则继续对图中其它度为1的校验节点进行处理直至图中没有度为1的校验节点,转S227;S226. If it is determined that there is a check node with a degree of 1 in the Tanner graph, assign the value of the check node to the variable node connected to it, and if it is determined that the value of the variable node connected to it is 1, the value of all check nodes connected to the variable node connected to it will be reversed, that is, 0 will be changed to 1, and 1 will be changed to 0, and the variable node connected to it and the variable node connected to it will be removed. The edges related to the connected variable nodes, and remove all check nodes with a degree of 0, check whether the value of the removed check node is 0, if the value of all check nodes is 0, continue to check the graph Other check nodes with a degree of 1 are processed until there is no check node with a degree of 1 in the figure, and then go to S227;

S227、获取变量节点的值,并将变量节点的值组成的向量确定为向量b。S227. Acquire the values of the variable nodes, and determine a vector composed of the values of the variable nodes as a vector b.

另一方面,本发明实施例提出一种基于稀疏矩阵的编码写入装置,包括:On the other hand, an embodiment of the present invention proposes a coding writing device based on a sparse matrix, including:

第一计算单元,用于计算与待写入的信息m相对应的陪集首vm,其中,m=(m1,m2,…,mk),m对应的(n,k)分组码为C,vm=(v1,v2,…,vn);The first calculation unit is used to calculate the coset leader v m corresponding to the information m to be written, wherein, m=(m 1 ,m 2 ,...,m k ), the (n,k) block code corresponding to m is C, v m =(v 1 ,v 2 ,...,v n );

第二计算单元,用于基于稀疏矩阵计算向量b,其中,i1,i2,…,is表示stuck cells的位置,a1,a2,…,as表示stuck cells的固定值,Hz为从C的校验矩阵H中取出第i1,i2,…,is列组成的(n-k)×s阶子矩阵;The second computing unit is used for sparse matrix based Compute the vector b, where, i 1 , i 2 ,…,i s represent the position of stuck cells, a 1 , a 2 ,…, a s represent the fixed values of stuck cells, H z is the i 1 , i 2 ,...,i s sub-matrix composed of s columns;

写入单元,用于将m′作为存储值写入存储单元,其中,m′=vm+bH。The writing unit is used for writing m' as a storage value into the storage unit, wherein, m'=v m +bH.

优选地,所述第二计算单元,具体用于执行如下步骤:Preferably, the second computing unit is specifically configured to perform the following steps:

S210、从校验矩阵对应的Tanner图中选择度最小的校验节点cnkS210, from the parity check matrix The check node cn k with the smallest selectivity in the corresponding Tanner graph;

S211、给与cnk相连的一个变量节点vnt赋cnk的值ckS211. Assign the value c k of cn k to a variable node vn t connected to cn k ;

S212、判断变量节点vnt的值vt是否为1,若vt为1,则将所有与变量节点vnt相连的校验节点的值都进行翻转,即将0变为1,1变为0;S212. Determine whether the value v t of the variable node vn t is 1, if v t is 1, flip the values of all check nodes connected to the variable node vn t , that is, change 0 to 1, and 1 to 0 ;

S213、移除变量节点vnt及与之相连的所有边,并移除所述Tanner图中所有度变为0的校验节点;S213. Remove the variable node vn t and all edges connected thereto, and remove all check nodes whose degree becomes 0 in the Tanner graph;

S214、若判断获知有校验节点被移除,则检查被移除的校验节点的值是否为0,若所有被移除的校验节点的值均为0,且判断获知所述Tanner图中还有校验节点则回到步骤S210,否则,若判断获知所述Tanner图中没有校验节点则跳转至步骤S215;S214. If it is determined that a check node has been removed, check whether the value of the removed check node is 0, and if the value of all the removed check nodes is 0, and determine that the Tanner graph is known If there is still a check node in the Tanner graph, return to step S210; otherwise, if it is judged that there is no check node in the Tanner graph, then jump to step S215;

S215、获取变量节点的值,并将变量节点的值组成的向量确定为向量b。S215. Obtain the values of the variable nodes, and determine a vector composed of the values of the variable nodes as a vector b.

优选地,所述第二计算单元,具体用于执行解构步骤和求解步骤,其中,Preferably, the second calculation unit is specifically configured to perform the deconstruction step and the solution step, wherein,

所述解构步骤包括:The deconstruction steps include:

S220、初始化y=m0,其中,m0为校验矩阵对应的Tanner图中校验节点的数量;S220. Initialize y=m 0 , where m 0 is the parity check matrix The number of check nodes in the corresponding Tanner graph;

S221、若判断获知所述Tanner图中有度为1的变量节点,则将与该变量节点相连的校验节点标记为y,更新y为y-1,移除该校验节点及与该校验节点相关的边,并移除度为0的变量节点;S221. If it is determined that there is a variable node with a degree of 1 in the Tanner graph, mark the check node connected to the variable node as y, update y to y-1, and remove the check node and the check node connected to the check node. Check the edges related to the nodes, and remove the variable nodes with degree 0;

S222、判断所述Tanner图中是否有度为1的变量节点,若所述Tanner图中有度为1的变量节点,则执行步骤S221,否则,则执行步骤S223;S222. Judging whether there is a variable node with a degree of 1 in the Tanner graph, if there is a variable node with a degree of 1 in the Tanner graph, then perform step S221, otherwise, perform step S223;

S223、若判断获知所述Tanner图中没有校验节点,则跳转至求解部分;S223. If it is judged that there is no check node in the Tanner graph, jump to the solution part;

所述求解步骤包括:The solving steps include:

S224、对于按照标记由小到大的每一个校验节点,给与之相连的变量节点赋值,使得所述与之相连的变量节点的值的总和与该校验节点的值相等;S224. For each check node that is marked from small to large, assign a value to the variable node connected to it, so that the sum of the values of the variable nodes connected to it is equal to the value of the check node;

S225、若判断获知所述与之相连的变量节点中有值为1的变量节点,则将与所述与之相连的变量节点中值为1的变量节点相连的校验节点的值都翻转,即将0变为1,1变为0,移除所述与之相连的变量节点及与所述与之相连的变量节点相关的边,并移除所有度为0的校验节点,检查被移除的校验节点的值是否为0,如果所有校验节点的值均为0,则执行步骤S226;S225. If it is determined that there is a variable node with a value of 1 among the variable nodes connected to it, flip the values of the check nodes connected to the variable node with a value of 1 among the variable nodes connected to it, Change 0 to 1 and 1 to 0, remove the variable node connected to it and the edges related to the variable node connected to it, and remove all check nodes with a degree of 0, and check the moved Whether the value of the check node to be divided is 0, if the value of all check nodes is 0, then perform step S226;

S226、若判断获知所述Tanner图中有度为1的校验节点,则将该校验节点的值赋给与之相连的变量节点,若判断获知所述与之相连的变量节点的值为1,则将与所述与之相连的变量节点相连的所有校验节点的值翻转,即将0变为1,1变为0,移除所述与之相连的变量节点及与所述与之相连的变量节点相关的边,并移除所有度为0的校验节点,检查被移除的校验节点的值是否为0,如果所有校验节点的值均为0,则继续对图中其它度为1的校验节点进行处理直至图中没有度为1的校验节点,转S227;S226. If it is determined that there is a check node with a degree of 1 in the Tanner graph, assign the value of the check node to the variable node connected to it, and if it is determined that the value of the variable node connected to it is 1, the value of all check nodes connected to the variable node connected to it will be reversed, that is, 0 will be changed to 1, and 1 will be changed to 0, and the variable node connected to it and the variable node connected to it will be removed. The edges related to the connected variable nodes, and remove all check nodes with a degree of 0, check whether the value of the removed check node is 0, if the value of all check nodes is 0, continue to check the graph Other check nodes with a degree of 1 are processed until there is no check node with a degree of 1 in the figure, and then go to S227;

S227、获取变量节点的值,并将变量节点的值组成的向量确定为向量b。S227. Acquire the values of the variable nodes, and determine a vector composed of the values of the variable nodes as a vector b.

本发明具有如下有益效果:The present invention has following beneficial effect:

从容量达到方案的第二部分着手,利用稀疏矩阵的稀疏性,只关注校验节点与变量节点之间的邻接关系,从而能够达到对节点的操作,降低算法的计算复杂度。Starting from the second part of the capacity attainment scheme, using the sparsity of the sparse matrix, only focusing on the adjacency relationship between the check node and the variable node, so as to achieve the operation of the node and reduce the computational complexity of the algorithm.

附图说明Description of drawings

图1为本发明行重为2,列重为4的(10,5)线性分组码的Tanner图;Fig. 1 is that row weight of the present invention is 2, and column weight is the Tanner diagram of (10,5) linear block code of 4;

图2为本发明基于稀疏矩阵的编码写入方法一实施例的流程示意图;Fig. 2 is a schematic flow chart of an embodiment of the encoding writing method based on a sparse matrix in the present invention;

图3为一具体Tanner图的示意图;Fig. 3 is a schematic diagram of a specific Tanner diagram;

图4为另一具体Tanner图的示意图;Fig. 4 is a schematic diagram of another specific Tanner diagram;

图5为图2中S2一实施例解构过程产生的图;Fig. 5 is the figure that S2 one embodiment deconstruction process produces in Fig. 2;

图6为校验节点最小算法和高斯消去法的C1码的性能比较曲线示意图;Fig. 6 is a schematic diagram of the performance comparison curve of the C1 code of the check node minimum algorithm and the Gaussian elimination method;

图7为校验节点最小算法和高斯消去法的C2码的性能比较曲线示意图;Fig. 7 is a schematic diagram of the performance comparison curve of the C2 code of the check node minimum algorithm and the Gaussian elimination method;

图8为基于C2码、C3码和C4码的校验节点最小算法、graph division算法和高斯消去法三种算法的C2码的性能比较曲线示意图;Figure 8 is a schematic diagram of the performance comparison curves of the C2 code based on the three algorithms of the check node minimum algorithm, the graph division algorithm, and the Gaussian elimination method based on the C2 code, the C3 code, and the C4 code;

图9为基于C2码、C3码和C4码的校验节点最小算法、graph division算法和高斯消去法三种算法的C3码的性能比较曲线示意图;Figure 9 is a schematic diagram of the performance comparison curves of the C3 code based on the three algorithms of the minimum check node algorithm, the graph division algorithm and the Gaussian elimination method based on the C2 code, the C3 code and the C4 code;

图10为校验节点最小算法、graph division算法和高斯消去法三种算法的C4码的性能比较曲线示意图;Figure 10 is a schematic diagram of the performance comparison curves of the C4 codes of the three algorithms of the check node minimum algorithm, the graph division algorithm, and the Gaussian elimination method;

图11为本发明基于稀疏矩阵的编码写入装置一实施例的结构示意图。FIG. 11 is a schematic structural diagram of an embodiment of a sparse matrix-based code writing device according to the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are the Some, but not all, embodiments are invented. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

稀疏矩阵是指矩阵中数值为0的元素的数量远多于非零元素的数量的矩阵。本文所有的研究都是在二元域上,即GF(2),所以本文中稀疏矩阵中的非零元素为1。本文基于稀疏矩阵,而低密度奇偶校验码(Low Density Parity Check Code,LDPC)的校验矩阵是稀疏的,我们仿真时也会利用LDPC码。而LDPC码是线性分组码中的一种,所以,我们接下来将会先对线性分组码进行介绍。A sparse matrix is a matrix in which the number of elements with a value of 0 is much greater than the number of non-zero elements. All the research in this paper is on the binary field, that is, GF(2), so the non-zero elements in the sparse matrix in this paper are 1. This article is based on a sparse matrix, and the check matrix of the Low Density Parity Check Code (LDPC) is sparse, and we will also use the LDPC code in the simulation. The LDPC code is one of the linear block codes, so we will first introduce the linear block codes next.

信源的输出是一串由二进制数值0和1组成的序列,将这样的一串二进制数据按照固定的长度k进行分组,每个消息分组记为u,固定长度k即代表k个信息位。由排列组合我们可知,共可有2k种不同的消息。然后对u做一个映射转化成二元域上的n维向量v,其中n>k,由此我们就可以得到一个(n,k)分组码,而v就称为u的码向量或者码字。可以看出,这2k种不同的消息对应于2k种码字,因此,这2k个码字的集合构成了分组码的码字空间,只有当码字v和消息u存在着一一对应的关系,该分组码才可用,否则若是有多条消息对应于同一个码字,那么由这个码字则无法译回准确的消息。所以,此时这2k个码字必定各不相同。The output of the source is a sequence consisting of binary values 0 and 1. Such a string of binary data is grouped according to a fixed length k, and each message group is marked as u, and the fixed length k represents k information bits. From the permutations and combinations, we know that there are 2k different messages in total. Then do a mapping to u and convert it into an n-dimensional vector v on the binary domain, where n>k, so we can get a (n,k) block code, and v is called the code vector or code word of u . It can be seen that these 2 k different messages correspond to 2 k code words, therefore, the set of these 2 k code words constitutes the code word space of the block code, only when the code word v and the message u exist one by one Corresponding relationship, the block code is available, otherwise if multiple messages correspond to the same code word, then the code word cannot be translated back to the exact message. Therefore, the 2k codewords must be different at this time.

对于一个(n,k)分组码,当其具有线性特征时,码字空间封闭,可以选取其一组基,这样则不需要在编码器中储存所有的长度为n的码字,这可大大降低存储空间及编码复杂度,因此线性码的结构是一种理想的结构。For a (n,k) block code, when it has linear features, the codeword space is closed, and a set of bases can be selected, so that there is no need to store all codewords of length n in the encoder, which can be greatly improved Reduce storage space and coding complexity, so the structure of linear code is an ideal structure.

一个(n,k)分组码,当且仅当其2k个码字构成二元域上的n维向量空间的一个k维子空间时,这个分组码是一个(n,k)线性分组码。A (n,k) block code is a (n,k) linear block code if and only if its 2 k codewords form a k-dimensional subspace of an n-dimensional vector space over a binary field .

因为线性码是一个向量空间,所以我们可以用它的一组基来描述它。将线性码的一组基以行向量的形式组成一个矩阵,则这个矩阵可以称为线性码的生成矩阵。若码C是二元域上的n维向量空间Vn的一个k维子空间,设g1,g2,…,gk为C中的一组线性无关向量,则码C中的每个码字v都是这组线性无关向量的线性组合,即v=l1g1+l2g2+…+lkgk,因此,定义矩阵G=[g1g2…gk]T为线性码C的生成矩阵,满足v=uG。Because a linear code is a vector space, we can describe it in terms of its set of basis. A set of bases of the linear code is formed into a matrix in the form of row vectors, and this matrix can be called the generator matrix of the linear code. If the code C is a k-dimensional subspace of the n-dimensional vector space V n on the binary domain, let g 1 , g 2 ,…,g k be a group of linearly independent vectors in C, then each The code word v is a linear combination of this group of linearly independent vectors, that is, v=l 1 g 1 +l 2 g 2 +…+l k g k , therefore, the definition matrix G=[g 1 g 2 …g k ] T is the generator matrix of the linear code C, satisfying v=uG.

对于一个线性分组码,它的码字一般分成消息和冗余校验两个部分,这也码字即具有系统结构。其中k位为消息部分,由原始的信息位构成,而其余的n-k位则为冗余校验部分,是奇偶校验位,亦是信息位的线性和。因此,对于每个线性分组码来说,与之相关的矩阵除了生成矩阵还有另一个,那就是该线性码的奇偶校验矩阵,用矩阵H表示,它满足vHT=0。For a linear block code, its code word is generally divided into two parts: message and redundancy check, and this code word also has a systematic structure. Among them, the k bit is the message part, which is composed of the original information bits, and the remaining nk bits are the redundancy check part, which is the parity bit and also the linear sum of the information bits. Therefore, for each linear block code, there is another matrix related to it besides the generator matrix, that is, the parity check matrix of the linear code, represented by matrix H, which satisfies vH T =0.

设x=x1x2…xn∈V(n,2),y=y1y2…yn∈V(n,2),V(n,2)表示二元域上的n维向量空间,则Let x=x 1 x 2 ... x n ∈ V(n,2), y = y 1 y 2 ... y n ∈ V(n,2), V(n,2) represents an n-dimensional vector on a binary field space, then

x·y=x1y1+x2y2+…+xnyn (2.1)x y=x 1 y 1 +x 2 y 2 +…+x n y n (2.1)

称为x和y的内积,有时也记作<x,y>。Called the inner product of x and y, sometimes also denoted <x, y>.

如果C是一个二元(n,k)线性码,则称为其对偶码。If C is a binary (n,k) linear code, then it is called as its dual code.

对偶码的性质:Properties of dual codes:

设C是一个二元(n,k)线性码,Let C be a binary (n,k) linear code,

性质1若线性码C的生成矩阵是G,则C={x∈V(n,2)|xGT=0};Property 1 If the generator matrix of the linear code C is G, then C ={x∈V(n,2)|xG T =0};

性质2C的对偶码C是一个二元(n,k)线性码;The dual code C of property 2C is a binary (n,k) linear code;

性质3C的生成矩阵H是线性码C的校验矩阵。Property 3C The generator matrix H is the parity check matrix of the linear code C.

设C是一个二元(n,k)线性码,其校验矩阵为H,对任意定义x的伴随式为xHTSuppose C is a binary (n, k) linear code, its parity check matrix is H, for any Define the syndrome of x as xH T .

伴随式译码的过程可以描述为:假设在信道接收端收到码字x,则计算它的伴随式xHT,并找到与之具有相同伴随式的陪集首ai,那么x可被译为c=x-aiThe process of syndrome decoding can be described as: suppose the codeword x is received at the receiving end of the channel, then calculate its syndrome xH T , and find the coset leader a i with the same syndrome, then x can be decoded is c=xa i .

一个非常稀疏的校验矩阵可以唯一刻画一个对应的LDPC码,而校验矩阵对描述和体现LDPC码的性质有着非常重要的作用。而根据校验矩阵可以画出相应的LDPC码的Tanner图,与校验矩阵一样,Tanner图也是一种LDPC码的基本而重要的表示方式。这两种表示方式对本文算法的研究、提出和分析有着很重要的作用,所以,下面我们将会对这两种表示方式依次进行介绍。A very sparse check matrix can uniquely describe a corresponding LDPC code, and the check matrix plays a very important role in describing and reflecting the properties of LDPC codes. According to the check matrix, the Tanner diagram of the corresponding LDPC code can be drawn. Like the check matrix, the Tanner diagram is also a basic and important representation of the LDPC code. These two representations play a very important role in the research, proposal and analysis of the algorithm in this paper. Therefore, we will introduce these two representations in turn below.

长度为n的二进制LDPC码可由二元域上的稀疏奇偶校验矩阵H(m×n阶矩阵)定义,校验矩阵H具有如下性质:A binary LDPC code with a length of n can be defined by a sparse parity check matrix H (m×n order matrix) on a binary field. The check matrix H has the following properties:

(1)每一列具有γ个1(列重为γ),γ<<m;(1) Each column has γ 1s (the column weight is γ), γ<<m;

(2)每一行具有ρ个1(行重为ρ),ρ<<n;(2) Each row has ρ 1s (row weight is ρ), ρ<<n;

(3)任意两列之间在相同位置的1的个数(以λ表示)不多于1,也就是说λ=0或者λ=1。(3) The number of 1s (indicated by λ) at the same position between any two columns is not more than 1, that is to say, λ=0 or λ=1.

满足上述性质的校验矩阵定义的码即为二进制规则LDPC码。LDPC码的维数可以由校验矩阵的秩确定,当校验矩阵满秩时,LDPC码的维数为n-m,其码率为 The code defined by the parity check matrix that satisfies the above properties is the binary regular LDPC code. The dimension of the LDPC code can be determined by the rank of the check matrix. When the rank of the check matrix is full, the dimension of the LDPC code is nm, and its code rate is

若稀疏的校验矩阵满足性质(3),但它的行重或列重不是常数时,则为二进制非规则LDPC码。If the sparse parity check matrix satisfies the property (3), but its row weight or column weight is not constant, it is a binary irregular LDPC code.

Tanner图是Tanner为了有效地表示LDPC码而引入的一种图表示方法。虽然Tanner图的本质是一种二分图,但是用在LDPC码中,我们一般还是称它为Tanner图。Tanner graph is a graph representation method introduced by Tanner to effectively represent LDPC codes. Although the essence of the Tanner graph is a bipartite graph, we generally call it a Tanner graph when used in LDPC codes.

Tanner图由两种节点及连接不同种类节点的边组成,这两类节点分别是校验节点和变量节点,分别记作CNs和VNs。Tanner图有m个校验节点,分别与校验矩阵的m行对应;Tanner图有n个变量节点,分别与校验矩阵的n列对应。Tanner图的绘制规则:当校验矩阵H中的元素hji的值为1,则第j校验节点与第i个变量节点相连。因此,校验矩阵中的第i列对应于第i个变量节点与所有校验节点的连接关系,而校验矩阵中的第j行对应于第j个校验节点与所有变量节点的连接关系。由Tanner图的绘制规则可知,图中的边数与校验矩阵中的1的数量相等。The Tanner graph consists of two types of nodes and edges connecting different types of nodes. These two types of nodes are check nodes and variable nodes, which are respectively denoted as CNs and VNs. The Tanner graph has m check nodes, corresponding to the m rows of the check matrix; the Tanner graph has n variable nodes, respectively corresponding to the n columns of the check matrix. The drawing rules of the Tanner graph: when the value of the element h ji in the check matrix H is 1, the jth check node is connected to the i-th variable node. Therefore, the i-th column in the check matrix corresponds to the connection relationship between the i-th variable node and all check nodes, and the j-th row in the check matrix corresponds to the connection relationship between the j-th check node and all variable nodes . According to the drawing rules of the Tanner graph, the number of edges in the graph is equal to the number of 1s in the check matrix.

在Tanner图中,给定两个节点u和v,从u出发经过一串交互的边和节点最后回到v的序列被称作路径。若是路径的起点与终点相同,即u和v是同一点,则称这个路径为环。In the Tanner graph, given two nodes u and v, the sequence starting from u through a series of interacting edges and nodes and returning to v is called a path. If the starting point and the ending point of the path are the same, that is, u and v are the same point, the path is called a cycle.

为了便于理解,下面将会给出一个具体的例子进行说明:For ease of understanding, a specific example will be given below:

例2.1对于一个(10,5)线性分组码,其行重为2,列重为4,对应的校验矩阵H如下:Example 2.1 For a (10,5) linear block code with a row weight of 2 and a column weight of 4, the corresponding check matrix H is as follows:

则与此校验矩阵相对应的Tanner图如图1所示。Then the Tanner diagram corresponding to the parity check matrix is shown in FIG. 1 .

存储器中某些存储单元的存储值是一个固定值,它的状态不会改变,独立于写入值,即它的存储值不会随着写入值的改变而改变,具备这样性质的存储单元就是有缺陷的存储单元。例如,一个存储单元的值被固定为0,那么当想要向这个存储单元写入1时就会发生错误。The storage value of some storage units in the memory is a fixed value, and its state will not change, independent of the written value, that is, its storage value will not change with the change of the written value. Storage units with such properties It is a defective memory cell. For example, if the value of a memory cell is fixed at 0, an error will occur when attempting to write a 1 to this memory cell.

在经过仔细地测试存储器后,可以得到缺陷的信息,如缺陷的位置及固定值。因此,在研究过程中,研究者们一般假设stuck cells的位置和固定值在编码写入的过程中是已知的,而在译码读取的过程中是未知的。本文的研究也将基于这一假设。After carefully testing the memory, you can get defect information, such as the location and fixed value of the defect. Therefore, during the research process, researchers generally assume that the position and fixed value of stuck cells are known during the encoding and writing process, but unknown during the decoding and reading process. This research will also be based on this assumption.

参看图2,本实施例公开一种基于稀疏矩阵的编码写入方法,包括:Referring to Fig. 2, the present embodiment discloses a coding writing method based on a sparse matrix, including:

S1、计算与待写入的信息m相对应的陪集首vm,其中,m=(m1,m2,…,mk),m对应的(n,k)分组码为C,vm=(v1,v2,…,vn);S1. Calculate the coset leader v m corresponding to the information m to be written, where, m=(m 1 ,m 2 ,...,m k ), the (n,k) block code corresponding to m is C, v m =(v 1 ,v 2 ,...,v n );

S2、基于稀疏矩阵计算向量b,其中,i1,i2,…,is表示stuck cells的位置,a1,a2,…,as表示stuck cells的固定值,Hz为从C的校验矩阵H中取出第i1,i2,…,is列组成的(n-k)×s阶子矩阵;S2, based on sparse matrix Compute the vector b, where, i 1 , i 2 ,…,i s represent the position of stuck cells, a 1 , a 2 ,…, a s represent the fixed values of stuck cells, H z is the i 1 , i 2 ,...,i s sub-matrix composed of s columns;

S3、将m′作为存储值写入存储单元,其中,m′=vm+bH。S3. Write m' as a storage value into the storage unit, where m'=v m +bH.

本发明采用稀疏矩阵实现容量达到方案并对容量达到方案进行改进。容量达到方案无法应用于实际,无法从实际角度真正解决stuck cell问题。若要降低整个方案的复杂度,那么必定要从方案的第二部分着手。The invention adopts the sparse matrix to realize the capacity attainment scheme and improves the capacity attainment scheme. The capacity attainment solution cannot be applied in practice, and cannot really solve the stuck cell problem from a practical point of view. If you want to reduce the complexity of the whole program, you must start with the second part of the program.

本发明主要着力于提出新的算法解决容量达到方案中的第二部分。运用高斯消去法解方程(2.2)已经达到了得到正确解的极限了,所以,设计新的算法从提高得到正确解的概率上没有任何可供进步的空间。那么,设计新的算法必定要将重点放在降低算法的计算复杂度上,同时,尽管新的算法能给出一个正确解的概率无法超越高斯消去法,但是也要努力缩小二者之间的差距。因此,设计新算法的目标是降低算法的计算复杂度并且提高得到正确解的概率,努力使之靠近高斯消去法。The present invention mainly focuses on proposing a new algorithm to solve the second part in the capacity attainment scheme. Using the Gaussian elimination method to solve equation (2.2) has reached the limit of obtaining the correct solution, so there is no room for improvement in designing a new algorithm to improve the probability of obtaining the correct solution. Then, the design of a new algorithm must focus on reducing the computational complexity of the algorithm. At the same time, although the probability that the new algorithm can give a correct solution cannot exceed the Gaussian elimination method, efforts must be made to narrow the gap between the two. gap. Therefore, the goal of designing a new algorithm is to reduce the computational complexity of the algorithm and increase the probability of getting the correct solution, trying to make it close to the Gaussian elimination method.

本发明将从图的角度来分析校验矩阵的特点并设计新的算法解方程(2.2)。为了符合编码的一贯叙述习惯,我们将对方程做一个调整,转换成The present invention will analyze the characteristics of the parity check matrix from the perspective of graphs and design a new algorithm to solve equation (2.2). In order to conform to the consistent narrative habit of coding, we will make an adjustment to the equation and convert it into

make

接下来的描述都是基于Ht为一个校验矩阵,向量c可看作一组校验节点的值。The following descriptions are based on the fact that H t is a check matrix, and the vector c can be regarded as a set of check node values.

为了下文叙述的方便,接下来我将会给出部分符号的说明:For the convenience of the following description, I will give a description of some symbols:

表3.1符号说明Table 3.1 Symbol description

由校验矩阵Ht可画出相对应的Tanner图,则给出方程(2.2)的一个解的问题即可转化成给定一组校验节点的值,求出一组符合条件的变量节点的值,符合的条件为:与任意校验节点相连的变量节点的值的和等于此校验节点的值,即对于任意校验节点cni,1≤i≤m0,i∈N,设cni的度为k且与cni相连的变量节点为那么可能会有多组v1,v2,…,的值满足条件,但我们只需要给出一组即可。The corresponding Tanner diagram can be drawn from the check matrix H t , then the problem of giving a solution to equation (2.2) can be transformed into a given set of check node values, and a set of variable nodes that meet the conditions can be obtained The value of , the condition to be met is: the sum of the values of the variable nodes connected to any check node is equal to the value of this check node, that is, for any check node cn i , 1≤i≤m 0 , i∈N, set The degree of cn i is k and the variable nodes connected to cn i are So There may be multiple sets of v 1 , v 2 ,…, The value of satisfies the condition, but we only need to give a set.

因为普通矩阵都具有的性质,稀疏矩阵必定也具备,所以为了说明的便利,本文举的例子中用的矩阵都不会很大,并且矩阵不一定满足稀疏的性质。下面给出一个具体的例子。Because ordinary matrices have the same properties, sparse matrices must also have them, so for the convenience of explanation, the matrices used in the examples given in this article are not very large, and the matrices do not necessarily satisfy the sparse properties. A specific example is given below.

例3.1求b的一组解。Example 3.1 Find a set of solutions for b.

由校验矩阵Ht,我们可以画出相应的Tanner图(如图3所示)。 From the parity check matrix H t , we can draw the corresponding Tanner graph (as shown in FIG. 3 ).

求b的一组解,即求满足v1+v2+v3=c1,v3=c2的一组v1,v2,v3的值。Find a set of solutions of b, that is, find a set of values of v 1 , v 2 , and v 3 that satisfy v 1 +v 2 +v 3 =c 1 , v 3 =c 2 .

基于图的算法不会去对具体的每一个方程式做线性组合,他不会改变原始的校验节点与变量节点的邻接关系。从图的角度解方程(2.2),本质上是给出一种规则,这个规则会指明处理校验节点的顺序。处理校验节点是指给出与之相连的变量节点的值。The graph-based algorithm will not perform a linear combination of each specific equation, and it will not change the adjacency relationship between the original check node and the variable node. Solving equation (2.2) from the perspective of the graph essentially gives a rule that specifies the order in which check nodes are processed. To process a check node is to give the value of the variable node connected to it.

若图中有度为1的校验节点,则必定先处理此校验节点,因为与之相连的变量节点只有一个,那么与之相连的变量节点的值必定要跟此校验节点的值相等才能满足此校验节点。在方程组中也是同样的。因此,无论如何设计规则给定处理校验节点的顺序,必定优先考虑度为1的校验节点。If there is a check node with a degree of 1 in the graph, the check node must be processed first, because there is only one variable node connected to it, and the value of the variable node connected to it must be equal to the value of the check node To satisfy this check node. The same is true in the equation system. Therefore, no matter how the order of processing check nodes is given by the design rules, check nodes with a degree of 1 must be given priority.

本节基于校验节点的度的特点,提出了校验节点最小算法。In this section, based on the characteristics of the degree of check nodes, a minimum algorithm for check nodes is proposed.

表3.2校验节点最小算法规则Table 3.2 Check node minimum algorithm rules

由上述规则描述可以看出,在校验节点最小算法中我们按照校验节点的度的大小确定处理校验节点的优先级,度越小优先级越高。在校验节点最小算法中我们对度相同的校验节点不作区分,同样,具体到某一校验节点时,我们对与其相连的变量节点也不作区分。It can be seen from the description of the above rules that in the check node minimum algorithm, we determine the priority of processing check nodes according to the degree of the check nodes. The smaller the degree, the higher the priority. In the check node minimum algorithm, we do not distinguish between check nodes with the same degree, and similarly, when it comes to a specific check node, we do not distinguish the variable nodes connected to it.

前面给出的校验节点最小算法描述是直接对图进行了操作,事实上,我们编程实现的时候可以不用用到图的结构,只需借助变量节点和校验节点的邻接关系即可,也不会做节点和边的移除工作,但是会标记。因为每一轮操作中只会处理一个变量节点,即给出一个变量节点的值;给出一个变量节点的值后,会更新与这个变量节点相连的校验节点的值以及他们的度,而与变量节点相连的校验节点的数量为变量节点的度,我们记作ωv。所以,每一轮做了2ωv次加法运算。我们设最初的图中变量节点最大的度为dv,因为一共有n0个变量节点,所以校验节点最小算法最多会进行2n0dv次加法运算,无乘法操作。整个算法中无乘法运算,又dv<<m0,所以渐近分析,校验节点最小算法的计算复杂度为O(n)。The description of the minimum algorithm for check nodes given above is to directly operate on the graph. In fact, we don’t need to use the structure of the graph when we program. We only need to use the adjacency relationship between variable nodes and check nodes. Will not do node and edge removal, but will mark. Because only one variable node will be processed in each round of operation, that is, the value of a variable node is given; after the value of a variable node is given, the values of the check nodes connected to this variable node and their degrees will be updated, and The number of check nodes connected to variable nodes is the degree of variable nodes, which we denote as ω v . So, each round does 2ω v additions. We set the maximum degree of variable nodes in the original graph as d v , because there are n 0 variable nodes in total, so the minimum algorithm for check nodes will perform at most 2n 0 d v addition operations without multiplication operations. There is no multiplication operation in the whole algorithm, and d v << m 0 , so asymptotically, the computational complexity of the minimum algorithm for check nodes is O(n).

校验节点最小算法的计算复杂度要远低于高斯消去法,但是它给出一组正确解的概率不可避免地会有损失,这一小节,我将会给出校验节点最小算法的效果分析。The computational complexity of the check node minimum algorithm is much lower than the Gaussian elimination method, but it will inevitably lose the probability of giving a set of correct solutions. In this section, I will give the effect of the check node minimum algorithm analyze.

前面给出的校验节点最小算法规则可以在矩阵上有对应的操作。对应的矩阵变化为:The check node minimum algorithm rules given above can have corresponding operations on the matrix. The corresponding matrix changes to:

(1)变量节点被赋值,校验节点的值翻转,对矩阵来说没有任何变化;(1) The variable node is assigned a value, the value of the check node is flipped, and there is no change to the matrix;

(2)移除变量节点vnt及与之相连的所有边,即将移除的变量节点在矩阵中相对应的列删去;(2) Remove the variable node vn t and all edges connected to it, and delete the corresponding column of the removed variable node in the matrix;

(3)移除图中所有度变为0的校验节点,即将矩阵中相对应的行删去。(3) Remove all check nodes whose degrees become 0 in the graph, that is, delete the corresponding rows in the matrix.

定理3.1当图中无环时,校验节点最小算法与高斯消去法效果等同。效果等同是指若是高斯消去法可以给出一组正确的解,则校验节点最小算法同样也可以给出一组正确的解。当然两种算法给出的解不一定相等。Theorem 3.1 When there is no cycle in the graph, the check node minimum algorithm is equivalent to the Gaussian elimination method. The equivalent effect means that if the Gaussian elimination method can give a set of correct solutions, then the check node minimum algorithm can also give a set of correct solutions. Of course, the solutions given by the two algorithms are not necessarily equal.

证明:1.先处理度为1的校验节点(若图中一开始就没有度为1的校验节点,则其处理的过程的情况等同于一开始有度为1的校验节点的图,在解到图中没有度为1的校验节点之后的情况)。此步骤效果等同于解方程组,方程组能解的校验节点最小算法同样能解。Proof: 1. Process check nodes with degree 1 first (if there is no check node with degree 1 in the graph at the beginning, the processing process is the same as a graph with check nodes with degree 1 at the beginning , after solving the problem that there is no check node with degree 1 in the graph). The effect of this step is equivalent to solving a system of equations, and the minimum algorithm of check nodes that can be solved by a system of equations can also be solved.

2.图中没有度为1的校验节点。当图中的校验节点的度均大于2,则解完一个校验节点不会出现度为1的校验节点,更不会出现k(k≥2)个度为1的校验节点与同一个变量节点相连的情况(为了分析方便,下面都取k=2),所以我们不用考虑图中校验节点的度均大于2的情况。2. There is no check node with degree 1 in the graph. When the degrees of the check nodes in the graph are all greater than 2, after solving a check node, there will be no check nodes with a degree of 1, let alone k (k≥2) check nodes with a degree of 1 and The situation that the same variable node is connected (for the convenience of analysis, k=2 is taken below), so we don’t need to consider the situation that the degree of the verification nodes in the figure is greater than 2.

a)(1个度为2→2个度为1的情况)处理完一个度为2的校验节点后出现两个度为1的校验节点与同一个变量节点相连的情况,则在处理这个度为2的校验节点之前这三个校验节点的矩阵情况一定是a) (1 case of degree 2→2 cases of degree 1) After processing a check node with degree 2, two check nodes with degree 1 are connected to the same variable node, then in the processing The matrix of the three check nodes before the check node with degree 2 must be

中间的零向量已经省去,行列可交换。显然此图有环,在我们的题设下,这种情况不会出现。The zero vector in the middle has been omitted, and the rows and columns can be exchanged. Obviously this graph has a ring, and under our problem setting, this situation will not occur.

b)(1个度为2→1个度为1→2个度为1的情况)处理完一个度为2的校验节点后出现两个度为1的校验节点,这两个校验节点没有与同一个变量节点相连,然后任意处理其中一个度为1的校验节点后出现两个度为1的校验节点与同一个变量节点相连的情况,则在处理这个度为2的校验节点之前这四个校验节点的矩阵情况一定是b) (1 degree is 2 → 1 degree is 1 → 2 degrees are 1) After processing a check node with a degree of 2, two check nodes with a degree of 1 appear. The node is not connected to the same variable node, and then one of the check nodes with degree 1 is arbitrarily processed, and two check nodes with degree 1 are connected to the same variable node, then the check node with degree 2 is processed. The matrix of these four check nodes before the check node must be

or

中间的零向量已经省去,行列可交换。显然此图有环,在我们的题设下,这种情况不会出现。The zero vector in the middle has been omitted, and the rows and columns can be exchanged. Obviously this graph has a ring, and under our problem setting, this situation will not occur.

其余情况无非是在a和b的情况链中加入一些过程,但本质没变。因此,当图中没有度为1的校验节点时,校验节点最小算法一定可以给出一组正确的解。The rest of the cases are nothing more than adding some processes in the chain of cases a and b, but the essence remains the same. Therefore, when there is no check node with a degree of 1 in the graph, the minimum check node algorithm can definitely give a set of correct solutions.

综上,当校验矩阵生成的Tanner图无环时,校验节点最小算法与高斯消去法效果相同。In summary, when the Tanner graph generated by the check matrix is acyclic, the check node minimum algorithm has the same effect as the Gaussian elimination method.

虽然校验节点最小算法在Tanner图无环时,效果等同于高斯消去法,但是当Tanner图有环时,校验节点最小算法就无能为力了。因为对于度相同的校验节点,校验节点最小算法是不作区分的,也就是说,对于有相同度的校验节点,到底先处理谁,校验节点最小算法是没有规定的,但是事实上,处理相同度的校验节点的顺序对能否得到一组正确的解是很有影响的。下面我们举个例子说明。Although the check node minimum algorithm is equivalent to the Gaussian elimination method when the Tanner graph has no loops, but when the Tanner graph has loops, the check node minimum algorithm is powerless. Because for check nodes with the same degree, the check node minimum algorithm does not distinguish, that is to say, for check nodes with the same degree, who should be processed first, the check node minimum algorithm is not specified, but in fact , the order of processing check nodes with the same degree has a great influence on whether a set of correct solutions can be obtained. Below we give an example to illustrate.

例3.2矩阵的Tanner图如图4所示。Example 3.2 The Tanner diagram of the matrix is shown in Figure 4.

从Tanner图中我们可以发现(cn1,vn1,cn2,vn2)和(cn3,vn4,cn4,vn5)分别成环。From the Tanner diagram, we can find that (cn 1 ,vn 1 ,cn 2 ,vn 2 ) and (cn 3 ,vn 4 ,cn 4 ,vn 5 ) form rings respectively.

cn1和cn4的度同为2,为图中校验节点中度最小的,此时,在校验节点最小算法中,先处理cn1或cn4是没有分别的,然而处理它们的顺序对能否得到正确的解有决定性影响。The degrees of cn 1 and cn 4 are both 2, which is the smallest check node in the graph. At this time, in the check node minimum algorithm, there is no difference in processing cn 1 or cn 4 first, but the order of processing them It has a decisive influence on whether the correct solution can be obtained.

若先处理cn1,按照校验节点最小算法,可以给定v1=1,v2=0;If cn 1 is processed first, according to the check node minimum algorithm, v 1 =1, v 2 =0 can be given;

然后cn2的度变为1,可以给定v3=1;Then the degree of cn 2 becomes 1, and v 3 =1 can be given;

剩下cn3和cn4的都相同,然而,若v4,v5要满足c3,则v4 +v5=1;The rest of cn 3 and cn 4 are the same, however, if v 4 and v 5 must satisfy c 3 , then v 4 + v 5 =1;

又若v4,v5要满足c4,则v4+v5=0,这显然矛盾,所以得不到一组正确的解。当然,若一开始v1和v2的值翻转,则可以得到一组正确的解,但是校验节点最小算法并不能保证按照这种想法给v1和v2赋值,所以,先处理cn1不一定可以得到一组正确的解。And if v 4 and v 5 must satisfy c 4 , then v 4 +v 5 =0, which is obviously contradictory, so a set of correct solutions cannot be obtained. Of course, if the values of v 1 and v 2 are reversed at the beginning, a correct set of solutions can be obtained, but the minimum check node algorithm cannot guarantee that v 1 and v 2 are assigned values according to this idea, so cn 1 is processed first A correct set of solutions may not necessarily be obtained.

若先处理cn4,则给定v4=0,v5=0;If cn 4 is processed first, it is given that v 4 =0, v 5 =0;

然后cn3的度变为1,则给定v2=1;Then the degree of cn 3 becomes 1, then given v 2 =1;

cn1的度变为1,给定v1=0;The degree of cn 1 becomes 1, given v 1 =0;

最后给定v3=1。Finally v 3 =1 is given.

即使最初给定v4=1,v5=1,我们最后依旧可以得到一组正确的解,也就是说,先处理cn4,我们一定可以得到一组正确的解。Even if v 4 =1 and v 5 =1 are given initially, we can still get a set of correct solutions in the end, that is, we can definitely get a set of correct solutions by processing cn 4 first.

这个例子中的环的结构还是很简单的,实际应用中图中的环远比这个要复杂,因此,解决环的问题至关重要。The structure of the ring in this example is still very simple, but the ring in the actual application is far more complicated than this, so it is very important to solve the problem of the ring.

graph division算法基于变量节点的度的特点,设定一定规则将图一点点解构,解构的过程中,部分环就被打开了。The graph division algorithm is based on the characteristics of the degree of variable nodes, and sets certain rules to deconstruct the graph bit by bit. During the process of deconstruction, some rings are opened.

graph division算法主要分为两部分,第一部分是对图的解构,并给出一组处理校验节点的顺序;第二部分是根据第一部分给出的处理校验节点的顺序并结合其余规则求解变量节点的值。The graph division algorithm is mainly divided into two parts. The first part is to deconstruct the graph and give a set of order for processing check nodes; the second part is to solve the problem according to the order of processing check nodes given in the first part and combine the rest of the rules. The value of the variable node.

表3.3graph division算法规则Table 3.3 graph division algorithm rules

下面为将会给出一个具体的例子来解释graph division算法。为了便于体现graph division算法对于环的部分效用并且与校验节点最小算法的差异,下例将会沿用例3.2。The following will give a specific example to explain the graph division algorithm. In order to easily reflect the partial effectiveness of the graph division algorithm for the ring and the difference from the minimum algorithm for the check node, the following example will continue to use Example 3.2.

例3.3 Example 3.3

解构过程:Deconstruction process:

图5中(a)图是原始矩阵的Tanner图,我们可以vn3的度为1,于是将与vn3相连的校验节点cn2标记为4,然后对图中的节点及边做一些移除工作得到了图5中(b)图,此时(cn1,vn1,cn2,vn2)构成的环已经被打开;(a) in Figure 5 is the Tanner graph of the original matrix. We can set the degree of vn 3 to 1, so mark the check node cn 2 connected to vn 3 as 4, and then do some shifts on the nodes and edges in the graph. In addition, the figure (b) in Figure 5 has been obtained by the work, and the ring formed by (cn 1 , vn 1 , cn 2 , vn 2 ) has been opened at this time;

由图5中(b)图,将cn1标记为3,然后图变为图5中(c)图;From the (b) figure in Figure 5, the cn 1 is marked as 3, and then the figure becomes the (c) figure in Figure 5;

由图5中(c)图,将cn3标记为2,然后图变为图5中(d)图;From the figure (c) in Figure 5, the cn 3 is marked as 2, and then the figure becomes the figure (d) in Figure 5;

由图5中(d)图,将cn4标记为1。According to (d) in Fig. 5, mark cn 4 as 1.

于是,我们便可得到一组按新的顺序排列的校验节点,新的顺序为:(cn4,cn3,cn1,cn2)。Therefore, we can obtain a group of check nodes arranged in a new order, the new order is: (cn 4 , cn 3 , cn 1 , cn 2 ).

求解过程:Solving process:

先处理cn4,给出v4=0,v5=0,完成相关节点及度的移除工作(每次给处理完一个校验节点后都会做移除工作,之后不再赘述);Process cn 4 first, give v 4 = 0, v 5 = 0, and complete the removal of related nodes and degrees (every time a check node is processed, the removal will be done, and will not be described in detail later);

cn3的度变为了1,则先处理cn3,给出v2=1;The degree of cn 3 becomes 1, then cn 3 is processed first, and v 2 =1 is given;

cn1的度变为了1,则处理cn1,给出v1=0;The degree of cn 1 becomes 1, then cn 1 is processed, giving v 1 =0;

最后给出v3=1。This finally gives v 3 =1.

与校验节点最小算法类似,虽然给出的graph division算法描述是直接对图进行了操作,但是事实上,我们编程实现的时候可以不用用到图的结构,只需借助变量节点和校验节点的邻接关系即可,也不会做节点和边的移除工作,但是会标记。Similar to the minimum algorithm of the check node, although the description of the given graph division algorithm directly operates on the graph, in fact, we don’t need to use the structure of the graph when we program and implement, just use variable nodes and check nodes The adjacency relationship of the node and edge will not be removed, but it will be marked.

因为graph division算法主要分为解构和求解两部分,所以,对graph division算法的计算复杂度的分析也会分成两部分进行。Because the graph division algorithm is mainly divided into two parts: deconstruction and solution, the analysis of the computational complexity of the graph division algorithm will also be divided into two parts.

若图不能被完全解构,则算法根本不会进行到求解部分,所以,为了能计算出graph division算法最多会进行多少次加法操作,我们假设图能被完全解构且求解过程也能顺利进行。If the graph cannot be completely deconstructed, the algorithm will not proceed to the solving part at all. Therefore, in order to calculate the maximum number of addition operations that the graph division algorithm will perform, we assume that the graph can be completely deconstructed and the solving process can proceed smoothly.

解构过程:Deconstruction process:

每一轮会移除一个校验节点及与之相关的边,这相当于与此校验节点相连的变量节点的度都将减1,设此校验节点的度为ωc,则每轮会进行ωc次加法操作。而原始图中一共有m0个校验节点,设原始图中校验节点的最大的度为dc,因此,解构过程中最多会进行m0dc次加法操作,无乘法操作。Each round will remove a check node and its related edges, which means that the degree of the variable nodes connected to this check node will be reduced by 1. If the degree of this check node is ω c , then each round Will perform ωc addition operations. However, there are m 0 check nodes in the original graph, and the maximum degree of the check nodes in the original graph is d c . Therefore, in the process of deconstruction, there will be at most m 0 d c addition operations and no multiplication operations.

求解过程:Solving process:

会发生加法操作的地方是当一个变量节点的值被给定时,与之相连的校验节点的值会进行更新,且与之相连的校验节点的度也会相应减1,设此变量节点的度为ωv,所以,每给定一个变量节点的值,会进行2ωv次加法操作。我们设最初的图中变量节点最大的度为dv,因为一共n0有个变量节点,所以求解部分最多会进行2n0dv次加法运算,无乘法操作。The place where the addition operation will occur is that when the value of a variable node is given, the value of the check node connected to it will be updated, and the degree of the check node connected to it will be reduced by 1 accordingly. Set this variable node The degree of is ω v , so, every time a value of a variable node is given, 2ω v addition operations will be performed. We set the maximum degree of variable nodes in the initial graph as d v , because there are n 0 variable nodes in total, so the solution part will perform at most 2n 0 d v addition operations without multiplication operations.

综上所述,graph division算法最多会进行m0dc+2n0dv次加法操作。又因为dc<<n0,dv<<m0,所以渐近分析,graph division算法的计算复杂度为O(n)。To sum up, the graph division algorithm will perform at most m 0 d c +2n 0 d v addition operations. And because d c << n 0 , d v << m 0 , so asymptotically, the computational complexity of the graph division algorithm is O(n).

graph division算法相较于校验节点最小算法,加法操作总数虽然有增加,但总的计算次数仍然维持在O(n)的数量级上,从计算复杂度的数量级上看,两个算法没有什么差别。Compared with the minimum algorithm of the check node, the graph division algorithm has an increase in the total number of addition operations, but the total number of calculations is still on the order of O(n). From the perspective of the order of magnitude of computational complexity, there is no difference between the two algorithms .

在这小节为了算法分析叙述的简便,我将会给出图解构的另一种表述方式。In this section, for the convenience of algorithm analysis and description, I will give another way of expressing graph deconstruction.

表3.4graph division算法中解构部分的算法的另一种描述Another description of the algorithm of the deconstruction part in Table 3.4graph division algorithm

引理3.1vnk的值一定是在cnk被处理的时候给出的。Lemma 3.1 The value of vn k must be given when cn k is processed.

证明:当deg(vnk)=1时,显然成立;Proof: when deg(vn k )=1, obviously established;

当deg(vnk)≥1时,假设vnk的值是第一个不在cnk被处理的时候给出的,即当cnk还未被处理时,vnk的值就已经被给定。When deg(vn k )≥1, it is assumed that the value of vn k is the first given when cn k is not processed, that is, the value of vn k has already been given when cn k has not been processed.

由解构图的方式可以得出,除了cnk外,其余与vnk相连的校验节点相对应的行数均大于k,即与vnk相连的校验节点如果被处理一定是在求解过程中的第3步中被处理的,不妨设被处理的校验节点为cnk+t,则其被处理时,deg(ck+t)=1,当deg(ck+t)=1时,显然vnk还没有被给定值,则此时vnk+t一定已经被给定了值,即vnk+t的值不是在cnk+t被处理的时候给出的,这与假设“vnk的值是第一个不在cnk被处理的时候给出的”矛盾,所以,假设不成立。From the method of deconstructing the graph, it can be concluded that except for cn k , the number of rows corresponding to the check nodes connected to vn k is greater than k, that is, if the check nodes connected to vn k are processed, they must be in the process of solving If it is processed in the third step of , it is advisable to set the processed check node as cn k+t , then when it is processed, deg(c k+t )=1, when deg(c k+t )=1 , obviously vn k has not been given a value, then vn k+t must have been given a value at this time, that is, the value of vn k+t is not given when cn k+t is processed, which is different from the assumption "The value of vn k is the first given when cn k is not processed" contradicts, so, the assumption does not hold.

又因为假设中的k可以取1,2,…,m中的任意值,所以vnk的值一定是在cnk被处理的时候给出的。And because k in the assumption can take any value among 1, 2,..., m, the value of vn k must be given when cn k is processed.

证毕。Certificate completed.

定理3.2若是图能完全被解构,即能给出一组完整的校验节点的顺序,则graphdivision算法一定能给出一组正确的解。Theorem 3.2 If the graph can be completely deconstructed, that is, a complete set of check node sequences can be given, then the graphdivision algorithm must be able to give a set of correct solutions.

证明:由引理3.1可知,任意校验节点cnk被处理的时候,至少存在一个变量节点vnk还没被给定值,即通过给定vnk的秩我们一定可以给出一组与cnk相连的变量节点的值来满足cnk。所以,若是图能完全被解构,即能给出一组完整的校验节点的顺序,则graphdivision算法一定能给出一组正确的解。Proof: According to Lemma 3.1, when any check node cn k is processed, there is at least one variable node vn k that has not been given a value, that is, by giving the rank of vn k , we must be able to give a set of The values of k connected variable nodes satisfy cn k . Therefore, if the graph can be completely deconstructed, that is, a complete set of check node sequences can be given, then the graphdivision algorithm must be able to give a set of correct solutions.

证毕。Certificate completed.

在提出一种新的算法后,需要通过仿真实现来体现它的性能。仿真实验能够给我们提供关于新算法的性能的详细数据,通过数据的分析和比较,我们可以找到算法潜在的问题以及需要改进的地方。After proposing a new algorithm, it needs to realize its performance through simulation. The simulation experiment can provide us with detailed data on the performance of the new algorithm. Through the analysis and comparison of the data, we can find out the potential problems of the algorithm and the areas that need to be improved.

在本章中我们将会首先介绍仿真实验的设计,然后对校验节点最小算法、graphdivision算法以及高斯消去法在二元缺陷信道(Binary DefectiveChannel,BDC)上分别进行蒙特卡罗仿真,并且针对三个算法的仿真结果对这三个算法进行比较分析。In this chapter, we will first introduce the design of the simulation experiment, and then conduct Monte Carlo simulations on the binary defect channel (Binary Defective Channel, BDC) for the check node minimum algorithm, graphdivision algorithm and Gaussian elimination method, and for the three The simulation results of the algorithms are used to compare and analyze the three algorithms.

BDC信道模型及蒙特卡罗仿真的设计Design of BDC Channel Model and Monte Carlo Simulation

Heegard和ElGamal考虑一种概率信道模型,Mahdavifar和Vardy在其论文中称之为缺陷概率为q的二元缺陷信道,记作BDC(q)。Heegard and ElGamal considered a probabilistic channel model, which Mahdavifar and Vardy called in their paper a binary defect channel with defect probability q, denoted as BDC(q).

BDC信道模型BDC channel model

令q为缺陷概率,即存储单元有概率为1-q的可能成为完美的存储单元,有概率为q的可能成为stuck cell,其中stuck cell的固定值有的可能为0,有的可能为1;令Ψ={0,1}为二元字符集,λ为一个不在集合Ψ中的元素,z表示字符集中任一元素,且具有如下概率分布:Let q be the defect probability, that is, the storage unit with the probability of 1-q may become a perfect storage unit, and the one with the probability of q may become a stuck cell, where the fixed value of the stuck cell is may be 0, there are may be 1; let Ψ={0,1} be a binary character set, λ is an element not in the set Ψ, z represents the character set Any element in , and has the following probability distribution:

定义BDC信道为:Define BDC channel for:

在实际操作中,我们用M.Matsumoto&T.Nishimura设计的随机数生成器'MersenneTwister'产生长度为n的一串二元随机数,其中每位置上的数有q的可能性为0,有1-q的可能性为1。我们将这串二元随机数中值为1的位置作为stuck cell的位置。In actual operation, we use the random number generator 'MersenneTwister' designed by M.Matsumoto&T.Nishimura to generate a string of binary random numbers of length n, where the number at each position has the possibility of q being 0, and 1- The probability of q is 1. We take the position of value 1 in this string of binary random numbers as the position of the stuck cell.

对于算法的性能,本文用得不到正确解的概率即错误率来进行衡量。算法的错误率定义为:在一个确定的缺陷概率q下,算法不能得出一组正确解的次数占总次数的比例。要想计算比例,设计的仿真的终止条件既可以是总次数,也可以是错误帧数。我们选择的终止条件是达到一定的错误帧数,因为在仿真之前,我们并不能知道在某个缺陷概率下,它的错误率会达到多少,再加上错误位置的随机性,一旦规定仿真总次数,很有可能会导致错误帧数少,错误率浮动大不准确。For the performance of the algorithm, this paper uses the probability of not getting the correct solution, that is, the error rate, to measure it. The error rate of the algorithm is defined as: under a certain defect probability q, the ratio of the number of times that the algorithm cannot get a set of correct solutions to the total number of times. To calculate the ratio, the termination condition of the designed simulation can be either the total number of times or the number of error frames. The termination condition we choose is to reach a certain number of error frames, because before the simulation, we do not know how much its error rate will reach under a certain defect probability, plus the randomness of the error position, once the simulation total The number of times, it is very likely that the number of error frames will be small, and the error rate will fluctuate greatly and be inaccurate.

等式(3.2)中的校验节点的值可以取遍二元域上的n维向量,所以仿真时,我们可以按某种规则产生一组非全零的校验节点的值。The value of the check node in equation (3.2) can be taken over the n-dimensional vector on the binary domain, so during simulation, we can generate a set of non-zero check node values according to a certain rule.

算法性能仿真Algorithm performance simulation

在这小节,我们将选用四种二进制LDPC码进行仿真。第一种码是码字长度为548、信息位长度为274的不规则LDPC码,该码的最大行重为8,最大列重为11,记作C1码;第二种码是码字长度为800、信息位长度为400的规则LDPC码,该码的行重为6,列重为3,记作C2码;第三种码是码字长度为1000、信息位长度为500的不规则LDPC码,该码的最大行重为7,最大列重为3,记作C3码;第四种码是码字长度为3780、信息位长度为252的规则LDPC码,该码的行重为60,列重为4,记作C4码。前三个码均为码率的码,第四个是一个码率为0.933的高码率的码。In this section, we will choose four binary LDPC codes for simulation. The first type of code is an irregular LDPC code with a code word length of 548 and an information bit length of 274. The maximum row weight of this code is 8, and the maximum column weight is 11, which is denoted as C1 code; the second type of code is the code word length 800, the regular LDPC code with the information bit length of 400, the row weight of the code is 6, the column weight is 3, which is denoted as C2 code; the third code is the irregular code with the code word length of 1000 and the information bit length of 500 LDPC code, the maximum row weight of this code is 7, and the maximum column weight is 3, which is recorded as C3 code; the fourth code is a regular LDPC code with a code word length of 3780 and an information bit length of 252, and the row weight of this code is 60, column weight is 4, recorded as C4 code. The first three codes are code rate code, the fourth is a high code rate code rate of 0.933 code.

校验节点最小算法仿真结果及分析Simulation results and analysis of checkpoint minimum algorithm

基于C1码和C2码的校验节点最小算法和高斯消去法的性能比较曲线如图6和图7所示,图6为校验节点最小算法和高斯消去法的C1码的性能比较曲线,图7为校验节点最小算法和高斯消去法的C2码的性能比较曲线。从两张图中我们可以可看出,虽然不同码在同一缺陷概率的情况下,两种算法的错误率各有不同,但是整体趋势都是一致的。事实上,我们不仅做了上图这两个码的仿真,其余两个码也有进行仿真,趋势情况与这两张图一致,并且另两个码的性能曲线也将在下一小节展示,所以这里就不再展示。The performance comparison curves of the check node minimum algorithm and the Gaussian elimination method based on the C1 code and the C2 code are shown in Figure 6 and Figure 7, and Figure 6 is the performance comparison curve of the check node minimum algorithm and the Gaussian elimination method of the C1 code. 7 is the performance comparison curve of the C2 code of the check node minimum algorithm and the Gaussian elimination method. From the two figures, we can see that although different codes have the same defect probability, the error rates of the two algorithms are different, but the overall trend is the same. In fact, we not only simulated the two codes in the above figure, but also simulated the other two codes. The trend is consistent with these two figures, and the performance curves of the other two codes will also be shown in the next section, so here will no longer be displayed.

从图7可以看出,用C2码时,当缺陷概率在0.44附近时,高斯消去法的错误率就已经降至10-3这个数量级,而校验节点最小算法的错误率要降至10-3这个数量级,缺陷概率则要小于0.27,性能损失大于17%。It can be seen from Figure 7 that when the C2 code is used, when the defect probability is around 0.44, the error rate of the Gaussian elimination method has dropped to the order of 10 -3 , while the error rate of the check node minimum algorithm has to be reduced to 10 - 3 , the defect probability is less than 0.27, and the performance loss is greater than 17%.

从图6同样可以看出,相较于高斯消去法,校验节点最小算法性能损失近17%。It can also be seen from Figure 6 that compared with the Gaussian elimination method, the performance loss of the minimum algorithm of the check node is nearly 17%.

虽然用C1码,校验节点最小算法的性能损失较C2码有一定的减少,但是总体来说区别不大,可见码与码之间的性能虽有一定差异,但是趋势是一致的,且同码率的码之间的差异并不大。Although using C1 code, the performance loss of the minimum algorithm for check nodes is reduced to a certain extent compared with C2 code, but overall the difference is not big. It can be seen that although there are certain differences in performance between codes, the trend is the same, and the same The difference between the codes of the code rate is not large.

因为上两张图的码都是码率的,所以算法的性能极限是0.5,即当缺陷概率大于0.5,高斯消去法和校验节点最小算法同时失效。Because the codes of the above two pictures are The code rate, so the performance limit of the algorithm is 0.5, that is, when the defect probability is greater than 0.5, the Gaussian elimination method and the check node minimum algorithm will fail at the same time.

graph division算法仿真结果及分析Simulation results and analysis of graph division algorithm

基于C2码、C3码和C4码的校验节点最小算法、graph division算法和高斯消去法的性能比较曲线如图8、9和10所示,图8为三种算法的C2码的性能比较曲线,图9为三种算法的C3码的性能比较曲线,图10为三种算法的C4码的性能比较曲线。The performance comparison curves of the check node minimum algorithm, graph division algorithm and Gaussian elimination method based on C2 code, C3 code and C4 code are shown in Figures 8, 9 and 10, and Figure 8 is the performance comparison curve of the C2 code of the three algorithms , Fig. 9 is the performance comparison curve of the C3 code of the three algorithms, and Fig. 10 is the performance comparison curve of the C4 code of the three algorithms.

图8和图9依旧用了两个码率的码,所以算法的性能极限是0.5。Figure 8 and Figure 9 still use two code rate, so the performance limit of the algorithm is 0.5.

图10用的是码率为0.933的高码率的码,所以算法的性能极限在0.066。Figure 10 uses a code with a high code rate of 0.933, so the performance limit of the algorithm is 0.066.

从上述三张性能比较图可以看出,尽管C2码、C3码和C4码在码率、是否为规则LDPC码、码长及行重列重上多有差异,但是三张图的各算法的性能曲线的趋势却是一致的。From the above three performance comparison diagrams, it can be seen that although the C2 code, C3 code and C4 code have many differences in code rate, whether they are regular LDPC codes, code length, and row and column weights, the algorithms of the three graphs are different. The trend of the performance curve is consistent.

从图9可以看出,用C3码时,当缺陷概率在0.44附近时,高斯消去法的错误率降至10-3这个数量级,graph division算法的错误率降至10-3这个数量级时,缺陷概率在0.37附近,因此相较于高斯消去法,graph division算法性能损失约7%。It can be seen from Figure 9 that when the C3 code is used, when the defect probability is around 0.44, the error rate of the Gaussian elimination method drops to the order of 10 -3 , and when the error rate of the graph division algorithm drops to the order of 10 -3 , the defect The probability is around 0.37, so compared to the Gaussian elimination method, the performance loss of the graph division algorithm is about 7%.

从图8亦可看出,同为码率的C2码的性能损失也同样约为7%。It can also be seen from Figure 8 that the same The performance loss of the code rate C2 code is also about 7%.

不难从图10中看出,作为高码率的C4码,其用graph division算法的性能损失约1%。It is not difficult to see from Figure 10 that, as a high code rate C4 code, the performance loss of the graph division algorithm is about 1%.

综上所述,可以发现graph division算法相较于校验节点最小算法性能有了很大的提升,且相比于高斯消去法虽有性能损失,但损失尚可,尤其是在用高码率码的时候,并且graph division算法在计算复杂度上较高斯消去法低了两个数量级。In summary, it can be found that the performance of the graph division algorithm has been greatly improved compared with the minimum algorithm of the check node, and compared with the Gaussian elimination method, although there is a performance loss, the loss is acceptable, especially when using a high bit rate When coding, and the computational complexity of the graph division algorithm is two orders of magnitude lower than that of the Gaussian elimination method.

参看图11,本实施例公开一种基于稀疏矩阵的编码写入装置,包括:Referring to Fig. 11, this embodiment discloses a coding writing device based on a sparse matrix, including:

第一计算单元1,用于计算与待写入的信息m相对应的陪集首vm,其中,m=(m1,m2,…,mk),m对应的(n,k)分组码为C,vm=(v1,v2,…,vn);The first calculation unit 1 is used to calculate the coset leader v m corresponding to the information m to be written, wherein, m=(m 1 ,m 2 ,...,m k ), the (n,k) block code corresponding to m is C, v m =(v 1 ,v 2 ,...,v n );

第二计算单元2,用于基于稀疏矩阵计算向量b,其中,i1,i2,…,is表示stuck cells的位置,a1,a2,…,as表示stuck cells的固定值,Hz为从C的校验矩阵H中取出第i1,i2,…,is列组成的(n-k)×s阶子矩阵;The second calculation unit 2 is used for sparse matrix based Compute the vector b, where, i 1 , i 2 ,…,i s represent the position of stuck cells, a 1 , a 2 ,…, a s represent the fixed values of stuck cells, H z is the i 1 , i 2 ,...,i s sub-matrix composed of s columns;

写入单元3,用于将m′作为存储值写入存储单元,其中,m′=vm+bH。The writing unit 3 is used for writing m' as a storage value into the storage unit, wherein, m'=v m +bH.

虽然结合附图描述了本发明的实施方式,但是本领域技术人员可以在不脱离本发明的精神和范围的情况下做出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention. within the bounds of the requirements.

Claims (4)

1. A sparse matrix-based code writing method is characterized by comprising the following steps:
s1, calculating a coset leader v corresponding to the information m to be writtenmWherein, in the step (A),m=(m1,m2,…,mk) The (n, k) block code corresponding to m is C, vm=(v1,v2,…,vn);
S2 sparse matrix-basedA vector b is calculated in which, among other things,i1,i2,…,isindicating the location of stuck cells, a1,a2,…,asFixed value, H, representing stuck cellszTo take the ith from the check matrix H of C1,i2,…,isA (n-k) x s order sub-matrix composed of columns;
s3, writing m 'as a storage value into the storage unit, wherein m' is vm+bH;
The S2, including:
s210, secondary check matrixCheck node cn with minimum selectivity in corresponding Tanner graphk
S211, giving cnkConnected variable node vntEndowing cn with specific amino groupkValue c ofk
S212, judging variable node vntValue v oftIf v is 1, if vt1, all and variable nodes vntThe values of the connected check nodes are all turned, namely 0 is changed into 1, and 1 is changed into 0;
s213, removing variable node vntAnd all edges connected with the check nodes, and removing all check nodes with the degree of 0 in the Tanner graph;
s214, if the check node is judged to be removed, checking whether the value of the removed check node is 0, if all the values of the removed check node are 0, and judging that the check node exists in the Tanner graph, returning to the step S210, otherwise, if the check node does not exist in the Tanner graph, jumping to the step S215;
s215, obtaining the values of the variable nodes, and determining a vector consisting of the values of the variable nodes as a vector b.
2. The method according to claim 1, wherein the S2 includes a deconstruction part and a solution part, wherein,
the deconstruction portion comprises:
s220, initializing y ═ m0Wherein m is0Is a check matrixThe number of check nodes in the corresponding Tanner graph;
s221, if the variable node with the degree of 1 in the Tanner graph is judged and obtained, marking a check node connected with the variable node as y, updating y to be y-1, removing the check node and an edge related to the check node, and removing the variable node with the degree of 0;
s222, judging whether a variable node with the degree of 1 exists in the Tanner graph or not, if so, executing a step S221, otherwise, executing a step S223;
s223, if judging that the Tanner graph does not have check nodes, skipping to a solving part;
the solving section includes:
s224, for each check node from small to large according to the mark, assigning a value to the variable node connected with the check node, so that the sum of the values of the variable node connected with the check node is equal to the value of the check node;
s225, if the variable nodes with the value of 1 in the variable nodes connected with the variable nodes are judged and known, the values of the check nodes connected with the variable nodes with the value of 1 in the variable nodes connected with the variable nodes are all inverted, namely 0 is changed into 1, 1 is changed into 0, the variable nodes connected with the variable nodes and the edges related to the variable nodes connected with the variable nodes are removed, all check nodes with the degree of 0 are removed, whether the values of the removed check nodes are 0 is checked, and if the values of all the check nodes are 0, the step S226 is executed;
s226, if it is determined that there is a check node with a degree of 1 in the Tanner graph, assigning the value of the check node to the variable node connected thereto, if it is determined that the value of the variable node connected thereto is 1, flipping the values of all check nodes connected to the variable node connected thereto, that is, 0 is changed to 1, and 1 is changed to 0, removing the variable node connected thereto and the edge related to the variable node connected thereto, removing all check nodes with a degree of 0, checking whether the value of the removed check node is 0, if all the check nodes are 0, continuing to process the other check nodes with a degree of 1 in the graph until there is no check node with a degree of 1 in the graph, and turning to S227;
and S227, obtaining the values of the variable nodes, and determining a vector consisting of the values of the variable nodes as a vector b.
3. A sparse matrix-based code writing apparatus, comprising:
a first calculation unit for calculating a coset leader v corresponding to the information m to be writtenmWherein, in the step (A),m=(m1,m2,…,mk) The (n, k) block code corresponding to m is C, vm=(v1,v2,…,vn);
A second calculation unit for calculating a second matrix based on the sparse matrixA vector b is calculated in which, among other things,i1,i2,…,isthe location of the stuck cells is indicated,a1,a2,…,asfixed value, H, representing stuck cellszTo take the ith from the check matrix H of C1,i2,…,isA (n-k) x s order sub-matrix composed of columns;
a write unit for writing m 'as a storage value into the storage unit, wherein m' ═ vm+bH;
The second computing unit is specifically configured to perform the following steps:
s210, secondary check matrixCheck node cn with minimum selectivity in corresponding Tanner graphk
S211, giving cnkConnected variable node vntEndowing cn with specific amino groupkValue c ofk
S212, judging variable node vntValue v oftIf v is 1, if vt1, all and variable nodes vntThe values of the connected check nodes are all turned, namely 0 is changed into 1, and 1 is changed into 0;
s213, removing variable node vntAnd all edges connected with the check nodes, and removing all check nodes with the degree of 0 in the Tanner graph;
s214, if the check node is judged to be removed, checking whether the value of the removed check node is 0, if all the values of the removed check node are 0, and judging that the check node exists in the Tanner graph, returning to the step S210, otherwise, if the check node does not exist in the Tanner graph, jumping to the step S215;
s215, obtaining the values of the variable nodes, and determining a vector consisting of the values of the variable nodes as a vector b.
4. The apparatus according to claim 3, characterized in that the second calculation unit is specifically adapted to perform a deconstruction step and a solution step, wherein,
the deconstruction step comprises:
s220, initialChanging y to m0Wherein m is0Is a check matrixThe number of check nodes in the corresponding Tanner graph;
s221, if the variable node with the degree of 1 in the Tanner graph is judged and obtained, marking a check node connected with the variable node as y, updating y to be y-1, removing the check node and an edge related to the check node, and removing the variable node with the degree of 0;
s222, judging whether a variable node with the degree of 1 exists in the Tanner graph or not, if so, executing a step S221, otherwise, executing a step S223;
s223, if judging that the Tanner graph does not have check nodes, skipping to a solving part;
the solving step includes:
s224, for each check node from small to large according to the mark, assigning a value to the variable node connected with the check node, so that the sum of the values of the variable node connected with the check node is equal to the value of the check node;
s225, if the variable nodes with the value of 1 in the variable nodes connected with the variable nodes are judged and known, the values of the check nodes connected with the variable nodes with the value of 1 in the variable nodes connected with the variable nodes are all inverted, namely 0 is changed into 1, 1 is changed into 0, the variable nodes connected with the variable nodes and the edges related to the variable nodes connected with the variable nodes are removed, all check nodes with the degree of 0 are removed, whether the values of the removed check nodes are 0 is checked, and if the values of all the check nodes are 0, the step S226 is executed;
s226, if it is determined that there is a check node with a degree of 1 in the Tanner graph, assigning the value of the check node to the variable node connected thereto, if it is determined that the value of the variable node connected thereto is 1, flipping the values of all check nodes connected to the variable node connected thereto, that is, 0 is changed to 1, and 1 is changed to 0, removing the variable node connected thereto and the edge related to the variable node connected thereto, removing all check nodes with a degree of 0, checking whether the value of the removed check node is 0, if all the check nodes are 0, continuing to process the other check nodes with a degree of 1 in the graph until there is no check node with a degree of 1 in the graph, and turning to S227;
and S227, obtaining the values of the variable nodes, and determining a vector consisting of the values of the variable nodes as a vector b.
CN201610916426.0A 2016-10-20 2016-10-20 Code writing method and device based on sparse matrix Expired - Fee Related CN106569906B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610916426.0A CN106569906B (en) 2016-10-20 2016-10-20 Code writing method and device based on sparse matrix

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610916426.0A CN106569906B (en) 2016-10-20 2016-10-20 Code writing method and device based on sparse matrix

Publications (2)

Publication Number Publication Date
CN106569906A CN106569906A (en) 2017-04-19
CN106569906B true CN106569906B (en) 2019-12-31

Family

ID=58533890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610916426.0A Expired - Fee Related CN106569906B (en) 2016-10-20 2016-10-20 Code writing method and device based on sparse matrix

Country Status (1)

Country Link
CN (1) CN106569906B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109995380B (en) * 2018-01-02 2021-08-13 华为技术有限公司 Decoding method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072035A (en) * 2007-05-31 2007-11-14 复旦大学 Method for configuring algorithm complex low quasi-cyclic LDPC codes
EP2270992A1 (en) * 2003-09-04 2011-01-05 Dtvg Licensing, Inc Method and system for providing short block length low density parity check (LDPC) codes.
CN102185897A (en) * 2011-04-14 2011-09-14 上海交通大学 Safe distributed virtual storage pool system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2270992A1 (en) * 2003-09-04 2011-01-05 Dtvg Licensing, Inc Method and system for providing short block length low density parity check (LDPC) codes.
CN101072035A (en) * 2007-05-31 2007-11-14 复旦大学 Method for configuring algorithm complex low quasi-cyclic LDPC codes
CN102185897A (en) * 2011-04-14 2011-09-14 上海交通大学 Safe distributed virtual storage pool system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A Recursive Approach to Low Complexity Codes;R. MICHAEL TANNER,;《IEEE TRANSACTIONS ON INFORMATION THEORY》;19891231;第27卷(第05期);全文 *
Explicit Capacity Achieving Codes for Defective Memories;Hessam Mahdavifar等;《IEEE》;20151231;第1-5页 *
Sparse Coding Scheme for Defective Memories;Jiayi Rui等;《2016 8th International Conference on Wireless Communications & Signal Processing (WCSP)》;20161015;第1-4页 *

Also Published As

Publication number Publication date
CN106569906A (en) 2017-04-19

Similar Documents

Publication Publication Date Title
TWI697000B (en) Memory controller and method of accessing flash memory
CN110941504B (en) Decoding data using decoders and neural networks
CN106371943B (en) A kind of LDPC decoding optimization methods programming interference false perception based on flash
KR102626162B1 (en) Method for operating decoder to reduce computational complexity and method for operating data storage device having the same
TW201250696A (en) Reading method, memory controller, and memory storage device
US20160218750A1 (en) Parity check code encoder
US11184030B2 (en) Storage controller for correcting error, storage device including the same, and operating method thereof
US20200134443A1 (en) Storing neural networks and weights for neural networks
US9236886B1 (en) Universal and reconfigurable QC-LDPC encoder
US9531406B2 (en) Decoding of LDPC code
US11418219B2 (en) Learning device
CN105811996B (en) data processing method and system based on quasi-cyclic LDPC
CN110572164A (en) LDPC decoding method, apparatus, computer device and storage medium
JP2022124682A (en) memory system
CN111130567B (en) Belief Propagation List Decoding Method for Polar Codes with Added Noise Perturbation and Bit Flip
US20240097704A1 (en) Bit Flipping Decoder Using Channel Information
CN106569906B (en) Code writing method and device based on sparse matrix
CN104185952A (en) Processing elementary check nodes of iterative decoder
Zhou et al. Balanced modulation for nonvolatile memories
CN118520963A (en) Reading result correction method for quantum computation and product
CN112951313A (en) Memory controller for error correction, memory device including the same, and method of operating the same
Cassuto et al. In-memory Hamming similarity computation in resistive arrays
JP2023137091A (en) Memory system and memory control method
CN110046703B (en) On-chip storage processing system for neural network
TWI829252B (en) Method and computer program product and apparatus for decoding low-density parity-check (ldpc) code

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20191231