Download Communications Blockset User`s Guide

Transcript
2
Using the Communications Blockset
Using Block Encoders and Decoders Within a Model
Once you have configured the coding blocks, a few tips will help you place them
correctly within your model:
• If a block has multiple outputs, then the first one is always the stream of
coding data.
The Reed-Solomon and BCH blocks have an error counter as a second output.
• Be sure the signal sizes are appropriate for the mask parameters. For
example, if you use the Binary Cyclic Encoder block and set Message
length K to 4, then the input signal must be a vector of length 4.
If you are unsure about the size of signals in your model, then selecting
Signal dimensions from the model’s Format menu may help.
Examples of Block Coding
This section presents two example models. The first example processes a
Hamming code using the binary format and the second example processes a
Reed-Solomon code using the integer format.
Example: Hamming Code in Binary Format
This example shows very simply how to use an encoder and decoder. It
illustrates the appropriate vector lengths of the code and message signals for
the coding blocks. Also, because the Error Rate Calculation block accepts only
scalars or frame-based column vectors as the transmitted and received signals,
this example uses frame-based column vectors throughout. (It thus avoids
having to change signal attributes using a block such as Convert 1-D to 2-D.)
To open the completed model, click here in the MATLAB Help browser. To
build the model, gather and configure these blocks:
• Bernoulli Random Binary Generator, in the Comm Sources library
- Set Probability of a zero to .5
2-32