Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Учебники / 0841558_16EA1_federico_milano_power_system_modelling_and_scripting

.pdf
Скачиваний:
80
Добавлен:
08.06.2015
Размер:
6.72 Mб
Скачать

208

 

 

 

 

8 Time Domain Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 8.11 Equivalent OMIB electrical and mechanical powers as a function of the equivalent OMIB rotor angle δOMIB for the transient following a three-phase fault at bus 4 for the IEEE 14-bus system

from cvxopt.umfpack import solve as umfsolve

def timedomain():

# check settings

iter max = system.Settings.dynmit tol = system.Settings.tol

nx = system.DAE.nx ny = system.DAE.ny

In = spmatrix(1, range(nx), range(nx), (nx, nx), ’d’)

# initializations

t = system.Settings.t0 step = 0

h = first time step()

inc = matrix(0, (nx + ny, 1), ’d’) inc = matrix(0, (nx + ny, 1), ’d’) system.DAE.factorize = True system.DAE.mu = 1.0

system.DAE.kg = 0.0 switch = False nextpc = 0.1

# time vector faults and breaker events

8.4 Numerical Integration Routine

209

fixed times = system.Device.get times()

#compute max rotor angle difference diff max = anglediff()

#Main loop

while t <= system.Settings.tf and t + h > t and not diff max:

if t + h > system.Settings.tf: h = system.Settings.tf - t actual time = t + h

#check for the occurrence of a disturbance for item in fixed times:

if item > t and item < t + h: actual time = item

h = actual time - t switch = True break

#set global time

system.DAE.t = actual time

#backup of actual variables xa = matrix(system.DAE.x)

ya = matrix(system.DAE.y)

#initialize NR loop iteration = 0

fn = matrix(system.DAE.f)

#applying faults, breaker interventions and disturbances if switch:

system.Fault.intervention(actual time) system.Breaker.intervention(actual time) switch = False

if system.Settings.disturbance: system.File.disturbance(actual time)

# main loop of the Newton’s method

system.Settings.error = tol + 1 # force at least one iteration while system.Settings.error > tol and iteration < iter max:

# DAE equations

exec system.Device.call int

# complete Jacobian matrix DAE.Ac

if system.Settings.method == ’euler’:

system.DAE.Ac = sparse([[In - h*system.DAE.Fx, system.DAE.Gx], \

[-h*system.DAE.Fy, system.DAE.Gy]]) system.DAE.q = system.DAE.x - xa - h*system.DAE.f

else: # default is implicit trapezoidal method

system.DAE.Ac = sparse([[In - h*0.5*system.DAE.Fx, system.DAE.Gx],\

[-h*0.5*system.DAE.Fy, system.DAE.Gy]]) system.DAE.q = system.DAE.x - xa - h*0.5*(system.DAE.f + fn)

210 8 Time Domain Analysis

# anti-windup limiters

exec system.Device.call windup if system.DAE.factorize:

F = symbolic(system.DAE.Ac) system.DAE.factorize = False

inc = -matrix([system.DAE.q, system.DAE.g]) try:

umfsolve(system.DAE.Ac, numeric(system.DAE.Ac, F), inc) except ArithmeticError:

print ’Singular matrix’ iteration = iter max + 1

except ValueError:

# Unexpected refactorization of the power flow Jacobian matrix F = symbolic(system.DAE.Ac)

try:

umfsolve(system.DAE.Ac, numeric(system.DAE.Ac, F), inc) except ArithmeticError:

print ’Singular matrix’ iteration = iter max + 1

system.DAE.x += inc[:nx] system.DAE.y += inc[nx:nx + ny]

system.Settings.error = max(abs(inc)) iteration += 1

if iteration >= iter max:

h = time step(False, iteration, t)

print ’Reducing time step (delta t = %.5f s)’ % h system.DAE.x = matrix(xa)

system.DAE.y = matrix(ya) system.DAE.f = matrix(fn) continue

#update output variables and time step t = actual_time

step += 1 system.Varout.store(t, step)

#avoid freezing at t == system.Settings.tf if h == 0: break

h = time_step(True, iteration, t)

#plot variables and display iteration status

perc=(t - system.Settings.t0)/(system.Settings.tf - system.Settings.t0) if perc > nextpc:

print ’ # Simulation time = %.4f s (%.1f%%)’ % (system.DAE.t, perc*100) nextpc += 0.1

# compute max rotor angle difference diff max = anglediff()

8.5 Electro-magnetic Transients

211

8.5Electro-magnetic Transients

In [78], Dommel proposed a compensation method based on nodal analysis for a systematic study of electro-magnetic transients of electrical circuits. The Dommel’s method is a numerical integration substitution that transforms the basic electrical elements, namely resistances, inductances and capacitances, into an equivalent parallel circuit composed of a resistance and a current generator. A fixed-step trapezoidal method allows obtaining this result.

Inductance

For an inductance, one has:

vh − vk = L

dihk

(8.58)

dt

where h and k are the terminal nodes of the inductance. At a generic time step t, the current variations for t + Δt is:

ihk(t + Δt) = ihk(t) + L +t

t+Δt

(8.59)

(vh − vk )dt

1

 

 

 

Applying the trapezoidal rule:

ˆ

Δt

(vh(t + Δt) − vk (t + Δt))

ihk(t + Δt) = ihk(t) +

2L

ˆ

where the equivalent current ihk(t) depends on the system state at t:

ˆ

Δt

(vh(t) − vk (t))

ihk(t) = ihk (t) +

2L

(8.60)

(8.61)

Capacitance

For a capacitance, one has:

vh(t + Δt) − vk (t + Δt) = C +t

t+Δt

(8.62)

ihkdt + vh(t) − vk (t)

1

 

 

 

Applying the trapezoidal rule:

 

 

 

ˆ

2C

(vh(t + Δt) − vk (t + Δt))

 

ihk(t + Δt) = ihk(t) +

Δt

(8.63)

212

 

8 Time Domain Analysis

ˆ

 

 

 

where the equivalent current ihk(t) depends on the system state at t:

 

ˆ

2C

(vh(t) − vk (t))

 

ihk(t) = −ihk(t)

Δt

(8.64)

Resistance

The resistance is a memory-less element. Thus, one has:

 

 

ihk(t + Δt) =

1

(vh(t + Δt) − vk (t + Δt))

 

 

(8.65)

 

 

R

 

 

ihk (t)

h

ihk (t)

h

ihk (t)

h

ihk (t)

h

 

ihk (t)

h

 

 

 

 

 

 

 

L

 

R = 2L

 

 

C

 

R =

Δt

 

R

 

 

 

Δt

 

 

 

 

 

2C

 

 

 

 

ˆ

 

 

 

 

ˆ

 

 

 

 

 

 

ihk (t)

 

 

 

 

ihk (t)

 

 

 

 

 

k

 

k

 

 

k

 

k

 

 

k

 

 

Inductance

 

 

 

 

Capacitance

 

 

Resistance

Fig. 8.12 Dommel’s equivalents

Figure 8.12 summarizes the compensated models introduced by the Dommel’s method. In conclusion, an electrical network composed of linear devices can be represented as:

ˆ

(8.66)

Gv(t + Δt) = i(t + Δt) + i(t)

where G is the nodal conductance matrix, v(t + Δt) is the vector of node voltages at time t + Δt, i(t + Δt) is the vector of currents injected at nodes

ˆ

at time t + Δt, and i(t) is the vector of known current sources at time t. The main advantage of (8.66) is that the conductance matrix G is con-

stant (as long as the network topology does not change) and thus it can be factorized only once at the beginning of the time integration. The e ciency of the Dommel’s method has made it a standard de facto in electro-magnetic transients and has been adopted by most popular EMT software tools (e.g., PSCAD and ATP).

However, the proposed method is not flawless, at least if one needs to integrate it into a transient stability analysis tool. Main drawbacks are as follows [154]:

1.If the network topology changes several times (e.g., due to converter switching), the method is not so e ective since the matrix G has to be recomputed and re-factorized several times.

8.6 Quasi-static Analysis

213

2.Matrix G is constant only if the system element are linear. At most, nonlinear current sources can be used [79]. In case of nonlinear elements, G has to be re-factorized at each time step.

3.Since nodal equations are reformulated as integral-di erential algebraic equations (IDAE), the network nodal conductance matrix may result poorly conditioned and may show numerical instabilities [109].

Although in EMT programs the issues above can be overcome, the integration of electro-magnetic transient analysis into a transient stability program is still an open task [151]. The integration is more and more a necessity due to the large penetration of non-conventional energy sources, most of which are dc systems (e.g., photo-voltaic and fuel cells). Thus, there is the need of modelling both static converters and dc circuits. Chapters 17 and 18 describe in details dc models and ac/dc converters, respectively. In those chapters, a general nonlinear current-injection model (8.13) is used.

8.6Quasi-static Analysis

In some applications, the variations of the inputs are relatively slow with respect to transient dynamics. A relevant example is the study of the e ect of long term voltage stability phenomena, such as the daily load ramp or voltage collapse [336]. In this case load powers are modelled as time dependent controllable parameters η(t). Since load variations take from tens of minutes to some hours, any transient dynamic can be considered steady-state. The resulting system equations are obtained by imposing x˙ = 0 in (8.12):

0 = f (x, y, η(t))

(8.67)

0 = g(x, y, η(t))

which is generally referred to as quasi-static or quasi-steady-state model. For example, a quasi-steady-state simulator called WPSTAB has been developed by the National Technical University of Athens [340].

Loads can be modeled as linear time ramps:

pL(t) = pL0 + rLt

(8.68)

In practice, the load ramp can be assumed as:

rL ≡ ktpL0

(8.69)

where kt is a coe cient that imposes the time rate. For example kt = 1/3600 s1 means the that load powers double in one hour.

Solving the original system (8.12) with a very small time rate kt provides practically same results as (8.67). However, (8.67) allows drastically reducing the computing time. In fact, the maximum time step that can be used for integrating (8.12) depends on the system time constants. On the other hand,

214

8 Time Domain Analysis

the solution of (8.67) is a sequence of equilibrium points and thus the step length size is limited only by the convergence properties of the method used for solving (8.67) and by the initial guess, which is generally set as the solution of the previous point.

It is relevant to note the similarity between (8.68) and the load direction model (5.13) given in Chapter 5. Section 5.4.4 suggests that the homotopy (5.59) can be interpreted as a di erential equation where the continuation parameter μ is used as an independent variable (e.g., Davidenko’s method). Analogously, in (8.67), the independent variable t can viewed as a continuation parameter. The point is that any homotopy method described in Chapter 5 can be used for studying (8.67) and for determining how much the system can be loaded until a bifurcation occurs.

The quasi-static system (8.67) can show three kinds of bifurcations. Besides saddle-node and limit-induced bifurcations that were introduced in Chapter 5, synchronous machines and primary voltage regulation (e.g., AVRs) can lead to Hopf bifurcations. This kind of bifurcations is characterized by a pair of complex eigenvalues that crosses the imaginary axis as the load increases [45, 115, 337]. After the occurrence of an Hopf bifurcation the system shows undamped oscillations that can lead to a collapse, to a limit cycle or to more complex phenomena such as period doubling or chaos [6]. In any case, the occurrence of the Hopf bifurcation has to be considered a maximum loading condition similar to a saddle-node or a critical limit-induced bifurcation.

It is important to note that there is a conceptual di erence between the solution of (8.67) through an homotopy method and the solution of a continuation power flow using the static model (5.10) with the initialization of dynamic device state variables for each point of the nose curve. In fact, although both analyses compute a series of equilibrium points, the continuation power flow approach imposes constant bus voltage magnitudes at generator buses, while the quasi-steady-state analysis imposes constant regulator reference signals. This di erence may lead to quite di erent results in terms of small-signal stability analysis as it is qualitatively discussed in the following example.

Example 8.9 Quasi-static Integration for the IEEE 14-Bus System

This example shows the results of the quasi-static time domain analysis for the IEEE 14-bus system. The dynamic models include synchronous machines and AVRs as described in Appendix D. The perturbation consists in increasing the load using a time ramp (8.68). Figure 8.13 shows voltages at load buses 12, 13 and 14. Only the upper part of the curve has a physical meaning, i.e., up to the maximum loading condition at which a saddle-node bifurcation occurs. In this case, the loading level μ ≡ ktt.

When considering synchronous machines and AVRs, limit-induced bifurcations are implicitly taken into account by field voltage and AVRs hard limits.

8.6 Quasi-static Analysis

215

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 8.13 Quasi-static time domain analysis through homotopy method for the IEEE 14-bus system with generator field voltage limits

Figure 8.14 shows the saturation of field voltage of synchronous machine 2 to 5 (which is a consequence of the saturation of AVR state variable vr1) and the generated reactive powers for the IEEE 14-bus system. As long as field voltages increase, also the reactive powers injected into the network increase. As field voltages saturate, synchronous machines limit the reactive power output. The saturation of vr1 and thus of the field voltage is a limit-induced bifurcation since, once saturated, the AVR control loop opens and system equations change.

The results of the quasi-static analysis can be compared with the static CPF analysis shown in Example 5.4 of Chapter 5. Figure 8.15 compares such simulations in a synoptic plot. The CPF analysis and the homotopy method applied to the quasi-static system provides similar nose curves. Actually, the classical approximation of synchronous machines with primary voltage regulation as constant PV generators is quite reasonable. If the reactive power limits of the PV generators are properly chosen, the two models show a LIB for similar values of the loading level. In quasi-static analysis, the bus voltage is not perfectly constant since the AVR control is not integral (see Section 16.2.1 of Chapter 16). As a consequence, the machine bus voltage decreases even though the field voltage is not saturated.

Figure 8.15 also shows the loading level at which a Hopf bifurcation occurs for the two approaches. In this case, the two approaches provide comparatively di erent results. For the static CPF analysis, state matrix eigenvalues

216

8 Time Domain Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 8.14 Synchronous machine field voltages and reactive powers for the IEEE 14-bus system

8.7 Summary

217

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Fig. 8.15 Comparison between the quasi-static time domain simulation and the CPF analysis for the IEEE 14-bus system. The plot shows the voltage magnitude of bus 6

are obtained after initializing state variables using the procedure described in Section 9.1.1 of Chapter 9. For the quasi-static analysis, eigenvalues are computed by forming the state matrix for each point of the curve. In this case, the static CPF analysis is conservative with respect to the quasi-static simulation.

8.7Summary

This section summarizes most relevant concepts related to time-domain analysis.

Time Scale: It is important to clearly define the time scale. Depending on the time scale, the full set of state variables can be divided into fast, normal and slow. Time constants associated with fast dynamics can be considered zero and the associated variables are modelled as algebraic. State variables associated with state variables can be considered “frozen” and do not move during the transients. In transient stability analysis the time scale is between 102 and 101 s. This means that electro-magnetic transients can be considered fast (i.e., bus voltages are algebraic variables) and long-term dynamics are slow (e.g., daily load ramp).