0% found this document useful (0 votes)
3 views113 pages

State Space of Droop Microgrid Control

Chapter 3 discusses the state space representation of droop-based microgrid systems, focusing on the operation and control of distributed generators (DGs) within microgrids. It outlines the differences between grid-connected and island modes, the limitations of islanded microgrids, and the classification of DG operations into grid-forming and grid-following units. The chapter also details droop-based control mechanisms for managing power and frequency changes, highlighting the importance of local controllers in maintaining voltage and frequency stability.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views113 pages

State Space of Droop Microgrid Control

Chapter 3 discusses the state space representation of droop-based microgrid systems, focusing on the operation and control of distributed generators (DGs) within microgrids. It outlines the differences between grid-connected and island modes, the limitations of islanded microgrids, and the classification of DG operations into grid-forming and grid-following units. The chapter also details droop-based control mechanisms for managing power and frequency changes, highlighting the importance of local controllers in maintaining voltage and frequency stability.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 3

State Space Representation of a


Droop-based Microgrid System

Professor Mohammad Shahidehpour


Galvin Center for Electricity Innovation
Illinois Institute of Technology

1
Outline
• DGs in Microgrids
• Introduction to Microgrid Control
• DG Droop Control in Microgrids
• State Space Representation of a Microgrid
System
• Utility-Connected Microgrid Control for
Regulating the Power Flow

2
DGs in Microgrids

Fig. 1. An Example: Microgrid in IIT Campus

• DC sources like solar PV, fuel cells and battery storage (DC power is directly
converted into P-f (60 Hz) AC)
• AC sources like micro-turbines and wind turbines (AC output at non-standard
frequencies is first rectified to DC and then converted into AC through
converters)
• Both, DC/AC conversion takes place through an inverter (VSC: voltage source
converter) that forms the principal component of the power system.
3
Microgrid Operation Modes

• A microgrid is connected to the main grid via the point of common coupling
(PCC).
• Microgrids are able to operate in both grid-connected and island modes as
shown in Fig. 1.
• Here, in each mode indicated in Fig. 2, two out of four variables are given.
- grid-connected mode: frequency (angle) and voltage are fixed by the grid,
and P and Q are determined by the microgrid.
- Island mode: it is operated as a self-controlled entity where P and Q are
given and we determine frequency (angle) and voltage to serve the local
load.
• In applications like
avionics, automotive,
marine, or rural areas,
microgrids are operated
in the island mode.
Fig. 2. Different PCC switch in island and grid-connected modes
4
Limitations of Islanded Microgrid

• Most of the technical challenges imposed by microgrid operations are


associated with the island mode of microgrid:
- Limited supply and demand balancing: An islanded microgrid needs to
rely on its on-site resources to eliminate the imbalance between power
generation and load demand.
- Voltage and frequency management: An islanded microgrid should
maintain reliable power services to the local load by regulating voltages
and the frequency within acceptable limits.
- Power quality: Without the support of the main grid, the power quality
should also be carefully monitored and guaranteed by an islanded
microgrid. The power quality can be improved by reactive power
compensation, which may not be sufficiently available, and harmonics
inside the microgrid.

5
Microgrid Control
• Microgrid control is quite different from the control for the main grid:
- Controllable DGs are interfaced by power electronic devices such as inverters.
- DG/inverter does not have a large rotating mass. They respond much faster
and have low inertia.
- Microgrid cables connecting DGs to local loads are often resistive.
- Microgrids can be islanded. In island mode, VSCs control the microgrid voltage
and frequency through local control controllers.
- Microgrid control system ensures that microgrid can connect/disconnect itself
to/from the utility in a rapid and seamless fashion.
- Power sharing is a fundamental control mechanism in microgrids, including
- sharing the microgrid load among paralleled DGs;
- sharing the microgrid load with main grid by regulating power
exchanges between the microgrid and the main grid.

6
Classification of DG Operations
• For microgrid control, DGs in a microgrid are classified into grid-forming and
grid-following units.
• When microgrid is in island mode, grid-forming DGs act as voltage source
converters (VSC) to maintain the microgrid voltage and frequency within
permissible ranges.
• When microgrid is in grid-connected, grid-following DGs act as current source
converters (CSC) to follow the grid frequency and voltage.
Table 1. Comparison of grid-forming and grid-following DGs
DGs Referred to as Operation Application Devices
Dispatchable, Gas-turbine generators,
Grid-forming voltage-source
fast response CHPs, Diesel generators,
DGs converter (VSC)
generating units Energy storage devices
Non-dispatchable
Grid-following current-source Wind units, Solar PV units,
generating unit;
DGs converter (CSC) Fuel cells
(negative load)

7
Microgrids with DGs
In Fig. 3, a key feature of a microgrid with DG is that the sources are dispersed
geographically and interconnected by a distribution network within the microgrid.
Microgrid is connected to the main power grid when it is grid-connected.

• Fig. 3(a) shows a microgrid


structure connected to the main
grid. The figure also shows the
microgrid line impedances (Z01,
Z12,…, Zn−1,n).
• Individual sources are connected
to the microgrid distribution
network through an inverter, a
Lf Lc
+
- filter, LfCf , and an inductor (Lc)
Cf
Battery shown in Fig. 3(b), which connect
interface
the DG to the rest of the
microgrid.
Fig. 3. A grid-connected microgrid 8
Grid-Connected DG
• Fig. 4 shows the details of a single DG with grid connection.
• Controller sends gate pulses to inverter that generates a three phase 480V line
to line voltage (Vabc).
• This waveform is rich in high frequency harmonics.
• To filter out the harmonics, we use a low pass filter (LfCf) which is connected at
the inverter terminals.
• There is a series coupling inductance and transformer for connecting the DG to
the AC grid.

v abcX( t ) 480 V 208 V


F

+
Local
VDC Inverter
Feeder

Gate
XLFf LXc
eabc ( t ) n
Signals C
CF f
iabc ( t )

Controller
Feeder Currents iabc (t ) Towards
Grid

Fig. 4. Grid-connected DG diagram 9


Control of DG
• In Fig. 4, measured quantities in DG are voltage and current (eabc, iabc) and frequency
at the utility (load) side, and voltage at the inverter terminal (vabc). From these
quantities, it is possible to extract the load voltage magnitude and the active and
reactive power injected by the DG. The DG system is shown in Fig. 5.

Fig. 5. DG Operation and Control 10


Droop-based Control of DGs
• Droop-based control manages rapid power and frequency changes.
- Droop-based DG control can adjust real and reactive power.
- Droop-based control resembles the control in large synchronous generators.
An imbalance between input and output causes a change in the rotor speed
and a frequency deviation which causes the power to change. Similarly,
reactive power control maintains voltages within permissible ranges.

• Despite its advantages, microgrid causes changes in power flow pattern (two-way
flow), high frequency harmonics, and frequency and voltage fluctuations because
of the renewable energy variability in the local utility grid.

• Local controllers (LCs) at building and generator sides of a microgrid would offer
voltage and frequency controls to keep variables within permissible ranges.

11
DG Droop Control
Consider a local controller model (DG plus inverter) shown in Fig. 6. At point S, the
active and reactive powers can be expressed as:
Vs2 VsVL (1)
P cos - cos(   )
Z Z
2
V VV
Q  s sin  - s L sin(   ) (2)
Z Z
where is the angle of line impedance Zej= R+jX. Then, (1)-(2) are re-written as
Vs (3)
P  R Vs - VL cos    XVL sin  
R2  X 2 
V
Q  2 s 2 - RVL sin   X Vs - VL cos    (4)
R X

 

Fig. 6. Islanded DG with an inverter system


12
DG Droop Control
The above equations show the dependency of the inverter output voltage and the
power angle to active and reactive powers. Assuming that the line is inductive
(X>>R), and θ and  are small angles, we have

XP XQ (5)
  , Vs - VL 
VsVL Vs

(5) shows that in inductive microgrids, P must be controlled for regulation of 


Also, Vs is controllable by Q.
In these microgrids, the output reactive power controls the inverter voltage, and
the active power controls the system frequency, independently.
These strategies are known as Q/V and P/f controls, respectively.

13
DG Droop Control
Using (5), the two equations in (6) are defined by applying a linear approximation
for Q/V and P/f controls:
f  f n   m p ( P  Pn )
Vs  Vsn  nq (Q  Qn ) (6)
where fn and Vsn are nominal microgrid frequency and voltage.
Here, mp and nq are DG droop coefficients for frequency and voltage controlled by
droops as shown in Fig. 7.

Fig. 7. Linear droop curves in P-f and Q-V droop controls for DG

14
Resistive Droop Control for DG

If the DG is resistive (X<<R) , then (5) is modified to

RQ PR
   Vs  VL  (7)
VsVL Vs

(7) shows a strong linkage between reactive power and power angle, as well as
between active power and voltage. Here, the frequency regulation indirectly
controls power angle.
Thus, in resistive microgrids, the P/V and Q/f droop control techniques are needed
for the voltage and frequency controller synthesis, respectively.
This model is contrary to the traditional control applied to electric power system
and is often perceived as undesirable in microgrid controls.

15
Generalized Droop Control for DG
In a general case, both X and R should be considered. If we start with (1) and (2)
and a dq transformation in order to decouple the reference frequency,
X R
 
 P '  P   sin   cos   P   Z Z P (8)
 Q '  T Q   cos     
     sin   Q   R X  Q 
 Z Z 
Hence, modified active and reactive powers ( P’ and Q’ ) are required as follows:

X R
P'  P Q
Z Z
R X
Q'  P  Q (9)
Z Z
Using (6), we have X
P'   K f f  Pn  K R KV Vs  K R Qn  (10)
Z
X
Q'   K R K f f  k R Pn  KV Vs  Qn 
Z (11)

where KR=R/X, KF=-1/mp, KV=-1/nq. The f and VS are inverter frequency and
voltage deviations, respectively. 16
Generalized Droop Control for DG

Accordingly, the following expressions are obtained.


1 Z  K R KV KR
f   P ' Pn  Vs  Qn (12)
Kf  X  Kf Kf

1 Z  KR K f KR (13)
Vs   Q '- Qn  f  Pn
KV  X  KV KV
Here, Kf affects the weighting coefficients of VS and Qn in the second and third
terms of (12), respectively.
Thus, to prevent an undesired effect of Kf on VS and Qn in the second and third
terms of (12), we assume Kf is equal to 1.
Similarly, in the second and third terms of (13), KV should be fixed at unity. Then we
can obtain the following generalized droop control relationship:

1 Z 
f   P ' Pn   K R KV Vs  K R Qn (14)
Kf  X 
1 Z 
Vs   Q ' Qn   K R K f f  K R Pn
(15)
KV  X 
17
Generalized Droop Control of DG
Fig. 8 shows the block diagram realization of + +
+

(14) and (15) for the generalized droop - +

control.
Fig. 9 shows a DG with the droop controller. -
+
-

+ -

Fig. 8. A general block diagram of DG

IIDG
+ PWM Z=R+jX
Inverter
Lf Lc
DG S L
Source Cf
-
Gate Bus
L
O
fn Generalized Droop Control
Power Controller A
+ D
+
∆f +
+
-
+
V
+
Power
+ -
+ calculator I
+
- -
+

Fig. 9. A MG with a general block diagram of VSC 18


DG Simulations
Table 2. Inverter parameters
Parameter Value Parameter Value Parameter Value Parameter Value
VL-L 380 V CF 30 F Fs 4 kHz rLc 0.1 
F 50 Hz rcf 5 Lf 6 mH Kf -1.06
PNOM 30 kVA LLc 3mH rf 0.2  KV -100

Fig. 10. Load variations scenario


Fig. 11. System response for load disturbance with
Active load increases: 0.6s,0.8s and 1s different KR (10: dotted, 0.1: dashed line, 1:solid)
Reactive load increases: 1.2s, 1.4s and 1.6s

19
Summary of Droop Control for DG
Table 3. Droop Control Comparisons

Type of System Type of Droop Droop Characteristics


Inductive system Conventional VsVL V (V  VL )
P ,Q  s s
(X>>R) P-f/Q-V droop X X

Resistive system Vs (Vs  VL ) VV 


P-V/Q-f droop P ,Q   s L
(R>>X) R R
Vs
P  R Vs - VL cos    XVL sin  
System with R2  X 2 
Generalized droop
complex Impedance V
Q  2 s 2  X Vs  VL cos    RVL sin  
R X
• The conventional P-f / Q-V droop is the most widely investigated and practically
applied.
• It decouples between real and reactive power control and also can mimic the
behavior of a synchronous generator in the power systems.
• To satisfy the condition of inductive system, a virtual impedance control
controller is applied which will be introduced in the next chapter. 20
DG Droops for P&Q Control
The droop equations according to (6) are given by:
  n  m p  P  Pn  (16)
V  Vn  nq  Q  Qn  (17)
where n , Pn and Vn, Qn are the nominal angular frequency, output active power
and voltage magnitude, output reactive power respectively; mp and nq are the
active and reactive droop slopes respectively; P and Q are the output active and
reactive power. They are also shown in Fig. 12.
ω V
ωmax Vmax

ωn Vn

ωmin Vmin

P
Pmin Pn Pmax Qmin Qn Qmax

Fig. 12. Droop curves


21
Load Sharing through P-f Control
• During grid-connected mode, microgrid loads are supplied both from the main
utility grid and DGs.
• In Island mode, when the utility power supply is interrupted due to contingencies,
DGs ensure a smooth change-over from grid-connected mode to island mode and
vice versa as necessary.
• Fig. 13 shows the droop characteristic used by DGs for P-f control. During transition
to island mode, each DG exerts local P-f control to change the operating point to
P2’ and P1’ so as to achieve local power balance at the new loading point.
f Accordingly, the operating frequency
will drift to a lower common value (i.e.,
P2n P1n
ωn ω’) with different proportions for load
ω' P2' P1'
sharing as shown in Fig. 13.
ωmin

P
P2max P1max

Fig. 13. Droop curves 22


Load sharing through P-f Control
• In Fig. 13, when the load changes, the power balance among DGs holds if
(18)
where SLoad is the load apparent power and Si is that of generator i.
Using (16) and (17), we derive the following:
1n  1 2 n  2
P1  , P2  (19)
m p1 mp 2
V1n  V1 V2 n  V2
Q1  , Q2  (20)
nq1 nq 2

• Using Fig. 13, we learn that DGs operating in a microgrid would have the same
deviations for frequency and voltage (  and V ). So,
  1n  1  2 n  2 (21)
V  V1n  V1  V2 n  V2 (22)
• Comparing (19) and (21), we conclude m p1P1  m p 2 P2 (23)

23
Load Sharing Example
• Accordingly, the droop controller for two DGs shown in Fig. 14:
m p1P1  m p 2 P2 (23)
• Also, DG power generations are given as P1 =0.75PLoad P2 =0.25PLoad
• Accordingly, P1 = 3P2 . So, the droop coefficients are linked as follows:

3m p1  m p 2

ω V

ωn Vn

ωmin Vmin

P Q
PG2max PG1max QG1max QG2max

Fig. 14. Droop curves of G1 and G2


24
Load Sharing Examples
Consider the following power sharing examples. f
• Example 1 – Two DGs share the load in proportion to their
fn
droop coefficients f
DER2
P1 m p 2
m p1  P1  0   m p 2  P2  0  
P2 m p1
DER1
P
P1 P2

f
• Example 2 – Two DGs have incremental power generation
with respect to their nominal frequency.
fn
P1  P1n m p 2 f DER2

P2  P2 n m p1 DER1
P1 P2 P
P1n P2n

f
• Example 3: At the nominal frequency, DG1 picks up all the
load while DG2 has zero nominal output. The two DGs would fn
share the incremental load based on the droop coefficients. f' DER2
DER1
P1  P1n m p 2 P1n P1' P2' P

P2 m p1 Fig. 15. Different examples of
droop curves of G1 and G2 25
DG Power Output Limitation
• The previous droop control is based on a linear curve. That is, the droop
coefficients kp and kq are constant parameters. However, for converter-coupled
DGs, a nonlinear droop curve is necessary for limiting the DG power output
within its permissible range.

• In Fig. 16, we increase the droop coefficient at the two ends of the droop
curve, which would impose current/power constraints on smaller DGs.

f /V The variable state of charge (SoC) of


energy storage device, which correlates
voltage and current in (24), is also
represented by a nonlinear droop. In this
P/Q case, when SOC is high (battery is charged)
min max the coefficient in (24) is small. Also, when
SOC drops (battery is discharged) the
Fig. 16. Nonlinear droop
coefficient will rise.
R
Vn  V   (I  In ) (24)
SoC
26
Reactive Power Sharing
• In theory, similar to that of real power droop discussed earlier, voltage
deviations should be the same at all microgrid nodes when load is changed.
• However, microgrid nodal voltages vary due to cable line impedances which
connect microgrid nodes.
• The reactive power sharing error in such cases may be negligible when
microgrid cables have low impedance or DGs are located in a small area.
• Larger microgrids with long cables could introduce larger voltage deviation
errors and reactive power sharing errors.
• In Fig. 17, different line impedances for V

the two DGs (i.e., DG1 and DG2) cause DG2


DG1
the nodal voltage deviation error, which Vn
would lead to the reactive power sharing V1’
error. Verror V2’
• The correction methods in such cases are
based on low bandwidth communication
among DGs in which the output voltage Q
data are transferred to other DGs so that QG1 QG2
DGs can adjust their output voltages for a
more accurate reactive power sharing. Fig. 17. Reactive power sharing errors
27
DG System Control using Droops
Fig. 18 shows the DG control systems when there is a disturbance. The voltage and
frequency are set by the local grid, and f and V are changes in frequency and
voltage due to the disturbance. Here P(ref) and Q(ref) are desired active and reactive
values calculated by the droop system to adjust the voltage and frequency, and Pout
and Qout are the actual measured active and reactive power outputs when the droop
control is applied.
The DER controller will guarantee
that actual and desired values
eventually match.

Fig. 18. DG droop control in grid-connected mode


• In grid-connected mode, the power distribution grid acts as slack bus which
provides constant voltage and frequency, while DGs are P-Q nodes that inject
power into the microgrid within permissible ranges.
• In island mode, DGs are modeled as P-V nodes (representing generation
sources) that supply local loads while maintaining the voltage and the frequency
within allowable limits. 28
State-Space Model of islanded DG
• Fig. 19 shows a microgrid in Island mode with respective DGs.

Fig. 19. Block diagram of a microgrid in island mode


29
State-Space Model of a DG
• Local controller (LC) of DG used in microgrid is shown in Fig. 20.

Fig. 20. Block diagram of DG control system


30
State-Space Model of a DG
• Fig. 20 consists of an outer voltage controller (i.e., implemented first) and an inner
current controller (implemented second), which are designed as feedback system
to regulate the DG voltage and current.
• The voltage-current control system provides the reference signal for the pulse
width modulator (PWM) which can adjust the DC source output.
• When a disturbance occurs in the microgrid, the voltage-current control system
can achieve a faster dynamic response for stabilizing the inverter output voltage as
compared with a single voltage controller.
• The output filter will damp out any harmonic distortions in the inverter output
voltage.
• Next, we will model individual components in this feedback control system for DG.

31
State Space Rep. of LfCf Circuit

iCa Cf
Lf ZLoad
via ila voa ioa

Fig. 21. Three-phase LfCf circuit


• In Fig. 21, we show an example of an LfCf circuit which is connected to a load.
The corresponding state space representation is derived as follows.

ila   via   voa  voa  ila  voa 


d   1   1 v  d   1 i   1 v 
ilb  vib  (25) vob  (26)
d t   Lf   Lf  ob  dt   Cf  lb  C Z  ob 
ilc   vic   voc  voc  ilc  f Load
voc 

• The power system model in Fig. 21 is transformed from abc coordinates to dq


coordinates.
32
LfCf Circuit Model in dq Coordinates
• Consider (25) and recall the dq transformation matrix discussed in the Appendix:

 cos  t  sin  t 
 2 2  
 cos  t cos(  t   ) cos(  t   )  2 2 
3 3  cos( t   )  sin( t   ) 
T   ,T  
T
3 3  (27)
  sin  t  sin( t  2  )  sin( t  2  )   2 2 
 3 3   cos( t   )  sin( t   ) 
 3 3 
2 1 0 
where  is the operating angular frequency and T  T T    .
3  0 1 
• Considering that ila  via  voa 
i   T T  ld 
i    id 
v    vod 
 i  , vib   T  v , vob   T
T T
 lb   v ,
ilc   lq  vic   iq  voc   oq 

• We derive (28) from (25), and the left-hand side of (28) is written in (29) as follows:

d  T
T
d t 
ild   1 T vid  1 T vod 
 i    T v   T v  (28),
 lq   L f  iq  L f  oq 
d  T
T
d t 
ild  
i  
  
lq
 

d T ild 
d t
T i 
 
lq
 T
 ild  
T  d
    (29)
 d t ilq  

33
LfCf Circuit Model in dq Coordinates
• The left-hand sides of (28) and (29) are equal, accordingly,

2
T
3 dt 
d T ild  2
i
 
lq 3
 d ild   1 vid  1 vod 
T    T T T    
d t i
   
lq L
v  
f  iq  L
v 
f  oq 
(30)

• Since 2
T
3 dt 
d T 0
T 

 
0 
and
2
3
1 0 
T T T   
0 1 
 ilq  d ild  1 vid  1 vod  (31)
• Then    i   v   v 
ild  d t  lq  L f  iq  L f  oq 

d ild  1 vid  1  vod  ilq 


• Equivalently for (25) we have,     v     (32)
d t ilq  L f viq  L f  oq   ild 

• Repeat the same process for (26), d vod  1 ild  1  vod    voq 
   i   v     (33)
d t  voq  C f  lq  C f Z Load   
oq  vod 

• Using (32) and (33), the equivalent of LfCf circuit in dq coordinates is drawn below
-ωLf ilq Lf ωLf ild
Lf

Fig. 22. dq ild + ilq +

equivalent of vid ωCf voq Cf ZLoad vod viq -ωCfvod Cf ZLoad voq

LfCf circuit - -
34
LfCf Circuit Model in dq Coordinates
• All quantities in (32) and (33) are stated in terms of dq quantities. The
corresponding LfCf block diagram is shown as follows.

1/ZLoad
- voq ilq
+ + 1/sLf + 1/sCf voq
viq
ωLf ωCf

ωLf ωCf
vid - ild -
+ + 1/sLf + 1/sCf vod
- vod
1/ZLoad

Fig. 23. dq block diagram of the three-phase circuit representing the LfCf circuit

35
Power Controller in DG
• The idea of the droop control is to mimic the governor of a synchronous generator.
Synchronous generators share load increases by decreasing the system frequency.
• This principle is implemented in Fig. 12 by decreasing the frequency when there is
an increase in DG load.
• In Fig. 24, instantaneous active and reactive power components are calculated in a
power controller using measured output voltage and output current given in Fig.
20. Accordingly,
p  vod iod  voq ioq , q  vod ioq  voq iod
(34)
Slide 110 showed how (34) was calculated.

vod p c P   m P  P   1
vod iod  voq ioq 
voq s  c n p n
s
iod q c Q
vod ioq  voq iod Vn  nq  Q  Qn  ref
vod
ioq s  c
ref
Power calculation Filter Droop 0 voq

Fig. 24. Power controller 36


Power Controller in DG
• The instantaneous power components are passed through low-pass filters to
eliminate high frequency harmonics and obtain real and reactive powers P
and Q corresponding to the fundamental component. ωc represents the cut-
off frequency of low-pass filters. So

c c
P p , Q  q (35)
s  c s  c

• Then, using (35)


 s  c  P  c  vod iod  voqioq 
(36)
 s  c  Q  c  vod ioq  voq iod 

• Equivalently,
dP
 c P  c  vod iod  voq ioq 
dt (37)
dQ
 cQ  c  vod ioq  voq iod 
dt

37
Power Controller in DG
• The real power sharing among inverters is obtained by a droop as presented
below.

• Using Fig. 12 and (16) and (17), the frequency ω is set according to the droop gain
(mp) and phase is set by integrating the frequency.
  n  m p  P  Pn  (38)

• To share the reactive power among multiple inverters, a droop is introduced in


(39) which uses Fig. 12 and (16) and (17). Here the q axis is the reference (0 value).
ref
vod  Vn  nq  Q  Qn  , voq
ref
0 (39)

• Also, according to Fig. 12 and (16) and (17), the droop gains mp and nq are
calculated using (40) for a given range of frequency and voltage magnitude.
n  min Vodn  Vod min
mp  , nq  (40)
Pmax  Pn Qmax  Qn

38
Power Controller in DG
• We assume each DG possesses its own reference point. Hence, for multiple DGs in
a microgrid, the DG outputs are to be converted to a common reference dq frame
in order to solve all DGs together in a microgrid.

• In Fig. 24, the output ω is passed through an integral controller (1/s) in order to
find the angle δ.

• In order to define the common reference for a microgrid, we define δ in each DG


with respect to a common reference frame (ωcom).

     com  d t
(41)

d (42)
   com  n  m p  P  Pn   com
dt

39
Power Controller in DG
The final list of equations for power controller is given as

d (42)
   com  n  m p  P  Pn   com
dt
dP
 c P  c  vod iod  voq ioq 
dt
(37)
dQ
 cQ  c  vod ioq  voq iod 
dt

  n  m p  P  Pn  (38)
ref
vod  Vn  nq  Q  Qn  , voq
ref
0 (39)

Next, we calculate the small signal variations (delta values) of these


equations.

40
Power Controller in DG
Then,    m p P

P  c P  c vod
0  0
iod  iod 0
vod  voq  0
ioq  ioq voq  (43)
Q   Q    v  i      

0 0 0 0
c c od oq  ioq vod  voq iod  iod voq

Also    m p P
(44)
vod
ref
  nq Q
voq
ref
0

Accordingly, in matrix form we have,


v
    0  m p 0      0 0 0 0   od 
     0    voq 
 P    0 c 0   P    c iod0
c ioq 0  c vod
0
c voq  (45)
  iod 
 Q   0 0 c   Q   c ioq
0
c iod 0  c voq
0 0 
c vod   i 
    oq 

    0  m p 0    
 ref  
 vod    0 0  nq   P  (46)
 
 voq
ref
  0 0 0   Q 
 
41
Power Controller in DG
where,
 vod 
       v       
     oq   ref   

  P  A  P  B ' ,  vod   C  P 
   iod 

 Q   Q     voq
ref
  Q 
   i  
 oq 
 v   iod 
If we define, vodq   od  , iodq  
 voq    ioq 

     
     vodq 
Then,  P   A  P   B '  i  ,
 Q  
 Q 

 odq 
 
CP  0  m p 0 
Also, if we define, 
 0 0 nq 
 CPv   
 0 0 0 
  
   CP   
Then,  v ref    C   P 
 odq   Pv   Q 
 
42
Power Controller in DG
  
 vodq    
We define, X   P  u'    y   ref 
  i
 Q 
 odq   vodq 

 X  AX  B 'u '
Accordingly:  (47)
 y  CX

 ildq 
 ildq   
We also define: u     vodq 
 u '   i 
 odq 

0 0 0 0 0 0 
  0 
Accordingly, B is redefined as : B  0 0 c iod cioq 0 c vod
0
c voq 0 
  0  0  0  0 
0 0 cioq ciod c voq c vod 
 X  AX  Bu
Then:  (48)
 y  CX
43
Voltage Controller in DG
• In Fig. 20, the voltage controller input is the same as the voltage output of the LfCf
filter. This LfCf output was stated in (33) which is restated as follows,
d  vod  1 ild  1 vod   n voq 
v   i   v     (49)
d t  oq  C f  lq  C f Z 'load 
   n od 
oq v
• The measured values are vod , voq , iod , ioq , which are linked (where Z 'Load  Z Load  j Lc)
 vod  iod 
1
 v   i 
Z 'Load
 oq   oq 
• So, we can re-write the Lf Cf output in which vod is coupled with voq as follows

d vod  ild  iod   nC f voq  (50)


Cf  v   i    i    
d t  oq   lq   oq   n C f vod 

• Now assume that the voltage controller (for reducing the error between vo and voref )
is represented by a proportion-plus-integral (PI) controller. The PI transfer function
for voltage controller is K
G ( s )  K pv  iv (51)
s
• In time domain, the controller output is stated as
 V  K pv  voref  vo   K iv   voref  vo  dt (52)
44
Voltage Controller in DG
The dq values are given as  vd  K pv  vodref  vod   K iv   vodref  vod  dt
(53)
 vq  K p  v ref
oq  voq   Ki   vref
oq  voq  dt

If we define d d dq
ref
vod  vod  , ref
voq  voq  (54)
dt dt

Then:  vd  K pv  vodref  vod   K ivd


(55)
 vq  K pv  vref
oq  voq   Kivq

The current flow through the capacitor filter Cf (Fig. 20) is regarded as an error for
eliminating the difference between vo and voref .

d vod   Vd  ild  ild 


ref
(56)
Cf     , i    ref 
d t voq   Vq   lq  ilq 

Combining (56) and (50), we have:


ildref  iod   nC f voq   K pv  vodref
 vod   K ivd 
 ref         (57)
ilq   oq   n C f vod   K pv  voq  voq   K ivq 
i ref

45
Voltage Controller in DG
We add the gain F for reducing the error.

ildref  iod   n C f voq   K pv  vod  vod   K ivd 


ref

 ref   F    
(58)
 
 oq   n f od   K pv  voq  voq   K ivq 
i  C v ref
ilq 

So, the final equations for voltage controller are


dd dq (54)
 vod
ref
 vod ,  voq
ref
 voq
dt dt
ildref  iod   nC f voq   K pv  vod  vod   K ivd 
ref

 ref   F       (58)


 oq   nC f vod   K pv  voq  voq   K ivq 
i ref
ilq 

If we define:
d  vod
ref
 vod
(59)
q  voq
ref
 voq

So, in matrix form for the above two equations we have:


 i 
 d  1 0   vod
ref
 0 0 1 0 0 0   ldq  (60)
     v ref   0 0 0 1 0 0   vodq 

 q   0 1   oq     i 
 odq  46
Voltage Controller in DG
Also, in matrix form we have:

 iod   nC f voq   K pv  vod  vod   K iv d 


ref
 ildref 
 ref   F      C v     (61)
 ilq   oq   n f od   K pv  voq  voq   K iv q 
i ref

Which is reorganized as
 i 
 ildref   K iv 0   d   K pv 0   vod ref
  0 0  K pv nC f F 0   ldq 
 ref         0  ref    v
 ilq   0

K iv   q   K pv   voq   0 0 n C f  K pv 0 F   odq 
 iodq 
 
(62)

So, the final form of equations for voltage controller is stated as:

47
Voltage Controller in DG
T
dq   d q  (63)

 ildq 
.
    BV 2  vodq 
   dq    0  
  dq 
  BV 1
 vodq
ref
  (64)
 iodq 

 ildq 
 ildq
ref
  CV  dq   DV 1  vodq
ref
  DV 2  vodq  (65)
 
 iodq 

where

 K iv 0   K pv 0  1 0  0 0 1 0 0 0 
CV   , DV 1   BV 1   , B 
 0 K iv   0 K pv   V 2  0 0 0 1 0 0 
0 1   

0 0  K pv nC f F 0
DV 2 
 0 0 n C f  K pv 0 F 

48
Voltage Controller in DG
• Fig. 25 shows the voltage controller. In Fig. 25, the input is splitted into two terms:
the reference inputs (i.e., vodref , voqref ) and the measurement inputs (i.e., vod , voq , iod , ioq ).
Equation (64) and (65)represent the linearized state-space form of the voltage
controller (i.e., linear form of (54) and (58)).

iod
F

vodref + Kpv+Kiv /s + + ildref


-
vod -ωnCf

voq ωnCf
ref -
voq + Kpv+Kiv /s + + ilqref

F
ioq
Fig. 25. Flow diagram of voltage controller
49
Current Controller in DG
• Recall (32) for representing the input-output variables when the inverter output
current goes through the Lf Cf filter

d ild  1  vid  1 vod   nilq 


      
d t ilq  L f  viq  L f voq   nild 
• Equivalently,
d ild  vid   vod   n L f ilq 
Lf i    v    v     (66)
d t  lq   iq   oq   n L f ild 

• If we assume a PI controller for matching il and ilref whose transfer function is


K ic
G ( s )  K pc 
s (67)
• So, in time domain, the output of this controller is obtained.
 I  K pc  ilref  il   K ic   ilref  il  dt (68)
• Denote
d d d q
 ild  ild ,
ref
 ilqref  ilq (69)
dt dt

50
Current Controller in DG
Then
 Id  K pc  ildref  ild   Kic d ,  Iq  K pc  ilqref  ilq   K ic q (70)

We can do the following substitution in designing the current controller:

d ild   Id  vid  vid 


ref

Lf i      , v    ref  (71)
d t  lq   Iq   iq  viq 

Combining (66) and (71), we obtain the current controller outputs. Here G is a gain
factor for reducing the error.
 vidref  vod   n L f ilq   K pc  ild  ild   K ic d 
ref

Also,  ref   G    
(72)
 
 oq   n L f ild   K pc  ilq  ilq   K ic q 
v ref
 viq 

Since, d  ildref  ild q  ilqref  ilq

Then in matrix form,


 ildq 
 d  1 0   ildref   1 0 0 0 0 0  
          v
  odq  (75)
 q  0 1   ilq   0 1 0 0 0 0   i 
ref

 odq 
51
Current Controller in DG

 vidref   vod   n L f ilq   K pc  ild  ild   K ic  d 


ref

Since,  ref   G    


 viq   oq   n L f ild   K pc  ilq  ilq   K ic  q 
v ref

 i 
 vidref   K ic 0    d   K pc 0   ildref    K pc n L f G 0 0 0   ldq 
So,  ref        v
 viq   0 K ic    q   0 K pc   ilqref  n L f  K pc 0 G 0 0   odq 
 iodq 
 
(76)
So the state representation is given as
 dq    d  q 
T
  K ic 0   K pc 0 
 CC    , DC1   0
  0 K ic   K pc 
 ildq 
. 
   v 
   dq    0  
  dq 
  BC 1

  i ref
ldq

  B C 2  odq  (77) 
 iodq     K pc  n L f G 0 0 0
 DC 2  
 ildq    n L f  K pc 0 G 0 0 
 vidq   CC   dq   DC1  ildq   (78) 
  DC 2  vodq 
ref ref

 iodq 

 1 0   1 0 0 0 0 0
 BC1    , BC 2   0 1 0
  0 1   0 0 0 
52
Current Controller in DG
• Fig. 26 shows the current controller which calculates the input voltage to the
inverter. The input is split into two terms: the reference inputs (i.e., ildref , ilqref ) and
the measurement inputs (i.e., ild , ilq ). Accordingly, the state space equations of the
current controller are given as:

ildref + Kpc+Kic /s + + vidref


-
ild -ωnLf G*vod

ilq ωnLf G*voq


ref -
ilq + Kpc+Kic /s + + viqref

Fig. 26. Flow diagram current controller

53
Lf Cf Filter and Coupling Inductance (Lc)

In Fig. 20, assuming that the inductances Lf and Lc include equivalent series
resistances rf and rc, we can obtain

ila  via   voa  ila 


d       i 
Lf  ilb   vib   vob   rf  lb 
dt
ilc  vic   voc  ilc 

voa  ila  ioa 


d      
Cf  vob   ilb   iob 
dt
voc  ilc  ioc 

ioa  voa  vba  ioa 


d
Lc iob   vob   vbb   rc iob  (79)
dt
ioc  voc  vbc  ioc 

54
Lf Cf Filter and Coupling Inductance (Lc)
The filter equations in the dq frame can be represented as

d ild  ilq  vid  vod  ild 


Lf i    L f     v    v   rf i 
d t  lq   ild   iq   oq   lq 

d vod   voq  ild  iod 


Cf    C f     i   i 
d t voq   v
 od   lq   oq 

d iod  ioq  vod   vbd  iod 


Lc     Lc    v    v   rc i 
i
d t  oq   iod   oq   bq   oq 

The linearized form of the first equation given above in the dq frame is
represented as

ild   ilq 0   ilq   vid   vod   ild 


Lf    L f   0    n L f  i    v    v   rf
 lq 
i  i 
   ild   ld   iq   oq   lq 

55
Lf Cf Filter and Coupling Inductance (Lc)
Equation (43) represents the linearized form of the LfCf filter and coupling inductance.

 . 
 ildq   ildq 
 .    (80)
 odq   ALCL  vodq   BLCL1  vidq   BLCL 2  vbdq   BLCL 3   
 v
 .   iodq 
 iodq 
where

  rf 1 
L n 0 0 0 
 f Lf 
  rf 1  1   0 0 
 n 0 0 0  L 0 
 0   ilq 0 
 Lf Lf   f  0  0 
 
 1 1   1   0 0   ild 
 0 0 n  0  0      0 
C Cf   Lf  0 0  voq 
ALCL  f  , BLCL1   0 , BLCL 2   , B 
1 1 0   1  LCL 3  v  0  
 0 n 0 0      0   od 
 Cf Cf  0 0   Lc   i  0 
  0  oq0 
 0 1 rc  0   1  
0 0 n     0    iod 
 Lc Lc  0 0   Lc 
 
 1 rc 
 0 0 0 n
 Lc Lc  56
Complete DG Model
Recall the power controller representation,

       ildq    
   P   B  v     CP    (46)

 P  AP  P  odq   v ref    C   P 
 ,
 Q   Q   iodq   odq   Pv   Q 
 
   

and the voltage controller representation given as (64),(65)

  ildq   ildq 
 .   v 
   dq    0  
   dq 
  BV 1

  v ref
odq

  BV 2  odq  ,  ildq   CV  dq   DV 1  vodq   DV 2
ref ref  v 
 odq 
  iodq   iodq 

 P 
Accordingly, we update the voltage controller representation by inserting  vodq
ref
  C pv  
 Q 
into the above two equations. Accordingly,

    ildq      ildq 
.
    0   B C  P   B   v    CV   dq   DV 1C Pv  P   DV 2  vodq 
 dq     dq  ,  ildq
ref
V 1 Pv   V2  odq     
  Q    iodq   Q    iodq 

(79) 57
Complete DG Model
Recall the current controller representation given earlier as (75), (76)

  ildq   ildq 
 . 
   dq    0     dq   BC 1  ildq
ref
  BC 2   vodq  ,  vidq
ref
  CC   dq   DC 1  ildq
ref
  DC 2  vodq  (80)
   
  iodq   iodq 

  ildq 
  CV    dq   DV 1   vodq  v 
We update the current controller in which  ildq
ref ref
  DV 2
 odq 
is plugged into both equations. So,  iodq 

.
     ildq 
     B D C   P   B C    B D  B  v 
 dq   C 1 V 2 C2  
C1 V 
(81)
 dq  C 1 V 1 Pv   odq 

  Q    iodq 
     ildq 
  vidq
ref
  DC 1 DV 1C Pv   P   CC   dq   DC 1CV  dq    DC 2  DC 1 DV 2   vodq  (82)
   
  Q    iodq 

58
Complete DG Model
• For LC filter model, we assume that the inverter can ideally output the reference
voltage (i.e. vi  viref ), then we have   vidq     vidq
ref
 . Also We had,

 . 
 ildq   ildq 
 .   
 odq   ALCL  vodq   BLCL1  vidq   BLCL 2  vbdq   BLCL 3   
v (78)
 .   iodq 
 i
 odq 

 ildq 
Since,  vidq   Cc   dq   DC1  ildq  
ref
  DC 2  vodq  , then, (80)
 iodq 
 

 . 
 ildq   ildq 
 .   v   B C     B D  i ref   B
  vodq    ALCL  BLCL1 DC 2   odq  LCL1 c  dq  LCL1 C1  ldq   vbdq   BLCL 3   
LCL 2 
 .   iodq 
 iodq  (83)
59
Complete DG Model
    ildq 
 
Moreover,  ildq
ref
  CV  dq   DV 1CPv  P   DV 2  vodq  (79)
 
 Q   iodq 
 
Accordingly,  . 
 ildq   ildq 
 .   
 odq    ALCL  BLCL1 DC 2  BLCL1 DC1 DV 2   vodq   BLCL1Cc   dq  
v (84)
 .   iodq 
 i
 odq 
  
 BLCL1 DC1CV  dq   BLCL1 DC1 DV 1CPv  P   BLCL 2  vbdq   BLCL 3   
 
 Q 
  
Also,     CP  P  , where : CP  0 m p 0 
 Q 
 . 
 ildq   ildq 
We conclude that  .   
 vodq    ALCL  BLCL1 DC 2  BLCL1 DC1 DV 2   vodq   BLCL1Cc   dq  
 .   iodq 
 iodq  (85)
  
 BLCL1 DC1CV  dq    BLCL1 DC1 DV 1CPv  BLCL 3CP   P   BLCL 2  vbdq 
 
 Q 
60
Complete DG Model
So, the state-space model of DG , which consists of power controller, voltage
controller, current controller and output LfCf Lc (filter plus line impedance), is
     
    P 
 P   
 Q   AP 0 0 Bp   Q   0 
         0 
 dq    BV 1CPv 0 0 BV 2
  dq      v 
    BC1 DV 1CPv BC1CV 0 BC1 DV 2  BC 2    dq   0   bdq 
 dq      
 ildq   BLCL1 DC1 DV 1CPv  BLCL 3CP BLCL1 DC1CV BLCL1CC ALCL  BLCL1  DC1 DV 2  DC 2    ildq   BLCL 2 
 v   vodq 
 odq   
 iodq   iodq  (86)
T
If, xinv    P Q dq  dq ildq vodq iodq 
113

Then (86) is restated as  xinv   Ainv  xinv   Binv vbdq  (87)

   Cinvω  (88)
and the DG output is stated as  i    C   xinv 
 odq   invc 
where,
0  0 1 0
Cinvc   Cinvω  CP 0  0113
 0  0 0 1  213 61
Multi-DG Model in a Microgrid
Since individual DGs could possess their own specific reference quantities, we use the
common reference frame (which is rotating ωcom) to represent state equations of the
DGs, network, and loads. Fig. 27 depicts the DG i and j coordinates as compared to
DQ quantities. Other inverters are translated to this common reference frame (DQ) as
follows.
cos  i   sin  i  
 f DQ   Ti   f dq   i 
T   (89)
 sin  i  cos  i  
where the subscript i stands for the ith inverter.

Fig 27. Reference


frame transformation

62
DG Current Transformation
• In this case the DG output variables are the output currents represented as a
vector ∆iodq. Using the transformation technique, the output current ∆ioDQ on the
common reference frame is obtained here.
ioDQ   T  iodq  (90)
where
cos    sin   
T    
 sin   cos   
• Then the small-signal model is
 ioDQ   T (0)   iodq    T  iodq 
(0)
(91)
where
cos  (0)   sin  (0)   
  sin   0   
 cos   0 
T 0
 ,  T       

 sin 
(0)
 
cos  (0)
   cos   
0
 
 sin   0 

where iodq
(0)
and (0) are the initial values of iodq and .

63
DG Current Transformation

Accordingly,  ioDQ   TS   iodq   TC    (92)

where,  0
cos  (0)   sin  (0)  
TS  T  

 sin 
(0)
 
cos  (0)
 

and,   sin  (0)   cos  (0)    I od  I od sin  (0)   I oq 0 cos  (0)  
 0    0
TC      0     0 

 cos 
(0)
 
 sin  (0)
 
  I oq   I od cos 
(0)
  0
 I oq sin   (0)
 

Now we find iodq  for adjusting the previous equations. Using (91),
(93)
 iodq   TS   ioDQ   TS  TC    
1 1

where, TS1   
 
 cos   0   
sin   0 

  
  sin   0 
 
cos   0  

and,
 
 cos   0 
TV1    TS1  TC    
 
sin   0     I  0 sin  (0)   I  0  cos   (0)    I  0  
  od oq
 oq
  
  
  sin   0
 
 0    I  0  cos  (0)   I  0  sin  (0)  
cos    od
 oq
 0
   I od 
64
DG Voltage Transformation
• Similarly, the DG output signal is the bus voltage which is expressed on the
common reference frame. The bus voltage is converted to the individual DG
reference frame using reverse transformation, given by

 vbdq   TS   vbDQ   TV     (94)


1 1

• For multi DGs, the dq frame of the 1st DG is chosen as the common reference
frame. Accordingly, output variables of the 1st inverter include the operating
frequency and the output current, while all the other inverters affect the microgrid
operation only by the current flowing into the microgrid network.

• A complete state-space model of the i-th DG is given next which includes the state-
space models of power controller, voltage controller, current controller, and output
LfCf Lc filter.

65
DG in a Common Microgrid Mode
• On page 61, the input is vbdq and the output is iodq. In common mode, we make
sure that these two quantities are converted to vbDQ and ioDQ. Accordingly, we
repeat the model on page 61 for the ith inverter (DG) in common mode as
 i  CINVωi 
 xinvi   AINVi  xinvi   BINVi  vbDQi   i      xinvi  (95)
C
 oDQi   INVci 
 xinvi    i
T
where, Pi Qi dqi  dqi ildqi vodqi iodqi 
113

 APi  0  0  BPi 
       
 
 BV 1i CPvi  0  0  BV 2i 
 
       
AINVi  BC1i DV 1i CPvi  BC1i CVi  0  BC1i DV 2i  BC 2i 
 
       
 BLCL1i DC1i DV 1i CPvi     ALCLi  
 
 BLCL 2i TVi1 0 0    BLCL1i DC1iCVi  BLCL1i CCi  BLCL1i  DC1i DV 2 i  DC 2i  
 
 BLCL 3i CPi    1313
 0   | 0  0 | 
  CPi 0 0 0113 i  1
 , CINVci  TCi  
0
BINVi  
| |  Si 22  , CINVωi  
T
 0 0 0 0113 i  1
21
 0 
 1   | 0  0 |  213
 BLCL 2iTSi 132 66
Generalized Model of a Microgrid
Consider a microgrid system with multi DGs in which DG #1 is the common reference
frame. Accordingly,
 . 
 xINV   AINV  xINV   BINV  vbDQ  (96)

 ioDQ   CINVc  xINV 

where
 ioDQ   CINVc  xINV  ,  vbDQ    vbDQ1
T
vbDQ 2 ... vbDQm 

 xINV    1
T
P1  iodq1 |  2 P2  iodq 2 |  |  s Ps  iodqs 
113 s

 AINV1 0 0 . 
 0 AINV2 0 . 
and, AINV  
 . . . . 
 
 . . . AINVs 13s13s

 BINV1 0 0 .  CINVc1 0 0 . 
 0 BINV2 0 .   0 CINVc2 0 . 
BINV   , CINVc   
 . . . .   . . . . 
   
 0 0 . BINV s 13 s2 m  . . . CINVc2  2 s13 s
67
State Space Representation of MG

Fig. 28. Structure of inverter-based microgrid with DGs

• DGs are coordinated for maintaining V/f and sharing power. The DG
cooperation in a MG can be realized by communication links, but they will
make the system more expensive and less reliable.
• In this chapter, control techniques based on local measurements which do not
require expensive communication facilities have been proposed.
• The DG model presented in this chapter divides the whole system into three
major sub-modules; inverter, network and loads (see Fig. 29).
68
State Space Representation of MG

• Each inverter is modeled on its


individual reference frame whose
rotation frequency is set by its local
power sharing controller.
• The inverter model includes the
power sharing controller dynamics,
output filter dynamics, coupling
inductor dynamics and voltage and
current controller dynamics.
• These last two elements introduce
high frequency dynamics which are
apparent at peak and light load
conditions and during large
changes in load.
Fig. 29. Block diagram of complete state-
space model of a microgrid
69
Microgrid Network Model
DG j and load j are located in node j. DG k and load k are located in node k. The
connection of nodes j and k is shown in Fig. 30.
Note that the network is represented using the common reference frame (which is
rotating at the frequency ωcom). Here, the state equations of ith line connected
between nodes j and k are
die
vbj  vbk  reie  Le
dt
die 1
  vbj  vbk  reie 
dt Le
diedq 1
dt
 ieqd 
Le
 vbdqj  vbdqk  reiedq 
Fig. 30. Microgrid network representation
See the examples on pages 33 and 113 for more information.

Here, we assume ie  T iedq ,. vbk  T vbkdq . We have


T T

diDe  re 1 1
 iDe  comiQe  vbDj  vbDk
dt Le Le Le
diQe  re 1 1
 iQe  comiDe  vbQj  vbQk
dt Le Le Le
70
Microgrid Network Model
The state-space model of a microgrid network with one line and two DGs is given:

re 1 1
iDe    0
iDe  com iQe  I Qe com  vbDj  vbDk
Le Le Le
re 1 1
iQe   0
iQe  com iDe  I De com  vbQj  vbQk
Le Le Le
T T
If,  iDQe    iDe iQe  , and,  vbDQjk    vbDj vbQj vbDk vbQk 

 . 
then,  iDQe   ANETe  iDQe   B1NETe  vbDQjk   B2NETe com

  re  1 1 
 L  com  L 0  0 
Le  I Qe
(0)

    ,
e
where, ANETe ,
B1NETe
e
B2NETe   (0) 
  re   1 1   I De 

 com L  0 0  
 e   Le Le  24

In this case, com refers to the change in the frequency when we consider the
common reference.
71
Generalized Microgrid Network
The state-space model of a microgrid network with n lines and m DGs is given:
 . 
 ilineDQ   ANET  ilineDQ   B1NET  vbDQ   B2NET com
where

 ilineDQ    ilineDQ1 ilineDQ 2  ilineDQn  ,  vbDQ    vbDQ1 vbDQ 2  vbDQm 


T T

 ANET 1 0  0   B1NET 1 0  0   B2 NET 1 


 0 ANET 2  0   0 B1NET 2  0  B 
ANET   , B1NET   , B2 NET  2 NET 2 
              
     
 0 0  ANETn  2 n2 n  0 0  B1NETn  2 n2 m B
 2 NETn  2 n1
and,
  rlinei   1 1 
com   0 0 
L Llinei Llinei  I line
(0)

 ,  
linei
ANETi B1NETi , B2NETi   (0)Qi 
 rlinei   1 1    I lineDi 
 com  0 0 
 Llinei  
Llinei Llinei
 22 m

72
Microgrid Load Model
We use the same method as that of microgrid network to develop the microgrid
load model. For an RL loadj, the state equations are formulated as
d iDj Rj 1 d iQj  Rj 1
 iDj  comiQj  vbDi ,  iQj  comiDj  vbQj
dt Lj Lj dt Lj Lj

Rj 1
then, iDj   iDj  com iQj  I Qj  com 
0
vbDj
Lj Lj
Rj 1
iQj    
iQj  com iDj  I Dj com 
0
vbQj
Lj Lj

T T
If,  iDQj    iDj iQj  , and,  vbDQj    vbDj vbQj 

 . 
then,  iDQj   ALoadj  iDQj   B1Loadj  vbDQj   B2Loadjcom

 R j  1 
 com  L 0
 Lj   I Qj(0) 
 
j
Also, ALoadj  , B1Loadj , B2Loadj   (0) 
 R j   1
 com    I Dj 
0 
 L j   Lj 
22 73
Generalized Microgrid Load Model
• In general, the state-space model for p loads is given as

 . 
 iloadDQ   Aload  iloadDQ   B1load  vbDQ   B2load com
where

 iloadDQ    iloadDQ1 iloadDQ 2  iloadDQp 


T

 Aload1 0  0   B1load1 0  0   B2load1 


 0 Aload2  0   0 B1load 2  0  B 
     
2load 2
Aload , B1load , B2load
              
     
 0 0  Aloadp   0 0  B1loadp  B
 2loadp  2 p1
2 p2 p 2 p2 m

  Rloadi   1 
com   0 
 L Lloadi  I load
(0)

Aloadi 
loadi
, B1loadi    , B2loadi   (0)  Qi

  Rloadi   1    I loadDi 
 com  0 
 Lloadi  
Lloadi
 22 m
74
Example: A microgrid with two DGs
• Consider the following example. An islanded microgrid is composed of two DG (#1
and #2), a feeder (represented by inductors) and two local loads (represented by
capacitors), as shown in Fig. 31.

DG1
Inverter #1
DG2
Inverter #2
Vb1a Llinea Vb2a Io2a
Io1a Ilinea
+ Vb1b Llineb Vb2b +
Io1b Ilineb Io2b
VDC1 VDC2
Llinec -
- Io1c Vb1c Ilinec Vb2c Io2c

Cload1a Cload1b Cload1c Cload2a Cload2b Cload2c

Fig. 31. Microgrid Diagram

75
Example of a two DG system
• The two DGs (represented by inverter #1 and #2) are of the same structure, which
is shown in the following figure. In this case the power controller (not shown)
provides Voref in Fig. 32. We are assuming   n remain to be fixed.

• Each DG in island mode is a voltage source converter (VSC) because the DG would
need to maintain the voltage while the current will change as a function of load.

Vo Vo Vb
Voref Ilref Vi ref
Vi Lf Vo Lc
Voltage Current
Controller Controller Il Io
Io Il Cf

Control Power

Fig. 32. DG block diagram


76
Example of a two DG system
• The implementation of the voltage and current controller is given in Fig. 33 and
Fig. 34, respectively.

Iod Vod

Vodref + Kiv /s + + Ildref Ildref + Kic /s + + Vidref


- -
Vod Ild
-ωCf -ωLf

Voq ωCf ωLf


Ilq
- -
Voqref + Kiv /s + + Ilqref Ilqref + Kic /s + + Viqref

Ioq
Voq

Fig. 33. Voltage controller Fig. 34. Current controller

77
Example of a two DG system
• We build the state-space model (in dq frame) for this microgrid, given Voref1 and
Voref2 as inputs.

• Assume that the rotating q1


q2
frequencies of these two DGs are
equal and the angle between
these two frames is constant (δ),
as shown in Fig. 35.

• Here the dq frame of DG #1 is


chosen as the reference frame. ω d2

• However, in practice, either DG δ ω d1


can produce the reference voltage
(Vi =Viref).
Fig. 35. The dq frames of these two DGs

78
State Space Solution of two DGs
• For DG #1:
- Voltage Controller
I ldref1  I od 1  C f 1Voq1  K iv1d 1 (97)

I lqref1  I od 1  C f 1Vod 1  K iv1q1 (98)

where
dd 1 dq1
 Vodref1  Vod 1 ,  Voqref1  Voq1 (99)
dt dt
Then

d d 1  1 0  Vod 1  0 0 1 0 0 0 
ref

I oq1  (100)
T
      ref      I ld 1 I lq1 Vod 1 Voq1 I od 1
d t  q1   0 1  Voq1  0 0 0 1 0 0 

 I ldref1   K iv1 0  d 1  0 0 0 C f 1 1 0  T


 ref      I I lq1 Vod 1 Voq1 I od 1 I oq1  (101)
 I lq1   0 K iv1  q1  0 0 C f 1 0 0 1   ld 1

79
State Space Solution of two DGs
• For DG #1:
- Current Controller
Vidref1  Vod 1   L f 1 I lq1  K ic1 d 1 (102)

Viqref1  Voq1   L f 1 I ld 1  K ic1 q1 (103)

where
d d1 d  q1
 I odref1  I od 1 ,  I oqref1  I oq1 (104)
dt dt
Then

d  d 1  1 0  I ld 1   1 0 0 0 0 0 
ref

I oq1  (105)
T
      ref      I ld 1 I lq1 Vod 1 Voq1 I od 1
d t  q1  0 1   I lq1   0 1 0 0 0 0 

Vidref1   K ic1 0   d 1   0  L f 1 1 0 0 0  T
 ref      I I lq1 Vod 1 Voq1 I od 1 I oq1  (106)
Viq1   0 K ic1   q1   L f 1 0 0 1 0 0   ld 1

80
State Space Solution of two DGs
• For DG #1:

Substitute (101) in (105),

d  d 1   K iv1 0  d 1   1 0 0 C f 1 1 0  T


        I
0 1   ld 1
I lq1 Vod 1 Voq1 I od 1 I oq1 
d t  q1   0 K iv1  q1   0 1 C f 1 0
(107)
- Model for LfCf Filter and Coupling Inductance
d I ld 1 1 1 d I lq1 1 1
  I lq1  Vid 1  Vod 1 (108)   I ld 1  Viq1  Voq1 (109)
dt Lf 1 Lf 1 dt Lf 1 Lf 1

d Vod 1 1 1 d Voq1 1 1
 Voq1  I ld 1  I od 1 (110)  Vod 1  I lq1  I oq1 (111)
dt Cf1 Cf1 dt Cf1 Cf1

d I od 1 1 1 d I oq1 1 1
  I oq1  Vod 1  Vbd 1 (112)   I od 1  Voq1  Vbq1 (113)
dt Lc1 Lc1 dt Lc1 Lc1

81
State Space Solution of two DGs
• For DG #1:

Then

 1 
 0   0 0 0 
Lf 1
 
 1   1   0 0 
 0 0  0 0  0 
 I ld 1   Lf 1  I ld 1   L f 1  0 0 
I        
 lq1   1  
1   I lq1  
0
1   0 0 
 0 0 0 
Vod 1   

d od 1V  C Cf1 L f 1  Vid 1   0 
0  Vbd 1 
    f1     
d t Voq1   1 1  Voq1   0 0  Viq1   1  Vbq1 
I   0  0 0       0 
 od 1  
Cf1 C f 1  I od 1
  
0 0   Lc1 
 I oq1   1

 I   0 0   1 
 0 0 0 0   oq 1
   0  
 Lc1   0 0   Lc1 
 
 0 1
0 0  0 
 Lc1 
(114)

82
State Space Solution of two DGs
• For DG #1:
Vid 1  Vidref1 
Since V    ref  , (115)
 iq1  Viq1 

Substituting (106) and (115) into (114), we obtain the following in which   n is
considered a fixed value.

 0 0 0 0 0 0 
 0 0 0 0 0 0   K ic1 
  0   0 0 
 ld 1   1
I 1   I ld 1   L f 1 
 0 0 
I   0 0 n  0    
 lq1   C f 1 Cf1 I   0 K ic1   0 0 
 lq1
 
d Vod 1   1  Vod 1   L f 1   id 1   0  V
  0
1
n     0   bd 1 
0 0
C f 1  Voq1   0       Vbq1 
d t Voq1   Cf1 0  iq1  1

  I   0 
I    0 
 od 1   0 0
1
0 0 n   od 1  
0   Lc1 
 I oq1   Lc1   I oq1   0 0   1 
  0  
 1   0 0   Lc1 
 0 0 0 n 0 
 Lc1 

83
(116)
State Space Solution of two DGs
Similarly, for DG #2,
d d 2  1 0  Vod 2   0 0 1 0 0 0 
ref
T
     I ld 2 I lq 2 Vod 2 Voq 2 I od 2 I oq 2 
d t q 2   0 1  Voqref2   0 0 0 1 0 0   (117)

d  d 2   K iv 2 0  d 2   1 0 0 C f 2 1 0 T
      I
0 1   ld 2
I lq 2 Vod 2 Voq 2 I od 2 I oq 2 
d t  q 2   0 K iv 2  q 2   0 1 C f 2 0

(118)
Accordingly, we obtain the following in which   n is considered a fixed value
 0 0 0 0 0 0 
 0 0 0 0 0 0   K ic 2 
  0   0 0 
 ld 2   1
I 1   I ld 2   L f 2 
 0 0 
I   0 0 n  0    
 lq 2   C f 2 Cf 2 I   0 K ic 2   0 0 
 lq 2
 
d Vod 2   1 1  Vod 2   L f 2   id 2   0 
0  Vbd 2 
  0 n 0 0      
d t Voq 2   Cf 2 C f 2  Voq 2   0 0   iq 2   1  Vbq 2 
I     I   0   0 
 od 2   0 0
1
0 0 n   od 2  
0   Lc 2 
 I oq 2   Lc 2   I oq 2   0 0   1 
  0  
 1   0 0  Lc 2  (119)

 0 0 0 n 0 
 Lc 2  84
Microgrid Solution with two DGs
• For loads and lines,

d I lined 1 1
  I lineq  Vbd 1  Vbd 2 (120)
dt Lline Lline

d I lineq 1 1
  I lined  Vbq1  Vbq 2 (121)
dt Lline Lline

d Vbd 1 1 1
 Vbq1  I od 1  I lined (122)
dt Cload 1 Cload 1

d Vbq1 1 1
 Vbd 1  I oq1  I lineq (123)
dt Cload 1 Cload 1

d Vbd 2 1 1
 Vbq 2  I od 2 ' I lined
dt Cload 2 Cload 2 (124)

d Vbq 2 1 1
 Vbd 2  I oq 2 ' I lineq
dt Cload 2 Cload 2 (125)
85
Microgrid Solution with two DGs
The output of DG #2 is transformed into the dq frame of DG #1:

 I od 2 ' cos   sin    I od 2  Vbd 2 ' cos   sin   Vbd 2 


 I '     (126) V '      (127)
 oq 2   sin  cos    I oq 2   bq 2   sin  cos   Vbq 2 

Then (119) for DG #2 is re-written as

 0 0 0 0 0 0 
 0 0 0 0 0 0   K ic 2 
  0   0 0 
 I ld 2   1 1   I ld 2   L f 2 
 0 0 
I   0 0 n  0    
 lq 2   C f 2 Cf 2 I   0 K ic 2   0 0 
 lq 2
 
d Vod 2   1 1  Vod 2   L f 2   d 2   0 
0  Vbd 2 '
  0 n 0 0        
d t Voq 2   Cf 2 C f 2  Voq 2   0 0   q 2   cos  sin   Vbq 2 ' 
I     I   0    
 od 2   0 0
1
0 0 n   od 2  
0   Lc 2 Lc 2 
 I oq 2   Lc 2   I oq 2   0 0   sin  cos  
   
 1   0 0   Lc 2 Lc 2 
 0 0 0 n 0 
 Lc 2 

(128)
86
Microgrid Solution with two DGs
Here, the output values are stated as
0  0 1 0 0  0 0 0 0 0 0 0 0 0
 [d 1 q1  d 1  q1 I ld 1 I lq1 Vod 1 Voq1 I od 1 I oq 2 
 I odq1  0  0 0 1 0  0 0 0 0 0 0 0 0 0  
 I '   
 d 2 q 2  d 2  q 2 I ld 2 I lq 2 Vod 2 Voq 2 I od 2 I oq 2 
 odq 2  0  0 0 0 0  0 cos   sin  0 0 0 0 0 0  
   I lined I lineq Vbd 1 Vbq1 Vbd 2 Vbq 2 ]T 
0  0 0 0 0  0 sin  cos  0 0 0 0 0 0  426

(130)

The complete microgrid model with two DGs is represented as follows in which X has
three rows: row 1 shows DG1, row 2 shows DG2 and row 3 shows the line values.

  AX  BU (131)
X Y  CX
where
X  [d 1 q1  d 1  q1 I ld 1 I lq1 Vod 1 Voq1 I od 1 I oq1
d 2 q 2  d 2  q 2 I ld 2 I lq 2 Vod 2 Voq 2 I od 2 I oq 2
(132)
I lined I lineq Vbd 1 Vbq1 Vbd 2 Vbq 2 ]T

T (133)
U  [Vodref1 Voqref1 Vodref2 Voqref2 ]T Y   I odq1 I odq 2 '

87
Microgrid Solution with two DGs
 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 
 Kiv1 0 0 0 1 0 0 nC f 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 
 0 Kiv1 0 0 0 1 nC f 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 
 0 0 Kic1 / L f 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 
 0 0 0 Kic1 / L f 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 
 0 0 0 0 1/ C f 1 0 0 n 1/ C f 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 0 0 0 0 0 1/ C f 1 n 0 0 1/ C f 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
 
 0 0 0 0 0 0 1/ Lc1 0 0 n 0 0 0 0 0 0 0 0 0 0 0 0 1/ Lc1 0 0 0 
 
 0 0 0 0 0 0 0 1/ Lc1 n 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1/ Lc1 0 0 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 
 
0 0 0 0 0 0 0 0 0 0 K iv 2 0 0 0 1 0 0 nC f 2 1 0 0 0 0 0 0 0
A 
 0 0 0 0 0 0 0 0 0 0 0 K iv 2 0 0 0 1 nC f 2 0 0 1 0 0 0 0 0 0 
 
 0 0 0 0 0 0 0 0 0 0 0 0 Kic 2 / L f 2 0 0 0 0 0 0 0 0 0 0 0 0 0 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0 Kic 2 / L f 2 0 0 0 0 0 0 0 0 0 0 0 0 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1/ C f 2 0 0 n 1/ C f 2 0 0 0 0 0 0 0 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1/ C f 2 n 0 0 1/ C f 2 0 0 0 0 0 0 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1/ Lc 2 0 0 n 0 0 0 0  cos  / Lc 2  sin  / Lc 2 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1/ Lc 2 n 0 0 0 0 0 sin  / Lc 2  cos  / Lc 2 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n 1/ Lline 0 1/ Lline 0 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n 0 0 1/ Lline 0 1/ Lline 
 0 0 0 0 0 0 0 0 1/ Cload1 0 0 0 0 0 0 0 0 0 0 0 1/ Cload1 0 0 n 0 0 
 
 0 0 0 0 0 0 0 0 0 1/ Cload1 0 0 0 0 0 0 0 0 0 0 0 1/ Cload1 n 0 0 0 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 cos  / Cload 2  sin  / Cload 2 1/ Cload 2 0 0 0 0 n 
 
 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 sin  / Cload 2 cos  / Cload 2 0 1/ Cload 2 0 0 n 0 

T
(134)
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
B 
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (135)
 
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0  0 1 0 0  0 0 0 0 0 0 0 0 0
0  0 0 1 0  0 0 0 0 0 0 0 0 0
C 
(136)
0  0 0 0 0  0 cos   sin  0 0 0 0 0 0
 
0  0 0 0 0  0 sin  cos  0 0 0 0 0 0  426 88
DG in Grid-Connected Mode
• This DG model includes four
parts:
• Power Controller
• Current Controller vb
vi Lf Lc
• LfCf Lc Filter il
vo
io
Main
Grid
• Inverter Cf
• The voltage controller is vi ref

eliminated because the grid is ilref Current


Current il
the grid forming element and Loop
Controller

will regulate the DG voltage. il,qref


-Qn
P/Q
vo
PI
Controller + Q Calculation
• The droop is not necessary io

here because the frequency il,dref PI


Controller + P
Power
and the voltage given by the -Pn
Controller
grid are considered fixed.
DG control diagram for regulating
• This is the model for a current power exchanges with the utility grid
source converter(CSC)
because voltage is given by
the main grid.
89
DG in Grid-Connected Mode
• Power Controller (Reference Current Calculator): We assume:
vo  vod  jvoq p o  vod iod  voq ioq
(136)
io  iod  jioq qo  vod ioq  voq iod
• The instantaneous power components are passed through low-pass filters to
eliminate high frequency harmonics and obtain the real and reactive power P
and Q corresponding to the fundamental component. ωc represents the cut-
off frequency of low-pass filters. So
c c
Po  p o , Qo  qo
s  c s  c
• Then,
 s  c  Po  c  vod iod  voqioq 
 s  c  Qo  c  vod ioq  voqiod 
• Equivalently,
dPo
 c Po  c  vod iod  voq ioq 
dt
dQo (137)
 c Qo  c  vod ioq  voq iod 
dt
90
DG in Grid-Connected Mode
• The corresponding small signal equations are


Po  c Po  c iod
0 0
vod  vod 0
iod  voq  0
ioq  ioq voq 
Q o  c Qo  c vod 
 0 0
ioq  ioq 0
vod  voq  0
iod  iod voq 
or 
 PQ o  APQ PQo  BPQio iodq  BPQvo vodq

where
0  0   0
 Po   c 0   c vod c voq  ciod c ioq 0  
PQo   , APQ  , BPQio  , BPQvo  
Q
 o  0 c   0  0
 c voq c vod 
 0  0
 c ioq c iod 

• If the power controller (for matching PQo with PQoref ) is a proportion plus
integral (PI) controller, the power controller transfer function is
K ip
G p ( s )  K pp 
s
K iq
Gq ( s)  K pq 
s

91
DG in Grid-Connected Mode
• So, in time domain, the output of this controller I PQ
ref
is obtained
 P  K pP  Poref  Po   KiP   Poref  Po  dt
 Q  K pQ  Qoref  Qo   KiQ   Qoref  Qo  dt
• If we denote,
dd dq
 Poref  Po ,  Qoref  Qo
dt dt
• Then
 P  K pP  Poref  Po   K iPd ,  Q  K pQ  Qoref  Qo   K iQ q

ildref   P  ildref   K pP  Poref  Po   K iPd 


• In addition, if we assign  ref   as before, we have  ref    
ilq   Q  i  K
 lq   pQ o  Q ref
 Qo   K 
iQ q 

• So,
ildq
ref
  CV  dq   DV 1  PQoref   DV 2  PQo 

where
 K iP 0   K pP 0    K pP 0 
CV   , D  , D 
 0 K iQ  V1  0
 K pQ  V2  0
  K pQ 

92
DG in Grid-Connected Mode
• Current Controller: Similar to that discussed in island mode section:
 ildq 
 vidq
ref
  CC   dq   DC 1  ildq
ref
  DC 2  vodq 
 
 iodq 

where K 0   K pc 0 
CC   ic  , D C1   0 K 
 0 Kic   pc 

  K pc  n L f 0 0 0 0
DC 2  
 n L f  K pc 0 0 0 0

Along with
 ildq 
 .   
  dq    0    dq   BC 1  ildq   BC 2  vodq 
ref

 iodq 

where ildref + Kpc+Kic /s + vidref


-
 dq    d  q 
T
ild -ωnLf

ωnLf
1 0  1 0 0 0 0 0 ilq
BC1   , B 
 C 2  0 1 0 0 0 0 -
0 1    ilqref + Kpc+Kic /s + viqref

93
DG in Grid-Connected Mode
• LfCf Filter and Coupling Inductance: for current controller, this section would
be the same, but with the difference that   0 because it is connected to
the grid.
 . 
 ildq   ildq 
 .   
 vodq   ALCL  vodq   BLCL1  vidq   BLCL 2  vbdq 
 .   iodq 
 iodq 

where
  rf 1 
L n 0 0 0 
 f Lf 
  rf 1  1   0 0 
 n 0 0 0  L 0 
 0
 Lf Lf   f  0 
 
 1 1   1   0 0 
 0 0 n  0  0   
C Cf   Lf  0 0 
ALCL  f  , BLCL1   0 , BLCL 2  
 0 1 1 0   1 
n 0 0      0 
 Cf Cf  0 0   Lc 
  0
 0 1 rc  0   1
0 0 n     0  
 Lc Lc  0 0   Lc 
 
 1  rc 
 0 0 0 n
 Lc Lc  94
DG in Grid-Connected Mode
A complete state-space model of the DG is given below, where the grid is the
reference  vbdq   0 :  . 
 xinv   AINV  xinv   
T
xinv   PQo dq  dq ildq vodq iodq 

0  0 1 0
 iodq   Cinv  xinv  Cinv   
0  0 0 1  212

 c 0 0 0 0 0 0 0 ciod(0) cioq(0) c vod(0) c voq(0) 


 (0) 
 0 c 0 0 0 0 0 0 c ioq(0) c iod(0) c voq
(0)
c vod 
 1 0 0 0 0 0 0 0 0 0 0 0 
 
 0 1 0 0 0 0 0 0 0 0 0 0 
 K pP 0 K iP 0 0 0 1 0 0 0 0 0 
 
 0 K pQ 0 K iQ 0 0 0 1 0 0 0 0 
 K K K iP K pc K ic K pc  rf 1 
  pP pc 0 0 0  0  0 0 0 
 Lf Lf Lf Lf Lf 
 
K pQ K pc K iQ K pc K ic K pc  rf 1
AINV  0  0 0 0  0  0 0 
 Lf Lf Lf Lf Lf 
 
 1 1 
 0 0 0 0 0 0 0 0 n  0 
Cf Cf
 
 1 1 
 0 0 0 0 0 0 0 n 0 0  
 Cf Cf 
 1 rc 
 0 0 0 0 0 0 0 0 0 n 
 Lc Lc 
 1 rc 
 0 0 0 0 0 0 0 0 0 n 
 Lc Lc  95
Regulating the DG Power in Island
• This section describes the case when DG power is regulated in island situation in
order to supply the fixed microgrid load via the droop control.
• In Fig. 36, the DG current I and the utility feeder voltage V are measured
quantities. The DG power adjustment will maintain a constant V.
• All DGs will adjust their power supply
corresponding to the initial exchange
of power (before islanding) with the V
utility.
PCC Utility
X
• The bus voltage V, where DG is P Grid
I V, I
connected to the microgrid feeder, is Loads
regulated by DG.
DG

Fig. 36. DG regulating its active power output


in an island mode

96
Regulating the DG Power in Island

Fig. 37. P- characteristics for two DG units

• In Fig. 37, the steady state P-ω characteristics for two DGs are shown (labeled
as n), in which power is adjusted between P=0 and P=Pmax as ω changes.
• Once in island mode, frequency, ωimp, is smaller than ωn because the system
was previously importing from the grid in the grid-connected mode.
• As we increase the loading of DG1 and DG2 in island mode, DG2 will reach its
maximum power generation.

97
Regulating the DG Power in Island

Fig. 38. Island mode operation with a limiting Pmax for output power
• In Fig. 38, if the Pmax of DG2 is not enforced, the two DGs settle in ω1, where,
P1 (at ω1) = P1 P2 (at ω1) = Pmax + ΔPmax
• However, when Pmax is enforced, the frequency is shifted to ω2 where P1 can
supply the additional load. The new droop for Unit 2 and final operating point
(shown with squares in Fig. 38) will satisfy the limits:
P1 (at ω2) = P1 + ΔPmax P2 (at ω2) = Pmax

98
Regulating the DG Power in Island
• The opposite case is presented in Fig. 40 where the power was initially
exported from DGs to the power grid.
• In this case, the DG supplies will be reduced in island mode.
• Assume , DG1 dispatch reaches its Pmin as we reduce its power.
- In Fig. 40, without considering Pmin ,
the two DGs operate at ω1 (the two
dots in Fig. 40), where:
P1(at ω1) = Pmin – ΔPmin
P2(at ω1) = P2
- Considering Pmin , DGs operate at ω2
(the two squares in Fig. 41):

P1(at ω2) = Pmin


P2(at ω2) = P2 - ΔPmin
Fig. 40. Limiting Pmin=0 on output power control

99
Appendix 1: State-space Model

Consider the following transfer function:


y ( s) K
G ( s)   3
u ( s) s  a3 s 2  a2 s  a1

s 3 y ( s )  a3 s 2 y ( s )  a2 sy ( s)  a1 y ( s)  Ku ( s )


y (t )  a3 
y (t )  a2 y (t )  a1 y (t )  Ku (t )

If
x1  y (t ), x2  y (t ), x3  
y (t ),

so
x3  a3 x3  a2 x2  a1 x1  Ku (t ),

where
x1  x2 , x2  x3 , x3  a1 x1  a2 x2  a3 x3  Ku (t )
y (t )  x1.

100
Appendix 1: State-space Model

Accordingly:

 x1   0 1 0   x1   0 
 x    0 0 1   x2    0  u  t 
 2     
 x3   a1  a2 a3   x3   K 

 x1 
y  1 0 0   x2 
 
 x3 

If we define:

 0 1 0  0
X=  x1 x3  , A   0 1  , B   0  , C= 1 0 0.
T
x2 0
   
  a1  a2  a3   K 

101
Appendix 1: State-space Model
Then, we can represent the differential equation in the state space form given as

 .
X  AX  Bu (t )

 y (t )  CX

In general, for
y( s) K
G(s)   n
u ( s ) s  an s n1  an1s n2    a1
 .
X  AX  Bu (t )

 y (t )  CX

 0 1 0  0  0
 0 0 1  0  0
   
where A 0 0 0  0  , B   0  , C= 1 0 0  0.
   
     1  
  a1  a2  a3   an   K 

102
Appendix 1: State-space Model

If U=0, then .
X  AX

For a first order A, the above equation is represented as


x (t )  ax(t )
And the solution is given as
x(t )  e at x(0)

So if add the input function u(t), then


x (t )  ax(t )  bu (t )
We find the Laplace transform (frequency domain) of the first order problem in order
to solve it as
sx( s )  x(0)  ax ( s)  bu ( s)
x( s )   s  a   x(0)  bu ( s )
x( s )   s  a    x(0)  bu ( s )
1

we can obtain
t
x(t )  e x(0)  L ( s  a) bu ( s )   e x(0)   e a ( t  )bu ( )d
at 1 1 at

0
103
Appendix 1: State-space Model

Similarly, for a n-th order A, we can solve the problem similarly as

X( s )   sI  A    X(0)  BU( s )
1

Then t
X(t )  e X(0)   e A (t  ) B  U ( )d
At

Consider an Example:

 1 1  0  1
A  , B    , X (0)    ,u (t )  1(t  0),
 0 2  1  0

we can obtain
t
e
t
e   1
t t
e ( t  )
e  ( t  )
e 2( t  )
 0  e   e
t  ( t  )
e 2( t  )

e 2 t   0  0  0
X(t )   
     
   d =    ,
0 e 2(t  ) 1
    0   e 2(t  ) 0

1 t e 2t 
 2  2e  2 
X(t )=  2 t
.
 1 e 
 2  
2
104
Appendix 2: Space Phasor Model

• Consider the following balanced, three-phase, sinusoidal function (which


can represent a three-phase electrical voltage or current signal):

(1)

where fˆ , 0 , and  are the amplitude, initial phase angle, and angular
frequency of the function, respectively.
• We define a space phasor as:

(2)
1
• Substituting for f abc from (1) in (2), and using the identities cos  (e j  e j ) and
2
e j 0  e j 2 /3  e j 4 /3  0 , one obtains

where (3)
105
Appendix 2: Space Phasor

• The previous definition of the space phasor can be extended to include a


variable frequency three-phase function as:

(4)

where and  (t ) is a time-varying frequency.


• Based on (2), the space phasor corresponding to (4) is expressed as
(5)
which suggests a space phasor in its most general form embeds
information on amplitude, phase angle, and frequency of the
corresponding three-phase function.
• Space phasors in (3) and (5) are identical if  (t ) is constant.
106
Appendix 2: Space Phasor

• The real-valued components f a (t ) , fb (t ) , and f c (t ) can be retrieved from


the corresponding space phasor, based on the following equations:

(6)

where Re{·} is the real-part operator, and f a (t ) , fb (t ) , and f c (t ) are


 
projections of, respectively, f (t ) , f (t )e  j 2 /3 , and f (t )e  j 4 /3 on the real
axis of the complex plane.

Equation (2) Equation (6) 107


Appendix 2: dq-Frame Model

• Recall that where  (t ) is the time-varying



frequency
and 0 is the initial phase angle of the signal corresponding to f (t ) .
• If we choose a rotating reference which is stated as
then we define 
f  jf  f (t )e  j ( t )  fˆ (t )e j (0  0 )
d q

which is stationary function because the right-hand side of the equation


is not a function of time. Therefore, the constituents of its
corresponding three-phase signal are DC quantities.

• We can consider f as a vector stated by


the components f d and f q in a coordinate
system that is rotated by  (t ) with respect
to the Cartesian coordinates. Such rotated
coordinates is denoted as dq-frame.
• The dq-frame is also known as rotating
reference frame. Usually, the rotational
speed of the dq-frame

is selected to be
equal to that of f . 108
Appendix 2: dq-Frame Model
• Since , we have
 2   j ( t ) j   ( t )  2 /3 j   ( t ) 4 / 3
f d  jf q  f (t )e  j ( t )   e f a ( t )  e f b (t )  e f c (t ) 
3
• Based on the Euler’s identity, a direct transformation
from the abc-frame to the dq-frame can be obtained as
  2   4  
 cos  (t ) cos  (t )  cos  (t ) 
 3   3  
where, T[ (t )]   
  2   4  
  sin  (t )  sin  (t )   sin  (t )  
  3   3  

• Similarly, a direct transformation from the dq-frame to the abc-frame is


 cos  (t )  sin  (t ) 
 

cos  (t )  2   2  
 sin  (t ) 
where, T[ (t )]T    3   3 

 
cos  (t )  4   sin  (t )  4  
  3   3  
• Here, it can be verified that

and

109
Appendix 2: dq-Frame Model
• The space-phasor equations of symmetrical three-phase microgrid
systems can be developed by inspecting abc-frame equations.
• If we define the three-phase real and reactive power as follows, where 3
represent the three-phase system and 2 represent the RMS value:

 
• We substitute v (t )  (vd  jvq )e j ( t )
and i * (t )  (id  jiq )e j (t ) in the above
equations, then

Here, if vq  0 (i.e., used as a reference vector), the real- and reactive-


power components are proportional to id and iq , respectively. This
property is widely employed in the control of microgrid systems. 110
Appendix 2: Example
• This Figure illustrates a circuit diagram of a current-controlled three-
phase voltage-source converter system of which each phase is
interfaced with the corresponding phase of an AC grid system (on the
right side). The AC system is represented by a voltage source vsabc in
series with three decoupled inductors. The inductance of each inductor
is Ls .
• iabc is the control (i.e., input) variable, whereas vabc and isabc are state
(controlled) variables.
• We select the common
point of capacitors, that is,
node 0, as the reference
voltage node. The voltage
of the AC system neutral
point is assumed to be vn (t ) .

111
Appendix 2: Example
• The state-space equations regarding capacitors can be written as:

which are expressed in the space-phasor domain as .


• The state-space equations regarding inductors can be written as:

Since (2 / 3)(e j 0  e j 2 /3  e j 4 /3 )  0 , then (2 / 3)(e j 0 vn  e j 2 /3vn  e j 4 /3vn )  0 . Hence,


vn is eliminated in the process of conversion from the abc-frame to the
space-phasor domain of the second set of equations. Also, d . in the I in
the space-phasor domain . 112
Appendix 2: Example
• The space-phasor equations for the circuit are given as

• Substituting for i  T idq , v  T T vdq , and is  T isdq , we obtain


T T

C
d (T T vdq )
dt
 T idq  T isdq
T T where, 2
T
3 dt 
d T
T 
 0  
 0  and

• Equivalently, 2 1 0 
 dvdq  T T  
T

  C  t  vqd  idq  isdq 0 1 
3
C
 dt 
• Here, when we multiply vdq by j, we shift the dq coordinates by 90
degrees. So, j vd = vq and j vq = - vd . Eliminating e j (t ) from both sides and
decomposing the result into real and imaginary parts, we have
dvd dvq
C  C  t  vq  id  isd , C  C  t  vd  iq  isq
dt dt
disd disq
• Similarly, Ls  Ls  t  isq  vd  vsd , Ls   Ls  t  isd  vq  vsq
dt dt 113

You might also like