Up until now, the detectors you have designed have been for binary communications: Each transmitted
waveform is selected from a set of 2 possible waveforms and conveys one bit of information (since
one bit is required to select one of two possibilities). Now we will consider M-ary communications where M is
greater than 2. In this case there are M possible waveforms. Since log
2(M) bits are required to select one
of M possibilities, each waveform conveys log
2(M) bits of information. Now each transmitted waveform
represents a log
2(M)-bit
symbol.This exercise builds on the already familiar baseband modulation by generalizing to the case of M = 8
symbols. This means each symbol represents log
2(8) = 3 bits. Modulation is straightforward as well as most of the detection process. But look out, you'll
have to generalize the functionality of the DECISION block to complete the assignment! All this will be used to
process the secret message contained in the file
bb8data.mat
The system specifications are summarized by the constellation and data below:
normalized symbol rate: average energy: pulse shape: symbol clock offset: input file: input message length:
| 1/16 symbol/sample 189 HS 0 sec bb8data.mat63 symbols (189 bits or 27 ASCII characters)
|
Design the 8-ary baseband detector using blocks from the SIMULINK Block Library and the
Communications Toolbox Simulink Block Library.
The only thing that is really new here is how the
DECISION block works. Clearly, the decision is based on which constellation point is closest to the
projection of r[n] onto the signal space. There are several ways to do this, such as nested if statements comparing the projection of r[n] with the decision boundaries, or fooling with the magnitude and the sign of the projection
of r[n], etc. The most straightforward thing to do is to compute the squared Euclidean distance
between the projection of r[n] and all the points in the signal space and choose the index of smallest one as the output.
You can use basic blocks from the Simulink block set to compute the squared Euclidean distance
between the current projection and the M possible constellation points. To determine the index of
the smallest, use the following block.
DSP Blockset -> Statistics -> Minimum
When the parameter mode is set to index, this block returns the index of the minimum element in a vector input. The index is in the
range [1,M]. But we need [0,M-1]. So you'll need to subtract 1 from the block output.
Hint: If you enter a row vector for the contant, the output will be a vector. When the inputs to
the sum or product blocks are a scalar and a vector, the sum or product of the scaler and each of
the elements in the vector input are computed. The resulting sum or product is also a scalar. Do
you see?
Test the Demodulator Design
Test your design using the following procedure:
| 1 | Design a modulator (below) to meet the above specifications except make the input the four
symbol sequence 0 2 5 6 (See the notes on non-binary sources.)
|
| 2 | Connect the output of your modulator to the input of your detector.
|
| 3 | Set the simulation parameters as follows: Start Time: Stop Time: Solver options
Fixed step size:
| 0.0 5*16 Type: Fixed-step discrete (no continuous states) 1
|
|
| 4 | Run the simulation and plot the received signal r[n] and matched filter output.
|
| 5 | Adjust the offset of the Downsample block to obtain the proper values. You may need to run
the simulation to stop time of 6*16 depending on the offset you use. Does the output agree with the
input sequence (0 2 5 6)?
|
| 1 | Replace the modulator blocks with the From File block and set the Filename to bb8data.mat
|
| 2 | Set the simulation parameters as follows: Start Time: Stop Time: Solver options
Fixed step size:
| 0.0 (63+2)*16 Type: Fixed-step discrete (no continuous states) 1
|
|
| 4 | The detector produces approximately 65 symbol estimates.
63 of these correspond to 27 7-bitASCII characters. Use your matlab
scripts or the on-line ASCII table to determine the message contained in the modulated data.
|
| 5 | Email your answer to ee485ta "at" byu.edu Attach to your email message, the simulink model file (.mdl) that contains your detector
design.
|
| 6 | Plot the eye diagram and signal space projections. You may either attach the plots to your email
message (preferred method) or turn in the plots at the beginning of the next class period.
|
Back to the
ECEn 485 Simulink Exercise Page.