Matlab Integrate Antenna
MathWorksOfficialCreated by MathWorks
- Skill
- Tool integration
- Software development
- BSD-2-Clause
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a comprehensive workflow for integrating antennas into complex RF systems. It covers the design of impedance matching networks, the creation of measured antenna models for interoperability, RF propagation and site planning for wireless networks, and SAR estimation for compliance. It leverages the MATLAB Antenna Toolbox and RF Toolbox to bridge the gap between individual antenna design and system-level deployment.
What it does
- Synthesizes and ranks L/Pi/Tee impedance matching networks for antennas.
- Creates measuredAntenna objects from simulation or measured pattern data.
- Computes RF coverage, signal strength, and path loss for site planning.
- Performs ray tracing analysis for 5G and mmWave propagation scenarios.
- Estimates Specific Absorption Rate (SAR) for RF exposure compliance.
- Imports far-field data from external formats like CST ffs files.
When to use it
- When you need to match an antenna to a specific system impedance.
- When you need to use an antenna model within a larger site planning or propagation scenario.
- When you must assess RF exposure compliance for devices near biological tissue.
- When you need to perform link budget or interference analysis between transmitter and receiver sites.
Advantages
- Provides a structured, script-first approach to complex RF integration tasks.
- Ensures compatibility between antenna models and system-level analysis tools.
- Includes built-in validation for SAR and impedance matching parameters.
- Supports advanced analysis like ray tracing and multi-frequency propagation.
Usage examples
- “Design a 2-element matching network for a PIFA antenna at 2.4 GHz.”
- The agent will set the center frequency, load the antenna impedance, define the matching network topology, and export the circuit description.
- “Create a measuredAntenna object for use in a site planning scenario.”
- The agent will guide the creation of a measuredAntenna with directivity data, ensuring the correct azimuth-fast data ordering for compatibility with txsite.
- “Calculate the SAR for an implantable antenna model.”
- The agent will configure the tissue model, compute E-fields, and apply the SAR formula with appropriate normalization to verify compliance.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/matlab/matlab-integrate-antenna/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip matlab-integrate-antenna.zip -d .agents/skills
Documentation by MathWorks
Antenna Integration and Deployment
Integrate designed antennas into RF systems -- impedance matching, data exchange via measuredAntenna, RF propagation/site planning, and SAR compliance -- using MATLAB Antenna Toolbox and RF Toolbox.
When to Use
Impedance matching
Match an antenna to 50 ohm (or other impedance)
Improve return loss or VSWR
Design L, Pi, or Tee matching network
Convert lumped matching to distributed (Richards transformation)
Compare 2-element vs 3-element bandwidth
Measured antenna creation
Create a
measuredAntennafrom pattern data or simulationUse an antenna with
txsite/rxsitefor propagationImport antenna data from CST (.ffs) or HFSS (.ffd)
Steer a beam with phase shifts on a measured array
Use a measuredAntenna as element in a larger array
RF propagation and site planning
Compute signal strength, coverage, or path loss between sites
Analyze SINR, interference, or frequency reuse
Perform ray tracing for 5G/mmWave propagation
Determine link budget or link closure
Plan wireless network transmitter/receiver placement
SAR estimation
Compute SAR from an antenna near or inside biological tissue
Assess RF exposure compliance (FCC/ICNIRP limits)
Model a birdcage coil for MRI SAR analysis
Compute point SAR or mass-averaged SAR (1g/10g)
Design an implantable antenna and estimate SAR
When NOT to Use
Designing antenna elements or arrays (geometry, optimization) -- use
matlab-design-antennaReflector antennas, reflectarrays, installed antennas, or RCS -- use
matlab-analyze-antenna-structures
Must-Follow Rules
Matching Networks
Set
CenterFrequencyBEFORELoadImpedancefor frequency-dependent loads -- errors otherwiseProperty is
BandwidthnotBandWidth-- case-sensitiveaddEvaluationParameterrequires all 5 args: parameter, comparison, targetdB, band, weightPrefer
sparameters(ant, freqRange)as load over raw antenna object (avoids repeated EM solves)Default to
Components = 2unless fractional BW > 5% (then use 3)
Measured Antennas
Always transpose after
meshgridfor az-fast ordering -- silently wrong patterns otherwisetxsite/rxsiterequireE = []-- errors if E-field data is presentOnly
patternMultiplyworks when measuredAntenna is the Element of an array (notpattern)CalculateTotalField = trueis required for EmbeddedE workflowEHfields returns 3-by-P -- transpose to P-by-3 for measuredAntenna
RF Propagation
Do not call
show(tx)in headless environments -- use analysis functions directlysigstrength(rxArray, txArray, pm)returns numTX-by-numRX matrixpathlosswith ray tracing returns cell arrays -- sum powers in linear domainSurfaceMaterialis for cartesian scenes;BuildingsMaterial/TerrainMaterialfor geographicRay tracing requires buildings or scene data -- no value without geometry
SAR
EHfieldsexpects 3-by-M -- passobsPoints'dielectricclass enforcesLossTangent <= 0.03-- only birdcage.Phantom and direct EHfields bypassAlways validate SAR with power balance check (efficiency vs SAR integral)
Always normalize to a known input power (typically 1W accepted)
conformalArrayrejects intersecting geometries -- cannot place antenna inside tissue
Workflow
1. Impedance Matching
Parse -- Identify load (antenna, impedance, file), frequency, bandwidth, topology
Create -- Set
CenterFrequencyFIRST, thenLoadImpedance,Bandwidth,ComponentsEvaluate --
addEvaluationParameterfor gammain or Gt goalsInspect --
circuitDescriptionsreturns ranked candidatesVisualize --
rfplot(S11/gain),smithplot(impedance transformation)Export --
exportCircuitsfor RF Toolbox circuit;richardsfor distributed elements
2. Measured Antenna Creation
Parse -- Identify source antenna/array, frequency, intended use case
Select workflow -- E-field, Directivity-only, EmbeddedE, element-in-array, or ffsReader
Generate grid -- Spherical grid with correct transpose for az-fast ordering
Extract data --
EHfields(3-by-P, transpose to P-by-3) orpattern(el-by-az, transpose)Build -- Construct measuredAntenna with correct property combination
Verify -- Compare pattern against original antenna/array
3. RF Propagation & Site Planning
Parse -- Identify analysis type (coverage, SINR, ray tracing, link budget), frequency, environment
Create sites --
txsite/rxsitewith location, antenna, frequency, powerSelect model -- Choose propagation model based on environment
Analyze --
sigstrength,coverage,sinr,raytrace, orlosReport -- Signal strength (dBm), path loss (dB), SINR (dB), link margin
4. SAR Estimation
Select approach -- birdcage+Phantom, conformalArray+Custom3D, or direct EHfields
Build tissue model -- Phantom struct, shape.Custom3D with catalog material, or post-processing
Compute E-fields --
EHfields(ant, freq, obsPoints')(3-by-M format)Calculate SAR -- Apply formula with tissue sigma and rho; normalize to input power
Validate -- Power balance check (efficiency method vs SAR integral)
Key Classes
| Class | Purpose |
|---|---|
matchingnetwork | L/C matching network synthesis and ranking |
measuredAntenna | Wraps field/pattern data for interoperability |
txsite / rxsite | Transmitter/receiver sites for propagation |
propagationModel | Path loss model selection (freespace, raytracing, etc.) |
propagationData | Import/visualize RF measurement data |
siteviewer | Map visualization (geographic or cartesian) |
birdcage | MRI coil with Phantom support |
conformalArray | Arbitrary element positions (antenna + dielectric body) |
shape.Custom3D | Passive dielectric scatterer for SAR |
ffsReader | Import CST .ffs far-field data (R2026a+) |
Conventions
Coding Standards
4-space indentation, lowerCamelCase variables, UpperCamelCase Name-Value args
"double quotes"for strings,fprintffor formatted outputDo not add titles to Antenna Toolbox plots (
pattern,show,rfplot,smithplot)Do add titles to manual
plot,scatter3,imagescfiguresDo not call
show(tx)without siteviewer in headless environmentsShow all plots in separate figures. Include units in all output.
Script-First Workflow
For design, analysis, or sweep tasks -- write code to .m files, run via run_matlab_file, iterate by editing and re-running. Use inline evaluate_matlab_code for quick one-off checks.
References
| Load when... | Reference |
|---|---|
| Designing a matching network (topologies, evaluation, export, Richards) | references/matching-networks.md |
| Creating measuredAntenna (E-field, directivity, EmbeddedE, ffsReader, HFSS) | references/measured-antennas.md |
| RF propagation, coverage, SINR, ray tracing, link budget, path loss | references/rf-propagation.md |
| Computing SAR (birdcage, conformalArray, EHfields, power balance) | references/sar-estimation.md |
Copyright 2026 The MathWorks, Inc.
Files
- ATTRIBUTION.mdAdded by AutoGineer1.0 KiB
- LICENSELicence file added by AutoGineer1.4 KiB
- SKILL.md7.9 KiB
- manifest.yaml638 B
- references/matching-networks.md8.0 KiB
- references/measured-antennas.md7.6 KiB
- references/rf-propagation.md8.5 KiB
- references/sar-estimation.md8.6 KiB
references/matching-networks.md
Impedance Matching Networks
matchingnetwork Object
matchingnetwork synthesizes lumped L/C networks that transform a complex load impedance to a source impedance (default 50 ohm). It generates multiple candidate topologies, ranks them by performance goals, and exports the best designs as RF Toolbox circuit objects.
Properties
| Property | Default | Description |
|---|---|---|
SourceImpedance | 50 | Source impedance (real scalar, ohms) |
LoadImpedance | 100 | Load: scalar, antenna, sparameters, file, or function handle |
CenterFrequency | 1e9 | Design center frequency (Hz) |
Bandwidth | CenterFrequency/20 | Design bandwidth (Hz) |
Components | 2 | Topology: 2, 3, "L", "Pi", "Tee" |
LoadedQ | Inf | Component quality factor (finite for realistic losses) |
Critical Property Order
Set CenterFrequency BEFORE LoadImpedance when the load is a frequency-dependent object (antenna, sparameters, file). MATLAB silently evaluates the antenna at the current (default 1 GHz) center frequency, producing an incorrect matching network — no error is thrown.
mn = matchingnetwork;
mn.CenterFrequency = freq; % 1. Set frequency FIRST
mn.Bandwidth = bw; % 2. Bandwidth (optional)
mn.LoadImpedance = load; % 3. Load AFTER frequency
mn.Components = 2; % 4. Topology (any time)Load Impedance Options
| Type | Example | Notes |
|---|---|---|
| Complex scalar | 25 + 1j*30 | Frequency-independent |
| Antenna object | design(pifa, freq) | Evaluated at CenterFrequency |
| sparameters | sparameters(ant, freqRange) | 1-port S-params |
| Touchstone file | "antenna.s1p" | .s1p or .s2p file path |
| Function handle | @(f) 36 + 1j*21*(f/2.4e9-1) | Z(f) in ohms |
Prefer sparameters(ant, freqRange) over raw antenna as LoadImpedance -- avoids repeated EM solves.
Topology Selection
| Components | Topologies Generated | Use Case |
|---|---|---|
| 2 | All 2-element L-sections | Narrowband (BW < 5% of fc) |
| 3 | All 3-element networks | Wider bandwidth (BW > 5% of fc) |
"L" | L-section variants only | Equivalent to 2 |
"Pi" | Pi (shunt-series-shunt) | Low-pass or band-pass |
"Tee" | Tee (series-shunt-series) | High-impedance loads |
Evaluation Parameters (Ranking & Filtering)
% Goal: S11 < -15 dB in band (weight 2)
addEvaluationParameter(mn, 'gammain', '<', -15, [2.3e9 2.5e9], 2);
% Goal: Transducer gain > -1 dB (weight 1)
addEvaluationParameter(mn, 'Gt', '>', -1, [2.3e9 2.5e9], 1);
% View all active parameters
ep = getEvaluationParameters(mn);
% Remove a specific parameter (by index)
clearEvaluationParameter(mn, 2);'gammain': Input reflection coefficient (dB). Use'<'with negative target.'Gt': Transducer power gain (dB). Use'>'with target near 0 dB.band: Frequency range[fLow fHigh]in Hz.weight: Higher weight = more influence on ranking.
Antenna Impedance Matching
freq = 2.4e9;
ant = design(pifa, freq);
mn = matchingnetwork;
mn.CenterFrequency = freq;
mn.Bandwidth = 200e6;
mn.LoadImpedance = ant;
mn.Components = 2;
addEvaluationParameter(mn, 'gammain', '<', -15, [2.3e9 2.5e9], 1);
cd = circuitDescriptions(mn);
disp(cd)
figure; rfplot(mn);
figure; smithplot(mn);Topology Comparison
freq = 5.8e9;
Zload = 15 + 1j*40;
topologies = {2, 3, "Pi", "Tee"};
for k = 1:numel(topologies)
mn = matchingnetwork;
mn.CenterFrequency = freq;
mn.Bandwidth = 500e6;
mn.LoadImpedance = Zload;
mn.Components = topologies{k};
addEvaluationParameter(mn, 'gammain', '<', -15, [5.5e9 6.1e9], 1);
cd = circuitDescriptions(mn);
fprintf("Components=%s: %d candidates\n", string(topologies{k}), height(cd));
endExport and Circuit Analysis
% Export best circuit (index 1) as RF Toolbox circuit object
ckt = exportCircuits(mn, 1);
% S-parameters of the matching network (2-port)
freqRange = linspace(2e9, 3e9, 101);
sCkt = sparameters(ckt, freqRange);
figure; rfplot(sCkt);Richards Transformation (Lumped to Distributed)
Convert lumped L/C to transmission-line-based circuit for PCB/microstrip realization:
% Convert best circuit to transmission lines
txCkt = richards(mn, freq);
% Convert specific circuits by index
txCkts = richards(mn, freq, [1 2 3]);
% Analyze distributed circuit
freqRange = linspace(1e9, 4e9, 201);
sTx = sparameters(txCkts(1), freqRange);
figure; rfplot(sTx);Output uses txlineElectricalLength elements -- quarter-wave stubs replacing L/C.
Custom Network Topology
mn = matchingnetwork;
mn.CenterFrequency = 2.4e9;
mn.LoadImpedance = 25 + 1j*30;
% Build custom 2-port matching circuit
c1 = circuit("my_match");
add(c1, [1 2], inductor(2e-9));
add(c1, [2 0], capacitor(1e-12));
setports(c1, [1 0], [2 0]);
% Disable automatic generation, add only custom
disableAutomaticNetworks(mn);
addNetwork(mn, c1);Lossy Components (Finite Q)
mn.LoadedQ = 50; % typical SMD inductor Q at 2.4 GHzLower LoadedQ values model lossier components and reduce achievable bandwidth.
Non-50-Ohm Source
mn.SourceImpedance = 75; % 75-ohm systemFunction Handle Load
R = 30; L = 5e-9; C = 2e-12;
Zfunc = @(f) R + 1j*(2*pi*f*L - 1./(2*pi*f*C));
mn.LoadImpedance = Zfunc;Multi-Band Matching
mn.CenterFrequency = 3.5e9;
mn.Bandwidth = 3e9;
mn.LoadImpedance = sparameters(ant, linspace(2e9, 6e9, 101));
mn.Components = 3;
% Band 1: 2.4 GHz (higher weight)
addEvaluationParameter(mn, 'gammain', '<', -10, [2.4e9 2.5e9], 2);
% Band 2: 5 GHz (lower weight)
addEvaluationParameter(mn, 'gammain', '<', -10, [5.15e9 5.85e9], 1);Set CenterFrequency between bands with Bandwidth spanning both. Weight primary band higher.
Off-Resonance Matching
When antenna design frequency differs from operating frequency:
designFreq = 3e9;
operatingFreq = 2.4e9;
bw = 200e6;
ant = design(patchMicrostrip, designFreq);
sAntLoad = sparameters(ant, linspace(operatingFreq - bw, operatingFreq + bw, 51));
mn = matchingnetwork;
mn.CenterFrequency = operatingFreq; % Match at OPERATING freq
mn.Bandwidth = bw;
mn.LoadImpedance = sAntLoad;Before/After Comparison
freqRange = linspace(2e9, 3e9, 101);
sAnt = sparameters(ant, freqRange);
sMN = sparameters(mn, freqRange);
S = sMN.Parameters;
gammaL = squeeze(sAnt.Parameters(1,1,:));
gammain = squeeze(S(1,1,:)) + squeeze(S(1,2,:)).*squeeze(S(2,1,:)).*gammaL ./ ...
(1 - squeeze(S(2,2,:)).*gammaL);
figure;
plot(freqRange/1e9, 20*log10(abs(gammaL)), ...
freqRange/1e9, 20*log10(abs(gammain)));
xlabel("Frequency (GHz)"); ylabel("S_{11} (dB)");
legend("Before", "After"); grid on;
title("Impedance Matching Improvement");Key Functions
| Function | Purpose |
|---|---|
circuitDescriptions(mn) | Table of all candidate circuits with values |
addEvaluationParameter(mn, ...) | Add performance goal for ranking |
getEvaluationParameters(mn) | View active parameters |
clearEvaluationParameter(mn, idx) | Remove a parameter |
exportCircuits(mn, idx) | Export as RF Toolbox circuit object |
richards(mn, freq) | Convert to distributed elements |
rfplot(mn) | Plot matched system performance |
smithplot(mn) | Smith chart of impedance transformation |
sparameters(mn, freq) | 2-port S-params of matching network |
disableAutomaticNetworks(mn) | Disable auto-generated topologies |
addNetwork(mn, ckt) | Add custom topology to candidates |
deleteNetwork(mn, idx) | Remove a circuit from pool |
Guidelines
addEvaluationParameterrequires all 5 args: parameter, comparison, targetdB, band, weightdisableAutomaticNetworksandaddNetworkmutate the object in place (handle class)rfplot(mn)shows matched system performance (gammain and Gt with load connected)sparameters(mn, freq)returns the matching circuit as a 2-port (without load)Default to
Components = 2unless user needs wider bandwidthProperty is
BandwidthnotBandWidth-- case-sensitive
Copyright 2026 The MathWorks, Inc.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- MathWorks
- Publisher
- MathWorks (Official)
- Source
- matlab/matlab-agentic-toolkit · skills-catalog/rf-and-mixed-signal/matlab-integrate-antenna · commit 2a7f215
- Licence
- BSD 2-Clause License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE.md)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by MathWorks.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download matlab-integrate-antenna.zip