General Simulink Debugging Advice

7 visualizaciones (últimos 30 días)
najusten
najusten el 19 de Mayo de 2019
Respondida: Jonas el 28 de Mayo de 2019
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 comentario
Santosh Gnanasekaran
Santosh Gnanasekaran el 23 de Mayo de 2019
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.

Iniciar sesión para comentar.

Respuestas (1)

Jonas
Jonas el 28 de Mayo de 2019
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.

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by