modelMaxTotalHamonicDistortion2
Example for MaxTotalHamonicDistortion block with two FFT computations (a rising condition input triggers an FFT calculation. The Total Harmonic Distortion (THD) of the FFTs must be below the given limit)
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
Using check block MaxTotalHarmonicDistortion as
The amplitutes of the FFT are dynamically displayed in the icon of the block (in black). The computed amplitude of the base frequency is shown in green:
Simulating this examples results in
![]() |
|
| simulation result |
As can be seen, the first FFT fulfills the check (THD < THDmax), whereas the second FFT has a too large THD value.
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica_Requirements.ChecksInFixedWindow_withFFT.MaxTotalHarmonicDistortion | maxTHD1 | ||
| Modelica.Blocks.Sources.Sine | sine1 | ||
| Modelica.Blocks.Sources.Sine | sine2 | ||
| Modelica.Blocks.Sources.Constant | const | ||
| Modelica.Blocks.Math.MultiSum | multiSum | ||
| Modelica.Blocks.Sources.Sine | sine3 | ||
| Modelica.Blocks.Sources.Sine | sine4 | ||
| Modelica.Blocks.Sources.Sine | sine5 | ||
| Modelica.Blocks.Sources.BooleanTable | booleanTable |
Revisions
| Date | Description |
|---|---|
| Nov. 29, 2015 |
Initial version implemented by
Martin R. Kuhn and Martin Otter
(DLR Institute of System Dynamics and Control) The research leading to these results has received funding from the European Union’s Seventh Framework Programme (FP7/2007-2016) for the Clean Sky Joint Technology Initiative under grant agreement no. CSJU-GAM-SGO-2008-001. |
