matlab-design-pcb-filter
This skill designs RF bandpass, lowpass, and bandstop filters using topologies including coupled-line, hairpin, combline, interdigital, stub, spurline, and substrate-integrated waveguide (SIW) geometries. Use it when a user requests filter design, topology selection, or extraction of coupling matrices from measured data, and invoke before writing code since filter class names differ from conventional nomenclature.
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-design-pcb-filter && cp -r /tmp/matlab-design-pcb-filter/skills-catalog/rf-and-mixed-signal/matlab-design-pcb-filter ~/.claude/skills/matlab-design-pcb-filterSKILL.md
# Designing RF Filters ## When to Use - Designing bandpass filters (coupled-line, hairpin, open-loop, combline, interdigital, SIW) - Designing lowpass filters (stepped-impedance) - Designing bandstop or notch filters (spurline, stub-based) - Extracting coupling matrices from measured S-parameter data (measuredFilter) - Selecting a filter topology for a given bandwidth, selectivity, or size requirement ## When NOT to Use - Designing transmission lines for impedance control — use `matlab-design-pcb-txline` - Designing couplers or splitters — use `matlab-design-pcb-coupler` - Designing passive components (inductors, capacitors, baluns) — use `matlab-design-pcb-passive` - Setting up substrate or conductor materials — use `matlab-manage-pcb-material` - Optimizing filter dimensions after design — use `matlab-optimize-pcb-design` ## Typical Workflow 1. **Before:** `matlab-manage-pcb-material` — set up substrate and conductor 2. **This skill:** Design the filter (catalog object or custom geometry) 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-write-pcb-layout` — export Gerber ## Quick Reference — Filter Selection | Filter Object | Type | Poles | Best For | |---------------|------|-------|----------| | `filterCoupledLine` | Bandpass | 2–8 | General microstrip BPF | | `filterHairpin` | Bandpass | 2–8 | Compact BPF, folded resonators | | `filterOpenLoop` | Bandpass | 4/6/8 | Compact quasi-elliptic | | `filterCombline` | Bandpass | 2–6 | Narrow-band, high-Q | | `filterInterdigital` | Bandpass | 2–8 | Wideband, good stopband | | `filterStepImpedanceLowPass` | Lowpass | 3–9 | Distributed LPF | | `filterStub` | LP/HP/BS | N stubs | Flexible stub topology | | `filterSpurline` | Bandstop | 1–2 | Compact notch filter | | `SIWFilter` | Bandpass | 2–6 | High-Q waveguide-in-PCB | | `measuredFilter` | Bandpass | N | Model extraction from measurements | ## Bandpass Filters ### Coupled-Line Filter ```matlab f = filterCoupledLine; f = design(filterCoupledLine, 3e9); % Design at 3 GHz show(f); sp = sparameters(f, linspace(1e9, 5e9, 101), 'SweepOption', 'interp'); rfplot(sp); ``` Key properties: `FilterOrder`, `CoupledLineLength`, `CoupledLineWidth`, `CoupledLineSpacing`, `PortLineLength`, `PortLineWidth`. ### Hairpin Filter Folded coupled-line resonators for compact size: ```matlab f = design(filterHairpin, 3e9); show(f); memoryEstimate(f, 3e9, 'RetainMesh', true); % Check mesh density before solving sp = sparameters(f, linspace(1e9, 5e9, 101), 'SweepOption', 'interp'); rfplot(sp); ``` Key properties: `FilterOrder`, `CoupledLineLength`, `CoupledLineWidth`, `CoupledLineSpacing`, `PortLineLength`, `PortLineWidth`, `Spacing`, `ResonatorOffset`, `FeedOffset`. ### Chebyshev Response Pass `FilterType` and `RippleFactor` to `design()` for equiripple passband response: ```matlab f = design(filterHairpin, 1.8e9, FBW=10, FilterType='Chebyshev', RippleFactor=0.5); ``` `FilterType` options: `'Butterworth'` (default), `'Chebyshev'`. `FBW` sets fractional bandwidth (%). `RippleFactor` sets passband ripple in dB (default 0.5) — only applies to Chebyshev. ### Fifth-Order Hairpin ```matlab f = filterHairpin; f.FilterOrder = 5; f = design(f, 2.4e9); show(f); ``` ### Open-Loop Filter Quasi-elliptic response with cross-coupling: ```matlab f = filterOpenLoop; f.NumPoles = 6; f.FeedOffset = 0.5e-3; show(f); sp = sparameters(f, linspace(1e9, 5e9, 101), 'SweepOption', 'interp'); rfplot(sp); ``` **Key Properties:** `NumPoles` (4/6/8), `ResonatorLength`, `ResonatorWidth`, `SplitGap`, `GapHorizontal`, `GapVertical`, `FeedOffset`, `CoupledResonatorGap`, `QuadrupletGap`, `QuadrupletOffset`. ### Combline Filter Short-circuited resonators, excellent for narrow-band. **Note:** `filterCombline` does not have a `design` function — set properties manually: ```matlab f = filterCombline; f.FilterOrder = 3; f.Height = 1.6e-3; show(f); ``` **Key Properties:** `FilterOrder`, `ResonatorLength` (scalar or vector), `ResonatorWidth`, `ResonatorSpacing` (scalar or vector), `ResonatorOffset`, `FeedOffset`, `Capacitor` (loading capacitance — distinctive to combline). ### Interdigital Filter Alternating short-circuited resonators, wideband. **Note:** `filterInterdigital` does not have a `design` function — set properties manually: ```matlab f = filterInterdigital; f.FilterOrder = 4; f.Height = 1.6e-3; show(f); sp = sparameters(f, linspace(3e9, 7e9, 101), 'SweepOption', 'interp'); rfplot(sp); ``` **Key Properties:** `FilterOrder`, `ResonatorLength` (scalar or vector), `ResonatorWidth` (scalar or vector), `ResonatorSpacing` (scalar or vector), `ResonatorOffset`, `ViaDiameter` (scalar or vector — distinctive to interdigital), `FeedOffset`, `IsShielded`, `Connector`. ## Lowpass Filters ### Stepped-Impedance Lowpass ```matlab f = filterStepImpedanceLowPass; f = design(filterStepImpedanceLowPass, 2.5e9); show(f); sp = sparameters(f, linspace(0.1e9, 5e9, 101), 'SweepOption', 'interp'); rfplot(sp); ``` Key properties: `FilterOrder`, `HighZLineWidth`, `LowZLineWidth`, `HighZLineLength`, `LowZLineLength`. ## Bandstop / Notch Filters ### Spurline Filter Compact notch using coupled-line section on one side: ```matlab f = filterSpurline; show(f); sp = sparameters(f, linspace(1e9, 6e9, 51), 'SweepOption', 'interp'); rfplot(sp); ``` Double spurline for deeper rejection: ```matlab f = filterSpurline; f.LineType = 'Double'; show(f); ``` **Key Properties:** `LineType` (`'Single'`/`'Double'`), `CoupledLineLength`, `CoupledLineWidth`, `CoupledLineSpacing`, `LineGap` (gap between coupled line and output line — distinctive to spurline), `IsShielded`, `Connector`. ### Stub Filters (Open/Short) The `filterStub` object supports open-circuit stubs (bandstop) and short-circuit stubs (highpass): ```matlab f = filterStub; f.StubLength
>
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.