模型预测控制(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 = 100000

    for 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 @ u

        plt.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 goal
        dis = 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.icon-default.png?t=M85Bhttps://ww2.mathworks.cn/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.icon-default.png?t=M85Bhttps://ww2.mathworks.cn/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).icon-default.png?t=M85Bhttps://ww2.mathworks.cn/help/mpc/ref/mpccontroller.html?searchHighlight=MPC&s_tid=srchtitle_MPC_3

Model Predictive Control:Theory, Computation, and Design,2nd Edition. James B. Rawlings, David Q. Mayne, Moritz M. Diehl. Chapter 1 is introductory. It is intended for graduate students in engineering who have not yet had a systems course. But it serves a second purpose for those who have already taken the first graduate systems course. It derives all the results of the linear quadratic regulator and optimal Kalman filter using only those arguments that extend to the nonlinear and constrained cases to be covered in the later chapters. Instructors may find that this tailored treatment of the introductory systems material serves both as a review and a preview of arguments to come in the later chapters. Chapters 2-4 are foundational and should probably be covered in any graduate level MPC course. Chapter 2 covers regulation to the origin for nonlinear and constrained systems. This material presents in a unified fashion many of the major research advances in MPC that took place during the last 20 years. It also includes more recent topics such as regulation to an unreachable setpoint that are only now appearing in the research literature. Chapter 3 addresses MPC design for robustness, with a focus on MPC using tubes or bundles of trajectories in place of the single nominal trajectory. This chapter again unifies a large body of research literature concerned with robust MPC. Chapter 4 covers state estimation with an emphasis on moving horizon estimation, but also covers extended and unscented Kalman filtering, and particle filtering. Chapters 5-7 present more specialized topics. Chapter 5 addressesthe special requirements of MPC based on output measurement instead of state measurement. Chapter 6 discusses how to design distributed MPC controllers for large-scale systems that are decomposed into many smaller, interacting subsystems. Chapter 7 covers the explicit optimal control of constrained linear systems. The choice of coverage of these three chapters may vary depending on the instructor's or student's own research interests. Three appendices are included, again, so that the reader is not sent off to search a large research literature for the fundamental arguments used in the text. Appendix A covers the required mathematical background. Appendix B summarizes the results used for stability analysis including the various types of stability and Lyapunov function theory. Since MPC is an optimization-based controller, Appendix C covers the relevant results from optimization theory.
### 如何解决未授权的Photoshop应用程序被禁用问题 当遇到未授权的Adobe Photoshop应用程序被禁用的情况时,可以采取特定措施来解决问题。一种常见的临时解决方案涉及调整系统的防火墙设置以阻止Photoshop访问网络验证服务器[^4]。 #### 修改Windows Defender防火墙设置 为了防止Photoshop因无法通过激活验证而被禁用,可以通过创建一个新的出站规则来阻止其尝试连接到互联网: 1. 右键点击【此电脑】→【属性】,随后在弹出的窗口中点击左上角的【控制面板主页】。 2. 在【控制面板】窗口选择并点击【Windows Defender 防火墙】-【高级设置】。 3. 在【高级安全Windows Defender防火墙】界面左上角点击【出站规则】,之后在新页面右上角点击【新建规则】按钮。 4. 默认选择【程序】选项并继续点击【下一步】。 5. 点击【浏览】并在新窗口中定位至Photoshop安装路径,选中【Photoshop.exe】文件后点击【打开】。 6. 返回【新建出站规则向导】窗口确认所选程序无误后点击【下一步】。 7. 选择【阻止连接】作为操作方式再连续两次点击【下一步】。 8. 给这条规则起个名字最后点击【完成】结束配置过程。 这一步骤能够有效避免由于缺少有效的许可证而导致的应用程序停用现象发生。不过需要注意的是这种方法仅适用于短期应急处理,并不推荐长期使用未经许可的产品副本。 ### 获取正版Adobe应用的方法 对于希望合法合规地使用Adobe产品的用户来说,最直接的方式是从官方渠道购买订阅服务。Adobe提供了多种订购计划供个人或企业客户按需选购,包括但不限于月度、年度以及团队套餐等形式。此外还有教育机构专享折扣可供符合条件的学生和教职员工申请享受优惠价格。 一旦成功注册成为付费会员,则可以在Creative Cloud平台上下载最新版本的全部创意套件组件,其中包括完整的Photoshop功能集以及其他诸如Illustrator、InDesign等专业级创作工具。同时还将获得云存储空间支持及其他增值服务项目。 ```bash # 访问Adobe官方网站了解更多信息 https://www.adobe.com/cn/creativecloud/plans.html ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值