power_init
(To be removed) Set initial state values of model built with Simscape Electrical Specialized Power Systems software
The Specialized Power Systems library will be removed in R2026a. Use the Simscape™ Electrical™ blocks and functions instead. For more information on updating your models, see Upgrade Specialized Power System Models to use Simscape Electrical Blocks.
Syntax
[x0,states] = power_init(sys)
power_init(sys,'states')
power_init(sys,'ForceToZero')
power_init(sys,'ResetToDefault')
power_init(sys,'x0')
power_init(sys,'look')
power_init(sys,'reset')
power_init(sys,'steady')
Description
Power_init deals with two types of state variables: the Simulink® State variables and the Electrical State variables. The Simulink States consists of the entire set of state variables of a model (including
the Electrical states) seen by Simulink software. The Electrical States are the particular Simulink states that defines the capacitor initial voltages and inductor initial
currents of the Simscape
Electrical Specialized Power Systems blocks of your model.
[x0,states] = power_init(sys) returns the
initial states values and state names of your model.
power_init(sys,'states') displays in a two-column format the initial
state values and names of your model.
power_init(sys,'ForceToZero') sets to zero the initial states your model.
It uses the Data import/export initial state option
from the Simulation > Model Configuration Parameters
menu in the Simulink Editor to specify the initial state values. Use the
ResetToDefault option of
power_init to reset the Simulink configuration parameters to its previous settings.
power_init(sys,'ResetToDefault') resets the initial state of Simulink configuration parameters to the settings prior to the use of the ForceToZero option of power_init. This
option has no effect on system if the ForceToZero option
is not used before.
power_init(sys,'x0') sets the initial state values equal to the vector
specified by x0. The ordering of the states variables is given by the state option of power_init. This option
uses the Data import/export initial state option from
the Simulation > Model Configuration Parameters menu
in the Simulink Editor to specify the initial state values.
power_init(sys,'look') displays
in a two-column format the electrical initial states names and values
of your model.
power_init(sys,'reset') resets
the electrical initial states of sys to zero.
power_init(sys,'steady') sets
the electrical initial states of sys to simulate the electrical circuit
in the steady state.