Simulation output differs when optional modules are enabled

14 次查看(过去 30 天)
I am running a closed-loop Simulink model with several modules that can be activated or deactivated for a particular run. These modules do not participate in the loop as they only receive data from the simulation and do not pass it back into the simulation. However, I am observing that the model output differs slightly depending on whether these modules are activated or deactivated. This occurs even if the modules are never called during the simulation run (by having their sample time set to a value higher than the simulation end time).
Is this a known behavior when using Simulink?
  1 个评论
Paul
Paul 2024-11-26,21:02
Can you be more specific about how exactly these modules (are these really blocks?) are activated or deactivated for a particular run?
If these blocks receive data and do any operations, including data logging, they can influence the step size of the solver if using a variable step solver.
What does "do not pass it back to the simulation" mean? The blocks are part of the simulation. Maybe that means the blocks don't pass data back into the loop?
If the block sample time is set to a large number (w/o a sample time offset) I'm pretty sure the block will still execute at t = 0, though I'm not sure if/how that can affect the subsequent time steps.

请先登录,再进行评论。

回答(0 个)

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by