Products & Services Solutions Academia Support User Community Company

Learn more about Communications Toolbox   

Binary Symmetric Channel

Section Overview

A binary symmetric channel corrupts a binary signal by reversing each bit with a fixed probability. Such a channel can be useful for testing error-control coding.

To model a binary symmetric channel, use the bsc function. The two input arguments are the binary signal and the probability, p.

To model a binary channel whose statistical description involves the number of errors per codeword, see the description of randerr in Random Bit Error Patterns.

Example: Introducing Noise in a Convolutional Code

The example below introduces bit errors in a convolutional code with probability 0.01.

t = poly2trellis([4 3],[4 5 17;7 4 2]); % Trellis
msg = ones(10000,1); % Data to encode
code = convenc(ones(10000,1),t); % Encode using convolutional code.
[ncode,err] = bsc(code,.01); % Introduce errors in code.
numchanerrs = sum(sum(err)) % Number of channel errors
dcode = vitdec(ncode,t,2,'trunc','hard'); % Decode.
[numsyserrs,ber] = biterr(dcode,msg) % Errors after decoding

The output below shows that the decoder corrects some, but not all, of the errors that bsc introduced into the code. Your results might vary because the channel errors are random.

numchanerrs =

   158


numsyserrs =

    53


ber =

    0.0053
  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS