主要内容

Tune Weights

A model predictive controller design usually requires some tuning of the cost function weights. This topic provides tuning tips. See优化问题有关成本函数方程的详细信息。

在itial Tuning

  • Before tuning the cost function weights, specify scale factors for each plant input and output variable. Hold these scale factors constant as you tune the controller. See指定比例因子了解更多信息。

  • 在调谐期间,使用灵敏度审查命令获取诊断反馈。这灵敏度命令旨在帮助成本函数权重选择。

  • 通过设置相应的控制器属性更改重量,如下所示:

    改变这个重量 设置此控制器属性 Array size
    OV参考跟踪(wy) 掌权 p-经过-ny
    MV参考跟踪(wu) 重量.mv. p-经过-nu
    MV increment suppression (wΔU.) 重量.mv.Rate p-经过-nu

Here, MV is a plant manipulated variable, andnuis the number of MVs. OV is a plant output variable, andny是Ovs的数量。最后,p是预测地平线中的步数。

如果a weight array containsn<p行,控制器重复最后一行以获取完整的数组p行。默认值(n= 1)最大限度地减少要调整的参数数量,因此建议使用。看时变权重和约束for an alternative.

设定OV权重的提示

  • 考虑到nyOVs, suppose thatnyc.must be held at or near a reference value (setpoint). If theith OV is not in this group, set权重(:,i)= 0.

  • 如果nunyc., it is usually possible to achieve zero OV tracking error at steady state, if at leastnyc.MVS不受限制。默认值掌权= ones(1,ny)is a good starting point in this case.

    如果nu>nyc.但是,您的自由程度多。除非您采取预防措施,否则MV也可能在OVS接近其参考值时漂移。

    • 最常见的预防措施是为您拥有的多余MV的数量定义参考值(目标),nunyc.。这样的目标可以代表经济或中欧ically desirable steady-state values.

    • 替代措施是设置wΔU.> 0 for at leastnu- N.yc.MV可以阻止控制器更改它们。

  • 如果nu<nyc., you do not have enough degrees of freedom to keep all required OVs at a setpoint. In this case, consider prioritizing reference tracking. To do so, set权重(:,i)> 0指定优先级iov。粗略的指导方针如下:

    • 0.05 — Low priority: Large tracking error acceptable

    • 0.2 — Below-average priority

    • 1 — Average priority – the default. Use this value ifnyc.= 1。

    • 5 — Above average priority

    • 20 — High priority: Small tracking error desired

设置MV重量的提示

默认,权重=零(1,nu)。如果some MVs have targets, the corresponding MV reference tracking weights must be nonzero. Otherwise, the targets are ignored. If the number of MV targets is less than (nunyc.),尝试使用相同的权重。建议的值为0.2,与平均水平的OV跟踪相同。该值允许MV暂时远离目标以改善OV跟踪。

Otherwise, the MV and OV reference tracking goals are likely to conflict. Prioritize by setting the重量.mv.(:,i)以类似于该建议的方式的价值掌权(see above). Typical practice sets the average MV tracking priority lower than the average OV tracking priority (e.g., 0.2 < 1).

如果是iMV没有目标,设置重量.mv.(:,i)= 0 (the default).

设定MVRate重量的提示

  • 默认,重量.mv.Rate = 0.1*ones(1,nu)。此默认默认的原因包括:

    • 如果是plant is open-loop stable, large increments are unnecessary and probably undesirable. For example, when model predictions are imperfect, as is always the case in practice, more conservative increments usually provide more robust controller performance, but poorer reference tracking.

    • 这些值强制QP Hessian矩阵是正定的,使得QP如果没有约束是有效的,则QP具有唯一的解决方案。

    To encourage the controller to use even smaller increments for theiMV,增加重量.mv.Rate(:,i)value.

  • 如果是plant is open-loop unstable, you might need to decrease the average重量..Rate允许足够快速地响应upsets。

Tips for Setting ECR Weights

制约柔软有关的提示权重..property.

测试和改进

要专注于调整各个成本函数重量,请在以下条件下执行闭环仿真测试:

  • 没有约束。

  • 没有预测错误。控制器预测模型应与工厂模型相同。这俩MPC设计erapp and thesim功能提供在这些条件下模拟的选项。

使用参考和测量的干扰信号(如果有)的变化以强制动态响应。基于每个测试的结果,考虑改变所选权重的幅度。

一个建议的方法是使用常数权重(:,i)= 1to signify “average OV tracking priority,” and adjust all other weights to be relative to this value. Use the灵敏度指导指导。使用审查command to check for typical tuning issues, such as lack of closed-loop stability.

Adjust Disturbance and Noise Models用于对控制器的扰动抑制能力的测试。

Robustness

Once you have weights that work well under the above conditions, check for sensitivity to prediction error. There are several ways to do so:

  • 如果您的系统的非线性工厂模型,例如Simulink金宝app®模型,模拟除了LTI预测模型适用的操作点上的闭环性能。

  • Alternatively, run closed-loop simulations in which the LTI model representing the plant differs (such as in structure or parameter values) from that used at the MPC prediction model. Both theMPC设计erapp and thesim功能提供在这些条件下模拟的选项。For an example, seeTest Controller Robustness

如果controller performance seems to degrade significantly in comparison to tests with no prediction error, for an open-loop stable plant, consider making the controller less aggressive.

MPC设计er, on the调整标签,您可以使用此操作闭环性能slider.

向更强大的控制移动降低OV / MV重量并增加MV速率重量,这导致输出和更保守的控制移动的放松控制。

At the command line, you can make the following changes to decrease controller aggressiveness:

  • 增加所有重量..Rate乘以订单2的乘法因子。

  • Decrease all重量重量..values by dividing by the same factor.

在调整权重之后,在没有预测误差的情况下重新评估性能。

  • 如果both are now acceptable, stop tuning the weights.

  • 如果有改进但与模型错误仍然太大降低,则进一步增加控制器的鲁棒性。

  • 如果是change does not noticeably improve performance, restore the original weights and focus on state estimator tuning (seeAdjust Disturbance and Noise Models)。

最后,如果调整更改不提供足够的鲁棒性,请考虑以下选项之一:

相关话题