How do I simulate a simplified synchronous machine Simscape block?

I'm trying to simulate the effects of cable sizing on a diesel generator output but I get the following error (note solve is ode23t):
An error occurred during simulation and the simulation was stopped
Caused by:
['DieselGenerator/Solver Configuration']: Initial conditions solve failed to converge.
Nonlinear solver: Linear Algebra error. Failed to solve using iteration matrix.
Problems possible for transient initialization, as well as stepsize control for transient solve, due to equations of one or more components:
all components involved
'DieselGenerator/Incandescent Lamp'
Equation location is:
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\incandescent_lamp.sscp' (no line number info)
'DieselGenerator/Incandescent Lamp1'
Equation location is:
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\incandescent_lamp.sscp' (no line number info)
'DieselGenerator/Incandescent Lamp2'
Equation location is:
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\incandescent_lamp.sscp' (no line number info)
'DieselGenerator/Simplified Synchronous Machine'
Equation locations are:
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+electromech\+sync\+simplified\base.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+electromech\+sync\+simplified\base.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+electromech\+sync\+simplified\base.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+electromech\+sync\+simplified\base.sscp' (no line number info)
'DieselGenerator/Two-Winding Transformer (Three-Phase)'
Equation locations are:
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'DieselGenerator/Two-Winding Transformer (Three-Phase)1'
Equation locations are:
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
'C:\Program Files\MATLAB\R2025b\toolbox\physmod\elec\library\m\+ee\+passive\winding.sscp' (no line number info)
I appreciate your assistance.

Answers (1)

Hi Joseph,
It is my understanding that your Simscape Electrical model of a diesel generator is failing during initialization with the 'ode23t' solver, and the nonlinear solver cannot find a consistent set of initial voltages and currents across your network.
This type of initialization failure often occurs when the model contains strong nonlinearities combined with components whose initial conditions are incompatible. In your case, the incandescent lamps have extremely low cold resistance, which may create near-short-circuit conditions at 't = 0' and make the system difficult to initialize. You may want to check whether increasing the initial filament resistance or adding a small series resistance helps the solver converge.
Additionally, the Simplified Synchronous Machine requires its specified terminal voltage, frequency, and rotor angle to be consistent with the downstream load and transformer ratios. Switching the initialization mode in the machine block or adjusting parasitic conductance parameters can sometimes resolve these conflicts.
It is also important to verify that the winding configurations, voltage ratings, and connection types of both transformers are correctly specified and compatible with each other and with the generator output. Mismatched ratios or incorrect phase connections can lead to algebraic inconsistencies that prevent initialization.
Finally, in the Solver Configuration block, enabling the option Start simulation from steady state may allow Simscape to compute a consistent operating point automatically rather than using default initial guesses.
You can refer to the following documentations for more information:

Products

Release

R2025b

Tags

Asked:

on 18 Feb 2026 at 22:08

Answered:

about 18 hours ago

Community Treasure Hunt

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

Start Hunting!