Computes the Total Harmonic Distortion (THD) of a signal

버전 1.0.0.0 (2.72 KB) 작성자: yoash levron
Useful in power systems and audio systems
다운로드 수: 3.6K
업데이트 날짜: 2013/2/22

라이선스 보기

function [ THD, ph, amp ] = compute_THD( t,x, freq )

Written by Dr. Yoash Levron
February 2013.

Computes the Total-Harmonic-Distortion (THD)
of a signal x(t). The amplitude and phase of the basic harmonic are also computed. These values are typically useful in power systems, audio signal processing, and other related fields.

The function computes the basic harmonic
of the signal, in the form:
x(t) = amp*cos(w*t - ph) + (higher Harmonics)
where : w = 2*pi*freq
so 'amp' and 'ph' are the phase and amplitude
of the basic harmonic.
DC offset does not affect THD.

inputs:
t - [sec] time vector. (should be periodical with basic harmonic 'freq')
x - signal vector.
freq - [Hz] frequency of the basic harmonic.

outputs:
THD - total harmonic distortion (the scale is 1 = 100%).
ph - [rad] phase of the basic harmonic.
amp - Amplitude of the basic harmonic.

인용 양식

yoash levron (2024). Computes the Total Harmonic Distortion (THD) of a signal (https://www.mathworks.com/matlabcentral/fileexchange/40455-computes-the-total-harmonic-distortion-thd-of-a-signal), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2006a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Spectral Measurements에 대해 자세히 알아보기
커뮤니티
 Power Electronics Control 커뮤니티에 더 많은 파일이 있습니다

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0