Skip to main content
ClaudeWave
ES, Spanish
Skill1.2k estrellas del repoactualizado 6d ago

matlab-design-pcb-txline

This skill designs and analyzes transmission line geometries including microstrip, stripline, CPW, and differential pairs on PCB stackups. Use it when calculating impedance-controlled trace dimensions, extracting per-unit-length RLGC parameters from 2D cross-sections, modeling crosstalk between coupled traces, or auto-sizing lines for target impedance at specified frequencies. Invoke before writing electromagnetic simulation code and prefer it over RF Toolbox analytical functions.

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

SKILL.md

# Designing Transmission Lines

## When to Use

- Designing microstrip, stripline, or CPW transmission lines for impedance control
- Modeling differential pairs with or without aggressor traces for NEXT/FEXT crosstalk
- Analyzing 2D cross-sections for fast per-unit-length RLGC extraction
- Creating SIW (substrate integrated waveguide) lines
- Using `design()` to auto-size lines for target impedance at a given frequency

## When NOT to Use

- Building custom PCB structures from shapes — use `matlab-assemble-pcb-layout`
- Setting up substrate or conductor materials — use `matlab-manage-pcb-material`
- Running S-parameter or field analysis after design — use `matlab-analyze-em`
- Cascading transmission lines with other components — use `matlab-integrate-pcb-circuit`

## Tool Selection Priority

1. **RF PCB Toolbox** (default): `microstripLine`, `pcb2D`, `stripLine`, `coplanarWaveguide`, etc.
   - 2D field solver — accurate for loss, coupling, and arbitrary stackups
   - Use for any RLGC, impedance, cross-section, or transmission line design task

2. **RF Toolbox** (fallback only): `txlineMicrostrip`, `txlineStripline`, `txlineCPW`
   - Analytical closed-form approximations, less accurate
   - Use ONLY when: the user explicitly names these functions, or states RF PCB Toolbox is unavailable

## Typical Workflow

1. **Before:** `matlab-manage-pcb-material` — set up substrate and conductor
2. **This skill:** Design and analyze the transmission line
3. **Check mesh/memory:** `memoryEstimate(obj, fc, 'RetainMesh', true)` — inspect auto-mesh before solving
4. **After:** `matlab-analyze-em` — validate S-parameters → `matlab-optimize-pcb-design` — tune → `matlab-integrate-pcb-circuit` — cascade

## Quick Reference

| Object | Topology | Key Properties |
|--------|----------|---------------|
| `microstripLine` | Single microstrip on ground | Length, Width, Height, GroundPlaneWidth |
| `stripLine` | Signal embedded in dielectric | Length, Width, Height, GroundPlaneWidth |
| `coplanarWaveguide` | CPW on substrate | Length, Width, Height, SlotWidth, GroundPlaneWidth |
| `coupledMicrostripLine` | Edge-coupled microstrip pair | Length, Width, Spacing, Height |
| `coupledStripLine` | Edge-coupled stripline pair | Length, Width, Spacing, Height |
| `microstripLineCustom` | Custom coupled/differential microstrip | TraceType, TraceWidth, TraceSpacing, aggressor traces |
| `stripLineCustom` | Custom coupled/differential stripline | TraceType, TraceWidth, TraceSpacing |
| `pcbBendCustom` | Custom bend discontinuity (R2025a) | BendShape, Height, GroundPlaneWidth |
| `pcb2D` | 2D cross-section analysis | BoardWidth, BoardCenter, Layers |
| `SIWLine` | Substrate integrated waveguide | Length, Width, ViaSpacing, ViaDiameter |

## Microstrip Line

### Basic Creation and Design

```matlab
ms = microstripLine;
show(ms);

% Design for target impedance at frequency
ms = design(microstripLine, 3e9);
Z0 = getZ0(ms);
```

### Properties

```matlab
ms = microstripLine;
ms.Length = 20e-3;
ms.Width = 5e-3;
ms.Height = 1.6e-3;            % Substrate height
ms.GroundPlaneWidth = 30e-3;
ms.Substrate = dielectric("FR4");
ms.Conductor = metal("Copper");
```

### Analysis

```matlab
ms.Conductor = metal("Copper");       % Required for rlgc (finite conductivity)
Z0 = getZ0(ms);                       % Characteristic impedance (no frequency argument)
td = propagationDelay(ms, 3e9);       % Propagation delay (scalar frequency)
params = rlgc(ms, 3e9);              % RLGC per unit length (scalar frequency)

freq = linspace(1e9, 6e9, 51);
sp = sparameters(ms, freq, 'SweepOption', 'interp');  % S-parameters (frequency vector OK)
rfplot(sp);
```

### Inverted / Suspended Microstrip

Model inverted or suspended configurations with multi-layer substrates (air gaps):

```matlab
% Inverted: air below trace, substrate above ground
ms = microstripLine;
ms.Substrate = dielectric(Name={"Air","FR4"}, EpsilonR=[1 4.4], ...
    LossTangent=[0 0.02], Thickness=[0.5e-3 1.6e-3]);
ms.Height = 0.5e-3 + 1.6e-3;

% Suspended: air / substrate / air
ms.Substrate = dielectric(Name={"Air","FR4","Air"}, EpsilonR=[1 4.4 1], ...
    LossTangent=[0 0.02 0], Thickness=[0.3e-3 0.8e-3 0.3e-3]);
ms.Height = sum([0.3e-3 0.8e-3 0.3e-3]);
```

## Stripline

Stripline has the signal trace embedded between two ground planes.

### Symmetric Stripline

```matlab
sl = stripLine;
sl.Length = 20e-3;
sl.Width = 3e-3;
sl.Height = 3.2e-3;            % Total dielectric height (top + bottom)
sl.GroundPlaneWidth = 30e-3;
sl.Substrate = dielectric("Teflon");
sl.Conductor = metal("Copper");
show(sl);
```

### Asymmetric Stripline

Use multi-layer dielectric with different thicknesses above and below. `Height` = cumulative thickness of layers **below** the signal (a layer boundary, not the total):

```matlab
sl = stripLine;
sl.Substrate = dielectric(Name={"FR4","FR4"}, EpsilonR=[4.4 4.4], ...
    LossTangent=[0.02 0.02], Thickness=[0.8e-3 1.6e-3]);
sl.Height = 0.8e-3;    % Signal at the boundary between the two layers
```

### Suspended Stripline

```matlab
sl = stripLine;
sl.Substrate = dielectric(Name={"Air","FR4","Air"}, ...
    EpsilonR=[1 4.4 1], LossTangent=[0 0.02 0], ...
    Thickness=[0.5e-3 0.8e-3 0.5e-3]);
sl.Height = 0.5e-3;    % Signal at Air/FR4 boundary (0.5mm from ground)
sl = design(stripLine, 3e9);  % Or design for 50-ohm at target freq
```

## Coplanar Waveguide

### Basic CPW

```matlab
cpw = coplanarWaveguide;
cpw.Length = 20e-3;
cpw.Width = 2e-3;          % Center conductor width
cpw.SlotWidth = 0.5e-3;    % Gap between center and ground
cpw.Height = 1.6e-3;
cpw.GroundPlaneWidth = 10e-3;
show(cpw);
```

### Design and Analyze

```matlab
cpw = design(coplanarWaveguide, 5e9);
Z0 = getZ0(cpw);
sp = sparameters(cpw, linspace(1e9, 10e9, 51), 'SweepOption', 'interp');
rfplot(sp);
```

## Coupled Transmission Lines

### Edge-Coupled Microstrip

```matlab
cms = coupledMicrostripLine;
cms.Length = 20e-3;
cms.Width = 2e-3;
cms.Spacing = 0.5e-3;      % Gap between traces
cms.
matlab-access-datafeedSkill

>

matlab-analyze-ams-waveformSkill

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.

matlab-analyze-dataSkill

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.

matlab-analyze-dependenciesSkill

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.

matlab-analyze-emSkill

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).

matlab-analyze-installed-antennaSkill

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.

matlab-analyze-pcb-pdnSkill

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).

matlab-analyze-rcsSkill

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.