Stateflow flow logic questions

조회 수: 13 (최근 30일)
sudarshan Kanse
sudarshan Kanse 2022년 11월 4일
댓글: sudarshan Kanse 2022년 11월 7일
My question is if x < 8 then y should increase slowly till 3000. And if x > 8 then y should decrease slowly from 3000.

답변 (1개)

Walter Roberson
Walter Roberson 2022년 11월 4일
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
sudarshan Kanse
sudarshan Kanse 2022년 11월 7일
Thank You ! For your valuble response

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Decision Logic에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by