functions.ac.power: AC power in the time and frequency domain

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Calculates and plots AC power in the domain and phasors. Includes complex number calculations.

Usage

1
2
3
4
5
6
7
8
inst.pow.calc(x, freq = 60, nc = 2)
inst.pow.plot(x, rms = FALSE, freq = 60, nc = 2)
inst.pow.leg(ang, lab, ym, w, units, pf)
complex.pow.calc(xc, dig = 2, res = TRUE)
complex.pow.plot(cp)
complex.pow.tri(cp)
pf.corr(P, V, pf, pfc, w = 377, dig = 2)
pf.corr.tri(xpfc)

Arguments

x

list of voltage and current phasors

freq

frequency in Hz

nc

number of cycles to calculate and/or plot

rms

logical to decide to plot the rms value

ang

angles for legend

lab

label for legend

ym

magnitude for legend

w

angular frequency for legend and for pf correction

units

units for legend

pf

power factor for legend of inst.pow.leg or to be corrected by pf.corr

xc

list with voltage, current, and phase angle

dig

number of digits to round complex power

res

logical to print results of complex power

cp

output of complex power; a list

P

real power for pf correction

V

voltage for pf correction

pfc

target power factor

xpfc

output of pf.corr; a list

Details

inst.pow.calc calculates time domain isntantaneous power given current and voltage phasors. Its output is passed to inst.pow.plot. inst.pow.plot produces time domain plots given current and voltage phasors. It uses inst.pow.leg to display legend

Value

w

angular frequency in rad/s

vm

array of magnitude

ang

array of angle

pf

power factor

pavg

average power

t

time sequence

v.i

matrix with voltage and current as a function of time

p

instantaneous power or power as a function of time

units

units for complex power result

S

apparent power

theta

phase angle

P

real power

Q

reactive power

pf

power factor

prnt

string to print results

cp

complex power output of pf.corr

cpc

complex power after correction

y

Voltage,current, and corrected params

Note

Functions used in Chapter Chapter 8 of Acevedo (2018)

Author(s)

Miguel F. Acevedo acevedo@unt.edu

References

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

Irwin, J.D. and R.M. Nelms. 2011. Basic Engineering Circuit Analysis. 11th edition. 2011: Wiley.

See Also

Power electronics functions ac.plot.rect, rectifier, inverter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# power resistor
vm=170; R=10
x <- list(c(vm,0),c(vm/R,0))
inst.pow.plot(x)

# power capacitor
w <- 377; v.s <- c(170,0)
C=1000*10^-6
# current response
i.res <- c(v.s[1]*(w*C),v.s[2]+90)
x <- list(v.s,i.res)
inst.pow.plot(x)

# calc complex power
V.s=c(170,10); Z.p=c(10,20)
I.p <- div.polar(V.s,Z.p)
V <- V.s[1]/sqrt(2); I <- I.p[1]/sqrt(2)
theta <- V.s[2]-I.p[2] 
cp <- complex.pow.calc(list(V,I,theta))

# pf correction
P=5; V=240; I=40; pfc=0.9
pf <- P*1000/(V*I)
# call pf correction function
pfcorr <- pf.corr(P,V,pf,pfc)
# visualize
pf.corr.tri(pfcorr)

renpow documentation built on May 1, 2019, 6:49 p.m.