RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
    • Draw a schematic
    • Lay out a board
    • Run a circuit simulation
    • Make fabrication outputs
Docs>CAD>ECAD guides

Run a circuit simulation

This guide checks an RC low-pass filter ahead of an ADC input: 10 kΩ and 10 nF. The simulation lives in the schematic as a simulation section, so the circuit and the checks on it change together, and every check that runs the circuit runs the simulation too.

The filter's corner frequency and its 10–90 % rise time are

fc=12πRC≈1.59 kHz,tr=2.2 RC=0.22 ms.f_c = \frac{1}{2\pi R C} \approx 1.59\ \text{kHz}, \qquad t_r = 2.2\,R C = 0.22\ \text{ms}.fc​=2πRC1​≈1.59 kHz,tr​=2.2RC=0.22 ms.

1. The circuit and its simulation

runmat 0.7
std 1

// An RC low-pass filter ahead of an ADC input: 10 kOhm and 10 nF, a 1.59 kHz corner.
circuit adc_filter {
    root = main

    sheet main {
        component R1 = { part = "R0402-10K" }
        component C1 = { part = "C0402-10N" }
        component P1 = { part = "PAD-WIRE-20AWG" }
        component P2 = { part = "PAD-WIRE-20AWG" }
        component P3 = { part = "PAD-WIRE-20AWG" }
        net GND = { global = true, power_flag = true }
        connect = [net.IN, "P1.1", "R1.1"]
        connect = [net.OUT, "R1.2", "C1.1", "P3.1"]
        connect = [net.GND, "C1.2", "P2.1"]
    }

    simulation response {
        sheet = main
        source VS = { p = net.IN, ac = 1 V, pulse = { from = 0 V, to = 1 V, delay = 0.1 ms, rise = 1 us, fall = 1 us, width = 2 ms, period = 4 ms } }
        tolerance resistors = { match = "R*", value = 1 % }
        tolerance capacitors = { match = "C*", value = 10 % }
        analysis step = tran { stop = 1.5 ms, step = 1 us }
        analysis sweep = ac { from = 10 Hz, to = 1 MHz, points = 50 }
        analysis spread = monte_carlo { of = sweep, runs = 100, seed = 7 }
        probe = [net.IN, net.OUT]
        measure corner = { of = sweep, bandwidth = net.OUT, spec = { min = 1.4 kHz, max = 1.8 kHz } }
        measure rise = { of = step, rise_time = net.OUT, from = 0.1 ms, to = 1.5 ms, spec = { max = 0.3 ms } }
        measure settled = { of = step, final = net.OUT, spec = { min = 0.99 V, max = 1.01 V } }
    }
}

2. Sources

source VS drives net IN against ground. One source can carry several waveforms, and each analysis uses the one it needs: ac = 1 V is the small-signal amplitude for the AC sweep, and pulse is the step for the transient. Other waveforms are dc, sin and pwl; current = true makes it a current source.

3. Analyses

  • tran { stop, step } runs the time response for 1.5 ms.
  • ac { from, to, points } sweeps 10 Hz to 1 MHz.
  • monte_carlo { of = sweep, runs = 100, seed = 7 } repeats the AC sweep 100 times with R and C drawn from their tolerance lines (1 % and 10 %). The fixed seed makes the runs repeat exactly.

Operating point, DC sweep, noise and temperature analyses take the same form. See Simulation sections and measures.

4. Measures and limits

A measure reads one number from an analysis, and spec sets its limits:

  • corner is the -3 dB bandwidth at OUT, within 1.4 kHz to 1.8 kHz.
  • rise is the 10–90 % rise time after the step, at most 0.3 ms.
  • settled is the final value, within 1 % of the 1 V step.

5. Run it

The Desktop's Simulate runs the section and plots the probed waveforms (probe = [net.IN, net.OUT]), with each measure and its verdict beside them. The agent runs it with design.simulate. From the command line, the check runs every section:

runmat-design check adc_filter.circuit
adc_filter.circuit: measure response.corner = 1591.474140 Hz (pass)
adc_filter.circuit: measure response.rise = 0.000220 s (pass)
adc_filter.circuit: measure response.settled = 0.999999 V (pass)
adc_filter.circuit: passed (0 errors, 0 warnings; ran compile, erc, review, simulation:response)

A measure outside its limits fails the check, and the command exits with status 1, so a CI job that runs it stops a change that moves the corner out of band. runmat check and runmat test run the same circuit checks beside .m and .fea files.

6. Models

Passive parts simulate from their values. A part with a SPICE model in the library (its spice field) simulates with no extra lines. A section's model "<part>" = { library, subckt, pins } statement overrides it, so one section can run a switching regulator's full model and another its averaged model. See The parts library.

Next

  • Simulation sections and measures lists every source, analysis and measure.
  • Make fabrication outputs when the design passes.
On this page
  • 1. The circuit and its simulation
  • 2. Sources
  • 3. Analyses
  • 4. Measures and limits
  • 5. Run it
  • 6. Models
  • Next