Skip to main content
ClaudeWave
EN, English
Skill1.2k repo starsupdated 6d ago

matlab-design-pcb-passive

This skill designs passive RF components including spiral inductors, interdigital capacitors, baluns, resonators, and phase shifters for PCB applications. Use it when you need to create, configure, and extract electrical properties from discrete passive elements like coupled-line baluns, ring resonators, or Schiffman phase shifters. Do not use it for transmission line, filter, coupler, or EM analysis tasks, which have dedicated skills.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-design-pcb-passive && cp -r /tmp/matlab-design-pcb-passive/skills-catalog/rf-and-mixed-signal/matlab-design-pcb-passive ~/.claude/skills/matlab-design-pcb-passive
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Designing Passive Components

## When to Use

- Designing spiral inductors or interdigital capacitors for RF circuits
- Extracting inductance, capacitance, or self-resonant frequency from passive components
- Creating ring or split-ring resonators for filtering or metamaterial applications
- Designing coupled-line or Marchand baluns for balanced-to-unbalanced conversion
- Building Schiffman phase shifters or radial stubs

## When NOT to Use

- Designing transmission lines (microstrip, stripline, CPW) — use `matlab-design-pcb-txline`
- Designing filters (bandpass, lowpass, bandstop) — use `matlab-design-pcb-filter`
- Designing couplers or splitters — use `matlab-design-pcb-coupler`
- Setting up substrate materials — use `matlab-manage-pcb-material`
- Running EM analysis after design — use `matlab-analyze-em`

## Typical Workflow

1. **Before:** `matlab-manage-pcb-material` — set up substrate and conductor
2. **This skill:** Design the passive component (inductor, capacitor, balun, resonator)
3. **Check mesh/memory:** `memoryEstimate(obj, fc, 'RetainMesh', true)` — inspect auto-mesh density before committing to a full solve
4. **After:** `matlab-analyze-em` — validate S-parameters → `matlab-optimize-pcb-design` — tune dimensions → `matlab-integrate-pcb-circuit` — cascade into circuit

## Quick Reference

| Task | Code |
|------|------|
| Spiral inductor | `ind = spiralInductor` |
| Interdigital capacitor | `cap = interdigitalCapacitor` |
| Extract inductance | `L = inductance(ind, freq)` |
| Extract capacitance | `C = capacitance(cap, freq, DeEmbed=true)` |
| Behavioral S-params | `S = sparameters(obj, freq, Behavioral=true)` |
| Ring resonator | `r = design(resonatorRing, freq)` |
| Split-ring (custom) | `r = resonatorSplitRingCustom` |
| Split-ring (square) | `r = resonatorSplitRingSquare` |
| Coupled-line balun | `b = balunCoupledLine` |
| Marchand balun | `b = balunMarchand` |
| Phase shifter | `ps = design(phaseShifter, freq, PhaseShift=90)` |
| Radial stub | `stub = stubRadialShunt` |
| Optimize | `optimize(obj, freq, ...)` |

## Spiral Inductors

### Creating and Configuring

```matlab
ind = spiralInductor;
ind.SpiralShape    = 'Square';      % 'Square' | 'Circle' | 'Hexagon' | 'Octagon'
ind.InnerDiameter  = 5e-4;
ind.Width          = 2.5e-4;
ind.Spacing        = 2.5e-4;
ind.NumTurns       = 4;
ind.Height         = 1.016e-3;      % Must be a cumulative substrate layer boundary
ind.GroundPlaneLength = 5.6e-3;
ind.GroundPlaneWidth  = 5.6e-3;
```

### RFIC Substrates (Silicon/SiO2)

```matlab
ind = spiralInductor;
ind.Substrate = dielectric('Name', {'Silicon','SiO2'}, ...
    'EpsilonR', [11.9, 4.1], 'LossTangent', [0.005, 0], ...
    'Thickness', [300e-6, 3e-6]);
ind.Height = 303e-6;              % Signal trace at top of stack
```

### Spiral Shape and Q-Factor Tradeoffs

| Shape | Q-Factor | Notes |
|-------|----------|-------|
| `'Circle'` | Highest | Best electrical performance |
| `'Octagon'` | High | Close to circular; easier to fabricate |
| `'Hexagon'` | Moderate | Compromise |
| `'Square'` | Lowest | Easiest to manufacture; current crowding at corners |

### Ground Plane Proximity Effect

Smaller `Height` increases capacitive coupling to ground, reducing inductance, Q-factor, and self-resonant frequency. Account for this when the PCB stackup constrains Height.

### Inductance Extraction

```matlab
L = inductance(ind, 600e6);                        % Scalar frequency → scalar (H)
L = inductance(ind, linspace(100e6, 1e9, 30));     % Vector → vector
```

### Self-Resonant Frequency (SRF)

At SRF, parasitic capacitance resonates with inductance — impedance peaks, then the inductor behaves as a capacitor. Design so the operating band stays below SRF/3 to SRF/2.

```matlab
freq = linspace(100e6, 10e9, 201);
L = inductance(ind, freq);
% Sign change: L > 0 (inductive) → L < 0 (capacitive) at SRF
```

### Visualization

```matlab
show(ind)
current(ind, 600e6)
charge(ind, 600e6)
[E, H] = EHfields(ind, 4e9, [0; 0; 1]);
```

## Interdigital Capacitors

### Creating and Configuring

```matlab
cap = interdigitalCapacitor;
cap.NumFingers         = 4;
cap.FingerLength       = 0.0137;
cap.FingerWidth        = 3.16e-4;
cap.FingerSpacing      = 3e-4;
cap.FingerEdgeGap      = 3.41e-4;
cap.TerminalStripWidth = 5e-4;
cap.PortLineWidth      = 1.9e-3;
cap.PortLineLength     = 3e-3;
cap.Height             = 7.87e-4;
```

### Capacitance Extraction

```matlab
C = capacitance(cap, 5e9);                                          % Raw
C = capacitance(cap, 5e9, DeEmbed=true);                            % De-embedded
C = capacitance(cap, 5e9, DeEmbed=true, IncludeParasitics=true);    % With parasitics
```

- **DeEmbed** removes feed line effects to isolate the capacitor.
- **IncludeParasitics** adds parasitic inductance/resistance from the finger structure.

## Behavioral S-Parameters

Both `spiralInductor` and `interdigitalCapacitor` support fast behavioral models:

```matlab
S = sparameters(ind, freq, Behavioral=true);     % ~instant
S = sparameters(cap, freq, Behavioral=true);
```

Use for initial exploration; switch to full-wave (`Behavioral=false`, the default) for validation. Before a full-wave solve, always check mesh density:

```matlab
memoryEstimate(ind, fc, 'RetainMesh', true);  % Check auto-mesh before full-wave
sp = sparameters(ind, freq, 'SweepOption', 'interp');
```

## Ring Resonators

`resonatorRing` is a microstrip ring resonator coupled to two feed lines via a gap.

```matlab
r = resonatorRing;
r.RingRadiusOuter = 0.01;
r.RingWidth       = 4e-3;
r.CouplingGap     = 1e-3;
r.PortLineLength  = 0.01;
r.PortLineWidth   = 5e-3;
r.Height          = 1.6e-3;
r.GroundPlaneWidth = 0.04;
```

### Frequency-Based Design

```matlab
r = design(resonatorRing, 1.8e9);                  % 50 Ω default
r = design(resonatorRing, 2.5e9, Z0=75);            % 75 Ω
```

## Split-Ring Resonators

Two object types: `resonatorSplitRingCustom` (pluggable shape) and `resonatorSplitRingSquare` (pre-configured square
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.