Gr-trellis: convenc and viterbi with own mapper/de-mapper

Hi all,

I am trying to use the convolutional encoder and Viterbi provided by the
gr-trellis class within another environment. I have my own mapper and
de-mapper blocks which I want to use. So I tried to use the feed the
viterbi_combined with this arguments:

va_combined =
trellis.viterbi_combined_fb(fo,nsymbols,0,-1,1,[-1,1],trellis.TRELLIS_EUCLIDEAN)

My de-mapper outputs soft bits between -1 and +1. Here is an example
output of my test script:

data: [0, 1, 1, 0, 0]
encoded: (0, 3, 2, 2, 0)
unpacked: (0, 0, 1, 1, 1, 0, 1, 0, 0, 0)
modulated: ((1+0j), (1+0j), (-1+0j), (-1+0j), (-1+0j), (1+0j), (-1+0j),
(1+0j), (1+0j), (1+0j))
demodulated: (-1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0)
decoded: (0, 0, 1, 0, 0, 1, 0, 1, 0, 1)

Another thing I don’t understand is why the decoder outputs 10 values
instead of 5. I would be glad if someone told me what I am doing wrong.

Regards,
Jonas

On Mon, 16 Aug 2010, Jonas M. Börner wrote:

unpacked: (0, 0, 1, 1, 1, 0, 1, 0, 0, 0)
modulated: ((1+0j), (1+0j), (-1+0j), (-1+0j), (-1+0j), (1+0j), (-1+0j), (1+0j), (1+0j), (1+0j))
demodulated: (-1.0, -1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0)
decoded: (0, 0, 1, 0, 0, 1, 0, 1, 0, 1)

Another thing I don’t understand is why the decoder outputs 10 values instead of 5. I would be glad if someone told me what I am doing wrong.

Regards,
Jonas

If I remember correctly, when you start pushing symbols through the
trellis, it has some zero values before the input and some zero values
after your last symbol pushed into the trellis. I think this is
typically the
length of your trellis. So at some point you will have to truncate the
trellis output.

Any one else care to comment?

–Colby B.

Hi Colby,

thanks for your reply. My trellis is created like this:

t=trellis.fsm(1,2,[91,121])

The constraint length is 7 so it doesn’t look like it was connected to a
trellis-specific thing. As I remember from the gr-trellis examples they
didn’t do any truncating there before comparing the source with the
destination for error calculation…

Regards,
Jonas

Am 17.08.2010 um 08:10 schrieb [email protected]:

---------- Forwarded message ----------
From: Achilleas A. [email protected]
Date: Thu, Aug 19, 2010 at 4:19 AM
Subject: Re: [Discuss-gnuradio] gr-trellis: convenc and viterbi with
own mapper/de-mapper
To: [email protected]

Jonas,

there is a very extensive doc file in gr-trellis that hopefully
answers your questions,
as well as a lot of examples.
Please read it and let me know if you still have questions about it.
BTW: your issue has nothing to do with truncation as was suggested in a
reply.

In short: one way to implement your system is to mapp the encoded
symbols directly to
QPSK symbols (essentially this is what you are doing!) and thus
produce 5 demodulated symbols
that you will feed in the VA.

Achilleas

On Tue, 17 Aug 2010, “Jonas M. Börner” wrote:

My de-mapper outputs soft bits between -1 and +1. Here is an example output of my test script:
Regards,
Jonas

If I remember correctly, when you start pushing symbols through the trellis, it has some zero values before the input and some zero values after your last symbol pushed into the trellis. I think this is typically the length of your trellis. So at some point you will have to truncate the trellis output.

Any one else care to comment?

–Colby B.

I have not used the GNU Radio trellis before. In the past, I have only
used the the matlab trellis and I remember I had to deal with
truncating.

–Colby

Jonas,

one idea is to add a method “set_K(K)” to the viterbi class.
This method sets d_K AND calls the set_multiple() method with the new
value.
This method will be called from , say , the python code.

Achilleas

On Sat, Oct 23, 2010 at 1:59 PM, “Jonas M. Brner”