Main Content

power_initstates

Compute and modify initial values of voltages and currents of model

Syntax

sps = power_initstates('sys')

Description

sps = power_initstates('sys') returns the initial values of the electrical state variables (inductor currents and capacitor voltages) of a model, and modifies the initial electrical states to start the simulation from any initial conditions. It returns a structure with these fields:

FieldDescription
circuitThe name of the model
StatesThe names of the electrical state variables
x0The current initial states vector used for the simulation of the model
x0_steadyThe computed initial states that ensure a steady-state simulation
x0_blocksThe default initial states values defined in blocks
DependentStatesThe names of the dependent states, if any
x0DependentStatesInitial state values of dependent states
UseInitialStatesFrom

The initial state for the simulation, expressed as a character vector ('block', 'steady', 'zero').

If set to 'block', the default initial states are used. If set to 'steady', the computed initial states that ensure a steady-state simulation are used. If set to 'zero', the initial states are forced to 0.