Compute and modify initial values of voltages and currents of model
sps = power_initstates('sys')
power_initstates('sys') opens the Initial
States Setting Tool dialog box that lets you display the initial values
of the electrical state variables (inductor currents and capacitor
voltages) of a model, as well as modify the initial electrical states
in order to start the simulation from any initial conditions. This
tool can also be activated from the Powergui block dialog box by selecting Initial States Setting.
sps = power_initstates('sys') returns a
structure with the fields:
|The name of the model|
|The names of the electrical state variables|
|The current initial states vector used for the simulation of the model|
|The computed initial states that ensure a steady-state simulation|
|Default initial states values, defined in blocks|
|The names of the dependent states, if any|
|Initial state values of dependent states|
The initial state for the simulation, expressed as a
character vector ('
If set to
Display names of model state variables and their initial values.
Enter a value here to set the initial value of the variable selected in the Initial state values for simulation list.
If To Steady State is selected, force all initial electrical state values to steady-state values. When this option is selected, the Set selected state option is disabled, because all states are forced to steady-state values.
If To Zero is selected, force all initial electrical state values to zero. When this option is selected, the Set selected state option is disabled, because all states are forced to zero. If you want to set all states to zero, and then set one or several states to something else, do this by using the Set selected state option: first, select all states, enter 0, and click Apply; then select the states that you want to set to something else and modify their values individually.
If neither To Steady State nor To Zero is selected, initial state values defined in blocks are used for the simulation.
If From File is selected, allows you to choose a previously saved file storing the model's states. If From Diagram is selected, sets all initial state values to their current values (either steady state values or last modified values).
In the pull-down menu, choose the format in which you want your
measurements displayed. The
floating point option
is displayed in mantissa-exponent form with five significant figures.
best of option displays with four significant
figures and uses mantissa-exponent form only for numbers larger than
9999. The final option is displayed in plain numbers with two figures
to the right of the decimal point. The default is
Select order of displayed initial state values. Selecting
order displays the value by block order in the diagram.
State number displays the values according
to the states' ordering in the state-space model. Selecting
the values grouped by capacitors and inductors. The default is
Save the model's initial state settings in a file.
Unlike Simulink® signal lines and input and output ports, the Physical Modeling connection lines and terminal ports lack intrinsic directionality. The voltage and current polarities are determined, not by line direction, but instead by block orientation. To find out a block orientation, first click on the block to select it. Then enter the following command:
The following table indicates the polarities of the currents and voltages for single-phase and three-phase RLC elements (branches or loads), surge arresters, and single-phase and three-phase breakers. The table also indicates the polarities of their state variables (inductor currents and capacitor voltages).
left —> right
Vleft – Vright
right —> left
Vright – Vleft
top —> bottom
Vtop – Vbottom
bottom —> top
Vbottom – Vtop
The natural orientation of the blocks (that is, their orientation in the Element library) is right for horizontal blocks and down for vertical blocks.
For single-phase transformers (linear or saturable), with the winding connectors appearing on the left and right sides, the winding voltages are the voltages of the top connector with respect to the bottom connector whatever the block orientation (right or left). The winding currents are the currents entering the top connector. For three-phase transformers, the voltage polarities and positive current directions are indicated by the signal labels used in the Multimeter block.