Derivatives model
Requirements.Examples.Elementary.SignalAnalysis.Derivatives
ยท source
Examples for DerXXX (various ways to compute derivatives of signals)
Extends Modelica.Icons.Example
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 and variables
| Name | Type | Description |
|---|---|---|
der1 | Requirements.SignalAnalysis.ExactDerivative | Exact (analytic) derivative of the sine |
approxDerFilter | Requirements.SignalAnalysis.ApproximateDerivativeWithFilter | Filtered derivative of the sine, cut-off frequency 10 Hz |
sine | Modelica.Blocks.Sources.Sine | Sine of amplitude 2 at 1 Hz, phase 45 deg: the differentiated signal |
approxDerWindow | Requirements.SignalAnalysis.ApproximateDerivativeWithWindow | Finite difference quotient of the sine over 0.1 s |

