如何在Simulink中使用高阶速率限制器平滑矩形信号? [英] How to smooth rectangular signal with high order rate-limiter in Simulink?

查看:410
本文介绍了如何在Simulink中使用高阶速率限制器平滑矩形信号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想象一下,对于位置/位移x,我有一个矩形参考值,我需要对其进行平滑处理.

Imagine I have a rectangular reference value for the position/displacement x and I need to smooth it.

平移运动的数学非常简单:

The math for translatoric movements is quite simple:

speed: v = x'
acceleration: a = v' = x''
jerk. j = a' = v'' = x'''

我需要限制所有这些值.因此,我想到了在Simulink中使用速率限制器: 如下面的输出所示,此方法非常适合于斜坡信号:

I need to limit all these values. So I thought about using rate limiters in Simulink: This approach works perfect for ramp signals, as you can see in the following output:

但是,我对x的参考信号不是斜坡,而是矩形/步长.因此,速率限制器不起作用,因为它们要限制的导数已经无限,并且Simulink会引发错误.我该如何解决这个问题?实际上,有没有更优雅的方法来实现高阶速率限制器?我猜这种方法在某些情况下可能不稳定.

BUT, my reference signals for x are no ramps, they are rectangles/steps. Hence the rate limiters are not working, because the derivatives they get to limit are already infinite and Simulink throws an error. How can I resolve this problem? Is there actually a more elegant way to implement the high order rate-limiters? I guess this approach could be unstable in some cases.

继续阅读:相关问题

推荐答案

由于数值问题,在Simulink中区分信号通常不是一个好主意,我建议从高阶导数(例如加速度)开始进行积分,数值上更健壮.这就是有关派生块的文档所说:

It's generally not a good idea to differentiate signals in Simulink because of numerical issues, I would advise to start with the higher order derivatives (e.g. acceleration) and integrate, much more robust numerically. This is what the doc about the derivative block says:

微分模块的输出可能对动态变化非常敏感 整个模型.输出信号的精度取决于 在仿真中采取的时间步长.较小的步骤允许 该模块的输出曲线更平滑,更准确.然而, 与具有连续状态的块不同,求解器不会 当此块的输入快速变化时,请采取较小的步骤. 根据驱动信号和模型的动态,输出 该块的信号可能包含意外的波动.这些 波动主要归因于驱动信号输出和求解器 步长.

The Derivative block output might be very sensitive to the dynamics of the entire model. The accuracy of the output signal depends on the size of the time steps taken in the simulation. Smaller steps allow a smoother and more accurate output curve from this block. However, unlike with blocks that have continuous states, the solver does not take smaller steps when the input to this block changes rapidly. Depending on the dynamics of the driving signal and model, the output signal of this block might contain unexpected fluctuations. These fluctuations are primarily due to the driving signal output and solver step size.

由于这些敏感性,请构造要使用的模型 积分器(例如积分器模块)而不是微分模块. 积分器模块具有允许求解器调整步长的状态 并提高仿真的准确性.参见电路模型 选择最佳形式的数学模型以避免使用的示例 模型中的导数块.

Because of these sensitivities, structure your models to use integrators (such as Integrator blocks) instead of Derivative blocks. Integrator blocks have states that allow solvers to adjust step size and improve accuracy of the simulation. See Circuit Model for an example of choosing the best-form mathematical model to avoid using Derivative blocks in your models.

另请参见最佳形式的数学模型了解更多信息.

See also Best-Form Mathematical Models for more details.

这篇关于如何在Simulink中使用高阶速率限制器平滑矩形信号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆