matlab-design-array
This skill enables design and analysis of finite antenna arrays (linear, rectangular, circular, conformal) and infinite periodic arrays using MATLAB Antenna Toolbox. Use it when needing to create array geometries, apply beam steering or amplitude tapering, analyze mutual coupling and grating lobes, or investigate scan impedance and blindness in periodic structures.
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-design-array && cp -r /tmp/matlab-design-array/skills-catalog/rf-and-mixed-signal/matlab-design-array ~/.claude/skills/matlab-design-arraySKILL.md
# Array Design Skill (Finite & Infinite)
You are an expert RF and antenna engineer assisting a professional engineer with antenna array design. Use MATLAB Antenna Toolbox to design, analyze, and visualize both finite and infinite (periodic) arrays.
## When to Use
- User wants to design a linear, rectangular, circular, or conformal antenna array
- User asks about infinite/periodic array analysis (scan impedance, scan blindness, Floquet)
- User wants beam steering, amplitude tapering, or grating lobe analysis
- User asks about mutual coupling, isolation, or envelope correlation (MIMO)
- User wants to compare array factor vs. full-wave pattern
## When NOT to Use
- User wants a single antenna element (no array) — use `matlab-design-antenna`
- User wants a PCB-based array with stackup layers — use `matlab-designing-pcb-antennas`
- User wants a reflectarray with unit cell phase synthesis — use `matlab-designing-reflectarrays`
- User wants to optimize array parameters (SADEA) — use `matlab-optimizing-antennas`
## Core Workflow
1. **Parse the request** -- Identify array type (finite or infinite), element type, frequency, number of elements, spacing, scan angle, taper, and constraints.
2. **Build the array** -- Create the array object, set size/lattice, then call `design()`.
3. **Apply beam steering** (if requested) -- `phaseShift()` for finite arrays; `ScanAzimuth`/`ScanElevation` for infinite arrays.
4. **Apply amplitude tapering** (finite only) -- Set `arr.AmplitudeTaper`.
5. **Display** -- `show(arr)` and `layout(arr)` for finite; `show(infa)` for infinite.
6. **Analyze and report** -- Pattern, S-parameters, impedance. Summarize key metrics.
## Finite Array Types
| Array Type | Key Properties | Notes |
|------------|----------------|-------|
| `linearArray` | `Element`, `NumElements`, `ElementSpacing`, `AmplitudeTaper`, `PhaseShift` | 1D uniform spacing |
| `rectangularArray` | `Element`, `Size` ([rows cols]), `RowSpacing`, `ColumnSpacing`, `Lattice` | 2D planar |
| `circularArray` | `Element`, `NumElements`, `Radius`, `AmplitudeTaper`, `PhaseShift` | Circular ring |
| `conformalArray` | `Element` (cell array), `ElementPosition` (Nx3) | Fully explicit geometry |
**Name mapping:** "ULA" -> `linearArray`, "URA"/"planar" -> `rectangularArray`, "UCA" -> `circularArray`
## Infinite Array
`infiniteArray` models a single unit cell with periodic (Floquet) boundary conditions -- simulates an infinite periodic array. One unit cell captures full periodic behavior including mutual coupling and scan effects.
**Key differences from finite arrays:**
- No `NumElements` or `ElementSpacing` -- unit cell size = element's ground plane dimensions.
- Always rectangular lattice (no triangular option).
- `impedance()` returns scan impedance at current `ScanAzimuth`/`ScanElevation`.
- Single port -- no `ElementNumber` argument.
## Array Creation with design()
### Finite Arrays
Set size properties **before** calling `design()`. Always pass element as third argument for non-dipole elements.
```matlab
freq = 2.4e9;
% 8-element linear patch array
arr = linearArray;
arr.NumElements = 8;
arr = design(arr, freq, patchMicrostrip);
% 4x4 rectangular array with triangular lattice
arr = rectangularArray;
arr.Size = [4, 4];
arr.Lattice = "Triangular";
arr = design(arr, freq, dipole);
% 6-element circular array
arr = circularArray;
arr.NumElements = 6;
arr = design(arr, freq, dipole);
```
**Important:** `design(arr, freq)` with only two arguments resets element to `dipole`. Always pass the element as the third argument.
### Infinite Array
```matlab
infa = design(infiniteArray, freq, patchMicrostrip);
% Adjust unit cell to lambda/2 spacing
c = physconst("LightSpeed");
lambda = c / freq;
infa.Element.GroundPlaneLength = lambda / 2;
infa.Element.GroundPlaneWidth = lambda / 2;
```
### Supported Infinite Array Elements
**Common direct elements:**
| Element | Has Substrate | Notes |
|---------|---------------|-------|
| `patchMicrostrip` | Yes | Most common |
| `patchMicrostripCircular` | Yes | Circular patch |
| `patchMicrostripEnotch` | Yes | Wideband |
| `patchMicrostripElliptical` | Yes | Elliptical patch |
| `patchMicrostripHnotch` | Yes | H-notch wideband |
| `patchMicrostripTriangular` | Yes | Triangular patch |
| `monopole` | No | On ground plane |
| `monopoleTopHat` | Yes | Air substrate only in infiniteArray |
| `monopoleCylindrical` | No | On ground plane |
| `invertedL` | No | On ground plane |
| `helix` | Yes | Air substrate only in infiniteArray |
| `fractalSnowflake` | Yes | Fractal element |
| `monocone` | No | On ground plane |
**Reflector-backed elements** (for balanced antennas without ground planes):
```matlab
r = reflector;
r.Exciter = dipole;
infa = design(infiniteArray, freq, r);
```
**General rule:** Elements with `GroundPlaneLength`/`GroundPlaneRadius` property cannot be used as reflector exciters in `infiniteArray`.
**Unsupported reflector exciters:** `dipoleCrossed`, `eggCrate`, `lpda`, `rhombic`.
**Substrate constraints for reflector exciters:** Only these support non-Air substrate: `dipole`, `fractalGasket`, `fractalKoch`, `loopCircular`, `loopRectangular`, `spiralArchimedean`, `spiralEquiangular`, `spiralRectangular`. All others require Air substrate.
**RemoveGround:** Only reflector-backed elements support `infa.RemoveGround = true`. Direct elements do not. `RemoveGround + non-Air substrate` is invalid.
**Element escalation path:** If an element doesn't work directly, try: direct element → reflector-wrapped → reflector with Air substrate → report unsupported.
**Unsupported entirely:** standalone `slot`, `vivaldi`, `invertedF`, `pifa`.
## Conformal Array
```matlab
N = 6;
radius = 0.05;
angles = linspace(0, 2*pi*(1 - 1/N), N);
positions = [radius*cos(angles(:)), radius*sin(angles(:)), zeros(N, 1)];
arr = conformalArray;
arr.ElementPosition = positions;
arr.Element = repmat({elem}, 1, N); % cell array, one per element
```
`Element` cell array length must equal `Element>
Analyze AMS waveform data using Mixed-Signal Blockset utilities: phase noise measurement, clock jitter, anti-aliased resampling, timing measurements, lock time, INL/DNL, ADC/DAC calibration, HSpice import. Use when analyzing time-domain voltage from PLL/VCO/clock simulations, measuring phase noise from variable-step solver output, computing jitter, or resampling non-uniform data.
Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.
Analyze the effective toolbox file set to produce a Dependency Manifest — classify all transitive dependencies as included, product, add-on, or external-unresolved, then present resolution options with tradeoffs. Use after matlab-define-toolbox-api when the spec is approved.
S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters() or solver code — API is non-obvious. SKIP: designing or creating components (use the specific matlab-design-pcb-* skill), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design), PDN/IR-drop analysis (use matlab-analyze-pcb-pdn).
Analyze antennas installed on electrically large conducting platforms using MATLAB Antenna Toolbox. Loads platform geometry from STL/STEP/IGES, installs antenna elements, selects electromagnetic solvers (MoM-PO, FMM, MoM), and computes patterns, impedance, coupling, and efficiency. Use when the user wants to model an antenna on a vehicle, aircraft, ship, satellite, or other large structure.
PDN DC voltage/current analysis, IR drop, design rule checking, and multi-net batch analysis on imported PCB layouts. TRIGGER: user asks about power integrity, PDN analysis, IR drop, voltage distribution, current density, power nets, or design rule checking on a PCB. Invoke BEFORE writing code — the PDN API chain is specialized and non-obvious. SKIP: importing a PCB file (use matlab-read-pcb-layout), EM field/S-parameter extraction (use matlab-analyze-em), material/stackup setup only (use matlab-manage-pcb-material), transmission line design (use matlab-design-pcb-txline).
Calculate and visualize monostatic and bistatic radar cross section (RCS) using MATLAB Antenna Toolbox. Computes RCS of platforms, antennas, and arrays with PO, MoM, and FMM solvers, supporting HH/VV/HV/VH polarization, GPU acceleration, and near-field observation. Use when the user wants to compute, plot, or analyze radar cross section.