Harmonic Spectrum and Total Harmonic Distortion
Harmonic Spectrum & Total Harmonic Distortion of a Signal
Determines the Harmonic Spectrum of a Signal
- Spectrum of integer multiple Harmonics
- Magnitude of Harmonic components
- Phase of Harmonic Components
Determines the THD of the Signal
- THD and WTHD
- Fundamental Amplitude
- RMS of the Signal
A. INPUT
1. Select Signal from Workspace (Click REFRESH to update list of variables)
2. Sampling time of the signal in seconds (s)
B. FFT Settings
1. Fundamental Frequency in Hz
2. Start time for FFT analysis in seconds (s)
3. No. of Cycles to be used for the FFT analysis
Once the inputs are given and FFT setting are modified
Click on 'PLOT' to get the results.
C. PLOT settings
- Base for the plot (actual/fundamental amplitude)
- Starting and Ending Frequency Order
- Minimum and Maximum Amplitude
- Title & Labels
- Plot Line Width
- Axis Text Size
- Plot Colour
D. SAVE Figure
- Click on save to save the harmonic Spectrum by specifying filename and the file type as extension.
Cite As
Thomas Joseph (2024). Harmonic Spectrum and Total Harmonic Distortion (https://www.mathworks.com/matlabcentral/fileexchange/77092-harmonic-spectrum-and-total-harmonic-distortion), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.