Why does my Simscape fail to solve initial conditions when I enable the 'Start from steady state' option in the Solver Configuration block?

66 views (last 30 days)
I have a Simscape model in which I have set initial condition target values for several block variables. I have also enabled the 'Start from steady state' check box in the Solver Configuration block. When I try to simulate my model, I see an error message stating "Initial conditions solve failed to converge".

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 Nov 2025 at 0:00
Edited: MathWorks Support Team on 19 Nov 2025 at 9:59
If you want to set initial condition targets for block variables, then you need to ensure that the "start from steady state" option is turned off. This is because when "start from steady state" is used, the solver does not necessarily use the initial condition targets you set for the variables and tries to find a steady state initial condition solution. 
In general, if you have selected the Start simulation from steady state check box in the Solver block dialog box, the solver attempts to find the steady state (when the system variables are no longer changing with time). If the steady-state solve succeeds, the state found is some steady state (within tolerance), but not necessarily the state expected from the given initial conditions. In other words, if simulation starts from steady state, even the high-priority variable targets might no longer be satisfied at the start of simulation. However, if the model has more than one steady state, the variable targets you specify can affect which steady-state solution is selected by the solver.
If you want to get more information about this topic, the following links to our documentation may be of interest to you: Block-Level Variable Initialization and How Simscape Simulation Works

More Answers (0)

Categories

Find more on Variable Initialization in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!