MPC-maltab----MPC的参数
这就是幸福作文In this video, we’ll talk about MPC design parameters. Choosing proper values for the parameters is important as they affect not only the controller performance but also the computational complexity of the MPC algorithm that solves an online optimization problem at each time step. Here, we’ll give you some recommendations on how to choo the
controller sample time, prediction and control horizons, constraints, and weights. By choosing the sample time, we determine the rate at which the controller executes the control algorithm. If it’s too big, when a disturbance comes in, the controller won’t be able to react to the disturbance fast enough. On the contrary, if the sample time is too small, the controller can react much faster to disturbances and tpoint changes, but this caus an excessive computational load. To find the right balance between performance and computational effort, the recommendation is to fit 10 to 20 samples within the ri time of the open-loop system respon.
在本视频中,我们将讨论MPC设计参数。为这些参数选择合适的值很重要,因为它们不仅影响控制器性能,⽽且还影响MPC算法的计算复杂度,MPC算法在每个时间步解决在线优化问题。在这⾥,我们将为您提供⼀些关于如何选择控制器采样时间、预测和控制范围、约束和权重的建议。通过选择采样时间,
我们确定控制器执⾏控制算法的速率。如果⼲扰太⼤,当⼲扰进来时,控制器将⽆法对⼲扰做出⾜够快的反应。相反,如果采样时间太⼩,控制器可以对⼲扰和设定点变化做出更快的反应,但这会导致计算负载过⼤。为了在性能和计算⼯作量之间找到正确的平衡,建议在开环系统响应的上升时间内拟合10到20个样本。
As we’ve discusd previously, at each time step, the MPC controller makes predictions about the future plant output, and the optimizer finds the optimal quence of control inputs that drives the predicted plant output as clo to the tpoint as possible. The number of predicted future time steps is called the prediction horizon and shows how far the controller predicts into the future. What happens if it’s too short? Think of the following example. While going at 50 mph, you know that it will take your car 5 conds to stop if you press on the brake pedal. If your prediction horizon is 2 conds, by the time you e the traffic lights, it will be too late to apply the brakes. The car will only be able to stop after passing the traffic lights. So, we should choo a prediction horizon that will cover the significant dynamics of the system. Why don’t we lect a much longer prediction horizon, then? Say you’ve predicted your speed far into the future in order to try to get to your destination on time. Unexpected things can happen, such as boxes falling from the back of a truck, pedestrians crossing the road, or a change in the road profile; the all may affect your speed and you may need
公司授权委托书模板>太极桩功to throw away a significant part of your planning, wasting your computations. Assuming the sample time is chon bad on what we’ve discusd before, the recommendation for choosing the prediction horizon is to have 20 to 30 samples covering the open-loop transient system respon.
老山兰正如我们前⾯所讨论的,在每个时间步,MPC控制器都会对未来的电⼚输出进⾏预测,优化器会找到控制输⼊的最佳顺序,从⽽使预测的电⼚输出尽可能接近设定点。预测的未来时间步数称为预测视界,显⽰控制器预测未来的距离。如果太短怎么办?想想下⾯的例⼦。当你以每⼩时50英⾥的速度⾏驶时,你知道如果你踩下制动踏板,你的车需要5秒钟才能停下来。如果你的预测范围是2秒,当你看到交通信号灯时,踩刹车就太晚了。汽车只有在通过交通灯后才能停下来。因此,我们应该选择⼀个涵盖系统重⼤动态的预测范围。那么,我们为什么不选择⼀个更长的预测期呢?假设你已经预测了你在未来很长⼀段时间内的速度,以便准时到达⽬的地。意外事件可能发⽣,例如箱⼦从卡车后部掉落、⾏⼈横穿道路或道路轮廓发⽣变化;这些都可能会影响你的速度,你可能需要扔掉计划中的⼀⼤部分,浪费你的计算。假设采样时间是根据我们之前讨论的内容选择的,选择预测范围的建议是有20到30个样本覆盖开环瞬态系统响应。
Another design parameter is the control horizon. If this is the t of future control actions leading to this predicted plant output, the number of control moves to time step m are called the control horizon. The rest of the inputs are held constant. Each control move in the control horizon can be tho
ught of as a free variable that needs to be computed by the optimizer. So, the smaller the control horizon, the fewer the computations. Why don’t we always choo a control horizon of 1 then? We can, but it might not give us the best possible maneuver. And by increasing the control horizon, we can get better predictions but at the cost of increasing the complexity. We can even choo to make the control horizon the same as the prediction horizon. However, note that usually only the first couple of control moves have a significant effect on the predicted output behavior, while the remaining moves have only a minor effect. Therefore, choosing a really large control horizon only increas computational complexity. A good rule of thumb for choosing the control horizon is tting it to 10 to 20% of the prediction horizon and having minimum 2-3 steps.
中学生眼保健操惰组词另⼀个设计参数是控制范围。如果这是导致该预测电⼚输出的未来控制措施集,则移动到时间步长m的控制数量称为控制范围。其余的输⼊保持不变。控制范围内的每个控制移动都可以看作是⼀个⾃由变量,需要由优化器计算。因此,控制范围越⼩,计算就越少。那么为什么我们不总是选择1作为控制范围呢?我们可以,但它可能不会给我们最好的策略。通过增加控制范围,我们可以得到更好的预测,但代价是增加复杂性。我们甚⾄可以选择使控制范围与预测范围相同。但是,请注意,通常只有前两个控件移动对预测的输出⾏为有显著影响,⽽其余移动的影响较⼩。因此,选择⼀个⾮常⼤的控制范围只会增加计算复杂性。选择控制范围的⼀个很好的经验法则是将其设置为预测范围的10%到20%,并且⾄少有2-3个步骤。
MPC can incorporate constraints on the inputs, the rate of change of inputs, and the outputs. The can be either soft or hard constraints. Hard constraints cannot be violated, whereas soft constraints can be violated. Let’s say that an MPC controller controls the speed of this car by adjusting the gas pedal. Since there’s a physical limit on how much the gas pedal can be moved, we want to have a hard constraint so that the gas pedal position stays within this range. We may also want to enforce the speed to stay between certain values. However, having hard constraints on both inputs and outputs is not a good idea becau the constraints may conflict with each other, leading to an unfeasible solution for the optimization problem. Here’s a scenario to demonstrate such a situation. Assume that the car is going 50 mph on the highway, where the speed limits are as shown. When the car starts climbing a hill, its speed will decrea. The controller will apply more throttle to increa the speed. But due to the heavy load on top of the car, the speed will keep decreasing even though the controller applies full throttle. So, if the speed constraint is hard, the optimizer won’t be able to find a feasible solution that meets both input and output constraints. However, if the speed constraint is soft, the controller will allow violating it until the car overcomes the hill and the conflict won’t occur. Note that to keep the violation of the soft constraint small, it is being minimized by the optimization problem. The recommendation is to t output constraints as soft and avoid having hard constraints both on the inputs and the rate of change of the inputs.
长颈鹿英语怎么读
执行力MPC可以包含对输⼊、输⼊变化率和输出的约束。这些约束可以是软约束,也可以是硬约束。不能违反硬约束,⽽可以违反软约束。假设MPC控制器通过调节油门来控制这辆车的速度。由于油门的移动量有⼀个物理限制,我们希望有⼀个硬约束,使油门位置保持在这个范围内。我们可能还希望强制速度保持在特定值之间。然⽽,对输⼊和输出都有硬约束不是⼀个好主意,因为这些约束可能相互冲突,导致优化问题的不可⾏解决⽅案。下⾯是⼀个演⽰这种情况的场景。假设汽车在⾼速公路上以每⼩时50英⾥的速度⾏驶,限速如图所⽰。当汽车开始爬⼭时,速度会降低。控制器将施加更多油门以提⾼速度。但由于车顶负载过重,即使控制器开⾜油门,速度也会持续下降。因此,如果速度约束很难,优化器将⽆法找到同时满⾜输⼊和输出约束的可⾏解决⽅案。然⽽,如果速度限制是软的,控制器将允许违反它,直到汽车越过⼭坡,冲突不会发⽣。注意,为了保持对软约束的违反较⼩,通过优化问题将其最⼩化。建议将输出约束设置为软约束,避免对输⼊和输⼊的变化率都有硬约束。
We have multiple goals in life. Some of them might be sleeping, eating, hanging out with friends, and earning money. How would do you manage your time to complete all the goals? You can assign weights. If, for example, sleeping is more important to you than eating, then you would weigh sleeping higher against eating. Similarly, MPC has multiple goals. We want the outputs to track as clo as possible to their tpoints, but at the same time we want to have smooth control moves to avoid aggressive control maneuvers. The way to achieve a balanced performance between the co
mpeting goals is to weigh the input rates and outputs relative to each other. We not only weigh the two groups relative to each other but we also adjust relative weights within the groups as well. For example, if, in this 2x2 system, it is more critical to perform reference tracking of the first output than the cond output, we assign a larger weight to the first output and the ratio between the outputs is greater than 1.
我们在⽣活中有多重⽬标。他们中的⼀些⼈可能在睡觉、吃饭、和朋友出去玩、挣钱。你将如何管理你的时间来完成所有这些⽬标?可以指定权重。例如,如果睡觉对你来说⽐吃饭更重要,那么你会把睡觉和吃饭放在更⾼的位置。类似地,MPC有多个⽬标。我们希望输出跟踪尽可能接近其设定点,但同时我们希望控制动作平稳,以避免激进的控制动作。在这些相互竞争的⽬标之间实现平衡绩效的⽅法是权衡相互之间的输⼊率和输出。我们不仅对这两组进⾏相对称重,⽽且还调整组内的相对权重。例如,如果在这个2x2系统中,对第⼀个输出执⾏参考跟踪⽐对第⼆个输出执⾏参考跟踪更为关键,则我们为第⼀个输出分配更⼤的权重,并且输出之间的⽐率⼤于1。
In this video, we’ve explained the parameters that need to be lected for designing MPC controllers. For more information, you can check out Professor Bemporad’s video on how to design model predictive controllers and the links given in the video descriptions. In the next video, we’ll discuss what methods you can u when you’re dealing with nonlinearity either in the plant or the co
nstraints, and the cost function.
在本视频中,我们解释了设计MPC控制器时需要选择的参数。有关更多信息,您可以查看Bemporad教授关于如何设计模型预测控制器的视频以及视频描述中给出的链接。在下⼀个视频中,我们将讨论在处理⼯⼚或约束中的⾮线性以及成本函数时可以使⽤的⽅法。