PLECS 3.0 Online Help

Discrete Total Harmonic Distortion

Purpose

Calculate the total harmonic distortion (THD) of the input signal.

Library

PLECS Extras / Discrete Analysis

Description

[Picture]

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  This block is only available for Matlab 7.0 or newer.

Parameters

Sample time
The time interval between samples.
Number of samples
The number of samples used to calculate the THD.