Harmonic

Calculate harmonic over period 1/f

    Harmonic

Library

Modelica/Blocks/Math

Description

This block calculates the root mean square and the phase angle of a single harmonic k of the input signal u over the given period 1/f, using themean block.

Note: The output is updated after each period defined by 1/f.

Note:
The harmonic is defined by √2 rms cos(k 2 π f t - arg) if useConjugateComplex=false (default)
The harmonic is defined by √2 rms cos(k 2 π f t + arg) if useConjugateComplex=true

Parameters

Harmonic_0

NameLabelDescriptionData TypeValid Values

mo_f

f

Base frequency

Scalar

mo_k

k

Order of harmonic

Scalar

mo_useConjugateComplex

useConjugateComplex

Gives conjugate complex result if true

Scalar

true
false

mo_x0Cos

x0Cos

Start value of cos integrator state

Scalar

mo_x0Sin

x0Sin

Start value of sin integrator state

Scalar

Harmonic_1

NameLabelDescriptionData TypeValid Values

mo__nmodifiers

Number of Modifiers

Specifies the number of modifiers

Number

mo__modifiers

Modifiers

Add new modifier

Structure

mo__modifiers/varname

Variable name

Cell of strings

mo__modifiers/attribute

Attribute

Cell of strings

'start'
'fixed'

mo__modifiers/value

Value

Ports

NameTypeDescriptionIO TypeNumber

u

implicit

input

1

y_rms

implicit

Root mean square of polar representation

output

1

y_arg

implicit

Angle of polar representation

output

2

See Also