Documentation Home Page HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

Advanced | SIHARMO

HARMONICS – [SIHARMO]
Computes the harmonics of a signal.


CATEGORY
Advanced

DESCRIPTION
The function allows computing the harmonics of a signal using the exact fundamental frequency. This function computes module (amplitude), angle (phase) and the real and imaginary parts of the harmonics.


RESULT VARIABLES AND PARAMETERS

Module (m)Module (or amplitude) for the symmetric components of a harmonic.
Phase (a)Angle a (or phase) of the symmetric component sequence, between -180 and 180 degrees [°].
Phase (a0)Angle of the symmetric component sequence, found between 0 and 360 degrees [°].
Real (r)Real part r of the required symmetric component sequence (m * cos(a)).
Imaginary (i)Imaginary part i of the required symmetric component sequence (m * sin(a)).
SignalInput signal to perform analysis
FreqFundamental frequency of the signal in Hertz [Hz], normally computed with the sifreq function.
Harmonic number

Number of harmonic to compute.

    • 0: DC;
    • 1: Fundamental;
    • 2: 2nd harmonic;
    • n: nth harmonic (max. 30).
Begin_timeTime at which the analysis of a signal must start. This time is expressed in milliseconds [ms]. This value must be greater than 0 and lower than the size of the acquisition buffer. The default value is 0.
End_timeTime at which the analysis of a signal must end. This time is expressed in milliseconds [ms]. The value of this time must be larger than the specified begin_time and smaller than the duration of the test. Use the “HUGE” value to specify the end of the test. The default value is HUGE.
NoteThe begin time and end time specified for the calculation of the harmonics must be identical to those used in the sifreq sequences which served to compute the fundamental frequency.
FactorMultiplying factor for the results generated by the function. The default value of the multiplying factor is 1.0 and has no effect on the results. The module is multiplied by the absolute value of thefactor. Hence, the phase is modified if the multiplying factor is negative. In this case, 180 degrees are added to the phase.


SYNTAX

[m, a, a0, r, i] = siharmo(input, freq,n,begin,end,factor)


CHARACTERISTICS
Data type support
Double Floating point

EXAMPLE
In the following example, the harmonics function compute the third harmonic components of a signal. Module and angle are shown.

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter