@@ -39,11 +39,11 @@ Such a problem is also sometimes called an optimal linear regulator problem.
39
39
40
40
A Lagrangian formulation
41
41
42
- * carries insights about connections between stability and optimality
42
+ * carries insights about connections between stability and optimality
43
43
44
- * is the basis for fast algorithms for solving Riccati equations
44
+ * is the basis for fast algorithms for solving Riccati equations
45
45
46
- * opens the way to constructing solutions of dynamic systems that don't come directly from an intertemporal optimization problem
46
+ * opens the way to constructing solutions of dynamic systems that don't come directly from an intertemporal optimization problem
47
47
48
48
A key tool in this lecture is the concept of an $n \times n$ ** symplectic** matrix.
49
49
78
78
79
79
subject to $x_ {t+1}=Ax_t+Bu_t$, where $x_0$ is a given initial state vector.
80
80
81
- Here $x_t$ is an $(n\times 1)$ vector of state variables, $u_t$ is a $(k\times 1)$
81
+ Here $x_t$ is an $(n\times 1)$ vector of state variables, $u_t$ is a $(k\times 1)$
82
82
vector of controls, $R$ is a positive semidefinite symmetric matrix,
83
83
$Q$ is a positive definite symmetric matrix, $A$ is an $(n\times n)$
84
84
matrix, and $B$ is an $(n\times k)$ matrix.
116
116
or
117
117
118
118
$$
119
- u=-Fx,
119
+ u=-Fx,
120
120
$$
121
+
121
122
where
122
123
123
124
$$
@@ -139,7 +140,7 @@ But only one of them is positive definite.
139
140
140
141
The positive define solution is associated with the maximum of our problem.
141
142
142
- It expresses the matrix $P$ as an implicit function of the matrices
143
+ It expresses the matrix $P$ as an implicit function of the matrices
143
144
$R,Q,A,B$.
144
145
145
146
Notice that the **gradient of the value function** is
@@ -168,7 +169,9 @@ where $2 \mu_{t+1}$ is a vector of Lagrange multipliers on the time $t$ transiti
168
169
First-order conditions for maximization with respect to $\{u_t,x_{t+1}\}_{t=0}^\infty$ are
169
170
170
171
$$
171
- \eqalign{2 Q u_t &+ 2B^\prime \mu_ {t+1} = 0 \ ,\ t \geq 0 \cr \mu_t &= R x_t + A^\prime \mu_ {t+1}\ ,\ t\geq 1.\cr}
172
+ \begin{aligned}
173
+ 2 Q u_t &+ 2B^\prime \mu_ {t+1} = 0 \ ,\ t \geq 0 \cr \mu_t &= R x_t + A^\prime \mu_ {t+1}\ ,\ t\geq 1.\cr
174
+ \end{aligned}
172
175
$$ (eq2)
173
176
174
177
Define $\mu_0$ to be a vector of shadow prices of $x_0$ and apply an envelope condition to {eq}`eq1`
@@ -183,7 +186,7 @@ which is a time $t=0 $ counterpart to the second equation of system {eq}`eq2`.
183
186
An important fact is that
184
187
185
188
$$
186
- \mu_ {t+1} = P x_ {t+1}
189
+ \mu_ {t+1} = P x_ {t+1}
187
190
$$ (eqn:muPx)
188
191
189
192
where $P$ is a positive define matrix that solves the algebraic Riccati equation {eq}`riccati`.
@@ -196,36 +199,36 @@ corresponds to the **state** vector $x_t$.
196
199
197
200
It is useful to proceed with the following steps:
198
201
199
- * solve the first equation of {eq}`eq2` for $u_t$ in terms of $\mu_{t+1}$.
202
+ * solve the first equation of {eq}`eq2` for $u_t$ in terms of $\mu_{t+1}$.
200
203
201
- * substitute the result into the law of motion $x_{t+1} = A x_t + B u_t$.
202
-
203
- * arrange the resulting equation and the second equation of {eq}`eq2` into the form
204
+ * substitute the result into the law of motion $x_{t+1} = A x_t + B u_t$.
205
+
206
+ * arrange the resulting equation and the second equation of {eq}`eq2` into the form
204
207
205
208
$$
206
- L\ \pmatrix{ x_ {t+1}\cr \mu_ {t+1}\cr}\ = \ N\ \pmatrix{ x_t\cr \mu_t\cr}\
209
+ L\ \begin{pmatrix} x_ {t+1}\cr \mu_ {t+1}\cr\end{pmatrix }\ = \ N\ \begin{pmatrix} x_t\cr \mu_t\cr\end{pmatrix }\
207
210
,\ t \geq 0,
208
211
$$ (eq:systosolve)
209
212
210
213
where
211
214
212
215
$$
213
- L = \ \pmatrix{ I & BQ^{-1} B^\prime \cr 0 & A^\prime\cr}, \quad N = \
214
- \pmatrix{ A & 0\cr -R & I\cr}.
216
+ L = \ \begin{pmatrix} I & BQ^{-1} B^\prime \cr 0 & A^\prime\cr\end{pmatrix }, \quad N = \
217
+ \begin{pmatrix} A & 0\cr -R & I\cr\end{pmatrix }.
215
218
$$
216
219
217
220
When $L$ is of full rank (i.e., when $A$ is of full rank), we can write
218
221
system {eq}`eq:systosolve` as
219
222
220
223
$$
221
- \pmatrix{ x_ {t+1}\cr \mu_ {t+1}\cr}\ = M\ \pmatrix{ x_t\cr\mu_t\cr}
224
+ \begin{pmatrix} x_ {t+1}\cr \mu_ {t+1}\cr\end{pmatrix }\ = M\ \begin{pmatrix} x_t\cr\mu_t\cr\end{pmatrix }
222
225
$$ (eq4orig)
223
226
224
227
where
225
228
226
229
$$
227
- M\equiv L^{-1} N = \pmatrix{ A+B Q^{-1} B^\prime A^{\prime-1}R &
228
- -B Q^{-1} B^\prime A^{\prime-1}\cr -A^{\prime -1} R & A^{\prime -1}\cr}.
230
+ M\equiv L^{-1} N = \begin{pmatrix} A+B Q^{-1} B^\prime A^{\prime-1}R &
231
+ -B Q^{-1} B^\prime A^{\prime-1}\cr -A^{\prime -1} R & A^{\prime -1}\cr\end{pmatrix }.
229
232
$$ (Mdefn)
230
233
231
234
+++
@@ -236,15 +239,16 @@ $$ (Mdefn)
236
239
We seek to solve the difference equation system {eq}`eq4orig` for a sequence $\{x_t\}_{t=0}^\infty$
237
240
that satisfies
238
241
239
- * an initial condition for $x_0$
240
- * a terminal condition $\lim_{t \rightarrow +\infty} x_t =0$
242
+ * an initial condition for $x_0$
243
+ * a terminal condition $\lim_{t \rightarrow +\infty} x_t =0$
241
244
242
245
This terminal condition reflects our desire for a **stable** solution, one that does not diverge as $t \rightarrow \infty$.
243
246
244
247
245
248
We inherit our wish for stability of the $\{x_t\}$ sequence from a desire to maximize
246
249
247
- $$ -\sum_{t=0}^\infty \bigl[ x_t ' R x_t + u_t' Q u_t \bigr],
250
+ $$
251
+ -\sum_ {t=0}^\infty \bigl[ x_t ' R x_t + u_t' Q u_t \bigr] ,
248
252
$$
249
253
250
254
which requires that $x_t' R x_t$ converge to zero as $t \rightarrow + \infty$.
@@ -258,7 +262,7 @@ To proceed, we study properties of the $(2n \times 2n)$ matrix $M$ defined in {e
258
262
It helps to introduce a $(2n \times 2n)$ matrix
259
263
260
264
$$
261
- J= \pmatrix{ 0 & -I_n\cr I_n & 0\cr}.
265
+ J = \begin{pmatrix} 0 & -I_n\cr I_n & 0\cr\end{pmatrix }.
262
266
$$
263
267
264
268
The rank of $J$ is $2n$.
@@ -283,11 +287,11 @@ by a **similarity transformation**.
283
287
284
288
For square matrices, recall that
285
289
286
- * similar matrices share eigenvalues
287
-
288
- * eigenvalues of the inverse of a matrix are inverses of eigenvalues of the matrix
289
-
290
- * a matrix and its transpose share eigenvalues
290
+ * similar matrices share eigenvalues
291
+
292
+ * eigenvalues of the inverse of a matrix are inverses of eigenvalues of the matrix
293
+
294
+ * a matrix and its transpose share eigenvalues
291
295
292
296
It then follows from equation {eq}`eq4` that
293
297
the eigenvalues of $M$ occur in reciprocal pairs: if $\lambda$ is an
299
303
y_ {t+1} = M y_t
300
304
$$ (eq658)
301
305
302
- where $y_t = \pmatrix{ x_t\cr \mu_t\cr}$.
306
+ where $y_t = \begin{pmatrix} x_t\cr \mu_t\cr\end{pmatrix }$.
303
307
304
308
Consider a **triangularization** of $M$
305
309
306
310
$$
307
- V^{-1} M V= \pmatrix{ W_ {11} & W_ {12} \cr 0 & W_ {22}\cr}
311
+ V^{-1} M V= \begin{pmatrix} W_ {11} & W_ {12} \cr 0 & W_ {22}\cr\end{pmatrix }
308
312
$$ (eqn:triangledecomp)
309
313
310
314
where
@@ -329,7 +333,7 @@ A solution of equation {eq}`eq659` for arbitrary initial condition $y_0$ is
329
333
evidently
330
334
331
335
$$
332
- y_ {t} = V \left[ \matrix{ W^t_ {11} & W_ {12,t}\cr 0 & W^t_ {22}\cr}\right]
336
+ y_ {t} = V \left[ \begin{matrix} W^t_ {11} & W_ {12,t}\cr 0 & W^t_ {22}\cr\end{matrix }\right]
333
337
\ V^{-1} y_0
334
338
$$ (eq6510)
335
339
@@ -344,9 +348,9 @@ and where $W^t_{ii}$ is $W_{ii}$ raised to the $t$th power.
344
348
Write equation {eq}`eq6510` as
345
349
346
350
$$
347
- \pmatrix{ y^\ast_ {1t}\cr y^\ast_ {2t}\cr}\ =\ \left[ \matrix{ W^t_ {11} &
348
- W_ {12, t}\cr 0 & W^t_ {22}\cr}\right] \quad \pmatrix{ y^\ast_ {10}\cr
349
- y^\ast_ {20}\cr}
351
+ \begin{pmatrix} y^\ast_ {1t}\cr y^\ast_ {2t}\cr\end{pmatrix }\ =\ \left[ \begin{matrix} W^t_ {11} &
352
+ W_ {12, t}\cr 0 & W^t_ {22}\cr\end{matrix }\right] \quad \begin{pmatrix} y^\ast_ {10}\cr
353
+ y^\ast_ {20}\cr\end{pmatrix }
350
354
$$
351
355
352
356
where $y^\ast_t = V^{-1} y_t$, and in particular where
@@ -385,7 +389,7 @@ But notice that because $(V^{21}\ V^{22})$ is the second row block of
385
389
the inverse of $V,$ it follows that
386
390
387
391
$$
388
- (V^{21} \ V^{22})\quad \pmatrix{ V_ {11}\cr V_ {21}\cr} = 0
392
+ (V^{21} \ V^{22})\quad \begin{pmatrix} V_ {11}\cr V_ {21}\cr\end{pmatrix } = 0
389
393
$$
390
394
391
395
which implies
@@ -514,8 +518,8 @@ eigvals
514
518
515
519
When we apply Schur decomposition such that $M=V W V^{-1}$, we want
516
520
517
- * the upper left block of $W$, $W_{11}$, to have all of its eigenvalues less than 1 in modulus, and
518
- * the lower right block $W_{22}$ to have eigenvalues that exceed 1 in modulus.
521
+ * the upper left block of $W$, $W_{11}$, to have all of its eigenvalues less than 1 in modulus, and
522
+ * the lower right block $W_{22}$ to have eigenvalues that exceed 1 in modulus.
519
523
520
524
To get what we want, let's define a sorting function that tells `scipy.schur` to sort the corresponding eigenvalues with modulus smaller than 1 to the upper left.
521
525
@@ -786,7 +790,9 @@ First-order conditions for maximization with respect
786
790
to $\{u_t,x_{t+1}\}_{t=0}^\infty$ are
787
791
788
792
$$
789
- \eqalign{2 Q u_t &+ 2 \beta B^\prime \mu_ {t+1} = 0 \ ,\ t \geq 0 \cr \mu_t &= R x_t + \beta A^\prime \mu_ {t+1}\ ,\ t\geq 1.\cr}
793
+ \begin{aligned}
794
+ 2 Q u_t &+ 2 \beta B^\prime \mu_ {t+1} = 0 \ ,\ t \geq 0 \cr \mu_t &= R x_t + \beta A^\prime \mu_ {t+1}\ ,\ t\geq 1.\cr
795
+ \end{aligned}
790
796
$$ (eq662)
791
797
792
798
Define $2 \mu_0$ to be the vector of shadow prices of $x_0$ and apply an envelope condition to
@@ -802,12 +808,12 @@ Proceeding as we did above with the undiscounted system {eq}`eq2`, we can rear
802
808
system
803
809
804
810
$$
805
- \left[ \matrix{ I & \beta B Q^{-1} B' \cr
806
- 0 & \beta A' }\right]
807
- \left[ \matrix{ x_ {t+1} \cr \mu_ {t+1} }\right] =
808
- \left[ \matrix{ A & 0 \cr
809
- - R & I }\right]
810
- \left[ \matrix{ x_t \cr \mu_t }\right]
811
+ \left[ \begin{matrix} I & \beta B Q^{-1} B' \cr
812
+ 0 & \beta A' \end{matrix }\right]
813
+ \left[ \begin{matrix} x_ {t+1} \cr \mu_ {t+1} \end{matrix }\right] =
814
+ \left[ \begin{matrix} A & 0 \cr
815
+ - R & I \end{matrix }\right]
816
+ \left[ \begin{matrix} x_t \cr \mu_t \end{matrix }\right]
811
817
$$ (eq663)
812
818
813
819
which in the special case that $\beta = 1$ agrees with equation {eq}`eq2`, as expected.
@@ -889,8 +895,4 @@ $$ (eq667)
889
895
890
896
where we must require that $F$ obeys equation {eq}`eqn:optimalFformula`.
891
897
892
- Equations {eq}`eq666` and {eq}`eq667` provide different perspectives on the optimal value function.
893
-
894
- ```{code-cell} ipython3
895
-
896
- ```
898
+ Equations {eq}`eq666` and {eq}`eq667` provide different perspectives on the optimal value function.
0 commit comments