Total Harmonic Distortion
(To be removed) Measure total harmonic distortion (THD) of signal
The Specialized Power Systems library will be removed in R2026a. Use the Simscape™ Electrical™ blocks and functions instead. For more information on updating your models, see Upgrade Specialized Power System Models to use Simscape Electrical Blocks.
Library
powerlib_extras/Measurements
A discrete version of this block is available in the powerlib_extras/Discrete Measurements library.
Note
The Sensors and Measurements library contains the THD block. This is an improved version of the Total Harmonic Distortion block. The new block features a mechanism that eliminates duplicate continuous and discrete versions of the same block by basing the block configuration on the simulation mode. If your legacy models contain the Total Harmonic Distortion block, they continue to work. However, for best performance, use the THD block in your new models.
Description
The Total Harmonic Distortion block measures the total harmonic distortion (THD) of a periodic distorted signal. The signal can be a measured voltage or current.
The THD is defined as the root mean square (RMS) value of the total harmonics of the signal, divided by the RMS value of its fundamental signal. For example, for currents, the THD is defined as
total harmonic distortion (THD) = IH/IF,
where
where
In =RMS value of the harmonic
n
IF= RMS
value of the fundamental current.
The THD has a null value for a pure sinusoidal voltage or current.
Parameters
- Fundamental frequency
The frequency, in hertz, of the fundamental signal.
Inputs and Outputs
signalConnect this input to the voltage or current you want to measure the total harmonic distortion.
THDThe output returns the THD of the input signal.
Version History
Introduced before R2006a
