PLECS 3.5 Online Help

Using the Fourier Analysis

The Fourier Analysis is availabe from the View menu in the PLECS scope window. The Fourier analysis window shows the magnitude of the Fourier coefficients for the given number of harmonics. The analysis range for the Fourier analysis is determined by the cursors in the scope window. By default it is assumed that the cursor range covers exactly one period of the base frequency, though this can be changed in the Fourier parameters. Note that aliasing effects will be visible if the cursor time range is not an exact integer multiple of the inverse base frequency.

Calculation Parameters

Base Freqency
The analysis range T   is always bound to the cursor range in the PLECS scope. In general it consists of n   periods of the base frequency, i.e.     -n
T = f0   .

A click on the frequency input field f: in the window title bar opens the Base Frequency dialog. Two modes are available to set the base frequency: by freely positioning the cursors in the PLECS scope or by entering the numerical values directly in the Base Frequency dialog.

The first mode is activated by selecting Calculate from cursor range in the Base Frequency dialog. In this mode it is assumed that the cursor range covers a single base period. The two cursors can be positioned independently from each other and should be set as exactly as possible to the start and end of a single base period. The corresponding base frequency is displayed in the window toolbar.

If the base frequency is known beforehand it can be entered directly by choosing Set base frequency. In this mode the scope cursors are locked to the number of base periods. Moving the cursors still allows you to select the analysis range without changing the base frequency.

Number of Fourier Coefficients
The number of Fourier Coefficients which are calculated can be changed in the input field N: in the window title bar.

Display Parameters   [Picture]

Display frequency axis
The frequency axis is either shown underneath each plot or underneath the last plot only.
Frequency axis label
The text is shown below the frequency axis.
Scaling
The Fourier analysis window offers three options to scale the Fourier coefficients: Absolute, linear displays the absolute value of each coefficient. Absolute, logrithmic displays the common logarithm of the absolute values, multiplied by 20. Relative, linear scales all coefficients such that the coefficient of the base frequency is 1. When set to Relative, logarithmic (dB) the coefficients are displayed on a logarithmic scale in Decibels relative to the coefficient of the base frequency.
Table data
The table below the Fourier plots shows the calculated Fourier coefficients. The values can be displayed without phase (Magnitude only), with phase values in radians (Magnitude, phase (rad)) or with phase values in degree (Magnitude, phase (degree)).

The following items can be set for each plot independently:

Title
The name which is displayed above the plot.
Axis label
The axis label is displayed on the left of the y-axis.
Y-limits
The initial lower and upper bound of the y-axis. If set to auto, the y-axis is automatically scaled such that all data is visible.

Signal Type

As in the scope window the signal type in the Fourier analysis window can be changed by clicking the small icon next to the signal name in the data view window. Available types are bars, stems and continuous. By default the signals are displayed as bars. Changing the signal type for one signal will affect all signals in the same plot.

Zoom, Export and Print

The Fourier analysis window offers the same zoom, export and print operations as the PLECS scope. See section Using the PLECS Scope for details.

Calculation of the Fourier coefficients

The following approximation is made to calculate the Fourier coefficients of a signal with variable sampling intervals DTm  :

       2 ∫     -jω nt     2 ∑  ∫        -jωnt
F(n) = T-  f(t)e   0 dt ≈ T-      fm(t)e   0 dt
        T                  m DTm

where

fm(t) =   amt+ bm      for continuous signals
fm(t) =   bm           for discrete signals

A piecewise linear approximation is used for continuous signals. Compared to a fast Fourier transformation (FFT) the above approach also works for signals which are sampled with a variable sample rate. The accuracy of this approximation highly depends on the simulation step size, DT
   m  : A smaller simulation step size yields more accurate results.