Download Advanced Power System Simulation SIMPLIS Reference

Transcript
Chapter 6 Control Statements
means that the initial segment of operation for the PWL resistor !R100 is set to the 3rd
segment of this device.
Setting of Initial State for Simple Logic Gates
The .INIT statement can be used to override the initial state of a simple logic gate. For
example,
.INIT !D9=0 !D8=1
means that the initial output state for logic gate !D9 is set to logic 0 whereas the initial
output state for logic gate !D8 is set to logic 1.
Initial Conditions for Devices in a Subcircuit
Since initial conditions are either specified in the device statements or through the
.INIT statements discussed so far, two subcircuit instantiations referencing the same
subcircuit definition naturally have identical initial conditions. Let us examine the
statements in example 6.1 (a). The capacitor, originally named CA in subcircuit
"SUB1", has an initial branch voltage of 1 V in the subcircuit instantiation of both X1
and X2.
In some situation, it is desirable to be able to set the initial condition of a device in a
subcircuit to different values for different subcircuit instantiations. SIMPLIS allows
the initial conditions for devices in a child subcircuit be overridden with an .INIT
statement in the parent circuit. The extra .INIT statement shown in example 6.1 (b)
means that the initial voltage on capacitor CA in subcircuit "SUB1" for the
instantiations X1 and X2 should be 5 V and 2 V, respectively.
The capability to override device initial conditions can be extended to lower levels of
subcircuits. For example, the expression
.INIT X123.X456.!D9=1
means that the logic gate !D9 in the subcircuit referred to as X456 in a subcircuit
referred to as X123 in the current circuit is set to have an initial output state of logic 1.
The .INIT statement in an ancestor circuit always overrides any initial condition
specified in a subcircuit. For example, if
.INIT I(L12)=0
appears within the scope of definition of a subcircuit referred to as X123 in the main
circuit and
.INIT I(X123.L12)=1
appears within the scope of definition for the main circuit, the initial current for this
inductor is set to 1 A, not 0 A.
103