PLECS 3.1 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.

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. T =  nf0-   .

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.

Scaling

The Fourier analysis window offers three options to scale the Fourier coefficients: abs displays the absolute value of each coefficient. rel scales all coefficients such that the coefficient of the base frequency is 1. When set to dB the coefficients are displayed on a logarithmic scale in Decibels relative to the coefficient of the base frequency. The value can be set in the Mag: selector in the window title bar.

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  :

         ∫                    ∫
F(n) = 2-  f(t)e-jω0ntdt ≈ 2-∑     f  (t)e-jω0ntdt
       T                 T m      m
        T                    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, DTm  : A smaller simulation step size yields more accurate results.