Learn R Programming

renpow (version 0.1-1)

harmonics: AC Harmonic Distortion

Description

Calculates harmonic distortion

Usage

harmonic(x, harm.odd, lab.units)

Arguments

x

list of arrays c(mag,phase) with fundamental magnitude and phase

harm.odd

fraction of odd harmonics with respect to the fundamental

lab.units

label for units

Value

t

Time sequence

Itot

Total currents

Isum

Sum of currents in neutral

THD

Total Harmonic Distortion

Details

Function harmonic performs calculations and plots, including odd harmonics and THD.

References

Acevedo, M.F. 2018. Introduction to Renewable Electric Power Systems and the Environment with R. Boca Raton, FL: CRC Press. (ISBN 9781138197343)

See Also

AC waves and plots ac.plot, phasor.plot, waves three-phase generator

Examples

Run this code
# NOT RUN {
# single phase harmonics
x <- list(c(10,0)); harm.odd <- list(c(0.2,0.1,0.05)); lab.units <- "I [A]"
y <- harmonic(x,harm.odd,lab.units)

# three-phase harmonics
x <- list(c(10,0),c(10,-120),c(10,120))
harm.odd <- list(c(0.2,0.1,0.05),c(0.2,0.1,0.05),c(0.2,0.1,0.05))
lab.units <- "I [A]"
y <- harmonic(x,harm.odd,lab.units)

# }

Run the code above in your browser using DataLab