blockHarmonic

Calculate harmonic over period 1/f

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Information

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 the mean 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

TypeNameDefaultDescription
SI.FrequencyfBase frequency
IntegerkOrder of harmonic
BooleanuseConjugateComplexfalseGives conjugate complex result if true
Realx0Cos0Start value of cos integrator state
Realx0Sin0Start value of sin integrator state
Realy0Cos0Start value of cos result
Realy0Sin0Start value of sin result

Connectors

TypeNameDefaultDescription
Blocks.Interfaces.RealInputu
Blocks.Interfaces.RealOutputy_rmsRoot mean square of polar representation
Blocks.Interfaces.RealOutputy_argAngle of polar representation

Components

TypeNameDefaultDescription
Sources.Cosinesin1
Blocks.Sources.Sinesin2
MultiProductproduct1
MultiProductproduct2
Meanmean1
Meanmean2
Blocks.Math.RectangularToPolarrectangularToPolar
Gaingain