
Many versions of Spice include an ac analysis that calculates frequency response by linearizing the circuit model at its dc-bias point. This analysis can be useful for linear, small-signal phenomena. However, it loses validity for large signals' nonlinear analyses.
For such circuits, you need to use a frequency-swept sinusoidal source as an input during Spice's transient analysis. Spice's transient analysis employs nonlinear, large-signal models. A frequency-swept sinusoid may also be useful for radar, sonar, and other applications.
You can derive a frequency-swept sinusoid from the single-frequency FM (SFFM) source in most versions of Spice. The nearly linear (±4%) portion of a cosine modulating waveform produces a frequency-swept sinusoid. Once you select your desired sweep period (SP), initial frequency (IF), and final frequency (FF), you can calculate the parameters for the SFFM source. The SFFM parameters you need are the carrier frequency (fC), the modulation index (mod), and the modulation frequency (fM).
fC = (IF + FF) / 2,
fM = 1 / (4 × SP),
mod = 0.707 × ((IF - FF) / 2) / f M.
The transient analysis of interest occurs during the most linear portion of the modulation waveform. You can limit Spice's output to this period by specifying a no-print (np) value and a final time (ft) value in the .TRAN command line.
np = SP / 2,
ft = 3 × SP / 3.
Fig 1 shows an example circuit containing a nonlinear component. If you want to determine the circuit's amplitude from 300 Hz to 3 kHz over a 20-msec period, then
SP = 0.02,
IF = 300,
FF = 3000,
and, therefore,
fc = 1650,
fm = 12.5,
mod = -153,
np = 0.01,
ft = 0.03.
Because the peak detector in the example uses the diode's nonlinearity, the results of Listing 1's .AC analysis command are erroneous. The compressed ZIP file, attached to EDN BBS /DI_SIG #1624, contains the documentation, Listing, and example output. (DI #1625)