Disable subsystem during real-time operation
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello everyone,
I am building a real- time control system on a C2000 F280049C launch pad, and I am having a hard time making the control loop fast enough to keep up with my system. I am therefore wondering if there is a way to disable parts of my model after running the system for a few milliseconds.
I am actively calibrating my measurement inputs (ADCs) by measuring their no-load values and saving their offset values before starting the regular operation of my circuit.
I have disabled the operation of this calibration function after the initial offset measurement, but it seems like the controller is still beeing slowed down by the offset subsystem. So, is there a way to use a block like a variant source to fully disable a subsystem after a few milliseconds of operation?
I have already tried to realize this using enable blocks and an if statement block, but they only have a minimal effect compared to how fast my control loop runs if I comment out the calibration sub system completely.
For context I am building a voltage and current control loop with discrete PI controllers to manage the direct and quadrature components of the currents and voltages of a 3-phase inverter. My goal is to realize a switching frequency of 30 kHz, but currently my control loop can only operate at a frequency of 15 kHz.
Any other tips for how to speed up my control would also be appreciated, but I suppose I should make a separate post for that.
댓글 수: 0
답변 (1개)
Shubham
2024년 8월 31일
Hey Lars,
In order to disable a subsystem during real-time operation in Simulink, you can use a Variant Subsystem. The Variant Subsystems allows you to switch between different subsystem configurations based on certain conditions, effectively disabling parts of your model when they are not needed.
For more information on disabling the subsystem, refer to @Guy Rouleau's Answer in the following MATLAB Answer post mentioning a similar situation: https://www.mathworks.com/matlabcentral/answers/26447-simulink-disabling-enabling-switching-off-on-blocks-subsystems
I hope this helps!
참고 항목
카테고리
Help Center 및 File Exchange에서 Large-Scale Modeling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!