BYU-PRISM / GEKKO

GEKKO Python for Machine Learning and Dynamic Optimization
https://machinelearning.byu.edu
Other
580 stars 103 forks source link

Discretization of the ODEs #84

Closed fbook98 closed 4 years ago

fbook98 commented 4 years ago

Hello,

I use an IPOPT solver for an MPC to control a simulated motor, but I have a small difference between the calculated values ​​of the solver and the simulated values ​​of the motor, so there is a permanent control deviation. Therefore I would like to know how exactly the discretion of the ODEs works.

APMonitor commented 4 years ago

Try m.options.NODES=3. The default is 2 and sometimes doesn't have the required accuracy. Here is more information https://apmonitor.com/do/index.php/Main/OrthogonalCollocation