from numpy import pi, sqrt

N = 32

# general inverter parameters
V = sqrt(2/3)*480
fg = 60
wg = 2*pi*fg
Tg = 1/fg
Vdc = 1250

# LCL filter
L = 10e-6 #100e-6
R = 0.007
Lg = 2e-6
Rg = 0.0012
C0 = 2.4e-3 # TODO: find reasonable numbers for output cap
R0 = 1


L = L / N
R = R / N
Lg = Lg / N
Rg = Rg / N
C0 = C0 * N
R0 = R0 / N

# current controller
tau = 1e-3
kp = L/tau
ki = R/tau

# per unit conversion base values
S_base = 1e6
w_base = wg
V_base = sqrt(2) * V
I = S_base / (3 * V) # Inom
I_base = sqrt(2) * I
Z_base = V / I

# per unit controller
ki = ki / (w_base * Z_base)
kp = kp / Z_base

# per unit LCL
XL = w_base * L / (V / I)
XLg = w_base * Lg / (V / I)
R =  R / Z_base
Rg = Rg / Z_base
B0 = w_base * C0 * (V / I)
R0 = R0 / Z_base
9a9265f65a42e84a357da1b3ff04dc31793bc074
<mask token>

<mask token>
N = 32
V = sqrt(2 / 3) * 480
fg = 60
wg = 2 * pi * fg
Tg = 1 / fg
Vdc = 1250
L = 1e-05
R = 0.007
Lg = 2e-06
Rg = 0.0012
C0 = 0.0024
R0 = 1
L = L / N
R = R / N
Lg = Lg / N
Rg = Rg / N
C0 = C0 * N
R0 = R0 / N
tau = 0.001
kp = L / tau
ki = R / tau
S_base = 1000000.0
w_base = wg
V_base = sqrt(2) * V
I = S_base / (3 * V)
I_base = sqrt(2) * I
Z_base = V / I
ki = ki / (w_base * Z_base)
kp = kp / Z_base
XL = w_base * L / (V / I)
XLg = w_base * Lg / (V / I)
R = R / Z_base
Rg = Rg / Z_base
B0 = w_base * C0 * (V / I)
R0 = R0 / Z_base

from numpy import pi, sqrt
N = 32
V = sqrt(2 / 3) * 480
fg = 60
wg = 2 * pi * fg
Tg = 1 / fg
Vdc = 1250
L = 1e-05
R = 0.007
Lg = 2e-06
Rg = 0.0012
C0 = 0.0024
R0 = 1
L = L / N
R = R / N
Lg = Lg / N
Rg = Rg / N
C0 = C0 * N
R0 = R0 / N
tau = 0.001
kp = L / tau
ki = R / tau
S_base = 1000000.0
w_base = wg
V_base = sqrt(2) * V
I = S_base / (3 * V)
I_base = sqrt(2) * I
Z_base = V / I
ki = ki / (w_base * Z_base)
kp = kp / Z_base
XL = w_base * L / (V / I)
XLg = w_base * Lg / (V / I)
R = R / Z_base
Rg = Rg / Z_base
B0 = w_base * C0 * (V / I)
R0 = R0 / Z_base

from numpy import pi, sqrt

N = 32

# general inverter parameters
V = sqrt(2/3)*480
fg = 60
wg = 2*pi*fg
Tg = 1/fg
Vdc = 1250

# LCL filter
L = 10e-6 #100e-6
R = 0.007
Lg = 2e-6
Rg = 0.0012
C0 = 2.4e-3 # TODO: find reasonable numbers for output cap
R0 = 1


L = L / N
R = R / N
Lg = Lg / N
Rg = Rg / N
C0 = C0 * N
R0 = R0 / N

# current controller
tau = 1e-3
kp = L/tau
ki = R/tau

# per unit conversion base values
S_base = 1e6
w_base = wg
V_base = sqrt(2) * V
I = S_base / (3 * V) # Inom
I_base = sqrt(2) * I
Z_base = V / I

# per unit controller
ki = ki / (w_base * Z_base)
kp = kp / Z_base

# per unit LCL
XL = w_base * L / (V / I)
XLg = w_base * Lg / (V / I)
R =  R / Z_base
Rg = Rg / Z_base
B0 = w_base * C0 * (V / I)
R0 = R0 / Z_base