2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > 模型预测控制(Model predictive control MPC)

模型预测控制(Model predictive control MPC)

时间:2019-01-08 11:00:01

相关推荐

模型预测控制(Model predictive control MPC)

模型预测控制(MPC) 是一种先进的过程控制方法,用于在满足一组约束条件的同时控制过程。自 1980 年代以来,它一直在化工厂和炼油厂的加工工业中使用。近年来,它还被用于电力系统平衡模型[1]和电力电子学中。[2]模型预测控制器依赖于过程的动态模型,通常是通过系统识别获得的线性经验模型.MPC 的主要优势在于它允许优化当前时隙,同时考虑未来时隙。这是通过优化有限时间范围来实现的,但仅实现当前时隙,然后再次反复优化,因此与线性二次调节器 (LQR) 不同。MPC 还具有预测未来事件的能力,并可以相应地采取控制措施。PID控制器不具备这种预测能力。MPC 几乎普遍作为数字控制实现,尽管有研究通过专门设计的模拟电路实现更快的响应时间。[3]

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

MPC 与 LQR

模型预测控制和线性二次调节器都是最优控制的表达,具有不同的设置优化成本的方案。

模型预测控制器通常着眼于固定长度、通常逐渐加权的误差函数集,而线性二次调节器则着眼于所有线性系统输入并提供传递函数,该传递函数将减少整个频谱的总误差,权衡状态误差针对输入频率。

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

MPC 和LQR之间的主要区别在于LQR 在整个时间窗口(水平)上进行优化,而 MPC 在后退时间窗口中进行优化,[4]并且使用 MPC 经常计算新的解决方案,而 LQR 使用相同的单个(最佳)整个时间范围的解决方案。因此,MPC 通常在比整个范围更小的时间窗口内解决优化问题,因此可能会获得次优解决方案。然而,由于 MPC 不对线性度做任何假设,它可以处理硬约束以及非线性系统从其线性化操作点的迁移,这两者都是 LQR 的主要缺点。

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

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]]).T # [x,y,v theta]# Print x0. It's our initial state- [xPos, yPos, Velocity and Angle in radians w.r.t +yPos]# Customise this as an input to see how different initial trajectories converge to the optimised path#print(x0)x = x0# Define Input - [2x1] array# u - [accelerator, steering_wheel_rate]u = np.array([[0.0, 0.0]]).T # [a,beta]plt.figure(num=None, figsize=(12, 12))mincost = 100000for i in range(1000):A, B, C = LinealizeCarModel(x, u, dt, lr)ustar, xstar, cost = CalcInput(A, B, C, x, u)u[0, 0] = GetListFromMatrix(ustar.value[0, :])[0]u[1, 0] = float(ustar[1, 0].value)x = A @ x + B @ uplt.subplot(3, 1, 1)plt.plot(target[0], target[1], "xb")plt.plot(x[0], x[1], ".r")plt.plot(GetListFromMatrix(xstar.value[0, :]), GetListFromMatrix(xstar.value[1, :]), "-b")plt.axis("equal")plt.xlabel("x[m]")plt.ylabel("y[m]")plt.grid(True)plt.subplot(3, 1, 2)plt.cla()plt.plot(GetListFromMatrix(xstar.value[2, :]), "-b")plt.plot(GetListFromMatrix(xstar.value[3, :]), "-r")plt.ylim([-1.0, 1.0])plt.ylabel("velocity[m/s]")plt.xlabel("horizon")plt.grid(True)plt.subplot(3, 1, 3)plt.cla()plt.plot(GetListFromMatrix(ustar.value[0, :]), "-r", label="a")plt.plot(GetListFromMatrix(ustar.value[1, :]), "-b", label="b")plt.ylim([-0.5, 0.5])plt.legend()plt.grid(True)# plt.pause(0.0001)# raw_input()# check goaldis = np.linalg.norm([x[0] - target[0], x[1] - target[1]])if dis < 0.1:print("Goal")break

Model predictive controller - MATLAB- MathWorks 中国A model predictive controller uses linear plant, disturbance, and noise models to estimate the controller state and predict future plant outputs./help/mpc/ref/mpc.html?searchHighlight=MPC&s_tid=srchtitle_MPC_1

Design and simulate model predictive controllers - MATLAB- MathWorks 中国The MPC Designer app lets you design and simulate model predictive controllers in MATLAB and Simulink./help/mpc/ref/mpcdesigner-app.html?searchHighlight=MPC&s_tid=srchtitle_MPC_2

Simulate model predictive controller - Simulink- MathWorks 中国The MPC Controller block receives the current measured output signal (mo), reference signal (ref), and optional measured disturbance signal (md)./help/mpc/ref/mpccontroller.html?searchHighlight=MPC&s_tid=srchtitle_MPC_3

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。