You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/lqcontrol.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,14 +50,14 @@ These themes appear repeatedly below.
50
50
51
51
Mathematically, LQ control problems are closely related to {doc}`the Kalman filter <kalman>`
52
52
53
-
* Recursive formulations of linear-quadratic control problems and Kalman filtering problems both involve matrix **Riccati equations**.
54
-
* Classical formulations of linear control and linear filtering problems make use of similar matrix decompositions (see for example[this lecture](https://python-advanced.quantecon.org/lu_tricks.html) and [this lecture](https://python-advanced.quantecon.org/classical_filtering.html)).
53
+
* Recursive formulations of linear-quadratic control problems and Kalman filtering problems both involve matrix [Riccati equations](https://en.wikipedia.org/wiki/Riccati_equation).
54
+
* Classical formulations of linear control and linear filtering problems make use of similar matrix decompositions (see for example[Classical Control with Linear Algebra](https://python-advanced.quantecon.org/lu_tricks.html) and [Classical Prediction and Filtering With Linear Algebra](https://python-advanced.quantecon.org/classical_filtering.html)).
55
55
56
56
In reading what follows, it will be useful to have some familiarity with
57
57
58
58
* matrix manipulations
59
59
* vectors of random variables
60
-
* dynamic programming and the Bellman equation (see for example {doc}`this lecture <intro:short_path>` and {doc}`this lecture <optgrowth>`)
60
+
* dynamic programming and the Bellman equation (see for example {doc}`Shortest Paths <intro:short_path>` and {doc}`Optimal Growth <optgrowth>`)
61
61
62
62
For additional reading on LQ control, see, for example,
63
63
@@ -98,7 +98,7 @@ x_{t+1} = A x_t + B u_t + C w_{t+1},
98
98
Here
99
99
100
100
* $u_t$ is a "control" vector, incorporating choices available to a decision-maker confronting the current state $x_t$
101
-
* $\{w_t\}$ is an uncorrelated zero mean shock process satisfying $\mathbb E w_t w_t' = I$, where the right-hand side is the identity matrix
101
+
* $\{w_t\}$ is a sequence of uncorrelated zero mean shock process satisfying $\mathbb E w_t w_t' = I$, where the right-hand side is the identity matrix
102
102
103
103
Regarding the dimensions
104
104
@@ -117,8 +117,8 @@ $$
117
117
Here $a_t$ is assets, $r$ is a fixed interest rate, $c_t$ is
118
118
current consumption, and $y_t$ is current non-financial income.
119
119
120
-
If we suppose that $\{y_t\}$ is serially uncorrelated and $N(0,
121
-
\sigma^2)$, then, taking $\{w_t\}$ to be standard normal, we can write
120
+
If we suppose that $\{y_t\}$ is serially uncorrelated and $N(0,
121
+
\sigma^2)$, then, taking $\{w_t\}$ to be standard normal, we can write
122
122
the system as
123
123
124
124
$$
@@ -254,13 +254,20 @@ In the LQ model, the aim is to minimize flow of losses, where time-$t$ loss is g
254
254
x_t' R x_t + u_t' Q u_t
255
255
```
256
256
257
+
Where the entries in matrices $R$ and $Q$ are chosen to match the specific problem that is being studied.
258
+
257
259
Here
258
260
259
261
* $R$ is assumed to be $n \times n$, symmetric and nonnegative definite.
260
262
* $Q$ is assumed to be $k \times k$, symmetric and positive definite.
261
263
262
264
```{note}
263
265
In fact, for many economic problems, the definiteness conditions on $R$ and $Q$ can be relaxed. It is sufficient that certain submatrices of $R$ and $Q$ be nonnegative definite. See {cite}`HansenSargent2008` for details.
266
+
267
+
```
268
+
269
+
```{note}
270
+
The use of $R$ and $Q$ notations may differ depending on the source. Some authors use $Q$ to be the matrix associated with the state variables and $R$ with the control variables.
264
271
```
265
272
266
273
#### Example 1
@@ -328,7 +335,7 @@ Comments:
328
335
329
336
* We assume $R_f$ to be $n \times n$, symmetric and nonnegative definite.
330
337
* We allow $\beta = 1$, and hence include the undiscounted case.
331
-
* $x_0$ may itself be random, in which case we require it to be independent of the shock sequence $w_1, \ldots, w_T$.
338
+
* $x_0$ may itself be random, in which case we require it to be independent of the shock sequence $\{w_1, \ldots, w_T\}$.
332
339
333
340
(lq_cp)=
334
341
### Information
@@ -369,7 +376,7 @@ What's special about the LQ case is that -- as we shall soon see --- the optima
369
376
### Solution
370
377
371
378
To solve the finite horizon LQ problem we can use a dynamic programming
372
-
strategy based on backward induction that is conceptually similar to the approach adopted in {doc}`this lecture <intro:short_path>`.
379
+
strategy based on backward induction that is conceptually similar to the approach adopted in {doc}`Shortest Paths <intro:short_path>`.
373
380
374
381
For reasons that will soon become clear, we first introduce the notation $J_T(x) = x' R_f x$.
375
382
@@ -388,6 +395,8 @@ x_{T-1}' R x_{T-1} + u' Q u + \beta \,
388
395
\}
389
396
$$
390
397
398
+
We use $u$ instead of $u_{T-1}$ here to simplify notation.
399
+
391
400
At this stage, it is convenient to define the function
392
401
393
402
```{math}
@@ -506,7 +515,7 @@ d_{T-1} := \beta \mathop{\mathrm{trace}}(C' P_T C)
506
515
507
516
(The algebra is a good exercise --- we'll leave it up to you.)
508
517
509
-
If we continue working backwards in this manner, it soon becomes clear that $J_t (x) = x' P_t x + d_t$ as claimed, where $\{P_t\}$ and $\{d_t\}$ satisfy the recursions
518
+
If we continue working backwards in this manner, it soon becomes clear that $J_t (x) = x' P_t x + d_t$ as claimed, where $P_t$ and $d_t$ satisfy the recursions
510
519
511
520
```{math}
512
521
:label: lq_pr
@@ -541,7 +550,7 @@ These are the linear optimal control policies we {ref}`discussed above <lq_cp>`.
541
550
542
551
In particular, the sequence of controls given by {eq}`lq_oc` and {eq}`lq_lom` solves our finite horizon LQ problem.
543
552
544
-
Rephrasing this more precisely, the sequence $u_0, \ldots, u_{T-1}$ given by
553
+
Rephrasing this more precisely, the sequence $\{u_0, \ldots, u_{T-1}\}$ given by
545
554
546
555
```{math}
547
556
:label: lq_xud
@@ -639,7 +648,7 @@ $$
639
648
Now that the problem is expressed in LQ form, we can proceed to the solution
640
649
by applying {eq}`lq_pr` and {eq}`lq_oc`.
641
650
642
-
After generating shocks $w_1, \ldots, w_T$, the dynamics for assets and
651
+
After generating shocks $\{w_1, \ldots, w_T\}$, the dynamics for assets and
643
652
consumption can be simulated via {eq}`lq_xud`.
644
653
645
654
The following figure was computed using $r = 0.05, \beta = 1 / (1+ r),
0 commit comments