package analyses "Types of analyses supported by SPICELib" annotation ( Window( x=0.03, y=0.02, width=0.24, height=0.45, library=1, autolayout=1), Documentation(info="

Performing Circuit Analyses



Analysis types supported by SPICELib are shown in Table 1. Each analysis type is described in the corresponding class documentation.


Table 1. SPICELib analyses summary.
Package Model Analysis type
analyses OP Bias point calculation.
analyses AC AC sweep.
analyses TRAN Transient (time) analysis.


Global parameters


The value of two global parameters has to be defined (see Table 2).

Table 2. Global parameters.
TimeScale It is intended for providing an (rough) approximate value of the circuit time-constant.
LogResults It determines the amount of information to be logged during the bias point calculation and the AC small-signal analysis.


Log of analysis results


SPICELib logs the analysis results to the dslog.txt file (using Dymola's LogVariable function). Two parameters control this information log (see Table 3 and 4).

Table 3. Parameters controlling the results log.
LogResults Global parameter.
HIDDEN_COMPONENT Device-dependent parameter


Table 4. LogResults values producing the variable log as a function of HIDDEN_COMPONENT value.
HIDDEN_COMPONENT = false HIDDEN_COMPONENT = true
Voltage at resistor pines 0, 1, 2 2
Current through independent voltage sources 0, 1, 2 2
Total power dissipation 0, 1, 2 2
Voltage drop at resistors 1, 2 2
Current through resistors 1, 2 2
Power dissipation at each independent voltage source 1, 2 2


The complex AC small-signal voltages and currents are logged in Cartesian and polar coordinates. In addition, the polar magnitude is also expressed in decibels (defined as 20*log10( )).

Setting the Stop Time


SPICELib analysis models force the simulation end when they have completed their operations. Large simulation times should be selected in the modeling environment experiment definition (for example, \"Simulation/Setup/Stop time\" in Dymola) to avoid interfering with analysis execution. "), Icon(Rectangle(extent=[-80, 60; 80, -60], style(color=43, thickness=2)), Text ( extent=[-76, 44; 72, -38], string="analyses", style(gradient=2)))); end analyses;