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:
- DC Source: Defines the dynamics of the DC side of the converter.
- Frequency Estimator: That describes how the frequency of the grid can be estimated using the grid voltages. Typically a phase-locked loop (PLL).
- Outer Loop Control: That describes the active and reactive power control dynamics.
- Inner Loop Control: That can describe virtual impedance, voltage control and current control dynamics.
- Converter: That describes the dynamics of the pulse width modulation (PWM) or space vector modulation (SVM).
- Filter: Used to connect the converter output to the grid.
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):
with
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:
with
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.
with
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:
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.
Reference
LITS.FixedDCSource
— Type.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.PLL
— Type.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 gainki_pll
::Float64 : PLL integral gain
LITS.VirtualInertia
— Type.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 constantkd
::Float64 : VSM damping constantkw
::Float64 : frequency droop gainωb
::Float64 : rated angular frequency
LITS.ReactivePowerDroop
— Type.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)
LITS.VirtualInertiaQdroop
— Type.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 VSMR
::Float64 : Reactive power controller using reactive power droop
LITS.CombinedVIwithVZ
— Type.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 gainkiv
::Float64 : voltage controller integral gainkffv
::Float64 : Binary variable to enable feed-forward gain of voltage.rv
::Float64 : virtual resistancelv
::Float64 : virtual inductancekpc
::Float64 : current controller proportional gainkic
::Float64 : current controller integral gainkffi
::Float64 : Binary variable to enable feed-forward gain of currentωad
::Float64 : active damping filter cutoff frequency (rad/sec)kad
::Float64 : active damping gain
LITS.AvgCnvFixedDC
— Type.Parameters of an average converter model
Conmutable structor
AvgCnvFixedDC(v_rated, s_rated)
Arguments
v_rated
::Float64 : rated voltages_rated
::Float64 : rated VA
LITS.LCLFilter
— Type.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 filterrf
::Float64 : Series resistance in p.u. of converter filtercf
::Float64 : Shunt capacitance in p.u. of converter filterlg
::Float64 : Series inductance in p.u. of converter filter to the gridrg
::Float64 : Series resistance in p.u. of converter filter to the grid