0
$\begingroup$

How can I implement $\rm RSC(2,1,2)$ in MATLAB? Can I use convenc function to build RSC?

The convenc function has 2 arguments: code = convenc(msg,trellis) where trellis=poly2trellis(ConstraintLength,CodeGenerator), and the generator polynomial for this RSC is: $$ G=\left(1,\frac{1+D^{2}}{1+D+D^{3}}\right)\quad\text{or}\quad G=\left(1,\frac{5}{7}\right) $$ but for poly2trellis argument CodeGenerator need to be in octal.

enter image description here

$\endgroup$
  • $\begingroup$ Why not implement the state machine directly? It's pretty easy. Hint: you need a current_state vector and a next_state vector. $\endgroup$ – MBaz Nov 24 '16 at 18:07
  • $\begingroup$ @MBaz If I use convenc function, then for decoder I can use vitdec. This is a part/block of communication system, which need to be tested in MatLab. $\endgroup$ – Enapolo Nov 25 '16 at 10:57
  • $\begingroup$ Well, your first question is how to implement this system in Matlab. It seems like your question is more specific -- maybe edit your question to clarify what you need? $\endgroup$ – MBaz Nov 25 '16 at 14:41
  • $\begingroup$ try this: t = poly2trellis( 3, [7 5], 7); code=convenc(input, t); $\endgroup$ – Young Dec 1 '16 at 11:15
  • $\begingroup$ You can use: poly2trellis(4,[15,5],15) 1+D+D^3 is equivalent with [1 1 0 1] $\endgroup$ – Mahdi Jan 25 '17 at 11:33
0
$\begingroup$

The question is already answered but let me structure it for future readers. From the MATLAB help for the function poly2trellis, here is how you can do it:

TRELLIS = poly2trellis(CONSTRAINTLENGTH, CODEGENERATOR, FEEDBACKCONNECTION)

Hence for the figure in the question: RSC_trellis = poly2trellis( 3, [7 5], 7);

Or, for the other possible RSC encoder, i.e. choosing the lower branch to be fedback: RSC_trellis = poly2trellis( 3, [7 5], 5);

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.