Communications Blockset | ![]() ![]() |
Unbuffering to Convert Vectors to Scalars
After the Convolutional Encoder block encodes the data, the goal is to modulate the codewords. However, the codewords are vectors of length two, while this model chooses to modulate, transmit, and quantize only scalar data. Thus an intermediate step converts the vector codewords into a scalar signal. The Unbuffer block, in the DSP Blockset, performs this intermediate step. To check the sizes of the input and output of the Unbuffer block, try the technique mentioned in Digression: Exploring Signal Sizes.
The Unbuffer block is a multirate block, which means that its input sample rate differs from its output sample rate. In this case, the Unbuffer block receives one length-two codeword every second and outputs a scalar every half second.
Digression: Exploring Sample Times
Because sample times are important in communication system simulation, this section explains two techniques for gathering information about the sample times of components of a model. These techniques can be useful for determining what parameters you should use for a block or for diagnosing problems in a model.
Exact Sample Time of a Signal. To check the sample time of any signal in the model, attach a Probe block to the signal's line. The Probe block resides in Simulink's Signals & Systems library. Simply drag a Probe block into the model window, attach its input port to the signal line you want to examine, and then update the diagram by selecting Update diagram from the model window's Edit menu. The first number after the Ts
or Tf
notation on the Probe block's icon is the length of time between updates of that signal. (In the case of frame-based signals, the Tf
notation indicates that the number shown is the period of the entire frame signal, not the period of each row of the frame.) For more information, see the reference entry for the Probe block in the Simulink documentation set. In this model, a Probe block attached to the line that leads out of the Unbuffer block shows a sample time of 0.5 second.
Relative Sample Times in the Model. Another way to explore sample times is to turn on the sample time coloring feature for the whole model. Use the Sample time colors option in the model window's Format menu to toggle the coloring feature on and off. If sample time coloring is on, then blocks with the same sample time have the same color. In this example, the Unbuffer block becomes yellow because it is a multirate block. Also, the blocks before and after the Unbuffer block have different colors because they have different sample times. For more information about sample times, refer to Simulink documentation.
![]() | Encoding Using a Convolutional Code | Modulating the Encoded Messages | ![]() |