Hauptinhalt

Binary Cyclic Encoder

Create systematic cyclic code from binary vector data

  • Binary Cyclic Encoder block

Libraries:
Communications Toolbox / Error Detection and Correction / Block

Description

The Binary Cyclic Encoder block creates a systematic cyclic code with message length K and codeword length N. For more information, see Binary Cyclic Coding.

Examples

expand all

This example shows how to model a simple encoder and decoder using appropriate vector lengths for the code and message.

The cm_binary_cyclic model includes these blocks:

  • Bernoulli Binary Generator block with Samples per frame set to 4 to match the binary cyclic encoder message length

  • Binary Cyclic Encoder block with default parameter values

  • Binary Cyclic Decoder block with default parameter values

  • Error Rate Calculation block with Output data set to Port

  • Display block connected to the output port of the Error Rate Calculation block

To display the vector length of signals in the model, go to Debug > Diagnostics > Information Overlays > Signals and select Signal Dimensions. The connector lines show the signal attributes. To compile the model, press Ctrl+D. Run the model to display the error rate statistics.

Ports

Input

expand all

Message to encode, specified as a column vector input signal containing K elements. The Message length K, or generator polynomial parameter determines K. This port is unnamed on the block mask.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean

Output

expand all

Encoded message, returned as a binary column vector containing N elements and having the same data type as the input port, In. The Codeword length N parameter determines N. This port is unnamed on the block mask.

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Codeword length, specified as a positive integer. For more information, see Binary Cyclic Coding. The codeword length is also the output vector length.

Message length of the systematic cyclic code or an (NK)-degree generator polynomial, where N is the Codeword length N parameter value.

  • When this parameter is an integer, the block uses the output of cyclpoly(N,K,'min') as the generator polynomial for the code.

  • When this parameter is a vector, the vector must represent an (NK)-degree generator polynomial.

For more information, see Binary Cyclic Coding.

Block Characteristics

Data Types

Boolean | double | fixed point | integer | single

Multidimensional Signals

no

Variable-Size Signals

no

More About

expand all

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced before R2006a