Thanks, Achilleas, Jan, Jeff for your responses. I think I understand the format now, and I managed
to build the gr-trellis documentation, which does spell out answers for a lot of what I asked.
I’ve abandoned making my own FSM since I can just use the CPM utilities in gr-trellis. However, I’m
getting unexpected BER and PER when running gr-trellis/examples/python/test_cpm.py with my CPFSK parameters, h = 25/3 and L=1.
Diff of test_cpm.py with my simple modifications:
https://gist.github.com/nowls/5b2bc2aada87dc197e3f
$ python test_cpm.py
Using Volk machine: avx_64_mmx_orc
100 16868 100 0.16868 1.0
200 33852 200 0.16926 1.0
300 50786 300 0.169286666667 1.0
400 67667 400 0.1691675 1.0
[…]
As you can see, PER is 100% and BER is pretty bad for 10 dB SNR. The construction of the phase response,
q, looks correct to me. Any idea what might be going wrong?
Thanks,
Sean
From: discuss-gnuradio-bounces+sean.nowlan=address@hidden
[mailto:discuss-gnuradio-bounces+sean.nowlan=address@hidden]
On Behalf Of Achilleas Anastasopoulos
Sent: Thursday, September 10, 2015 1:28 PM
To: address@hidden
Subject: Re: [Discuss-gnuradio] Demodulating CPFSK with Viterbi algorithm using gr-trellis
Sean,
I just wanted to add to the previous answer:
Indeed gr-trellis (and the fsm class specifically) has a built in constructor for generating the FSM corresponding to ANY CPM scheme.
It only requires three parameters as explained in the comments
The constructed FSM is NOT based on Proakis decomposition, but on the more elegant decomposition by:
"A decomposition approach to CPM", IEEE Trans. Info Theory, March 1988
See also my own notes at
http://www.eecs.umich.edu/~anastas/docs/cpm.pdf
In this case for h=K/P, it does not matter whether K is even or odd, the number of states is always = M^{L-1} * P (where M is the cardinality of the input alphabet),
so in your case you'll have a trellis with 3 states as the previous email suggested.
You may also find useful the python utility
make_cpm_signals(K,P,M,L,q,frac)
that can be found in gr-trellis/python
that generates the signal space for you.
(please see the above references for more info).
Finally, you can take a look at the example "test_cpm.py"
in the gr-trellis/examples/python
and make appropriate changes for your CPFSK signal.
Now you can always drop all the above and design your FSM and signals from scratch. You can create the FSM from a file (this is explained in the gr-trellis documentaion--which is generated
from gr-trellis/doc/gr-trellis.xml).
The ouput symbol mapping is defined EXACTLY as you suggested in your email:
every line corresponds to the current state and every column to an input.
The entry is a number from 0 to I-1 (where I is the input cardinality).
How this index is translated to an actual signal IS NOT PART OF THE FSM DEFINITION but part of the modulation definition as explained very extensively in the gr-trellis documentation.
let me know if you have any further questions,