.Modelica_Requirements.SignalAnalysis.ExactDerivative

Information

Syntax

der_u = ExactDerivative(u=...).y;

Description

Real output y is the exact (analytic) derivative of the input u. This is achieved by using the Modelica operator der(..). This block will only work, if the tool is able to "somehow" determine the analytic derivative of the input u (for example, either der(u) is computed already somewhere else, or a tool is able to differentiate u analytically). If this fails, or if this is not practical, for example with measurement data, then use the blocks that compute a derivative in an approximate way: ApproximateDerivativeWithFilter or ApproximateDerivativeWithWindow.

Example

This block is demonstrated with the following example:

that compares different ways to compute a derivative. Simulation 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.


Generated at 2024-11-26T19:26:15Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos