How do I find the objective/cost function for the example Valet parking using multistage NLMPC. (https://www.mathworks.com/help/mpc/ug/parking-valet-using-nonlinear-model-pred
2 次查看(过去 30 天)
显示 更早的评论
Hello Sir/Madam,
I a trying to understand cost/objective function for NLMPC for the valet parking example, but not able to accurately identify where that is defined. Could you help understand this model and the objective function used. (It may be obvious but, I am not able to find it). I have attached some image sof my attempt to located it. Thank you
https://www.mathworks.com/help/mpc/ug/parking-valet-using-nonlinear-model-predictive-control.html
0 个评论
回答(1 个)
Emmanouil Tzorakoleftherakis
2023-7-5
编辑:Emmanouil Tzorakoleftherakis
2023-7-5
Hi,
The example you mentioned used MPC on two occasions:
1) On the outer loop for planning through the Vehicle Path Plannerblock. This is a block that obscures the MPC details from the user and outputs a path from point A to point B while potentially avoiding obstacles. If you want to take a look at what the cost looks like for this one, or to customize the block, click Create VPP subsystem on the block properties.
2) There is an MPC tracking controller in the inner loop which tracks the path generated by the VPP block above (see attached snapshot). This controller is created in 'createMPCForTrackingVPP.m'. If you open that file you will see lines 16 and 17 assign the state function and its Jacobian. We do not provide a custom cost function here, so nonlinear MPC is using the default quadratic cost (see top section here). In the same m file, lines 32 and 33 provide cost weights for proper tracking.
Hope this helps
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Model Predictive Control Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!