Analysis types supported by SPICELib are shown in Table 1. Each analysis type is described in the corresponding class documentation.
| Package | Model | Analysis type |
|---|---|---|
| analyses | OP | Bias point calculation. |
| analyses | AC | AC sweep. |
| analyses | TRAN | Transient (time) analysis. |
| 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. |
| LogResults | Global parameter. |
| HIDDEN_COMPONENT | Device-dependent parameter |
| 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 |
| Name | Description |
|---|---|
| OP | |
| AC | |
| TRAN |
SPICELib.analyses.OP| SOLVE_STATIC=0 | Static model iteration The solution of the circuit static model is left in hands of the modeling environment (for instance, Dymola). SPICELib has two symbols to provide an initial guess for Newton-Raphson algorithm: NODESET1 and NODESET2. |
| SOLVE_STATIC=1 | Static model ramping The static value of the independent sources is ramped by SPICELib from zero up to their target values. The clamping voltages of the IC symbols and the capacitor IC property are also adequately ramped. The value of the parameter TIME_SCALE determines the time length of the ramping. |
| SOLVE_STATIC=2 | GMIN stepping GMIN stepping attemps to find a solution for the static model (with power supplies at 100%) by starting with a large value of GMIN, initially 1e10 times the nominal value. If a solution is found at this setting, SPICELib reduces GMIN by a factor of 10 and tries again. This continues until either GMIN is back to the nominal value, or a repeating cycle fails to converge. |
| SOLVE_STATIC=3 | Dynamic model ramping The initial condition to iterate the static model is obtained by simulating the large-signal model. A transient analysis is performed: all sources are ramped up from zero to the desired initial value and this value is held for some time to allow the circuit to stabilise. Then, the voltage values calculated from this transient analysis are used as initial conditions for solving the static model. |
| Name | Default | Description |
|---|---|---|
| TimeScale | Time scale [s] | |
| LogResults | Log variables mode | |
| Gmin | 1e-12 | Conductance in parallel with the pn-junction [S] |
| replaceable model Circuit | NULL | |
| SOLVE_STATIC | 0 | OP calculation algorithm: 0, 1, 2 or 3 |
model OP extends src.ANALYSES.OP; end OP;
SPICELib.analyses.AC| TYPE_AC_SWEEP | It defines the frequency sweep type:
|
| POINTS_NUMBER | Number of sweep points:
|
| START_FREQUENCY | Starting frequency for the sweep. |
| END_FREQUENCY | Ending frequency for the sweep. |
| Name | Default | Description |
|---|---|---|
| TimeScale | Time scale [s] | |
| LogResults | Log variables mode | |
| Gmin | 1e-12 | Conductance in parallel with the pn-junction [S] |
| replaceable model Circuit | NULL | |
| SOLVE_STATIC | 0 | OP calculation algorithm: 0, 1, 2 or 3 |
| TYPE_AC_SWEEP | 0: LIN; 1: DEC | |
| POINTS_NUMBER | LIN: total. DEC: points/decade | |
| START_FREQUENCY | [Hz] | |
| END_FREQUENCY | [Hz] |
model AC extends src.ANALYSES.AC; end AC;
SPICELib.analyses.TRAN| TSTOP | Length of the transient simulation. |
| SKIPBP | SKIPBP=false The transient analysis does its own calculation of a bias point to start with, using the same technique as described for Bias Point. This is necessary because the initial values of the sources can be different from their DC values. Two equivalent procedures are provided to specify the analysis initial conditions: the IC symbols and the IC property. SKIPBP=true The bias point calculation is skipped and the simulation proceeds directly with transient analysis at TIME=0. The large-signal circuit state is initialised to the IC-property corresponding values. Devices with IC property defined start with the specified voltage or current value; however, all other such devices have an initial voltage or current of zero. IC symbols are ignored. |
| Name | Default | Description |
|---|---|---|
| TimeScale | Time scale [s] | |
| LogResults | Log variables mode | |
| Gmin | 1e-12 | Conductance in parallel with the pn-junction [S] |
| replaceable model Circuit | NULL | |
| SOLVE_STATIC | 0 | OP calculation algorithm: 0, 1, 2 or 3 |
| TSTOP | Transient simulation end time [s] | |
| SKIPBP | false | Skip initial transient solution |
model TRAN extends src.ANALYSES.TRAN; end TRAN;