I can't seem to satisfy the inequality constraint in my GRAMPC. I've tried varying user.opt.ConstraintsAbsTol, the maximum penalty, the penalty increase/decrease factors, and changing user.opt.ConstraintsHandling to extpen. None of these are affecting the simulation results. The constraint is quickly violated, and the penalty goes to whatever the maximum is and remains there for most of the simulation.
I don't think this is due to the problem being infeasible. I'm using Lyapunov MPC, and the constraint simply requires that the control input from MPC outperform (in terms of a Lyapunov function value) a feasible analytical control input.
In real-time experiments on hardware, the constraints are also only satisfied some of the time. I've included plots from both simulation and experiments as well as my initialization script. For clarity, in the plots, V_mpc is calculated based on xnext (predicted value from GRAMPC), not the true value which may contain disturbance.
I don't think I have ever seen the penalties explode so fast to PenaltyMax. Maybe the error is related to wrong gradients of the constraint, but this is really just a guess.
I am now on vacation during the next weeks and won't have time to look into this problem. Maybe you can reduce it to a minimal working example (probfct,c, initData.m and startMPC.m) that still shows the behaviour and then share it with me?
Best regards,
Andreas Völz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the suggestion. In the process of creating the simpler example, I found an error that had been overlooked through multiple code checks. All is fixed now!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I can't seem to satisfy the inequality constraint in my GRAMPC. I've tried varying user.opt.ConstraintsAbsTol, the maximum penalty, the penalty increase/decrease factors, and changing user.opt.ConstraintsHandling to extpen. None of these are affecting the simulation results. The constraint is quickly violated, and the penalty goes to whatever the maximum is and remains there for most of the simulation.
I don't think this is due to the problem being infeasible. I'm using Lyapunov MPC, and the constraint simply requires that the control input from MPC outperform (in terms of a Lyapunov function value) a feasible analytical control input.
In real-time experiments on hardware, the constraints are also only satisfied some of the time. I've included plots from both simulation and experiments as well as my initialization script. For clarity, in the plots, V_mpc is calculated based on xnext (predicted value from GRAMPC), not the true value which may contain disturbance.
Dear Krysten,
I don't think I have ever seen the penalties explode so fast to PenaltyMax. Maybe the error is related to wrong gradients of the constraint, but this is really just a guess.
I am now on vacation during the next weeks and won't have time to look into this problem. Maybe you can reduce it to a minimal working example (probfct,c, initData.m and startMPC.m) that still shows the behaviour and then share it with me?
Best regards,
Andreas Völz
Thank you for the suggestion. In the process of creating the simpler example, I found an error that had been overlooked through multiple code checks. All is fixed now!