A Child'S Guide To Optimal Control Theory

You might also like

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

ECON7020: MACROECONOMIC THEORY I

Martin Boileau

A CHILD'S GUIDE TO OPTIMAL CONTROL THEORY

1. Introduction
This is a simple guide to optimal control theory. In what follows, I borrow freely from
Kamien and Shwartz (1981) and King (1986).

2. The Finite Horizon Problem


Optimal control theory is useful to solve continuous time optimization problems of the
following form:
max

F (x(t); u(t); t) dt

(P )

subject to
x_ i = Qi (x(t); u(t); t);
xi (0) = xi0 ;
xi (T ) 0;
u(t) 2 ;

i = 1; : : : ; n;

i = 1; : : : ; n;
i = 1; : : : ; n;
2 IRm :

(1)
(2)
(3)
(4)

where,
x(t) is a n-vector of state variables (xi (t)). These describes the state of the system at any
point in time. Also, note that dxi =dt = x_ i .
u(t) is a m-vector of control variables. These are the choice variables in the optimization
problem.
F () is a twice continuously dierentiable objective function. Throughout, we assume that
this function is time additive.
Qi () are twice continuously dierentiable transition functions for each state variable.
1

The dierent constraints are:


i. Equation (1) denes the transition equations for each state variables. It describes how
the state variables evolve over time.
ii. Equation (2) show the initial conditions for each state variable. In this, xi0 are
constants.
iii. Equation (3) show the terminal conditions for each state variable.
iv. Equation (4) denes the feasible set for control variables.
We can now discuss the Pontryagin maximum principle. This principle says that we
can solve the optimization problem P using a Hamiltonian function H over one period. A
version of the Theorem is (see Kamien and Schwartz):
Theorem In order that x (t), u (t) be optimal for the problem P , it is necessary that
there exist a constant 0 and continuous functions (t) = ( 1 (t); : : : ; n (t) ), where for all
0 t T we have 0 6= 0 and (t) 6= 0 such that for every 0 t T
H (x (t); u; (t); t) H (x (t); u (t); (t); t) ;
where the Hamiltonian function H is dened by
H (x; u; ; t) = 0 F (x; u; t) +

n
X

i Qi (x; u; t):

i=1

Except at points of discontinuity of ut ,


@H()
= _ i (t);
@xi

i = 1; : : : ; n:

Furthermore, 0 = 0 or 0 = 1 and, nally, the following transversality conditions are


satised:
i (T ) 0; i (T )xi (T ) = 0; i = 1; : : : ; n:

3. The Present Value Hamiltonian


The previous theorem suggests that one can solve problem P by simply setting up the
following present value Hamiltonian:
H (x; u; ; t) = F (x; u; t) +

n
X
i=1

i Qi (x; u; t):

In the above, we call i (t) co-state variables. They are analogous to Lagrange multipliers.
The necessary conditions for a maximum are:
@H()
= 0; k = 1; : : : ; m;
@uk
@H()
= _ i (t); i = 1; : : : ; n;
@xi
i (T ) 0; i (T )xi (T ) = 0; i = 1; : : : ; n:
The sucient conditions for a maximum are that the Hamiltonian function be concave in
x and u.
Finally, in some cases, our optimization problem will also include other constraints:
max

F (x(t); u(t); t) dt

(P 1)

subject to
x_ i = Qi (x(t); u(t); t);
Gj (x(t); u(t); t) 0;
xi (0) = xi0 ;
xi (T ) 0;
u(t) 2 ;

i = 1; : : : ; n;
j = 1; : : : ; q;

i = 1; : : : ; n;
i = 1; : : : ; n;
2 IRm :

In that case, we can write problem P 1 as a Lagrangian:


L(x; u; ; ; t) = H(x; u; ; t) +

q
X

j Gj (x; u; t)

j=1

= F (x; u; t) +

n
X

i Qi (x; u; t) +

i=1

q
X

j Gj (x; u; t);

j=1

where = ( 1 ; : : : ; q ). In this case, the necessary conditions for a maximum are:


@L()
= 0; k = 1; : : : ; m;
@uk
@L()
= _ i (t); i = 1; : : : ; n;
@xi
i (T ) 0; i (T )xi (T ) = 0; i = 1; : : : ; n:
j (t) 0;

j (t)Q(x(t); u(t); t) = 0;

The sucient conditions are as before.


3

j = 1; : : : ; q:

4. An Economic Example
Consider the following problem:
max

et u (c(t)) dt

subject to

a(t)
_
= ra(t) c(t);
a(0) = a0 ;
a(T ) aT :

The present value Hamiltonian is

H(a; c; ; t) = et u (c) + [ra c] :


The rst-order conditions are
@H
= 0 =) et u0 (c(t)) (t) = 0;
@c
@H
_
_
= (t)
=) (t)r = (t);
@a
(T ) 0; (T )a(T ) = 0:
A simple interpretation of these rst-order conditions is to relate the growth rate of
consumption, gc (t), to the elasticity of intertemporal substitution, (c(t)), and the market
and subjective discount rates, r and . To do this, rst note that
_
(t)
= r(t) = ret u0 (c(t)):
Then, totally dierentiating the rst rst-order condition yields
_
et u0 (c(t)) + et u00 (c(t)) c(t)
_ (t)
= 0:
Dene the growth rate of consumption as gc = (1=c)dc=dt:
gc (t) =

c(t)
_
u0 (c(t))
= (r )
;
c(t)
c(t)u00 (c(t))

such that
gc (t) = (c(t))(r );
where (c(t)) = u0 (c(t))=[c(t)u00 (c(t))] > 0. Thus, consumption grows whenever the
market discount rate is larger than the subjective discount rate. In that case, the consumer
is less impatient than the market.
4

5. The Innite Horizon Problem


In this section we consider an extension of the nite horizon problem to the case of innite
horizon. To simplify the exposition, we will focus our attention to stationary problems.
The assumption of stationarity implies that the main functions of the problem are
time invariant:
F (x(t); u(t); t) = F (x(t); u(t));
Gi (x(t); u(t); t) = Gi (x(t); u(t));
Qj (x(t); u(t); t) = Qj (x(t); u(t)):
In general, to obtain an interior solution to our optimization problem, we require the
objective function to be bounded away from innity. One way to achieve boundedness is
to assume discounting. However, the existence of a discount factor is neither necessary nor
sucient to ensure boundedness. Thus, we dene
F (x(t); u(t)) = et f (x(t); u(t)):
Our general problem becomes:
max
subject to

et f (x(t); u(t)) dt

(P 2)

x_ i = Qi (x(t); u(t));
Gj (x(t); u(t)) 0;
xi (0) = xi0 ;

i = 1; : : : ; n;

(1)

j = 1; : : : ; q;

i = 1; : : : ; n;

(2)

The present value Hamiltonian is


t

H (x; u; ) = e

f (x; u) +

n
X

i Qi (x; u):

i=1

The Lagrangian is
L(x; u; ; ) = et f (x; u) +

n
X

i Qi (x; u) +

i=1

j (t) 0;

T !1

j (t)Q(x(t); u(t)) = 0;
5

j Gj (x; u):

j=1

The rst-order conditions are:


@L()
= 0; k = 1; : : : ; m;
@uk
@L()
= _ i (t); i = 1; : : : ; n;
@xi
lim i (T ) 0;
lim i (T )xi (T ) = 0;
T !1

q
X

i = 1; : : : ; n:

j = 1; : : : ; q:

The sucient conditions are as before.

6. The Current Value Hamiltonian


Any discounted optimal control problem can be solved using both a present value Hamiltonian or a current value Hamiltonian. We sometime prefer the current value Hamiltonian
for its simplicity.
We obtain the current value Hamiltonian as follows:
H(x; u; ) = et H(x; u; );
where i = et i . The current value Hamiltonian is thus
H (x; u; ) = f(x; u) +

n
X

i Qi (x; u):

i=1

The transformation from present value to current value aects the rst-order conditions. To see this, let us restate our problem P 2 using the current value Hamiltonian. The
problem is
Z 1
max
et f (x(t); u(t)) dt
(P 2)
0

subject to
x_ i = Qi (x(t); u(t));
Gj (x; u) 0;
xi (0) = xi0 ;

i = 1; : : : ; n;

(1)

j = 1; : : : ; q;
i = 1; : : : ; n;

(2)

The current value Hamiltonian is


H (x; u; ) = f(x; u) +

n
X

i Qi (x; u):

i=1

The Lagrangian is
L(x; u; ; ) = f (x; u) +

n
X

i Qi (x; u) +

i=1

q
X
j=1

j Gj (x; u):

The rst-order conditions are:


@L()
= 0; k = 1; : : : ; m;
@uk
h
i
@L()
= _ i (t) i (t) ; i = 1; : : : ; n;
@xi
lim eT i (T ) 0;
lim eT i (T )xi (T ) = 0;
T !1

j (t) 0;

T !1

j (t)Q(x(t); u(t)) = 0;

i = 1; : : : ; n:

j = 1; : : : ; q:

The sucient conditions are as before.

7. The Economic Example in Innite Horizon


Consider the following problem:
max

et u (c(t)) dt

subject to
a(t)
_
= ra(t) c(t);
a(0) = a0 :
Abstracting from the time subscript, the current value Hamiltonian is
H(a; c; ) = u(c) + [ra c] :
Its rst-order conditions are
@H
= 0 =) u0 (c) = 0;
@c
h
i
h
i
@H
= _
=) r = _ ;
@a
lim et (T ) 0;
lim et (T )a(T ) = 0:
T !1

T !1

Once again, the interpretation of these rst-order conditions relates consumption


growth to the elasticity of intertemporal substitution, the market discount rate, and the
subjective discount rate, r and . To show this, rst note that
_ = (r ) = (r )u0 (c):
Then, totally dierentiating the rst rst-order condition yields
u00 (c)c_ = _ = (r )u0 (c);
7

such that
gc (t) =

c(t)
_
u0 (c(t))
= (r )
c(t)
c(t)u00 (c(t))

or
gc (t) = (c(t))(r );
where (c(t)) = u0 (c(t))=[c(t)u00 (c(t))] > 0. Thus, consumption grows whenever the market discount rate is larger than the subjective discount factor. In that case, the consumer
is less impatient than the market.

8. Summary
To summarize, here is the simple cookbook. Assume that you face the following problem:
max

et f (x(t); u(t)) dt

subject to
x_ i = Qi (x(t); u(t));
xi (0) = xi0 ;

i = 1; : : : ; n;

i = 1; : : : ; n:

There are two ways to proceed:


1. Present Value Hamiltonian
Step 1 Write the present value Hamiltonian:
t

H (x; u; ) = e

f(x; u) +

n
X

i Qi (x; u):

i=1

Step 2 Find the rst-order conditions:


@H()
= 0; k = 1; : : : ; m;
@uk
@H()
= _ i (t); i = 1; : : : ; n;
@xi
lim i (T ) 0;
lim i (T )xi (T ) = 0;
T !1

T !1

i = 1; : : : ; n:

2. Current Value Hamiltonian


Step 1 Write the current value Hamiltonian:
H (x; u; ) = f (x; u) +

n
X

i Qi (x; u):

i=1

Step 2 Find the rst-order conditions:


@H()
= 0; k = 1; : : : ; m;
@uk
h
i
@H()
= _ i (t) i (t) ; i = 1; : : : ; n;
@xi
lim eT i (T ) 0;
lim eT i (T )xi (T ) = 0;
T !1

T !1

i = 1; : : : ; n:

References
Kamien, Morton I. and Nancy L. Schwartz, 1981, Dynamic Optimization: The Calculus
of Variations and Optimal Control in Economics and Management, New York: North
Holland.
King, Ian P., 1986, A Cranker's Guide to Optimal Control Theory, mimeo Queen's University.

10

You might also like