Simulation output differs when optional modules are enabled

12 views (last 30 days)
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 Comment
Paul
Paul 4 minutes ago
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.

Sign in to comment.

Answers (0)

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!