Derivative

Filtered derivative du/dt.

  • signal
  • Gradara equations
  • 2 ports
  • 1 parameter
BlockDerivativeKindderivativeLibraryContinuous

Description

Approximates the time derivative of its input, filtered by a first-order lag with Filter time τ. Smaller τ comes closer to the true derivative but amplifies noise and fast edges more.

Example

Step responses A unit step through a first-order filter, a second-order system, an integrator, and a delay; a ramp through a derivative.

Step at 0.1 sFirst orderSecond orderIntegratorDelay 0.3 sRamp, slope 2Derivative
In Gradara, select a Derivative block and press F1, then choose Open example. It opens as a new model in My models, ready to run.

Also in this example:Limited integratorStepLow-pass filterRampSecond-orderTransport delay

Ports

Inputs 1

  • u

    Input signal.

Outputs 1

  • y

    Filtered derivative of u, in units of u per second.

Parameters

  • Filter timetau0.01 s

    ≥ 0.00001

    Filter time constant τ, in seconds. At least 1e-5 s.

Equations

Modelica
dx/dt = (u − x) / tau, with x = 0 at time 0
y = (u − x) / tau
Transfer function: s / (tau · s + 1)

Implementation

The block’s Modelica model
Real x(start=0, fixed=true);
der(x) = (u - x)/tau;
y = (u - x)/tau;

Assumptions and limitations

  • The internal state starts at 0, not at the input, so a nonzero input at time 0 gives an initial spike of u(0)/tau that decays with time constant τ.
  • A step in the input gives a spike of height step/tau rather than an impulse.

See also

Select a block in Gradara and press F1 to open its page offline.