Simulation is slow when porting nonlinear MPC from Matlab2018a to 2015a

3 visualizaciones (últimos 30 días)
Dave Lee
Dave Lee el 26 de Jun. de 2019
Editada: Dave Lee el 26 de Jun. de 2019
Hi there,
I have both versions of Matlab 2018a and 2015a. Due to some reason with my main simulation, I have to run simulation in 2015a. As 2015a does not have nonlinear MPC, I used the example of nonlinear MPC "Nonlinear MPC Control of an Ethylene Oxidation Plant". This Simulink model just uses two Matlab functions for the job. I converted back to 2015a and manipulate the input a little so simulation can run. Basically, make Ts, PredictionHorizon, ControlHorizon, u1LowLimit, u1HighLimit as explicit constant input to the function. The screenshot is attached.
The simulation can run and produce same result as Matlab 2018a (as I ran half way through). However it is extremely slow. As 2018a goes with Automatic solver selection as default, I changed to ode45 to be the same as the converted 2015a but there is no difference in how 2018a runs.
I wonder if there could be a simple change to make it happen. Or another suggestion to implement nonlinear MPC in 2015a is also appreciated.
Thanks

Respuestas (0)

Categorías

Más información sobre Model Predictive Control Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by