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/rf-propagation.md
RF Propagation and Site Planning
Key Objects
| Object | Purpose |
|---|---|
txsite | Transmitter site (location, antenna, power, frequency) |
rxsite | Receiver site (location, antenna, sensitivity) |
siteviewer | Map visualization (geographic or cartesian) |
propagationModel | Path loss model selection |
propagationData | Import/visualize measurement data |
Propagation Models
| Model | Use Case | Key Properties |
|---|---|---|
"freespace" | Baseline, no terrain | (none) |
"close-in" | Urban/suburban empirical | PathLossExponent, Sigma |
"longley-rice" | Irregular terrain (outdoor) | ClimateZone, GroundConductivity |
"raytracing" | Urban/indoor multipath | Method, MaxNumReflections, UseGPU |
"rain" | Rain attenuation | RainRate (mm/hr) |
"gas" | Atmospheric gas absorption | Temperature, AirPressure |
"fog" | Fog/cloud attenuation | WaterDensity (g/m^3) |
Composite Models
Combine atmospheric effects with +:
pm = propagationModel("freespace") + propagationModel("rain") + propagationModel("gas");Model Selection Guide
| Environment | Recommended Model |
|---|---|
| Open field, satellite | "freespace" |
| Suburban macro cell | "close-in" or "longley-rice" |
| Urban macro cell | "longley-rice" |
| Urban micro cell (5G) | "raytracing" |
| Indoor (Wi-Fi) | "raytracing" (cartesian) |
| Satellite/mmWave | "freespace" + "rain" + "gas" |
| Long-range rural | "longley-rice" |
Basic Link Budget (sigstrength)
freq = 2.4e9;
tx = txsite(Name="Base Station", Latitude=42.30, Longitude=-71.35, ...
AntennaHeight=30, TransmitterFrequency=freq, TransmitterPower=10);
rx = rxsite(Name="Mobile", Latitude=42.31, Longitude=-71.36, ...
AntennaHeight=1.5, ReceiverSensitivity=-90);
ss = sigstrength(rx, tx);
fprintf("Signal strength: %.1f dBm\n", ss);
% With propagation model
ss_lr = sigstrength(rx, tx, "longley-rice");
fprintf("Link margin: %.1f dB\n", ss_lr - rx.ReceiverSensitivity);Coverage Map
freq = 1.9e9;
tx = txsite(Name="Cell Tower", Latitude=42.30, Longitude=-71.35, ...
AntennaHeight=30, TransmitterFrequency=freq, TransmitterPower=20);
coverage(tx, SignalStrengths=[-60 -70 -80 -90], MaxRange=5000);
% Multiple transmitters
coverage([tx1 tx2], MaxRange=5000, SignalStrengths=[-60 -80 -100]);SINR Map (Multi-Cell Interference)
freq = 1.9e9;
txs = [
txsite(Name="Cell 1", Latitude=42.30, Longitude=-71.35, ...
TransmitterFrequency=freq, TransmitterPower=20, AntennaHeight=30)
txsite(Name="Cell 2", Latitude=42.32, Longitude=-71.33, ...
TransmitterFrequency=freq, TransmitterPower=20, AntennaHeight=30)
];
sinr(txs, MaxRange=5000, Values=-5:2:20);Line-of-Sight Analysis
vis = los(tx, rx);
fprintf("Line of sight: %s\n", string(vis));Ray Tracing
Geographic (Outdoor Urban)
freq = 28e9;
tx = txsite(Name="5G BS", Latitude=42.3601, Longitude=-71.0589, ...
TransmitterFrequency=freq, TransmitterPower=1, AntennaHeight=10);
rx = rxsite(Name="UE", Latitude=42.3605, Longitude=-71.0580, AntennaHeight=1.5);
pm = propagationModel("raytracing");
pm.Method = "sbr";
pm.MaxNumReflections = 3;
pm.MaxNumDiffractions = 1;
pm.AngularSeparation = "high";
raytrace(tx, rx, pm);
ss = sigstrength(rx, tx, pm);Multi-TX with sigstrength and pathloss
viewer = siteviewer(Buildings="chicago.osm");
txArray = [tx1 tx2 tx3];
ss = sigstrength(rx, txArray, pm); % 1-by-3 vector (dBm)
pl = pathloss(pm, rx, txArray, Map=viewer); % 1-by-3 cell array (per-ray losses)
% Aggregate multipath in linear domain
for i = 1:numel(txArray)
pl_rays = pl{i};
totalPL(i) = -10*log10(sum(10.^(-pl_rays/10)));
end
[bestSS, bestIdx] = max(ss);
fprintf("Strongest: %s at %.1f dBm\n", txArray(bestIdx).Name, bestSS);Note calling convention differences: sigstrength(rx, tx, pm) vs pathloss(pm, rx, tx, Map=viewer) — different argument order, and pathloss requires Map keyword with ray tracing.
Cartesian (Indoor)
viewer = siteviewer(CoordinateSystem="cartesian", SceneModel="office.stl");
tx = txsite(CoordinateSystem="cartesian", ...
AntennaPosition=[5; 3; 2.5], ...
TransmitterFrequency=5.8e9, TransmitterPower=0.1);
rx = rxsite(CoordinateSystem="cartesian", AntennaPosition=[15; 8; 1]);
pm = propagationModel("raytracing", CoordinateSystem="cartesian");
pm.Method = "image";
pm.MaxNumReflections = 3;
pm.SurfaceMaterial = "plasterboard";
raytrace(tx, rx, pm, Map=viewer);Ray Tracing Properties
| Property | Options | Description |
|---|---|---|
Method | "sbr", "image" | SBR (geographic) or image (cartesian) |
MaxNumReflections | 0-10 | Max reflection order (default 2) |
MaxNumDiffractions | 0-2 | Max diffraction order (default 0) |
AngularSeparation | "low", "medium", "high" | Ray density |
MaxAbsolutePathLoss | scalar (dB) | Stop tracing beyond this loss |
MaxRelativePathLoss | scalar (dB) | Stop relative to strongest (default 40) |
UseGPU | "on", "off" | GPU acceleration |
BuildingsMaterial | "auto", material name | Geographic scenes |
TerrainMaterial | material name | Ground reflection |
SurfaceMaterial | material name | Cartesian scenes (all surfaces) |
Per-Ray Path Loss
With ray tracing, pathloss returns a cell array (one cell per receiver, each containing per-ray losses):
pl = pathloss(pm, rxArray, tx, Map=viewer);
txPwr_dBm = 30;
for i = 1:numel(rxArray)
pl_rays = pl{i};
prx(i) = 10*log10(sum(10.^((txPwr_dBm - pl_rays)/10)));
endAntenna Downtilt and Orientation
AntennaAngle = [azimuth; mechanical_downtilt] in degrees:
tx1 = txsite(Antenna=ant, AntennaAngle=[0; 5], ...); % sector 1
tx2 = txsite(Antenna=ant, AntennaAngle=[120; 5], ...); % sector 2
tx3 = txsite(Antenna=ant, AntennaAngle=[240; 5], ...); % sector 3Directional Antennas with Sites
txsite/rxsite require measuredAntenna with E = [] and Directivity set. See reference/measured-antennas.md Workflow 2 for the full conversion pattern.
Path Loss Computation
pm = propagationModel("freespace");
pl = pathloss(pm, rx, tx);
fprintf("Free-space path loss: %.1f dB\n", pl);Standalone Path Loss Functions
Quick calculations without creating sites:
freq = 28e9;
d = 500; % meters
c = physconst("LightSpeed");
L_fs = fspl(d, c/freq); % Free-space
L_rain = rainpl(d, freq, 25); % Rain (25 mm/hr)
L_gas = gaspl(d, freq, 15, 101325, 7.5); % Gas
L_fog = fogpl(d, freq, 15, 0.05); % Fog (temp=15°C, density=0.05 g/m^3)Communication Link Status
% Returns logical pass/fail (received > sensitivity?)
status = link(rx, tx, "longley-rice");
fprintf("Link closed: %s\n", string(status));Range from Path Loss Budget
pm = propagationModel("freespace");
tx = txsite(TransmitterFrequency=900e6, TransmitterPower=5, AntennaHeight=30);
r = range(pm, tx, 120); % max range for 120 dB losspropagationData (Measurements)
pd = propagationData([42.30 42.31 42.32], [-71.35 -71.35 -71.35], "Power", [-65 -72 -81]);
plot(pd); contour(pd);
% From CSV file
pd = propagationData("measurements.csv");
vals = interp(pd, newLat, newLon);Custom Terrain
addCustomTerrain("myRegion", "terrain_data.dt2");
viewer = siteviewer(Terrain="myRegion");
coverage(tx, MaxRange=10000, Map=viewer);
removeCustomTerrain("myRegion");Buildings and Materials
viewer = siteviewer(Buildings="boston.osm");
pm = propagationModel("raytracing");
pm.BuildingsMaterial = "concrete";
pm.TerrainMaterial = "concrete";Available: "concrete", "brick", "wood", "glass", "metal", "vegetation".
Key Rules
sigstrength(rxArray, txArray, pm)returns numTX-by-numRX matrixSurfaceMaterialis for cartesian;BuildingsMaterial/TerrainMaterialfor geographicSceneModelacceptstriangulationobjects (not just file paths)coverage/sinrreturnpropagationDatawhen called with output argumentRay tracing requires buildings or scene data -- no value without geometry
Do not call
show(tx)in headless environments -- use analysis functions directlysiteviewerdoes not support custom shape overlays; usegeoaxes+contour(pd)for custom annotationsGPU acceleration (
UseGPU="on") significantly speeds ray tracing with large scenes
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