Skip to content

Multi-rate monitoring

When your circuit has subsystems running at different rates, the scope can display traces from multiple rate groups on the same plot. The high-rate trace draws every sample; the low-rate trace draws its samples on the same x-axis with the gaps spanned by line segments — so the two render as "low-density line on top of high-density line".

What you see

Plot a slow v_dc from the outer loop and a fast i_switch from inside a Subsystem on the same scope:

  • The fast trace draws every sample of i_switch. You see the switching ripple.
  • The slow trace draws every sample of v_dc, connected with straight lines across the fast trace's intermediate samples. You see the slow envelope.

Why this works

Rate groups in NumaSim are always integer-related (a Subsystem with num_iterations = N runs at exactly N times the parent rate, never something irrational), so any set of rate groups in a chart shares a common refinement at dt_outer / LCM(N_i). The scope uses that common grid as the shared x-axis whenever the participating rate groups don't already share a single one — most commonly when two sibling subsystems use coprime Ns (e.g. N=3 next to N=4). The padding between real samples is null, not NaN — uPlot skips nulls when computing the Y range so the plot doesn't collapse.

For deeply nested or wildly coprime rate combinations the common grid can grow large; the scope caps its size and falls back to the finest existing axis with a console warning so the plot still renders, at the cost of a sub-grid jitter on the coprime traces. If you hit the warning, picking num_iterations values that share a common divisor (e.g. N=4 and N=8 instead of N=7 and N=11) keeps the common grid small.

Practical guidance

  • If you don't care about the fine ripple, plot only the slow trace. The scope auto-decimates if the dataset is huge.
  • If the slow trace looks blocky on a small zoom, switch the trace style from line to stepped in the trace chip menu — this makes the sampling cadence explicit.

See also