Conditionals and triggered subsystems in Simulink
조회 수: 2 (최근 30일)
이전 댓글 표시
I am running a simulation where my model parameters are defined in an m-file and the differential equations are in Simulink. Specifically, I have a battery model and would like to charge the battery at a constant current (input) until a high threshold voltage (output) is reached, then reverse the direction of current until a low threshold voltage is reached. I would then like to repeat this for a specified number of cycles. Due to non-linearities in the model, I can't feasibly predict the charge/discharge times and they also change as I cycle longer.
How would I implement this in the most flexible way and allow for multiple conditions? For example, after the threshold voltage is reached, I may want to hold the battery at zero current before discharging and vice versa for the opposite direction. Using a Simulink switch block doesn't seem practical because the conditions could get complicated. Would a triggered or enabled subsystem suit my purpose or would something else work better?
댓글 수: 0
답변 (1개)
Guy Rouleau
2012년 2월 4일
Based on the description, Enabled subsystem sounds appropriate. The Enabled block allows you to hold or reset states when you enable the subsystem.
If you need to handle complex conditions to enable your subsystems, Stateflow could be useful.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Schedule Model Components에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!