ISN在较小的时间步中未固定的存储块替代方案? [英] Memory block alternative that ISN'T fixed in minor time step?

查看:80
本文介绍了ISN在较小的时间步中未固定的存储块替代方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个模型,其中一些输入通过存储模块输入到CMEX S-Function中,S-Function根据这些输入提供输出,然后将这些输入反馈到S-Function中.经典的代数循环方案.我使用内存块来防止这种情况,因为我们的求解器通常是可变时间步长

根据 Mathworks文档内存块和单元延迟块在其输出方面也固定在较小的时间步长内.我意识到 input 可以是离散的也可以是连续的,但是 output 只能在 major 时间步中是连续的,并在未成年人.

现在,由于各种原因,对我们而言重要的是,模型中的所有内容都应在次要的主要时间步中进行更新.我想出了一种使用PWork向量存储状态点的先前值并将其转发给我们使用的CMEX S-Function的方法.这样可以防止代数循环的发生,并且可以确保在短时间内连续进行,但并不如我所愿.

有人有其他建议吗?

PS:顺便说一句,我认为无论我的求解器是固定步长还是可变步长,都最好使用内存块,因为它在内部将成为固定步长求解器的单位延迟块.这个假设正确吗?

解决方案

根据Mathworks documentation the Memory Block, and the Unit Delay block also, are fixed in minor time step in terms of their outputs. I realize that the inputs can be either discrete or continuous, but the output will only be continuous in the major time step, and fixed in the minor one.

Now, for various reasons, it is important to us that everything in the model get updated in the minor and major time steps. I came up with a way of using the PWork vector to store the previous value of state points and forward them to the CMEX S-Function that we use. This prevents algebraic loops from occuring and also ensures continuous in minor time step, but is not as elegant as I would like.

Does anyone have any alternative suggestions?

PS: As an aside, I believe that it is better to use the Memory block regardless of if my solver is Fixed Step or Variable Step, because it will internally just become a Unit Delay block for Fixed Step solvers. Is this assumption correct?

解决方案

According to this article, using fast-response transfer function may achieve similar result without going into minor step.

这篇关于ISN在较小的时间步中未固定的存储块替代方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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