PLECS 3.5 Online Help

Discrete Total Harmonic Distortion

Purpose

Calculate total harmonic distortion (THD) of input signal

Library

Control / Discrete

Description

pict

This block calculates the total harmonic distortion of a periodic input signal based on discrete samples. The sample time and the number of samples can be specified. The THD is defined as:

       ┌│ -∑---2  ∘ --------------
       │∘ ν≥2U ν     U2  - U2 - U 2
THD  =   ---2--=    -rms---02----1-
           U1            U1

where Uν   is the RMS value of the ν  th harmonic of the input signal and Urms   is its overall RMS value. The fundamental frequency f1   of the running window is

                  1
f1 = sample-time-×-number-of samples.


Note  In Simulink this block is only available for MATLAB 7.0 or newer.

Parameters

Sample time
The time interval between samples. See also the Discrete-Periodic sample time type in section Sample Times.
Number of samples
The number of samples used to calculate the THD.