Skip to main content
ClaudeWave
Skill618 estrellas del repoactualizado 8d ago

matlab-create-ai-antenna

This skill enables rapid antenna design exploration and 3D radiation pattern reconstruction using AI surrogate models in MATLAB. Use AIAntenna to instantly sweep catalog antenna parameters and predict performance metrics like resonant frequency and beamwidth without full electromagnetic simulation, or employ patternFromAI to reconstruct complete 3D radiation patterns from two orthogonal 2D measured pattern slices.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-create-ai-antenna && cp -r /tmp/matlab-create-ai-antenna/skills-catalog/rf-and-mixed-signal/matlab-create-ai-antenna ~/.claude/skills/matlab-create-ai-antenna
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# AI Antenna Workflows Skill

You are an expert RF and antenna engineer assisting with AI-accelerated antenna design and pattern reconstruction. Use MATLAB Antenna Toolbox `AIAntenna` for rapid design-space exploration and `patternFromAI` for 3D pattern reconstruction from 2D slices.

## When to Use

- User wants to quickly explore antenna design space without running full EM simulations
- User wants to sweep antenna parameters and instantly see performance (resonant frequency, bandwidth, beamwidth)
- User wants to reconstruct a full 3D radiation pattern from two measured 2D pattern cuts
- User has datasheet or chamber-measured 2D pattern slices and wants a 3D model
- User asks about AI-based antenna design or surrogate models
- User wants to tune antenna dimensions interactively and export the result

## When NOT to Use

- User wants full-wave EM simulation accuracy — use `matlab-design-antenna`
- User wants to design from scratch with `design()` — use `matlab-design-antenna`
- User wants PCB stackup or fabrication — use `matlab-design-pcb-antenna`
- User wants to optimize antenna dimensions with SADEA — use `matlab-optimize-antenna`

## AIAntenna Overview

`em.ai.AIAntenna` creates a pretrained surrogate model of a catalog antenna. Once created, you can instantly:
- Tune geometric parameters and get predicted resonant frequency, bandwidth, beamwidth, and peak radiation
- Explore the full design space without running MoM simulations (milliseconds vs. minutes)
- Export the tuned parameters to a real catalog antenna for full-wave validation

**Key advantage:** 1000x faster than full-wave simulation for parametric sweeps. The AI model predicts antenna performance from geometry in milliseconds.

**Limitation:** Predictions are approximate (surrogate model). Always validate final designs with `exportAntenna` + full-wave analysis.

### Requirements

- Antenna Toolbox
- Statistics and Machine Learning Toolbox

### Supported Antenna Types

| Type | Description |
|------|-------------|
| `"dipole"` | Half-wave dipole |
| `"patchMicrostrip"` | Rectangular microstrip patch |
| `"patchMicrostripCircular"` | Circular microstrip patch |
| `"patchMicrostripElliptical"` | Elliptical microstrip patch |
| `"patchMicrostripInsetfed"` | Inset-fed microstrip patch |
| `"patchMicrostripEnotch"` | E-notch microstrip patch |
| `"patchMicrostripHnotch"` | H-notch microstrip patch |
| `"patchMicrostripTriangular"` | Triangular microstrip patch |
| `"pifa"` | Planar inverted-F antenna |
| `"dipoleHelix"` | Helical dipole |
| `"waveguide"` | Open-ended waveguide |
| `"horn"` | Pyramidal horn |

### Creation

Create an AIAntenna using `design` with `ForAI=true`. **Only the 12 antenna types listed above are supported** — other catalog antennas (helix, yagiUda, vivaldi, monopole, etc.) do not have pretrained AI models.

```matlab
freq = 2.4e9;

% Create AI model from a supported catalog antenna
ant = patchMicrostrip;
antAI = design(ant, freq, ForAI=true);

% Or directly with the antenna constructor
antAI = design(horn, 10e9, ForAI=true);
```

`design(..., ForAI=true)` initializes the AI model with appropriate default dimensions for the target frequency. The direct `em.ai.AIAntenna()` constructor is not supported — always use `design`. If the user requests an antenna type not in the supported list, recommend using `matlab-design-antenna` or `matlab-optimize-antenna` skills instead.

### Core Workflow

```matlab
freq = 1e9;
antAI = design(horn, freq, ForAI=true);

% View default tunable parameters
defaults = defaultTunableParameters(antAI);
disp(defaults)

% Check tunable ranges
ranges = tunableRanges(antAI);
disp(ranges)

% Visualize geometry
figure; show(antAI);

% Get performance predictions (instant)
fRes = resonantFrequency(antAI);
[bw, fL, fU, matching] = bandwidth(antAI);
fprintf("Resonant frequency: %.3f GHz\n", fRes/1e9);
fprintf("Bandwidth: %.1f MHz (%.3f - %.3f GHz)\n", bw/1e6, fL/1e9, fU/1e9);
fprintf("Matching: %s\n", matching);  % "Matched", "Almost", or "Not Matched"
```

### Tuning Parameters

After creation, the AIAntenna object exposes dynamic properties matching the catalog antenna's geometric dimensions. Set them directly:

```matlab
antAI = design(patchMicrostrip, 2.4e9, ForAI=true);

% Check what's tunable and its bounds
ranges = tunableRanges(antAI);
disp(ranges)

% Tune dimensions directly (property names match catalog antenna)
antAI.Length = 0.035;
antAI.Width = 0.045;
antAI.Height = 0.002;

% Instantly check new performance
fRes = resonantFrequency(antAI);
[bw, fL, fU, matching] = bandwidth(antAI);
fprintf("After tuning: fRes=%.3f GHz, BW=%.1f MHz, %s\n", fRes/1e9, bw/1e6, matching);

% Reset to defaults
reset(antAI);
```

### Tunable Ranges

`tunableRanges` returns a table with bounds for each tunable property:

```matlab
ranges = tunableRanges(antAI);           % default: "all" bounds
ranges = tunableRanges(antAI, "strict"); % tighter bounds (higher accuracy)
ranges = tunableRanges(antAI, "loose");  % wider bounds (may reduce accuracy)
```

Use `"strict"` bounds for best prediction accuracy. Parameters outside strict bounds may give unreliable results.

### Peak Radiation and Beamwidth

```matlab
freq = 5.8e9;
ai = design(horn, freq, ForAI=true);

% Peak radiation (gain and direction)
[peakGain, az, el] = peakRadiation(ai, freq);
fprintf("Peak gain: %.2f dBi at az=%.1f, el=%.1f deg\n", peakGain, az, el);

% Beamwidth
[hpbw, angles, plane] = beamwidth(ai, freq);
fprintf("HPBW: %.1f deg (E-plane), %.1f deg (H-plane)\n", hpbw(1), hpbw(2));
```

### Parametric Sweep (Design-Space Exploration)

The main use case — sweep a parameter and plot performance:

```matlab
freq = 2.4e9;
ai = design(patchMicrostrip, freq, ForAI=true);

ranges = tunableRanges(ai, "strict");

% Sweep patch length
lengthRange = linspace(ranges.Length(1), ranges.Length(2), 20);
fResVec = zeros(size(lengthRange));
bwVec = zeros(size(lengthRange));

for k = 1:numel(lengthRange)
    ai.Length = lengthRange(k);
    fResVec(k) = r
matlab-train-networkSkill

>

matlab-driving-data-importerSkill

Import recorded driving sensor data (GPS, camera, lidar, actor tracks, lanes) into scenariobuilder.* objects (GPSData, CameraData, LidarData, ActorTrackData, Trajectory, laneData) and run preprocessing — synchronize, offset correction, crop, normalizeTimestamps, convertTimestamps. Also: compute actor tracks from lidar when no annotations exist, attach camera/lidar mounting + intrinsics, export to MAT/workspace/timetable/script. Use for raw driving dataset files (KITTI, nuScenes, Waymo, Pandaset, ROS/ROS2 bags, .mat, .csv, .mp4) or driving/vehicle/sensor logs that need wrapping. drivingLogAnalyzer (DLA) is OPT-IN ONLY — invoke only on explicit user request ('DLA', 'open in DLA', 'inspect/explore/analyze the recording') or reported sensor problem (sync drift, timestamp mismatch, overlay misalignment). NEVER auto-launch DLA after wrapping (Rule 0). For 'build scenario / export to RoadRunner / drivingScenario / OpenSCENARIO / Unreal / simulate', hand off to matlab-scenario-builder.

matlab-scenario-builderSkill

Generate driving scenes, scenarios, road surfaces, and 3D content from already-wrapped scenariobuilder.* sensor data (GPS, camera, lidar, actor tracks) using Scenario Builder for Automated Driving Toolbox. Use to BUILD, EXPORT, or AUGMENT a virtual scenario/scene/map: ego or actor trajectories, trajectory smoothing, OpenCRG road-surface extraction, 3D asset generation, static-object placement, point-cloud georeferencing + elevation, lane-based ego localization, sensor-fusion tracking, scenario-event extraction (cut-ins, hard brakes, near-misses, ADAS disengagements), or export to RoadRunner, drivingScenario, OpenDRIVE, OpenCRG, OpenSCENARIO, or Unreal Engine. Also: log-to-scenario, scenario harvesting, accident/near-miss reconstruction, SOTIF (ISO 21448) and ISO 26262 scenario coverage, USGS-aerial-lidar scene augmentation, traffic-sign placement from camera+lidar logs. NOT for raw-data import or multi-sensor sync/crop/offset/timestamp normalization — route those to matlab-driving-data-importer.

roadrunner-asset-mappingSkill

>

roadrunner-convert-lanelet2-to-rrhdSkill

>

roadrunner-import-sceneSkill

>

roadrunner-rrhd-authoringSkill

>

matlab-build-simbiology-modelSkill

Build, modify, and diagram SimBiology models — API reference, helper functions, and layout patterns. Use when constructing or editing models programmatically or visually.