How to Restart "Repeating Sequence" block from t=0s
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello;
I making a EV car model in Simulink where I have a "Repeating Sequence" as source for my car speed profil, at certain point i stop the car to pass to charging then i resume the driving, which i want to resume the driving from t=0 in the speed profil which i cant now since i cant restart the block and the Repeating Sequence block has no time input to modify it.
Do you have an idea how can i restart "Repeating Sequence" block from t=0s ?
Thank you for your respond
Best regards
댓글 수: 3
Rowan Koenderink
2022년 5월 17일
I need the same kind of thing for a project of mine, did anyone find a solution yet?
답변 (2개)
Yukthi S
2024년 12월 3일
I got that you want to reset the speed profile for the car every time driving resumes after recharging.
Since "Repeating Sequence" cannot take external inputs for reset operation, using it within an "Enabled Subsystem" that resets upon enabling is a potential workaround to this issue. The “Custom Repeating Sequence” block given in the attachment might help you to get started.
This model uses an enabled subsystem with a custom sequence block made from a 1-D lookup table and a custom counter. The counter, which has an external reset signal, restarts the sequence every time the subsystem is enabled. This setup can be adjusted to fit specific needs.
In the installed MATLAB R2016b, type the following two commands in the command window to access the "Enabled Subsystem" documentation.
>> addressString = 'simulink/slref/enabledsubsystem.html';
>> web(fullfile(docroot, addressString));
The same workaround can be used for the latest versions of MATLAB also till date. Hope this workaround will get you started!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!