Matlab Design Pcb Passive
MathWorksOfficialCreated by MathWorks
- Skill
- Tool integration
- Software development
- BSD-2-Clause
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured interface for designing and configuring passive RF components in MATLAB. It supports the creation of spiral inductors, interdigital capacitors, various resonators (ring, split-ring), baluns (coupled-line, Marchand), phase shifters, and radial stubs. The skill emphasizes proper configuration of physical properties, substrate integration, and frequency-dependent analysis, while providing guidance on avoiding common pitfalls such as incorrect mesh density or improper substrate layer boundaries.
What it does
- Creates and configures spiral inductors and interdigital capacitors.
- Designs ring and split-ring resonators for filtering or metamaterial use.
- Implements coupled-line and Marchand baluns for balanced-to-unbalanced conversion.
- Configures Schiffman phase shifters and radial stubs.
- Provides methods for inductance and capacitance extraction.
- Supports behavioral S-parameter modeling for rapid design exploration.
When to use it
- When designing passive RF components for PCB-based circuits.
- When you need to extract frequency-dependent inductance or capacitance values.
- When creating custom resonators or baluns for impedance matching.
- When you need to perform initial design iterations before full-wave EM analysis.
Advantages
- Provides specialized objects for complex RF component geometry.
- Includes built-in optimization support for design parameters.
- Offers fast behavioral S-parameter models for quick iteration.
- Integrates seamlessly with broader RF circuit assembly workflows.
Usage examples
- “Design a square spiral inductor with 4 turns.”
- The agent provides the code to instantiate a spiralInductor object, sets the SpiralShape to 'Square', configures the NumTurns property, and advises on setting the Height to match a valid substrate layer boundary.
- “How do I create a 90-degree phase shifter at 1.8 GHz?”
- The agent provides the code using the design method on a phaseShifter object, specifying the frequency and the PhaseShift property set to 90.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/matlab/matlab-design-pcb-passive/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip matlab-design-pcb-passive.zip -d .agents/skills
Documentation by MathWorks
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-transmission-lineDesigning filters (bandpass, lowpass, bandstop) — use
matlab-design-pcb-filterDesigning couplers or splitters — use
matlab-design-pcb-couplerSetting up substrate materials — use
matlab-manage-pcb-materialRunning EM analysis after design — use
matlab-analyze-em
Typical Workflow
Before:
matlab-manage-pcb-material— set up substrate and conductorThis skill: Design the passive component (inductor, capacitor, balun, resonator)
Check mesh/memory:
memoryEstimate(obj, fc, 'RetainMesh', true)— inspect auto-mesh density before committing to a full solveAfter:
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
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)
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 stackSpiral 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
L = inductance(ind, 600e6); % Scalar frequency → scalar (H)
L = inductance(ind, linspace(100e6, 1e9, 30)); % Vector → vectorSelf-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.
freq = linspace(100e6, 10e9, 201);
L = inductance(ind, freq);
% Sign change: L > 0 (inductive) → L < 0 (capacitive) at SRFVisualization
show(ind)
current(ind, 600e6)
charge(ind, 600e6)
[E, H] = EHfields(ind, 4e9, [0; 0; 1]);Interdigital Capacitors
Creating and Configuring
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
C = capacitance(cap, 5e9); % Raw
C = capacitance(cap, 5e9, DeEmbed=true); % De-embedded
C = capacitance(cap, 5e9, DeEmbed=true, IncludeParasitics=true); % With parasiticsDeEmbed 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:
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:
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.
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
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).
Custom Split-Ring Resonator
r = resonatorSplitRingCustom;
sr = splitRing(Type="Hexagon", NumRings=3);
sr.SplitSide = [2 3 5];
r.Resonator = sr;
r.FeedType = 'Tapped'; % 'Tapped' (default) or 'Coupled'
r.PortLineLength = 0.01;
r.PortLineWidth = 7.5e-4;
r.Height = 8.13e-4;Square Split-Ring Resonator
r = resonatorSplitRingSquare;
r.RingLengthInner = 3.6e-3;
r.RingWidth = 5e-4;
r.RingSpacing = 3e-4;
r.SplitGap = 5e-4;
r.CouplingGap = 2.5e-4;
r.NumResonator = 5;
r.ResonatorSpacing = 4e-3;For the full splitRing shape property table, CSRR ground-plane etching, and SIW integration patterns, see references/resonators-detail.md.
Coupled-Line Baluns
balunCoupledLine is a 3-section coupled-line balun (balanced-to-unbalanced converter).
b = balunCoupledLine;
b.NumCoupledLineSection = 3;
b.CoupledLineLength = 0.0153;
b.CoupledLineWidth = 4e-4;
b.CoupledLineSpacing = 1.4e-4;
b.OutputLineLength = 0.0124;
b.OutputLineWidth = 1.53e-4;
b.OutputLineSpacing = 0.011;
b.Height = 1.3e-3;balunCoupledLine has no design() method. Use designCoupledLine, designOutputLine, designUncoupledLine for section-by-section sizing from impedance targets. See references/resonators-detail.md for the full API.
Marchand Baluns
balunMarchand is a broadband balun using λ/4 coupled-line sections.
bm = balunMarchand;
bm.CoupledLineLength = 0.0178;
bm.CoupledLineWidth = 3e-3;
bm.CoupledLineSpacing = 1.5e-4;
bm.OutputLineLength = 0.016;
bm.OutputLineWidth = 2.9e-4;
bm.Height = 1.6e-3;No design() method. Set dimensions manually or use optimize().
Phase Shifters
phaseShifter is a Schiffman-type phase shifter using coupled-line sections.
ps = design(phaseShifter, 1.8e9); % Default phase shift
ps = design(phaseShifter, 1.8e9, PhaseShift=90); % 90° phase shiftProperties
ps.NumSections = 1;
ps.PortLineLength = 0.01;
ps.PortLineWidth = 5e-3;
ps.Height = 1.6e-3;
ps.SectionShape = ubendRightAngle; % Default U-bend shapeRadial Stubs
stubRadialShunt creates a single- or double-radial stub shunt. Radial stubs provide wideband short-circuit behavior compared to rectangular stubs.
stub = stubRadialShunt;
stub.StubType = "Single"; % "Single" (default) or "Double"
stub.OuterRadius = 8.5e-3;
stub.InnerRadius = 1.2e-3;
stub.Angle = 90; % Range [5, 175] degrees
stub.PortLineWidth = 2.5e-3;
stub.PortLineLength = 0.0137;
stub.Height = 1.6e-3;For double-stub vector property configuration, see references/resonators-detail.md.
Circuit Integration
Wrap passive components in pcbElement for RF Toolbox circuit assembly:
ckt = circuit;
c1 = interdigitalCapacitor;
c2 = interdigitalCapacitor(NumFingers=3);
p = pcbElement(c2, 'Behavioral', false);
add(ckt, [1 2 0 0], c1);
add(ckt, [2 3 0 0], p);
setports(ckt, [1 0], [3 0]);
S = sparameters(ckt, 8e9);Optimization
All objects in this skill support optimize():
ind = spiralInductor(NumTurns=3);
optimize(ind, linspace(1e9, 3e9, 11), ...
'Properties', {'Width', 'Spacing', 'InnerDiameter'}, ...
'LowerBound', [1e-4, 1e-4, 3e-4], ...
'UpperBound', [5e-4, 5e-4, 1e-3], ...
'Objective', 'maximizeBandwidth');Multilayer Dielectric Pattern
All objects follow the same pattern — set Thickness before assigning to the component:
sub = dielectric('FR4', 'Teflon');
sub.Thickness = [1.6e-3, 0.8e-3];
obj.Substrate = sub;
obj.Height = 0.8e-3; % Must match a cumulative layer boundaryPitfalls
Use interpolating sweep for S-parameters: Always use
sparameters(obj, freq, 'SweepOption', 'interp')for MoM solves. Direct sweeps solve at every frequency point individually and are significantly slower.Check mesh density before solving: Spiral inductors and interdigital capacitors generate dense auto-meshes. Always run
memoryEstimate(obj, fc, 'RetainMesh', true)beforesparameters(). If memory is excessive, coarsen:mesh(obj, 'MaxEdgeLength', lambda/6). Seematlab-analyze-emfor full mesh inspection workflow.No
design()for inductors/capacitors.spiralInductorandinterdigitalCapacitorhave nodesign()method. Set dimensions manually or useoptimize().Inductance/capacitance are frequency-dependent. Both require a frequency argument — no DC extraction. Parasitic effects shift the value at high frequencies.
DeEmbed matters for capacitance. Without
DeEmbed=true, extracted capacitance includes feed line contributions.SpiralShape is case-sensitive. Use
'Square','Circle','Hexagon','Octagon'.Behavioral vs full-wave accuracy. Behavioral S-parameters diverge near SRF (inductors) or finger resonances (capacitors).
Height must be a cumulative substrate boundary. For Thickness=[t1, t2], valid Heights are t1, t1+t2. Applies to all objects in this skill.
spiralInductor requires multi-layer substrate. The underpass feed routing needs ≥ 2 dielectric layers. A single layer errors with "More than one substrate is required."
GroundPlane dimensions. Keep ground plane ≥ 2× the component footprint to avoid truncating fringing fields.
No
design()for baluns.balunCoupledLineandbalunMarchandhave nodesign()method. Use section-design functions oroptimize().No
design()for split-ring resonators. OnlyresonatorRingsupportsdesign().splitRingis a shape, not a component. Cannot be analyzed directly — attach toresonatorSplitRingCustomor embed in apcbComponent.PhaseShift units are degrees. The
PhaseShiftparameter indesign(phaseShifter, ...)is degrees, not radians.stubRadialShunthas nodesign()method. Set dimensions manually or useoptimize().Polygonal SplitSide defaults may be invalid. Hexagons require
SplitSidefrom {2, 3, 5, 6}. Always set explicitly for polygonal types with multiple rings.
Related Skills
matlab-manage-pcb-material— Substrate and conductor setupmatlab-analyze-em— S-parameters, fields, mesh controlmatlab-optimize-pcb-design— optimize() syntax, objectives, solversmatlab-integrate-pcb-circuit— pcbElement circuit integrationmatlab-design-pcb-filter— SIW filters can embed split-ring resonatorsmatlab-assemble-pcb-layout— Custom CSRR structures via pcbComponent + Boolean opsmatlab-design-pcb-coupler— Related coupled-line structures
Copyright 2026 The MathWorks, Inc.
Files
- ATTRIBUTION.mdAdded by AutoGineer1.0 KiB
- LICENSELicence file added by AutoGineer1.4 KiB
- SKILL.md13.4 KiB
- manifest.yaml480 B
- references/resonators-detail.md3.5 KiB
LICENSE
Copyright 2026 The MathWorks, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. In all cases, the software is, and all modifications and derivatives of the software shall be, licensed to you solely for use in conjunction with MathWorks products and service offerings. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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-design-pcb-passive · 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 or MathWorks.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download matlab-design-pcb-passive.zip