How do I plot the progress of fmincon to see the convergence of the approximation?
Show older comments
I want to see the output at each iteration of the optimization. I am solving for MPC and want to plot the entire future solution at each iteration of the algorithm to see how the system behaves throughout the optimization process. I tried the PlotFcns option but this doesn't give me the vector of outputs, I think just the first element. Is there a way to do this?
8 Comments
Mario Malic
on 12 Oct 2020
Edited: Mario Malic
on 13 Oct 2020
Edit: Sorry for the yesterday's minimal reply, I have a question, what is the value of your objective function? IIRC, fmincon accepts only scalar value for objective function. Are you taking only one element from your column vector and setting it as an objective function value?
John Petersen
on 13 Oct 2020
John Petersen
on 13 Oct 2020
Mario Malic
on 13 Oct 2020
MPC stands for Model Predictive Control?
How do you calculate 'entire future solution at each iteration'?
John Petersen
on 13 Oct 2020
Mario Malic
on 13 Oct 2020
Edited: Mario Malic
on 13 Oct 2020
Sorry, can't really connect the dots.
But yeah, OutputFcn link from above should be the way to solve it.
John Petersen
on 13 Oct 2020
Mario Malic
on 14 Oct 2020
Unfortunately, my background is not in EE, so control-stuff is not my cup of tea.
Answers (0)
Categories
Find more on Model Predictive Control Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!