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
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Frequency | f | Base frequency | |
| Integer | k | Order of harmonic | |
| Boolean | useConjugateComplex | false | Gives conjugate complex result if true |
| Real | x0Cos | 0 | Start value of cos integrator state |
| Real | x0Sin | 0 | Start value of sin integrator state |
| Real | y0Cos | 0 | Start value of cos result |
| Real | y0Sin | 0 | Start value of sin result |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Blocks.Interfaces.RealInput | u | ||
| Blocks.Interfaces.RealOutput | y_rms | Root mean square of polar representation | |
| Blocks.Interfaces.RealOutput | y_arg | Angle of polar representation |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Sources.Cosine | sin1 | ||
| Blocks.Sources.Sine | sin2 | ||
| MultiProduct | product1 | ||
| MultiProduct | product2 | ||
| Mean | mean1 | ||
| Mean | mean2 | ||
| Blocks.Math.RectangularToPolar | rectangularToPolar | ||
| Gain | gain |