简体   繁体   English

如何使用奇偶校验矩阵进行编码?

[英]How to encode with parity Check Matrix?

I want to encode information block with parity check matrix. 我想用奇偶校验矩阵对信息块进行编码。

I have the hamming code (7,4,3) with parity check matrix H and I want to encode the information block m = [0 0 1] . 我有带有奇偶校验矩阵H的汉明码(7,4,3) ,并且我想对信息块m = [0 0 1]进行编码。

H = [1 1 0 1 1 0 0
     1 0 1 1 0 1 0
     0 1 1 1 0 0 1];

With generator matrix I just use this formula : codeword = mod(word*G,2) , but I have no idea how to encode using the parity check matrix. 对于生成器矩阵,我只使用以下公式: codeword = mod(word*G,2) ,但是我不知道如何使用奇偶校验矩阵进行编码。

Thanks! 谢谢!

As mentioned here , For encoding you should use generator matrix (G) not parity check matrix (as its name shows this!). 如前所述这里 ,对于编码应该使用生成矩阵(G)未校验矩阵(正如它的名字显示了这个!)。 So, encoded vector would be G*m' . 因此,编码矢量将为G*m'

As stated in the previous answer, you need to get the generator matrix in order to encode. 如前一个答案所述,您需要获取生成器矩阵才能进行编码。 It is straightforward to transform between a generator and parity matrix if they are in standard form, which requires the code to be systematic in the first k positions (see [1]). 如果生成器和奇偶矩阵为标准形式,则在生成器和奇偶矩阵之间进行转换很简单,这要求代码在前k个位置处是系统的(请参见[1])。

If the parity matrix is not in that form, you may use elementary row operations to put it into standard form, and then obtain the generator matrix (see [4]). 如果奇偶矩阵不是这种形式,则可以使用基本行操作将其放入标准形式,然后获得生成器矩阵(请参见[4])。 This changes the code to a different, but "equivalent" code (see [5]). 这会将代码更改为其他但“等效”的代码(请参见[5])。

My cursory search found no other way to find a generator matrix from an arbitrary parity matrix. 我的粗略搜索发现没有其他方法可以从任意奇偶校验矩阵中查找生成器矩阵。 I suspect it is difficult, impractical, or impossible to do so, but I do not have a definitive answer. 我怀疑这样做是困难,不切实际或不可能的,但我没有明确的答案。

REFERENCES AND DISCUSSION 参考和讨论
Note that these references are not necessarily authoritative; 请注意,这些参考文献不一定具有权威性。 but I find them to be reasonable and plausible. 但我认为它们是合理和合理的。

[1] https://en.wikipedia.org/wiki/Parity-check_matrix For an (n,k) block code, the standard form for a generator matrix is G = [ I(k) P ]. [1] https://zh.wikipedia.org/wiki/Parity-check_matrix对于(n,k)块代码,生成器矩阵的标准格式为G = [I(k)P]。 G is a (k,n) matrix. G是一个(k,n)矩阵。 I(k) is the (k,k) identity matrix. I(k)是(k,k)单位矩阵。 P is a (k,nk) matrix. P是一个(k,nk)矩阵。

The parity matrix is then H = [ -P^TI(nk) ]. 奇偶矩阵则为H = [-P ^ TI(nk)]。 H is the (nk,n) parity matrix, corresponding to G. -P^T is the negative transposition of P. You can leave out the negation for binary codes. H是(nk,n)奇偶校验矩阵,对应于G。-P ^ T是P的负移位。您可以省略对二进制代码的求反。 I(nk) is the (nk, nk) identity matrix. I(nk)是(nk,nk)单位矩阵。

So, if you have a parity matrix in the form I have shown, the generator matrix is G = [ I(k) P ]. 因此,如果您具有我所示形式的奇偶校验矩阵,则生成器矩阵为G = [I(k)P]。

[2] Pless, Vera (1998), Introduction to the Theory of Error-Correcting Codes (3rd ed.), Wiley Interscience, ISBN 0-471-19047-0. [2] Pless,Vera(1998),《纠错码理论导论》(第三版),Wiley Interscience,ISBN 0-471-19047-0。 This is cited by [1]. 这被[1]引用。

[3] https://www.mathworks.com/help/comm/ref/gen2par.html Matlab provides a function for converting between the generator/parity (gen2par), but it seems to require the standard form. [3] https://www.mathworks.com/help/comm/ref/gen2par.html Matlab提供了一个在生成器/奇偶校验(gen2par)之间转换的功能,但它似乎需要标准格式。 The function seems to rely on this standard form to detect which one you have provided, and then change it into the other. 该函数似乎依赖于此标准格式来检测您提供的哪个,然后将其更改为另一个。

[4] https://math.stackexchange.com/questions/1490627/finding-generator-matrix-for-binary-linear-code-given-parity-check-matrix This reference proposes using elementary row operations to transform a parity matrix into standard form, then transforming into a generator matrix. [4] https://math.stackexchange.com/questions/1490627/finding-generator-matrix-for-binary-linear-code-given-parity-check-matrix该参考文献建议使用基本行操作来转换奇偶矩阵转换为标准形式,然后转换为生成器矩阵。

[5] https://math.stackexchange.com/questions/1684808/row-column-operations-of-a-parity-check-generator-matrix-for-a-linear-code This reference explains that elementary row operations on a parity or generator matrix will change the code, because the coded representation of a particular set of inputs will change, but the code may be considered "equivalent" because the set of codewords (hence distance properties) are unchanged. [5] https://math.stackexchange.com/questions/1684808/row-column-operations-of-a-parity-check-generator-matrix-for-a-linear-code此参考说明基本行操作基于奇偶校验或生成器矩阵将更改代码,因为特定输入组的编码表示将更改,但是由于该组代码字(因此距离属性)未更改,因此该代码可被视为“等效”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM