필터 지우기
필터 지우기

Triggering blocks on simulink

조회 수: 3 (최근 30일)
Maria de Eusebio
Maria de Eusebio 2020년 5월 21일
댓글: Maria de Eusebio 2020년 5월 21일
Hello!
I have a simulink system with two blocks, a and b. When block a outputs a value 0.75, block b has to stay up and runnning, which will alter the value of block a. And once block a has reached a value 0.85, block b shuts down. How can I simulate this? I'm trying to use the triggered subsystem but I don't know if it is correct (the triggered subsystem with a rising edge, the output of block a as input, 0.75 as the minimum signal value and 0.85 as the maximum. Is this correct?)

채택된 답변

Joel Van Sickel
Joel Van Sickel 2020년 5월 21일
Hello Maria,
you may want to consider using the enabled subsystem, so that it keeps running till the enable signal goes low again. Then you can have it on while the values is between 0.75 and 0.85 by using basic comparisons and logic.
Regards,
Joel
  댓글 수: 3
Joel Van Sickel
Joel Van Sickel 2020년 5월 21일
ah, the enabled subsystem will still work, you just need to modify your logic to stay high after passing 0.75, and then you want to reset it to 0 once it passes 0.85. You can do this with a latch or flip flop type logic.
If you use the block in the link below, you can feed a rising edge trigger n 0.75 to S, and a rising edge trigger to R on 0.85 and I think it will do what you want. I haven't tested it out though.
Maria de Eusebio
Maria de Eusebio 2020년 5월 21일
This was just what I was looking for! Thanks!

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

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2020년 5월 21일
It sounds right. Comparing a with 0.75 and 0.85 will generate two high or low logical signals. Combine these two logical signals to determine triggering the subsystem, either use edge trigger or enable/disable the subsystem.
  댓글 수: 1
Maria de Eusebio
Maria de Eusebio 2020년 5월 21일
Thanks a lot for your answer. Sadly, It doesn't really make the code run how I want. What I want is that the first time block a has a value <=0.75, block b becomes active. Afterwards, block a can have any value smaller or larger than 0.75, block b will still be active. And it will remain active until a is 0.85. So the first time a is <=0.75, b will kick in and remain active no matter what, until a is 0.85.
Thanks!

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

커뮤니티

더 많은 답변 보기:  Power Electronics Community

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by