BPSK Waveform Decoding using Matched Filter (Convolution)
Stage 1: Noisy BPSK Stream x[n] (Observe Phase Flips)
Stage 2: Filter Output y[n] (Convolution Peaks at Yellow Sticks)
Simulation Methodology: BPSK Convolution
In BPSK, the pulse shape is a sine wave. To decode this optimally, we use a Direct Matched Filter whose impulse response is a time-reversed version of the carrier cycle.
1. The Linear Convolution: The green waveform is generated by sliding the BPSK template across the noisy input stream. Mathematically:
y[n] = Σ x[k] · h[n - k]
Because the BPSK carrier is perfectly "matched" to the filter h[n], the output constructively interferes to create a Positive Peak for bit '1' and a Negative Peak for bit '0'.
2. Noise Suppression: Even at 5dB SNR, where the input (Stage 1) is nearly indistinguishable, the convolution process accumulates signal energy over the entire bit period. Random noise, being zero-mean, does not accumulate effectively, allowing the signal peak to "rise" above the noise floor.
3. Optimal Sampling: The Yellow Sticks represent the symbol clock. We sample the output of the convolution exactly when the current bit is fully contained within the filter's memory. This is the point of Maximum Likelihood.
Mathematical Principles
1. BPSK Modulation
Binary data is mapped to a phase-shifted carrier wave. The amplitude $A$ and carrier frequency $f_c$ define the pulse shape.
$$s(t) = A \sin(2\pi f_c t + \phi)$$
Where the phase $\phi = 0$ represents bit '1' and $\phi = \pi$ represents bit '0'.
2. Noise Modeling (AWGN)
The simulator adds Additive White Gaussian Noise ($n$). The noise standard deviation ($\sigma$) is derived from your SNR input:
$$\sigma = \sqrt{\frac{A^2 / 2}{10^{(SNR_{dB}/10)}}}$$
The resulting noisy signal is $r(t) = s(t) + n(t)$.
3. Matched Filter Convolution
To recover the signal, we convolve the input with a "template" of the original carrier $h[n]$. This acts as a mathematical correlator:
$$y[n] = \sum_{k=0}^{M} r[n-k] \cdot h[k]$$
The convolution process concentrates the signal power into a single peak while the random noise components ($mean \approx 0$) average out.
4. Threshold Decision
At the end of each bit period $T_b$, the output $y[n]$ is sampled. We apply a Maximum Likelihood decision rule:
$$\text{Decision} = \begin{cases} 1 & \text{if } y(T_b) > 0 \\ 0 & \text{if } y(T_b) \le 0 \end{cases}$$