Contenuto principale

THD

(To be removed) Compute 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.

  • THD block

Libraries:
Simscape / Electrical / Specialized Power Systems / Sensors and Measurements

Description

The THD block computes 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)=IHIFIH=I22+I32++In2     In:RMS value of the harmonic nIF:RMS value of the fundamental current

The THD has a null value for a pure sinusoidal voltage or current.

Characteristics

Sample TimeSpecified in the Sample Time parameter
Continuous if Sample Time = 0
Scalar ExpansionYes, of the parameters
DimensionalizedYes

Parameters

expand all

To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.

Frequency, in hertz, of the fundamental signal.

Sample time of the block, in seconds. Set to 0 to implement a continuous block.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2013a

See Also