parameter optimization of a virtual synchronous …

9
International Journal of Power and Energy Systems, Vol. 36, No. 4, 2016 PARAMETER OPTIMIZATION OF A VIRTUAL SYNCHRONOUS MACHINE IN A MICROGRID Timo Dewenter, Wiebke Heins, ∗∗ Benjamin Werther, ∗∗∗ Alexander K. Hartmann, Christian Bohn, ∗∗∗∗ and Hans-Peter Beck ∗∗∗ Abstract Parameters of a virtual synchronous machine in a small microgrid are optimized. The dynamical behaviour of the system is simulated after a perturbation. The cost functional evaluates the system behaviour for different parameters. It is minimized by Parallel Tempering. Two perturbation scenarios are investigated. The resulting optimal parameters agree with analytical predictions. Dependent on the focus of the optimization, different optima are obtained for each scenario. During the transient the system leaves the allowed voltage and frequency bands only for a short time if the perturbation is within a certain range. Key Words Inverter-based microgrid, virtual synchronous machine, stochastic optimization, parallel tempering 1. Introduction The number of renewable distributed energy resources (DERs) on low and medium voltage grid levels has in- creased in the last decades forced by political, ecological, and economical aspects. Many DERs are interfaced via inverters, which increase the need to find suitable control strategies and parameters for, e.g., frequency-power droop control in autonomous microgrids. Simulation methods, models and stability conditions for microgrids based on droop-controlled inverters are investigated in [1]–[7]. Sta- bility analysis is done in [8], where conditions on the droop gains are derived. Simulations [9]–[12] have been used Institute for Physics, University of Oldenburg, Germany; e-mail: {timo.dewenter, a.hartmann}@uni-oldenburg.de ∗∗ Center for Industrial Mathematics, University of Bremen, Germany; e-mail: [email protected] ∗∗∗ Institute of Electrical Power Engineering and Energy Systems, Clausthal University of Technology, Germany; e-mail: [email protected], [email protected] ∗∗∗∗ Institute of Electrical Information Technology, Clausthal University of Technology, Germany; e-mail: bohn@iei. tu-clausthal.de Recommended by Prof. G.O. Anderson (DOI: 10.2316/Journal.203.2016.4.203-6270) to obtain optimal control parameters of inverters or dis- tributed generators in microgrids. Particle swarm opti- mization is used in [13]–[19]. To enhance stability in microgrids, one can use programmable inverters with storage, as for example, the virtual synchronous machine (VISMA) [20]. It is a hysteresis-controlled three-phase inverter, whose setpoints are determined by a synchronous machine model imple- mented on a control computer. Inertia to improve tran- sient stability of the grid is provided by a storage device. The VISMA is able to control (re-)active power bidirec- tionally and can be adjusted to meet specific power system requirements. Here, the VISMA as grid-building element in a low- voltage islanded microgrid with voltage source inverters is investigated. The basic control strategy is droop control [6], [8] for both voltage and frequency. We use the Par- allel Tempering method [21], [22] for optimization of the VISMA parameters under varying transient loads (see e.g., [23]). Parallel Tempering allows to find (near-) optimal solutions for complex optimization problems [24], [25] effi- ciently. The objective of our analysis is to show that the optimization method is generally applicable to determine optimal control parameters in microgrids. Furthermore, different types of optima allow insights in the effects of the VISMA in combination with regular droop-controlled inverters in microgrids for the first time. In Section 2, the simulation model is described. The optimization problem is stated in Section 3, and Section 4 explains the implementation. Results are presented in Section 5, and a conclusion is given in Section 6. 2. Microgrid Model 2.1 Lines and Loads Lines are modelled as algebraic equations describing the relation between voltage angles θ i (t) and voltage magni- tudes V i (t) at grid node i [1,n] and (re-)active power flows [26]. Magnitudes and angles for all grid nodes are gathered in V (t)=[V 1 (t),V 2 (t),...,V n (t)] T and θ(t)= [θ 1 (t)2 (t),...,θ n (t)] T . The (re-)active power injected at 129

Upload: others

Post on 25-Oct-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PARAMETER OPTIMIZATION OF A VIRTUAL SYNCHRONOUS …

International Journal of Power and Energy Systems, Vol. 36, No. 4, 2016

PARAMETER OPTIMIZATION OF

A VIRTUAL SYNCHRONOUS MACHINE

IN A MICROGRID

Timo Dewenter,∗ Wiebke Heins,∗∗ Benjamin Werther,∗∗∗ Alexander K. Hartmann,∗ Christian Bohn,∗∗∗∗and Hans-Peter Beck∗∗∗

Abstract

Parameters of a virtual synchronous machine in a small microgrid are

optimized. The dynamical behaviour of the system is simulated after

a perturbation. The cost functional evaluates the system behaviour

for different parameters. It is minimized by Parallel Tempering.

Two perturbation scenarios are investigated. The resulting optimal

parameters agree with analytical predictions. Dependent on the

focus of the optimization, different optima are obtained for each

scenario. During the transient the system leaves the allowed voltage

and frequency bands only for a short time if the perturbation is

within a certain range.

Key Words

Inverter-based microgrid, virtual synchronous machine, stochastic

optimization, parallel tempering

1. Introduction

The number of renewable distributed energy resources(DERs) on low and medium voltage grid levels has in-creased in the last decades forced by political, ecological,and economical aspects. Many DERs are interfaced viainverters, which increase the need to find suitable controlstrategies and parameters for, e.g., frequency-power droopcontrol in autonomous microgrids. Simulation methods,models and stability conditions for microgrids based ondroop-controlled inverters are investigated in [1]–[7]. Sta-bility analysis is done in [8], where conditions on the droopgains are derived. Simulations [9]–[12] have been used

∗ Institute for Physics, University of Oldenburg, Germany;e-mail: {timo.dewenter, a.hartmann}@uni-oldenburg.de

∗∗ Center for Industrial Mathematics, University of Bremen,Germany; e-mail: [email protected]

∗∗∗ Institute of Electrical Power Engineering and EnergySystems, Clausthal University of Technology, Germany; e-mail:[email protected], [email protected]

∗∗∗∗ Institute of Electrical Information Technology, ClausthalUniversity of Technology, Germany; e-mail: [email protected]

Recommended by Prof. G.O. Anderson(DOI: 10.2316/Journal.203.2016.4.203-6270)

to obtain optimal control parameters of inverters or dis-tributed generators in microgrids. Particle swarm opti-mization is used in [13]–[19].

To enhance stability in microgrids, one can useprogrammable inverters with storage, as for example,the virtual synchronous machine (VISMA) [20]. It is ahysteresis-controlled three-phase inverter, whose setpointsare determined by a synchronous machine model imple-mented on a control computer. Inertia to improve tran-sient stability of the grid is provided by a storage device.The VISMA is able to control (re-)active power bidirec-tionally and can be adjusted to meet specific power systemrequirements.

Here, the VISMA as grid-building element in a low-voltage islanded microgrid with voltage source inverters isinvestigated. The basic control strategy is droop control[6], [8] for both voltage and frequency. We use the Par-allel Tempering method [21], [22] for optimization of theVISMA parameters under varying transient loads (see e.g.,[23]). Parallel Tempering allows to find (near-) optimalsolutions for complex optimization problems [24], [25] effi-ciently. The objective of our analysis is to show that theoptimization method is generally applicable to determineoptimal control parameters in microgrids. Furthermore,different types of optima allow insights in the effects ofthe VISMA in combination with regular droop-controlledinverters in microgrids for the first time.

In Section 2, the simulation model is described. Theoptimization problem is stated in Section 3, and Section4 explains the implementation. Results are presented inSection 5, and a conclusion is given in Section 6.

2. Microgrid Model

2.1 Lines and Loads

Lines are modelled as algebraic equations describing therelation between voltage angles θi(t) and voltage magni-tudes Vi(t) at grid node i∈ [1, n] and (re-)active powerflows [26]. Magnitudes and angles for all grid nodes are

gathered in V (t) = [V1(t), V2(t), . . . , Vn(t)]T and θ(t) =

[θ1(t), θ2(t), . . . , θn(t)]T. The (re-)active power injected at

129

Page 2: PARAMETER OPTIMIZATION OF A VIRTUAL SYNCHRONOUS …

node i is then described by the power balance equations:

Pi(V (t), θ(t)) = 3(GiiV

2i (t)−

∑k∈N(i) Vi(t)Vk(t)(Gik cos(θi(t)− θk(t)) +Bik sin(θi(t)− θk(t)))

)(1)

Qi(V (t), θ(t)) = 3(−BiiV

2i (t)−

∑k∈N(i) Vi(t)Vk(t)(Gik sin(θi(t)− θk(t))−Bik cos(θi(t)− θk(t)))

)(2)

Here, Gii = Gii +∑

k∈N(i) Gik, Bii = Bii +∑

k∈N(i) Bik,

k∈N(i) denote summation over neighbours k of node i,Y ii = Gii + jBii its shunt admittance, and Y ik =Gik + jBik

is the admittance of line ik.The load is modelled as an external disturbance

Sload(t)=Pload(t)+ jQload(t). Algebraic constraints areintroduced for the node k to which the load is connected:Pload(t)=Pk(V, θ), Qload(t)=Qk(V, θ).

2.2 Droop-Controlled Inverters

Following [8], inverters are modelled as controllable ACvoltage sources described by differential equations. Eachinverter is connected to the grid via an LCL-filter withinductance Linv on the inverter side, filter capacitanceCf, and coupling inductance LC. Here, Vi(t) and θi(t)denote time-varying voltage magnitudes and angles overfilter capacitances Cf, assuming that these are controlledby the inverter.

Droop frequency and voltage control are based ondecentralized proportional controllers. Its adaption toinverter-based microgrids has been investigated [2], [4]–[6],[27] extensively. Because droop control is only propor-tional, an offset error occurs if the system is permanentlydisturbed. The objective of the control strategy is thatin steady state (denoted by ∗) of the closed loop systemdevices participating in droop control share the additional(re-)active power caused by the disturbance:

kP,i (Pnom,i − P ∗i (V

∗, θ∗)) = ω∗i − ωnom,

kQ,i (Qnom,i −Q∗i (V

∗, θ∗)) = V ∗i − Vnom (3)

Here, Pnom,i and Qnom,i denote the nominal activeand reactive power injections of each device. Vnom andωnom denote the nominal voltage magnitude and frequency,respectively. The coefficients kP,i and kQ,i are parameterswhich determine the desired power sharing among devices.A common approach for the choice of droop coefficients kP,i

and kQ,i is proportional load sharing (see [8] for analysis).Based on the power rating Si of each device and takinginto account the legal limits for grid frequency and voltagemagnitudes (49.8–50.2Hz, and 207–253V, respectively),we obtain:

kP,i =0.4 · 2π2Si

rad

s=

0.4π

Si

rad

s, kQ,i =

46V

2Si=

23V

Si∀ i

(4)

In [8], voltage source inverters are modelled with in-stantaneous frequency θi(t)=ωsp,i(t), and first-order-delay

voltage control TinvVi(t)=−Vi(t)+Vsp,i(t), where ωsp,i(t)and Vsp,i(t) denote freely adjustable frequency and volt-age setpoints. Furthermore, power measurements are pro-cessed by low-pass filters with time constants Ti �Tinv.Choosing setpoints ωsp,i(t) and Vsp,i(t) according to (3)gives (see [8] for details):

θi(t) = ωi(t) (5)

Tiωi(t) = −ωi(t) + ωnom + kP,i(Pnom,i − Pi(V (t), θ(t)))

(6)

TiVi(t) = −Vi(t) + Vnom + kQ,i(Qnom,i −Qi(V (t), θ(t)))

(7)

2.3 VISMA

The VISMA [20] is a programmable inverter which mimicsthe dynamics of a synchronous machine. It uses three-phase grid voltages as input and three-phase currents asoutput. Its machine model, which defines how the pro-grammable inverter is supposed to act, is adapted to fit inthe overall model:

θi(t) = ωi(t) (8)

Jωi(t) = −kdTd

ωi(t)− kdTd

d(t)

+1

ωi(t)(Pinject(t)− Pi(V (t), θ(t))) (9)

d(t) = − 1

Tdωi(t)− 1

Tdd(t) (10)

Parameters are the virtual moment of inertia J > 0,the mechanical damping factor kd > 0, and the dampingtime constant Td > 0. Compared to the VISMA modelas stated in [28], this model was obtained by defining a“damping state” d(t)= Td

kdMd(t)−ωi(t) and replacement

of the momentum Mmech(t) by Mmech(t)=1

ωi(t)Pinject(t),

with Pinject(t) denoting the active power injected into thegrid by the VISMA. In this setup, it is used for thepurpose of droop and secondary frequency control, i.e.,Pinject(t)=Pdroop(t)+Psecondary(t). According to (3), itis Pdroop(t)=Pnom,i +

1kP,i

(ωnom −ωi(t)). Secondary fre-

quency control is only performed by the VISMA and real-ized via an integral controller:

x(t) = KI(ωnom − ωi(t)), Psecondary(t) = x(t) (11)

The voltage EP [28] is represented here by the voltagemagnitude Vi(t)> 0 of the VISMA. Voltage dynamics of

130

Page 3: PARAMETER OPTIMIZATION OF A VIRTUAL SYNCHRONOUS …

Figure 1. Scheme of the microgrid setup for simulation in perturbation scenarios.

the VISMA are assumed as a first-order delay with a fasttime constant Tinv,i. A specific voltage control strategy forthe VISMA [29] is implemented using the root mean squarevalue Vgrid,i(t) obtained from the grid voltage measurementbetween stator and grid (cf., Fig. 1) as:

Tinv,iVi(t) = −Vi(t) + Vnom + kV (Vnom − Vgrid,i(t)) (12)

Furthermore, VISMA stator equations [28] are simpli-fied as quasi-static and represented via an algebraic equa-tion Y VISMA = 1

RS+jωnomLSwith stator resistance RS > 0

and stator inductance LS > 0.

2.4 Overall Simulation Model

We choose the VISMA node (node 1) as reference node.All voltage angles are replaced by their difference to thereference node’s voltage angle via Δθi(t) := θi(t)− θ1(t)∀i.Naturally, we have Δθ1(t)≡ 0 and therefore the stateΔθ1(t) and (8) are not needed to describe the fullsystem. A new vector is defined for angle states asΔθ(t)= [Δθ2(t), . . . ,Δθn(t)]

T ∈Rn−1. For lines and

loads, θi(t) can be directly replaced by Δθi(t) ∀ i. Forthe inverters, assuming that none of them is connectedto node 1, (5) is replaced by Δθi(t)=ωi(t)−ω1(t).Given the complex power Si =Pi + jQi, complex cou-pling admittance Y coupl =

1RS + jωnomLS

(or, for the invert-

ers Y coupl =1

jωnomLC), and complex voltage Vi =Vie

jΔθi ,

we obtain the complex voltage V grid,i =Vgrid,iejΔθgrid,i

between VISMA stator or inverter filters and grid as

V grid,i(t)=|V i(t)|2V i(t)

− Si(t)

3Y couplV i(t).

3. Problem Statement

3.1 Optimization Constraints

The objective of the optimization is to find parameters J ,kd, Td, and KI for the VISMA which positively influencethe overall system behaviour after a perturbation. To avoidundesired or physically impossible behaviour, optimizationvariables have to be bounded by user-defined constraints.

The first constraint assures that the VISMA does notreact faster than the other inverters. Therefore, we in-vestigate the dynamics of the VISMA (cf., (9) and (10)).For the purpose of deriving a simple model as referencefor the optimization constraints, the following simplifica-tions are used: only the machine model is investigated,grid and stator equations, differential equations of volt-age dynamics, and secondary control are not considered.Taking P1(V (t),Δθ(t)) as system input u(t), linearizingaround the equilibrium point u∗ =Pnom,1, ω

∗1 =ωnom and

d∗ =−ωnom, and applying the Laplace transform gives thetransfer function:

GVISMA,lin(s) = − kP,1(Tds+ 1)1Ω2 s2 +

D2Ωs+ 1

, c :=1

kP,1ωnom,

D :=1c (kd + J) + Td

2√

1cJTd

, Ω :=1√1cJTd

(13)

The poles are real because D> 1 for any choice of parame-ters (proof omitted), therefore:

spole,1 = −Ω(D +

√D2 − 1

),

spole,2 = −Ω(D −

√D2 − 1

)(14)

From linear system theory, it is known that τ1/2 =− 1

spole,1/2determines the exponential decay rate. This

results in the constraint maxi(Ti)≤ min(τ1, τ2), where Ti isthe time constant of the regular inverters. Assuming stablesystem configurations, i.e., spole,1, spole,2 < 0, we concludethat τ1 <τ2, and therefore:

maxi

(Ti) ≤ 1

Ω(D +

√D2 − 1

) (15)

A second constraint defines an upper bound for theparameter KI of the integral controller (11) based on thedesign preference that integral control action should occuronly after the first part of the transient caused by droopcontrol is finished. For the simplified model (13), more

131

Page 4: PARAMETER OPTIMIZATION OF A VIRTUAL SYNCHRONOUS …

than 95% of the absolute value of the step size are reachedafter 3maxi=1,2(τi) because of the exponential character ofthe linearized system’s step response. The response timeof the integral controller should be larger. A lower boundfor the response time 1

KIof the integral controller, by using

that x(t) is scaled by 1Jωnom

in (13), is given by:

KI ≤ Jωnom

3τ2=

1

3J ωnom Ω

(D −

√D2 − 1

)(16)

3.2 Cost Functional

The cost E to be optimized contains three parts andparameters α> 0 and β > 0:

E[Δf,ΔV, δf, δV]=tfinal+α·(kd+J)+ (Δf/δf+ΔV/δV)︸ ︷︷ ︸=:Σ

(17)

As Σ depends on system trajectories, E is a functional.Parameters α and β allow to shift the focus of the opti-mization. First, the transient after a perturbation shouldbe short, i.e., trelax →min. Time trelax is the relaxationtime of the system after a perturbation, defined here as thelatest time instant in which the frequencies reach 49.999Hzagain. Then, tfinal = trelax − t0, where t0 is the moment ofthe jump in load. Second, the peak depth in the transientsof frequency and voltage should be small to avoid damageon electronic devices, i.e., Δf/δf +ΔV/δV →min, whereΔf = max{i∈{1,2,3}}, t > t0} |fi(t)− fi(t0)| is the maximumfrequency deviation, fi being the frequency at node i. Themaximum voltage deviation is ΔV = max{i∈{1,2,3,4}, t>t0}|Vgrid,i(t)−Vgrid,i(t0)|, with grid voltage Vgrid,i(t).

Third, a trade-off must be found between the requiredstorage capacity of the VISMA, which should be as small aspossible, and the energy that is used to keep up its virtualinertia. By setting Mmech =0 and integrating (9) overtime, the energy provided to or taken from the microgridby the VISMA is:

EVISMA = −1

2(J + kd)

(ω2(t2)− ω2(t1)

)

+Td

∫ t2

t1

ωi(t) Md(t) dt (18)

where Td is responsible for scaling the energy loss dueto damping. The other part of the energy is dominatedby J + kd. To avoid unnecessary large storage capacities,kd + J is minimized. The constraints of the optimizationproblem allow some insights into the structure of theoptima in advance. Choosing a very small kd and Td

close to maxi=1,2 Ti gives values as close as possible tothe lower bound of (15). On the one hand, this indicatesthat an optimization with focus on keeping the transientbehaviour of the VISMA close to those of regular inverters(i.e., minimizing the virtual inertia J+kd and the transienttime tfinal) will give results close to Td ≈ maxi=1,2 Ti, kd ≈ 0and J ≈ cmaxi=1,2 Ti. Minimizing mainly tfinal on theother hand leads to a large value within limits given by(16), namely KI ≈ 1

3kP,1.

Figure 2. Two-dimensional projection of the energy land-scape (value of cost functional E (17)) for scenario 1, closeto min. #2. The parameters Td =0.6, kd =2.6× 10−4, andKI =1, 060 are fixed, J is varied.

4. Implementation

The energy landscape (see Fig. 2) is rough with many lo-cal minima, in particular due to a stochastic term neededfor the initial conditions when solving the differentialequations, preventing the application of standard, e.g.,gradient-based, methods. Instead, Parallel Tempering isused, which works for harder optimization problems, butis easy to implement.

4.1 Parallel Tempering

The optimization algorithm works as follows. The config-urations of the system are sampled according to the Boltz-mann probability distribution P (Ei)= 1/Z exp(−Ei/Θ),where Z is a normalization constant, Ei is the energy ofconfiguration i, and Θ an artificial temperature. This isachieved via a special Monte Carlo (MC) sampling, theMetropolis algorithm [30], where in each iteration, a newcandidate configuration with corresponding energy E2 iscreated and accepted with probability:

pMetr = min{1, e−(E2−E1)/Θ

}(19)

where E1 is the energy of the current state. As (19)fulfils detailed balance, sampling according to a Boltzmanndistribution is ensured. From physics we know that forΘ→ 0, the energy obtains a minimum E→Emin. Thisleads to the idea of Simulated Annealing [31], where thetemperature of an MC simulation is gradually decreaseduntil a minimum is found. This approach can get stuckin a local minimum. An improvement is to simulate thesystem at various temperatures Θi. This can be doneby Parallel Tempering [21], [22], where a random walkin temperature space is performed. To preserve detailedbalance and equilibrium for an infinite number of iterations,the Metropolis criterion [21] with energies E(· ) is used:

pSwap = min

{1, exp

([1

Θk− 1

Θk+1

][E(yk)− E(yk+1)]

)}

(20)

Two neighbouring configurations with temperaturesΘk,Θk+1 (k∈ [1, n− 1]) can be exchanged. In each suchswap, k∈{1, 2, 3, . . . , n−1} is chosen at random with equalprobability.

132

Page 5: PARAMETER OPTIMIZATION OF A VIRTUAL SYNCHRONOUS …

Table 1Parameters Used for the Optimization in All Scenarios. Values for T2/3 Taken from [8]

Llines LS Rlines RS LC T1 T2/3 kV Qnom,1/2/3

1.514mH 42.0mH 0.0 Ω 0.3 Ω 1.8mH 0.01 s 0.5 s 10.0V/V 0.0 var

Table 2Parameters Used for the Optimization in Scenario 1

S1/2/3 Pnom,1/2/3 kP,1/2/3 kQ,2/3 Pload before Jump Pload after Jump

4,000.0 VA 500.0 W 3.1416× 10−4 rad/(s VA) 5.75·10−3 V/VA 1,500.0 W 4,500.0 W

Table 3Optimal Parameter Sets for Scenario 1 (Rperc =0.4, Focus on Frequency Peak: δf =0.05, δV =1040). Errors of E Resulting

from 50 Runs with Different Initial Conditions

# J kd/10−4 Td KI E α β J + kd Σ tfinal α(J + kd) Σ/β

1 5.0895 1.1857 0.5029 1,054.56 108.93(6) 7 0.027 5.090 0.994 36.483 35.627 36.820

2 91.479 2.5800 0.5917 1,060.97 35.12(2) 0.07 2.7 91.480 0.817 28.415 6.4036 0.3026

3 5.0692 1.0071 0.5163 975.67 3,624.89(9) 700 0.027 5.069 1.000 39.379 3,548.494 37.026

4 50.894 10.1498 1.2539 1,053.54 3,425(46) 7 2.7× 10−4 50.895 0.820 32.913 356.265 3,036.54

4.2 Optimization Algorithm

Within an optimization procedure, one of two perturbationscenarios is considered. Both are based on a step inload. During the transient it is checked whether the usualfrequency and voltage ranges are met (see (4)). If theseare not fulfilled, the parameter set is rejected, i.e., E=∞.Before (17) is calculated in the simulation, the constraints(15) and (16) are checked. If they are not fulfilled, theparameter set is rejected.

We use from the GNU scientific library (GSL) [32]: ahybrid method (Newton and dogleg step) for solving thesteady-state equations, where the results are used as initialconditions for the Runge–Kutta–Fehlberg method to solvethe differential equations. For parallelization, we use Open-MPI [33]. The 12 temperatures used in the simulationsare Θi ∈{0.01, 0.02, 0.07, 0.2, 0.5, 1, 3, 7, 20, 50, 100, 109},where 109 corresponds to the acceptance of every newstate except the ones that violate (15), (16) or lead to anunstable system state. For each temperature Θi, the MCsampling is performed in the following way:

1. Calculate value of cost functional E1 with given pa-rameter set Φ= (J, kd, Td,KI).

2. Choose one parameter O of the four parameters fromΦ with equal probability at random.

3. Calculate O′ =O · m with m= |1+Rperc · r|, wherer∈ [−1, 1] is a random number.

4. Calculate new value of E2 with modified parameter setΦ′ in which O has been replaced by O′.

5. Accept the new parameter set Φ′ with Metropolisprobability (19).

The steps 2–5 are repeated Nparams· 2=4· 2=8 times.After two such sweeps are performed for each temperature,

n− 1 swap attempts are done. For each of these attempts,the procedure is the following: First, choose a configurationk∈ [1, n− 1] uniformly at random. Then, exchange thetwo configurations yk and yk+1 with the swap probabilitygiven by (20). For each parameter set (α, β), 200 swaps areperformed with Rperc =0.8. The minimum of E is foundby taking the minimum of all temperatures Θi leadingto Φmin. Another simulation [34] with Φmin as initialparameter set is started with 200 swaps and Rperc =0.4.

5. Results

5.1 Optimization Results

A microgrid in a radial topology in island mode is consid-ered for different perturbation scenarios, see Fig. 1. Weneglect ohmic grid losses and focus on the frequency peak,i.e., δV =1040. The perturbation is a jump in active load.Table 1 shows the parameters which remain the same forall scenarios.

5.1.1 Scenario 1

In this scenario, equal nominal and rated powers for alldevices are assumed and a step decrease of the load powerof 3 kW is done. See Table 2 for all parameters. In thelast three columns of Table 3 the values of the parts of thecost functional (17) are given, which reflect on which partof the functional the optimization has been focused. Forthe first minimum (#1) the three parts of (17) have thesame weight, the second minimum (min.) focuses on tfinal,the third on the value of J + kd, and the fourth on smallfrequency peaks (Σ). For the second, third and fourthmin. the focus is reflected in the result, i.e., min. #2 has

133

Page 6: PARAMETER OPTIMIZATION OF A VIRTUAL SYNCHRONOUS …

Figure 3. Comparison of the minima for scenario 1 (see Table 3) for frequencies (left) and voltages (right).

Figure 4. Minimum #1 of Scenario 1.

Table 4Parameters Used for the Optimization in Scenario 2

S1 S2 S3 Pnom,1 Pnom,2 Pnom,3 kP,1 kP,2

9.0 kVA 3.0 kVA 1.0 kVA 1.0 kW 1.5 kW 0.5 kW 1.3963× 10−4 rad/(s VA) 4.1888× 10−4 rad/(s VA)

kP,3 kQ,2 kQ,3 Pload before Jump Pload after Jump

12.5664× 10−4 rad/(s VA) 7.67× 10−3 V/VA 23.0× 10−3 V/VA 3.0 kW 10.0 kW

the smallest value of tfinal, min. #3 the smallest of J + kd.Min. #4 gives a comparably small value for Σ, but only alocal min. was found, as in min. #2 it is even smaller.

In Section 3.2, it was stated that Td≈maxi=1,2 Ti=0.5,kd ≈ 10−4 (because it is bounded by this value) andJ ≈ cmaxi=1,2 Ti ≈ 10.13 · 0.5≈ 5.07 in cases where J + kdand tfinal are minimized with equal weighting, andKI ≈ 1

3kp,1≈ 1, 061.03, if the minimization focuses on tfinal.

These values are close to min. #1 and min. #3, andmin. #2 for focussing on tfinal. Weightings on other partsof the cost functional (e.g., min. #4) lead to minima whichare further away from the bounds of the optimizationconstraints.

The results from Table 3 are visualized in Fig. 3 bya comparison for VISMA frequencies and voltages for allfour minima. The remaining grid values are shown onlyfor the first minimum in Fig. 4.

5.1.2 Scenario 2

In this scenario, we assume different rated and nominalactive powers and a step in load of 7 kW (see Table 4). Theoptimal parameter sets obtained for this setup are shown inTable 5. Figure 5 shows the system behaviour for min. #1of Scenario 2. The VISMA’s reaction is very slow due to itshigh virtual inertia (for min. #1, J ≈ 11.5), therefore theinverters balance the sudden power demand directly afterthe load jump and provide active power at a value (∼8 kW)above their nominal rated power values S2/3. Inverters forisland grids usually allow this for a short time.

134

Page 7: PARAMETER OPTIMIZATION OF A VIRTUAL SYNCHRONOUS …

Table 5Optimal Parameter Sets for Scenario 2 (Rperc =0.4, Focus on Frequency Peak: δf =0.2, δV =1040). Errors of E Resulting

from 50 Runs with Different Initial Conditions.

# J kd/10−4 Td KI E α β J + kd Σ tfinal α(J + kd) Σ/β

1 11.4986 1.1595 0.5035 2,379.26 59.26(1) 1.7 0.045 11.499 0.902 19.671 19.548 20.046

2 59.3043 4.2760 0.9356 2,387.04 14.99(1) 0.017 4.5 59.305 0.887 13.781 1.0082 0.1971

3 11.4076 1.0139 0.5064 2,348.85 1,979.32(1) 170 0.045 11.408 0.902 19.967 1,939.309 20.040

4 16.8974 13.2759 0.6524 2,382.76 2,039.5(5) 1.7 4.5× 10−4 16.899 0.896 19.076 28.728 1,991.7

Figure 5. Minimum #1 of Scenario 2.

Despite the different system behaviour compared toScenario 1, the effect of the optimization with differentweights is clearly reflected in the values of the cost func-tional (see Table 5). The very small tfinal for min. #2is due to an overshoot in frequencies (figure not shown):after reaching 49.999Hz for the first time, f1 leaves therange of [49.999, 50.001] again before returning to 50Hz.Optimizations for the same scenarios with ohmic losses inlines have been performed (results not shown). Thoughtransients show different characteristics, almost the sameparameter sets are found.

6. Conclusion

Parameters of a VISMA in an islanded microgrid withradial topology containing two inverters and a load have

been optimized using Parallel Tempering. By varyingadditional parameters in the cost functional, the focusof the optimization was shifted. For two perturbationscenarios, minima of the cost functional were found whichare stable solutions within the prescribed boundaries. Theresults show that this optimization procedure is in generalapplicable to the task of parameter optimization in amicrogrid. It is also shown that through the proper settingof the VISMA’s parameters its functionality can be adaptedto different participants in the grid. The values obtainedby analytical investigation in Section 3.2 seem to offer a“rule of thumb” for a good parameter region. However,the effects of each parameter in complex situations arenot obvious. For other topologies, devices or disturbances,totally different parameter sets might be needed. To finda good parameter set for a given microgrid setup, variousdisturbances should be analyzed.

In future research, other forms of the constraints forthe VISMA parameters and cost functionals should be in-vestigated. Larger microgrids with other power generatingsystems can be put under scrutiny. The proposed approachcould be transferred to the optimization of parameters inother control strategies. An extension would be the studyof different disturbance scenarios, where one uses, for ex-ample, a series of steps in load. Finally, theoretical resultsshould be confirmed by measurements in an appropriatelaboratory.

Acknowledgement

Simulations were performed at the HERO cluster of theCarl von Ossietzky Universitat Oldenburg, funded by theDFG through its Major Research Instrumentation Pro-gramme (INST 184/108-1 FUGG) and the Ministry ofScience and Culture of the Lower Saxony State. Finan-cial support was obtained by the Lower Saxony researchnetwork “Smart Nord” which acknowledges the support ofthe Lower Saxony Ministry of Science and Culture throughthe “Niedersachsisches Vorab” grant programme (grantZN2764).

References

[1] N. Pogaku, M. Prodanovic, and T. Green, Modeling, analysis,and testing of autonomous operation of an inverter-basedmicrogrid, IEEE Transactions on Power Electronics, 22, 2007,613.

135

Page 8: PARAMETER OPTIMIZATION OF A VIRTUAL SYNCHRONOUS …

[2] E. Coelho, P. Cortizo, and P. Garcia, Small signal stability forparallel connected inverters in stand-alone AC supply systems,IEEE Transactions on Industry Applications, 38, 2002, 533.

[3] M. Marwali, J. Jung, and A. Keyhani, Stability analysis ofload sharing control for distributed generation systems, IEEETransactions on Energy Conversion, 22, 2007, 737.

[4] E. Barklund, N. Pogaku, M. Prodanovic, C. Hernandez-Aramburo, and T.C. Green, Energy management in au-tonomous microgrid using stability-constrained droop controlof inverters, IEEE Transactions on Power Electronics, 23,2008, 2346.

[5] N.L. Soultanis, S.A. Papathanasiou, and N.D. Hatziargyriou,A stability algorithm for the dynamic analysis of inverterdominated unbalanced LV microgrids, IEEE Transactions onPower Systems, 22(1), 2007, 294–304.

[6] A. Engler, Applicability of droops in low voltage grids, DERJournal, 1(1), 2005, 3–15.

[7] J.W. Simpson-Porco, F. Dorfler, and F. Bullo, Synchronizationand power sharing for droop-controlled inverters in islandedmicrogrids, Automatica, 49 (9), 2013, 2603–2611.

[8] J. Schiffer, R. Ortega, A. Astolfi, J. Raisch, and T. Sezi, Condi-tions for stability of droop-controlled inverter-based microgrids,Automatica, 50, 2014, 2457–2469.

[9] A. Raghami, M.T. Ameli, andM. Hamzeh, Online droop tuningof a multi-DGmicrogrid using cuckoo search algorithm, ElectricPower Components and Systems, 43(14), 2015, 1583–1595.

[10] R.B. Godoy, J.O.P. Pinto, C.A. Canesin, E.A.A. Coelho, andA.M.A.C. Pinto, Differential-evolution-based optimization ofthe dynamic response for parallel operation of inverters withno controller interconnection, IEEE Transactions on IndustrialElectronics, 59, 2012, 2859.

[11] S. Mishra, G. Mallesham, and A. Jha, Design of controller andcommunication for frequency regulation of a smart microgrid,IET Renewable Power Generation, 6, 2011, 248.

[12] M.J. Sanjari and G.B. Gharehpetian, Game-theoretic approachto cooperative control of distributed energy resources in is-landed microgrid considering voltage and frequency stability,Neural Computing and Applications, 25, 2013, 343.

[13] I.-Y. Chung, W. Liu, D.A. Cartes, and S.-I. Moon, Controlparameter optimization for multiple distributed generatorsin a microgrid using particle swarm optimization, EuropeanTransactions on Electrical Power, 21, 2011, 1200.

[14] M. Hassan and M. Abdio, Optimal design of microgrids inautonomous and grid-connected modes using particle swarmoptimization, IEEE Transactions on Power Electronics, 26,2011, 755.

[15] W. Al-Saedi, S. Lachowicz, D. Habibi, and O. Bass, Powerquality enhancement in autonomous microgrid operation usingparticle swarm optimization, International Journal of ElectricalPower & Energy Systems, 42, 2012, 139.

[16] H. Bevrani, F. Habibi, P. Babahajyani, M. Watanabe, andY. Mitani, Intelligent frequency control in an AC microgrid:Online PSO-based fuzzy tuning approach, IEEE Transactionson Smart Grid, 3, 2012, 1935.

[17] L. Yu, M. Chen, D.C. Yu, L. Zhang, F. Yang, and J. Zhai,A novel information exchange particle swarm optimizationfor microgrid multi-objective dynamic optimization control,Journal of Renewable and Sustainable Energy, 6(2), 2014,023114.

[18] Y. Zeng and S. Yanguang, Enhanced multi-objective particleswarm optimization for optimal reactive power dispatch con-sidering voltage stability, International Journal of Power andEnergy Systems, 34, 2014, 116–24.

[19] P. Wang, J. Wan, R. Luo, F. Zhao, and X. Wei, Control pa-rameter optimization for AP1000 reactor using particle swarmoptimization, Annals of Nuclear Energy, 87, Part 2, 2016,687–695.

[20] H.-P. Beck and R. Hesse, Virtual synchronous machine, IEEENinth International Conf. on Electrical Power Quality andUtilisation (EPQU), Barcelona, Spain, 2007.

[21] K. Hukushima and K. Nemoto, Exchange Monte Carlo methodand application to spin glass simulations, Journal of thePhysical Society of Japan, 65, 1996, 1604.

[22] R.H. Swendsen and J.-S. Wang, Replica MC simulation ofspin-glasses, Physical Review Letters, 57, 1986, 2607.

[23] M.S. Rahman Tito, T.T. Lie, and T. Anderson, Sizing op-timization of wind-photovoltaic hybrid energy system undertransient load, International Journal of Power and EnergySystems, 33, 2013, 168–174.

[24] A.K. Hartmann and H. Rieger, Optimization algorithms inphysics, 1st ed. (Berlin: Wiley-VCH, 2001).

[25] A.K. Hartmann and H. Rieger (eds.), New optimization algo-rithms in physics (Weinheim: Wiley-VCH, 2004).

[26] P. Kundur, Power system stability and control (New York,NY: McGraw-Hill, 1994).

[27] M. Chandorkar, D. Divan, and R. Adapa, Control of par-allel connected inverters in stand-alone AC supply systems,IEEE Transactions on Industry Applications, 29(1), 1993,136–143.

[28] T. Dewenter, B. Werther, A.K. Hartmann, and H.-P. Beck,Optimierung des dynamischen Verhaltens netzstutzenderAnlagen am Beispiel der Virtuellen Synchronmaschine,Proc. 13th Symp. Energieinnovation (EnInnov2014), Graz,Austria, 2014.

[29] Y. Chen, R. Hesse, D. Turschner, and H.-P. Beck, Improvingthe grid power quality using VISMAs, International Conf. onPower Engineering, Energy and Electrical Drives (POW-ERENG), Malaga, Spain, 2011.

[30] N. Metropolis, A.W. Rosenbluth, M.N. Rosenbluth, A.H.Teller, and E. Teller, Equation of state calculations by fastcomputing machines, Journal of Chemical Physics, 21, 1953,1087–1092.

[31] S. Kirkpatrick, C.D. Gelatt, and M.P. Vecchi, Optimizationby simulated annealing, Science, 220 (4598), 1983, 671–680.

[32] M. Galassi, J. Davies, J. Theiler, B. Gough, G. Jungman,P. Alken, M. Booth, and F. Rossi, GNU scientific libraryreference manual, 3rd ed., (Bristol: Network Theory Ltd.,2009).

[33] E. Gabriel, G.E. Fagg, G. Bosilca, T. Angskun, J.J. Dongarra,J.M. Squyres, V. Sahay, P. Kambadur, B. Barrett, A. Lums-daine, R.H. Castain, D.J. Daniel, R.L. Graham, and T.S.Woodall, Open MPI: Goals, concept, and design of a next gen-eration MPI implementation, Proc. 11th European PVM/MPIUsers’ Group Meeting, Budapest, Hungary, 2004.

[34] A.K. Hartmann, Big practical guide to computer simulations(Singapore: World Scientific, 2015).

Biographies

Timo Dewenter was born inStuttgart, Germany, in 1986. Hereceived his bachelor degree inphysics in 2010 from the Univer-sity of Oldenburg, Germany. In2012, he obtained his master’sdegree in physics at the sameuniversity, where the topic of themaster’s degree thesis was disor-dered magnetic systems. From2012 to 2016, he has been a Ph.D.student in the working group

“Computational Theoretical Physics” at the University ofOldenburg. In the course of his Ph.D. thesis, he workedon convex hulls of multiple random walks, the distributionof resilience of power grids, and the parameter optimiza-tion of virtual synchronous machines (in connection withmicrogrids). Since July 2016, he is working at the KistersAG in Oldenburg. His research interests are disorderedsystems, (parameter) optimization, and (simplified) modelsof power grids also in connection with virtual synchronousmachines.

136

Page 9: PARAMETER OPTIMIZATION OF A VIRTUAL SYNCHRONOUS …

Wiebke Heins was born in Bre-mervorde, Germany, in 1985. Shereceived her diploma degree inapplied mathematics from theClausthal University of Technol-ogy, Clausthal-Zellerfeld, Ger-many, in 2012. From 2012 to 2015,she has been a research assistantwith the Institute of Electrical In-formation Technology, ClausthalUniversity of Technology, whereshe was involved in several re-

search projects on monitoring and control of distributionpower systems. Since 2016, she is with the working groupfor Optimization and Optimal Control at the Center forIndustrial Mathematics of the University of Bremen, andthe Steinbeis Innovation Center for Optimization and Con-trol, Grasberg, where she is working on optimal schedulingtechniques for the control of clustered generation and con-sumption units. Her research interests include system anal-ysis, optimal scheduling and control of distribution powersystems with decentralized and renewable generation.

Benjamin Werther was born inWissen, Germany, in 1977. Hereceived his Diplom-Ingenieur de-gree in electrical engineering fromthe Paderborn University, Ger-many, in 2005. From 2005 to 2009,he was a development and con-sulting engineer in the companySystem & Dynamik in Paderborn.Between 2009 and 2016, he hasbeen a research assistant at theInstitute of Electrical Power En-

gineering and Energy Systems and at the Energy ResearchCenter of Lower Saxony (EFZN), which both are scien-tific institutions of the Clausthal University of Technology,Clausthal-Zellerfeld, Germany. Since November 2016, he iswith the AEG Power Solutions GmbH inWarstein-Belecke.His research interests are in non-linear system theory andelectrical power grids.

Alexander K. Hartmann wasborn in 1968 in Heidelberg,Germany. From 1987 to 1993,he studied computer science atthe FernUniversitat in Hagen. Heperformed his diploma thesis onthe simulation of fault-tolerantsystems. From 1987 to 1994, hestudied physics at the Universityof Duisburg-Essen, completingwith a diploma thesis on the cal-culation of ground states of di-

luted antiferromagnets in a field. From 1994, he workedat the University of Heidelberg on simulation of polymer/noble-gas mixtures and completed his Ph.D. in 1998. Hewas a postdoctoral at the Universities of Gottingen, Santa

Cruz and Ecole Normale Paris. From 2003, he was headingthe junior research group “Complex Ground States ofDisorderd Systems” in Gottingen. In 2004, he completedhis habilitation. Since 2007, he is Professor for Computa-tional Theoretical Physics at the University of Oldenburg,Gernamy. His research interests are disordered systems,bioinformatics, and optimization problems.

Christian Bohn was born inHamburg, Germany, in 1969 andstudied electrical engineering atthe University of Sussex, England,and the Technische UniversitatBraunschweig, Germany, fromwhich he obtained the Diplom-Ingenieur degree in 1994. From1994 to 2000, he was a researchassociate at the Control Engineer-ing Institute, Ruhr-UniversityBochum, Germany, where he com-

pleted his doctorate in 2000. He then joined ContinentalAG, where he worked on active noise and vibration controlfor passenger vehicles. From 2004 to 2007, he was with IAVGmbH, where he worked on control function developmentfor combustion engines and the development of componentsfor hybrid electric vehicles. Since 2007, he has been aprofessor for control engineering and mechatronics at theClausthal University of Technology, Clausthal-Zellerfeld,Germany. His research interests are advanced control andestimation methods and their application to industrialsystems.

Hans-Peter Beck was born inEhmen, Germany, in 1947. Hereceived the Diplom-Ingenieurand Ph.D. degree in electricalengineering from the TechnischeUniversitat Berlin in 1976 and1981, respectively. From 1977 to1989, he was with the AllgemeineElektricitats-Gesellschaft (AEG),Berlin, at the branch ElectricalPower Engineering. In 1982, hebecame head of the laboratory

Novel Energy Systems, and in 1985 head of the designdepartment Electrical Railway Traction Vehicle of theAEG division Railway Technology. Since 1989, he isprofessor and director of the Institute of Electrical PowerEngineering and Energy Systems, Clausthal University ofTechnology, Clausthal-Zellerfeld, Germany. Since 2008, heis also managing director of the Energy Research Centerof Lower Saxony (EFZN). He is a full member of theBraunschweigische Wissenschaftliche Gesellschaft and ofthe National Academy of Science and Engineering (acat-ech), and member of the technical and scientific advisorycouncil of the journal Antriebstechnik.

137