SkillAgentSearch skills...

matlab-design-pcb-filter

Bandpass, lowpass, bandstop filter design โ€” hairpin, coupled-line, combline, stub, SIW for frequency selection and harmonic rejection. TRIGGER: user asks to design, create, or analyze any RF filter (bandpass, lowpass, highpass, bandstop, hairpin, coupled-line, combline, stub, SIW).

Install / Use

npx skills add matlab/matlab-agentic-toolkit --skill matlab-design-pcb-filter

Installs into whichever agent you are using.

About this skill
๐Ÿ“„

SKILL.md

Installable skill definition

Quality Score

93/100

Supported Platforms

Universal

Our assessment of matlab-design-pcb-filter

matlab-design-pcb-filter scores 93/100 on our quality scale, 230th of 1,156 Content & Media skills we index (top 20%).

Its SKILL.md is 15 KB long, well organised into 28 sections with 16 code examples: a thorough specification that gives an agent plenty to work with.

With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
13/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 2 months ago, so matlab-design-pcb-filter is actively maintained.
  • Our last check on 2026-11-17 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit โ€” read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-04. Automated pattern scan on 2026-10-04. It catches known dangerous patterns, not every risk โ€” read a skill before letting an agent act on it.

matlab-design-pcb-filter compared with similar skills

All 4 of these similar skills score higher than matlab-design-pcb-filter; compare them before choosing.

SkillScoreStarsUpdatedFormat
matlab-design-pcb-filter (this skill)by matlab931.1k2mo agoSKILL.md
taste-skillby Leonxlnx100117.6k9d agoCLAUDE.md
Claude-Code-Game-Studiosby Donchitos10039.9k8d agoCLAUDE.md
siyuanby siyuan-note10047.3ktodayMCP Server
x402by browser-use100121.0k4d agoSKILL.md

Frequently asked questions

How do I install matlab-design-pcb-filter?
Run npx skills add matlab/matlab-agentic-toolkit --skill matlab-design-pcb-filter. The install tabs above show the steps for each supported agent.
Which AI agents does matlab-design-pcb-filter work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is matlab-design-pcb-filter safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is matlab-design-pcb-filter still maintained?
The repository was last updated about 2 months ago, so matlab-design-pcb-filter is actively maintained.

name: matlab-design-pcb-filter description: "Bandpass, lowpass, bandstop filter design โ€” hairpin, coupled-line, combline, stub, SIW for frequency selection and harmonic rejection. TRIGGER: user asks to design, create, or analyze any RF filter (bandpass, lowpass, highpass, bandstop, hairpin, coupled-line, combline, stub, SIW). Invoke BEFORE writing code โ€” filter class names differ from what you would guess. SKIP: EM simulation/S-parameter extraction of an existing filter (use matlab-analyze-em), general PCB layout assembly (use matlab-assemble-pcb-layout), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design)." license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md metadata: author: MathWorks version: "1.0"

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-transmission-line
  • 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

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:

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:

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

f = filterHairpin;
f.FilterOrder = 5;
f = design(f, 2.4e9);
show(f);

Open-Loop Filter

Quasi-elliptic response with cross-coupling:

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:

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:

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

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:

f = filterSpurline;
show(f);
sp = sparameters(f, linspace(1e9, 6e9, 51), 'SweepOption', 'interp');
rfplot(sp);

Double spurline for deeper rejection:

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

f = filterStub;
f.StubLength = [6e-3 6e-3 6e-3];
f.StubWidth = [0.5e-3 0.5e-3 0.5e-3];
f.StubOffsetX = [-6e-3 0 6e-3];
f.StubShort = [0 0 0];         % 0=open (bandstop), 1=short (highpass)
f.StubDirection = [0 0 0];     % 0=below, 1=above trace
f.SeriesLineWidth = 1.8e-3;
f.SeriesLineLength = 12e-3;
show(f);

Key Properties: StubLength (vector), StubWidth (vector), StubFeedOffsetX (vector), StubShort (0=open, 1=short; vector), StubDirection (0=down, 1=up; vector), SeriesLineLength, SeriesLineWidth, IsShielded, Connector.

Radial Stub

rs = stubRadialShunt;
rs = design(stubRadialShunt, 5e9);
show(rs);

SIW Bandpass Filter

SIWFilter uses NumResonators (not FilterOrder), and Substrate is read-only (set via internal resonator objects):

f = SIWFilter;
f.NumResonators = 4;
show(f);
sp = sparameters(f, linspace(8e9, 14e9, 51), 'SweepOption', 'interp');
rfplot(sp);

Measured Filter Extraction

measuredFilter extracts a coupled-resonator circuit model (coupling matrix, external Q, unloaded Q) from measured or simulated 2-port S-parameter data. This enables filter tuning, diagnosis, and comparison against ideal synthesis targets.

Key Properties:

  • Sparameters โ€” 2-port S-parameters data (sparameters object)
  • FilterOrder โ€” Number of resonators in the model
  • CenterFrequency โ€” Passband center frequency (Hz)
  • BandWidth โ€” 3-dB bandwidth (Hz)
  • CouplingMatrix โ€” Extracted N+2 coupling matrix (populated after extraction)
  • QualityFactor โ€” Unloaded quality factor (populated after qualityfactor())

Key Methods:

  • residue(mf) โ€” Extract lowpass admittance residues and poles from S-parameter data
  • transversalMat(mf) โ€” Calculate transversal coupling matrix from residues
  • canonicalCouplingMat(mf) โ€” Rotate transversal matrix to canonical (folded) form
  • optimize(mf) โ€” Isospectral optimization of the coupling matrix
  • sparameters(mf, freq) โ€” Synthesize S-parameters from the extracted circuit model
  • qualityfactor(mf) โ€” Calculate unloaded quality factor

Complete Workflow

% Step 1: Load measured S-parameters and inspect visually
S_meas = sparameters('measured_filter.s2p');
rfplot(S_meas);
% Identify center frequency and bandwidth from the plot

% Step 2: Create measuredFilter with matching initial guess
mf = measuredFilter(Sparameters=S_meas, ...
    FilterOrder=8, ...
    CenterFrequency=2114.6e6, ...
    BandWidth=9.6e6);

% Step 3: Extract residues and poles
residue(mf);

% Step 4: Build transversal matrix, then rotate to canonical form
transversalMat(mf);
M = canonicalCouplingMat(mf);
disp(mf.CouplingMatrix);

% Step 5: Optimize coupling matrix (isospectral flow)
mf = optimize(mf);

% Step 6: Compare extracted model vs measured data
freq = linspace(2.08e9, 2.15e9, 501);
S_model = sparameters(mf, freq);
rfplot(S_meas); hold on;
rfplot(S_model, '--');
legend('Measured', 'Extracted Model');

% Step 7: Quality factor
Q = qualityfactor(mf);
disp(mf.QualityFactor);

Custom Filter Assembly

For topologies not in the catalog, build with pcbComponent:

% Example: custom 2-pole open-loop filter from shape primitives
sub = dielectric("FR4");
sub.Thickness = 1.6e-3;
cond = metal("Copper");

% Build resonator shapes using traceLine, traceRectangular, Boolean ops
% (see matlab-assemble-pcb-layout skill)

pcb = pcbComponent;
pcb.Layers = {filterShape, sub, groundPlane};
pcb.BoardShape = groundPlane;
pcb.BoardThickness = sub.Thickness;
pcb.Conductor = cond;
pcb.FeedDiameter = feedWidth/2;
pcb.FeedLocations = [x1 y1 1 3; x2 y2 1 3];

Multi-Layer Filters

All filter catalog objects support multi-layer dielectrics:

f = design(filterCoupledLine, 3e9);
sub = dielectric("FR4", "Teflon");
sub.Thickness = [0.8e-3 0.4e-3];   % Set Thickness BEFORE assigning to filter
f.Substrate = sub;
f.Height = 1.2e-3;
show(f);

Filter Selection Guide

| Need | Recommended Filter | Notes | |---|---|---| | Bandpass, compact | filterHairpin | Folded resonators save board area | | Bandpass, standard | filterCoupledLine | Supports design(), easiest starting point | | Bandpass, high selectivity | filterInterdigital | Good stopband rejection, wideband | | Bandpass, capacitively loaded | filterCombline | Narrow-band, high-Q, short resonators | | Bandpass, cross-coupling / TZs | filterOpenLoop | Quasi-elliptic, transmission zeros; supports design() | | Bandpass, SIW technology | SIWFilter | High-Q waveguide-in-PCB | | Lowpass, stepped impedance | filterStepImpedanceLowPass | Supports design() | | Bandstop, notch | filterSpurline | Very compact, single or double | | Bandpass/Bandstop, stub-based | filterStub | Flexible open/short stub topology; no design() | | Model extraction from data | measuredFilter | Coupling matrix from measurements |

Design Adjustments

| Problem | Adjust | Direction | |---|---|---| | Passband too wide | FilterOrder, Spacing | Increase order, decrease spacing | | Insertion loss too high | Conductor thickness | Use real metal, increase thickness | | Rejection too shallow | FilterOrder | Increase | | Center freq shifted | Re-run `design(fi

Truncated for display โ€” read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars1.1k
CategoryContent
Updated2mo ago
Forks134

Languages

MATLAB

Trust signals

88/100

From repository metadata: license, adoption, age and documentation. Not a code audit โ€” see the Safety scan above for what the skill file itself contains.

1 medium
matlab-design-pcb-filter โ€” Universal Skill: Install & Safety Check | SkillAgent