Skip to content

Frequency chart

Frequency response on a log axis: a spectrum, or a Bode plot with gain and phase margins drawn where they are measured.

npx dtheo@latest add frequency-chart
Open-loop responseRA-14 hip pitch · R-0412 against the R-0409 reference
Use the left and right arrow keys to read values by frequency. Hold Shift for larger steps.

When to use

  • Bode plots of a control loop, with crossover and margins
  • Vibration and noise spectra with labelled peaks
  • Signals over time: use Line chart
  • A handful of frequencies people compare exactly: use a Table

Examples

Spectrum

Vibration spectrumOutput-flange accelerometer · R-0412 · 2 s capture
Use the left and right arrow keys to read values by frequency. Hold Shift for larger steps.

API

frequency
Frequencies in Hz, ascending and above zero.ArrayLike<number>
magnitude
Magnitude series in dB (or the unit in `magnitudeUnit`).FrequencySeries[]
phase
Phase series in degrees. Adds a second pane: a Bode plot.FrequencySeries[]
spans
Vertical arrows between a value and a reference, for gain and phase margins.FrequencySpan[]
peaks
Labelled points on the magnitude pane, such as resonances.FrequencyPeak[]
references
Dashed reference lines, such as 0 dB and −180°.{ magnitude?: number[]; phase?: number[] }

Keyboard

Arrow leftright
Move the readout to the next frequency
Shift + arrow
Move by a tenth of the range
HomeEnd
Jump to the lowest or highest frequency
Escape
Hide the readout
  • Both panes share one crosshair and one readout, announced politely as you move.
  • Decades are labelled (10, 100, 1k Hz); the steps between them are faint grid lines.
  • Margins are labelled with their value, not shown by color.

Used in