Design Ideas: October 13, 1994
More subtly, during worst-case analyses, PSpice first performs a sensitivity analysis to determine which devices to consider in the worst-case analysis. The value of RELTOL determines the size of the change for all device types in the sensitivity analysis. The default value is 0.001 (that is, 0.1%). Using this default value for RELTOL, PSpice changes each device by 0.1% and evaluates the device's output to determine whether the change has had any measurable effect. For the default value of RELTOL, a 1 or 5% part's output may not even quiver. PSpice consequently bypasses the component in the worst-case analysis.
Further, if you desire a more accurate analysis, you must set RELTOL to a smaller value so that Pspice calculates the answer to a tighter tolerance. This setting, in turn, causes PSpice to be even more likely to ignore devices--not a desirable result.
![]()
The device models in Figs 1 to 3 overcome these problems, accepting tolerance values without making themselves invisible to analysis. In Fig 1, the current sources are ITOL and ITOLSYM: ITOL accepts minimum/maximum tolerances, and ITOLSYM accepts plus-or-minus tolerances. Similarly, Fig 2's voltage sources are VTOL and VTOLSYM, and Fig 3's resistor models are RTOL and RTOLP. You can set the tolerance of each of these basic models with either a minimum and maximum value or a positive/negative value, as appropriate. The ZIPfile attached to the EDN Readers' ftp site DI_SIG DI1591Z.ZIP contains the subcircuits in HPGL format along with ASCII documentation, listings, and simulation examples.
In all cases, the heart of each of the six models is a resistor, R1, whose tolerance is the value RRES. This resistor receives the tolerance specification. For example, in Fig 1's minimum/maximum version, ITOL, when R1 changes by 0.005%, the voltage V(7) changes according to the formula
R1 is a large value to amplify the change in voltage across R1 for a tolerance change as small as 0.005%. Voltage source V1 subtracts the nominal voltage and leaves just the changed portion of the voltage V(7,8). E1 scales V(7) such that the value of E1, divided by the value of R3, equals a current of appropriate value. G1 produces this output current for the model.
All of the models in Figs 2 and 3 operate in same basic way. The only other significant thing to note is that the plus-or-minus versions develop a ±1V change at V(7), and the minimum/maximum versions develop a ±0.5V change. The plus-or-minus versions assign V(7) to E1 without summing any other value to it. When R1 changes by the assigned percentage, the models change by the assigned value.
MicroSim's Spice post processor, Probe, shows outputs in single precision. Consequently, Probe in many cases does not properly display worst-case analysis. Instead, you should directly examine the numerical files. To aid in realizing the additional accuracy that double precision provides, include an .option statement, NUMDGT=12, to cause 12 digits to be displayed. Also, the value of GMIN affects the simulation's accuracy, because GMIN determines the resistance across all node pairs through which leakage currents flow.