Учебники / 0841558_16EA1_federico_milano_power_system_modelling_and_scripting
.pdf
518 |
|
|
|
|
C Control Diagrams |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fig. C.4 Transient response of windup and anti-windup limiters
straightforward.1 The issue consists in that the output w of lead-lags or PI controllers is an explicit function of the input y, whose first time derivative, in some cases, cannot be determined. Figure C.5 shows some common solutions for implementing an anti-windup limiter of a PI controller. Figure C.5.e is the most precise model, which is also the most complex.
Script C.1 Implementation of Windup and Anti-Windup
Limiters
The object of the scripts below is to define a vector, say self.z, whose elements are 1 if the associated state variable is not saturated and belongs to an on-line element; and 0 otherwise. Thus, self.z is a copy of the status array self.u if no state variable is saturated.
The following code implements the windup limiter. The input arguments are the DAE system (dae) and the names of the state variable (x), of the maximum and minimum value (xmax and xmin, respectively) and of the saturation status (z).
1 Di culties arises whenever the transfer function has the same number of poles and zeros.
C.2 Hard Limits |
|
|
|
|
|
|
|
|
519 |
|
Kp |
|
|
|
|
Kp |
|
wmax |
|
|
|
|
|
|
|
|
|
||
y |
|
|
+ |
w |
y |
|
+ |
w |
|
|
|
|
|
|
|
||||
|
Ki |
x |
+ |
|
|
x |
+ |
|
|
|
|
|
|
|
Ki |
|
|
|
|
|
s |
|
|
|
|
s |
wmin |
|
|
|
(a) |
|
|
|
|
(b) |
|
|
|
Kp |
|
|
wmax |
|
Kp |
|
|
wmax |
|
|
|
|
|
|
|
|
|
||
y |
|
+ |
|
w |
y |
|
+ |
|
w |
|
|
|
|
|
|
||||
xmax |
|
|
|
|
|
|
|
|
|
Ki |
x |
+ |
|
|
+ |
x |
+ |
|
|
|
|
|
|
|
Ki |
|
|
|
|
s |
|
wmin |
|
|
|
s |
|
wmin |
|
|
|
|
|
− |
|
|
− |
||
|
|
|
|
|
|
|
+ |
||
xmin |
|
|
|
|
|
|
|
|
|
(c) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Ks |
|
|
|
|
|
|
|
|
|
(d) |
|
|
|
Kp |
|
wmax |
y |
+ |
w |
|
||
Ki |
+ |
|
|
|
|
s |
|
wmin |
|
|
|
0 |
|
|
|
|
|
> |
|
& |
(e) |
|
|
Fig. C.5 PI controller: (a) basic PI scheme without hard limits, (b) windup limiter,
(c) limited integrator, (d) tracking anti-windup, and (e) integrator clamping
def windup(self, dae, x, xmax, xmin, z):
sumz = sum(self. dict [z]) self. dict [z] = matrix(self.u) zmax = matrix(self.u)
zmin = matrix(self.u)
for idx, item in enumerate(self. dict [x]): if dae.x[item] >= self. dict [xmax][idx]:
dae.f[item] = 0
dae.x[item] = self. dict [xmax][idx]
520 |
C Control Diagrams |
self. dict [z][idx] = 0 |
|
zmax[idx] = 0 |
|
elif dae.x[item] <= self. dict |
[xmin][idx]: |
dae.f[item] = 0 |
|
dae.x[item] = self. dict [xmin][idx] self. dict [z][idx] = 0
zmin[idx] = 0
if sumz != sum(zmax) or sumz != sum(zmin): dae.factorize = True
A similar method can be used for limiting algebraic variables. The last line of the previous code is needed to impose a re-factorization of the system Jacobian matrix. If a state variable reaches a limit, its value is constant. Thus, if a variable has a position k in the system Jacobian matrix AC , then one has to set to zero the entire kth row and kth column. Only the diagonal element (k, k) of the matrix AC has to be non-zero to avoid singularity. Since AC = [[f x, f y ]; [gx, gy ]], the saturation of the state variable with index k corresponds to set to zero the k-th row of f x and f y and the k-th column of f x and gx and to assign a non-zero value to the element (k, k) of f x. The following code is an e cient way to do that (it is assumed that the function is a method of the class system.DAE).
def set Ac(self, idx):
H = spmatrix(1.0, idx, idx, (self.ny, self.ny))
I = spdiag([1.0]*self.ny) - H
self.Gy = I * (self.Gy * I) + H self.Fy = self.Fy * I
self.Gx = I * self.Gx
The following code does the same as the previous one, but it is less e cient (about 5 times slower):
def set Ac(self, idx):
self.Gy[idx, :] = 0 self.Gy[:, idx] = 0
self.Gy += spmatrix(1.0, idx, idx, (self.ny, self.ny), ’d’) self.Fy[:, idx] = 0.0
self.Gx[idx, :] = 0.0
# needed to maintain the minimum sparsity level self.Gy = sparse(self.Gy)
self.Fy = sparse(self.Fy) self.Gx = sparse(self.Gx)
The di erence in the e ciency of the previous functions is typical of scripting languages. In fact, matrix initialization, indexing and operations are obtained through interfaces to external libraries. Since the bottleneck are the calls to the external library, the less the number of calls, the faster the resulting code.
The following method implements an anti-windup limiter. The main difference with the previous method is the check on the sign of the di erential equation, i.e., the state variable time derivative.
C.2 Hard Limits |
521 |
def anti windup(self, dae, x, xmax, xmin, z):
sumz = sum(self. dict [z]) self. dict [z] = matrix(self.u) zmax = matrix(self.u)
zmin = matrix(self.u)
for idx, item in enumerate(self. dict [x]):
if dae.x[item] >= self. dict [xmax][idx] and \ dae.f[item] > 0:
dae.f[item] = 0
self. dict [z][idx] = 0 zmax[idx] = 0
dae.x[item] = self. dict [xmax][idx]
elif dae.x[item] <= self. dict [xmin][idx] and \ dae.f[item] < 0:
dae.f[item] = 0
self. dict [z][idx] = 0 zmin[idx] = 0
dae.x[item] = self. dict [xmin][idx] if sumz != sum(zmax) or sumz != sum(zmin):
dae.factorize = True
524 |
|
|
|
D IEEE 14-Bus System Data |
|||
Table D.1 Bus, PQ load and shunt data |
|||||||
|
|
|
|
|
|
|
|
|
Bus |
Voltage Rating |
pL |
qL |
bsh |
|
|
|
# |
kV |
pu |
pu |
pu |
|
|
|
|
|
|
|
|
|
|
|
1 |
69.0 |
- |
- |
|
- |
|
|
|
|
|
|
|
|
|
|
2 |
69.0 |
0.217 |
0.127 |
|
- |
|
|
3 |
69.0 |
0.942 |
0.19 |
|
- |
|
|
4 |
69.0 |
0.478 |
-0.039 |
|
- |
|
|
5 |
69.0 |
0.076 |
0.016 |
|
|
|
|
|
- |
|
||||
|
6 |
13.8 |
0.112 |
0.075 |
|
- |
|
|
7 |
13.8 |
- |
- |
|
- |
|
|
8 |
18.0 |
- |
- |
|
- |
|
|
9 |
13.8 |
0.295 |
0.166 |
|
0.19 |
|
|
10 |
13.8 |
0.09 |
0.058 |
|
- |
|
|
11 |
13.8 |
0.035 |
0.018 |
|
- |
|
|
12 |
13.8 |
0.061 |
0.016 |
|
- |
|
|
13 |
13.8 |
0.135 |
0.058 |
|
- |
|
|
14 |
13.8 |
0.149 |
0.05 |
|
- |
|
|
|
|
|
|
|
|
|
Table D.2 Static generator data
Bus |
Type |
p |
G |
v |
qmax |
qmin |
|
|
|
|
G |
G |
G |
||
# |
|
pu |
pu |
pu |
pu |
||
|
|
|
|
|
|
||
1 |
Slack |
2.324 |
1.06 |
|
9.9 |
-9.9 |
|
2 |
PV |
0.4 |
1.045 |
|
0.5 |
-0.4 |
|
3 |
PV |
0 |
1.01 |
|
|
0 |
|
|
0.4 |
||||||
6 |
PV |
0 |
1.07 |
|
0.24 |
-0.06 |
|
8 |
PV |
0 |
1.09 |
|
0.24 |
-0.06 |
|
D.4 Dynamic Data
Tables D.5 and D.6 show the synchronous machine and automatic voltage regulator data used throughout this book, unless otherwise indicated. Dynamic shaft data used in Example 15.5 are shown in Table D.7. Turbine governor data used in Example 16.1 are depicted in Table D.8. Power System stabilizer data used in Example 16.3 are shown in Table D.9.
D.5 FACTS Data
SVC Type I and Type II data used in Example 19.1 are depicted in Tables D.10 and D.11.
The data of the detailed STATCOM device used in Example 19.2 are as follows.
D.5 FACTS Data |
|
|
|
|
|
|
|
|
|
|
|
|
525 |
||
|
Table D.3 Transmission line and transformer data |
||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
From bus |
To Bus |
Type |
rhk |
|
xhk |
|
bh = bk |
m |
|
|||||
|
# |
# |
|
|
|
pu |
|
pu |
|
pu |
pu/pu |
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
2 |
|
Line |
0.01938 |
0.05917 |
|
0.0528 |
- |
|
|||||
|
1 |
5 |
|
Line |
0.05403 |
0.22304 |
|
0.0492 |
- |
|
|||||
|
2 |
3 |
|
Line |
0.04699 |
0.19797 |
|
0.0438 |
- |
|
|||||
|
2 |
4 |
|
Line |
0.05811 |
0.17632 |
|
0.0374 |
- |
|
|||||
|
2 |
5 |
|
Line |
0.05695 |
0.17388 |
|
0.034 |
- |
|
|||||
|
3 |
4 |
|
Line |
0.06701 |
0.17103 |
|
0.0346 |
- |
|
|||||
|
4 |
5 |
|
Line |
0.01335 |
0.04211 |
|
0.0128 |
- |
|
|||||
|
4 |
7 |
|
Transf. |
0 |
0.20912 |
|
0 |
0.978 |
|
|||||
|
4 |
9 |
|
Transf. |
0 |
0.55618 |
|
0 |
0.969 |
|
|||||
|
5 |
6 |
|
Transf. |
0 |
0.25202 |
|
0 |
0.932 |
|
|||||
|
6 |
11 |
|
Line |
0.09498 |
0.19890 |
|
0 |
- |
|
|||||
|
6 |
12 |
|
Line |
0.12291 |
0.25581 |
|
0 |
- |
|
|||||
|
6 |
13 |
|
Line |
0.06615 |
0.13027 |
|
0 |
- |
|
|||||
|
7 |
8 |
|
Transf. |
0 |
0.17615 |
|
0 |
1.0 |
|
|||||
|
7 |
9 |
|
Line |
0 |
0.11001 |
|
0 |
- |
|
|||||
|
9 |
10 |
|
Line |
0.03181 |
0.08450 |
|
0 |
- |
|
|||||
|
9 |
14 |
|
Line |
0.12711 |
0.27038 |
|
0 |
- |
|
|||||
|
10 |
11 |
|
Line |
0.08205 |
0.19207 |
|
0 |
- |
|
|||||
|
12 |
13 |
|
Line |
0.22092 |
0.19988 |
|
0 |
- |
|
|||||
|
13 |
14 |
|
Line |
0.17093 |
0.34802 |
|
0 |
- |
|
|||||
|
|
|
Table D.4 Generator bid data |
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
Bus |
|
Cp1 |
|
Cp2 |
|
pGmax |
pGmin |
|
|
|
||
|
|
|
# |
e/MWh |
e/MW2h |
pu |
|
pu |
|
|
|
||||
|
|
|
|
|
|
||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
1 |
|
20 |
|
0.04303 |
|
2.0 |
|
0 |
|
|
|
|
|
|
|
2 |
|
20 |
|
0.25 |
|
1.4 |
|
0 |
|
|
|
|
|
|
|
3 |
|
40 |
|
0.01 |
|
1.0 |
|
0 |
|
|
|
|
|
|
|
6 |
|
40 |
|
0.01 |
|
1.0 |
|
0 |
|
|
|
|
|
|
|
8 |
|
40 |
|
0.01 |
|
1.0 |
|
0 |
|
|
|
|
Dc nodes: The dc networks is composed of two dc nodes with Vdc,n = 10 kV. One of the node is the ground (v = 0).
Parallel RC: G = 0.0017 S, C = 0.0432 F.
VSC device: rT = 0.02 pu, xT = 0.1 pu, imax = 1.2 pu.
STATCOM regulators: vdcref = 1.06 pu, vacref = 1.0563 pu, T1 = T2 = Tac =
Tdc = 0.01 s, K = 100 pu/pu, KD = 0, KI = 5 rad/pu/s, KP = 10 rad/pu, Kac = Kdc = 1 pu/pu, mmax = 3, mmin = 0.5, αmax = π rad, αmin = −π rad.
526 |
|
|
|
|
|
|
|
|
|
|
|
|
D IEEE 14-Bus System Data |
||||||||
|
|
|
|
|
Table D.5 Synchronous machine data |
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Param. |
|
Unit |
|
Mach. 1 |
|
Mach. 2 |
Mach. 3 |
|
Mach. 4 |
|
Mach. 5 |
|||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
|
Bus |
|
|
# |
|
1 |
|
2 |
|
3 |
|
|
6 |
|
|
8 |
|
|
|||
|
Model |
|
|
|
|
|
5.a |
|
6.a |
6.a |
|
6.a |
|
6.a |
|
||||||
|
Sn |
|
|
MVA |
|
615 |
|
60 |
|
60 |
|
|
25 |
|
|
25 |
|
||||
|
x |
|
|
|
pu |
|
0.2396 |
|
0 |
|
0 |
|
|
0.134 |
|
0.134 |
|
||||
|
ra |
|
|
|
pu |
|
0 |
|
0.0031 |
|
0.0031 |
|
|
0.0041 |
|
0.0041 |
|
||||
|
xd |
|
|
|
pu |
|
0.8979 |
|
1.05 |
|
1.05 |
|
|
1.25 |
|
|
1.25 |
|
|||
|
xd |
|
|
|
pu |
|
0.2995 |
|
0.185 |
|
0.185 |
|
|
0.232 |
|
0.232 |
|
||||
|
xd |
|
|
|
pu |
|
0.23 |
|
0.13 |
|
0.13 |
|
|
0.12 |
|
|
0.12 |
|
|||
|
Td0 |
|
|
|
s |
|
7.4 |
|
6.1 |
|
6.1 |
|
|
4.75 |
|
|
4.75 |
|
|||
|
Td0 |
|
|
|
s |
|
0.03 |
|
0.04 |
|
0.04 |
|
|
0.06 |
|
|
0.06 |
|
|||
|
xq |
|
|
|
pu |
|
0.646 |
|
0.98 |
|
0.98 |
|
|
1.22 |
|
|
1.22 |
|
|||
|
xq |
|
|
|
pu |
|
0.646 |
|
0.36 |
|
0.36 |
|
|
0.715 |
|
0.715 |
|
||||
|
xq |
|
|
|
pu |
|
0.4 |
|
0.13 |
|
0.13 |
|
|
0.12 |
|
|
0.12 |
|
|||
|
Tq0 |
|
|
|
s |
|
0 |
|
0.3 |
|
0.3 |
|
|
1.5 |
|
|
1.5 |
|
|||
|
Tq0 |
|
|
|
s |
|
0.033 |
|
0.099 |
|
0.099 |
|
|
0.21 |
|
|
0.21 |
|
|||
|
D |
|
|
|
pu |
|
2 |
|
2 |
|
2 |
|
|
2 |
|
|
2 |
|
|
||
|
H |
|
MWs/MVA |
|
5.148 |
|
6.54 |
|
6.54 |
|
|
5.06 |
|
|
5.06 |
|
|||||
|
|
|
|
Table D.6 Automatic voltage regulator data |
|||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|||||||||||
|
|
Param. |
Unit |
|
AVR 1 |
AVR 2 |
AVR 3 |
AVR 4 |
AVR 5 |
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
Machine |
# |
|
|
1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
|
|||||
|
|
|
Model |
|
|
|
|
1 |
|
1 |
|
1 |
|
1 |
|
1 |
|
|
|||
|
|
|
vrmax |
|
pu |
|
9.9 |
|
2.05 |
|
1.7 |
|
2.2 |
|
2.2 |
|
|
||||
|
|
|
vrmin |
|
pu |
|
0 |
|
0 |
|
0 |
|
1.0 |
|
1.0 |
|
|
||||
|
|
|
Ka |
|
pu/pu |
|
200 |
|
20 |
|
20 |
|
20 |
|
20 |
|
|
||||
|
|
|
Ta |
|
s |
|
0.02 |
|
0.02 |
|
0.02 |
|
0.02 |
|
0.02 |
|
|
||||
|
|
|
Kf |
|
s pu/pu |
0.0012 |
0.001 |
|
0.001 |
|
0.001 |
0.001 |
|
|
|||||||
|
|
|
Tf |
|
s |
|
1.0 |
|
1.0 |
|
1.0 |
|
1.0 |
|
1.0 |
|
|
||||
|
|
|
Ke |
|
pu |
|
1.0 |
|
1.0 |
|
1.0 |
|
1.0 |
|
1.0 |
|
|
||||
|
|
|
Te |
|
s |
|
0.19 |
|
1.98 |
|
1.98 |
|
0.7 |
|
0.7 |
|
|
||||
|
|
|
Tr |
|
s |
|
0.001 |
0.001 |
0.001 |
0.001 |
0.001 |
|
|
||||||||
|
|
|
Ae |
|
- |
|
|
0.0006 |
0.0006 |
0.0006 |
0.0006 |
0.0006 |
|
|
|||||||
|
|
|
Be |
|
1/pu |
|
0.9 |
|
0.9 |
|
0.9 |
|
0.9 |
|
0.9 |
|
|
||||
D.6 Wind Turbine Data
Wind turbine data used in Example 20.4 of Chapter 20 are given below.
Mechanical data: ngen = 40, npole = 4, nblade = 3, ηGB = 1/89, Ht = 1.5 MWs/MVA, Hm = 0.5 MWs/MVA, Ks = 1 pu, ρ = 1.225 kg/m3, R = 35 m, Tp = 3 s, and Kp = 10 rad/pu.
528 D IEEE 14-Bus System Data
Non-controlled speed wind turbine data: rr = 0.01 pu, rs = 0.01 pu, xμ = 3.0 pu, xr = 0.08 pu, and xs = 0.1 pu.
Doubly-fed asynchronous generator data: KV = 10 pu/pu/s, T = 0.01 s, rr = 0.01 pu, rs = 0.01 pu, xμ = 3.0 pu, xr = 0.08 pu, and xs = 0.1 pu.
Direct-drive synchronous machine data: Kdc = Kds = 1.0 pu/pu, Kqc = 200 pu/pu, Tdc = Tds = Tqc = Tqs = 0.01 s, ψp = 1.2 pu, rs = 0.01, pu, xd = 1.0, and xq = 0.8 pu.
