TechRef_Fourier Source PS15

Embed Size (px)

Citation preview

  • 7/29/2019 TechRef_Fourier Source PS15

    1/7

    D I g S I L E N T T e c h n i c a l D o c u m e n t a t i o n

    Fourier Source

  • 7/29/2019 TechRef_Fourier Source PS15

    2/7

    F o u r i e r S o u r c e 2

    DIgSILENT GmbH

    Heinrich-Hertz-Strasse 9

    D-72810 Gomaringen

    Tel.: +49 7072 9168 - 0

    Fax: +49 7072 9168- 88

    http://www.digsilent.de

    e-mail: [email protected]

    Fourier Source

    Published by

    DIgSILENT GmbH, Germany

    Copyright 2007. All rights

    reserved. Unauthorised copying

    or publishing of this or any part

    of this document is prohibited.

    TechRef ElmFsrc V1

    Build 331 30.03.2007

  • 7/29/2019 TechRef_Fourier Source PS15

    3/7

    1 I n t r o d u c t i o n

    F o u r i e r S o u r c e 3

    1IntroductionThe Fourier Source Element (ElmFsrc) of DIgSILENT Power Factory, available since version 13.1, allows the definition of

    periodical signals in the frequency domain. It can be connected to any other dynamic PowerFactorymodel, especially to voltage

    or current source models, thus realizing harmonic voltage or current sources. The element may be used in both the balanced

    and three phases RMS simulation and in the three phases EMT simulation as well.

    Typical applications are:

    Harmonic voltage or current sources for modelling harmonic injections

    Small signal analysis, calculation of transfer functions

    2Element description2.1The element dialog in PF

    Figure 1: The data and diagram pages in the ElmFsrc dialog.

    Figure 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.

    Two methods for generating a time domain signal from the specified spectrum are supported by the Fourier source. These are

    General Fourier series

  • 7/29/2019 TechRef_Fourier Source PS15

    4/7

    2 E l e m e n t d e s c r i p t i o n

    F o u r i e r S o u r c e 4

    Inverse FFT

    Both methods are briefly described in the following sections.

    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 frequency domain on the Diagram

    page of the input dialogue box.

    2.2Modelling approaches2.2.1Fourier Series Modelling ApproachWhen the Fourier Series approach is selected, the output signalyo is calculated by means of a Fourier series, as shown in

    (1):

    ( ) ( )( )[ ]=

    +++=n

    i

    iio tfifAAty1

    min012cos (1)

    where f is the frequency step,A0 the dc component andAi and i the amplitude and phase of the ith harmonic.

    yo defined by (1) is a continuos time domain function and realizes an ideal time-domain signal based on the specified spectrum.However, 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.

    2.2.2Fast Fourier Transform Modelling ApproachIn this approach PF calculates the output signal waveformyo 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

    yo 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 ofyo has to be interpolated. This introduces an interpolation error. This interpolation error can

    be reduced by applying an over-sampling factor, as described below.

    The FF Transform pair is defined by Eq. (2) and (3):

    ( ) ( )

    =

    =

    =

    1

    0

    000..

    2N

    n

    Tnj

    S

    S

    kSkeTnyk

    TNYY

    (2)

    ( ) ( ) ( )

    =

    ==

    1

    0

    000.

    1N

    k

    Tnj

    kSnSkeY

    NTnyty

    (3)

  • 7/29/2019 TechRef_Fourier Source PS15

    5/7

    2 E l e m e n t d e s c r i p t i o n

    F o u r i e r S o u r c e 5

    Subscripts n and krepresent the discrete time tn and discrete frequencyk respectively and are permitted to range between 0

    and (N-1), whereNis the number of samples. The following variables correspond to the FFT definition of (2) and (3):

    N

    T

    fT window

    S

    S ==1

    (4)

    Sn Tnt = (5)

    n

    f

    TnTf S

    Swindow

    =

    ==11

    0(6)

    STn

    f

    ==

    2

    200

    (7)

    kTn

    kS

    k

    ==

    2.

    0(8)

    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. Furthermore, Twindow has no relationship to the maximal frequency.

    The maximal frequency is related to the sampling frequencyfs, 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 periodfs = 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. PF enables theuser to specify this ratio by means of the oversampling factor OSF(see Figure 2) defined in (9):

    max2 f

    fOSF S

    = (9)

    wherefmax is the maximal frequency of the spectrum.

    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 samplesN increases and consequently increasing

    computational time.

    The diagram page in the element dialog (see Fig.3) helps the user to select a suitable oversampling 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 aproximation is good enough or a higher oversampling factor is still required.

    Fig.3 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.

  • 7/29/2019 TechRef_Fourier Source PS15

    6/7

    2 E l e m e n t d e s c r i p t i o n

    F o u r i e r S o u r c e 6

    0.1000.0800.0600.0400.0200.000 [s]

    1.00

    0.00

    -1.00

    -2.00

    3rd Armonic with Serie: Output

    3rd Armonic with FFT /overspl_10: Output

    3rd Armonic with FFT /overspl_20: Output

    3rd Armonic with FFT /overspl_30: Output

    0.0120.0110.0100.0090.008 [s]

    -1.00

    -1.20

    -1.40

    -1.60

    -1.80

    -2.00

    3rd Armonic with Serie: Output

    3rd Armonic with FFT /overspl_10: Output

    3rd Armonic with FFT /overspl_20: Output

    3rd Armonic with FFT /overspl_30: Output

    DIgSILENT

    Figure 2: Influence of the oversampling factor.

    Regardless of whether the time discrete output signalyo is a finite-length sequence or a periodic sequence, the FFT treats the

    Nsamples ofyo 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 ofyo 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 Eq.(6) not be in any case smaller than the simulation step size Tstep and therefore, the oversampling factor

    may be determined as following:

    stepTf

    OSF

    =max

    2

    1(10)

    2.3Parameter DefinitionsTable 1 summarizes the parameter definitions of the Fourier Source Element (ElmFsrc), whereas Table 2 shows the output

    signals.

  • 7/29/2019 TechRef_Fourier Source PS15

    7/7

    2 E l e m e n t d e s c r i p t i o n

    F o u r i e r S o u r c e 7

    Table 1: Parameter Definition of the ElmFsrc

    Parameter Description UnitLoc_name Name --

    Dc_com DC Component -

    Delta_f Frequency Step Hz

    Overspl Oversampling Factor (only for the FFT option) --

    F_min Minimum Frequency (only for Fourier Series option) Hz

    Ampl_ Amplitude --

    Phase_ Phase Grads

    Table 2: Output signals of the ElmFsrc

    Parameter Description Unit

    Yo Output signal --

    Time Time s