modelDerivatives

Examples for DerXXX (various ways to compute derivatives of signals)

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

Using the signal analysis blocks ExactDerivative, ApproximateDerivativeWithFilter, and ApproximateDerivativeWithWindow to compute the derivative of the input signal analytically or approximately with the following example

results in

simulation result

Note, the approximate derivatives have a large error at the start of the simulation, because no information about the derivative of the signal is known. For this reason, the ApproximateDerivativeWithFilter block starts, for example, with steady-state (so zero derivative), and then needs some time until the approximation of the derivative is fine.

Components

TypeNameDefaultDescription
Modelica_Requirements.SignalAnalysis.ExactDerivativeder1
Modelica_Requirements.SignalAnalysis.ApproximateDerivativeWithFilterapproxDerFilter
Modelica.Blocks.Sources.Sinesine
Modelica_Requirements.SignalAnalysis.ApproximateDerivativeWithWindowapproxDerWindow