Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FSO Baseline SNR: Theory and Experimental Benchmarking

This repository started as theory notes for free-space optical (FSO) receiver SNR. It now also includes a lightweight experimental baseline for a photodiode-based digital OOK link using a fast steering mirror (FSM) for static alignment.

The goal is to keep the physics reference intact while adding lab-ready measurement conventions, data templates, and simple Python scripts that turn oscilloscope/FSM scan data into repeatable baseline metrics.

What This Baseline Measures

The first experimental benchmark is a static FSM alignment scan:

  1. Hold the optical transmitter in known OOK low/high states.
  2. Sweep FSM X/Y commands around the nominal alignment point.
  3. Record photodiode receiver voltages and noise at each FSM point.
  4. Reject or flag clipped measurements.
  5. Select the best repeatable point by SNR, not by peak voltage alone.

The best static FSM command is the highest repeatable SNR point without ADC, TIA, or oscilloscope clipping. This point becomes the reference for later jitter injection and correction-algorithm tests.

Digital OOK Measurement Conventions

For all digital OOK measurements in this repository:

  • Delta V = V_high - V_low
  • SNR_step = (Delta V)^2 / sigma^2
  • SNR_decision = ((Delta V / 2)^2) / sigma^2
  • SNR_step_dB = 20 log10(Delta V / sigma)
  • SNR_decision_dB = 20 log10((Delta V / 2) / sigma)
  • Q-factor = (mu_high - mu_low) / (sigma_high + sigma_low)
  • BER estimate = Q((mu_high - mu_low) / (sigma_high + sigma_low))

For static scan data, the scripts use the explicit noise_used_v column when it is provided. If that field is blank, they use max(sigma_high_v, sigma_low_v) as a conservative scalar noise value for the SNR calculations. The Q-factor and BER estimate always use the separate high and low state standard deviations.

Repository Map

Quick Start

Install the small analysis stack:

python -m pip install -r requirements.txt

Analyze a static FSM scan:

python scripts/analyze_fsm_static_scan.py \
  data/templates/fsm_static_scan_template.csv \
  --output-dir results/fsm_static_scan

Plot one metric from an annotated scan CSV:

python scripts/plot_snr_heatmap.py \
  results/fsm_static_scan/fsm_static_scan_template_metrics.csv \
  --value-column snr_step_db \
  --output results/fsm_static_scan/snr_step_db_heatmap.png

Compare later jitter/correction cases:

python scripts/compare_jitter_cases.py path/to/jitter_cases.csv \
  --baseline-case static_baseline \
  --output-dir results/jitter_comparison

Optical Receiver Physics & Link Characterization: Reference Notes

Personal reference notes on SNR, noise summation, square-law detection, and BER for direct-detection optical links. Compiled while studying ahead of an FSO baseline characterization experiment.


Module 01: The Physical Definition of Raw SNR

When characterizing an optical communication link on a laboratory oscilloscope, the Signal-to-Noise Ratio (SNR) is a physical, un-normalized measurement of signal power relative to noise power captured within the active receiver sampling bandwidth ($B$).

1. Components of the Signal

The voltage waveform displayed on the screen alternates between two distinct voltage states:

  • $V_{\text{low}}$: baseline voltage when the transmitter laser is completely OFF.
  • $V_{\text{high}}$: average voltage when the transmitter laser is completely ON.
  • $\Delta V$: the meaningful signal amplitude step: $$\Delta V = V_{\text{high}} - V_{\text{low}}$$

2. Statistical Profile of the Noise

The "fuzziness" of the lines on screen maps directly to random background electronic noise fluctuations.

  • Standard Deviation ($\sigma$): the AC RMS voltage of the waveform during a steady static state.
  • Variance ($\sigma^2$): electrical power through a load resistor $R_L$ scales as $P = V^2/R_L$, so variance represents the total noise power of the system.

3. The Raw SNR Equation

$$\text{SNR}_{\text{electrical}} = \frac{(\Delta V)^2}{\sigma^2}$$

Warning

Bandwidth filter impact: widening the scope's analog bandwidth filter ($B$) lets in more high-frequency noise, raising $\sigma$ and dropping the observed SNR — even though the underlying laser power hasn't changed.


Module 02: Advanced Noise Summation Mechanics

Multiple independent physical phenomena generate background noise in an optical receiver simultaneously. Because these sources are statistically independent, their variances (powers) add linearly, not their voltages:

$$\sigma_{\text{total}}^2 = \sigma_{\text{thermal}}^2 + \sigma_{\text{dark}}^2 + \sigma_{\text{quant}}^2 + \sigma_{1/f}^2 + \sigma_{\text{shot}}^2 + \sigma_{\text{RIN}}^2$$

1. Constant Baseline Noise Sources (present in both ON and OFF states)

  • Thermal noise ($\sigma_{\text{thermal}}^2$): thermal agitation of electrons in the photodiode load resistor and TIA channels. Constant — depends only on temperature and circuit design.
  • Dark current noise ($\sigma_{\text{dark}}^2$): leakage current present even with zero incident light, from spontaneous electron-hole generation in the semiconductor.
  • Flicker / $1/f$ noise ($\sigma_{1/f}^2$): low-frequency drift from crystal lattice traps; causes the baseline to wander over long holds.
  • Quantization noise ($\sigma_{\text{quant}}^2$): ADC rounding error when digitizing the waveform.

2. Signal-Dependent Noise Sources (alters the ON-state shape only)

  • Quantum shot noise ($\sigma_{\text{shot}}^2$): photon arrival is a discrete Poisson process, so variance is directly proportional to the average photocurrent ($I_{\text{photo}}$). Maximal when the laser is ON, zero when OFF.
  • Relative Intensity Noise ($\sigma_{\text{RIN}}^2$): amplitude fluctuations from the laser cavity itself; scales quadratically with intensity.

3. The Variance-Subtraction Calibration Trick

Because the baseline electronic noise terms are identical in ON and OFF states, measuring both and subtracting variances isolates the pure optical noise contribution:

$$\sigma_{\text{ON}}^2 - \sigma_{\text{OFF}}^2 = \sigma_{\text{shot, laser}}^2 + \sigma_{\text{RIN}}^2$$


Module 03: Square-Law Detection & Linear Cross-Term Beating

1. RF Linear Field Detection

An RF antenna tracks the field amplitude $E$ linearly, preserving phase information: $I_{\text{RF}} \propto E$. A 3 dB boost in transmitted field power maps directly to a 3 dB boost in receiver electrical SNR.

2. Optical Square-Law Detection

A photodiode can't track optical-frequency field oscillations directly — it responds to power, proportional to $|E|^2$:

$$P_{\text{electrical}} \propto (P_{\text{optical}})^2$$

Note

The 2-for-1 dB rule: a 1 dB drop in optical power causes a 2 dB drop in electrical signal power on the scope. This holds cleanly in a thermal-noise-limited system. Once shot noise dominates (which it will, since shot noise itself scales with $P_{\text{opt}}$), the noise floor moves as you attenuate, and the relationship softens — useful as a mental anchor, not an exact law in the shot-noise regime.

3. Linear Noise Cross-Terms (Signal–ASE Beating)

Adding an optical amplifier (e.g. EDFA) injects an Amplified Spontaneous Emission (ASE) noise field $E_{\text{ase}}$. Square-law expansion of the combined field produces a linear mixing term:

$$\text{Total Current} \propto |E_{\text{sig}} + E_{\text{ase}}|^2 = |E_{\text{sig}}|^2 + \mathbf{2E_{\text{sig}}E_{\text{ase}}} + |E_{\text{ase}}|^2$$

$$\sigma_{\text{sig-ase}}^2 = 4 R_{\text{resp}}^2 \cdot P_{\text{sig}} \cdot S_{\text{ase}} \cdot B$$

At high power this term dominates thermal noise, simplifying the SNR to a purely linear relationship with optical power:

$$\text{SNR}_{\text{electrical}} \approx \frac{P_{\text{sig}}}{4 \cdot S_{\text{ase}} \cdot B}$$

(Only relevant once an optical amplifier is in the link — not applicable to an unamplified baseline test.)


Module 04: Bit Error Rate (BER) & The Q-Function

The downstream decoder places an electronic Decision Threshold ($V_{\text{threshold}}$) halfway between the average ON and OFF states.

1. The Origin of Digital Flips

  • False alarm ($0 \to 1$): laser OFF, but a large positive noise spike pushes the voltage above threshold at the sampling instant.
  • Missed detection ($1 \to 0$): laser ON, but a negative noise dip pulls the voltage below threshold.

2. The Calculus of the Gaussian Tails

Baseline noise follows a normal Gaussian distribution, so bit-error probability requires integrating the tail areas past the decision threshold — handled by the Q-function, $Q(x)$: the area under a normal curve tail sitting $x$ standard deviations from center.

For symmetric OOK, the distance from a bit state's center to the threshold is $\Delta V / 2$. In units of $\sigma$:

$$\text{BER} = Q!\left(\frac{\Delta V}{2\sigma}\right) = Q!\left(\sqrt{\frac{\text{SNR}_{\text{electrical}}}{2}}\right)$$

Tip

The cliff effect: because $Q(x)$ decays like a Gaussian tail, BER is extremely sensitive to SNR. Raising raw SNR from 7 dB to 14 dB collapses BER from a broken $10^{-2}$ to a practically flawless $10^{-9}$.

Important

Symmetric-noise assumption: this formula assumes $\sigma_{ON} = \sigma_{OFF} = \sigma$. In a real shot-noise-limited link, $\sigma_{ON}$ (thermal + dark + shot + RIN) will be measurably larger than $\sigma_{OFF}$ (thermal + dark only) — which is exactly why the variance-subtraction trick in Module 2.3 matters. The symmetric-noise version is the right one to study the concept with; the true optimal threshold and BER for asymmetric noise will need $\sigma_{ON}$ and $\sigma_{OFF}$ treated separately once real data comes in.


Module 05: Theoretical Normalization via $E_b/N_0$

To make results replicable across labs with different hardware, engineers normalize raw SNR into $E_b/N_0$ (Energy per Bit over Noise Power Spectral Density).

  • $E_b$ (Energy per Bit): $E_b = P_{\text{average}} / \text{Bit Rate}$.
  • $N_0$ (Noise Power Spectral Density): $N_0 = \sigma^2 / B$.

1. The Normalization Formula

$$\text{SNR}_{\text{electrical}} = \frac{E_b}{N_0} \cdot \frac{R}{B}$$

Where $R$ = system bit rate (bps), $B$ = receiver electrical bandwidth (Hz).

2. Applying This to a Static Baseline Test

In a static ON-hold / OFF-hold baseline test:

  • Effective state-switching data rate $R \approx 0\ \text{bps}$.
  • Scope sampling filter $B$ is wide open (e.g. 20–200 MHz).

Because $R/B$ is drastically small in this phase, the raw SNR on screen will look artificially tiny, even though the laser has plenty of underlying bit energy ($E_b$). Once modulation is applied to match the data rate to the receiver bandwidth footprint, the raw SNR scales upward to reflect the hardware's true capacity.


Original theory reference notes preserved as the physics foundation for the experimental FSO baseline workflow above.

About

Physics of optical receiver SNR, noise summation, square-law detection, and Q-function BER — reference material for an FSO baseline link characterization experiment.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages