Thursday, 17 May 2018

My Lime Mini has a box

Just a quick post. I finally put one of my Lime Minis into a box.  The box is a
Hammond 1455C802 with just over 1 cm removed from it's length.
The ends are plastic so are easy to drill. I am planning to add a small 3 cm
5v fan to the top if it is needed.

As I posted on my Twitter account I finally managed to get a very nice DVB-S2
signal out of the Mini and as I thought the issue was with my code rather than
the Mini. The lesson learned is it is vital to run the TX calibration routine every
time you change the transmitter parameters.

The next job is to revisit my GPU accelerated Linux DPD code. The USB3
interface of the Lime gives enough bandwidth to process the oversampled
full duplex signals required to carry out Digital Pre Distortion. If you
want more information please look at previous blog entries. 

Sunday, 28 January 2018

DVB-S2X First Light

Initial DVB-S2X decoding has now been added to the soft modem.
With almost 100 different modulation formats I have little hope of  implementing
them all but it is a start.

Back to S2 again

Monday, 22 January 2018

DVB-S2 Short Frames added

The receiver code now supports DVB-S2 short frames 16200 bits vs the usual 64800.

I am just starting to test some DVB-S2X extensions. I have not yet added VL-SNR

Monday, 15 January 2018

Crude GUI added to DVB-S2 Receiver

A quick update on the project. I have added a MER status line to the GUI.
The carrier tracking has been improved. However I am still limited to
symbol rates below 2 MS/s. This is due to the overhead of the adaptive equaliser.
I have plans to accelerate that part of the code. The equaliser is quite agressive
as it needs to track the symbol rate error, reducing that error will reduce the
equaliser CPU overhead. Also moving the equaliser onto the GPU and
equalising 128 frames in parallel should hide the processor overhead too.

The problem at the moment is how to take the single thread CPU code and
move it to the multi-processor GPU.

Friday, 24 November 2017

CUDA DVB-S2 decoder marches on.

No pictures this time as videos of the receiver in action don't prove much.
I have now implemented version 2 of the LDPC decoder based on a
research paper I found Gronroos   I now appear to be getting a throughput
in excess of 300 MBits/s. There are still some issues, the new decoder uses
8 bit metrics and it is a challenge to get them not to underflow on weak
signals. I have used the CUDA intrinsic SIMD instructions which use saturated
8 bit maths, this is a deviation from the original paper but seems to work.

The decoder works on the bases of handling 128 codewords in
parallel which causes two problems, firstly the latency and secondly the fact
the 128 codewords have to use the same FEC. This is not an issue with
TV broadcasting but does cause some issues with the requirements of
Phase 4 Ground. Another problem is that the new algorithm uses Min-Sum
rather Sum-Product to do the decoding which looses some performance.
I did find another paper that applies a correction to Min-Sum to
get back some of the performance.

The next improvement I made was to use a table lookup approach to detect
BCH code words in error. This has resulted in a 5x increase in speed
of the BCH error detector. The bad code words are then further processed
using the Berlekamp and Massey algorithm and up to 12 errors corrected
per code word. The syndromes are calculated on the CPU.
I calculate the odd order syndromes by using log/alog tables of one of the
base polynomials. The even order syndromes are calculated by multiplying
the required odd order syndromes, for example s2 = GMULT(s1,s1)
(where GMULT is a multiply over the Galois field). I am thinking of
splitting the batches of 128 codewords up into sets of 64 or maybe 32
then processing them in separate CPU threads. I am not sure whether
the overhead of creating the threads will be greater than the concurrency
I can achieve (only experiment will tell).

I have a lot more things to play with like using pinned memory for
device to host transfers and CUDA callbacks.

I am now decoding DVB-S2 at 800 KSymbols/sec, the limiting factor is no
longer the LDPC but the Kalman based adaptive equaliser I am using in
the front of the modem. Currently it uses floating point so can probably be sped up.
After equaliser training on the preamble I hope to switch to the far lesser
demanding LMS method but as yet that doesn't work.

So lots more interesting stuff to play with. I have had no formal education
in any of this I have just learnt it from articles I have found on the internet.
So please excuse any mistakes I make.

For any of you that read this blog that are not Radio Amateurs, part of the ethos
of the Amateur Radio movement is the concept of self training in radio
communications. I hope I meet that challenge, in this my personal journey.

So till next time ....

Monday, 16 October 2017

Work progresses on my software decoder

Here is another quick video of my work on using CUDA to do DVB-S2 demodulation.
I have now reached the dizzy heights of 500 Kilo Symbols per second in real time
with 20 iterations of the LDPC decoder still a long way to go and a lot to learn about
programming in CUDA.

Thursday, 5 October 2017

LDPC the power of iteration

Currently I am working on a DVB-S2 software decoder using an NVIDIA GPU
and the CUDA programming language. It is still very early days but I thought
I would share some of the initial results.

The type of FEC used in DVB-S2 is called Low Density Parity Check LDPC
and it uses an iterative algorithm to do the decoding, in my case one called
belief propagation also known as the sum-product algorithm.

Above is my software running in off-line test mode decoding a known
DVB-S2 frame. As can be seen the first time it runs with 4 iterations
the frame is unrecoverable. The next time it runs with 10 iterations
and while the baseband header can be decoded all the transport packets
in the body of the message are in error. Finally it is run again with 20
iterations, this time the whole frame can be decoded. Each run uses the
same identical noise sequence added to it

Above is a example of the modem working in real-time receiving DVB-S2 transmitted
from DATV-Express and being received on ADALM-PLUTO, it is being decoded
totally in software using a GTX980TI GPU. A huge amount of work still needs to be
done before this is of any practical use. The motivation for doing this work is to have
something that will support many of the features not found in commercial DBS
chip-sets and to give me a radio related project for learning CUDA programming on.
There are rumours that DVB-S2X VL_SNR modes may be used on future CUBESAT
Lunar and Martian missions. I agree not many people are going to want to use a
£600 GPU card when a £100 Minitiouner can be used instead, but I am not
just many people! The GPU card running flat out makes a nice room heater.

There is also a video over on my YouTube channel that shows some moving video
rather than just a frame capture (the software has changed a lot since I made that clip).