confusing behavior of MIL-STD-188-110B

1 vue (au cours des 30 derniers jours)
Nina Buchanan
Nina Buchanan le 23 Juil 2017
Commenté : Nina Buchanan le 31 Juil 2017
Simulink has a demo model of M110B digital messaging (commmilstd188110b)that encodes a stream from a Bernoulli binary generator, puts it through a channel, and decodes it. A BER metric compares the input and output and, unless the SNR is reduced, typically shows zero errors. However, when I capture the input and output data (by display or to workspace) the numbers are very different. I know there is a delay while the preamble is sent, but I am looking at the end of the streams. I don't understand how BER can tell me the streams are the same while the captured numbers are different. Thanks to anyone who can explain this model.

Réponse acceptée

Abhi Sundararaman
Abhi Sundararaman le 26 Juil 2017
I believe looking at the end of the streams may not be the best way to compare the two signals. Since both data streams end as soon as the simulation ends, there will be data at the end of the input signal that has yet to reach the output signal due to delay. This is why the ends of the signals will never match.
Instead, if you compare the data at the start of the input signal (Tx) to the start of the data AFTER the delay in the output signal (Rx), you will see that the two are the same.
The following code snippet will demonstrate the above:
  • first, add a 'to workspace' block in "array" format for the two signals.
  • input variable called "Tx", and variable output called "Rx".
  • run the model, and then execute the following code:
dataStartIndex = find(Rx);
dataStartIndex = dataStartIndex(1);
outputData = Rx(dataStartIndex:end);
inputDataTrimmed = Tx(1: length(outputData));
%compare the two data sets, input and output
compared = outputData == inputDataTrimmed;
%the above will output a boolean vector, with "1" everywhere the two match.
completeMatch = all(compared); %this will check if they all matched.
The above compares the data that DID reach the output, to the input data. From the above, we can see that the two sets are identical (excluding the end of the input data that did not reach the output in time due to the delay).
  2 commentaires
Nina Buchanan
Nina Buchanan le 26 Juil 2017
Thanks for explaining this! I will try the code.
Nina Buchanan
Nina Buchanan le 31 Juil 2017
This does indeed give the same input and and output. However, I wish to run integers in the range 0-255 (representing extended ASCII characters) through this M110B simulation. For input, I use (in place of the Bernoulli generator) a random uint8 generator at 1/75 sample time and 15 frames per sample into a integer to bit converter (8 bits), and that gives the 120 x 1 input expected by M110B at 600 bps.
Running this way, the boolean input and output are the same once trimmed with the code you suggest above. But if I use a bit to integer converter in the input and output streams prior to Tx and Rx workspace capture, then outputData is not the same as inputDataTrimmed (BER is still zero). How can I recover the uint8 input from the output stream? Thanks again.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Communications Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by