Thursday, May 16, 2013

First Patch for DVB-T2 CSP on GNU Octave!

I have referred to the Common Simulation Platform in my previous post.  I am still trying very hard to get it running in GNU Octave.

So far I have fixed the code to cater for a number of differences between Matlab and Octave.   There is however a big problem with LDPC encoding/decoding, for which Matlab has functions, but Octave does not.  If you have any idea how to do this encoding and decoding, in particular with repeat-accumulate codes as used in DVB-S2 and DVB-T2, you help would be highly appreciated.

I have found C code by Radford M. Neal that is looking good,  at http://www.cs.utoronto.ca/~radford/ldpc.software.html.  It does not seem to do the tepeat-accumulate codes, but still might be worthwhile using as learning tools.

At the moment I have bypassed the LDPC encoding in the transmitter part of the simulation, and hope to do the same for the decoding in the receiver part.  I hope this will enable me to still use the CSP to learn a lot about the framing structure, and just view LDPC as two black boxes.

My patch can be found here.

Saturday, May 4, 2013

DVB-T2 Common Simulation Platform

This Matlab simulation model is an official project undertaken by DVB / DVB members.   I think I noticed it soon after it was released (during 2011) as open source on Sourceforge (http://sourceforge.net/projects/dvb-t2-csp/), tried if briefly and found it did not work with GNU Octave.

A week or two ago I decided to give it another go.  If you read the file GettingStartedWithCSP.txt, you will find in point 4 a basic command to run:

   run('dvbt2bl_basic','work','stdout',{'DVBT2.STRICT=0'})

This is where I started and so far have fixed/worked around a number of problems.  As the project consists of 262 Matlab files, it is difficult to say how many bugs remains before I will be finished, or if it will be possible.  Yet, some part will be useable at least. I have tried an example where it extracts from a T2-MI file, and saw it printing out Superframe and Frame numbers.  This morning I was playing with he function t2_std_dvbt2_bl and saw it returning LDPC encoding matrices - I will try to do a post on that.

At the moment I am having big problems in the file DVB-T2-CSP-03-02-02/model/tx/tx_dvbt2blicod/t2_tx_dvbt2blicod.m, mainly to do with LDPC-encoding.  Firstly, the Matlab comm function fec.ldpcenc does not exist in Octave.  It returns a struct, which I just tried to make up at the point where the function is called.  Then the call to the function encode fails. It is very difficult to see what is going on there, because it seems that the structure is passed to the function in the place of multiple arguments - an ability that Octave does not seem to have.  I have tried to figure out something to call encode in Octave with the individual arguments.  Now it passes that call, and then crashes in the next statement!

I am planning to release all the changes I am making as a patch to the zip file offered by the Sourceforge project.  It will be placed either as part of the existing Sourceforge project, or on a new project.

Please watch this space, and the Open Discussion Forum of the Sourceforge project.  Any help will be appreciated.  As they say, many hands make light work!