Inverter

Inverter Models

Here we discuss the structure and models used to model inverters in LITS.jl. Each inverter is a data structure that is defined by the following components:

The following figure summarizes the components of a inverter and which variables they share:

Contrary to the generator, there are many control structures that can be used to model inverter controllers (e.g. grid-following, grid feeding or virtual synchronous machine). For this purpose, more variables are shared among the components in order to cover all these posibilities.

Models are based from the paper: "A Virtual Synchronous Machine implementation for distributed control of power converters in SmartGrids" from S. D'Arco, J.A. Suul and O.B. Fosso.

DC Source

This component can be used to model the dynamics of the DC side of the converter.

Fixed DC Source

This is a model that set the DC voltage to a fixed value $v_{\text{dc}} = v_{\text{dc}}^{\text{fix}}$.

Frequency Estimators

This component is used to estimate the frequency of the grid based on the voltage at the bus.

Phase-Locked Loop (PLL) for VSM

The following equations present a PLL used to estimate the frequency and PLL angle of the grid. There are two reference frames considered in this inverter. Those are the VSM of the outer-loop control $\delta\theta_{\text{olc}}$ and the PLL one $\delta\theta_{\text{pll}}$. The notation used a $\delta\theta$ to refer as the variation of the respective angle $\theta$ with respect to the grid SRF (instead of the fixed $\alpha$ component of the $\alpha\beta$ transformation):

\[\begin{align} \dot{v}_{d,\text{pll}} &= \omega_{\text{lp}} \left [v_d \cos(\delta\theta_{\text{pll}} - \delta\theta_{\text{olc}}) + v_q \sin(\delta\theta_{\text{pll}} - \delta\theta_{\text{olc}}) - v_{d,\text{pll}} \right] \tag{1a} \\ \dot{v}_{q,\text{pll}} &= \omega_{\text{lp}} \left [- v_d \sin(\delta\theta_{\text{pll}} - \delta\theta_{\text{olc}}) + v_q \cos(\delta\theta_{\text{pll}} - \delta\theta_{\text{olc}}) - v_{q,\text{pll}} \right] \tag{1b} \\ \dot{\varepsilon}_{\text{pll}} &= \tan^{-1}\left(\frac{v_{q,\text{pll}}}{v_{d,\text{pll}}} \right) \tag{1c} \\ \dot{\delta\theta}_{\text{pll}} &= \Omega_b \delta \omega_{\text{pll}} \tag{1d} \end{align}\]

with

\[\begin{align} \delta\omega_{\text{pll}} = k_{p,\text{pll}} \tan^{-1} \left(\frac{v_{q,\text{pll}}}{v_{d,\text{pll}}} \right) + k_{i,\text{pll}} \varepsilon_{\text{pll}} \tag{1e} \end{align}\]

Outer Loop Controls

This component defines controllers for both active and reactive power

Virtual Inertia and Q-droop

The following model represent a virtual synchronous machine model to represent how active power is going to be deployed. It defines a new SRF denoted as $\theta_{\text{olc}}$ for the active power controller and uses a simple voltage droop for dispatching reactive power:

\[\begin{align} \dot{\delta\omega}_{\text{olc}} &= \frac{p_{\text{ref}}}{T_a} - \frac{p_e}{T_a} - \frac{k_d(\omega_{\text{vsm}} - \omega_{\text{pll}})}{T_a} - \frac{k_\omega(\omega_{\text{olc}} - \omega_{\text{ref}})}{T_a} \tag{2a} \\ \dot{\delta\theta}_{\text{olc}} &= \Omega_b \delta\omega_{\text{olc}} \tag{2b} \\ \dot{q}_m &= \omega_f (q_e - q_m) \tag{2c} \end{align}\]

with

\[\begin{align} p_e &= v_di_d + v_qi_q \tag{2d} \\ q_e &= v_qi_d - v_di_q \tag{2e} \\ v_{\text{olc}}^{\text{ref}} &= v_{\text{ref}} + k_q(q_{\text{ref}} - q_m) \tag{2f} \end{align}\]

Inner Loop Controls

This component defines voltage and current controllers to generate the reference signal for the converter.

Integrated Virtual Impedance, Voltage and Current Controller

The following model receives both the outer loop control frequency and reference voltage signal to generate the reference signal for the converters. The virtual impedance plays a similar role of the impedance of a synchronous generator. A PI voltage controller is used to generate the current signal that is used in the PI current controller to finally generate the voltage reference signal for the converters.

\[\begin{align*} \dot{\xi}_d &= v_{d,\text{vi}}^{\text{ref}} - v_d \tag{3a} \\ \dot{\xi}_q &= v_{q,\text{vi}}^{\text{ref}} - v_q \tag{3b} \\ \dot{\gamma}_d &= i_{d,\text{cv}}^{\text{ref}} - i_{d,\text{cv}} \tag{3c} \\ \dot{\gamma}_q &= i_{q,\text{cv}}^{\text{ref}} - i_{q,\text{cv}} \tag{3d} \\ \dot{\phi}_d &= \omega_{\text{ad}}(v_d - \phi_d) \tag{3e} \\ \dot{\phi}_q &= \omega_{\text{ad}}(v_q - \phi_q) \tag{3f} \end{align*}\]

with

\[\begin{align} v_{d,\text{vi}}^{\text{ref}} &= v_{\text{olc}}^{\text{ref}} - r_v i_d + \omega_{\text{olc}} l_v i_q \tag{3g} \\ v_{q,\text{vi}}^{\text{ref}} &= - r_v i_q - \omega_{\text{olc}} l_v i_d \tag{3h} \\ i_{d,\text{cv}}^{\text{ref}} &= k_{pv}\left(v_{d,\text{vi}}^{\text{ref}} - v_q\right) + k_{iv} \xi_d - c_f \omega_{\text{olc}} v_q + k_{\text{ffi}}i_d \tag{3i} \\ i_{q,\text{cv}}^{\text{ref}} &= k_{pv}\left(v_{q,\text{vi}}^{\text{ref}} - v_q\right) + k_{iv} \xi_q + c_f \omega_{\text{olc}} v_d + k_{\text{ffi}}i_q \tag{3j} \\ v_d^{\text{ref-signal}} &= k_{pc} \left(i_{d,\text{cv}}^{\text{ref}} - i_{d,\text{cv}}\right) + k_{ic} \gamma_d - \omega_{\text{olc}} l_f i_{q,\text{cv}} + k_{\text{ffv}}v_d - k_{\text{ad}}(v_d - \phi_d) \tag{3k} \\ v_q^{\text{ref-signal}} &= k_{pc} \left(i_{q,\text{cv}}^{\text{ref}} - i_{q,\text{cv}}\right) + k_{ic} \gamma_q + \omega_{\text{olc}} l_f i_{d,\text{cv}} + k_{\text{ffv}}v_q - k_{\text{ad}}(v_q - \phi_q) \tag{3l} \end{align}\]

Converter

This component can be used to model the dynamics of the switching process.

Average Model

The average model simply output the desired reference signal since:

\[\begin{align} v_{d}^{\text{cv}} \approx m_{d} v_{\text{dc}} \approx \frac{v_{d}^{\text{ref-signal}}}{v_{\text{dc}}} v_{\text{dc}} \approx v_{d}^{\text{ref-signal}} \tag{4a} \\ v_{q}^{\text{cv}} \approx m_{q} v_{\text{dc}} \approx \frac{v_{q}^{\text{ref-signal}}}{v_{\text{dc}}} v_{\text{dc}} \approx v_{q}^{\text{ref-signal}} \tag{4b} \end{align}\]

where $m_{dq}$ is the modulation signal, and $v_{dq}^{\text{ref-signal}}$ is the voltage reference signal from the inner loop control.

Filters

LCL Filter

A standard LCL filter is proposed to connect the output of the converter to the grid. In this case, $v_d$ and $v_q$ are voltages in the capacitor, while $v_d^{\text{grid}}$ and $v_q^{\text{grid}}$ represent the voltage at the bus. The L filter after the capacitor can also include a step-up transformer to increase the voltage, that is model as an extra impedance.

\[\begin{align} \dot{i}_{d,\text{cv}} &= \frac{\Omega_b}{l_f}\left( v_d^{\text{cv}} - v_d - r_f i_{d,\text{cv}} + \omega_{\text{grid}} l_f i_{q,\text{cv}} \right) \tag{5a} \\ \dot{i}_{q,\text{cv}} &= \frac{\Omega_b}{l_f}\left( v_q^{\text{cv}} - v_q - r_f i_{q,\text{cv}} - \omega_{\text{grid}} l_f i_{d,\text{cv}} \right) \tag{5b} \\ \dot{v}_{d} &= \frac{\Omega_b}{c_f}\left( i_d^{\text{cv}} - i_d + \omega_{\text{grid}} c_f v_q \right) \tag{5c} \\ \dot{v}_{q} &= \frac{\Omega_b}{c_f}\left( i_q^{\text{cv}} - i_q - \omega_{\text{grid}} c_f v_d \right) \tag{5d} \\ \dot{i}_{d} &= \frac{\Omega_b}{l_g}\left( v_d^{\text{cv}} - v_d^{\text{grid}} - r_g i_{d} + \omega_{\text{grid}} l_g i_{q,\text{cv}} \right) \tag{5e} \\ \dot{i}_{q} &= \frac{\Omega_b}{l_g}\left( v_q^{\text{cv}} - v_q^{\text{grid}} - r_g i_{q} - \omega_{\text{grid}} l_g i_{d,\text{cv}} \right) \tag{5f} \end{align}\]

Reference

Parameters of a Fixed DC Source that returns a fixed DC voltage

Conmutable structor

FixedDCSource(voltage)

Arguments

  • voltage::Float64 : Fixed DC voltage to the converter
LITS.PLLType.

Parameters of a Phase-Locked Loop (PLL) for VSM

Conmutable structor

PLL(ω_lp, kp_pll, ki_pll)

Arguments

  • ω_lp::Float64 : PLL low-pass filter frequency (rad/sec)
  • kp_pll::Float64 : PLL proportional gain
  • ki_pll::Float64 : PLL integral gain

Parameters of a Virtual Inertia with SRF using VSM for active power controller

Conmutable structor

VirtualInertia(Ta, kd, kw, ωb)

Arguments

  • Ta::Float64 : VSM inertia constant
  • kd::Float64 : VSM damping constant
  • kw::Float64 : frequency droop gain
  • ωb::Float64 : rated angular frequency

Parameters of a Reactive Power droop controller

Conmutable structor

ReactivePowerDroop(kq, ωf)

Arguments

  • kq::Float64 : reactive power droop gain
  • ωf::Float64 : reactive power filter cutoff frequency (rad/sec)

Parameters of a Outer-Loop controller using a virtual inertia with VSM for active power controller and a reactive power droop controller.

Conmutable structor

VirtualInertiaQDroop(A, R)

Arguments

  • A::Float64 : Active power controller using virtual inertia with VSM
  • R::Float64 : Reactive power controller using reactive power droop

Parameters of an inner loop controller using virtual impedance, voltage controller and current controller.

Conmutable structor

CombinedVIwithVZ(kpv, kiv, kffv, rv, lv, kpc, kic, kffi, ωad, kad)

Arguments

  • kpv::Float64 : voltage controller proportional gain
  • kiv::Float64 : voltage controller integral gain
  • kffv::Float64 : Binary variable to enable feed-forward gain of voltage.
  • rv::Float64 : virtual resistance
  • lv::Float64 : virtual inductance
  • kpc::Float64 : current controller proportional gain
  • kic::Float64 : current controller integral gain
  • kffi::Float64 : Binary variable to enable feed-forward gain of current
  • ωad::Float64 : active damping filter cutoff frequency (rad/sec)
  • kad::Float64 : active damping gain

Parameters of an average converter model

Conmutable structor

AvgCnvFixedDC(v_rated, s_rated)

Arguments

  • v_rated::Float64 : rated voltage
  • s_rated::Float64 : rated VA
LITS.LCLFilterType.

Parameters of a LCL filter outside the converter

Conmutable structor

LCLFilter(lf, rf, cf, lg, rg)

Arguments

  • lf::Float64 : Series inductance in p.u. of converter filter
  • rf::Float64 : Series resistance in p.u. of converter filter
  • cf::Float64 : Shunt capacitance in p.u. of converter filter
  • lg::Float64 : Series inductance in p.u. of converter filter to the grid
  • rg::Float64 : Series resistance in p.u. of converter filter to the grid