The VARY record is used to specify a circuit element whose value is to be varied over a specified range of values. The format of the VARY record is as follows:
.VARY, T1, T2, I1, F1, F2, F3
where
The entire analysis is repeated for each value specified on the .VARY record. This includes any requested responses, sensitivities, noises, and calculations. Integrated noise is not calculated during a variation analysis. The value of integrated noise is set to zero in any variation results.
T1 = 'CLR' will clear any existing .VARY requests. This can be useful in combination with the .ALTGO record so that revised .VARY requests can be implemented.
Examples:
.VARY AC r34 10 .0001 100.
causes the value of r34 to be varied between .0001 and 100. ohms over 10 intervals and for the analysis frequency to be set to 0.0 Hz. Note that specifying a zero value for a resistor will cause an error. The value of r34 is restored to whatever value is specified in the .CKT to .END section after the variation analysis is complete.
.VARY AC Vin 100 -10.% +10.% 10.K
causes the value of circuit element Vin to be varied from 10% below its nominal value to 10% above its nominal value in 100 intervals. The frequency is set to 10.0e3. The nominal value of Vin is the value specified in the .CKT to .END section.
.VARY AC c44 9.44ufd 9.44ufd 10.0KHz
causes the circuit to be analyzed with the value of c44 set to 9.44 ufd (ie, zero intervals is the default) at a frequency of 10.0 KHz. This may be easier in some situations than using the .ALTEL / .ALTGO syntax. The value of c44 is restored to whatever value is specified in the .CKT to .END section after the variation analysis is complete.
.VARY CLR
Clears all previous VARY requests and allows new requests to be stored. This can be used with a .ALTGO record as follows :
...
.END * end of CKT section.
.go * do requested analyses, including variations
.VARY CLR
.VARY ... (set new requests)
...
.ALTGO * starts new analysis ...