CommPy icon indicating copy to clipboard operation
CommPy copied to clipboard

confused about turbo.py

Open silentsaber opened this issue 4 years ago • 2 comments

I use parameters in LTE 36.212 to realize a turbo code. Then I find in line 47 (turbo.py):

stream = conv_encode(msg_bits, trellis1, 'rsc')
sys_stream = stream[::2]
non_sys_stream_1 = stream[1::2]

interlv_msg_bits = interleaver.interlv(sys_stream)
puncture_matrix = array([[0, 1]])
non_sys_stream_2 = conv_encode(interlv_msg_bits, trellis2, 'rsc', puncture_matrix)

Here 'rsc' is not the right parameter in conv_encode, since the third parameter is termination(selected from {'term','cont'}). And 'rsc' should be set in Trellis like this:

memory = np.array([3])
g_matrix = np.array([[1,13]])
feedback = 11
trellis = cc.Trellis(memory, g_matrix, feedback, code_type='rsc')

So am I right? (Does there exist some wrong in turbo.py?)

silentsaber avatar Dec 31 '20 02:12 silentsaber

Hello, have you solved this problem, I encountered difficulties when using turbo for encoding and decoding. hope you can help me. https://github.com/veeresht/CommPy/issues/112

haixiongli avatar Apr 19 '22 09:04 haixiongli

你好,这个问题你解决了吗,我在使用turbo进行编码和解码的时候遇到了困难。希望您能够帮助我。 #112

I haven't solved it. I used lteTurboEncode in Matlab ltetoolbox instead. For using matlab function in python code, you can try import matlab.engine

silentsaber avatar Jun 27 '22 09:06 silentsaber