Stateflow flow logic questions

5 visualizaciones (últimos 30 días)
sudarshan Kanse
sudarshan Kanse el 4 de Nov. de 2022
Comentada: sudarshan Kanse el 7 de Nov. de 2022
My question is if x < 8 then y should increase slowly till 3000. And if x > 8 then y should decrease slowly from 3000.

Respuestas (1)

Walter Roberson
Walter Roberson el 4 de Nov. de 2022
Okay, suppose you start and at time 0, x is (say) 25. So y should jump to 3000 (because of the "from 3000" requirement), and then it should start decreasing (at what rate? Is there any lower limit?)
consider the next time step, say 0.00025 . x is still 25, and following the rules, "y should decrease slowly from 3000". So lower value that y reached in the previous time step, it should jump back up to 3000, and start decreasing again. And this jump-up-and-decrease behaviour should happen every time step until something happens to change x to be less than 8.
But this is all having to happen every time step, and there is no time for y to decrease because decreasing would take time to happen, but you have to decrease y from 3000 every time .
Conclusion: if x ever becomes > 8 then y should jump to 3000 and stay there unchanging until something happens to make x < 8
  1 comentario
sudarshan Kanse
sudarshan Kanse el 7 de Nov. de 2022
Thank You ! For your valuble response

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by