Product Documentation
Spectre Circuit Simulator Components and Device Models Reference
Product Version 23.1, June 2023

Ratiometric Fourier Analyzer (fourier)

The ratiometric Fourier analyzer measures the Fourier coefficients of two different signals at a specified fundamental frequency without loading the circuit. The algorithm used is based on the Fourier integral rather than the discrete Fourier transform and therefore is not subject to aliasing. Even on broad-band signals, it computes a small number of Fourier coefficients accurately and efficiently. Therefore, this Fourier analyzer is suitable on clocked sinusoids generated by sigma-delta converters, pulse-width modulators, digital-to-analog converters, sample-and-holds, and switched-capacitor filters as well as on the traditional low-distortion sinusoids produced by amplifiers or filters.

The analyzer is active only during transient analysis. For each signal, the analyzer prints the magnitude and phase of the harmonics along with the total harmonic distortion at the end of the transient analysis. The total harmonic distortion is found by adding the power in all of the computed harmonics except DC and fundamental. Consequently, the distortion is not accurate if you request an insufficient number of harmonics The Fourier analyzer also prints the ratio of the spectrum of the first signal to the fundamental of the second, therefore, you can use the analyzer to compute large signal gains and immittances directly.

If you are concerned about accuracy, perform an additional Fourier transform on a pure sinusoid generated by an independent source. Because both transforms use the same time points, the relative errors measured with the known pure sinusoid are representative of the errors in the other transforms. In practice, this second Fourier transform is performed on the reference signal. To increase the accuracy of the Fourier transform, use the points parameter to increase the number of points. Tightening reltol and setting errpreset=conservative are two other measures to consider.

The accuracy of the magnitude and phase for each harmonic is independent of the number of harmonics computed. Therefore, increasing the number of harmonics (while keeping points constant) does not change the magnitude and phase of the low-order harmonics, but it does improve the accuracy of the total harmonic distortion computation. However, if you do not specify points, you can increase accuracy by requesting more harmonics, which creates more points.

The large number of points required for accurate results is not a result of aliasing. Many points are needed because a quadratic polynomial interpolates the waveform between the time-points. If you use too few time-points the polynomials deviate slightly from the true waveform between the time-points and all of the computed Fourier coefficients are slightly in error. The algorithm that computes the Fourier integral does accept unevenly spaced time-points, but because it uses quadratic interpolation, it is usually more accurate using time-steps that are small and nearly evenly spaced.

This device is not supported within altergroup.

Sample Instance Statement

four1 (1 0) fourmod harms=50

Sample Model Statement

model fourmod fourier fund=900M points=2500 order=2

Instance Syntax

Name  [p]  [n]  [pr]  [nr] ModelName parameter=value ...
Name  [p]  [n]  [pr]  [nr] fourier parameter=value ...

The signal between terminals p and n is the test or numerator signal. The signal between terminals pr and nr is the reference or denominator signal. Fourier analysis is performed on terminal currents by specifying the term or refterm parameters. If both term and p or n are specified, the terminal current becomes the numerator and the node voltages become the denominator. By mixing voltages and currents, it is possible to compute large signal immittances.

Instance Parameters

fund (Hz)

Fundamental frequency.

points=20 maxharm

Minimum number of time points.

active=yes

Whether Fourier analysis should be performed or skipped. Possible values are no or yes.

order=2

Order of interpolation.

term

Terminal used to measure current for the test (numerator) channel.

refterm

Terminal used to measure current for the reference (denominator) channel.

harmsvec=[...]

Array of desired harmonics for the test (numerator) channel.

harms=9

Number of harmonics for test (numerator) channel, if an array is not given. The harmonics start from firstharm and go up to firstharm + harms - 1.

refharmsvec=[...]

Array of desired harmonics for the reference (denominator) channel.

refharms=9

Number of harmonics for the reference (denominator) channel, if an array is not given. The harmonics start from reffirstharm and go up to reffirstharm + harms - 1.

scale=1

Scale factor for the ratio results.

firstharm=1

First harmonic computed for the test (numerator) channel.

reffirstharm=1

First harmonic computed for the reference (denominator) channel.

normharm=1

Normalizing harmonic for test the (numerator) channel.

refnormharm=1

Normalizing harmonic for the reference (denominator) channel.

where=logfile

Location where the fourier results should be printed. Possible values are screen, logfile, and both.

Model Syntax

model modelName fourier parameter=value ...

Model Parameters

fund (Hz)

Fundamental frequency.

points=20 maxharm

Minimum number of time points.

harms=9

Desired number of harmonics.

active=yes

Specify whether fourier analysis should be performed or skipped. Possible values are no or yes.

order=2

Order of interpolation.

firstharm=1

First harmonic computed for the test (numerator) channel.

reffirstharm=1

First harmonic computed for the reference (denominator) channel.

Related Topics

Ideal Switch (switch)

IBIS I/O buffer (ibis_buffer)

Circuit Components


Return to top
 ⠀
X