Generated banner for Matlab Integrate Antenna
Generated logo for Matlab Integrate Antenna

Matlab Integrate Antenna

MathWorksOfficialCreated by MathWorks

  • Skill
  • Tool integration
  • Software development
  • BSD-2-Clause
  • No issues found

From the author

Integrate antennas into RF systems using MATLAB Antenna Toolbox and RF Toolbox. Covers impedance matching network design (L/Pi/Tee topologies, evaluation parameters, Richards transformation), measured antenna creation (E-field, directivity-only, EmbeddedE, ffsReader import), RF propagation and site planning (txsite/rxsite, coverage, SINR, ray tracing, link budget), and SAR estimation (birdcage+Phantom, conformalArray+Custom3D, direct EHfields). Use when the user wants to match an antenna, create a measuredAntenna, compute coverage or signal strength, perform ray tracing, or estimate SAR.
— the description by MathWorks

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

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/matlab/matlab-integrate-antenna/download
  2. Unzip 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 measuredAntenna from pattern data or simulation

  • Use an antenna with txsite/rxsite for propagation

  • Import 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-antenna

  • Reflector antennas, reflectarrays, installed antennas, or RCS -- use matlab-analyze-antenna-structures

Must-Follow Rules

Matching Networks
  • Set CenterFrequency BEFORE LoadImpedance for frequency-dependent loads -- errors otherwise

  • Property is Bandwidth not BandWidth -- case-sensitive

  • addEvaluationParameter requires all 5 args: parameter, comparison, targetdB, band, weight

  • Prefer sparameters(ant, freqRange) as load over raw antenna object (avoids repeated EM solves)

  • Default to Components = 2 unless fractional BW > 5% (then use 3)

Measured Antennas
  • Always transpose after meshgrid for az-fast ordering -- silently wrong patterns otherwise

  • txsite/rxsite require E = [] -- errors if E-field data is present

  • Only patternMultiply works when measuredAntenna is the Element of an array (not pattern)

  • CalculateTotalField = true is required for EmbeddedE workflow

  • EHfields returns 3-by-P -- transpose to P-by-3 for measuredAntenna

RF Propagation
  • Do not call show(tx) in headless environments -- use analysis functions directly

  • sigstrength(rxArray, txArray, pm) returns numTX-by-numRX matrix

  • pathloss with ray tracing returns cell arrays -- sum powers in linear domain

  • SurfaceMaterial is for cartesian scenes; BuildingsMaterial/TerrainMaterial for geographic

  • Ray tracing requires buildings or scene data -- no value without geometry

SAR
  • EHfields expects 3-by-M -- pass obsPoints'

  • dielectric class enforces LossTangent <= 0.03 -- only birdcage.Phantom and direct EHfields bypass

  • Always validate SAR with power balance check (efficiency vs SAR integral)

  • Always normalize to a known input power (typically 1W accepted)

  • conformalArray rejects intersecting geometries -- cannot place antenna inside tissue

Workflow

1. Impedance Matching
  1. Parse -- Identify load (antenna, impedance, file), frequency, bandwidth, topology

  2. Create -- Set CenterFrequency FIRST, then LoadImpedance, Bandwidth, Components

  3. Evaluate -- addEvaluationParameter for gammain or Gt goals

  4. Inspect -- circuitDescriptions returns ranked candidates

  5. Visualize -- rfplot (S11/gain), smithplot (impedance transformation)

  6. Export -- exportCircuits for RF Toolbox circuit; richards for distributed elements

2. Measured Antenna Creation
  1. Parse -- Identify source antenna/array, frequency, intended use case

  2. Select workflow -- E-field, Directivity-only, EmbeddedE, element-in-array, or ffsReader

  3. Generate grid -- Spherical grid with correct transpose for az-fast ordering

  4. Extract data -- EHfields (3-by-P, transpose to P-by-3) or pattern (el-by-az, transpose)

  5. Build -- Construct measuredAntenna with correct property combination

  6. Verify -- Compare pattern against original antenna/array

3. RF Propagation & Site Planning
  1. Parse -- Identify analysis type (coverage, SINR, ray tracing, link budget), frequency, environment

  2. Create sites -- txsite/rxsite with location, antenna, frequency, power

  3. Select model -- Choose propagation model based on environment

  4. Analyze -- sigstrength, coverage, sinr, raytrace, or los

  5. Report -- Signal strength (dBm), path loss (dB), SINR (dB), link margin

4. SAR Estimation
  1. Select approach -- birdcage+Phantom, conformalArray+Custom3D, or direct EHfields

  2. Build tissue model -- Phantom struct, shape.Custom3D with catalog material, or post-processing

  3. Compute E-fields -- EHfields(ant, freq, obsPoints') (3-by-M format)

  4. Calculate SAR -- Apply formula with tissue sigma and rho; normalize to input power

  5. Validate -- Power balance check (efficiency method vs SAR integral)

Key Classes

ClassPurpose
matchingnetworkL/C matching network synthesis and ranking
measuredAntennaWraps field/pattern data for interoperability
txsite / rxsiteTransmitter/receiver sites for propagation
propagationModelPath loss model selection (freespace, raytracing, etc.)
propagationDataImport/visualize RF measurement data
siteviewerMap visualization (geographic or cartesian)
birdcageMRI coil with Phantom support
conformalArrayArbitrary element positions (antenna + dielectric body)
shape.Custom3DPassive dielectric scatterer for SAR
ffsReaderImport CST .ffs far-field data (R2026a+)

Conventions

Coding Standards
  • 4-space indentation, lowerCamelCase variables, UpperCamelCase Name-Value args

  • "double quotes" for strings, fprintf for formatted output

  • Do not add titles to Antenna Toolbox plots (pattern, show, rfplot, smithplot)

  • Do add titles to manual plot, scatter3, imagesc figures

  • Do not call show(tx) without siteviewer in headless environments

  • Show 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 lossreferences/rf-propagation.md
Computing SAR (birdcage, conformalArray, EHfields, power balance)references/sar-estimation.md

Copyright 2026 The MathWorks, Inc.

Files

references/sar-estimation.md

SAR Estimation

SAR Formula

SAR = sigma * |E|^2 / (2 * rho)   [W/kg]
  • sigma = tissue conductivity (S/m)

  • |E| = electric field magnitude inside tissue (V/m)

  • rho = tissue mass density (kg/m^3)

Conductivity relates to loss tangent: sigma = omega * eps0 * epsR * tanD

Three Approaches

ApproachAntennaTissue ModelBest For
birdcage + PhantomBirdcage MRI coil onlyVolumetric tetrahedral mesh (struct)MRI SAR with realistic tissue
conformalArray + shape.Custom3DAny antennaSurface triangulation with catalog materialPhone/device SAR (antenna outside tissue)
Direct EHfields + formulaAny antennaPost-processing onlyImplantable antenna SAR

Key limitation: The dielectric class enforces LossTangent <= 0.03. Real tissue (brain 900 MHz: tanD ~ 0.36) exceeds this. Only birdcage.Phantom bypasses this using a custom struct. The direct EHfields approach avoids the cap by applying conductivity in the formula only.

Approach 1: birdcage + Phantom

The birdcage antenna is the ONLY object supporting volumetric dielectrics via its Phantom property.

Phantom Data Format
phantom = struct( ...
    Points=vertices, ...      % N x 3 (meters)
    Tetrahedra=elements, ...  % M x 4
    EpsilonR=epsR, ...        % scalar
    LossTangent=tanD);        % scalar, no cap
Shipped Phantoms
  • humanheadcoarse.mat -- 584 vertices, 2818 tetrahedra (fast)

  • humanheadfine.mat -- finer resolution (slower)

Both provide P (vertices) and T (tetrahedra). Apply scaleFactor = 0.003.

Workflow
freq = 128e6;  % 3T MRI
tissueEpsR = 77;
tissueSigma = 0.51;
tissueRho = 1040;
omega = 2 * pi * freq;
eps0 = 8.854e-12;
tanD = tissueSigma / (omega * eps0 * tissueEpsR);

load humanheadcoarse.mat
scaleFactor = 0.003;
phantom = struct( ...
    Points=scaleFactor * P, ...
    Tetrahedra=T, ...
    EpsilonR=tissueEpsR, ...
    LossTangent=tanD);

bc = birdcage(Phantom=phantom);
figure; show(bc);

gridSpacing = 0.02;
[obsPoints, insideMask] = createObservationGrid(phantom.Points, gridSpacing);
[E, ~] = EHfields(bc, freq, obsPoints');

E_mag_sq = abs(E(1,:)).^2 + abs(E(2,:)).^2 + abs(E(3,:)).^2;
SAR_point = tissueSigma * E_mag_sq / (2 * tissueRho);
birdcage Properties
  • NumRungs (not NumLegs)

  • CoilRadius (not Radius)

  • CoilHeight (not Height)

Approach 2: conformalArray + shape.Custom3D

Place any antenna alongside a dielectric head phantom. shape.Custom3D acts as a passive dielectric scatterer -- no feed required.

freq = 2.4e9;
c = physconst("LightSpeed");
lambda = c / freq;

load humanheadcoarse.mat
scaleFactor = 0.003;
pts = scaleFactor * P;
pts = pts * (0.18 / (max(pts(:,1)) - min(pts(:,1))));

TR = triangulation(T, pts);
[surfFaces, surfVertices] = freeBoundary(TR);
headTri = triangulation(surfFaces, surfVertices);

headShape = shape.Custom3D(headTri);
headShape.Dielectric = "TMM10";  % returns a plain string (not a dielectric object)

d = design(dipole, freq);

arr = conformalArray;
arr.Element = {d, headShape};
arr.ElementPosition = [0.10 0 0; 0 0 0];
arr.Reference = "origin";

figure; show(arr);
figure; pattern(arr, freq);

gridSpacing = 0.015;
[obsPoints, insideMask] = createObservationGrid(pts, gridSpacing);
[E, ~] = EHfields(arr, freq, obsPoints');

epsR = 9.8; tanD_mat = 0.0022; rho = 2270;
omega = 2 * pi * freq; eps0 = 8.854e-12;
sigma = omega * eps0 * epsR * tanD_mat;
E_mag_sq = abs(E(1,:)).^2 + abs(E(2,:)).^2 + abs(E(3,:)).^2;
SAR_point = sigma * E_mag_sq / (2 * rho);

Approach 3: Direct EHfields (Implantable)

For antennas embedded inside tissue. conformalArray cannot be used because the solver rejects intersecting geometries.

Limitation: Tissue loading on antenna impedance is not captured. Conductivity is applied only in the SAR formula.

freq = 2.4e9;

% Build implantable pcbStack
ant = pcbStack;
ant.BoardShape = antenna.Rectangle(Length=25e-3, Width=25e-3);
ant.BoardThickness = 1.27e-3 + 0.5e-3;
ant.Layers = {sup, patch, sub, ground};
ant.FeedLocations = [Lp/4, 0, 2, 4];
ant.FeedDiameter = 0.6e-3;

% Observation grid in tissue
[X, Y, Z] = meshgrid(xobs, yobs, zobs);
obsPoints = [X(:), Y(:), Z(:)];

[E, ~] = EHfields(ant, freq, obsPoints.');
E_mag_sq = abs(E(1,:)).^2 + abs(E(2,:)).^2 + abs(E(3,:)).^2;

% Power normalization
Z_in = impedance(ant, freq);
P_accepted = 0.5 * real(Z_in) / abs(Z_in)^2;
E_mag_sq_norm = E_mag_sq / P_accepted;

% SAR with real tissue properties
sigma_skin = 1.464;
rho_skin = 1100;
SAR = sigma_skin * E_mag_sq_norm / (2 * rho_skin);
fprintf("Peak point SAR: %.2f W/kg per 1W input\n", max(SAR));

Observation Grid Generation

function [obsPoints, insideMask] = createObservationGrid(pts, gridSpacing)
    margin = gridSpacing;
    xVec = (min(pts(:,1))+margin) : gridSpacing : (max(pts(:,1))-margin);
    yVec = (min(pts(:,2))+margin) : gridSpacing : (max(pts(:,2))-margin);
    zVec = (min(pts(:,3))+margin) : gridSpacing : (max(pts(:,3))-margin);
    [Xg, Yg, Zg] = meshgrid(xVec, yVec, zVec);
    allPts = [Xg(:), Yg(:), Zg(:)];

    DT = delaunayTriangulation(pts);
    insideMask = ~isnan(pointLocation(DT, allPts));
    obsPoints = allPts(insideMask, :);
end

EHfields expects 3-by-M -- pass obsPoints'.

Power Normalization

Z_in = impedance(ant, freq);
P_accepted = 0.5 * real(Z_in) / abs(Z_in)^2;  % power at 1V
SAR_1W = SAR_point * (1.0 / P_accepted);       % scale to 1W

For birdcage (multiple ports): Z_in = Z_in(1).

Mass-Averaged SAR (10g / 1g)

avgMass = 0.010;  % 10g (ICNIRP) or 0.001 (FCC 1g)
avgCubeSide = (avgMass / tissueRho)^(1/3);
halfSide = avgCubeSide / 2;

SAR_avg = zeros(size(SAR_1W));
for i = 1:numel(SAR_1W)
    dx = abs(obsPoints(:,1) - obsPoints(i,1));
    dy = abs(obsPoints(:,2) - obsPoints(i,2));
    dz = abs(obsPoints(:,3) - obsPoints(i,3));
    mask = (dx <= halfSide) & (dy <= halfSide) & (dz <= halfSide);
    SAR_avg(i) = mean(SAR_1W(mask));
end

Power Balance Validation

Two independent methods must agree (Approaches 1 and 2):

% Method 1: Efficiency
eta = efficiency(ant, freq);
P_absorbed_eff = P_accepted * (1 - eta);

% Method 2: SAR integral
deltaV = gridSpacing^3;
P_absorbed_SAR = sum(SAR_point) * tissueRho * deltaV;

% Compare
relError = abs(P_absorbed_SAR - P_absorbed_eff) / P_absorbed_eff * 100;
% < 20%: PASS, 20-50%: MARGINAL, > 50%: refine grid

Approach 3 caveat: For direct EHfields, efficiency(ant, freq) reflects the free-space antenna (no tissue loading). The SAR integral will show significantly higher absorbed power than the efficiency method predicts — this is expected behavior, not an error. Report both values and the relative error as a known limitation. Do NOT iterate to reduce it.

Tissue Properties Reference

Tissue (freq)epsRsigma (S/m)tan deltarho (kg/m^3)
Brain (128 MHz)770.510.931040
Brain (900 MHz)520.940.361040
Brain (2.4 GHz)481.80.281040
Muscle (900 MHz)550.940.341040
Skin (900 MHz)410.870.421100

Regulatory SAR Limits

StandardLimitAveraging MassRegion
FCC (USA)1.6 W/kg1 gHead/body
ICNIRP (EU)2.0 W/kg10 gHead/trunk
ICNIRP (EU)4.0 W/kg10 gLimbs
IEC 60601-2-33 (MRI)3.2 W/kg10 gHead

Available Catalog Materials

MaterialepsRtan deltaNotes
TMM109.80.0022Highest permittivity
TMM66.30.0023
FR44.80.026Highest loss tangent
Teflon2.10.0002Very low loss

For SAR demonstrations, use TMM10 to maximize tissue-like behavior within the cap.

Approach Selection

  • birdcage + Phantom: MRI coil SAR, realistic tissue (high LossTangent)

  • conformalArray + shape.Custom3D: Phone/device SAR, antenna outside tissue

  • Direct EHfields: Implantable antenna, any type, real conductivity in formula

Key Rules

  • EHfields expects 3-by-M -- pass obsPoints'

  • For birdcage, take Z_in(1) since impedance returns a vector

  • Grid spacing: 20mm for demos, 5mm for publication quality

  • Always validate with power balance check (Approaches 1 and 2; for Approach 3, report values but expect large divergence)

  • Always normalize to a known input power (typically 1W accepted)

  • Warn about the LossTangent cap when tissue properties are requested

  • conformalArray rejects intersecting geometries (antenna inside tissue fails)

  • shape objects go directly in conformalArray.Element without wrapping in customAntenna


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