| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Communications Blockset |
| Contents | Index |
| Learn more about Communications Blockset |
Convolutional sublibrary of Channel Coding
The Convolutional Encoder block encodes a sequence of binary input vectors to produce a sequence of binary output vectors. This block can process multiple symbols at a time.
If the encoder takes k input bit streams (that is, can receive 2k possible input symbols), this block's input vector length is L*k for some positive integer L. Similarly, if the encoder produces n output bit streams (that is, can produce 2n possible output symbols), this block's output vector length is L*n.
The input can be a sample-based vector with L = 1, or a frame-based column vector with any positive integer for L.
For both its inputs and outputs for the data ports, the block supports double, single, boolean, int8, uint8, int16, uint16, int32, uint32, and ufix1. The port data types are inherited from the signals that drive the block. The input reset port supports double and boolean typed signals.
Note
This block works for cases
|
To define the convolutional encoder, use the Trellis structure parameter. This parameter is a MATLAB structure whose format is described in Trellis Description of a Convolutional Encoder in the Communications Toolbox documentation. You can use this parameter field in two ways:
If you have a variable in the MATLAB workspace that contains the trellis structure, enter its name as the Trellis structure parameter. This way is preferable because it causes Simulink to spend less time updating the diagram at the beginning of each simulation, compared to the usage described next.
If you want to specify the encoder using its constraint length, generator polynomials, and possibly feedback connection polynomials, use a poly2trellis command within the Trellis structure field. For example, to use an encoder with a constraint length of 7, code generator polynomials of 171 and 133 (in octal numbers), and a feedback connection of 171 (in octal), set the Trellis structure parameter to
poly2trellis(7,[171 133],171)
The encoder registers begin in the all-zeros state. You can configure the encoder so that it resets its registers to the all-zeros state during the course of the simulation. To do this, set the Operation mode to Reset on nonzero input via port. The block then opens a second input port, labeled Rst. The signal at the Rst port is a scalar signal. When it is nonzero, the encoder resets before processing the data at the first input port.

MATLAB structure that contains the trellis description of the convolutional encoder.
In Continuous mode, the block retains the encoder states at the end of each frame, for use with the next frame.
In Truncated (reset every frame) mode, the block treats each frame independently. I.e., the encoder states are reset to all-zeros state at the start of each frame.
In Terminate trellis by appending bits mode,
the block treats each frame independently. For each input frame, extra
bits are used to set the encoder states to all-zeros state at the
end of the frame. The output length is given by
, where x is
the number of input bits, and
(or,
in the case of multiple constraint lengths, s =sum(ConstraintLength(i)-1)).
The block supports this mode for frame-based inputs only.
In Reset on nonzero input via port mode, the block has an additional input port, labeled Rst. When the Rst input is nonzero, the encoder resets to the all-zeros state.
When you select Output final state, the second output port signal specifies the output state for the block. The output signal is a scalar, integer value. You can select Output final state for all operation modes except Terminate trellis by appending bits .
When you select Specify initial state via input port the second input port signal specifies the starting state for every frame in the block. The input signal must be a scalar, integer value. Specify initial state via input port appears only in Truncated operation mode.
Selecting this option opens the field Puncture vector.
Vector used to puncture the encoded data. The puncture vector is a pattern of 1s and 0s where the 0s indicate the punctured bits. This field appears when you select Punctured code.
For some commonly used puncture patterns for specific rates and polynomials, see the last three references listed on this page.
[1] Clark, George C. Jr. and J. Bibb Cain, Error-Correction Coding for Digital Communications, New York, Plenum Press, 1981.
[2] Gitlin, Richard D., Jeremiah F. Hayes, and Stephen B. Weinstein, Data Communications Principles, New York, Plenum, 1992.
[3] Yasuda, Y., et. al., "High rate punctured convolutional codes for soft decision Viterbi decoding," IEEE Transactions on Communications, Vol. COM-32, No. 3, pp 315–319, March 1984.
[4] Haccoun, D., and Begin, G., "High-rate punctured convolutional codes for Viterbi and Sequential decoding," IEEE Transactions on Communications, Vol. 37, No. 11, pp 1113–1125, Nov. 1989.
[5] Begin, G., et.al., "Further results on high-rate punctured convolutional codes for Viterbi and sequential decoding," IEEE Transactions on Communications, Vol. 38, No. 11, pp 1922–1928, Nov. 1990.
![]() | Convolutional Deinterleaver | Convolutional Interleaver | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |