# Demo — Agility and Side-lobes

A spot jammer is only powerful if it can find the radar's channel. Frequency agility forces the jammer into a losing choice: a strong spot that the radar simply hops around, or a barrage spread so thin it barely registers. This demo makes that trade quantitative.

## The trade

A jammer that covers $W$ of $N$ channels denies a fixed radar only if it happens to sit on the radar's channel. Against an agile radar it lands a hit with probability $W/N$. If it instead barrages all $N$ channels, its power per channel drops by $10\log_{10}N$ dB.

## Interactive demo

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

<div class="demo-wrap">
<iframe src="../_static/demos/AgilityAndSidelobes.html"
        title="Interactive frequency agility vs spot jammer demo"
        width="100%"
        loading="lazy">
</iframe>
</div>

## Walkthrough

1. **Fixed radar, narrow jammer.** With the radar parked and the jammer off its channel, nothing is denied. Slide the jammer onto the radar's channel and denial jumps to 100% — a fixed radar lives or dies on one frequency.
2. **Switch to agile.** Now the radar hops across all $N$ channels. The denied fraction drops to $W/N$ — the jammer only catches the pulses that happen to land under it.
3. **Widen the jammer.** Increase $W$ and the agile denial rises, but the jammer is spending power to cover more spectrum.
4. **Force the barrage.** Read the barrage-dilution number: spreading across all $N$ channels costs $10\log_{10}N$ dB per channel — at 16 channels that is 12 dB the jammer simply gives away.

## Key observations

- **Agility converts a power contest into a coverage contest** — and coverage is expensive for the jammer.
- **Spot vs barrage is a dilemma, not a choice.** Concentrate and be dodged; spread and be diluted.
- **More channels, more leverage.** The defender's advantage grows as $10\log_{10}N$.

## Source

<a class="matlab-link" href="../_static/downloads/ECE%20495%20EW%20%E2%80%93%20Code.zip#code/L15_FrequencyAgility.m" download><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 · code/L15_FrequencyAgility.m</span><span class="ml-arrow">↓</span></a>

The in-class script sweeps the number of channels and jammer width, compares fixed against agile denial, and computes the barrage dilution penalty.
