模型预测控制

来自集智百科 - 复杂系统|人工智能|复杂科学|复杂网络|自组织
跳到导航 跳到搜索

此词条暂由彩云小译翻译,翻译字数共2668,未经人工整理和审校,带来阅读不便,请见谅。

Model predictive control (MPC) is an advanced method of process control that is used to control a process while satisfying a set of constraints. It has been in use in the process industries in chemical plants and oil refineries since the 1980s. In recent years it has also been used in power system balancing models[1] and in power electronics.[2] Model predictive controllers rely on dynamic models of the process, most often linear empirical models obtained by system identification. The main advantage of MPC is the fact that it allows the current timeslot to be optimized, while keeping future timeslots in account. This is achieved by optimizing a finite time-horizon, but only implementing the current timeslot and then optimizing again, repeatedly, thus differing from a linear–quadratic regulator (LQR). Also MPC has the ability to anticipate future events and can take control actions accordingly. PID controllers do not have this predictive ability. MPC is nearly universally implemented as a digital control, although there is research into achieving faster response times with specially designed analog circuitry.[3]

Model predictive control (MPC) is an advanced method of process control that is used to control a process while satisfying a set of constraints. It has been in use in the process industries in chemical plants and oil refineries since the 1980s. In recent years it has also been used in power system balancing modelsMichèle Arnold, Göran Andersson. "Model Predictive Control of energy storage including uncertain forecasts" https://www.pscc-central.org/uploads/tx_ethpublications/fp292.pdf and in power electronics.Tobias Geyer: Model predictive control of high power converters and industrial drives, Wiley, London, , Nov. 2016. Model predictive controllers rely on dynamic models of the process, most often linear empirical models obtained by system identification. The main advantage of MPC is the fact that it allows the current timeslot to be optimized, while keeping future timeslots in account. This is achieved by optimizing a finite time-horizon, but only implementing the current timeslot and then optimizing again, repeatedly, thus differing from a linear–quadratic regulator (LQR). Also MPC has the ability to anticipate future events and can take control actions accordingly. PID controllers do not have this predictive ability. MPC is nearly universally implemented as a digital control, although there is research into achieving faster response times with specially designed analog circuitry.

模型预估计控制过程控制是一种先进的过程控制方法,用于在满足一系列约束条件的同时对过程进行控制。自20世纪80年代以来,它一直用于化工厂和炼油厂的加工工业。近年来,它还被用于电力系统平衡模型斯米歇尔 · 阿诺德、格兰 · 安德森。“包括不确定预测的能源储存模型预估计控制”https://www.pscc-central.org/uploads/tx_ethpublications/fp292.pdf 和电力电子学。大功率转换器和工业驱动器的模型预估计控制,威利,伦敦,2016年11月。模型预测控制器依赖于过程的动态模型,最常见的是系统辨识得到的线性经验模型。货币政策委员会的主要优点是,它允许优化当前的时隙,同时保持未来的时隙。这是通过优化一个有限的时间范围来实现的,但是只实现当前的时间段,然后再优化,反复,因此不同于线性二次调节器(LQR)。此外 MPC 有能力预测未来的事件,并可以采取相应的控制行动。PID 控制器不具有这种预测能力。MPC 几乎被普遍用作数字控制,尽管有研究表明使用专门设计的模拟电路可以实现更快的响应时间。

Generalized predictive control (GPC) and dynamic matrix control (DMC) are classical examples of MPC.[4]

Generalized predictive control (GPC) and dynamic matrix control (DMC) are classical examples of MPC.

广义预测控制(GPC)和动态矩阵控制(DMC)是 MPC 的经典例子。


概述

The models used in MPC are generally intended to represent the behavior of complex and simple dynamical systems. The additional complexity of the MPC control algorithm is not generally needed to provide adequate control of simple systems, which are often controlled well by generic PID controllers. Common dynamic characteristics that are difficult for PID controllers include large time delays and high-order dynamics.

The models used in MPC are generally intended to represent the behavior of complex and simple dynamical systems. The additional complexity of the MPC control algorithm is not generally needed to provide adequate control of simple systems, which are often controlled well by generic PID controllers. Common dynamic characteristics that are difficult for PID controllers include large time delays and high-order dynamics.

MPC 中使用的模型一般用来描述复杂和简单的动力系统的行为。控制算法的额外复杂性一般不需要提供足够的控制简单系统,这往往是控制良好的通用 PID 控制器。常见的 PID 控制器难以实现的动态特性包括大时滞和高阶动态。

MPC models predict the change in the dependent variables of the modeled system that will be caused by changes in the independent variables. In a chemical process, independent variables that can be adjusted by the controller are often either the setpoints of regulatory PID controllers (pressure, flow, temperature, etc.) or the final control element (valves, dampers, etc.). Independent variables that cannot be adjusted by the controller are used as disturbances. Dependent variables in these processes are other measurements that represent either control objectives or process constraints.

MPC models predict the change in the dependent variables of the modeled system that will be caused by changes in the independent variables. In a chemical process, independent variables that can be adjusted by the controller are often either the setpoints of regulatory PID controllers (pressure, flow, temperature, etc.) or the final control element (valves, dampers, etc.). Independent variables that cannot be adjusted by the controller are used as disturbances. Dependent variables in these processes are other measurements that represent either control objectives or process constraints.

MPC 模型预测模型系统的因变量的变化,因变量的变化将引起自变量的变化。在化工过程中,可以由控制器调节的独立变量通常是调节 PID 控制器的设定值(压力、流量、温度等)或最终控制元件(阀门、阻尼器等)。控制器不能调节的自变量被用作扰动量。这些过程中的因变量是表示控制目标或过程约束的其他度量值。

MPC uses the current plant measurements, the current dynamic state of the process, the MPC models, and the process variable targets and limits to calculate future changes in the dependent variables. These changes are calculated to hold the dependent variables close to target while honoring constraints on both independent and dependent variables. The MPC typically sends out only the first change in each independent variable to be implemented, and repeats the calculation when the next change is required.

MPC uses the current plant measurements, the current dynamic state of the process, the MPC models, and the process variable targets and limits to calculate future changes in the dependent variables. These changes are calculated to hold the dependent variables close to target while honoring constraints on both independent and dependent variables. The MPC typically sends out only the first change in each independent variable to be implemented, and repeats the calculation when the next change is required.

MPC 使用当前的工厂测量数据、过程当前的动态状态、 MPC 模型、程序变数目标和限制来计算未来因变量的变化。计算这些变化是为了使因变量接近目标,同时考虑对自变量和因变量的约束。MPC 通常只发送要实现的每个独立变量的第一个变化,并在需要进行下一个变化时重复计算。

While many real processes are not linear, they can often be considered to be approximately linear over a small operating range. Linear MPC approaches are used in the majority of applications with the feedback mechanism of the MPC compensating for prediction errors due to structural mismatch between the model and the process. In model predictive controllers that consist only of linear models, the superposition principle of linear algebra enables the effect of changes in multiple independent variables to be added together to predict the response of the dependent variables. This simplifies the control problem to a series of direct matrix algebra calculations that are fast and robust.

While many real processes are not linear, they can often be considered to be approximately linear over a small operating range. Linear MPC approaches are used in the majority of applications with the feedback mechanism of the MPC compensating for prediction errors due to structural mismatch between the model and the process. In model predictive controllers that consist only of linear models, the superposition principle of linear algebra enables the effect of changes in multiple independent variables to be added together to predict the response of the dependent variables. This simplifies the control problem to a series of direct matrix algebra calculations that are fast and robust.

虽然许多实际的过程不是线性的,但是它们通常可以被认为是在一个很小的操作范围内近似线性的。线性 MPC 方法在大多数应用中都使用了 MPC 的反馈机制,以补偿由于模型和过程之间的结构不匹配而产生的预测误差。在只由线性模型组成的模型预测控制器中,线性代数的叠加原理使得多个独立变量的变化的影响能够加在一起来预测相依变量的响应。这将控制问题简化为一系列快速、鲁棒的直接矩阵代数计算。

When linear models are not sufficiently accurate to represent the real process nonlinearities, several approaches can be used. In some cases, the process variables can be transformed before and/or after the linear MPC model to reduce the nonlinearity. The process can be controlled with nonlinear MPC that uses a nonlinear model directly in the control application. The nonlinear model may be in the form of an empirical data fit (e.g. artificial neural networks) or a high-fidelity dynamic model based on fundamental mass and energy balances. The nonlinear model may be linearized to derive a Kalman filter or specify a model for linear MPC.

When linear models are not sufficiently accurate to represent the real process nonlinearities, several approaches can be used. In some cases, the process variables can be transformed before and/or after the linear MPC model to reduce the nonlinearity. The process can be controlled with nonlinear MPC that uses a nonlinear model directly in the control application. The nonlinear model may be in the form of an empirical data fit (e.g. artificial neural networks) or a high-fidelity dynamic model based on fundamental mass and energy balances. The nonlinear model may be linearized to derive a Kalman filter or specify a model for linear MPC.

当线性模型不能充分准确地表示实际过程的非线性时,可以采用几种方法。在某些情况下,过程变量可以在线性 MPC 模型之前或之后进行转换,以减少非线性。在控制应用中,直接采用非线性模型的非线性预测控制器(MPC)可以对过程进行控制。非线性模型可以采用经验数据拟合的形式。人工神经网络)或基于基本质量和能量平衡的高保真动态模型。非线性模型可以线性化,导出卡尔曼滤波器或指定一个模型的线性预测控制。

An algorithmic study by El-Gherwi, Budman, and El Kamel shows that utilizing a dual-mode approach can provide significant reduction in online computations while maintaining comparative performance to a non-altered implementation. The proposed algorithm solves N convex optimization problems in parallel based on exchange of information among controllers.[5]

An algorithmic study by El-Gherwi, Budman, and El Kamel shows that utilizing a dual-mode approach can provide significant reduction in online computations while maintaining comparative performance to a non-altered implementation. The proposed algorithm solves N convex optimization problems in parallel based on exchange of information among controllers.

El-Gherwi、 Budman 和 El Kamel 进行的一项算法研究表明,使用双模式方法可以显著减少在线计算量,同时保持与未改变的实现相比较的性能。该算法基于控制器之间的信息交换,并行求解 n 个凸优化问题。


隐藏在 MPC 背后的理论

文件:MPC scheme basic.svg
A discrete MPC scheme.

MPC is based on iterative, finite-horizon optimization of a plant model. At time [math]\displaystyle{ t }[/math] the current plant state is sampled and a cost minimizing control strategy is computed (via a numerical minimization algorithm) for a relatively short time horizon in the future: [math]\displaystyle{ [t,t+T] }[/math]. Specifically, an online or on-the-fly calculation is used to explore state trajectories that emanate from the current state and find (via the solution of Euler–Lagrange equations) a cost-minimizing control strategy until time [math]\displaystyle{ t+T }[/math]. Only the first step of the control strategy is implemented, then the plant state is sampled again and the calculations are repeated starting from the new current state, yielding a new control and new predicted state path. The prediction horizon keeps being shifted forward and for this reason MPC is also called receding horizon control. Although this approach is not optimal, in practice it has given very good results. Much academic research has been done to find fast methods of solution of Euler–Lagrange type equations, to understand the global stability properties of MPC's local optimization, and in general to improve the MPC method.[6]

thumb|A discrete MPC scheme. MPC is based on iterative, finite-horizon optimization of a plant model. At time t the current plant state is sampled and a cost minimizing control strategy is computed (via a numerical minimization algorithm) for a relatively short time horizon in the future: [t,t+T]. Specifically, an online or on-the-fly calculation is used to explore state trajectories that emanate from the current state and find (via the solution of Euler–Lagrange equations) a cost-minimizing control strategy until time t+T. Only the first step of the control strategy is implemented, then the plant state is sampled again and the calculations are repeated starting from the new current state, yielding a new control and new predicted state path. The prediction horizon keeps being shifted forward and for this reason MPC is also called receding horizon control. Although this approach is not optimal, in practice it has given very good results. Much academic research has been done to find fast methods of solution of Euler–Lagrange type equations, to understand the global stability properties of MPC's local optimization, and in general to improve the MPC method.Michael Nikolaou, Model predictive controllers: A critical synthesis of theory and industrial needs, Advances in Chemical Engineering, Academic Press, 2001, Volume 26, Pages 131-204

离散 MPC 方案。MPC 是基于对对象模型的迭代有限层优化。在时间 t 采样当前的对象状态,并计算一个费用最小化控制策略(通过一个数值最小化算法)为相对较短的时间范围内的未来: [ t,t + t ]。具体来说,一个在线或在线计算是用来探索从当前状态发射出来的状态轨迹,并找到(通过解决欧拉-拉格朗日方程)一个成本最小化的控制策略,直到时间 t + t。控制策略只执行第一步,然后再次对对象状态进行采样,从新的当前状态开始重复计算,产生新的控制和新的预测状态路径。预测视界不断向前移动,因此 MPC 也称为滚动视界控制。虽然这种方法不是最佳的,但在实践中已经取得了很好的效果。对 Euler-Lagrange 型方程的快速求解方法、 MPC 局部优化的全局稳定性以及 MPC 方法的总体改进进行了大量的理论研究。模型预测控制器: 理论和工业需求的关键综合,化学工程进展,学术出版社,2001,第26卷,第131-204页


MPC 原理

Model predictive control is a multivariable control algorithm that uses:

  • an internal dynamic model of the process
  • a cost function J over the receding horizon
  • an optimization algorithm minimizing the cost function J using the control input u

Model predictive control is a multivariable control algorithm that uses:

  • an internal dynamic model of the process
  • a cost function J over the receding horizon
  • an optimization algorithm minimizing the cost function J using the control input u

是一个多变量控制算法,它使用:

  • 一个过程的内部动态模型
  • 一个成本函数 j 的滚动时域
  • 一个使成本函数 j 最小化的优化算法使用控制输入 u

An example of a quadratic cost function for optimization is given by:

An example of a quadratic cost function for optimization is given by:

最优化的二次成本函数的一个例子是:

[math]\displaystyle{ J=\sum_{i=1}^N w_{x_i} (r_i-x_i)^2 + \sum_{i=1}^N w_{u_i} {\Delta u_i}^2 }[/math]
J=\sum_{i=1}^N w_{x_i} (r_i-x_i)^2 + \sum_{i=1}^N w_{u_i} {\Delta u_i}^2


j = sum { i = 1} ^ n w { x i }(r i-x i) ^ 2 + sum { i = 1} ^ n w { u i }{ Delta u i } ^ 2

without violating constraints (low/high limits) with

without violating constraints (low/high limits) with

在不违反限制(低/高限制)的情况下

[math]\displaystyle{ x_i }[/math]: [math]\displaystyle{ i }[/math]th controlled variable (e.g. measured temperature)
[math]\displaystyle{ r_i }[/math]: [math]\displaystyle{ i }[/math]th reference variable (e.g. required temperature)
[math]\displaystyle{ u_i }[/math]: [math]\displaystyle{ i }[/math]th manipulated variable (e.g. control valve)
[math]\displaystyle{ w_{x_i} }[/math]: weighting coefficient reflecting the relative importance of [math]\displaystyle{ x_i }[/math]
[math]\displaystyle{ w_{u_i} }[/math]: weighting coefficient penalizing relative big changes in [math]\displaystyle{ u_i }[/math]

etc.

x_i: ith controlled variable (e.g. measured temperature)
r_i: ith reference variable (e.g. required temperature)
u_i: ith manipulated variable (e.g. control valve)
w_{x_i}: weighting coefficient reflecting the relative importance of x_i
w_{u_i}: weighting coefficient penalizing relative big changes in u_i

etc.

x _ i: ith 受控变量(例如:。测量温度) : r _ i: 参考变量(例如:。可以通过操作变量(例如:。权重系数反映了 xi: w { u _ i }的相对重要性: 权重系数惩罚 u _ i 相对较大的变化等。


非线性 MPC

Nonlinear model predictive control, or NMPC, is a variant of model predictive control that is characterized by the use of nonlinear system models in the prediction. As in linear MPC, NMPC requires the iterative solution of optimal control problems on a finite prediction horizon. While these problems are convex in linear MPC, in nonlinear MPC they are not necessarily convex anymore. This poses challenges for both NMPC stability theory and numerical solution.[7]

Nonlinear model predictive control, or NMPC, is a variant of model predictive control that is characterized by the use of nonlinear system models in the prediction. As in linear MPC, NMPC requires the iterative solution of optimal control problems on a finite prediction horizon. While these problems are convex in linear MPC, in nonlinear MPC they are not necessarily convex anymore. This poses challenges for both NMPC stability theory and numerical solution.An excellent overview of the state of the art (in 2008) is given in the proceedings of the two large international workshops on NMPC, by Zheng and Allgower (2000) and by Findeisen, Allgöwer, and Biegler (2006).

非线性模型预估计控制模型,简称 NMPC,是模型预估计控制模型的一个变体,它是拥有属性模型在预测中使用非线性模型的一个变体。和线性 MPC 一样,NMPC 要求在有限的预测范围内迭代求解最优控制问题。这些问题在线性 MPC 中是凸的,而在非线性 MPC 中则不一定是凸的。这对 NMPC 稳定性理论和数值解法都提出了挑战。郑 Allgower (2000)、 Findeisen、 Allgöwer 和 Biegler (2006)在 NMPC 的两个大型国际研讨会上对最新进展(2008年)作了出色的概述。

The numerical solution of the NMPC optimal control problems is typically based on direct optimal control methods using Newton-type optimization schemes, in one of the variants: direct single shooting, direct multiple shooting methods, or direct collocation.[8] NMPC algorithms typically exploit the fact that consecutive optimal control problems are similar to each other. This allows to initialize the Newton-type solution procedure efficiently by a suitably shifted guess from the previously computed optimal solution, saving considerable amounts of computation time. The similarity of subsequent problems is even further exploited by path following algorithms (or "real-time iterations") that never attempt to iterate any optimization problem to convergence, but instead only take a few iterations towards the solution of the most current NMPC problem, before proceeding to the next one, which is suitably initialized; see, e.g.,.[9]

The numerical solution of the NMPC optimal control problems is typically based on direct optimal control methods using Newton-type optimization schemes, in one of the variants: direct single shooting, direct multiple shooting methods, or direct collocation. NMPC algorithms typically exploit the fact that consecutive optimal control problems are similar to each other. This allows to initialize the Newton-type solution procedure efficiently by a suitably shifted guess from the previously computed optimal solution, saving considerable amounts of computation time. The similarity of subsequent problems is even further exploited by path following algorithms (or "real-time iterations") that never attempt to iterate any optimization problem to convergence, but instead only take a few iterations towards the solution of the most current NMPC problem, before proceeding to the next one, which is suitably initialized; see, e.g.,.

NMPC 最优控制问题的数值求解一般采用牛顿型最优化方案的直接最优控制方法,有直接单次打靶法、直接多次打靶法和直接配置法。NMPC 算法通常利用连续最优控制问题彼此相似的事实。这允许有效地初始化牛顿类型的解决方案从以前计算的最优解适当移位的猜测,节省相当数量的计算时间。路径跟踪算法(或称“实时迭代”)进一步利用了后续问题的相似性,这种算法从不尝试迭代任何最佳化问题以达到收敛,而只是在进行下一个适当初始化的 NMPC 问题之前,对当前 NMPC 问题的解决进行几次迭代。

While NMPC applications have in the past been mostly used in the process and chemical industries with comparatively slow sampling rates, NMPC is being increasingly applied, with advancements in controller hardware and computational algorithms, e.g., preconditioning,[10] to applications with high sampling rates, e.g., in the automotive industry, or even when the states are distributed in space (Distributed parameter systems).[11] As an application in aerospace, recently, NMPC has been used to track optimal terrain-following/avoidance trajectories in real-time.[12]

While NMPC applications have in the past been mostly used in the process and chemical industries with comparatively slow sampling rates, NMPC is being increasingly applied, with advancements in controller hardware and computational algorithms, e.g., preconditioning, to applications with high sampling rates, e.g., in the automotive industry, or even when the states are distributed in space (Distributed parameter systems). As an application in aerospace, recently, NMPC has been used to track optimal terrain-following/avoidance trajectories in real-time.

尽管 NMPC 应用过去主要用于采样率相对较低的过程和化工行业,但随着控制器硬件和计算算法(如预处理)的进步,NMPC 正越来越多地应用于采样率较高的应用,如汽车工业,甚至状态分布在空间(分布参数系统)中。作为航空航天领域的一个应用,近年来 NMPC 已经被用于实时跟踪最优的地形跟踪/回避弹道。

Explicit MPC

Explicit MPC (eMPC) allows fast evaluation of the control law for some systems, in stark contrast to the online MPC. Explicit MPC is based on the parametric programming technique, where the solution to the MPC control problem formulated as optimization problem is pre-computed offline.[13] This offline solution, i.e., the control law, is often in the form of a piecewise affine function (PWA), hence the eMPC controller stores the coefficients of the PWA for each a subset (control region) of the state space, where the PWA is constant, as well as coefficients of some parametric representations of all the regions. Every region turns out to geometrically be a convex polytope for linear MPC, commonly parameterized by coefficients for its faces, requiring quantization accuracy analysis.[14] Obtaining the optimal control action is then reduced to first determining the region containing the current state and second a mere evaluation of PWA using the PWA coefficients stored for all regions. If the total number of the regions is small, the implementation of the eMPC does not require significant computational resources (compared to the online MPC) and is uniquely suited to control systems with fast dynamics.[15] A serious drawback of eMPC is exponential growth of the total number of the control regions with respect to some key parameters of the controlled system, e.g., the number of states, thus dramatically increasing controller memory requirements and making the first step of PWA evaluation, i.e. searching for the current control region, computationally expensive.

Explicit MPC (eMPC) allows fast evaluation of the control law for some systems, in stark contrast to the online MPC. Explicit MPC is based on the parametric programming technique, where the solution to the MPC control problem formulated as optimization problem is pre-computed offline. This offline solution, i.e., the control law, is often in the form of a piecewise affine function (PWA), hence the eMPC controller stores the coefficients of the PWA for each a subset (control region) of the state space, where the PWA is constant, as well as coefficients of some parametric representations of all the regions. Every region turns out to geometrically be a convex polytope for linear MPC, commonly parameterized by coefficients for its faces, requiring quantization accuracy analysis. Obtaining the optimal control action is then reduced to first determining the region containing the current state and second a mere evaluation of PWA using the PWA coefficients stored for all regions. If the total number of the regions is small, the implementation of the eMPC does not require significant computational resources (compared to the online MPC) and is uniquely suited to control systems with fast dynamics. A serious drawback of eMPC is exponential growth of the total number of the control regions with respect to some key parameters of the controlled system, e.g., the number of states, thus dramatically increasing controller memory requirements and making the first step of PWA evaluation, i.e. searching for the current control region, computationally expensive.

显式 MPC

显式 MPC (eMPC)允许对某些系统的控制律进行快速评估,这与在线 MPC 形成鲜明对比。显式 MPC 是基于参数化编程技术,其中 MPC 控制问题的解决方案制定为最佳化问题预计算离线。这种离线解决方案,也就是控制律,通常采用分段仿射函数(PWA)的形式,因此 eMPC 控制器为状态空间的每个子集(控制区域)存储 PWA 的系数,其中 PWA 是常量,以及所有区域的某些参数表示的系数。结果表明,每个区域几何上是线性 MPC 的凸多面体,通常用其面的系数来参数化,需要进行量化精度分析。然后将获得的最优控制动作简化为首先确定包含当前状态的区域,然后使用存储的所有区域的 PWA 系数对 PWA 进行单纯的评估。如果区域的总数很小,则 eMPC 的实现不需要大量的计算资源(与在线 MPC 相比) ,并且特别适合于具有快速动态的控制系统。eMPC 的一个严重缺点是,相对于被控系统的一些关键参数来说,控制区域的总数是指数增长的,例如,状态的数量,因此大大增加了控制器的内存需求,从而使得 PWA 评估的第一步,即。搜索当前控制区域,计算开销很大。

鲁棒的 MPC

Robust variants of model predictive control are able to account for set bounded disturbance while still ensuring state constraints are met. Some of the main approaches to robust MPC are given below.

Robust variants of model predictive control are able to account for set bounded disturbance while still ensuring state constraints are met. Some of the main approaches to robust MPC are given below.

鲁棒的模型预估计控制变量能够在保证满足状态约束的情况下考虑集合有界扰动。一些主要的方法,以强大的货币政策委员会给出如下。

  • Min-max MPC. In this formulation, the optimization is performed with respect to all possible evolutions of the disturbance.[16] This is the optimal solution to linear robust control problems, however it carries a high computational cost. The basic idea behind the min/max MPC approach is to modify the on-line "min" optimization to a "min-max" problem, minimizing the worst case of the objective function, maximized over all possible plants from the uncertainty set.[17]
  • Constraint Tightening MPC. Here the state constraints are enlarged by a given margin so that a trajectory can be guaranteed to be found under any evolution of disturbance.[18]
  • Tube MPC. This uses an independent nominal model of the system, and uses a feedback controller to ensure the actual state converges to the nominal state.[19] The amount of separation required from the state constraints is determined by the robust positively invariant (RPI) set, which is the set of all possible state deviations that may be introduced by disturbance with the feedback controller.
  • Multi-stage MPC. This uses a scenario-tree formulation by approximating the uncertainty space with a set of samples and the approach is non-conservative because it takes into account that the measurement information is available at every time stage in the prediction and the decisions at every stage can be different and can act as recourse to counteract the effects of uncertainties. The drawback of the approach however is that the size of the problem grows exponentially with the number of uncertainties and the prediction horizon.[20][21]
  • Tube-enhanced multi-stage MPC. This approach synergizes multi-stage MPC and tube-based MPC. It provides high degrees of freedom to choose the desired trade-off between optimality and simplicity by the classification of uncertainties and the choice of control laws in the predictions.[22][23]
  • Min-max MPC. In this formulation, the optimization is performed with respect to all possible evolutions of the disturbance. This is the optimal solution to linear robust control problems, however it carries a high computational cost. The basic idea behind the min/max MPC approach is to modify the on-line "min" optimization to a "min-max" problem, minimizing the worst case of the objective function, maximized over all possible plants from the uncertainty set.
  • Constraint Tightening MPC. Here the state constraints are enlarged by a given margin so that a trajectory can be guaranteed to be found under any evolution of disturbance.
  • Tube MPC. This uses an independent nominal model of the system, and uses a feedback controller to ensure the actual state converges to the nominal state. The amount of separation required from the state constraints is determined by the robust positively invariant (RPI) set, which is the set of all possible state deviations that may be introduced by disturbance with the feedback controller.
  • Multi-stage MPC. This uses a scenario-tree formulation by approximating the uncertainty space with a set of samples and the approach is non-conservative because it takes into account that the measurement information is available at every time stage in the prediction and the decisions at every stage can be different and can act as recourse to counteract the effects of uncertainties. The drawback of the approach however is that the size of the problem grows exponentially with the number of uncertainties and the prediction horizon.
  • Tube-enhanced multi-stage MPC. This approach synergizes multi-stage MPC and tube-based MPC. It provides high degrees of freedom to choose the desired trade-off between optimality and simplicity by the classification of uncertainties and the choice of control laws in the predictions.


  • 最低最高货币供应量。在这个公式中,优化是针对所有可能的扰动演化而进行的。这是线性鲁棒控制问题的最优解,但其计算成本较高。最小/最大 MPC 方法的基本思想是将在线“最小”优化问题转化为“最小-最大”优化问题,使目标函数的最坏情况最小化,使不确定集合中所有可能的对象最大化。
  • 限制收紧货币政策委员会。在这里,状态约束由给定的边界扩大,以保证在任何扰动演化下都能找到轨迹。
  • Tube MPC.这使用一个独立的系统名义模型,并使用一个反馈控制器,以确保实际状态收敛到名义状态。所需的从状态约束的分离量由鲁棒正不变量集确定,它是反馈控制器可能引入的所有可能的状态偏差集合。
  • 多阶段预算编制。这种方法采用情景树方法,用一组样本逼近不确定性空间,这种方法是非保守的,因为它考虑到在预测的每个时间阶段都有测量信息,每个阶段的决定可以是不同的,可以作为补救手段来抵消不确定性的影响。然而,这种方法的缺点是,问题的规模随着不确定性的数量和预测的时间范围呈指数增长。
  • 管增强型多级 MPC。这种方法协同多阶段 MPC 和基于管的 MPC。它通过对不确定性的分类和预测中控制律的选择,提供了在最优性和简单性之间进行权衡的高度自由度。


= 商用 MPC 软件

Commercial MPC packages are available and typically contain tools for model identification and analysis, controller design and tuning, as well as controller performance evaluation.

Commercial MPC packages are available and typically contain tools for model identification and analysis, controller design and tuning, as well as controller performance evaluation.

商业 MPC 包是可用的,通常包含用于模型辨识和分析、控制器设计和调整以及控制器性能评估的工具。

A survey of commercially available packages has been provided by S.J. Qin and T.A. Badgwell in Control Engineering Practice 11 (2003) 733–764.

A survey of commercially available packages has been provided by S.J. Qin and T.A. Badgwell in Control Engineering Practice 11 (2003) 733–764.

调查的商业可用包已提供了由 s.j。秦氏与 t.a。控制工程实践11(2003)733-764。


= 开源代码示例

有各种实现的 Python 库可以在这里找到:

https://github.com/AtsushiSakai/PyAdvancedControl


  1 def main():
  2     # Define x0 -a [1x4] array and then transpose it to be a [4x1]
  3     x0 = np.array([[0.0, 0.0, 0.0, 0.0]]).T  # [x,y,v theta]
  4     # Print x0. It's our initial state- [xPos, yPos, Velocity and Angle in radians w.r.t +yPos]
  5     # Customise this as an input to see how different initial trajectories converge to the optimised path
  6     #
  7     print(x0)
  8     x = x0
  9 
 10 <syntaxhighlight lang="python" line="1">
 11 def main():
 12     # Define x0 -a [1x4] array and then transpose it to be a [4x1]
 13     x0 = np.array(0.0, 0.0, 0.0, 0.0).T  # [x,y,v theta]
 14     # Print x0. It's our initial state- [xPos, yPos, Velocity and Angle in radians w.r.t +yPos]
 15     # Customise this as an input to see how different initial trajectories converge to the optimised path
 16     #
 17     print(x0)
 18     x = x0
 19 
 20 < syntaxhighlight lang = " python" line = " 1" > def main () : # Define x0-a [1x4] array and then transpose it to be a [4x1] x0 = np.array (0.0,0.0,0.0,0.0,0.0).T # [ x,y,v theta ] # Print x0.这是我们的初始状态——[ xPos,yPos,Velocity and Angle in radians w.r.t + yPos ] # 定制这个作为输入,看看不同的初始轨迹如何收敛到最优路径 # print (x0) x = x0
 21 
 22     # Define Input - [2x1] array
 23     # x0 - [accelerator, steering_wheel_rate]
 24     u = np.array([[0.0, 0.0]]).T  # [a,beta]
 25     plt.figure(num=None, figsize=(12, 12))
 26 
 27     # Define Input - [2x1] array
 28     # x0 - [accelerator, steering_wheel_rate]
 29     u = np.array(0.0, 0.0).T  # [a,beta]
 30     plt.figure(num=None, figsize=(12, 12))
 31 
 32 # Define Input-[2x1] array # x0-[ accelerator,steering _ wheel _ rate ] u = np.array (0.0,0.0).T # [ a,beta ] plt.figure (num = None,figsize = (12,12))
 33 
 34     mincost = 100000
 35 
 36     mincost = 100000
 37 
 38 100000
 39 
 40     for i in range(1000):
 41         A, B, C = LinealizeCarModel(x, u, dt, lr)
 42         ustar, xstar, cost = CalcInput(A, B, C, x, u)
 43 
 44     for i in range(1000):
 45         A, B, C = LinealizeCarModel(x, u, dt, lr)
 46         ustar, xstar, cost = CalcInput(A, B, C, x, u)
 47 
 48     for i in range(1000):
 49         A, B, C = LinealizeCarModel(x, u, dt, lr)
 50         ustar, xstar, cost = CalcInput(A, B, C, x, u)
 51 
 52         u[0, 0] = GetListFromMatrix(ustar.value[0, :])[0]
 53         u[1, 0] = float(ustar[1, 0].value)
 54 
 55         u[0, 0] = GetListFromMatrix(ustar.value[0, :])[0]
 56         u[1, 0] = float(ustar[1, 0].value)
 57 
 58 U [0,0] = GetListFromMatrix (ustar.value [0: ])[0] u [1,0] = float (ustar [1,0] . value)
 59 
 60         x = A @ x + B @ u
 61 
 62         x = A @ x + B @ u
 63 
 64 X = a@x + b@u
 65 
 66         plt.subplot(3, 1, 1)
 67         plt.plot(target[0], target[1], "xb")
 68         plt.plot(x[0], x[1], ".r")
 69         plt.plot(GetListFromMatrix(xstar.value[0, :]), GetListFromMatrix(
 70             xstar.value[1, :]), "-b")
 71         plt.axis("equal")
 72         plt.xlabel("x[m]")
 73         plt.ylabel("y[m]")
 74         plt.grid(True)
 75 
 76         plt.subplot(3, 1, 1)
 77         plt.plot(target[0], target[1], "xb")
 78         plt.plot(x[0], x[1], ".r")
 79         plt.plot(GetListFromMatrix(xstar.value[0, :]), GetListFromMatrix(
 80             xstar.value[1, :]), "-b")
 81         plt.axis("equal")
 82         plt.xlabel("x[m]")
 83         plt.ylabel("y[m]")
 84         plt.grid(True)
 85 
 86         plt.subplot(3, 1, 1)
 87         plt.plot(target[0], target[1], "xb")
 88         plt.plot(x[0], x[1], ".r")
 89         plt.plot(GetListFromMatrix(xstar.value[0, :]), GetListFromMatrix(
 90             xstar.value[1, :]), "-b")
 91         plt.axis("equal")
 92         plt.xlabel("x[m]")
 93         plt.ylabel("y[m]")
 94         plt.grid(True)
 95 
 96         plt.subplot(3, 1, 2)
 97         plt.cla()
 98         plt.plot(GetListFromMatrix(xstar.value[2, :]), "-b")
 99         plt.plot(GetListFromMatrix(xstar.value[3, :]), "-r")
100         plt.ylim([-1.0, 1.0])
101         plt.ylabel("velocity[m/s]")
102         plt.xlabel("horizon")
103         plt.grid(True)
104 
105         plt.subplot(3, 1, 2)
106         plt.cla()
107         plt.plot(GetListFromMatrix(xstar.value[2, :]), "-b")
108         plt.plot(GetListFromMatrix(xstar.value[3, :]), "-r")
109         plt.ylim([-1.0, 1.0])
110         plt.ylabel("velocity[m/s]")
111         plt.xlabel("horizon")
112         plt.grid(True)
113 
114         plt.subplot(3, 1, 2)
115         plt.cla()
116         plt.plot(GetListFromMatrix(xstar.value[2, :]), "-b")
117         plt.plot(GetListFromMatrix(xstar.value[3, :]), "-r")
118         plt.ylim([-1.0, 1.0])
119         plt.ylabel("velocity[m/s]")
120         plt.xlabel("horizon")
121         plt.grid(True)
122 
123         plt.subplot(3, 1, 3)
124         plt.cla()
125         plt.plot(GetListFromMatrix(ustar.value[0, :]), "-r", label="a")
126         plt.plot(GetListFromMatrix(ustar.value[1, :]), "-b", label="b")
127         plt.ylim([-0.5, 0.5])
128         plt.legend()
129         plt.grid(True)
130 
131         plt.subplot(3, 1, 3)
132         plt.cla()
133         plt.plot(GetListFromMatrix(ustar.value[0, :]), "-r", label="a")
134         plt.plot(GetListFromMatrix(ustar.value[1, :]), "-b", label="b")
135         plt.ylim([-0.5, 0.5])
136         plt.legend()
137         plt.grid(True)
138 
139 Plt.subplot (3,1,3) plt.cla () plt.plot (GetListFromMatrix (ustar.value [0: ]) ,-r”,label =  a) plt.plot (GetListFromMatrix (ustar.value [1: ]) ,-b”,label =  bplt.ylim ([-0.5,0.5]) plt.legend (plt.grid (True)
140 
141         #  plt.pause(0.0001)
142 
143         #  plt.pause(0.0001)
144 
145 # plt.pause (0.0001)
146 
147         #  raw_input()
148 
149         #  raw_input()
150 
151 # raw _ input ()
152 
153         # check goal
154         dis = np.linalg.norm([x[0] - target[0], x[1] - target[1]])
155         if dis < 0.1:
156             print("Goal")
157             break
       # check goal
       dis = np.linalg.norm([x[0] - target[0], x[1] - target[1]])
       if dis < 0.1:
           print("Goal")
           break

</syntaxhighlight>

       # check goal
       dis = np.linalg.norm([x[0] - target[0], x[1] - target[1]])
       if dis < 0.1:
           print("Goal")
           break

</syntaxhighlight>

MPC vs. LQR

Model predictive control and linear-quadratic regulators are both expressions of optimal control, with different schemes of setting up optimisation costs.

Model predictive control and linear-quadratic regulators are both expressions of optimal control, with different schemes of setting up optimisation costs.

= MPC vs. LQR = 模型预估计控制和线性二次型调节器都是最优控制的表达式,具有不同的设置最优成本的方案。

While a model predictive controller often looks at fixed length, often graduatingly weighted sets of error functions, the linear-quadratic regulator looks at all linear system inputs and provides the transfer function that will reduce the total error across the frequency spectrum, trading off state error against input frequency.

While a model predictive controller often looks at fixed length, often graduatingly weighted sets of error functions, the linear-quadratic regulator looks at all linear system inputs and provides the transfer function that will reduce the total error across the frequency spectrum, trading off state error against input frequency.

虽然模型预测控制器通常看起来是固定长度的,通常是逐步加权的误差函数集,线性二次型调节器看起来是所有线性系统的输入,并提供传递函数,将减少整个频谱的总误差,交换状态误差与输入频率。

Due to these fundamental differences, LQR has better global stability properties, but MPC often has more locally optimal[?] and complex performance.

Due to these fundamental differences, LQR has better global stability properties, but MPC often has more locally optimal[?] and complex performance.

由于这些基本的差异,LQR 具有更好的全局稳定性,但 MPC 通常具有更多的局部最优[ ? ]和复杂的性能。

The main differences between MPC and LQR are that LQR optimizes across the entire time window (horizon) whereas MPC optimizes in a receding time window,[4] and that with MPC a new solution is computed often whereas LQR uses the same single (optimal) solution for the whole time horizon. Therefore, MPC typically solves the optimization problem in a smaller time window than the whole horizon and hence may obtain a suboptimal solution. However, because MPC makes no assumptions about linearity, it can handle hard constraints as well as migration of a nonlinear system away from its linearized operating point, both of which are major drawbacks to LQR.

The main differences between MPC and LQR are that LQR optimizes across the entire time window (horizon) whereas MPC optimizes in a receding time window, and that with MPC a new solution is computed often whereas LQR uses the same single (optimal) solution for the whole time horizon. Therefore, MPC typically solves the optimization problem in a smaller time window than the whole horizon and hence may obtain a suboptimal solution. However, because MPC makes no assumptions about linearity, it can handle hard constraints as well as migration of a nonlinear system away from its linearized operating point, both of which are major drawbacks to LQR.

MPC 和 LQR 的主要区别在于 LQR 优化了整个时间窗口,MPC 优化了滚动时间窗口,MPC 优化了一个新的解,而 LQR 对整个时间窗口使用了相同的单一(最优)解。因此,MPC 通常在比整个时间范围更短的时间内解决最佳化问题问题,因此可能得到一个次优解。然而,由于 MPC 没有对线性进行任何假设,它可以处理硬约束,以及从线性化操作点迁移非线性,这两者都是 LQR 的主要缺点。

This means that LQR can become weak when operating away from stable fixed points. MPC can chart a path between these fixed points, but convergence of a solution is not guaranteed, especially if thought as to the convexity and complexity of the problem space has been neglected.

This means that LQR can become weak when operating away from stable fixed points. MPC can chart a path between these fixed points, but convergence of a solution is not guaranteed, especially if thought as to the convexity and complexity of the problem space has been neglected.

这意味着 LQR 在离开稳定的固定点运行时会变得很弱。MPC 可以在这些不动点之间绘制一条路径,但不能保证解的收敛性,特别是如果忽略了问题空间的凸性和复杂性。

= 参见 =

  • Control engineering
  • Control theory
  • Feed-forward
  • System identification


  • 控制工程
  • 控制理论
  • 前馈
  • 系统辨识


= 参考文献 =

  1. Michèle Arnold, Göran Andersson. "Model Predictive Control of energy storage including uncertain forecasts" https://www.pscc-central.org/uploads/tx_ethpublications/fp292.pdf
  2. Tobias Geyer: Model predictive control of high power converters and industrial drives, Wiley, London, , Nov. 2016.
  3. Vichik, Sergey; Borrelli, Francesco (2014). "Solving linear and quadratic programs with an analog circuit". Computers & Chemical Engineering. 70: 160–171. doi:10.1016/j.compchemeng.2014.01.011.
  4. 4.0 4.1 Wang, Liuping (2009). Model Predictive Control System Design and Implementation Using MATLAB®. Springer Science & Business Media. pp. xii. 
  5. Al-Gherwi, Walid; Budman, Hector; Elkamel, Ali (3 July 2012). "A robust distributed model predictive control based on a dual-mode approach". Computers and Chemical Engineering. 50 (2013): 130–138. doi:10.1016/j.compchemeng.2012.11.002.
  6. Michael Nikolaou, Model predictive controllers: A critical synthesis of theory and industrial needs, Advances in Chemical Engineering, Academic Press, 2001, Volume 26, Pages 131-204
  7. An excellent overview of the state of the art (in 2008) is given in the proceedings of the two large international workshops on NMPC, by Zheng and Allgower (2000) and by Findeisen, Allgöwer, and Biegler (2006).
  8. J.D. Hedengren; R. Asgharzadeh Shishavan; K.M. Powell; T.F. Edgar (2014). "Nonlinear modeling, estimation and predictive control in APMonitor". Computers & Chemical Engineering. 70 (5): 133–148. doi:10.1016/j.compchemeng.2014.04.013.
  9. Ohtsuka, Toshiyuki (2004). "A continuation/GMRES method for fast computation of nonlinear receding horizon control". Automatica. 40 (4): 563–574. doi:10.1016/j.automatica.2003.11.005.
  10. Knyazev, Andrew; Malyshev, Alexander (2016). "Sparse preconditioning for model predictive control". 2016 American Control Conference (ACC). pp. 4494–4499. arXiv:1512.00375. doi:10.1109/ACC.2016.7526060. ISBN 978-1-4673-8682-1. 
  11. M.R. García; C. Vilas; L.O. Santos; A.A. Alonso (2012). "A Robust Multi-Model Predictive Controller for Distributed Parameter Systems" (PDF). Journal of Process Control. 22 (1): 60–71. doi:10.1016/j.jprocont.2011.10.008.
  12. R. Kamyar; E. Taheri (2014). "Aircraft Optimal Terrain/Threat-Based Trajectory Planning and Control". Journal of Guidance, Control, and Dynamics. 37 (2): 466–483. Bibcode:2014JGCD...37..466K. doi:10.2514/1.61339.
  13. Bemporad, Alberto; Morari, Manfred; Dua, Vivek; Pistikopoulos, Efstratios N. (2002). "The explicit linear quadratic regulator for constrained systems". Automatica. 38 (1): 3–20. doi:10.1016/s0005-1098(01)00174-1.
  14. Knyazev, Andrew; Zhu, Peizhen; Di Cairano, Stefano (2015). "Explicit model predictive control accuracy analysis". 2015 54th IEEE Conference on Decision and Control (CDC). pp. 2389–2394. arXiv:1509.02840. Bibcode 2015arXiv150902840K. doi:10.1109/CDC.2015.7402565. ISBN 978-1-4799-7886-1. 
  15. Klaučo, Martin; Kalúz, Martin; Kvasnica, Michal (2017). "Real-time implementation of an explicit MPC-based reference governor for control of a magnetic levitation system". Control Engineering Practice. 60: 99–105. doi:10.1016/j.conengprac.2017.01.001.
  16. Scokaert, P.O.M.; Mayne, D.Q. (1998). "Min-max feedback model predictive control for constrained linear systems". IEEE Transactions on Automatic Control. 43 (8): 1136–1142. doi:10.1109/9.704989.
  17. "Robustness of MPC-Based Schemes for Constrained Control of Nonlinear Systems". IFAC Proceedings Volumes (in English). 29 (1): 5823–5828. 1996-06-01. doi:10.1016/S1474-6670(17)58612-7. ISSN 1474-6670.
  18. Richards, A.; How, J. (2006). "Robust stable model predictive control with constraint tightening". Proceedings of the American Control Conference.
  19. Langson, W.; I. Chryssochoos; S.V. Rakovic; D.Q. Mayne (2004). "Robust model predictive control using tubes". Automatica. 40 (1): 125–133. doi:10.1016/j.automatica.2003.08.009.
  20. Lucia, Sergio; Finkler, Tiago; Engell, Sebastian (2013). "Multi-stage nonlinear model predictive control applied to a semi-batch polymerization reactor under uncertainty". Journal of Process Control. 23 (9): 1306–1319. doi:10.1016/j.jprocont.2013.08.008.
  21. Lucia, S; Subramanian, S; Limon, D; Engell, S (2020). "Stability properties of multi-stage nonlinear model predictive control". Systems & Control Letters. 143 (9): 104743. doi:10.1016/j.sysconle.2020.104743.
  22. Subramanian, S; Lucia, S; Paulen, R; Engell, S (2021). "Tube-enhanced multi-stage model predictive control for flexible robust control of constrained linear systems". International Journal of Robust and Nonlinear Control. 31 (9): 4458–4487. arXiv:2012.14848. doi:10.1002/rnc.5486.
  23. Subramanian, S; Abdelsalam, Y; Lucia, S; Engell, S (2022). "Robust Tube-Enhanced Multi-Stage NMPC With Stability Guarantees". IEEE Control Systems Letters. 6: 1112–1117. doi:10.1109/LCSYS.2021.3089502.


= 进一步阅读 =