Skip to content

Clarification of derivatives of functions #3846

@AHaumer

Description

@AHaumer

I suppose for newcomers chapter 12.7 is not really easy to understand.
It is not clearly stated, that the function der_y defining the derivative of another function y(x) has to be constructed as the derivative with respect to time, i.e. der_y=dy/dx*dx/dt. This also clarifies why dx/dt has to be liste as an input to function der_y.
For me the difference or the pruposes of noDerivative versus zeroDerivative is not completely clear.
What if I have a parameter record which won't influence der_y? Do I have to specify noDerivative or zeroDerivative?
For me it's always a little bit shaky if a tool is free to inline a function an create analytic derivatives itself. All tools? What if not?

Maybe a complete simple example could help to explain that. Feel free to take something from my enclosed example with physical background (saturating inductor, where we use for the approximation of MagneticFlux psi = f(Current i) a special sigmoid (the normal cumulative distribution function). In the model we need der(psi), and maybe not all tools can calculate the derivative of Modelica.Math.Distributions.cumulative (which in fact is Modelica.Math.Distributions.density).
Image

Saturation.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    clarificationSpecification of feature is unclear, but not incorrecthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions