MATLAB: Is the Total Harmonic Distortion value different while using the Signal THD block vs. the POWERGUI tools in SimPower systems

Simscape Electrical

I have a MDL file that uses a MAT-file consisting of a noisy measured signal as an input to the Signal THD block in Simulink. The model also has a POWERGUI block for FFT Analysis. On comparing the total harmonic distortion(THD) values computed by the signal THD block and the FFT Analysis option in the POWERGUI tool, the values are quite different. I would like to know if this is expected behavior.

Best Answer

The variation in THD values when the parameter values in the Signal THD block and the POWERGUI block in SimPowerSystems 4.4 (R2007a) are not equivalent, is expected.
The discrepancy in THD is due to the settings (i.e., the number of cycles and start time) used by FFT analysis tool and the Signal THD block. Please note that the signal THD block uses only one cycle for computation. If the FFT analysis block settings for the 'Number of Cycles', are not the same as the Signal THD block, for example if the value was set to 3 cycles, the THD values would not be identical. Once this setting is changed to one cycle the THD values are identical.
Since the measured signal is noisy, in order to achieve maximum correlation between the THD values computed by the FFT Analysis and the Signal THD blocks, the signal window used should be identical. This can be achieved by changing the 'start time' in the FFT Analysis, so it matches with window used by the Signal THD block.