Today I have created a SVN branch of the trunk at https://sourceforge.net/p/dvb-t2-csp/code/19/tree/branches/octave/.
There is no zip file or tarball at the moment, you will have to check it out from SVN. See the Open Discussion at the CSP for more details.
You will also need to download a LDPC package from http://sourceforge.net/projects/dvbldpc/. (At the moment there is only one.)
If anybody successfully runs the DVB-T2 CSP in Octave, I would like to know!
Sunday, July 21, 2013
Wednesday, July 17, 2013
DVB LDPC Project releases first GNU Octave Package
I have referred here previously to the ISCML package. I have isolated the LDPC encoder and decoder code and made it into a GNU Octave package.
At the moment I have one alternative LDPC package, but in that case I have a problem, because there is no copyright notice on the code, thus it is problematic to release it under any open source license without first tracing the original authors and getting their permission.
To make it easy for testers of the DVB-T2 Common Simulation Platform to test different LDPC code in GNU Octave, I have decided to create a project on Sourceforge, to make available different packages which will all be compatible with my modifications to the CSP. The project is called DVB LDPC, click here.
So far I release the one package (dvbldpc-iscml-0.0.1.tar.gz) in this project. Although it was only tested in Cygwin, I believe it should be possible to get it running on any Unix-like system where Octave is running. You may have to manually compile the mex files.
At the moment I have one alternative LDPC package, but in that case I have a problem, because there is no copyright notice on the code, thus it is problematic to release it under any open source license without first tracing the original authors and getting their permission.
To make it easy for testers of the DVB-T2 Common Simulation Platform to test different LDPC code in GNU Octave, I have decided to create a project on Sourceforge, to make available different packages which will all be compatible with my modifications to the CSP. The project is called DVB LDPC, click here.
So far I release the one package (dvbldpc-iscml-0.0.1.tar.gz) in this project. Although it was only tested in Cygwin, I believe it should be possible to get it running on any Unix-like system where Octave is running. You may have to manually compile the mex files.
Saturday, July 13, 2013
DVB-T2 LDPC Encoding Explained!
Well, I can't really explain LDPC encoding fully, but I have been looking at section 6.1.2 and the tables in Appendix A of the document ETSI EN 302 775 for a long time (maybe years), without understanding anything.
Now I have written Matlab/GNU Octave code to demonstrate the algorithm. I have tested it for the normal FEC block size (64800) and only for code rate = 2/3. It is a lot slower than other encoders I found, but gives the same answers. Whereas other encoders does one encoding in the blink of an eye, this demo code takes about 1 minute on my laptop.
I hope somebody finds this useful. I think it should be useful for at least two purposes:
Now I have written Matlab/GNU Octave code to demonstrate the algorithm. I have tested it for the normal FEC block size (64800) and only for code rate = 2/3. It is a lot slower than other encoders I found, but gives the same answers. Whereas other encoders does one encoding in the blink of an eye, this demo code takes about 1 minute on my laptop.
| % This is supposed to be ran
interactively by copying and pasting. % NOTE! % You need the function t2_std_dvbt2_bl_ldpc from the % DVB T2 Common Simulation Platform. Best is maybe to copy it % into your working directory. In this function, find ct1 and ct2 % for code rate 2/3(SONY matrix). Copy and paste them into Octave or Matlab. % Then copy and paste he code below: % % Assemble ct1 and ct2 into one matrix ck, padding ct2 with zeros ck=zeros(size(ct1,1)+size(ct2,1), max([size(ct1,2) size(ct2,2)])); ck(1:size(ct1,1),1:size(ct1,2)) = ct1; ck(size(ct1,1)+1:size(ck,1), 1:size(ct2,2)) = ct2; % Set the LDPC parameters Nldpc=64800; CR=2/3; Kldpc = CR*Nldpc; np=Nldpc-Kldpc; % Create an information block %i=[0 1 0 1 0 1 0 1 0 1 ones(1,Kldpc-20) 0 1 0 1 0 1 0 1 0 1] ; i=randint(1,Kldpc,2); % Initialize the parity bits p=zeros(1,np); Qldpc = 60; tic; for ii=0:size(i,2)-1 ckr = idivide(ii, 360)+1; m360 = mod(ii, 360); % Some debug you can uncomment %fprintf(1, 'ckr = %5d m360 = %d\n', ckr, m360); % More debug you can enable/change to see some of the accumulation addresses % if ii>355 && ii<365 % mod(nonzeros(ck(ckr,:))'+m360*60,np)+1 % end p(mod(nonzeros(ck(ckr,:))'+m360*60,np)+1) = mod(p(mod(nonzeros(ck(ckr,:))'+m360*60,np)+1) + i(ii+1), 2); end for pp=2:np p(pp) = mod(p(pp)+p(pp-1), 2); end toc; % Verification agains Matlab code, if you have Matlab % I tested this with alternative code in Octave H = t2_std_dvbt2_bl_ldpc(CR, Nldpc, '1.3.1'); enc = fec.ldpcenc(H); cw = encode1(enc, i); ptest = cw(Kldpc+1:Nldpc); nnz(p) nnz(ptest) nnz(p-ptest) |
I hope somebody finds this useful. I think it should be useful for at least two purposes:
- Educational.
- Verifying other LDPC encoders.
Subscribe to:
Comments (Atom)