I am currently working on convolutional codes in Matlab. One way to describe such a code is by its parity-check matrix H, which looks e.g. like this for the case of a R = b/c = 2/3 code:
[ 1 D D^3 ]
[ D^3 D^2 1 ]
I would like to turn this matrix into systematic form, i.e. the first b x b columns should form an identity matrix. For the above example this would be something like:
[ 1 0 ? ]
[ 0 1 ? ]
My question is how can such a matrix, in which each entry is a polynomial, be represented in Matlab most conveniently? I was thinking of a matrix of coefficient vectors, but this seems kind of unwieldy. At the moment I just can’t figure out the best way to approach this problem without creating unnecessary complexity.
Some further remarks:
The coefficients are from GF(2) so all calculations are modulo 2 i.e. 1 + 1 = 0, but this should not be problematic after this question is answered.
General hints and gotchas concerning this topic will be highly appreciated 🙂
Question answered by EitanT, with some limitations on the polynomial degree(maximum 64, due to 64 bit precision).
Since the coefficients belong to GF(2), you can represent each polynomial as a binary number, where each bit represents the corresponding power. For example: D3+D2 = 11002 = 12
This allows you to store
Has a simple matrix and perform rather fast binary operators (such as XOR) when transforming it to reduced row echelon form to obtain the systematic form.The
Hmatrix in your example would look like this: