Voltecx is in beta. The macOS build comes first; Windows and Linux packages are still being tested.Beta. macOS comes first; Windows and Linux are still in testing. What's new
Documentation

Filtered Derivative (derivative)

The rate of change of its input, times a gain, with a first-order filter so it does not amplify noise without bound.

derivative

Component reference · 繁體中文

Group: Control · Kind: {"block":"derivative","kind":"control"}

When to use it

Use it for a rate of change: di/dt of a measured current, the derivative path of a hand-built controller, or the speed from a position. Use PID Controller for a whole PID.

Pins

Pin Domain Meaning
in signal Signal input
out signal k times the filtered rate of change

Common parameters

  • k: Gain on the rate of change (Default: 1)
  • fc: Corner of the derivative filter; above it the gain levels off at k·2π·fc (Default: 1k)

Parameters

Key Unit Default Typical range Description
k s 1 Gain on the rate of change
fc Hz 1k Corner of the derivative filter; above it the gain levels off at k·2π·fc

Parameter descriptions are in English in both languages.

Model

H(s) = k·ωc·s/(s + ωc) with ωc = 2π·fc: below fc it is k·s, a derivative; above fc its gain levels off at k·ωc. A ramp of slope m gives k·m after a few time constants 1/ωc. It runs as Transfer Function, so the output follows the present input (direct feedthrough).

Common mistakes

  • A switching ripple at the input comes out multiplied by up to k·ωc. Keep fc below the switching frequency, or filter the input first.
  • fc must be positive. A very high fc against maxStep makes the trapezoidal rule ring; keep 1/(2π·fc) several steps long.

Problems rules: compile.error, solver.control

Datasheet and sources

There is no datasheet.

Example

Open the example with the command file.openExample and the name demo:derivative.


Generated by cargo xtask reference from the usage texts and parameter specs. Do not edit by hand.