ModelicaStandardLibrary
ModelicaStandardLibrary copied to clipboard
Add extra variables for easier check of derivative calculations of table blocks
In order to check the derivative-approximation a simple possibility is to just integrate it and see that it is roughly the same as the original. It doesn't replace the reference results, but it helps in analyzing potential errors.
As an example simulate ModelicaTest.Tables.CombiTable1Ds.Test34 and plot d_t_new.u, integrated, integrated2. They should all be almost identical to each other. The parameter with Evaluate=false is added so that tools don't have the amazing idea of seeing through the differentiation combined with integration. There is no need to have references for these variables.
Possible extensions:
- assert for equality (a bit complicated due to double integration)
- turn it into a block
- so that we don't mix graphics and text
- it can be re-used for derivative test-models not extending from those base-classes
- figure-annotations
Summary by CodeRabbit
- New Features
- Enhanced several dynamic models with improved integration and derivative calculations.
- Refined simulation modules now establish advanced relationships between input signals and their computed rates of change, boosting the accuracy and complexity of system dynamics.