10. Tune a patch antenna with sliders
Goal: move the resonance of a patch antenna to 2.45 GHz with sliders for the patch length and the
inset of the feed, and watch S11, the radiation pattern and the realized gain follow live, from one
solve. Then plot S11 and the gain against the patch length. The project is examples/PatchAntenna.hzn,
an inset-fed patch on 1.6 mm FR4. The method behind the sliders is explained in TUNING.md.
10.1 A sweep with fields
S-parameters can be tuned over any sweep. Patterns and antenna parameters need the fields at every frequency, as for a normal solve.
- File > Open Example > PatchAntenna.
- Right-click Setup1 > Add Frequency Sweep...: Discrete, Linear Step,
2.2GHzto2.7GHz, Step0.025GHz, with Save fields (all frequencies). A discrete sweep is tuned at its own points, here 21 frequencies. - Analyze All (F5). Open an S11 plot: Results > Create Report > Rectangular Plot,
dB(S(1,1)), solution Setup1 : Sweep2 (the new sweep).
10.2 Compute the derivatives
- Ribbon Results > Tuning, or right-click the sweep in the project tree > Derivative Tuning.... The Derivative Tuning panel docks at the right, next to the report.
- Setup
Setup1, SweepSweep2. In Variables, checkLp(the length of the patch, which sets the resonance) andinset(how far the feed line reaches into the patch, which sets the matching). - Compute Derivatives. The solver takes the converged mesh of the setup, works out how every node
moves when
Lpandinsetchange, and builds a small model of the antenna around the solved values. The Progress window shows the steps. In our run this took about 40 s on top of the solve. The model is stored with the results.
When the model is ready, the panel shows a slider for each variable with its range, for example
19.86 … 39.04 for Lp. The range is as far as the mesh can stretch without remeshing.
10.3 Move the sliders
Drag the Lp slider, or type 27 next to it. The S11 report now shows two curves:
- dashed:
dB(S(1,1)), the solved antenna; - solid:
dB(S(1,1)) (tuned: Lp = 27mm), the antenna with the shorter patch. The resonance has moved up.

Shorten Lp until the dip sits at 2.45 GHz, then move inset to see how deep the dip gets. Every
report on this solution follows the sliders: Smith chart, data table, and any expression such as
re(Z(1,1)). Markers, Copy Data and Export include the tuned curves as drawn.
- Create Far Fields Report > Radiation Pattern,
dB(RealizedGainTotal)at 2.45 GHz. The tuned pattern is drawn over the solved one. Here the realized gain at 2.45 GHz goes up, because the tuned antenna is better matched at that frequency. 3D Polar Plot shows the tuned pattern in 3D.

- Create Far Fields Report > Antenna Parameters,
dB(PeakRealizedGain)andRadiationEfficiency. The tuned curves are drawn over the sweep frequencies, and the gain maximum moves with the resonance. The first time, the far fields of the model are computed once per frequency, with a progress bar. After that, the sliders move in a fraction of a second.

When a slider moves into the outer part of its range, an orange hint under the sliders says that the accuracy drops there. Reset All puts every slider back to its solved value.
10.4 Plot against the patch length
A report can also show a quantity over a variable instead of over frequency.
- In the S11 report, set X axis to
Lpand At to2.45 GHz. - The curve shows S11 at 2.45 GHz over the whole range of
Lp. The dashed vertical line is the solved length, the solid line the slider value. The shaded parts at both ends are the outer part of the range, where the accuracy drops.

- The Antenna Parameters report has the same X axis choice. The peak realized gain over
Lpshows at a glance which length gives the most gain at 2.45 GHz. Notice that the curve bends oddly in the shaded part on the right: that is where the model is no longer reliable.

The other variables stay at their slider values, so moving inset changes these curves too. This works
with the tuning panel closed as well, from the stored model.
10.5 Keep the result
- Set the sliders to the values you want and click Apply to Design. The design variables
Lpandinsettake the slider values. - Analyze All again. The new solve is the reference: close to the solved values it agrees with the tuned curves, and the further the sliders were moved, the larger the difference.
Tune up to six variables at once, for example also Wp (patch width) or h (substrate height), to see
how they interact. Variables that change the topology of the model, or that move a wave port, cannot be
tuned. See TUNING.md for the details and the limits.