How to set integrator to make it reset its state to zero when the output negative and the state is negative?
2 次查看(过去 30 天)
显示 更早的评论
I am now trying to use simulink to model the TCP network by Misra’s Nonlinear Model, whose mathematic equation is below.
I am now working with the model below, which is the queue of the router.
As you can see, there is an integrator in the subsystem. I wanna it to keep reset its state to be zero when the output is negative because at the very begining, the r(t)-C may be negative. But the queue length can never be negative. With time goes, the r(t)-C may be positive, and integrator can work natrually. And since the queue is positive, the r(t)-C to be negative is OK because that means the output rate is larger than input rate.
0 个评论
采纳的回答
Paul
2023-3-4
Hi 耘岑,
If the queue length can never be negative, how is it that the model is resulting in a negative queue length?
In any case, perhaps it would be easiest to use the Limit output feature of the Integrator block with a lower limit set to 0 and the upper limit set to inf. There's also an Integrator Limited block that could apply as well. I don't know if it is any different than the garden variety Inetegrator block other than the default setting for the 'Limit output' parameter.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!