Application of Neural Networks To Load-Frequency Control in Power Systems

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Neural Networks, 1994

Application of neural networks to load-frequency control in


power systems.
Francoise Beaufays, Youssef Abdel-Magid, and Bernard Widrow

Abstract
This paper describes an application of layered neural networks to nonlinear power systems
control. A single generator unit feeds a power line to various users whose power demand can vary
over time. As a consequence of load variations, the frequency of the generator changes over time.
A feedforward neural network is trained to control the steam admission valve of the turbine that
drives the generator, thereby restoring the frequency to its nominal value. Frequency transients
are minimized and zero steady-state error is obtained. The same technique is then applied to
control a system composed of two single units tied together through a power line. Electric load
variations can happen independently in both units. Both neural controllers are trained with the
backpropagation-through-time algorithm. Use of a neural network to model the dynamic system is
avoided by introducing the Jacobian matrices of the system in the backpropagation chain used in
controller training.

Key words

power system, load-frequency control, feedforward neural network, backpropagation-through-time.

1 Introduction
Control and stability enhancement of synchronous generators is of major importance in power
systems. Di erent types of controllers based on \classical" linear control theory have been developed
in the past (Elgerd, 1982; Anderson & Fouad, 1977; Debs, 1988; Wood & Wollenberg, 1984).
Because of the inherent nonlinearity of synchronous machines, neural network techniques can be
considered in order to build nonlinear controllers with improved performances.
In this paper, we rst consider a single, isolated, generator unit connected to a power line or
electric bus which serves di erent users. Variations in the power demand of the users cause the
electric load on the bus to change over time. As the load varies, the frequency of the generator unit
varies. In order to bring the steady-state frequency back to its nominal value after a given load
variation, a control system is designed which acts on the setting of the steam admission valve of the
unit turbine. It is of great importance to eliminate frequency transients as rapidly as possible. Most
load-frequency control systems are primarily composed of an integral controller. The integrator gain
is set to a level that compromises between fast transient recovery and low overshoot in the dynamic
response of the overall system (Elgerd, 1982). This type of controller is slow and does not allow
the control designer to take into account possible nonlinearities in the generator unit.
1

We propose in this paper a neural network load-frequency controller. The neural network makes
use of a piece of information which is not used in conventional controllers: an estimate of the electric
load perturbation (i.e. an estimate of the change in electric load when such a change occurs on
the bus). This load perturbation estimate could be obtained either by a linear estimator, or by a
nonlinear neural network estimator. In certain situations, it could also be measured directly from
the bus. We will show by simulation that when a load estimate is available, the neural network can
achieve extremely good dynamic response.
The same neural network technique is then extended to control a two-area system (i.e. two generator units linked together by a tie-line) where electric load perturbations can happen independently
in both areas. The two neural controllers are adapted using the backpropagation-through-time algorithm (Nguyen & Widrow, 1989; Nguyen & Widrow, 1990; Werbos, 1990). The system to be
controlled, the dynamic plant, is represented by its state space equations. An error signal is de ned
at the output of the dynamic plant as the di erence between the state vector of the plant and a
desired state vector. Backpropagation of the error vector through the plant state space equations
is e ected by means of a multiplication of the error vector with the Jacobian matrix of the plant (a
matrix containing the derivatives of the elements of the state transition matrix with respect to the
state variables of the plant) (Piche & Widrow, 1991). The resulting signal is then backpropagated
through the neural network controller, and the adaptive weights of the controller are adjusted according to the backpropagation algorithm. Introducing Jacobian matrices in the backpropagation
chain can be done whenever the state space equations of the plant are known a priori, and this
avoids the introduction and training of a neural network plant model.
The next section of this paper describes the systems under study and shows how conventional
integral controllers are used to control such plants. Following sections describe the neural networks
used to control the plants and present simulation results. Models, equations, and orders of magnitude of parameters are in accord with examples in the classic book by O. Elgerd, \Electric Energy
Systems Theory" (Elgerd, 1982), chapter 9, sections 9.3 and 9.4.

2 Plant models and control by conventional means


2.1 Automatic load-frequency control in single-area systems
In a single-area system, mechanical power is produced by a turbine and delivered to a synchronous
generator serving di erent users. The frequency of the current and voltage waveforms at the output
of the generator is mainly determined by the turbine steam ow. It is also a ected by changes in
user power demands which appear, therefore, as electric \perturbations". If, for example, the
electric load on the bus suddenly increases, the generator shaft slows down, and the frequency
of the generator decreases. The control system must immediately detect the load variation and
command the steam admission valve to open more so that the turbine increases its mechanical
power production, counteracts the load increase, and brings the shaft speed and hence the generator
frequency back to its nominal value.
A simpli ed functional diagram of a conventionally controlled power system is shown in Fig.1.
A brief explanation of the diagram follows (a more detailed description can be found in (Elgerd,
1982)).
 For sake of clarity, we restrict the concept of \area" to pertain to a system containing one single generator
although, in practice, the word \area" generally refers to a system containing many parallel-working generators
(Elgerd, 1982).

Steam enters the turbine through a pipe that is partially obstructed by a steam admission valve.
In steady-state, the opening of the valve is determined by the position of a device called the speed
changer (upper left corner in Fig.1). Its setting (points H or A in Fig.1) xes the position of the
steam valve through two rigid rods ABC and CDE. The reference value, or set-point, of the turbine
power in steady-state is called the reference power and is denoted by pref . When the load on the bus
suddenly changes, the shaft speed is modi ed, and a device called the speed regulator acts through
the rigid rods to move the steam valve. Note that a similar e ect could be producted by temporarily
modifying the reference power (which justi es the name \speed changer"). In practice, both control
schemes are used simultaneously. Amplifying stages (generally hydraulic) are introduced to magnify
the outputs of the controllers and produce the forces necessary to actually move the steam valve.
The speed regulator is a proportional controller of gain 1=R (that is the de ection in B, xB ,
is proportional to 1=R times the frequency uctuation f ). In conventional systems, an integral
controller of gain KI sums the frequency uctuations f (point G) and uses the result (point H) as
a control signal to the speed changer to raise or lower the reference power. By combining these two
control loops, we get a parallel PI (proportional-integral) controller capable of driving frequency
uctuations to zero whenever a step-load perturbation is applied to the system (Elgerd, 1982).
Generator
Frequency
Frequency
Fluctuation f

AA
AAA
AAAAA
AA
AAA
AAAAAAAA
AAA
AA
AAA
AAAAAAA
AAAAAAAA
AAA
AAAAAAA
AAAAAAAA
AAA
AAAAAAA
AAAAAAAA
AA
A
AAAAAAA
AAA
AA
AA
AAAAAAAA
AA
A
AAAA
AAAAAAA
AAA
AA
AA
AAA
AA
AAAA
AAAAAAAA
AAAAAAA
AAA
AA
AA
AAA
AA
AAA
AAAAAAAA
AAA
AAA
AA
AAA AA
AAAA
AAAAAA AAA
AAA
AA
AAA AA
AAAA
AAA

+_
+

Integral
Controller

Steam

Speed
Changer

close

Steam
Admission
Valve

lower

Frequency
Sensor

Frequency
Set Point
= 60 Hz

open

raise

xB

xA ~
pref A

xC

Steam
admission
valve

xD

x E

High
Pressure
Oil

Main
Piston

Speed
Regulator

Turbine

Hydraulic
Amplifier

AAAAA
AAAA
AAAAA
AAAAA
AAAA
AAAA
AAAAA
AAAAA
Generator

Figure 1: Conventional single-area system: simpli ed functional diagram.

Power Line

AA
AA

Since most devices in power systems are extremely nonlinear, one usually likes to linearize the
plant and to think of di erent variables in terms of their uctuations about given operating points.
Nonlinearities are then modeled by making the parameters of the linearized system functions of
the operating point. The resulting small signal models consist of linear operators having variable
parameters whose values depend upon the state of the system. The last step in modeling consists
of replacing all small signals by their Laplace transform and to represent the linearized devices by
transfer functions.
3

Variable
Load

Before going any further, let us de ne the notation.  of some variable represents the di erence
between the variable and its nominal value. Lowercases are used for time signals, and uppercases
for their Laplace transforms. For example, f (t) represents the generator frequency relative to
its nominal value, i.e. f (t) = f (t) ? fnominal = f (t) ? 60 Hz , and F (s) represents the Laplace
transform of f (t).
A Laplace domain small signal model of the single-area system is given in Fig.2. Points A, B,
C, D, E, F and G of Fig.1 are also shown here to help relate the gures. Starting from point A in
Fig.1, the uctuation in reference power pref (i.e. the output of the speed changer) is added to
the output of the speed regulator (point B) to produce a global control signal (point C), which is
instantaneously transmitted to the input of the hydraulic ampli er (point D). For simplicity, the
hydraulic ampli er is modeled by a rst order transfer function whose output is the uctuation in
hydraulic ampli er power PH (s). The turbine is also modeled by a rst order transfer function.
Its input is the hydraulic ampli er output PH (s), its output is the turbine mechanical power
PT (s). The change in variable load (lower right corner in Fig.1) is symbolized by an electric
perturbation, PE (s), and can be modeled as an input perturbation to the generator (Elgerd,
1982). The input to the generator model in Fig.2 is thus the sum of the turbine output power and
the electric perturbation. The generator is modeled by a rst order tranfer function. Its output,
the frequency uctuation F (s) (point G), is used to drive the speed regulator and the integral
controller.

- ?Ks I

s 
s

6
sB

sP (s)

H; A + C; D
H
- + - 1 +KsT
H
P (s) {

Integral
Controller

ref

Hydraulic
Ampli er

KT

1 + sTT
Turbine

 s
P (s)
6{
F+
-+

KP

1 + sTP F (s)

Frequency
Fluctuation
-

Generator

sG

P (s)
E

Speed
Regulator

Electric Load
Fluctuation

Figure 2: Conventional single-area system: small-signal model, simpli ed block diagram.


In order to simulate the dynamic plant in a C-programming environment, we derive its discrete
time state space equations. Refering to Fig.2 and expressing the outputs of the generator, turbine
and ampli er as functions of their inputs, inverting the Laplace transforms, and discretizing the
time functions, we obtain the following discrete-time state space equations:
f (nTs + Ts ) = f (nTs ) + Ts [KP pT (nTs ) ? KP pE (nTs ) ? f (nTs )]
TP
Ts

pT (nTs + Ts ) = pT (nTs ) + T [KT pH (nTs ) ? pT (nTs )]


T

(1)
(2)

pH (nTs + Ts ) = pH (nTs ) + TTs [KH pref (nTs) ? KRH f (nTs ) ? pH (nTs)]
H

(3)

pref (nTs ) = pref (nTs ? Ts ) ? KI f (nTs ):

(4)

with
is the sampling period and n is the discrete time index.
Typical orders of magnitude in large systems ( 1000 MW) are: for the gains of the turbine,
hydraulic ampli er, and generator, KH = KT = 1.0, KP = 120 Hz/pu MWy; for the corresponding
time constants, TH = 80 ms, TT = 0.3 s, TP = 20 s; for the regulator gain, R = 2.4 Hz/pu MW.
For any non negative value of the integrator gain KI , and assuming that the perturbation
PE (s) is a step function of amplitude PE , the controlled plant is stable; that is, its state vector
x(nTs) = [f (nTs) pT (nTs) pH (nTs)]T converges to a nite steady-state value. It is easy to see
from Eq.1, 2, 3, 4 that the steady-state frequency uctuation f (nTs ) converges to zero. Therefore
(cf. Fig.2) the output turbine power pT (nTs ) converges towards PE , and the ampli er output
power pH (nTs ) converges towards PE =KT . The steady-state state vector is thus:
x
= [0 P PE ]T :
(5)
Ts

steady state

KT

Fig.3 shows, for di erent values of the integrator gain KI , the dynamic responses of a single-area
system subject to a 10% step-load increase. With no integral control (KI = 0), the frequency uctuations f (nTs) converge to some non-zero steady-state value. To achieve zero steady-state error,
the integrator must have a strictly positive gain. The higher the gain, the faster the convergence
will be, but high gains tend to produce ringing in the step response, and this should be avoided for
stability reasons. In practice, KI will be chosen to be the critical gain, i.e. the highest gain that
yields no overshoot (KI = 0:2 in Fig.3).

2.2 Automatic load-frequency control in two-area systems


A two-area system consists of two single-area systems connected through a power line called the tieline: each area feeds its user pool, and the tie-line allows electric power to ow between the areas.
Since both areas are tied together, a load perturbation in one area a ects the output frequencies
of both areas as well as the power ow on the tie-line. For the same reason, the control system of
each area needs information about the transient situation in both areas in order to bring the local
frequency back to its steady-state value. Information about the local area is found in the output
frequency uctuation of that area. Information about the other area is found in the tie-line power
uctuations. Therefore, the tie-line power is sensed, and the resulting tie-line power signal is fed
back into both areas. This basic scheme is illustrated in Fig.4. A more complete diagram is given
in Fig.5. One recognizes the two single-area block diagrams (dashed boxes) and the tie-line. A few
additional elements are introduced whose function is next described.
In steady-state, each area outputs a frequency of 60 Hz. A load perturbation occuring in either
area a ects the frequencies in both areas as well as the tie-line power ow. In fact, it can be shown
(Elgerd, 1982) that, with small signal approximation, the uctuation in power exchanged on the
tie-line, p1;2(t), is proportional to the di erence between the instantaneous shaft angle variations
y

In the per unit (pu) system, variables are scaled by their nominal value and become thereby dimensionless.

0.05
KI = 0.32
0

frequency variation: f (Hertz)

KI = 0.2
-0.05
KI = 0.08
-0.1
KI = 0.04
-0.15
-0.2
-0.25

KI = 0

-0.3
-0.35
0

50

100

150

200

250

300

350

400

time (100 iterations = 2.5 seconds)

Figure 3: Dynamic responses of a conventional single-area system subject to a 10% step-load


perturbation, for di erent values of the integrator gain.
in both areas, 1 (t) and 2 (t) (Elgerd, 1982). These shaft angle variations are equal to 2 times
the integral of the corresponding frequency variations, f1 (t) and f2 (t). In the Laplace domain,
0

P1;2(s) = T 0 (1 (s) ? 2 (s)) = 2T


(F1 (s) ? F2 (s));
s

(6)

where T 0 is a constant called the tie-line synchronizing coecient (typically 0:0707 MW/rad). This
operation is illustrated in Fig.5 (right-hand part of the tie-line).
If, for example, the electric load increases in area 2 (PE;2(s) > 0), the frequency in area 2
decreases (F2(s) < 0), and more power is transmitted from area 1 to area 2 (P1;2 > 0 (which is
in accord with Eq.6)). In area 1, this increase in tie-line power is perceived exactly the same way
as an increase in power demand from the users of area 1, that is, an increase of p in P1;2(s) or
an increase of p in PE;1 (s) has the same e ect on the frequency F1 (s). Therefore, in our model,
P1;2(s) should be added to the same node as PE;1, and with the same sign (which is a minus
sign). By symmetry, P2;1 = ?P1;2 , the power going from area 2 to area 1, is added to the same
node as PE;2, also with a minus sign.
Let us now examine how two-area systems are controlled. In conventional systems, the turbine
reference power of each area is set by an integral controller. Since a perturbation in either area
a ects the frequency in both areas and a perturbation in one area is perceived by the other through
a change in tie-line power, the controller of each area should take as input not only the local
frequency variations, but also the tie-line power variations. Since an integral controller has just
one input, these two contributions (local frequency variation and tie-line power variation) must be
combined into a single signal that can be inputted in the controller. The easiest way of doing this
is to combine them linearly, i.e. the input of the integrator in area 1 is P1;2 + B1 F1 , and the
input of the integrator in area 2 is P2;1 + B2 F2 (see Fig.5). The coecients B1 , B2 are usually
set to 1=KP + 1=R (see (Elgerd, 1982) for more details). With the orders of magnitude previously
mentioned, B1 = B2 = 0.425 pu MW/Hz.
Following the same procedure as in the one-area case, we derive the discrete state space equations
6

Electric Bus 1
Area 1
Tie-Line
Load
Tie-Line Power
Flow Signal
Area 2
Electric Bus 2

Tie-Line
Power
Flow
Sensor

Load

Figure 4: Conventional two-area system: basic block diagram.


of a two-area system. Assume for sake of simplicity that the hydraulic ampli er and turbine
time constants are negligable compared to the generator time constants. Choose as discrete state
variables the frequency in area 1, f1 (nTs ), the frequency in area 2, f2(nTs ), and the tie-line
power, p1;2(nTs ). The equations are:
f1 (nT + T ) = f1 (nT ) + TT [K 1 p
1
T
f2 (nT + T ) = f2 (nT ) + T [K 2 p
s

P;

ref;

P;

ref;

P;

P;

(nT ) ? ( KR 1 + 1)f1 (nT ) ? K 1 p 1 (nT )]


P;

P;

E;

(nT ) ? ( KR 2 + 1)f2 (nT ) ? K 2 p 2 (nT )]


P;

p1 2 (nT + T ) = p1 2 (nT ) + T [2T 0 (f1 (nT ) ? f2 (nT ))]
;

P;

E;

(7)
(8)
(9)

Once again, Ts is the sampling rate. For large systems ( 1000 MW), typical parameter values
are: for the generator gains, KP;1 = KP;2 = 120 Hz/pu MW; for the generator time constants,
TP;1 = TP;2 = 20 s; for the regulation parameters, R1 = R2 = 2.4 Hz/pu MW.
For any non negative integrator gains KI;1, KI;2, when a step-load perturbation has occured
in area 1 and/or in area 2, and after transients have died out, the frequency variations in both
areas converge to zero, and so does the tie-line power (see Eq.6). The plant state vector x(nTs) =
[f1(nTs ) f2 (nTs ) p1;2(nTs )]T converges thus to a steady-state value equal to:

xsteady state = [0 0 0]T :

(10)

Fig.6 shows the dynamic response of a conventional two-area system subject to a 10% stepload increase in area 2. Fig.6a shows the frequency transients in both areas, Fig.6b shows the
tie-line power transients. We may observe here that zero integrator gains (dashed lines) yield
non zero steady-state errors, while positive integrator gains (plain lines) do achieve convergence of
the state variables to zero. In this speci c plot, the gains were chosen equal to the critical gains
(KI;1 = KI;2 = Kcritical ' 0:05) which ensured the fastest transient recovery with no overshoot in
the step response.
Before leaving our discussion of conventional control systems and beginning a development of
neural controls, we make an important remark. As explained in section 2.1, the plant models used
so far were linearized models. We were assuming that the operating point of the plant did not
change much when a step-load perturbation occured on the bus, and that, therefore, all the plant
parameters could be kept constant. In practice though, the \constant" characterizing the speed
7


?

B1

R1

?+ - ?

+

6+

KI;1
s

P

(s)

H;1

Tie-Line Power Flow Signal

KT;1

P 1(s) 1 + sTT;1 P
H;

KP;1

T;

?+ - ?

+

6+
;

KI;2
s

P

sTP;1

F1(s)

Tie-Line Power Flow


? Signal

HHj

P1 2(s)
;

??
r ? ? 1s 

?+


6{

?1
P2 1(s)
P 2(s) KT;2 P 2(s) { ?
F2(s)
2 (s)
H;2
P;2
-+ + - 1 +KsT
- 1 + sT
-+ + - 1 +KsT
H;2
T;2
P;2
{6
{6

ref;




H;

T;



b
P (s)

E;

R2

Electric Load
Fluctuation

Figure 5: Conventional two-area system: small signal model, simpli ed block diagram.

2T 0  +

Area 2

?1
P2 1(s)

E;

? - KH;1
-+{
+
 1 + sT

ref;

b
? -+ {
+
(s) {
6 1+
P 1(s)

Area 1

B2

Electric Load
Fluctuation

0.06

0.05

-0.04

tie-line power variations: P1,2 (pu MW)

frequency variations: f1 and f2 (Hertz)

KI,1 = KI,2 = 0
KI,1 = KI,2 = Kcritical = 0.05

KI,1 = KI,2 = 0
KI,1 = KI,2 = Kcritical = 0.05

-0.02

-0.06
-0.08
-0.1
-0.12
-0.14
-0.16
-0.18
0

20

40

60

80

100

120

0.04

0.03

0.02

0.01

140

20

time (10 iterations = 1 second)

40

60

80

100

120

140

time (10 iterations = 1 second)

(a) Frequency transients in both areas.

(b) Tie-line power transients.

Figure 6: Dynamic response of a two-area system subject to a 10% step-load increase in area 2.
regulator R depends in a highly nonlinear way upon the turbine power pT , and this occurs as well
in a single-area system as in each area of a two-area system (Cohn, 1986). The presence of this
nonlinearity and the slowness of traditional integral controllers is what motivates our substituing
a neural network controller for the integrator(s). In order to emphasize the di erence in plant
dynamics for various values of the regulation parameter R, we plotted in Fig.7 the step responses
of an uncontrolled two-area system (integrator gains equal to zero) for two di erent values of R
(chosen within a reasonable physical range). Fig.7a shows the frequency transients in both areas
when a 10% step perturbation hits area 2 of a system having as regulation parameters R1 = R2 = 2:4
Hz/pu MW. Fig.7b shows the frequency transients for a system having R1 = R2 = 6:0 Hz/pu MW.
Apart from the fact that the steady-state frequencies are di erent for di erent values of R, we
notice that a higher regulation parameter creates more ringing in the system: the fact that R is
not a constant profoundly a ects the dynamic response of both generators.

3 Nonlinear control by means of neural networks


3.1 Neural network control of a single-area system
We have seen in the previous section that the slowness and lack of eciency of conventional controllers in handling system nonlinearities suggested their substitution by nonlinear neural network
controllers. A natural choice of neural network architecture for a dynamic controller is the feedforward multilayer structure. Such an architecture can be adapted with the backpropagation-throughtime algorithm (Nguyen & Widrow, 1989; Nguyen & Widrow, 1990; Werbos, 1990), an extension
of the well-known backpropagation algorithm (Werbos, 1974; Rumelhart & McClelland, 1986).
Let us rst brie y summarize the backpropagation algorithm.

0
frequency variation in area 1
frequency variation in area 2

-0.05

frequency variations: f1 and f2 (Hertz)

frequency variations: f1 and f2 (Hertz)

-0.1

-0.15

-0.2

-0.25

-0.3

-0.35
0

20

40

60

80

100

120

frequency variation in area 1


frequency variation in area 2

-0.05

-0.1

-0.15

-0.2

-0.25

-0.3

-0.35
0

140

20

40

time (10 iterations = 1 second)

60

80

100

120

140

time (10 iterations = 1 second)

(a) R1 = R2 = 2:4 Hz/pu MW.

(b) R1 = R2 = 6:0 Hz/pu MW.

Figure 7: Dynamic response of an uncontrolled two-area system subject to a 10% step-load increase
in area 2, for di erent values of R.

3.1.1 Backpropagation algorithm

A feedforward multilayer neural network is shown in Fig.8(a). A single neuron extracted from the
layer of a L-layer neural network is represented in Fig.8(b). The inputs xli are multiplied by
l ; the output xl+1 is obtained by passing the sum of the weighted inputs
the adaptive weights wi;j
j
through a sigmoidal function slj () (i.e. hyperbolic tangent).

lth

xlj+1

= slj (

l xl )
wi;j
i

(11)

xl1

xl2
xl3

w1l ;j
w2l ;j
w3l ;j
weights

xlj+1

+
l ()

sigmoid sj

Figure 8: Feedforward multilayer neural network. (a) L-layer neural network. (b) j th neuron
extracted from the lth layer.
Initially set to small random values, the weights are adjusted after each presentation of a new
input pattern. The adaptation rule is given by:
T
wl = ? d(e e) :
(12)
i;j

l
dwi;j

10

l is the weight connecting neuron i in layer l with neuron j in the next layer,  is the
where wi;j
learning rate, e is the error vector, i.e. the di erence between the actual and desired outputs. It
can easily be shown (see (Rumelhart & McClelland, 1986; Widrow & Lehr, 1990) for a detailed
derivation) that Eq.12 is equivalent to:
l = ?  l+1  xl
wi;j
i
j

(13)

where xli is the output of neuron i in layer l. The error gradients j in a L-layer network are
evaluated with the following recursive formula:

8
>> ?2ej  s0jL
>>< X
l+1  wl
s0j 
m
j;m
jl =
>> m
>> X 1  w0
: m j;m

=L

1 l  L?1
l

(14)

=0

where ej is the error at the output node j , and s0jl  s0jl (xlj ) is the derivative of the sigmoid function
slj () for node j in layer l. Eq.14 can be interpreted as follows: the error gradient  associated
with a given neuron is obtained by backpropagating the  's of the next layer through connecting
weights. This process is illustrated in Fig.9(a) and (b).
1l+1

l
wj;
1

jl

l
wj;
2

2l+1

l
wj;
3

3l+1

)

l
sigmoid derivative sj (
0

Figure 9: Feedforward multilayer neural network. (a) Backpropagation through a L-layer neural
network. (b) Backpropagation through the j th neuron of the lth layer.

3.1.2 Adaptation of the neural network controller


The feedforward neural network studied in the previous section was a static structure in the sense
that no time dependency existed between inputs and desired outputs. The situation is di erent
when the network to be adapted is embedded in a dynamic structure. In our application for example, a neural network is used to control a dynamic plant. Initially in steady-state, the plant is
suddenly hit by a step perturbation. Transients ensue. It has been shown above that the discrete
state vector x(n) = [f (n) pT (n) pH (n)]T of a single-area systemz controlled by an integral
controller eventually converged to a steady-state value equal to xsteady?state  [0 PE KP ]T
E

To shorten the notation, we set the sampling period T to 1 so that x(nT ) is replaced by x(n), f (nT ) by
f (n), etc ...
z

11

(Eq.5) but that this convergence was slow (see Fig.6). The neural network controller that replaces the integral controller should make the plant converge to the same xsteady?state vector, while
limiting the duration and magnitude of the transients. Such an operation can not be performed
instantaneously. In addition, the value of the desired control signal (i.e. the desired output of the
neural network) is not known a priori; only the desired steady state of the plant is known. The
simple, static, backpropagation algorithm is not directly applicable, it must be generalized to the
present dynamic structure. The result of this generalization is refered to as the backpropagationthrough-time algorithm.
The dynamic controller-plant structure is shown in Fig.10. The plant model (dashed box) is
characterized, at any instant of time, by its discrete state-space vector x(n) = [f (n) pT (n) pH (n)]T
. The box labeled \plant state equations" contains the discrete state space equations previously derived to model the one-area system, Eqs.1, 2, 3. The neural network controller replaces the integral
controller used in conventional systems. Its output, the uctuation in reference power, pref (n),
is used as a control signal to drive the plant model. For simplicity, it is refered to as u(n).
In order to evaluate u(n) = pref (n), the neural network controller makes use of a piece of
information which is not used in conventional control: an estimate of the load perturbation, p^E (n).
In general, the load perturbation of a large system is not directly measurable. It must therefore
be estimated by a linear estimator or by a nonlinear neural network estimator if the nonlinearities
in the system justify it. Such an estimator takes as inputs a series of K samples of the frequency
uctuation at the output of the generator [f (n) f (n ? 1) ::: f (n ? K + 1)]T , and estimates
the instantaneous value of the load perturbation pE (n) based on this input vector. The estimate
p^E (n) is then used to drive the plant controller. The implementation of such an estimator is
beyond the scope of this paper. Here, we assume that the load estimate p^E (n) is available and
that, for adaptation purposes, this estimate is perfect, that is, p^E (n)  pE (n). We also assume
that the electric perturbation is a step function of amplitude PE : pE (n) = PE : H (n) where
H (n) = 1 for n  0 and 0 for n < 0.
The internal structure of the neural network controller is detailed in Fig.11. It contains two
layers of neurons: a hidden layer and a single neuron output layer. No sigmoid is used at output of
the network. Bias terms (i.e. constant inputs equal to 1) are included in all the hidden units and
in the output unit.
Going back to Fig.10, we see that at each time step, a new state vector x(n + 1) is evaluated,
based on the magnitude of the step load perturbation PE , the control signal u(n), and the
current state vector x(n). This is better understood if we redraw Fig.10, unravelling it in time.
The resulting block diagram is shown in Fig.12. For simplicity, the neural network controller is
denoted by C, and the plant state equations are denoted by P. At time n = 0 (de ned as the instant
when the step-load perturbation hits the system), the state of the plant is x(0). The neural network
controller C takes as inputs the state vector x(0) and the amplitude of the step-perturbation PE ,
and quasi-instantaneously evaluates the control signal u(0). The plant equations P are then used to
compute the next state vector x(1) which is used by the controller to evaluate the next control signal
u(1), etc ... This way, the controller and plant model successively compute new control signals and
new state vectors until some time N is reached. N is chosen large enough to allow plant transients
to die out. At time N , the plant state vector x(N ) should have converged to xsteady?state which
appears thus for the learning algorithm as the desired state vector, and is denoted by d(N ). The
di erence between the desired state vector d(N ) and the nal state vector x(N ), the error vector
e(N ), is used to adjust the adaptive weights of the controller according to the backpropagationthrough-time algorithm. Although we are controlling the plant continuously over time, the control
law is derived as if the process were only ongoing over the last N time steps, with N large. The
weights are adjusted to reduce the error at time N .
12

pE (n) = PE : H (n)


p^E (n) =
PE : H (n)

- Neural Net
x(n)- Controller

- Plant ?State x(n + 1)


x(n)- Equations
u(n)

Unit 
Delay

Plant Model
Figure 10: Neural network controller and plant model of a single-area system: block diagram.
+1

P
8 E
>< f (n)
x(n) = > pT (n)
: pH (n)

+1

+
+1

u(n) =
pref (n)

Figure 11: Neural network controller for a single-area system: internal structure.

3.1.3 Backpropagation-through-time algorithm

Fig.12 is essentially composed of a layered arrangement of controller and plant equations blocks.
The controller is a neural network. If the block containing the plant equations, P, were replaced by
a neural network copy P^ of Px, the unravelled system of Fig.12 would become a giant layered neural
network with inputs x(0) and PE , output x(N ), and desired output d(N ). The backpropagation
algorithm could then be applied to train such a network. By doing so, the error gradient de ned at
the output of the network are backpropagated through the P^ and C blocks, from x(N ) back to x(0);
hence the name \backpropagation-through-time". This approach was rst introduced by Nguyen
and Widrow in (Nguyen & Widrow, 1989), and was successfully applied to number of applications
in the area of nonlinear neural control (see for example Nguyen & Widrow, 1990; Wu & Hogg &
Irwin, 1992).
In this paper, we adopt a slightly di erent approach by which we avoid the introduction and
It can be shown that any continuous nonlinear function can be approximated to an arbitrary degree of precision
by a two-layer neural network (Cybenko, 1988; Hornik & Stinchcombe & White, 1989; Irie & Miyake, 1988).
x

13

P

x(0)

P

b r
E

u(0)

P

- ?
- P

x(1)-

u(1)

P

- ? x(2)- rrr
- P
- rrr

x(N ? 1)

x(N ) e(N )
- ? -+
+ 
P
6{

u(N ? 1)

d(N )

Figure 12: Neural network controller and plant model of a single-area system: block diagram
unfolded in time.
training of a neural network copy of the plant equations (Piche & Widrow, 1991). The basic idea
is that instead of building a neural network copy or emulator P^ of P in order to backpropagate
error gradients through it, it is possible to directly backpropagate the error gradients through the
plant equations P .
Let us consider a 2-layer neural network which emulates a set of continuous nonlinear functions
P. The inputs to the neural network are denoted by x0i , and the outputs x2k . Applying Eq.11
recursively for l = 0; 1, and 2, and for all i; k, we get:
x2k

= s2k (

X
j

1 s1 (
wj;k
j

0 x0 )):
wi;j
i

(15)

Let us now evaluate the derivative of the kth output with respect to the ith input:

X 1 01 0
0
wj;k  sj  wi;j :
=
sk2 
0
dx

dx2k

(16)

Let us also evaluate the error gradients according to Eq.14:


k2

= ?2ekX
 s0k2
0
1
j1 = sj1 
k2  wj;k

(17)
(18)

i0 =

(19)

X
j

 1  w0

i;j :

Substituing Eq.17 in Eq.18 and Eq.18 in Eq.19, and comparing with Eq.16, we get:
i0

= ?2ek  dxk0 :
dxi

(20)

Eq.20 implies that the kth term of the error gradient vector i0 obtained by backpropagating k2
through the neural network is proportional to the derivative of the kth output of the network with
respect to its ith input. The matrix containing the derivatives of the outputs of P with respect to
its inputs is called the Jacobian matrix.
Building a neural network emulator of the plant and backpropagating error gradients through it
is nothing other than approximating the true Jacobian matrix of the plant using a neural network
technique. Whenever the equations of the plant are known beforehand, they can be used to compute,
14

analytically or numerically, the elements of the Jacobian matrix. The error gradient at the input
of the plant is then obtained by multiplying the output error gradient by the Jacobian matrix.
This approach avoids the introduction and training of a neural network emulator, which brings
a substantial saving in development time. In addition, the true derivatives being more precise than
the one obtained approximatively with a neural network emulator, the controller training is faster
and more precise. One disadvantage of this method, however, is that a neural network controller
included in such a structure can not track changes in the plant (such as parameter variations
due to wearing of certain parts, etc ...). If such considerations are an issue, the neural network
emulator method is a better choice. Again, the Jacobian approach is only applicable if an analytical
description of the plant is known beforehand. Otherwise, a plant neural network emulator can be
used to identify the plant and to backpropagate the error gradients.

3.2 Neural network control of a two-area system


The neural network control scheme for a two-area system is basically the same as for a one-area
system. Refering back to section 2.2, the discrete state vector of the two-area system was chosen
equal to x(n) = [f1(n) f2 (n) p1;2(n)]T . After a step-load perturbation has occured in one
area (or simultaneously in both areas), and after transients have died out, the state of the plant
controlled by a neural network is expected to converge to the same steady-state value as it did
with a conventional controller. We have seen in section 2.2 that this steady-state vector was equal
to xsteady?state = [0 0 0]T (see Eq.10). This will thus be the desired response for the two-area
system, once unravelled in time. Generalizing upon the control process for the single-area system,
the inputs of the two-area neural network controller are: the state vector x(n) and the magnitude
of the step-load perturbations, PE;1 and PE;2 . The outputs are the reference power in area 1,
pref;1(n), and the reference power in area 2, pref;2(n).
The two-area controller-plant structure is unravelled in time and trained the same way as the
one-area system, using backpropagation-through-time.

4 Simulations
Computer simulations have been conducted to illustrate the behavior of single-area and twoarea systems subject to step load perturbations. Both neural networks have been adapted using backpropagation-through-time. No plant emulator was used; instead, the error gradients were
directly backpropagated through the plant equations.
As explained in section 2, the regulation parameters R of single-area and two-area systems
are nonlinear functions of the power pT produced in the areas (Cohn, 1986). The e ect of this
nonlinearity on the system is generally represented in the following way. In steady-state, a simple
relationship can be written between the frequency f0 and the turbine output power pT;0 (see
Fig.2): pT;0 = pref;0 ? R1 f0 , or:
f0 = R (pref;0 ? pT;0):

(21)

The subscript 0 denotes steady-state values. If R is a constant, f0 vs. pT;0 represents a
family of straight lines with parameter pref;0. If instead the regulation R is a function of the
turbine power, Eq.21 represents a family of nonlinear curves. Nonlinearities encountered in practical
15

110
R = function of power
R = constant = 0.04% or 2.4 pu Hz/MW

percent of rated frequency

108

p

104

102

p

ref

= 100%

? ?
 

106



=>50%

ref

100

98
-100

-50

50

100

150

percent of rated power

Figure 13: Static frequency-power response (linear case: R = 0:04% or 2:4 pu Hz/MW).
systems produce f0 (pT;0) curves such as represented in Fig.13 (solid lines). For reference, the
corresponding curves for R = constant = 2.4 pu Hz/MW are also shown (dashed lines).

4.1 Single-area system simulations


0.05
0

frequency variation (Hertz)

-0.05
-0.1
-0.15
-0.2
-0.25
-0.3

Neural net control


Integral control

-0.35
-0.4
-0.45
0

50

100

150

200

250

300

350

400

450

500

time (100 iterations = 2.5 seconds)

Figure 14: Step response of a single-area system subject to a 10% load increase.
Such a nonlinearity was introduced in the discrete plant equations, Eqs.1, 2, 3, of a single-area
system. A feedforward neural network containing one hidden layer with 20 hidden units was
adapted to control this nonlinear plant. The neural network was trained to compensate for any
perturbation ranging from minus to plus 100%.
Fig.14 shows the frequency uctuations at the output of the power unit when a 10% step-load
increase occurs on the bus. Two control schemes are compared: (a) the plant is controlled by a
16

conventional integral controller with critical gain, (b) the plant is controlled by a neural network
controller. The neural network clearly achieves faster transient recovery while still limiting the
overshoot. This result is not unexpected. The neural network controller makes use of the estimate
of the load-perturbation which is provided to it as an input signal to immediately counteract the
e ect of the perturbation hitting the system. The integral controller, on the other hand, proceeds
by building up the frequency error and using it to drive the plant. Therefore, it has to wait untill
the error has built up before signi cantly e ecting the system response.
In a sense, the comparison between the neural network and the PI controller may seem unfair
since the neural network is provided with a piece of information that is not available to the other
controller. On the other hand, the PI controller is the most wildly used in practice and constitues
therefore the standard comparison tool for new control methods. The point that the authors would
like to illustrate is that a judicious use of some additional information can produce a tremendous
improvement in the system dynamic behaviour.

4.2 Two-area system simulations


A one-hidden layer neural network controller with 20 hidden units was then trained to control a
nonlinear two-area system. The same nonlinearity as in the single-area system was used for both
areas of this system.
Fig.15 compares the dynamic response of a two-area system subject to a 1% step-load increase
when controlled (a) by a neural network (solid lines), (b) by two conventional integral controllers
with critical gains (dotted lines). Fig.15a shows the frequency variations in both areas, Fig.15b
shows tie-line power variations.
As explained previously, the neural network controller takes as inputs the estimates of the loadperturbations in both areas. These estimates are evaluated by a special device which needs a short,
but non-zero, lapse of time to output accurate estimates of the perturbations. For this reason,
a 500 millisecond delay was allowed before the neural net started controlling the plant. During
these rst 500 msec, the control signals pref;1 and pref;2 were set to zero. This explains that
the solid and dotted lines in Fig.15 exactly coincide for the rst 5 iterations (0.5 seconds) of the
simulation. The use of a neural network controller has greatly reduced the frequency transient
recovery period. The neural network achieves zero steady-state error while the uncontrolled system
has a large steady-state error.
Fig.16 shows the frequency recovery of a two-area system subject to a 1% step-load increase in
area 1 and, at the same time, a 2% step-load decrease in area 2. Dynamic responses obtained with
a neural network and with integral controllers are compared.

17

0.005

-0.005

-0.01

-0.015

delayed neural net control


integral control

4
3
2
1

-0.02

-0.025
0

delayed neural net control


integral control

tie-line power (pu MW)

frequency variation (Hertz)

x10 -3
0.01

20

40

60

80

100

120

140

160

180

-1
0

200

20

40

60

80

100

120

140

160

180

200

time (10 iterations = 1 second)

time (10 iterations = 1 second)

(a) Frequency variations in both areas.

(b) Tie-line power variations.

0.05

0.05

0.04

0.04
delayed neural net control
integral control

0.03

frequency variation (Hertz)

frequency variation (Hertz)

Figure 15: Dynamic response of a two-area system subject to a 1% step-load increase in area 2.

0.02
0.01
0
-0.01
-0.02
-0.03
0

delayed neural net control


integral control

0.03
0.02
0.01
0
-0.01
-0.02

20

40

60

80

100

120

140

-0.03
0

160

time (10 iterations = 1 second)

20

40

60

80

100

120

140

160

time (10 iterations = 1 second)

(a) Frequency variations in area 1.

(b) Frequency variations in area 2.

Figure 16: Dynamic response of a two-area system subject to a 1% step-load increase in area 1 and
a 2% step-load decrease in area 2.

18

5 Conclusion
Layered neural networks have been successfully applied to control the turbine reference power of a
computer-simulated generator unit. The same principle has then been applied to a simulated twoarea system. Both neural networks have been adapted using backpropagation-through-time. In this
paper, the frequency variations in both areas of the two-area system were inputted into the neural
network controller. The neural network thus implements a global control scheme. In the past, non
neural network local controllers have been developped (Aly & Abdel-Magid, 1981; Abdel-Magid et
al., 1984). A subject of future research consists in building independent neural network controllers
for the di erent areas of a multi-area system. Each neural network controller receives only local
information about the system (frequency in that speci c area and powers in the tie-lines connected
to that area). Such an architecture decentralizes the control of the overall system and reduces the
amount of information to be exchanged between di erent nodes of the power grid. Performance
with local control only will be compared with that obtained with global control.

References
 Abdel-Magid, Y.L. et al. (1984). Robust decentralized load frequency regulator for intercon









nected power systems. (pp. 69-73). Eurocon 84, 6th conference on eletrotechnics-computers
in communication and control. Brighton, UK
Aly, G. and Abdel-Magid, Y.L. (1981) Two level load-frequency control of interconnected
power systems. (pp. 213-218). IECI Proceedings. San Francisco, CA
Anderson, P.M. and Fouad, A.A. (1977). Power System Control and Stability. Ames:
Iowa State University Press
Cohn, N. (1986). Control of Generation and Power ow on interconnected systems.
John Wiley
Cybenko, G. (1988) Continuous Valued Neural Networks with two Hidden Layers are Sucient. Department of Computer Science, Tufts University
Debs, A.S. (1988). Modern Power Systems control and operation. Norwell, MA:
Kluwer-Nijho Pub.
Elgerd, O.E. (1982). Electric Energy Systems Theory. 2nd edition. McGraw-Hill, Inc.
Hornik, K. and Stinchcombe, M. and White, H. (1989). Multilayer Feedforward Networks
Are Universal Approximators. (pp. 359-366). Neural Networks. vol.2
Irie, B. and Miyake, S. (1988). Capabilities of Three-Layered Perceptrons. (pp. 641-647).
Proceedings of the IEEE Second International Conference on Neural Networks. vol.I. San
Diego, CA
Nguyen, D. and Widrow, B. (1989). The Truck Backer-Upper: An Example of Self-Learning
in Neural Networks. Proceedings of the International Joint Conference on Neural Networks.
vol. II. (pp. 357-363). Washington, DC
19

 Nguyen, D. and Widrow, B. (1990). Neural Networks for Self-Learning Control Systems.








IEEE Control Systems Magazine


Piche, S.W. and Widrow, B. (1991). First-order gradient descent training of adaptive discretetime dynamic networks. Tech. Rep. RL-TR-91-62. Rome Laboratory, Air Force Systems
Command. NY: Griss Air Force Base
Rumelhart, D.E. and McClelland, J.L. (1986). Parallel Distributed Processing. The
MIT Press. Cambridge, MA
Werbos, P.J. (1974). Beyond Regression: New Tools for Prediction and Analysis in the
Behavioral Sciences. PhD thesis. Harvard University. Cambridge, MA
Werbos, P.J. (1990). Backpropagation Through Time: What It Does and How to Do It.
Proceedings of IEEE, special issue on neural networks. vol. 2. (pp.1550-1560)
Widrow B. and Lehr, M.A. (1990) 30 Years of Adaptive Neural Networks: Perceptron, Madaline, and Backpropagation. (pp. 1415-1442). Proceedings of IEEE. vol.78. number 9
Wood, A.J. and Wollenberg, B.F. (1984). Power Generation, Operation and Control.
John Wiley & Sons
Wu, Q.H. and Hogg, B.W. and Irwin, G.W. (1992). A Neural network Regulator for Turbogenerators. (pp. 95-100). IEEE Transactions on Neural Networks. vol.3. number 1.

Nomenclature

1) Power systems quantities:


i) Single-area system:
f (t)
generator frequency variation
F (s)
Laplace transform of f (t)
R
regulation parameter
1=R
speed regulator gain
KI
integral controller gain
pref
turbine reference power in steady-state
pref
variation in reference power
Pref (s)
Laplace transform of pref (t)
pH (t)
uctuation in hydraulic ampli er output power
PH (s)
Laplace transform of pH (t)
pT (t)
uctuation in turbine output power
PT (s)
Laplace transform of pT (t)
pE (t)
electrical perturbation, i.e. load variation
PE (s)
Laplace transform of pE (t)
p^E (t)
electrical perturbation estimate
KH ; KT ; KP transfer function gains for the hydraulic ampli er, the turbine, and the generator
TH ; TT ; TP
transfer function time constants for the hydraulic ampli er, the turbine, and the generator
Ts
sampling period in discretized dynamic equations
n
discrete time index
x(nTs)
discrete state vector of the dynamic system
20

ii) Two-area system: (in addition to above symbols with additional underscore 1 or 2 to specify
the area concerned)
p1;2(t)
P1;2(s)
p2;1(t)
P2;1(s)
1 (t); 2(t)
1 (s); 2(s)
T0
B1 ; B2

uctuation in tie-line power transmitted from area 1 to area 2


Laplace transform of p1;2(t)
uctuation in tie-line power transmitted from area 2 to area 1
Laplace transform of p2;1(t)
uctuation in shaft angle in area 1 or 2
Laplace transform of 1 (t); 2(t)
tie-line synchronizing coecient
proportionality coecients

2) Neural networks and backpropagation quantities:


l
wi;j
l
xi
slj ( )

sjl ()
jl
0

H (n)
u(n)

e
d

weight connecting neuron i in layer l with neuron j in next layer


input to neuron in layer l
sigmoid function in neuron j of layer l
derivative of slj () with respect to its argument
error gradient produced in neuron j of layer l
discrete step function of amplitude 1.0
neural controller output
neural network error vector
desired output vector
ith

21

You might also like