General Simulink Debugging Advice
2 次查看(过去 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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classical Control Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!