General Simulink Debugging Advice
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello everyone,
I am currently working on a Simulink model containing various feedback loops that connect three different models (subsystems). I have gone through the model extensively and debugged everything which came up, but the results are still incorrect, and not what I would expect.
I have run all three models in isolation and the results are correct, it is when they are coupled that problems come up. Now in the past, when I have been debugging slightly simpler models, I have essentially hand calculated an timestep of the model myself where possible, to compare the results, or backtracked unexpected results through a series of scopes, thereby gradually getting to the fault in the model.
My trouble here, is that I know that the problem arises where the subsystems are coupled, however I am unable to narrow it down any further than that because the feedback loops connect the subsystems in various places.
I am not too experienced in Simulink, and this is the most advanced project I have attempted, so I was just looking for some input on how others go about getting their codes to run, and finding any sources of error? I'm open to any advice; I've combed through the model more times than I care to admit, and am looking for advice on different strategies that might work better in this case.
Thanks for your help everyone!
댓글 수: 1
Santosh Gnanasekaran
2019년 5월 23일
Model 1 Model 2 Model 3
a. Check the values that are received at model 1 out put and the same is taken in to model 2.
Because there can be a issue in round off these numbers.
Check the same from Model 2 to Model 3
b. If youtr using the fixed point implementation have a look at the scaling part at the interfaces.
답변 (1개)
Jonas
2019년 5월 28일
Go to 'Display' and check things like Sampling times, Execution order, Port Data Types, Signal Dimensions. A lot of these aspects can vary when combining subsystems which seem to work separately.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!