Simulink model couldn't generate the output, can't see any thing
50 views (last 30 days)
Show older comments
I'm currently facing an issue with my large Simulink model where I'm unable to generate the desired output.
I haven't encountered any warnings or errors.I have been checking the settings of my solver but i couldn't find anything wrong , but I feel there is something wrong in my last subsystem responsible for producing the final result.
I refer to the answers in community but new to asking a question,so I couldn't find an option to attach my Simulink model directly, I tried attaching a screenshot of the subsystem which I am suspecting.
can someone help ??
2 Comments
Pavan Sahith
on 19 Apr 2024
what does it mean by 'couldn't generate output', please provide more details.
You can try attaching the Simulink model by clicking the pin symbol from the toolstrip , (in the same way you attached the screenshot).
Accepted Answer
Pavan Sahith
on 19 Apr 2024
Hello Maha,
I see that you're encountering an issue with visualizing the output of your Simulink model in a scope block. It might be due to a NaN (Not a Number) value being transmitted to the scope.
I suggest some steps to try to solve the issue.
- Try employing Display blocks strategically within your model. These blocks can serve as a window to observe the real-time values being processed.
- I see a ‘divide’ block and a ‘Discrete Function Block’ in your model which might be causing NaN values, especially if there's a division by zero occurring.
- I also recommend delving into the code encapsulated within your 'MATLAB Function Block.' By attaching a Display block directly to this block, you can gain insights into its output,
- For an even more detailed examination of your signal values, the Simulink Data Inspector stands out as an essential tool.
I faced a similar scope issue which was effectively resolved by integrating an 'Initial Condition (IC)' block into the model. You can try incorporating it into your model if it is necessary.
For example, the IC block allows you to specify initial conditions for the derivatives in your model. By setting an initial condition that is not zero, you can prevent the derivative block from starting with a value that might lead to undefined or undesired behaviour in your simulation.
You can refer to the following MathWorks Documentation to learn more about the 'IC' block:
Hope the above information will help
More Answers (0)
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!