Skip to content

Source code for a THD implementation based on Matlab.

License

Notifications You must be signed in to change notification settings

wnoliveira/thd_implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THD Implementation

Source code for a THD implementation based on Matlab. This code simulate a signal and samples it, applyies a window, zero-padding and estimates frequency components. After all, the THD calculation is done.

Ps: This code is part of an paper wich was submitted for review. As soon this article was accepted, the link and reference will be posted here.

Usage

This scripts was written in Matlab 2016a. You must run the main script, thd_proposed_method. Other scripts are only support functions.

In thd_proposed_method, you will find a configuration field, wich is related to sampling frequency, period, selection of frequency of interest, window function and a possible center lob compensation (for amplitude estimation).

You can also change the simulated signal characteristics, if you want.

Results

The results at high sampling periods (greatter than 2 seconds) was equivalent to thd function of Matlab. In lower sampling periods (0.8 ~ 1.4 seconds) the proposed method show better results when compared to exactly thd value (calculated before).

Contribution

Any contribution is welcome. Please, if you doesn't understand something, or find some bug, feel free to contact me.

About

Source code for a THD implementation based on Matlab.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages