An FBAR weighing a protein, a 77 GHz radar ranging a car, a lidar counting photons off a wall, and an interferometer measuring optical phase are four entirely different pieces of physics. They share exactly one thing.
Change the physics and you change the derivative. You do not change the law.
The capstone
Plotted against the resource each instrument spends — integrated SNR, photons, samples — all four fall on the same slope of −1/2. Not approximately. The radar and lidar points are Monte Carlo output from simulations in this repository, not curve fits, and their fitted exponents come out at −0.497 and −0.505.

The central result
A film bulk acoustic resonator's Sauerbrey mass sensitivity grows as the square of its operating frequency, Sm = −2f₀²/Za. Every FBAR biosensor paper says so, usually in the abstract. A 2 GHz aluminium-nitride device shifts 2,229 Hz per ng/cm² against a 5 MHz quartz microbalance's 0.057 Hz — a factor of thirty-nine thousand.
But the frequency noise referred to the same measurement grows too. From the resonator's phase slope ∂φ/∂f = 2Q/f₀ and the phase-estimation bound σφ = 1/√(2·SNR), the f₀² cancels against the f₀:
And Q·f is pinned near a material constant by Akhiezer phonon damping — around 10¹³ Hz for AlN.
At fixed Q·f, raising the operating frequency does not lower the detection limit. From 1 GHz to 10 GHz the sensitivity rises by a factor of 251 and the LOD does not move at all.
The test suite asserts this to a relative tolerance of 1e−9. If the claim ever stops being true, the build goes red.

There is also a 43 dB gap between the Cramér–Rao floor and what the same device achieves once flicker noise and thermal drift are in the model. That gap is not a rounding error. It is where the entire engineering discipline lives.
Why Simulink is here and not decorative
The MATLAB modules describe the device — an equivalent circuit, an impedance, a sensitivity, a bound. None of that is dynamic. The Simulink model describes the instrument around it, and it earns its place by producing a result the static analysis cannot.

The model is built by script, not shipped as a binary. An .slx is opaque to git: you cannot diff it, review it, or see what changed in a pull request. buildFbarPLL.m is the source of truth; the model file is a build artefact that CI regenerates.
What's in the repository
Physical parameters → mBVD circuit → impedance and S-parameters → Q and kt² extracted from the swept response the way a VNA would. Sauerbrey mass sensitivity, detection limit, and a three-stage ladder filter whose mass-loading layer is computed in nanometres of molybdenum.
A real 77 GHz FMCW chain: waveform → transmitter → two-way free space → RCS target on a moving platform → receiver → dechirp → range-Doppler. Plus an analytic Monte Carlo against the bound, showing the threshold cliff.
Photon-counting time of flight. A 1 ns pulse is 30 cm of light; with 10,000 photons the precision is 3 mm. Then background light, and the 1/R² photon budget that makes σR grow linearly with range.
Quantum Fisher information for coherent, squeezed and NOON probes, with detection loss. Two results are derived symbolically, not asserted: that Poisson statistics give Var(n) = ⟨n⟩ and hence 1/√N, and that a lossy NOON state is optimal at exactly N = −2/ln η photons.
The capstone figure. Fits the log-log exponent of every modality and measures how far each real instrument sits from its own bound.
The readout system, not the device. A phase-locked loop tracks the resonance while flicker noise pushes it around and an analyte binds at t = 2 s. Built by script, so it is reviewable in a diff.





Verification
Twenty-six of them. Each asserts a claim made in prose somewhere in this project, so that if the prose stops being true the build goes red.
>> runtests('tests/tOntos.m') Running tOntos .......... .......... ...... Done tOntos 26/26 passed, 0 failed, 0.6 s
| Test | Asserts |
|---|---|
| couplingRoundTripIsExact | kt² → (fs, fp) → kt² recovers to 1e−12 |
| ieeeAndApproxBracket… | the IEEE Std 176 tangent form under-reads and the linearised form over-reads — they bracket the truth, so quoting one alone is a one-sided error bar |
| extractedQMatchesInput… | Q recovered from the conductance half-power bandwidth equals the Q that went in, to 0.5% |
| sauerbreyReproducesTheTextbookQCM | the 5 MHz AT-cut constant comes out at 0.0566 Hz per ng/cm² |
| lodIsFlatInFrequencyAtConstantQf | sensitivity scales as f², LOD does not move — to 1e−9 |
| ladderCascadeAgreesWithNodal… | the ABCD cascade matches a hand-solved voltage divider to 1e−10 — two independent derivations, one answer |
| reflectionAgreesWithRFToolbox | S11 matches RF Toolbox z2s to 1e−10 |
| massLoadingThicknessIsPlausible | the shunt detune lands at 23 nm of Mo — a units error would surface here immediately |
| radarEstimatorReachesItsBound | Monte Carlo efficiency stays in [0.65, 1.5] above threshold |
| lidarObeysInverseRootN | fitted exponent = −0.5 ± 0.05 |
| lossyNoonOptimumMatchesClosedForm | the numerical minimum sits at −2/ln η, ±1 photon |
Reproducing it
>> run_all % every figure, then the test suite (~90 s) >> run_all('Tests', false) % figures only >> run_all('Only', [3 7]) % just the two headline figures >> runtests('tests/tOntos.m') % verification on its own (~2 s) % or use the library directly p = fbarParams('f_s', 2.4e9, 'kt2', 0.15, 'Q', 900); % a ScAlN device m = fbarResonances(p); % f_s, f_p, Q, k_t^2 from the sweep L = fbarLOD(p, 'Pc_dBm', -20); % detection limit + Allan bathtub F = fbarLadder(p, 'Stages', 4); % four-stage ladder and its S-parameters
| Product | Needed for |
|---|---|
| MATLAB R2025b | everything |
| Simulink | the readout loop |
| Control System | flicker-noise shaping filter |
| Signal Processing | windowing in the radar demo |
| Statistics & ML | Poisson photon arrivals |
| Symbolic Math | the two derivations in the quantum module |
| RF Toolbox | the independent S-parameter cross-check |
| Phased Array | the FMCW radar chain |
The FBAR module — the core of the repository — needs base MATLAB only. That is deliberate: the physics should not be behind a licence.
Honest accounting
Stated plainly, because a showcase that oversells itself is worth less than one that doesn't.