# Fourier Analysis

## Description

The Fourier analysis of a design is based on the last cycle of transient data captured during a Transient analysis. For example, if the fundamental frequency is 1.0kHz, then the transient data from the last 1ms cycle would be used for the Fourier analysis.

## Setup

Fourier analysis is set up on the **Transient/Fourier Analysis Setup** page of the *Analyses Setup* dialog (after the dialog appears, click the **Transient/Fourier Analysis** entry in the **Analyses/Options** list). An example setup for this analysis type is shown in the image below:

Parameters

**Enable Fourier**- used to include Fourier analysis in the simulation. (Default = disabled).**Fourier Fundamental Frequency**- the frequency of the signal that is being approximated by the sum of sinusoidal waveforms.**Fourier Number of Harmonics**- the number of harmonics to be considered in the analysis. Each harmonic is an integer multiple of the fundamental frequency. Together with the fundamental frequency sinusoid, the harmonics sum to form the real waveform of the signal being analyzed. The more harmonics involved in the sum, the greater the approximation to the signal's waveform (e.g. summing sinusoids to form a square wave).

## Notes

If the Set Defaults button on the page is pressed, the Fourier-based parameters will be calculated as follows:

`Fundamental Frequency = 1/(Transient Stop Time/Default Cycles Displayed)`

Number of Harmonics = 10

Upon running the simulation, a file will be generated (`ProjectName.sim`

), written to the output folder for the project and opened as the active document in the main design window. This file contains detailed information on the magnitude and phase of each harmonic in the Fourier analysis, for each of the signals in the **Available Signals** list (on the **General Setup** page of the *Analyses Setup* dialog).

You must enable the **Transient/Fourier Analysis** option in the **Analyses/Options** list of the *Analyses Setup* dialog, in order to perform a Fourier analysis.

The simulation results are displayed on the **Fourier Analysis** tab of the *Waveform Analysis* window.

## Examples

Consider the circuit in the image above, where a Transient analysis is defined with the following parameter values:

**Transient Start Time**=`0.000`

**Transient Stop Time**=`5.000m`

**Transient Step Time**=`20.00u`

**Transient Max Step Time**=`20.00u`

**Default Cycles Displayed**=`5`

**Default Points Per Cycle**=`50`

**Use Initial Conditions**and**Use Transient Defaults**parameters are both disabled.

and a Fourier analysis is enabled and defined with the parameter values:**Fourier Fundamental Frequency**=`1.000k`

**Fourier Number of Harmonics**=`10`

The entry in the SPICE netlist will be:

`*Selected Circuit Analyses:`

.TRAN 2E-5 0.005 0 2E-5

.SET NFREQS=10

.FOUR 1000 @VIn[p] VIn#branch @RL[p] @RL[i] OUT IN

The following parameter values are set for the Square Voltage Controlled Oscillator:

**Low**=`0V`

**High**=`1V`

**F1**=`1KHz`

The following images show the results of the simulation. The first two plots (adjacent) show waveforms from the Transient analysis of the circuit, while the subsequent plots (below) show the results of Fourier analysis. The square wave, whose fundamental frequency is 1kHz, is broken down into sinusoids with frequencies that are odd multiples of this frequency (odd harmonics), as shown in the third plot (1kHz, 3kHz, 5kHz, 7kHz, etc) and with amplitudes that decrease with each subsequent harmonic.