@. Frequency Response Analyzer

Symbol Name: FRA

Syntax:

@xxx in out [zm] fstart=<val> fend=<val> [delay=<val>] [oct=<val>] [fcoarse=<val>] [nmax=<val>] [[pp0=<val>] [[pp1=<val>] [f0=<val>f1=<val>]]] [tavgmin=<val>] [tsettle=<val>] [rpar=<val>] [flist=<values>] [acmag=<val>] [acphase=<val>] [refnode=<netname>] [intnode=<netname>]

Example:

@1 A B delay=1m fstart=1k fend=500k oct=1 fcoarse=10k nmax=1 pp0=2m pp1=1m f0=1k f1=2k tavgmin=100u tsettle=200u

During frequency response analysis simulation (.fra), the analyzer device applies a range of sinusoidal stimuli and measures the circuit response.  This can be used to analyze loop gain versus frequency or impedance versus frequency.

By default, the fra device performs a gain analysis, by applying voltage stimuli and analyzing the absolute voltage at each of its terminals. If the zm keyword is present, the fra device instead performs and impedance analysis, by applying current stimuli and analyzing the voltage across the terminals.

The frequency is stepped over the range fstart to fend, with a resolution determined by the oct parameter.

oct sets the number of frequency points per octave, where oct=1 specifies that the stimulus frequency will be doubled at every step.

fcoarse sets oct≤1 at lower frequencies to save overall simulation time. If fcoarse is specified, the coarse step resolution is maximum one point per octave (oct≤1) at frequencies lower than fcoarse. The oct setting applies at frequencies above fcoarse.  Setting fcoarse to 2-to-10 times fstart can greatly reduce simulation time.

The delay instance parameter controls the time at which the analyzer begins to apply the first stimulus.

Amplitude may be specified by one of the following three methods:

  • pp0: if only pp0 is specified, this sets the stimulus amplitude across all frequencies. 
  • pp0, pp1, f0, f1: if all four of these are specified, the stimulus amplitude will be pp0 for frequencies up to f0, pp1 for frequencies above f1, and logarithmically interpolated between (f0, pp0) and (f1, pp1). This is the recommended way to specify amplitude for most circuits.
  • pp: specifies a piecewise logarithmic relationship for amplitude vs frequency.  The pp format is frequency-voltage pairs delimited by spaces.  For example, "pp=1k 10m 10k 1m" has the same effect as "f0=1k pp0=10m f1=10k pp1=1m"


To reduce simulation time, the FRA device may simultaneously inject a sinusoid and several of its harmonics. The maximum number of overlayed simultaneous sinusoids for a particular stimulus is controlled by nmax.  nmax may be specified as an integer, or as a piecewise logarithmic vs. frequency, in the form of frequency-value pairs delimited by spaces. A higher value for nmax will reduce simulation time but may also reduce accuracy. A good starting point is nmax=2. nmax>8 generally provides little simulation time benefit. When nmax>1, LTspice automatically scales the total amplitude to the specified amplitude (pp*).

The tavgmin parameter specifies the minimum time that each sinusoid is analyzed. For each applied frequency, if 1/f < tavgmin, the analysis time will be increased in integer period increments until the analysis time exceeds tavgmin.  For an SMPS, a good starting point for tavgmin is 100/fsw, where fsw is the SMPS switching frequency.

The tsettle parameter specifies the time between when each stimulus is first applied and when the analysis begins. A good starting point for tsettle is 2/fcross, where fcross is the approximate expected 0dB cross-over frequency.  If tsettle is not specified, LTspice will use tsettle=10/fend.

If refnode is specifed, the gain analysis uses the in and out node voltages relative to refnode, instead of relative to ground.  This allows FRA to be used, for example, for circuits that regulate current via voltage across a sense resistor. refnode is not applicable to impedance analysis.

The intnode parameter is used to specify an intermediate node in the circuit for an additional gain analysis. This is useful, for example, for analyzing the external compensation point of a regulator. If intnode is provided, the gain is calculated from the FRA device to intnode, and the complex value is included in the raw output data file, which can be plotted in the LTspice waveform viewer.

The frequency response analyzer (FRA) instance parameters are listed below:

Frequency Response Analyzer Parameters

Name Description Units Default
delay Stimulus start time sec 0
fstart Frequency sweep start value Hz  
fend Frequency sweep end value Hz  
oct Number of points per octave for frequency sweep resolution. Supported values are 0.25, 0.5, 1, 2, 3, 4 - 4
fcoarse Upper frequency for coarse stepping in frequency sweep -  
flist

List of specific frequencies
(applied individually)

Hz  
nmax Maximum number of simultaneously injected harmonic frequencies - 1
pp0 Stimulus amplitude for frequencies below f0 (if specified)

V (gain)
or

A (impedance)

1mV (gain)

or

10mA (impedance)

pp1 Stimulus amplitude for frequencies above f1

V (gain)
or

A (impedance)

 

 
f0 Maximum frequency for pp0 Hz  
f1 Minimum frequency for pp1 Hz  
pp Piecewise logarithmic amplitude vs. frequency

Hz,V
pairs

 
tavgmin Minimum analysis time for each stimulus frequency sec 0
tsettle Stimulus settling time at each frequency before analysis begins sec 10/fend
rpar Parallel resistance Ω

1m (gain)

or

1T (impedance)

acmag

AC Current Magnitude
(applies for AC simulations only)

A 0
acphase

AC Current Magnitude
(applies for AC simulations only)

degrees 0
ac AC Current Magnitude, Phase pair
(applies for AC simulations only)
A,degrees 0,0
enabled Analyzer enable (0 or 1) - 1
refnode Reference node for voltage gain analysis - 0
intnode Intermediate node for additional gain analysis -  

 

See also: How to get a Bode Plot for a SMPS