simulink real time task excution time
이전 댓글 표시
why the maximum task execution time is very importante vs avrage task execut time in simulink real time? what is happened in this case to take all this time to excute the same task?.
답변 (1개)
Fangjun Jiang
2019년 8월 7일
0 개 추천
In your task, you might have some conditional statements. If the condition is met, certain codes or blocks are executed thus take longer time to finish than when the condition is not met. To ensure your task is able to execute in "real time" continuesly, you need to make sure the maximum task execution time is smaller than the step time of the task. In other words, you can only slow down (by puasing or inserting delay), but you can't speed up to make "real time".
댓글 수: 6
metidji
2019년 8월 9일
Fangjun Jiang
2019년 8월 9일
As much as it sounds unbelieveable, it is true. A dedicated microprocessor with a real-time operating system can perform better for this task than a high power CPU running on a non-real time operating system. The critical part here is the operating system.
In this case, the "conditional" execution (or max/worst execution) is not the content in your Simulink model. But rather, they are the other tasks that your computer/CPU needs to take care of. You must be aware that there are tons of processes/tasks running on your computer CPU (e.g. Windows processes). Simulink Real-time Toolbox is trying to give you a "real-time" effect using the non-realtime operation system (such as Windows). This simulation task can't be put on a high-up enough priority based on the Windows operationg system. Thus, it needs to give margin to try to guarantee that it can run at a once-per-100us rate, but not faster.
metidji
2019년 8월 13일
Fangjun Jiang
2019년 8월 16일
Are you using "Simulink Desktop Real-Time" or "Simulink Real-Time"?
Simulink Desktop Real-Time supports real-time performance up to 1 kHz sample rates with Simulink, and up to 20 kHz with Simulink Coder™.
metidji
2019년 8월 16일
Fangjun Jiang
2019년 8월 16일
Contact the Mathworks tech support
카테고리
도움말 센터 및 File Exchange에서 Target Computer Setup에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
