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
{{ message }}
This repository was archived by the owner on Jul 16, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 16, 2026. It is now read-only.
Issue with solution to Ex 2 in LQ Control: Foundations lecture #280
In the lecture LQ Control: Foundations, the solution to Exercise 2 includes the following line:
Rf2 = lq_retired.P
Is this correct? Isn't Rf2 supposed to be the terminal value function not the P matrix? The documentation for the `LQ' constructor says:
| Rf : array_like(float), optional(default=None)
| Rf is the final (in a finite horizon model) payoff(or cost)
| matrix that corresponds with the control variable u and is n x
| n. Should be symetric and non-negative definite
Hi there,
Thanks for your reply. This is helpful.
The one remaining thing I don't understand is why $d_K=0$ given the
recursion $d_{t-1} = \beta * (d_t + trace(C' P_t C))$ anc C does not equal
the zero vector. Or can we just ignore it because it doesn't depend on x?
Thanks,
Jonathan
Before answering your question, please allow me to clarify your statement:
I think what your statement refers to is equation (13) in lecture lqcontrol,
i.e., $d_{t-1} = \beta * (d_t + trace(C' P_t C))$ with $d_T=0$ (instead of $d_K=0$)
Let me assume this first. Please note that
we derive equation (13) from equation (11) backward,
we get $d_T=0$ directly from equation (11), while assuming $d_{t-1} = \beta * (d_t + trace(C' P_t C))$,
so it doesn't matter whether $C$ equal or not equal zero vector here.
What's more, when you study an economic model, it is helpful to distinguish between exogenous and endogenous variables. For example, in the LQ control system of this lecture,
matrices $A, B, C, \cdots$ are exogenously given or assumed,
variables $x_{t}, a_t,\cdots$ are endogenously determined by this system.
Once you figured out these, you will have a better understanding of this and other lectures.
Please feel free to let me know if you have any question.
Hi Shu,
Many thanks for this.
Exercise 2 is complicated because it has to be implemented as two chained
LQ problems.
T = end of life
K = end of working life (i.e. start of retirement)
When I wrote $d_{K}$, I did mean $d_{K}$ not $d_{T}$. i,e, my question is
about the terminal condition to feed into lq_working.
Because K < T, we should have that $d_{K}$ is not equal to zero.
This is why I am concerned that $d_{K}$ from lq_retired is not used at all
for lq_working.
My only suggestion is that $d_{K}$ doesn't depend on u or x so it is a
constant that can be ignored.
Am I still missing something?
Thanks,
Jonathan
Activity
shlff commentedon Dec 17, 2020
Thanks @jms202 and @jstac .
Hi @jms202 , this is correct. Please look at section solution in lecture lq_control.
You are half right in that
Rf2is supposed to be the terminal condition (not the terminal value function), that is,But please note that both in the lecture and exercise 2, we are discussing a finite-horizon case, where
Therefore, we have
Rf2 = lq_retired.P.Please feel free to let me know if you have any question.
jms202 commentedon Dec 18, 2020
shlff commentedon Dec 18, 2020
Hi @jms202 ,
Thanks for your appreciation.
Before answering your question, please allow me to clarify your statement:
Let me assume this first. Please note that
What's more, when you study an economic model, it is helpful to distinguish between exogenous and endogenous variables. For example, in the LQ control system of this lecture,
Once you figured out these, you will have a better understanding of this and other lectures.
Please feel free to let me know if you have any question.
Best,
Shu
jms202 commentedon Dec 21, 2020