Part 3 of 6 · Design a 2.45 GHz hairpin band-pass filter
Published Nov 28, 2026 · Last updated Nov 28, 2026 · 11 min · IndieRF
Hairpin Filter Optimization: Every Goal Met, 22.9% Yield
The 3-pole hairpin filter at 2.44 GHz, built in the schematic from coupled lines, bends and tees, meets every requirement after 123 optimizer runs: 2.72 dB worst loss, 15.1 dB return loss, 30.0 dB at 2.20 GHz. Monte Carlo on the RO4350B board's tolerances passes 229 of 1000 boards, and one space-mapping step gives the layout 16.5 mm arms, 1.10 mm gaps and 2.50 mm taps.
Built as a circuit of coupled lines, bends and tees, Part 2's hairpin filter meets every requirement once the optimizer widens the gaps from 1.05 to 1.45 mm and moves the taps from 2.75 to 3.10 mm: 2.72 dB worst loss in the band, 15.1 dB return loss, 30.0 dB at 2.20 GHz and 58.2 dB at 3.30 GHz. It meets them with nothing to spare, so Monte Carlo on the board's tolerances passes 229 boards of 1000, 22.9%. The circuit's coupling reads 30% stronger than Planar EM's, so one space-mapping step turns its optimum into the layout: arms 16.5 mm, gaps 1.10 mm, taps 2.50 mm.
Part 1 picked the order, bandwidth and board; Part 2 measured the first cut in Planar EM. Part 3 builds the whole filter in the schematic, optimizes it and prices it in yield; Part 4 lays it out, Part 5 puts the EM result back into the schematic, and Part 6 builds it.
The schematic's microstrip line model was corrected on 2026-12-03 (gap 28, engine 0.1.52): tl.mlin now runs 1.3% faster on this 1.6 mm line, so in the linked sheets a single hairpin resonates about 15 MHz higher and the filter's centre sits about 6 MHz higher than the numbers recorded here, which are the dry run's as it ran. The coupled-line model was corrected on 2026-12-04 (gap 51, engine 0.1.53): the tl.mclin pairs between hairpins now run about 1.3% faster, so the linked filters' centres sit a further 10 to 11 MHz higher; a single hairpin, whose own arms the model leaves uncoupled, does not move.
The hairpin as a circuit
Each hairpin is two arms, two square 90° bends (tl.mbend) and a bar between them, and each arm ends in an open end (tl.mopen). Where two neighbouring arms run side by side, over the 14.8 mm their straight parts overlap, they are one coupled pair (tl.mclin). The 1.6 mm each arm runs on beside the other hairpin's corner is a plain line. The 50 Ω feeds join the outer arms of hairpins 1 and 3 through tees (tl.mtee). The sheet is drawn to look like the layout: three U's, the middle one upside down.
Every length is an expression in the variables (a1 and a2 for the end and middle arms, s for the gaps, t for the taps, w for the width), so the optimizer and Monte Carlo move the drawing itself.
The model couples lines only in pairs, because no microstrip model in the schematic couples three or more lines yet. So a hairpin's own two arms, 2.4 mm apart, are uncoupled; each arm sees only the arm beside it, which drops hairpin 1 to hairpin 3 and each arm's coupling to its neighbour's far arm, 5.05 mm away; and the U-bend is two separate corners with a bar, where the real current cuts the corner.
Measured against Part 2's EM: k 30% strong, Qe 45% high
A circuit model is only as good as its worst part, so check it where Part 2's EM runs already give the answer. Each link rebuilds one run as a lossless circuit.
| Piece | Planar EM | Circuit | Circuit against EM |
|---|---|---|---|
| One hairpin, 16.4 mm arms, resonance | 2.4463 GHz | 2.4381 GHz | −8.2 MHz |
| Two hairpins, 1.05 mm gap, coupling k | 0.0441 | 0.0574 | 1.30 times |
| One tapped hairpin, 2.75 mm tap, external Qe | 21.7 | 31.4 | 1.45 times |
The single hairpin reads 8 MHz low, where its S11 phase crosses 0. Part of that is the line model: tl.mlin puts εeff at 2.867 for this line, 1.1% to 1.3% above Hammerstad and Jensen's own thickness form (2.830 in scikit-rf) and Trace Studio's field solve (2.837), worth about 13 MHz low on every resonator.
The coupling is where the missing arms show. Across Part 2's six gaps the circuit's k runs 20% to 49% above EM's, growing as the gap opens, because the arms 2.4 mm behind each coupled arm carry the opposite voltage and cancel part of the field the neighbour sees. Designed from the circuit alone, the gap would be 1.37 mm and the board a third narrow. Adding the own-arm coupling as a pair overshoots EM by 28 MHz.
Distrust the tap most. At 2.75 mm the 1.6 mm tee sits 0.35 mm from the bend, and the engine badges it MT1 and MB1a are joined by ML1l of 0.350 mm, shorter than 3h, two closed forms close enough to interact in a way neither models. The Qe error falls from 63% at a 2.4 mm tap to 12% at 4.8 mm; below 2.4 mm the tee would overlap the bend.

The first cut as a circuit: 6.4 dB return loss
On the real board (RO4350B 0.762 mm, εr 3.66, tanδ 0.0037, 3.2 µm foil roughness) the first cut reads as a filter a third too wide: 216 MHz at 3 dB against the prototype's 161 MHz, with 6.4 dB worst return loss in the band, 2.99 dB worst loss and 25.1 dB at 2.20 GHz. With k 30% strong and Qe 45% high, that is the model's belief about the board; Part 4 measures the board itself.
To read those numbers, open the plot's menu and tick Band-pass readout, then set the pass band to 2.400 to 2.4835 GHz and the rejection points to 2.20 and 3.30 GHz. On a phone the sheet opens at 23% zoom with the plot below the fold, so scroll down to it or use a desktop.
The optimizer: four variables, 123 runs
The optimizer moves a1 and a2 over 15.8 to 17.2 mm, s over 0.8 to 1.8 mm and t over 2.45 to 4.5 mm. It does Part 2's coupling and tap arithmetic for all four at once, tap pull and middle-resonator loading included. The goals are the requirements: 3.0 dB of loss or less from 2.400 to 2.4835 GHz, 15 dB return loss from 2.3841 to 2.5001 GHz, and 30 dB of rejection at 2.20 GHz and below and from 3.30 to 4.0 GHz. The return-loss goal runs over Part 1's design edges, the band widened by the board's root-sum-square tolerance of 0.66%, so the required band stays inside the ripple when the board moves.
Open the first cut with the goals set, open Goals and press Optimize. Nelder-Mead stops after 123 simulations with every goal met, about half a minute in the browser; press Apply.
| Variable | First cut | Optimized |
|---|---|---|
a1, end arms | 16.40 mm | 16.4872 mm |
a2, middle arm | 16.40 mm | 16.4487 mm |
s, gaps | 1.05 mm | 1.4529 mm |
t, taps | 2.75 mm | 3.1041 mm |
The optimized filter's band-pass readout gives a 2.4372 GHz centre, 148.9 MHz at 3 dB, 15.1 dB worst return loss in the band, 2.72 dB worst loss at 2.4835 GHz, 30.0 dB at 2.20 GHz and 58.2 dB at 3.30 GHz. A transmission zero at 2.92 GHz, where the outer arm beyond the tap is a quarter wave, steepens the upper skirt.
The loss agrees with Part 1's estimate: 2.163 dB at f0 over the lossless filter, against 2.190 dB from 4.343 Σg / (FBW · Qu) at the line model's Qu of 134. With smooth copper the worst loss would be 2.04 dB, so the foil's roughness spends about 0.7 dB of the 3.0 dB budget.
The optimizer stops as soon as the last goal passes: 30.04 dB at 2.20 GHz against 30, 15.08 dB against 15. Margin is bought by hand, by tightening a goal and running again.
The trade: a dB of return loss buys about a dB at 2.20 GHz
Ask for 31 dB at 2.20 GHz and the optimizer misses it (30.5 dB) and the return loss (14.5 dB); differential evolution, 6,037 runs, stops on the same point to six digits. So 30.0 dB at 2.20 GHz with 15 dB return loss is this model's frontier.
| Design | Return loss over its band | At 2.20 GHz | Board shifted ±0.66%, worst: loss, return loss, 2.20 GHz |
|---|---|---|---|
| Optimum | 15.0 dB | 30.0 dB | 3.49 dB, 14.8 dB, 28.6 dB |
| 16 dB return loss, 29 dB at 2.20 GHz | 16.0 dB | 29.1 dB | 3.25 dB, 15.8 dB, 27.6 dB |
Each dB of return loss given up buys 0.8 to 1.0 dB at 2.20 GHz. A fourth resonator costs more loss than it buys: 4.343 × 5.0034 / (0.04751 × 135.6) is 3.37 dB of loss at f0, over the 3.0 dB limit before the band edges. Three resonators on 30 mil RO4350B stay the closest design, and shifted by the board's 0.66% it misses 2.20 GHz by 1.4 dB and the loss by half a dB.
Monte Carlo: 229 of 1000 boards pass
The yield link opens the optimum with Part 1's tolerances on three variables: εr 3.66 ± 0.05, height 0.762 ± 0.0508 mm, and the line width w 1.6 ± 0.02 mm for the etch, which widens every line and narrows every gap at once. The link already sets 1000 boards; open Goals and press Run yield.
A variable's tolerance is relative to its value, so the etch cannot be a variable centred on zero; the link carries the workaround, the width w at ±1.25% with every gap written s + w0 − w.
| Draws | Pass | 95% interval (Wilson) | Pass loss | Pass return loss | Pass 2.20 GHz |
|---|---|---|---|---|---|
| Uniform over each tolerance | 229 of 1000 | 20.4% to 25.6% | 684 | 382 | 516 |
| Normal, each limit at 3σ | 322 of 1000 | 29.4% to 35.2% | 829 | 533 | 525 |
Every board passes 3.30 GHz. Return loss fails 618 boards and 2.20 GHz fails 484, on opposite sides: every passing board lies between −0.14% and +0.62% of predicted shift. A board that comes out low loses 2.20 GHz; one that comes out high loses the bottom of the band. Part 1's root-sum-square stack covers the shift of 927 of the 1000 boards, and still only 229 pass, because the nominal design has no margin left and the etch moves the coupling as well as the frequency.
The yield section exports pass counts and one histogram; this per-board scatter needed a script wrapping the same run.

22.9% is a low yield against the starting spec. The cheapest lever is the 2.20 GHz limit: the 16 dB, 29 dB design above, judged against 28 dB at 2.20 GHz, passes 495 of 1000 boards. That is a requirement change, and I'd price it on the layout's EM response before signing it, because the circuit's coupling is 30% off. Part 5 comes back to the requirements with that response.
Back to the layout: one space-mapping step
I trust the schematic for differences (the tap's pull, the middle resonator's load, the shape of the response) and EM for absolute coupling, where the circuit is 30% off. So the optimum goes back to the layout by asking what the circuit wanted and where EM gives that, one step of space mapping:
- Gap. The circuit's k at 1.4529 mm is 0.04079; EM gives 0.04079 at 1.12 mm.
- Tap. The circuit's Qe at 3.1041 mm is 24.69; EM gives 24.69 at 2.48 mm.
- Arms. EM resonates 8.3 MHz above the circuit and moves −131 MHz per mm, so the middle arm grows 0.063 mm to 16.51 mm; the end arms' tapped resonances differ by only 0.7 MHz, so they move 0.005 mm to 16.48 mm.
| Dimension | First cut (Part 2) | Circuit optimum | Mapped to the layout | On the 50 µm grid |
|---|---|---|---|---|
a1, end arms | 16.40 mm | 16.487 mm | 16.482 mm | 16.50 mm |
a2, middle arm | 16.40 mm | 16.449 mm | 16.512 mm | 16.50 mm |
s, gaps | 1.05 mm | 1.453 mm | 1.123 mm | 1.10 mm |
t, taps | 2.75 mm | 3.104 mm | 2.485 mm | 2.50 mm |
| Line width, arm gap | 1.60, 2.40 mm | same | same | same |
The circuit asked for 7% less coupling than Part 2's target and 14% more Qe: a slightly narrower, more selective filter, which is how it buys 30 dB at 2.20 GHz. The 2.50 mm tap sits 0.1 mm above where the tee meets the bend, so Part 4 checks the tap in EM first.
Part 4 draws 16.5 mm arms, 1.10 mm gaps and 2.50 mm taps on the real board in Planar EM, where the arms' self-coupling, the second neighbour, the U-bend and the tee are all in the solve.
References
- J.-S. Hong and M. J. Lancaster, Microstrip Filters for RF/Microwave Applications, Wiley, 2001: hairpin filters, k and Qe, and the loss estimate from the g-values.
- J. W. Bandler, R. M. Biernacki, S. H. Chen, P. A. Grobelny and R. H. Hemmers, "Space mapping technique for electromagnetic optimization," IEEE Trans. Microwave Theory Tech., vol. 42, no. 12, pp. 2536–2544, Dec. 1994.
- E. B. Wilson, "Probable inference, the law of succession, and statistical inference," J. Amer. Statist. Assoc., vol. 22, no. 158, pp. 209–212, 1927: the 95% interval on a pass count.
- scikit-rf
skrf.circuit.Circuit: the independent cascade of the same model, which matches the engine to 4e-12.
Questions? Contact
Discussion
No comments yet. Start the thread with a measurement, a correction, or a worked example.