# Demo — Network Tracker

Three adversary search radars report to one fusion center, and the fusion center keeps a track on your aircraft. Every 10 s each radar sends a report: range and azimuth when it can see you clearly, azimuth only when your noise jammer has denied it range, nothing when it is off. A Kalman filter folds those reports into a position and velocity estimate, and from that estimate it predicts where you will be a missile time-of-flight from now. This demo flies one leg past that network and shows what the track can and cannot know — and what your three levers, **jamming**, **route** and **maneuver**, each do to it.

## The model

Positions are North–East in km, bearings clockwise from North. Radars A, B and C sit at $(60, -50)$, $(80, 10)$ and $(50, 60)$ km and scan together every $T = 10$ s, starting at $t = 0$. A **clear** radar measures range and azimuth; a **jammed** one measures azimuth only (the strobe still points at you); an **off** radar sends nothing. The noise is $\sigma_R = 0.15$ km in range and $\sigma_\theta = 1^\circ$ in azimuth, jammed or not.

The aircraft flies at 250 m/s on one of four routes: **Straight** (due East from $(0, -75)$ to $(0, 75)$, 600 s), **Standoff** (the same leg 35 km farther South, away from the network), **Around** (a route that bends away through $(-35, -40)$ and $(-35, 40)$, with its two 45° turns taken instantly, 716 s), and **S-turns** (heading $\psi(t) = 90^\circ + A\cos(2\pi t/P_w)$ about the straight leg, by default $A = 30^\circ$ and $P_w = 60$ s).

The fusion center runs one extended Kalman filter on the state $\mathbf x = [N\ E\ v_N\ v_E]^\top$ with the nearly-constant-velocity motion model:

$$
F = \begin{bmatrix} I & T I \\ 0 & I \end{bmatrix}, \qquad
Q = \sigma_a^2\, G G^\top, \quad G = \begin{bmatrix} \tfrac{T^2}{2} I \\ T I \end{bmatrix}.
$$

$\sigma_a$ is the acceleration the tracker is willing to believe — its process noise. Each report is linearized at the current estimate with L33's two rows, padded with zeros for the velocity states:

$$
h_R = \left[\tfrac{\Delta N}{R}\ \ \tfrac{\Delta E}{R}\ \ 0\ \ 0\right], \qquad
h_\theta = \left[-\tfrac{\Delta E}{R^2}\ \ \tfrac{\Delta N}{R^2}\ \ 0\ \ 0\right].
$$

A clear report uses both rows, a jammed one only $h_\theta$; then $S = HP^-H^\top + \mathbf R$, $K = P^-H^\top S^{-1}$, $\hat{\mathbf x} = \hat{\mathbf x}^- + K\nu$, $P = (I - KH)P^-$, radar by radar (A, then B, then C). The track starts from an early-warning handover: the true state plus 1 km of error per position axis and 50 m/s per velocity axis. The prediction is $\hat{\mathbf p} + t_f\hat{\mathbf v}$ with $t_f = 30$ s by default, and its error is measured against where the aircraft really is $t_f$ later.

The tiles score the whole run from $t = 100$ s on (the start-up is skipped): the **RMS error** of the estimate, the filter's **claimed** uncertainty $\sqrt{\operatorname{mean}\operatorname{tr}P_{\rm pos}}$, and the **RMS prediction** error. The filter is flagged **overconfident** when its RMS error is more than twice its claim. **Leg time** is the cost of the route; **Lateral accel.** is the weave's peak $V A\omega$.

What the model leaves out: it is 2-D; the scans are synchronous and the radar positions known; there is no clutter, no false alarm and no data association; there is no burn-through (inside $R_{bt}$ a jammed radar would get range back, L17); the jammer is a self-protection jammer, so a strobe points at you, not at a stand-off jammer (L36); and the tracker has only the constant-velocity model, where a real one would run an IMM with a turning model beside it. Every number is notional.

The whole run is computed first, from the settings and the random seed. **Run**, **Step** and the scrubber only reveal it — so the six tiles never change while it animates. The **error inset** is centered on the truth and rescales itself as the errors grow and shrink: it draws the estimate with its 1σ and 2σ ellipses, and the prediction's miss measured from where the aircraft really is $t_f$ later.

## Interactive demo

<a class="demo-fullscreen" href="../_static/demos/NetworkTracker.html" target="_blank" rel="noopener">Open in full screen</a>

<div class="demo-wrap">
<iframe src="../_static/demos/NetworkTracker.html"
        title="Interactive radar-network tracker demo"
        width="100%"
        loading="lazy">
</iframe>
</div>

## Walkthrough

The story chips tell the lesson in order; each one restores the default sliders ($\sigma_a = 1$ m/s², $t_f = 30$ s, $\sigma_\theta = 1^\circ$, $\sigma_R = 0.15$ km). The numbers below are for seed 1. **Re-roll** changes them a little, never the story — except for the lone strobe, whose error is a random walk and changes a lot.

1. **Clear.** Press **Run**. Every 10 s each radar's report lands as a tick at its measured range and azimuth. On the map the track sits on the truth; in the inset the 1σ ellipse is a few hundred meters across. The tiles: RMS error **0.18 km** against a claimed **0.16 km**, and the 30 s prediction misses by **0.43 km** RMS. The range rows do most of the work — $\sigma_R = 0.15$ km along every line of sight, at any distance.
2. **Jammed.** Now every radar is a strobe. The RMS error grows to **0.88 km**, about five times the clear track, and the claim to **1.06 km**; the prediction misses by **1.20 km**. The filter is honest about it (**Overconfident: No**, error ÷ claim 0.83). With range gone, each strobe is a line of position $R\sigma_\theta$ wide — 1.4 km at 80 km — and the fix is where three of them cross.
3. **Lone strobe.** Only B, jammed. Watch the inset scale climb: the claim grows from 1.3 km at $t = 0$ to **16.5 km** at the end (**11.0 km** RMS), and the ellipse ends as a 16.4 × 0.97 km needle lying along B's line of sight. The RMS error, **3.3 km** on this seed, wanders along that needle (seeds 1–10 give 3 to 13 km). The filter knows it does not know (error ÷ claim 0.30). Keep only B jammed and pick the **S-turns** or **Around** route chip: the claim stays at 12.1 and 15.2 km. A ghost aircraft scaled toward or away from B gives the same azimuths on any path, so no maneuver lets one fixed radar range you.
4. **Two strobes.** Pick **Jammed**, then click B on the map (or its chip) once to turn it **off**. The strobes from A and C, two separated sites, still cross: RMS error **1.05 km**, claim **1.20 km**, prediction **1.40 km** — close to three strobes, and nothing like one. They would fail only with the aircraft on the line through A and C, which runs far North of every route here.
5. **Route — Standoff.** From **Clear**, pick **Standoff**: 35 km farther away, the error barely moves (**0.22 km** against 0.18). From **Jammed**, pick **Standoff**: **1.39 km** against 0.88, claim **1.55 km**. Clear, the range rows do not care about distance; jammed, every kilometer of range widens every strobe.
6. **Route — Around.** From **Clear**, pick **Around**. The position error stays small (**0.23 km**) but the prediction error jumps to **1.48 km**: switch the chart to **Prediction error** and the spikes straddle each **turn** mark — a prediction made in the 20 s before a turn extrapolates the old heading, and one made just after still carries the old velocity, missing by up to 5.3 km. A waypoint turn is a maneuver. The leg costs **716 s**, +19.3%. Now pick **Jammed** and **Around**: RMS error **2.44 km** against a claim of **1.51 km**, prediction **4.59 km**. Scrub to 590 s: after the second turn the error has reached 5.3 km while the claim still reads 1.5 km. On seed 1 the whole-run ratio (1.62) stays under the 2× flag, but from the second turn on the error runs 3.5 km RMS against a 1.5 km claim — more than twice. The filter lags the turn and does not know it.
7. **S-turns, $\sigma_a = 1$.** Pick **S-turns**: $A = 30^\circ$ every 60 s costs **1.40 g** of lateral acceleration and **643.5 s** of leg (+7.2%). Two tiles turn red: RMS error **0.38 km** against a claim of **0.16 km** — the same claim as the straight leg — so **Overconfident: Yes** (2.33). In a Kalman filter $P$ never sees the measured values, so the claim cannot notice the weave. The 30 s prediction now misses by **3.42 km** RMS, against 0.43 km on the straight leg; on the **Prediction error** chart it saw-tooths between 0.2 and 4.9 km in step with the weave bands.
8. **S-turns, $\sigma_a = 10$.** Drag $\sigma_a$ to 10 m/s². The tracker now follows the weave: RMS error **0.21 km**, claim **0.20 km**, honest again. But the prediction gets *worse* — **4.02 km** RMS — because a tracker that follows each swing extrapolates each swing. The S-turn hides where you will be far more than where you are.
9. **Straight, $\sigma_a = 10$.** Pick **Clear** and drag $\sigma_a$ to 10 m/s² again. Against the straight flyer the twitchy tracker gives up a little position (**0.21 km** against 0.18) and a lot of prediction: **1.43 km** against 0.43. That is the $\sigma_a$ dilemma — a small $\sigma_a$ predicts a straight flyer well and lies about a maneuvering one; a large one follows the maneuver and predicts nobody well.

One more is worth seeing once: pick **Jammed**, then the **S-turns** route chip ($\sigma_a = 1$). The prediction misses by **1.65 km** RMS — better than the clear network's 3.42 km. The sluggish, jammed tracker smooths the weave to its mean track, and the mean track is where the aircraft keeps coming back to.

## Key observations

- **Their track is an information budget.** Every scan adds information, the motion model's $Q$ forgets some of it, and the prediction extrapolates what is left.
- **Jamming deletes the range row.** A strobe still fixes direction, so jamming costs the network roughly five to six times in position, not the track itself — as long as two separated radars still see you.
- **A lone strobe never ranges you,** whatever path you fly, and its filter knows it: the claim grows with the error.
- **Distance matters to a jammed network, not a clear one.** Range accuracy does not degrade with distance; a strobe's width $R\sigma_\theta$ does.
- **Turns and weaves are maneuvers against a constant-velocity tracker.** Tuned for straight flight, it lags them and reports the same small covariance it always did — overconfident.
- **S-turns mainly hide where you will be.** Raising $\sigma_a$ restores the position track but not the prediction, and every lever has a price: leg time, g, and the aspect you show the radars as the heading swings.

## Source

<a class="matlab-link" href="../_static/downloads/ECE%20495%20EW%20%E2%80%93%20Code.zip#code/L35_NetworkTracker.m" download title="Downloads the full course code bundle (.zip). This lesson&#39;s file: code/L35_NetworkTracker.m"><svg viewBox="0 0 22 22" width="14" height="14" aria-hidden="true" style="vertical-align:-2px;margin-right:6px;"><rect width="22" height="22" rx="3" fill="#e87722"/><text x="11" y="15.5" text-anchor="middle" font-family="'Inter',sans-serif" font-size="9" font-weight="800" fill="#fff" letter-spacing="-0.04em">MAT</text></svg><span class="ml-text">MATLAB bundle · L35_NetworkTracker.m</span><span class="ml-arrow">↓</span></a>

The companion script runs the same model with the same arithmetic and the same layout of random draws, as a local function. Instead of one seed it runs a 200-run Monte Carlo from `rng(35)` and prints the trade as a table — RMS error, claim, prediction error and leg time for the clear, jammed, lone-strobe, standoff, around and S-turn cases — then plots error against claim over time for three contrasting cases and the prediction error for the straight leg against the S-turns. Averaged over many runs, its numbers differ slightly from the demo's seed 1: for example about 0.15 km clear and 0.93 km jammed on the straight leg, against the demo's 0.18 and 0.88.
