Skip to article frontmatterSkip to article content

Hard Decision Decoding

Soft decision bounds assume unquantized matched filter outputs, optimizing performance but requiring M=2kM = 2^k correlation metrics, which becomes computationally intensive for large MM.

Hard decision decoding (HDD) quantizes these outputs digitally, reducing complexity.

By making binary decisions (0 or 1) per bit, HDD trades some performance for practicality, especially beneficial when the number of codewords is large, simplifying receiver design at the cost of precision.

HDD with Binary Decision

In HDD, each bit’s matched filter output is quantized to two levels (0 or 1), forming a binary symmetric channel (BSC) with crossover probability Proakis (2007, Eq. (7.5-1)):

p=Q(2EcN0)=Q(2γbRc)p = Q\left(\sqrt{\frac{2 \mathcal{E}_c}{N_0}}\right) = Q\left(\sqrt{2 \gamma_b R_c}\right)

Here, Q()Q(\cdot) is the Gaussian tail function, and Ec=RcEb\mathcal{E}_c = R_c \mathcal{E}_b ties error probability to SNR and code rate, modeling the AWGN channel’s effect post-quantization.

Minimum-Distance (Maximum-Likelihood) Decoding

In HDD, the decoder receives nn bits and compares them to all MM possible codewords, selecting the one with the smallest Hamming distance to the received sequence.

This minimum-distance decoding rule is optimal for a BSC, minimizing block error probability by choosing the most likely transmitted codeword based on bit differences, aligning with maximum-likelihood principles under binary quantization.

Minimum-Distance Decoding Rule Implementation

A straightforward but inefficient method computes error vectors em=y+cm\vec{e}_m = \vec{y} + \vec{c}_m (modulo-2) for all MM codewords cm\vec{c}_m, where y\vec{y} is the received sequence.

Each em\vec{e}_m represents the error pattern transforming cm\vec{c}_m into y\vec{y}, with its weight (number of 1s) equaling the Hamming distance.

Selecting the cm\vec{c}_m yielding the smallest weight em\vec{e}_m implements minimum-distance decoding, though this exhaustive approach scales poorly with MM.

Syndrome

A more efficient HDD method uses the parity check matrix H\mathbf{H}.

If cm\vec{c}_m is transmitted and y=cm+e\vec{y} = \vec{c}_m + \vec{e} is received (where e\vec{e} is the error vector), the syndrome is:

s=yHT=cmHT+eHT=eHT\vec{s} = \vec{y} \, \mathbf{H}^{\sf T} = \vec{c}_m \, \mathbf{H}^{\sf T} + \vec{e} \, \mathbf{H}^{\sf T} = \vec{e} \, \mathbf{H}^{\sf T}

Since cmHT=0\vec{c}_m \, \mathbf{H}^{\sf T} = \vec{0}, s\vec{s} depends only on e\vec{e}.

This (nk)(n - k)-dimensional vector identifies parity check failures, enabling error pattern detection without exhaustively testing all codewords, significantly enhancing decoding efficiency.

Detectable and Correctable Capability of HDD

The syndrome s=eHT\vec{s} = \vec{e} \, \mathbf{H}^{\sf T} reflects the error pattern e\vec{e} rather than the transmitted codeword, as cmHT=0\vec{c}_m \, \mathbf{H}^{\sf T} = \vec{0}.

A zero syndrome (s=0\vec{s} = \vec{0}) indicates e\vec{e} is a codeword, leading to an undetected error if e0\vec{e} \neq \vec{0}.

Of the 2n12^n - 1 nonzero error patterns, 2k12^k - 1 match nonzero codewords and are undetectable.

The remaining 2n2k2^n - 2^k are detectable, as their syndromes are nonzero, but not all are correctable.

With only 2nk2^{n - k} distinct syndromes, multiple error patterns map to the same syndrome, limiting correction to one per coset.

Maximum-likelihood (ML) decoding seeks the least-weight error pattern per syndrome, optimizing error correction within this constraint.

Standard Array

A standard array is a decoding table for an (n,k)(n, k) code, listing all 2k2^k codewords in the first row, starting with c1=0\vec{c}_1 = \vec{0}.

The second row begins with e2\vec{e}_2, the minimum-weight non-codeword sequence, followed by cm+e2\vec{c}_m + \vec{e}_2 for each codeword cm\vec{c}_m.

Subsequent rows follow similarly: select the minimum-weight sequence ei\vec{e}_i not yet listed, placing it in the first column, and complete the row with cm+ei\vec{c}_m + \vec{e}_i.

This process continues until all 2n2^n sequences of length nn are included, systematically organizing received sequences by error patterns for decoding purposes.

Standard Array Structure

The resulting table is an 2nk×2k2^{n-k} \times 2^k array:

c1=0c2c2ke2c2+e2c2k+e2e3c2+e3c2k+e3e2nkc2+e2nkc2k+e2nk\begin{array}{llcl} \vec{c}_1 = \vec{0} & \vec{c}_2 & \ldots & \vec{c}_{2^k} \\ \vec{e}_2 & \vec{c}_2 + \vec{e}_2 & \ldots & \vec{c}_{2^k} + \vec{e}_2 \\ \vec{e}_3 & \vec{c}_2 + \vec{e}_3 & \ldots & \vec{c}_{2^k} + \vec{e}_3 \\ \vdots & \vdots & \ddots & \vdots \\ \vec{e}_{2^{n-k}} & \vec{c}_2 + \vec{e}_{2^{n-k}} & \ldots & \vec{c}_{2^k} + \vec{e}_{2^{n-k}} \end{array}

Each row, a coset, groups 2k2^k sequences sharing the same error pattern (first column), called the coset leader.

By construction, coset leaders have the lowest weight in their coset, aligning with ML decoding’s preference for minimal error correction.

EXAMPLE: Standard Array for (5, 2) Code

For a (5, 2) systematic code with generator matrix:

G=[1010101011]\mathbf{G} = \begin{bmatrix} 1 & 0 & 1 & 0 & 1 \\ 0 & 1 & 0 & 1 & 1 \end{bmatrix}

the standard array is:

0000001011101011111000001010101010011111000100100110111111000010001111100011101001000000111110110110100001101100101011101100010011011010011010010110010011101100\begin{array}{cccc} 00000 & 01011 & 10101 & 11110 \\ 00001 & 01010 & 10100 & 11111 \\ 00010 & 01001 & 10111 & 11100 \\ 00100 & 01111 & 10001 & 11010 \\ 01000 & 00011 & 11101 & 10110 \\ 10000 & 11011 & 00101 & 01110 \\ 11000 & 10011 & 01101 & 00110 \\ 10010 & 11001 & 00111 & 01100 \end{array}

With dmin=3d_{\min} = 3, coset leaders include one weight-0 (00000), five weight-1 (e.g., 00001), and two weight-2 (e.g., 11000, 10010) patterns, filling the 252=82^{5-2} = 8 rows, though many double-error patterns are excluded due to space constraints.

Error Detection

For a transmitted codeword cm\vec{c}_m and error pattern ei\vec{e}_i (a coset leader), the received sequence is y=cm+ei\vec{y} = \vec{c}_m + \vec{e}_i.

The syndrome is:

s=yHT=eiHT\vec{s} = \vec{y} \, \mathbf{H}^{\sf T} = \vec{e}_i \, \mathbf{H}^{\sf T}

All sequences in a coset share the same syndrome, as it depends solely on ei\vec{e}_i.

With 2nk2^{n-k} cosets, each has a unique syndrome, establishing a one-to-one mapping between cosets (or their leaders) and syndromes, enabling precise error pattern identification within the coset framework.

Decoding with Syndromes

Decoding y\vec{y} involves finding the least-weight error ei\vec{e}_i such that s=eiHT\vec{s} = \vec{e}_i \, \mathbf{H}^{\sf T}.

Each syndrome uniquely identifies a coset, and the coset leader ei\vec{e}_i—the lowest-weight member—is the ML error estimate.

Adding ei\vec{e}_i to y\vec{y} yields the decoded codeword cm=y+ei\vec{c}_m = \vec{y} + \vec{e}_i. Only coset leaders (up to 2nk12^{n-k} - 1 nonzero patterns) are correctable.

Of 2n12^n - 1 nonzero error patterns, 2k12^k - 1 are undetectable (codewords), 2n2k2^n - 2^k are detectable, and 2nk12^{n-k} - 1 are correctable, delineating the code’s error-handling limits.

Example: Decoding Error in (5, 2) Code

For the (5, 2) code with the standard array previously defined, consider an error vector e=(10100)\vec{e} = (1 \, 0 \, 1 \, 0 \, 0).

The syndrome, computed as s=eHT=(001)\vec{s} = \vec{e} \, \mathbf{H}^{\sf T} = (0 \, 0 \, 1), corresponds to the coset leader e^=(00001)\hat{\vec{e}} = (0 \, 0 \, 0 \, 0 \, 1) from the syndrome table.

Adding e^\hat{\vec{e}} to the received sequence y\vec{y} yields an incorrect codeword, as the actual error (weight 2) differs from the decoded error (weight 1), illustrating a decoding failure due to syndrome ambiguity.

Syndromes and Coset Leaders

The syndrome table for this code lists is presented in Table 1.

Table 1:Syndrome to Error Pattern Mapping

SyndromeError Pattern
00000000
00100001
01000010
10000100
01101000
10110000
11011000
11110010

This code corrects all five single-error patterns (weight 1) and two specific double-error patterns (11000, 10010), limited by the 252=82^{5-2} = 8 syndromes.

MATLAB’s error detection and correction tools can simulate such scenarios, confirming the code’s capabilities.

Error Detection Capability

A zero syndrome (s=0\vec{s} = \vec{0}) indicates the received sequence is a valid codeword, one of 2k2^k possibilities.

Since dmind_{\min} is the minimum separation between codewords, an error pattern of weight dmind_{\min} can transform one codeword into another, resulting in an undetected error.

For errors fewer than dmind_{\min}, the syndrome is nonzero, signaling detection.

Thus, an (n,k)(n, k) code detects up to dmin1d_{\min} - 1 errors, enabling use with automatic repeat-request (ARQ) systems to request retransmission upon detection.

Error Correction Capability

The error correction capability hinges on dmind_{\min}, constrained by the 2nk2^{n-k} syndromes.

Viewing the 2k2^k codewords as points in an nn-dimensional space, each is the center of a sphere with radius tt (Hamming distance).

The maximum tt avoiding sphere overlap is:

t=12(dmin1)\boxed{ t = \left\lfloor \frac{1}{2}(d_{\min} - 1) \right\rfloor }

Sequences within radius tt of a codeword are corrected to it, ensuring unique decoding.

Thus, the code corrects up to tt errors, determined by dmind_{\min}, balancing the trade-off between detection and correction.

Trade-off Between Detection and Correction (ede_d and ece_c)

Correcting tt errors implies detecting at least tt, but a code can detect more errors by reducing correction capability.

For dmin=7d_{\min} = 7, t=62=3t = \left\lfloor \frac{6}{2} \right\rfloor = 3 errors are correctable.

Reducing the sphere radius to 2 allows detection of 4 errors, correcting only 2; or to 1, detecting 5 and correcting 1.

Generally, for dmind_{\min}, the number of detectable errors ede_d and correctable errors ece_c satisfy:

ed+ecdmin1,ecede_d + e_c \leq d_{\min} - 1, \quad e_c \leq e_d

This flexibility allows tailoring the code for detection-heavy (e.g., ARQ) or correction-focused applications, optimizing performance based on channel needs.

Block and Bit Error Probability for HDD

In hard decision decoding (HDD) of linear binary block codes, error probability bounds are derived based solely on error correction.

The optimum decoder for a binary symmetric channel (BSC) correctly decodes if the number of errors is less than half the minimum distance dmind_{\min}, though this is not a strict necessity.

The guaranteed correctable error count is:

t=12(dmin1)t = \left\lfloor \frac{1}{2}(d_{\min} - 1) \right\rfloor

This tt represents the maximum number of errors the code can always correct, leveraging dmind_{\min} to ensure distinct codeword spheres in Hamming space.

Error Probability Bounds

Given the BSC’s memoryless nature, bit errors are independent, with the probability of mm errors in nn bits given by Proakis (2007, Eq. (7.5-5)):

P(m,n)=(nm)pm(1p)nmP(m, n) = \binom{n}{m} p^m (1 - p)^{n-m}

where pp is the crossover probability.

The block error probability PeP_e is upper-bounded by the probability of exceeding tt errors Proakis (2007, Eq. (7.5-6)):

Pem=t+1nP(m,n)P_e \leq \sum_{m=t+1}^{n} P(m, n)

For high SNR (small pp), this approximates to the dominant term:

Pe(nt+1)pt+1(1p)nt1P_e \approx \binom{n}{t + 1} p^{t+1}(1 - p)^{n-t-1}

This binomial approximation highlights the steep decline in error probability as pp decreases, reflecting the code’s robustness at high SNR.

Perfect Code and Quasi-Perfect Code

Equality in the block error bound holds for perfect codes, where all 2n2^n possible sequences are either codewords or exactly tt errors away from one, fully packing the Hamming space.

Hamming codes (n=2nk1n = 2^{n-k} - 1, dmin=3d_{\min} = 3, t=1t = 1) exemplify this, correcting all single errors precisely.

Quasi-perfect codes have disjoint spheres of radius tt around MM codewords, with every sequence at most t+1t + 1 from a codeword.

Their error probability is Proakis (2007, Eq. (7.5-14)):

Pe=m=t+2nP(m,n)+[(nt+1)βt+1]pt+1(1p)nt1P_e = \sum_{m=t+2}^{n} P(m, n) + \left[ \binom{n}{t+1} - \beta_{t+1} \right] p^{t+1}(1 - p)^{n-t-1}

Here, βt+1\beta_{t+1} adjusts for sequences at distance t+1t + 1 not uniquely correctable, refining the bound for such codes.

Alternative Upper and Lower Bounds of PeP_e

Considering two codewords at distance dmind_{\min}, the lower bound on PeP_e is the probability of mistaking one for its nearest neighbor Proakis (2007, Eq. (7.5-15)):

Pem=dmin/2+1dmin(dminm)pm(1p)dminmP_e \geq \sum_{m=\left\lfloor d_{\min}/2 \right\rfloor +1}^{d_{\min}} \binom{d_{\min}}{m} p^m (1 - p)^{d_{\min}-m}

This reflects the minimum error rate from confusing closest codewords.

The upper bound multiplies this by the number of possible incorrect codewords Proakis (2007, Eq. (7.5-16)):

Pe(2k1)m=dmin/2+1dmin(dminm)pm(1p)dminmP_e \leq (2^k - 1) \sum_{m=\left\lfloor d_{\min}/2 \right\rfloor +1}^{d_{\min}} \binom{d_{\min}}{m} p^m (1 - p)^{d_{\min}-m}

For large M=2kM = 2^k, these bounds widen significantly, as the upper bound scales with the codebook size, making them less tight but still illustrative of PeP_e’s range.

General Bounds on Block and Bit Error Probabilities with HDD

For hard decision decoding (HDD), the parameter Δ=4p(1p)\Delta = \sqrt{4p(1 - p)} (where pp is the BSC crossover probability) enables general bounds.

The block error probability PeP_e is bounded using the weight enumerating polynomial A(Z)A(Z) Proakis (2007, Eq. (7.5-17)):

Pe(A(Z)1)Z=4p(1p)P_e \leq (A(Z) - 1) \Big|_{Z=\sqrt{4p(1 - p)}}

A simpler bound leverages the minimum distance Proakis (2007, Eq. (7.5-18)):

Pe(2k1)[4p(1p)](dmin/2)P_e \leq (2^k - 1) \left[4p(1 - p)\right]^{(d_{\min}/2)}

The bit error probability PbP_b uses the input-output weight enumerating function B(Y,Z)B(Y, Z) Proakis (2007, Eq. (7.5-19)):

Pb1kYB(Y,Z)Y=1,Z=4p(1p)P_b \leq \frac{1}{k} \frac{\partial}{\partial Y} B(Y, Z) \Big|_{Y=1, Z=\sqrt{4p(1-p)}}

These bounds quantify HDD performance, reflecting the impact of quantization on error rates.

References
  1. Proakis, J. (2007). Digital Communications (5th ed.). McGraw-Hill Professional.