<< loadFMU fmu_wrapper

fmu_wrapper >> fmu_wrapper > Comparison of numerical results of simulation

Comparison of numerical results of simulation

This page contains the analyse of simulation error for the generated FMUs.

Simulation error for the different Xcos solvers

We will analyse the simulation error for the FMU PID controller. We design a system with a PID controller. On this diagram we have two generated FMUs (for Model Exchange and Co-Simulation) which have been generated from Xcos PID block. We will simulate with different solvers in order to compare the simulation results. The results of simulation of FMUs will be compared with the results of Xcos PID block.

Simulation with the fixed-size step methods

In the following tables, we have the errors that were received after the comparison with the simulation results of Xcos PID block.

Mean error Standard deviation Min Max Order
Dormand-Prince
FMU for Model Exchange 0.0009646 0.0024503 0 1.1003015 1.0002757
FMU for Co-Simulation 0.0010303 0.0026149 0 1.1008595 1.0002744
Runge-Kutta
FMU for Model Exchange 0.0006739 0.0017135 0 1.0977626 1.0002757
FMU for Co-Simulation 0.0027873 0.0070039 0 1.1169099 1.0002715

Simulation with the variable-size step methods

Mean error Standard deviation Min Max Order
LSodar
FMU for Model Exchange 0.0008094 0.0025042 0 1.0899767 1.0002757
FMU for Co-Simulation 0.0002562 0.0005055 0 1.0934054 1.0003286
CVODE-BDF-NEWTON
FMU for Model Exchange 0.0038599 0.0099237 0 1.0808262 1.0013951
FMU for Co-Simulation 0.0004579 0.0010252 0 1.0954875 1.0002918
CVODE-BDF-FUNCTIONAL
FMU for Model Exchange 0.0000025 0.0000030 3 1.0915449 1.0002757
FMU for Co-Simulation 0.0005118 0.0012158 0 1.0959081 1.0002919
CVODE-ADAMS-NEWTON
FMU for Model Exchange 0.0034273 0.0089805 0 1.0834061 1.0023902
FMU for Co-Simulation 0.0004833 0.0010910 0 1.095673 1.0003073
CVODE-ADAMS-FUNCTIONAL
FMU for Model Exchange 0.0000241 0.0000390 0 1.091729 1.0002757
FMU for Co-Simulation 0.0005477 0.0011522 0 1.0956803 1.0003743

Conclusion

On this page we compared the simulation results of generated FMUs. By analysing the results, we could say that the better solver for the FMUs ME is CVODE-BDF with FUNCTIONAL iterations. For the FMUs CS we have almost the same value of errors for all kind of solvers, this is explained by the fact that the FMUs for Co-Simulation have there own solvers to perform numerical integration. All of the above results was obtained with the simulation that has been done with default parameters for the relative and absolute tolerances. So, by configuring the parameters of the tolerance a user is able to reduce the simulation errors.

See Also


Report an issue
<< loadFMU fmu_wrapper