Clear Filters
Clear Filters

How to set integrator to make it reset its state to zero when the output negative and the state is negative?

1 view (last 30 days)
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.

Accepted Answer

Paul on 4 Mar 2023
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.
  1 Comment
耘岑 on 5 Mar 2023
Thank you for helping, that's actually what I want. It seems that I misunderstand the integrator limited as an integrator folloed with a saturation before.

Sign in to comment.

More Answers (0)


Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!