Total Harmonic Distortion
Purpose
Calculate total harmonic distortion of periodic signal
Library
Control / Measurements
Description
This block calculates the total harmonic distortion of a periodic input signal. The sample time and the fundamental frequency can be specified.
The THD is defined as:
where \(U_\nu\) is the RMS value of the \(\nu\)-th harmonic of the input signal and \(U_{\text{rms}}\) is its overall RMS value.
Example Model
See the example model “Total Harmonic Distortion”.
Find it in PLECS under Help > PLECS Documentation > List of Example Models.
Parameters
- Sample time
A scalar specifying the sampling period or a two-element vector specifying the sampling period and offset, in seconds \((\mathrm{s})\). See also the Discrete-Periodic sample time type in section Sample Times. If a sample time of
0is specified, a continuous implementation based on the Moving Average block is active. The Discrete-Periodic implementation can potentially force a variable-step solver to take small integration steps. This may slow down the simulation. The default value of this parameter is0.- Fundamental frequency
The fundamental frequency of the periodic input signal in hertz \((\mathrm{Hz})\).