How to optimize a parameter using Nonlinear model predictive controller
Mostrar comentarios más antiguos
Hello everyone,
I am using Nonlinear model predictive controller and I wonder if I can optimize a parameter.
Let's take an example Plan Optimal Trajectory Using Nonlinear MPC on this website (https://www.mathworks.com/help/mpc/ref/nlmpc.nlmpcmove.html). In FlyingRobotStateFcn.m there are 2 given parameters alpha and beta = 0.2. Is there a way to make these paremeters also variables and calculate optimal values of alpha and beta ?
Thank you for your answers
Respuestas (1)
Emmanouil Tzorakoleftherakis
el 22 de Feb. de 2023
Editada: Emmanouil Tzorakoleftherakis
el 23 de Feb. de 2023
0 votos
Looks like you are referring to parameters defined inside the prediction model/state function of the MPC controller. You can make these variables parameters/arguments to the state function by following the guidelines on this page.
To use MPC for static optimization, one idea is to use the parameter as an MV and set a MVRate constraint to zero. That would basically make this MV constant. That way you could have both dynamically changing MVs and a constant one. If you try it, please let me know if it works.
4 comentarios
Ondrej Zoufaly
el 23 de Feb. de 2023
Emmanouil Tzorakoleftherakis
el 23 de Feb. de 2023
Editada: Emmanouil Tzorakoleftherakis
el 23 de Feb. de 2023
A bit clearer now thanks. Looks like alpha shows up in your dynamics. Can this parameter change over time or is it constant? If it is allowed to vary, you could treat it as an additional input to your system and have MPC calculate that as well
Ondrej Zoufaly
el 23 de Feb. de 2023
Emmanouil Tzorakoleftherakis
el 23 de Feb. de 2023
I see. So basically you have mixed dynamic and static decision variables. I haven't tried it myself, but one idea is to still use the parameter as an MV and set a MVRate constraint to zero. That would basically make this MV constant. That way you could have both dynamically changing MVs and a constant one. If you try it, please let me know if it works.
I also updated my answer accordingly
Categorías
Más información sobre Controller Creation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!