Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

confused about turbo.py #95

Open
silentsaber opened this issue Dec 31, 2020 · 2 comments
Open

confused about turbo.py #95

silentsaber opened this issue Dec 31, 2020 · 2 comments

Comments

@silentsaber
Copy link

silentsaber commented Dec 31, 2020

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?)

@haixiongli
Copy link

Hello, have you solved this problem, I encountered difficulties when using turbo for encoding and decoding. hope you can help me.
#112

@silentsaber
Copy link
Author

你好,这个问题你解决了吗,我在使用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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants