TechRef_Fourier Source
TechRef_Fourier Source
Fourier Source
ElmFsrc
DIgSILENT GmbH
Heinrich-Hertz-Str. 9
72810 - Gomaringen
Germany
http://www.digsilent.de
[email protected]
r994
Copyright ©2011, DIgSILENT GmbH. Copyright of this document belongs to DIgSILENT GmbH.
No part of this document may be reproduced, copied, or transmitted in any form, by any means
electronic or mechanical, without the prior written permission of DIgSILENT GmbH.
Contents
1 Introduction 3
2 General Description 3
A Model Parameters 7
B Input/Output Signals 7
List of Figures 8
List of Tables 9
1 Introduction
The Fourier Source Element (ElmFsrc) allows the definition of periodical signals in the fre-
quency domain. It can be connected to any other dynamic PowerFactory model, especially to
voltage or current source models, thus realizing harmonic voltage or current sources. The el-
ement may be used in both the balanced and three phases RMS simulation and in the three
phases EMT simulation as well.
2 General Description
Figure 2.1 shows the data and diagram pages of the element dialog. The user may define
minimum frequency and a frequency step size of the harmonic spectrum. For the input of data
at every harmonic frequency, additional ”cells” need to be appended.
Figure 2.1: The data and diagram pages in the ElmFsrc dialog
Two methods for generating a time domain signal from the specified spectrum are supported by
the Fourier source. These are
The input parameters vary according to the selected calculation approach. While dc-component
and frequency step are always to be specified in both cases, a minimum frequency is additionally
required for the Fourier Series approach and an oversampling factor for the FFT one.
For checking purposes, the specified periodic signal is immediately shown in time- and fre-
quency domain on the ”Diagram” page of the input dialogue box.
When the ”Fourier Series” approach is selected, the output signal y0 (t) is calculated by means
of a Fourier series, as shown in equation (1):
n
X
y0 (t) = A0 + Ai · cos[2π(fmin + (i − 1) · ∆f ) · t + ϕi ] (1)
i=1
where ∆f is the frequency step, A0 the dc component and Ai and ϕi the amplitude and phase
of the ith -harmonic.
y0 defined by (1) is a continuous time domain function based on the specified spectrum. How-
ever, many cosine-terms must be evaluated at every time step during a transient simulation,
which can lead to slow calculation times in case of many specified frequencies.
In this approach PowerFactory calculates the output signal waveform y0 by means of the inverse
Fast Fourier Transform (iFFT) algorithm, which is applied to the discrete spectrum. Unlike the
Fourier Series approach, the iFFT must be carried out only once at the beginning of a transient
simulation why computational resources are used more efficiently. However, the resulting output
signal y0 is a discrete time function and its time step will generally not match the simulation step
size. This means that for each simulation time step the value of y0 has to be interpolated.
This introduces an interpolation error. This interpolation error can be reduced by applying an
over-sampling factor, as described below.
N −1
2π X
Y0 (ωk ) = Y0 ( · k) = y0 (n · Ts ) · e−jωk nTs (2)
N · Ts n=0
N −1
1 X
y0 (tn ) = y0 (n · Ts ) = · Y0 (ωk ) · ejωk nTs (3)
N
k=0
Subscripts n and k represent the discrete time tn and discrete frequency ωk respectively and
are permitted to range between 0 and (N −1), where N is the number of samples. The following
variables correspond to the FFT definition of (2) and (3):
1 Twindow
Ts = = (4)
fs N
tn = n · Ts (5)
1 1 fs
f0 = = = (6)
Twindow n · Ts n
2π
ω0 = 2π · f0 = (7)
n · Ts
2π
ωk = k · ω0 = ( )·k (8)
n · Ts
As it can be seen from (6), the windowing time Twindow determines the minimum frequency of
the discrete frequency spectrum only, i.e. the frequency resolution or frequency step. Further-
more, Twindow has no relationship to the maximal frequency.
The maximal frequency is related to the sampling frequency fs , i.e. to the sampling time Ts as
defined in (4). Due to the time sampling, the FFT results in a periodic sequence of uniformly
spaced frequencies with a period fs = 1/Ts . Therefore, the sampling frequency must be chosen
in such a way, that no superposition of subsequent harmonic spectrums (aliasing) will occur
(comply with the sampling theorem). Factors between 5 and 20 seem to be appropriate in most
cases. PowerFactory enables the user to specify this ratio by means of the oversampling factor
OSF (see Figure 2.2) defined in (9):
fs
OSF = (9)
2 · fmax
The default value for the oversampling factor is 10 and the user may increase it as necessary.
However, it must be pointed out, that with an increasing oversampling factor also the number of
samples N increases and consequently increasing computational time.
The diagram page in the element dialog (see Fig. 2.2) helps the user to select a suitable over-
sampling factor. By modifying the oversampling factor in the data page, the curve in the diagram
is automatically updated. With the zoom tools the user may analyse whether the approximation
is good enough or a higher oversampling factor is still required.
Figure 2.2 depicts an example of the FFT modelling approach. The curves on the right side are
a zoom near the peak value of those on the left side.
Regardless of whether the time discrete output signal y0 is a finite-length sequence or a periodic
sequence, the FFT treats the N samples of y0 as though they characterise one period of a
periodic sequence. This period corresponds to the inverse of the frequency step defined by the
user.
For each transient simulation time step, the output value of y0 is linearly interpolated between
those values resulting from the iFFT. This interpolation lets introduce an additional selection
criterion for the oversampling factor. It seems reasonably, that the sampling time Ts in Equation
(6) not be in any case smaller than the simulation step size Tstep and therefore, the oversampling
factor may be determined as following:
1
OSF = (10)
2 · fmax · Tstep
A Model Parameters
B Input/Output Signals
List of Figures
List of Tables