geopulse.devices.harmonics

FFT-based harmonic + THD extraction utilities — STUB (WP3).

Functions

compute_thd(harmonics)

Compute Total Harmonic Distortion from a harmonic-amplitude array (WP3).

extract_harmonics(time_s, current_A, ...[, ...])

Extract the first n_harmonics harmonic amplitudes (WP3).

geopulse.devices.harmonics.extract_harmonics(time_s, current_A, fundamental_Hz, n_harmonics=40)[source]

Extract the first n_harmonics harmonic amplitudes (WP3).

Return type:

ndarray

Parameters:
geopulse.devices.harmonics.compute_thd(harmonics)[source]

Compute Total Harmonic Distortion from a harmonic-amplitude array (WP3).

Return type:

float

Parameters:

harmonics (ndarray)