資源簡介
非線性模型預測控制(NMPC)算法的matlab程序,求由目標函數及過程模型定義的NMPC問題的閉環最優控制。
代碼片段和文件信息
function?[t?x?u]?=?nmpc(runningcosts?terminalcosts?...
??????????????constraints?terminalconstraints?...
??????????????linearconstraints?system?...
??????????????mpciterations?N?T?tmeasure?xmeasure?u0?...
??????????????varargin)
%?nmpc(runningcosts?terminalcosts?constraints?...
%??????terminalconstraints?linearconstraints?system?...
%??????mpciterations?N?T?tmeasure?xmeasure?u0?...
%??????tol_opt?opt_option?...
%??????type?atol_ode_real?rtol_ode_real?atol_ode_sim?rtol_ode_sim?...
%??????iprint?printHeader?printClosedloopData?plotTrajectories)
%?Computes?the?closed?loop?solution?for?the?NMPC?problem?defined?by
%?the?functions
%???runningcosts:?????????evaluates?the?running?costs?for?state?and?control
%?????????????????????????at?one?sampling?instant.
%?????????????????????????The?function?returns?the?running?costs?for?one
%?????????????????????????sampling?instant.
%??????????Usage:?[cost]?=?runningcosts(t?x?u)
%?????????????????with?time?t?state?x?and?control?u
%???terminalcosts:????????evaluates?the?terminal?costs?for?state?at?the?end
%?????????????????????????of?the?open?loop?horizon.
%?????????????????????????The?function?returns?value?of?the?terminal?costs.
%??????????Usage:?cost?=?terminalcosts(t?x)
%?????????????????with?time?t?and?state?x
%???constraints:??????????computes?the?value?of?the?restrictions?for?a
%?????????????????????????sampling?instance?provided?the?data?t?x?and?u
%?????????????????????????given?by?the?optimization?method.
%?????????????????????????The?function?returns?the?value?of?the
%?????????????????????????restrictions?for?a?sampling?instance?separated
%?????????????????????????for?inequality?restrictions?c?and?equality
%?????????????????????????restrictions?ceq.
%??????????Usage:?[cceq]?=?constraints(t?x?u)
%?????????????????with?time?t?state?x?and?control?u
%???terminalconstraints:??computes?the?value?of?the?terminal?restrictions
%?????????????????????????provided?the?data?t?x?and?u?given?by?the
%?????????????????????????optimization?method.
%?????????????????????????The?function?returns?the?value?of?the
%?????????????????????????terminal?restriction?for?inequality?restrictions
%?????????????????????????c?and?equality?restrictions?ceq.
%??????????Usage:?[cceq]?=?terminalconstraints(t?x)
%?????????????????with?time?t?and?state?x
%???linearconstraints:????sets?the?linear?constraints?of?the?discretized
%?????????????????????????optimal?control?problem.?This?is?particularly
%?????????????????????????useful?to?set?control?and?state?bounds.
%?????????????????????????The?function?returns?the?required?matrices?for
%?????????????????????????the?linear?inequality?and?equality?constraints?A
%?????????????????????????and?Aeq?the?corresponding?right?hand?sides?b?and
%?????????????????????????beq?as?well?as?the?lower?and?upper?bound?of?the
%?????????????????????????control.
%??????????Usage:?[A?b?Aeq?beq?lb?ub]?=?linearconstraints
- 上一篇:信息熵·互信息代碼
- 下一篇:matlab單純形法程序
評論
共有 條評論