Battery inverter

This section describes the battery inverter component.

The Schematic Editor library block from the Microgrid section shown in Table 1, models a battery inverter implemented with a three-phase two-level inverter with current control loop. The DC link is fed by a battery source connected externally of the block. The battery inverter can operate in grid connected or grid following mode. It operates in active and reactive power control mode, when grid following. This inverter is implemented in both switching and average models. The following sections describe in more details the component parameters, inputs and outputs.

Table 1. Battery inverter component in the HIL Toolbox
component component dialog window component parameters
  • Property tabs:
    • 1 - General
    • 2 - Filter
    • 3 - Advanced 1
    • 4 - Advanced 2
    • 5 - Advanced 3
    • 6 - Advanced 4

Figure 1: Battery inverter (Switching) component view under its mask.

Figure 2: Battery inverter (Average) component view under its mask.

Inputs and outputs

The battery inverter component needs 6 inputs to operate. These inputs must be sent as an array, with use of a bus join component, and in the correct order. The following table describes the inputs and their order.

Battery inverter inputs

Number Input Description
0 On A digital input that comands the On/Off state of the battery inverter. Battery inverter is on when input is high.
1 mode A digital input that selects the grid operation mode of the battery inverter. The inverter is on grid following mode when input is high. It operates in grid forming mode otherwise.
2 f_ref An analog input that sets the frequency reference. [Hz]
3 Vref An analog input that sets the terminal voltage (line to line) reference. [V]
4 Pref An analog input that sets the active power reference. [W]
5 Qref An analog input that sets the reactive power reference. [VAr]

The battery inverter model has 14 outputs. They are organized as an array and can be accessed individually through a bus split component, respecting the correct order. The following table describes the outputs ans their order.

Battery inverter outputs

Number Output Description
0 Connected A digital output with a feedback of the battery inverter contactor's state. Contactor is closed when output is high.
1 Inv_On A digital output with a feedback of the inverter on/off state.
2 Va An analog output with the instantaneous measurement of the inverter's phase A terminal voltage. [V]
3 Vb An analog output with the instantaneous measurement of the inverter's phase B terminal voltage. [V]
4 Vc An analog output with the instantaneous measurement of the inverter's phase C terminal voltage. [V]
5 Vt An analog output with the inverter's terminal peak voltage (phase to neutral). [V]; The RMS voltage can be calculated by dividing this output by a square root of 2.
6 Ia An analog output with the instantaneous measurement of the inverter's phase A terminal current. [A]
7 Ib An analog output with the instantaneous measurement of the inverter's phase B terminal current. [A]
8 Ic An analog output with the instantaneous measurement of the inverter's phase C terminal current. [A]
9 f An analog output with the measured electrical frequency. [Hz]
10 P An analog output with the inverter's active power measurement. [W]
11 Q An analog output with the inverter's reactive power measurement. [VAr]
12 S An analog output with the inverter's apparent power measurement. [VA]
13 pf An analog output with the inverter's power factor measurement.

Component dialogue box and parameters

The battery inverter component dialogue box consists of six tabs for specifying basic and advanced parameters.

Tab: "1 - General"

In this component tab, the user can specify general parameters of the battery inverter model.

Figure 3: Battery inverter model "1 - General" parameters.

Battery inverter model "1 - General" parameters

Parameter Code name Description
Nominal power Sn Battery inverter nominal power. [VA]
Nominal voltage Vn Battery inverter nominal line to line terminal voltage. [V]
Nominal DC link voltage Vn_dc Battery inverter nominal DC link voltage. [V]
Nominal frequency fn Battery inverter nominal electrical frequency. [Hz]
Switching frequency fsw Battery inverter switching frequency. [Hz]
Execution rate Ts Execution rate of all signal processing components of the battery inverter model. [s]

Tab: "2 - Filter"

In this component tab, the user can specify LC filter parameters of the battery inverter model.

Figure 4: Battery inverter model "2 - Filter" parameters.

Battery inverter model "2 - Filter" parameters

Parameter Code name Description
LC filter inductance L Inductor of the LC filter on the inverter side. [H]
LC filter inductor ESR R Series resistor of the inductors of the LC filter. [Ω]
LC filter cut-off frequency OutputFilterFc Cut-off frequency of the LC filter. [Hz]; This parameter is used to calculate the filter's capacitance.
LC filter capacitor ESR Rres LC filter capacitor's damping resistor. [Ω]

Tab: "3 - Adv. 1"

In this component tab, the user can specify synchronizing controller parameters of the battery inverter model.

Figure 5: Battery inverter model "3 - Adv. 1" parameters.

Battery inverter model "3 - Adv. 1" parameters

Parameter Code name Description
Synch - PLL input filter num blowpass Numerator of a digital biquad filter on direct form 1. Input must be an array of size 3. Example: [ 9.83e-06, 1.97e-05, 9.83e-06]
Synch - PLL input filter den alowpass Denominator of a digital biquad filter on direct form 1. Input must be an array of size 2. Example: [ -1.99, 0.99 ]
Synch - Accepted voltage diff. V_diff Accepted voltage difference between battery inverter and grid to close main contactor. [%]
Synch - Voltage match - PI - Kp Vmatch_Kp Voltage match PI controller proportional gain Kp.
Synch - Voltage match - PI - Ki Vmatch_Ki Voltage match PI controller integral gain Ki.
Synch - Accepted frequency diff. f_diff Accepted electrical frequency difference between battery inverter and grid to close main contactor. [%]
Synch - Frequency match - PI - Kp fmatch_Kp Frequency match PI controller proportional gain Kp.
Synch - Frequency match - PI - Ki fmatch_Ki Frequency match PI controller integral gain Ki.
Synch - Accepted phase diff. Phase_diff Accepted phase difference between battery inverter and grid to close main contactor. [degrees]
Synch - Phase match - PI - Kp Phase_Kp Phase match PI controller proportional gain Kp.
Synch - Phase match - PI - Ki Phase_Ki Phase match PI controller integral gain Ki.

Tab: "4 - Adv. 2"

In this component tab, the user can specify current controller parameters for the grid following mode (current mode) of the battery inverter model.

Figure 6: Battery inverter model "4 - Adv. 2" parameters.

Battery inverter model "4 - Adv. 2" parameters

Parameter Code name Description
Current mode Id - PI - Kp ImodeId_Kp Current mode d-axis current PI controller proportional gain Kp.
Current mode Id - PI - Ki ImodeId_Ki Current mode d-axis current PI controller integral gain Ki.
Current mode Iq - PI - Kp ImodeIq_Kp Current mode q-axis current PI controller proportional gain Kp.
Current mode Iq - PI - Ki ImodeIq_Ki Current mode q-axis current PI controller integral gain Ki.
Current mode Id and Iq damping gain Imode_damp Current mode damping gain for d and q-axis currents
Maximum power reference change rate powerRate Maximum power reference change rate. [p.u./s]

Tab: "5 - Adv. 3"

In this component tab, the user can specify current controller parameters for the grid forming mode (voltage mode) of the battery inverter model.

Figure 7: Battery inverter model "5 - Adv. 3" parameters.

Battery inverter model "5 - Adv. 3" parameters

Parameter Code name Description
Voltage mode Id ref - PI - Kp VmodeIdRef_Kp Voltage mode voltage PI controller proportional gain Kp. This controller generates the current reference for the voltage mode current controller.
Voltage mode Id ref - PI - Ki VmodeIdRef_Ki Voltage mode voltage PI controller integral gain Ki. This controller generates the current reference for the voltage mode current controller.
Voltage mode Id - PI - Kp VmodeId_Kp Voltage mode d-axis current PI controller proportional gain Kp.
Voltage mode Id - PI - Ki VmodeId_Ki Voltage mode d-axis current PI controller integral gain Ki.
Voltage mode Id overmodulation gain Vmode_ovMod Voltage mode overmodulation gain.
Voltage mode Id damping gain Vmode_damp Voltage mode damping gain for d-axis current.
V reference rising rate V_rise Voltage reference rising rate. [p.u./s]
V reference falling rate V_fall Voltage reference falling rate. [p.u./s]
f reference rising rate f_rise Frequency reference rising rate. [p.u./s]
f reference falling rate f_fall Frequency reference falling rate. [p.u./s]

Tab: "6 - Adv. 4"

In this component tab, the user can specify modulation signals limits and active islanding detector factor for the battery inverter model.

Figure 8: Battery inverter model "6 - Adv. 4" parameters.

Battery inverter model "6 - Adv. 4" parameters

Parameter Code name Description
Modulation signals upper limit mod_upLim Modulation signals maximum value.
Modulation signals lower limit mode_lowLim Modulation signals minimum value.
Active islanding detector k factor k Active islanding detector k factor.

Example

Overall behavior and control methodologies can be better understood with the use of the given battery inverter example:

Model name: battery_inverter.tse and battery_inverter_avg.tse

SCADA interface: SCADA_Panel.cus

Path: /examples/models/microgrid/energy_storage/

Folder: /battery_inverter (switching)/ and /battery_inverter (average)/