modelTotalHarmonicDistortion
Calculation of total harmonic distortion of voltage
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This example compares the result of the total harmonic distortion (THD) with respect to the fundamental wave and with respect to the total root mean square (RMS). In this simulation model a non-sinusoidal voltage wave form is created by the superposition two voltage waves:
- Fundamental wave with RMS voltage
V1and frequencyf1 - Third harmonic wave with RMS voltage
V3and frequency3*f1
This simulation model compares numerically determined THD values with results, obtained by theoretical calculations:
- Compare the numerically determined THD value
thd1.yand the theoretical valueTHD1, both with respect to the fundamental wave; also plotthd1.valid - Compare the numerically determined THD value
thdRMS.yand the theoretical valueTHDrms, both with respect to the RMS value; also plotthdRMS.valid
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Frequency | f1 | 50 | Fundamental wave frequency |
| SI.Voltage | V1 | 100 | Fundamental wave RMS voltage |
| SI.Voltage | V3 | 20 | Third harmonic wave RMS voltage |
| Real | THD1 | V3/V1 | Theoretically obtained THD with respect to fundamental wave |
| Real | THDrms | V3/sqrt(V1^2 + V3^2) | Theoretically obtained THD with respect to RMS |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Electrical.Analog.Basic.Ground | ground | ||
| Modelica.Electrical.Analog.Sources.SineVoltage | sineVoltage3 | ||
| Modelica.Electrical.Analog.Sources.SineVoltage | sineVoltage1 | ||
| Modelica.Electrical.Analog.Sensors.VoltageSensor | voltageSensor | ||
| Modelica.Blocks.Math.TotalHarmonicDistortion | thd1 | ||
| Modelica.Blocks.Math.TotalHarmonicDistortion | thdRMS |