Specifying reference state values in MPC controller cost function
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I have an MPC controller, built with the following general format (i have not included the nonlinear equations because they are relatively long):
nx = 11;
ny = 3;
nu = 13;
nlobj = nlmpc(nx,ny,nu);
nlobj.Model.StateFcn="nonlinear_eom.m";
nlobj.Jacobian.StateFcn="nonlinear_j";
Ts=0.4;
p=30;
nlobj.Ts=Ts;
nlobj.PredictionHorizon=p;
nlobj.ControlHorizon=p;
I want to use this controller as part of a simulation where a preliminary value of the control values U(5:13) for each time step is to be given to the controller i.e. I want to specify a cost function where given the reference controls (using subscripts U), the cost is given by:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/674283/image.png)
I looked at the example in Trajectory Optimization and Control of Flying Robot Using Nonlinear MPC - MATLAB & Simulink (mathworks.com)
This only considers the control values themselves. I know that:
includes ref, which is the output reference values, but what about the input reference values?
0 个评论
回答(0 个)
另请参阅
类别
在 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!