Enabled subsystem is not reseted when parent subsystem is reseted

조회 수: 5 (최근 30일)
Alejandro
Alejandro 2023년 10월 20일
댓글: Alejandro 2023년 10월 30일
Hello, apparently if a parent subsystem is reseted the enabled subsystems in the parent sybsystem are not reseted. If the enable function is removed, the subsystem is reseted when the parent subsystem reseted. My solution now is to attach the reset signal to the enabled subsystem, but it is not very clean. Does anyone know a better solution? Or why this is happening and if I am doing something wrong? :)
Attached are the images of the model, simulation and simulink file. Thanks in advance
PD: I wont be able to see any responses for a week, so don't be surprised if I don't answer fast ;)
MATLAB Version: 9.14.0.2337262 (R2023a) Update 5
Simulink model:
First subsystem with external reset:
Second subsystem with external enable:
Simulation with the enables subsystem

답변 (1개)

Sayan
Sayan 2023년 10월 30일
Hi Alejandro,
I understand from your issue that the child Enabled Subsystem is not reset when the parent Resettable Subsystem is reset with an external trigger.
The possible workarounds for the issue are as follows:
  • Rather than attaching a reset signal to your Enabled Subsystem you can use the Resettable Subsystem block (available at Simulink / Ports & Subsystems) and put the child model inside the block after removing the Enable port. Here, you need to trigger the child Subsystem with the same control signal as the parent. Using this will reset the child the same way as the parent Subsystem at the same time step.
  • Alternatively, you can make the parent Subsystem enabled by removing the Reset port and triggering both subsystems with the same control signal. Now to reset the output signal, you need to reset the the Outport of each Subsystem when they are disabled and set the "Initial Output" to zero. However, you need to disable the control signal for at least one time step. You can find the same in the following documentation:
Further information on "Using Enabled Subsystems" and "Using Resettable Subsystems" can be found in the following documentation:
Hope this helps in resolving the issue.
  댓글 수: 1
Alejandro
Alejandro 2023년 10월 30일
Hi Sayan,
Thank you for your answer.
Maybe I was not exactly clear with what I need. I still need the enabled subsystem, so I can not just replace it with a Triggered Subsystem (for your first solution you are talking of removing the Enable port). And for your second solution I also need to reset a unit delay to it's initial value and a filter, so it would also not work.
Sadly there ar no Subsystems with Enabled and Resetable inputs. The Resettable parent Subsystem is only there because I need to reset the Enabled Subsystem.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by