Time-Domain System Equivalent logoTime-Domain System EquivalentLinear dynamics, solved faster.Discuss an evaluation
SDK Documentation

Circuit Authoring Workflows

Author circuit models, prepare boundaries, and observe internal voltages and currents.

For new fixed-step circuit packs, use tdse workflow prepare with explicit --dt and --nh. Source-defined (AS_IS) endpoint input handling and real-part causality correction are selected by default; PWL and ZOH are explicit alternatives. See Circuit Inputs And Compatibility for held interfaces and advanced kernel imports. This does not change coupled-solver semantics.

This chapter owns Circuit command workflows and the ModelSpace authoring path. Exact option syntax remains in the separate CLI Reference.

Common CLI Tasks

The CLI is the fastest way to validate a ModelSpace case, explore a circuit, or generate Builder-facing artifacts. The sections below explain the intent of each command family. Use CLI Reference when you need exhaustive flag or output-field detail.

Circuit routing accepts the global --json-out <path|-> option for a machine-readable command envelope. Execution commands consume a ModelSpace JSON file with --case <case.json>; discovery commands such as caps do not.

If you are writing a script, use --json-out - (stdout) and parse the JSON envelope. Send data/report outputs to files; the CLI rejects configurations where both a data output and --json-out target stdout. Human-readable output is for interactive use only and may change between versions.

caps: Check Available Backends

Before you run any computation, you need to know what solver backends are available on your machine. The caps command answers this: it prints a table of every backend the SDK was built with, and whether each one is usable right now.

tdse circuit caps --out-caps circuit-caps.txt --json-out -

This is the first thing to run on a new machine or after upgrading the SDK. A backend might show as unavailable because a required library is missing (CUDA, MKL), because the GPU driver is outdated, or because the backend was not compiled into this build.

For accelerated execution, use tdse circuit capability-matrix. Its JSON report separates TDSE Circuit CUDA solver, TDSE Circuit accelerated transient, and TDSE GPU Add-on Runtime provider rows. The report identifies the product_surface as TDSE Circuit, technical_package_type as SDK, the core_contract as the TDSE Circuit execution capability contract, and the capability_explain_schema as tdse.circuit.execution_capability.explain.v1. Each row includes an availability_boundary (build, discovery, device, runtime, or available), user_explanation, and recommended_action, so scripts and users see the same reason boundary.

FlagMeaning
--out-caps <path|->Write backend capability table (default: stdout)
--out-build-features <path|->Write build-time feature flags as JSON
--json-out <path|->Machine-readable output envelope

Import Architecture Boundary

Native imports share one result, issue, capability, semantic, and reporting contract. Format-specific code owns parsing and source-to-ModelSpace mapping; it does not invent a separate report vocabulary or approximation policy. The active importer layout keeps parser/file input, semantic mapping, and diagnostics/reporting in separate files for RAW, SPICE, ATP, OpenDSS, and GridLAB-D. Their result structs derive from the shared native import result envelope, so success state, ModelSpace case payload, report JSON, errors, and warnings have one storage shape across native importers.

matrix: Compute Y or Z over Frequency

This is the workhorse command. You have a ModelSpace case and a set of ports, and you want the admittance (Y) or impedance (Z) matrix at each frequency in a grid. The output goes directly to Builder - the port order you specify here must match the port order you use in h_from_spectrum.

tdse circuit matrix \
  --case case.json \
  --matrix y --ports "1,0;2,0" \
  --w0 0 --dw 100 --nfreq 5 \
  --out-data matrix.csv --json-out -

The frequency grid is defined by three numbers: a start frequency w0 in rad/s, a step dw in rad/s, and a count nfreq. The grid covers w0, w0 + dw, w0 + 2*dw, ..., w0 + (nfreq-1)*dw. For a DC start use --w0 0.

FlagMeaningDefault
--case <case.json>Canonical ModelSpace JSON filerequired
--matrix y|zAdmittance (Y) or impedance (Z)(required)
--ports "p,n;p,n;..."Port definitions by numeric node index. String names in C API(required)
--w0Start frequency in rad/s. Use 0 for DC(required)
--dwFrequency step in rad/s(required)
--nfreqNumber of frequency points(required)
--dc-policyDC frequency resolution policyexact_dc_then_fallback
--dc-extrapolate-points <N>Points used for DC extrapolation4
--out-data <path|->Output CSV file path-

DC policy values:

Solving at exactly zero frequency (DC) is harder than it sounds. Inductors become shorts, capacitors become opens, and the MNA matrix can become singular. These policies control how the solver handles omega = 0:

CLI valueEnum constantDescription
regularized_exact_dcTDSE_CIRCUIT_W0_REGULARIZED_EXACT_DCAdds small conductance to regularize inductors at DC
extrapolate_from_positiveTDSE_CIRCUIT_W0_EXTRAPOLATE_FROM_POSITIVESkips DC, extrapolates from positive-frequency data
exact_dc_then_fallbackTDSE_CIRCUIT_W0_EXACT_DC_THEN_FALLBACKExact DC first; regularization fallback if singular

The default (exact_dc_then_fallback) is the right choice for most circuits. Switch to extrapolate_from_positive if your circuit has no DC path to ground (floating nets, ideal transformers) and regularization isn't helping.

series: Compute VOC or ISC Time Sequences

The matrix command gives you frequency-domain behavior. But to drive a time-domain simulation, you often need source waveforms - the open-circuit voltage or short-circuit current seen at each port as a function of time. That's what series computes.

tdse circuit series \
  --case case.json \
  --series voc --ports "1,0" \
  --method transient --dt 1e-4 --steps 64 \
  --out-data series.csv --json-out -

The output is a time series: one row per time step, one column per port. The time at step k is t0 + k * dt.

FlagMeaningDefault
--series voc|iscOpen-circuit voltage or short-circuit current(required)
--ports "p,n;p,n;..."Port definitions(required)
--method transient|ifft|toneSynthesis method(required)
--dtTime step in seconds(required)
--stepsNumber of time steps(required)
--nfft <N>FFT size for ifft method-
--t0 <t0>Start time offset0
--out-data <path|->Output CSV file path-

Choosing a synthesis method:

The method you pick depends on your circuit and what accuracy you need:

MethodWhen to use
transientGeneral-purpose time-domain solver. Handles nonlinear devices and switching
ifftFrequency-domain synthesis for a linear circuit. Requires an explicit even nfft >= 2; validate the selected FFT length and timestep against the intended time window.
toneSingle-frequency steady-state analysis. Use for AC steady-state verification, not for transient simulation

If you are unsure, start with transient because it is the broadest supported time-domain method. It is not a universal correctness guarantee: validate the selected method, timestep, and output against an appropriate reference before experimenting with ifft for speed.

probe: Observe Internal Voltages or Currents

Port matrices tell you what happens at the terminals. But often you need to see inside the circuit - the voltage at an internal node, the current through a particular branch. Probes let you instrument the circuit and extract those values without modifying the netlist.

# AC probe -frequency sweep of internal quantities
tdse circuit probe \
  --domain ac --case case.json \
  --observe "v(1);v(2,0)" --observe-source argument \
  --ac-excitation small_signal \
  --sweep-kind lin --fstart-hz 50 --fstop-hz 5000 --sweep-points 100 \
  --out-data probe.csv --json-out -

# Transient probe -time-domain waveform of internal quantities
tdse circuit probe \
  --domain transient --case case.json \
  --observe "v(1);i(r1)" --observe-source argument \
  --method transient --dt 1e-4 --steps 64 \
  --out-data probe.csv --json-out -

Probes work in both AC and transient domains. In the AC domain, you get frequency sweeps of complex voltages and currents. In the transient domain, you get time-domain waveforms. The probe expressions use a simple syntax:

ExpressionMeaning
v(n)Voltage at node n relative to ground
v(p,n)Voltage between nodes p and n
i(r1)Current through element named r1
i(vsrc)Current through independent source vsrc
FlagMeaningDefault
--domain ac|transientAC small-signal or transient time-domain(required)
--observe "v(n);v(p,n);i(element);..."Probe expressions, semicolon-separated-
--observe-source argument|study|argument_or_study|autoProbe definition sourceauto
--ac-excitation small_signal|operating_pointAC excitation modesmall_signal
--sweep-kind from_study|lin|dec|oct|listFrequency sweep type for ACfrom_study
--sweep-points <N>Number of points for lin/dec/oct sweeps-
--fstart-hz <f0>Start frequency in Hz-
--fstop-hz <f1>Stop frequency in Hz-
--freq-list-hz <f0,f1,...>Explicit frequency list for list sweep-
--method transient|ifft|toneSynthesis method (transient probes)(required)
--dt, --stepsTime step and count (transient probes)(required)
--nfft <N>FFT size (transient)-
--t0 <t0>Start time offset (transient)0

The --observe-source flag is worth understanding. When set to argument, the CLI uses the probes you specify with --observe. When set to study, it reads the persisted ModelSpace observations. The default auto selects argument_or_study when --observe is present and study otherwise. Select argument_or_study explicitly when you want the combined source behavior.

When to Use Which Command

If you are new to TDSE Circuit, this table is your cheat sheet:

You want to...Use
Check what solvers are available on this machinecaps
Get Y or Z over frequency for Builder handoffmatrix
Get VOC or ISC time-domain waveforms for a host solverseries
Observe internal voltages or branch currents for validationprobe