Once a codeword has been found to represent a source message, it can be sent through a channel, with the result that certain data is received as the output of the channel, which will be related to the codeword sent, but with random noise. This software currently handles only memoryless binary channels, for which each bit sent through the channel results in a separate piece of data being received, and the noise affecting one bit is independent of the noise affecting other bits.
For a Binary Symmetric Channel (BSC), each bit sent results in a bit being received. The bit received differs from the bit sent with some error probability, p, which is the same for 0 bits and for 1 bits. In other words, the probability distribution for the bit received given the bit sent is as follows:
P(receive 1 | send 1) = P(receive 0 | send 0) = 1-p
P(receive 1 | send 0) = P(receive 0 | send 1) = p
For an Additive White Gaussian Noise (AWGN) channel, the data received at each time is equal to the data sent plus Gaussian noise with mean zero and some standard deviation, s, independently for each bit. For this software, the data sent is -1 for a 0 bit and +1 for a 1 bit. In other words, the distribution of the received data given the bit sent is as follows:
data received | send 1 ~ N(+1,s2)
data received | send 0 ~ N(-1,s2)
It is typically assumed that the standard deviation of the noise varies with the rate at which bits are sent, increasing in proportion to the square root of the rate. The error rate obtained from sending unencoded bits at rate R will then be the same as is obtained using a code that repeats each bit n times, and sends these bits at rate nR (assuming optimal decoding of each bit by thresholding the sum of the n channel outputs corresponding to that bit). Another way of looking at this scaling for s is that when bits are send at a lower rate, the receiver will be accumulating the channel output for a longer time, with the result that the amount of noise will decrease (relative to the signal) as a result of averaging.
To account for this, it is common to compare codes for AWGN channels in terms of their bit error rate and the value of
Eb / N0 = 1/2Rs2at which they operate, where R=K/N is the rate of the code, and s is the noise level at which the code achieves the quoted bit error rate. Hence, a code operating at a higher rate is allowed to assume a lower noise level to make the comparison fair. It is common to quote Eb / N0 in decibels (db), equal to 10 log10(Eb / N0).
Simulates the transmission of the bits in
encoded-file through a channel, with the received data
being stored in received-file. Typically,
encoded-file will have been produced by the encode program, but it could
also come from rand-src
or another program. If newlines separate blocks in
encoded-file, these block boundaries will be preserved
in received-file.
Alternatively, a count of zeros to transmit can be given, rather
than a encoded-file. This count can be the product of the
block size and the number of blocks, written with x
separating these numbers, with no spaces. The
received-file will mark the block boundaries with
newlines, assuming a block size of one if a simple bit count is given.
Note that zero messages are sufficient for assessing the performance
of a linear code with a symmetrical channel and a symmetrical decoding
algorithm.
The transmission will be corrupted by random noise, which will be
generated pseudo-randomly based on seed. The actual
random seed used will be seed times 10 plus 3, so that
the stream of pseudo-random numbers will not be the same as any that
might have been used by another program.
The fourth argument specifies the type of channel, currently either
bsc (or BSC) for the Binary Symmetric Channel, or
awgn (or AWGN) for the Additive White Gaussian
Noise channel. The channel type is followed by an argument
specifying the characteristics of the channel, as follows:
BSC: The probability that a bit will be flipped by noise - ie, the
probability that the bit received is an error.
AWGN: The standard deviation of the Gaussian noise that is added to the
encodings of the bits.
transmit: Transmit bits through a
simulated channel.
transmit encoded-file|n-zeros received-file seed channel
where channel is one of the following:
bsc error-probability
awgn standard-deviation
See the description of channel transmission
for more details.
Examples: The command:
If an AWGN channel is used instead, as follows:0000000000 1000000000 0100000000
-1.58 -0.78 -0.67 -1.31 -1.29 -0.43 +0.10 -1.26 -1.89 -0.67 -2.93 -1.99 -0.25 -1.47 -1.13 -2.68 -0.60 -1.35 -0.69 -0.24 -0.78 +0.05 -1.16 -1.49 -1.15 -1.31 +0.01 -1.10 +0.24 -1.74