Simulink model couldn't generate the output, can't see any thing

24 次查看(过去 30 天)
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 个评论
Pavan Sahith
Pavan Sahith 2024-4-19
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).
maha laxmi
maha laxmi 2024-4-19
I'm attempting to visualize the output of this subsystem using a scope, but unfortunately, I'm unable to see any data or signals on the scope display.

请先登录,再进行评论。

采纳的回答

Pavan Sahith
Pavan Sahith 2024-4-19
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by