Engee documentation

THD

Measurement of the total coefficient of harmonic components.

blockType: SubSystem

Path in the library:

/Physical Modeling/Electrical/Control/Measurements/THD

Description

Block THD calculates the Total Harmonic Distortion (THD) as a percentage using the equations:



where

  • - is the RMS value of the harmonic amplitude corresponding to -mu harmonic order;

  •  — This is or ;

  •  — the sum of all harmonic components.

Ports

Input

# IN_1 — harmonic amplitude
scalar | vector

Details

Harmonic amplitude.

Data types

Float32, Float64

Complex numbers support

No

Output

# OUT_1 — the total coefficient of harmonic components, %
scalar | vector

Details

The total coefficient of harmonic components in percent.

Data types

Float32, Float64

Complex numbers support

No

Parameters

Main group

# Fundamental frequency of input signal, Hz: — the main frequency of the signal

Details

The main frequency of the input signal is in Hz.

Default value

50.0

Program usage name

f

Evaluatable

Yes

# Sample time: — sampling period

Details

The interval between the block calculation steps. During execution, the block receives output data and, if necessary, updates its internal state.

To inherit the calculation step, set this parameter to −1. To work in discrete mode, specify a positive integer. For continuous operation, specify 0.

If this block is located in a subsystem with a mask or in another subsystem that allows either continuous or discrete operation, increase the value of the sampling period to ensure proper switching between continuous and discrete block implementations.
Default value

0.0

Program usage name

sample_time

Evaluatable

Yes