# Dynamic Economic Dispatch Using Model

Predictive Control Algorithm

Thy Selaroth
Department Of Electrical and Energy Engineering
Institute of Technology of Cambodia
Selaroth168@gmail.com

Abstract— This paper presents potential benefits of applying
model predictive control (MPC) Algorithm and Quadratic
program to solving the dynamic economic dispatch problem in
electric power systems. The main objective of the economic
load dispatch problem is to determine the optimal schedule of
output powers of all generating units so as to meet the required
load demand at minimum operating cost while satisfying system
equality and inequality constraints. We take Dynamic Economic
Dispatch in 24 hour to implement. Simulation is implemented in
a power system comprising six generators to illustrate potential
benefits from this look-ahead dispatch of both intermittent and
more conventional power plants. For the result of this method,
we compare with the Dynamic Economic Load Dispatch of
Thermal Power System Using Genetic Algorithm by W. M.
Mansour , M. M. Salama, S. M. Abdelmaksoud, H. A. Henry.
The Computational results manifest that the method has a lot of
excellent performances, and it is superior to other methods in
many respects.
I. INTRODUCTION
In power markets there is an increasing need for
improving the representation of high-voltage transmission
networks in order to better support market design alternatives,
price formation mechanisms, and for general operation and
planning decisions. In most cases, this process involves the
definition of more complex mathematical models [1].
With the development of modern power systems,
increasing attention. The primary objective of ELD problem is
to minimize the total generation cost of units while satisfying
all units and system equality and inequality constraints [2]. It
involves meeting the load demand at minimum total fuel cost
while satisfying various unit and system constraints. The
economic dispatch (ED) model is a optimization power
demand , generation limit constraints, ramp rate limits ,and
system loss.
The ED for power systems can be divided into
traditional static ED and DED. The static ED seeks to achieve
an optimal objective for the power system at a specific time,
but will not take into account the intrinsic link between the
systems at different time moments. The DED takes into
account of the coupling effect of system at different time
moments, such as the limit on the generator ramping rate. As
a result, its computation process is more complex than that of
a static optimal dispatch [3].
For this paper we use the model predictive control algorithm
to do the step of Dynamic Economic Dispatch. Each step, we
use the quadratic program to the optimization problem.

MPC has been proposed for the periodic
implementations of the optimal solutions of the DED problem
in .The system loss is a very essential factor to be considered
in the power system analysis. In the present paper we present
the MPC method for the periodic implementations of the
optimal solutions of the DED problem taking into account the
transmission losses. Model predictive control is a receding
horizon optimization based control technique. The basic
concept of MPC is that at each control step, a finite-horizon
optimal control problem is solved but only the first step of
control sequences gets implemented. The state space trajectory
over the prediction horizon is described by a predictive model,
with the initial state being the measured state of the actual
system. After the implementation of the first step, the system
control waits until the next step. With the new measurement,
the optimal control routine is re-run. As a result of this online
optimization, the MPC approach has been successfully applied
to many real-world process control problems [4].

II. ECONOMIC DISPATCH PROBLEM
In the practical case the fuel cost of generator can be
represented as the quadratic form. We will be considering the
operation of generating i units [5].

2
i i i i i i
C a P b P c = + + (1)
The general formula of total power loss in transmission line is
expressed by (from kron’s loss formula)

0 00
1 1 1
g g g
n n n
loss i ij j i i
i j i
P PB P B P B
= = =
= + +
¿¿ ¿
(2)

The total demand power Pd:

1
g
n
i loss
i
P Pd P
=
= +
¿
(3)

The power output of generator should not exceed its rating
nor should be below its rating.

(min) (max) i i i
P P P s s (4)

where Pd is the real power load; Pi is the real power output at
generator bus i; Bij, B0j, B00 are the B-coefficients of the
transmission loss formula;
(min) i
P is the minimal real power
output at generator i;
(max) i
P is the maximal real power output
at generator i;

For this optimization we also us the Lagrange multiplier

1 1
( , , ) ( ) ( ) ( )
g h
m m
j j j
j j
L x f x jh x g x ì µ ì µ
= =
= + +
¿ ¿
(5)

According to the optimization theory, the Kuhn-tucker (KT)
for the optimum point
* * *
( , , ) x ì µ are :

* * *
( , , ) 0
i
L
x
x
ì µ
c
=
c
i=1,2……N (6)

*
( ) 0
j
h x = j=1,2…..
h
m (7)

*
( ) 0
j
g x s j=1,2…..
g
m (8)

* * *
( ) 0, 0
j j j
g x µ µ = > j=1,2…..
g
m (9)

By using the Lagrange multiplier ,the Kuhn-tucker (KT) , and
to (9) we obtain :

( ) ( )
0
( )
( )
(1 ) 2
2( )
g
n
k k
i i ij i
i j k
i k
i ii
B b B P
P
a B
ì ì
ì
=
÷ ÷ ÷
=
+
¿
(10)

We sum all of power and using Taylor’s series we obtain

( )
0
( )
( ) 2
1 1
(1 ) 2
( )
2( )
g
g g
n
k
i i ii i i ij i n n
i j k i
k
i i i ii
a B B b a B P
P
a B
o
oì ì
=
= =
÷ ÷ ÷
=
+
¿
¿ ¿
(11)

( )
1
g
n
k
loss i
i
P Pd P P
=
A = + ÷
¿
(11)

( )
( )
( )
1
( )
g
k
k
n
k i
i
P
dP
d
ì
ì
=
A
A =
¿
(12)

( 1) ( ) ( ) k k k
ì ì ì
+
= + A (13)

By using this one and consider the
(min) (max) i i i
P P P s s
,
By (10) to (13) we can find the power of all generator.

III. MODEL PREDICTIVE CONTROL
Model predictive control is a receding horizon
optimization based control technique. The basic concept of
MPC is that at each control step, a finite-horizon optimal
control problem is solved but only the first step of control
sequences gets implemented. The state space trajectory over
the prediction horizon is described by a predictive model, with
the initial state being the measured state of the actual system.
After the implementation of the first step, the system control
waits until the next step. With the new measurement, the
optimal control routine is re-run. As a result of this online
optimization, the MPC approach has been successfully applied
to many real-world process control problems [6]. The MPC
problem at control step i is

0 1 2
1
0
min , { , , ,..... }
. . ( ), 0,1, 2.... 1
( ) 0, 0,1, 2.... 1
( )
n
U
k k k
k k
J U u u u u
s t x f x u k N
g x u k N
x Z k
+
=
= + = ÷
+ s = ÷
=
(14)

Where N is the prediction horizon, the optimal solution to
the above problem is denoted by
* * * * *
0 1 2
{ , , ,..... }
n
U u u u u = .
Only
*
0
u after this iteration of optimization is implemented.
The process repeats in time.

We can apply MPC to dynamic economic dispatch by
algorithm below [7].

1. input the initial status
1 1 1 1 1
1 2 3
{ , , ,..... }
n
P P P P P =

2. Compute the open loop optimal solution of DED

* * * * *
0 1 2
{ , , ,..... }
n
U u u u u =
And
2 1 *
i i i
P P Tu = +
3. Compute the Close loop optimal solution of (MPC)

*( 1) *( 1) *( 1) *( 1) *( 1)
1 2 3
{ , , ..... }
m m m m m
n
U u u u u
+ + + + +
=

1 *( 1) m m m
i i i
P P Tu
+ +
= +
4. Let m=m+1 and go to step 1

By this algorithm we can optimize cost by the dynamic way.
For making optimization we use the quadratic programming.

QP is an effective optimization method to find the global
solution if the objective functions is quadratic form and the
constraints are linear. It can be applied to optimization
problems having non quadratic objective and nonlinear
constraints by the approximating the objective to quadratic
function and constraints as linear [8].
The classic objective function of a QP problem is as
follows [9]

1
min( )
2
T
x
X QX CX +
(15)

Subject to the linear inequality and equality and bound
constrains

eq eq
Ax b
A x b
lb X ub
s
=
s s
(16)

where C is an n - dimensional row vector describing the
coefficients of the linear terms in the objective function; Q is
an ( n × n ) symmetrical matrix describing the coefficients of
the quadratic terms or hessian matrix and T in (1) denote the
transposed vector [5]. As in linear programming, the decision
variables are denoted by the n - dimensional column vector x,
and the constraints are defined by an ( m × n ) matrix (A) and
an m - dimensional column vector B of right - hand – side
coefficients. For the real power ED problem, we know that a
feasible solution exists and that the constraint region is
bounded. When the objective function F (x) is strictly convex
for all feasible points, the problem has a unique local
minimum, which is also the global minimum. A sufficient
condition to guarantee strict convexity is for Q to be positive
definite. This is generally true for most of economic dispatch
problems.

To map the ED to QP, the objective function variables are
given by the power generation output vector as follow:

Take
1 *( 1) m m m
i i i
P P Tu
+ +
= + (17)

We optimization every time T =1 Hour
So that (17) will become

1 *( 1) m m m
i i i
P P u
+ +
= + (18)

Operation cost of generating i units is

2 2
1 1 1
(2 )
i i i i i i i i i i i i
C a u P a b u b P c a P
÷ ÷ ÷
= + + + + + (19)

We will optimize
i

The general formula of total power loss in transmission line is
expressed by (from kron’s loss formula)

0 00
1 1 1
g g g
n n n
loss i ij j i i
i j i
P PB P B P B
= = =
= + +
¿¿ ¿
(20)

We suppose that
i
x P = and by (16)
We can get

11 1
1 2 3
1
.....
([1,1,1...,1] [ , , ..., ] : :
.....
N
eq N
N NN
B B
A P P P P
B B
(
(
= +
(
(
¸ ¸

00 00 00
01 02 03 0
1 2
[ , , ..., ] [ , ,..., ]
N
N
B B B
B B B B
P P P
+ +
(21)

2
eq loss
b Pd P = + (22)

By (18) So that form (21) will become

11 1
( 1) ( 1)
1 1
1
.....
[ ,..., ] : :
.....
N
m m m m
eq N N
N NN
B B
A P u P u
B B
+ +
(
(
= + +
(
(
¸ ¸

01 02 03 0
[1,1,1...,1] [ , , ..., ]
N
B B B B + +

00 00 00
( 1) ( 1) ( 1)
1 1 2 2
[ , ,..., ]
m m m m m m
N N
B B B
P u P u P u
+ + +
+
+ + +
(23)
( 1)
1 1
11 1
( 1)
( 1) ( 1) 2 2
1 1
1
( 1)
...
[ ,..., ] : :
:
...
m m
N
m m
m m m m
loss N N
N NN
m m
N N
P u
B B
P u
P P u P u
B B
P u
+
+
+ +
+
( +
(
(
+
(
(
= + +
(
(
(
(
¸ ¸
+
(
¸ ¸

( 1)
1 1
( 1)
2 2
01 02 03 0 00
( 1)
[ , , ..., ]
:
m m
m m
N
m m
N N
P u
P u
B B B B B
P u
+
+
+
( +
(
+
(
+
(
(
+
(
¸ ¸
(24)

To find Hessian matrix Q we take

2 2
2
1 1
2 2
2
1
...
: :
...
N
N N
f f
x x x
Q
f f
x x x
( c c
(
c c c
(
(
=
(
c c
(
(
c c c
¸ ¸
(25)

By (19) & (25) Hessian matrix Q is equal

1
.... 0
: :
0 ...
N
a
Q
a
(
(
=
(
(
¸ ¸
(26)

To find C the coefficients of the linear objective function

1 1 1
2 2 2
(2 )
(2 )
:
(2 )
N N N
P a b
P a b
f
P a b
( +
(
+
(
=
(
(
+
(
¸ ¸
(27)

We use the flowing Matlab code formulated to do the
optimization [10]

x=quadprog (H, f, A, b, Aeq, beq, lb, ub)
% solves the the quadratic programming problem:
min 0.5*x'*H*x + f'*x
% while satisfying the constraints
A*x ≤ b
Aeq*x = beq
lb <= x <= ub
V. APPLY FLOW CHART
For this section we will apply the combine Algorithm of

VI. SIMULATION RESULTS
To verify the effectiveness of the proposed algorithm, a six
unit thermal power generating plant was tested. The proposed
algorithm has been implemented in MATLAB language. The
proposed algorithm is applied to 26 buses, 6 generating units
with generator constraints, ramp rate limits and transmission
losses [21]. The results obtained from the proposed method
will be compared with the outcomes obtained from the
Genetic Algorithm and PSO method in terms of the solution
quality and computation efficiency. The fuel cost data and
ramp rate limits of the six thermal generating units were given
in Table I. The load demand for 24 hours is given in Table II.
B-loss coefficients of six units system is given in Equation
(17). Table III gives the optimal scheduling of all generating
units, power loss and total fuel cost for 24 hours by using PSO
technique. Table IV gives the optimal scheduling of all
generating units, power loss and total fuel cost for 24 hours by
using Genetic Algorithm and Table V gives the optimal
scheduling of all generating units, power loss and total fuel
cost for 24 hours by using the proposed method.

B-loss coefficients of six units system is given in Equation

TABLE III GIVES THE OPTIMAL SCHEDULING OF ALL
GENERATING UNITS, POWER LOSS AND TOTAL FUEL COST FOR 24
HOURS BY USING PSO

TABLE IV GIVES THE OPTIMAL SCHEDULING OF ALL
GENERATING UNITS, POWER LOSS AND TOTAL FUEL COST FOR 24
HOURS BY USING GENETIC ALGORITHM

TABLE V GIVES THE OPTIMAL SCHEDULING OF ALL
GENERATING UNITS, POWER LOSS AND TOTAL FUEL COST FOR 24
HOURS BY USING THE PROPOSED METHOD

Figure 1. Fuel cost of unit 1 versus 24 hr by the three used method

Figure 2. Fuel cost of unit 2 versus 24 hr by the three used method

Figure 3. Fuel cost of unit 3 versus 24 hr by the three used method

Figure 4. Fuel cost of unit 4 versus 24 hr by the three used method

Figure 5. Fuel cost of unit 5 versus 24 hr by the three used method

Figure 6. Fuel cost of unit 6 versus 24 hr by the three used method

Figure 7. Total fuel cost of 6 unit versus 24 hr by the three used
method

VII. CONCLUSIONS
In this paper, Dynamic Economic Dispatch Using Model
Predictive Control Algorithm is used to solve the DED
problem. The proposed algorithm has been successfully
implemented for solving the DED problem of a power system
consists of 6 units with different constraints such as real power
balance, generator power limits and ramp rate limits. For the
results, some of the generator (1; 4; 6) has the lower cost than
other method while generators (2; 3; 5) are higher. Even
though some are lower and some are high cost, the total cost
of propose method is lower that other methods. it is clear
From the that the total fuel cost obtained by Dynamic
Economic Dispatch Using Model Predictive Control
Algorithm is comparatively less compared to other methods.
Simulation results demonstrate that the proposed method is
powerful and practical tool for obtaining minimum of total
fuel cost.

REFERENCES
[1] , F. Benhamida , S. Souag , F. Z. Gharbi, R. Belhachem ,A.
Graa “Constrained Dynamic Economical Dispatch”.
[2]. W. M. Mansour, M. M. Salama, S. M. Abdelmaksoud,
H. A. Henry, “Dynamic Economic Load Dispatch of
Thermal Power System Using Genetic Algorithm”.
[3]. A. M. Elaiw , X. Xia and A. M. Shehata “Application
` Of Model Predictive Control To Dynamic Economic
Emission Dispatch With Transmission Losses”
[5]. Le Xie, Student Member, IEEE, and Marija D. Ili´c,
Fellow, IEEE “Model Predictive Economic
/Environmental Dispatch of Power Systems with
Intermittent Resources
[6]. A.M.Elaiw, X.Xia, and A.M.Shehata” An application of
model predictive control to the dynamic economic
emission with transmission loss
[7]. R.Belhachem, F.Benhamida, S.souag, I.Ziane ,and
Y.salhi “Dynamic Economic Load Dispatch Using