Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.
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

Open

Description

@jms202

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

Activity

  1. shlff commented on Dec 17, 2020

    @shlff
    Member

    Thanks @jms202 and @jstac .

    Hi @jms202 , this is correct. Please look at section solution in lecture lq_control.

    You are half right in that

    • Rf2 is supposed to be the terminal condition (not the terminal value function), that is, $x'Rf2x=J_T(x)$.

    But please note that both in the lecture and exercise 2, we are discussing a finite-horizon case, where

    • every value function $J_t$ has the form $J_t (x) = x'P_t x + d_t$,
    • for the terminal condition, we have $P_T:=R_f$ and $d_T=0$.

    Therefore, we have Rf2 = lq_retired.P.

    Please feel free to let me know if you have any question.

  2. jms202 commented on Dec 18, 2020

    @jms202
    Author
  3. shlff commented on Dec 18, 2020

    @shlff
    Member

    Hi @jms202 ,

    Thanks for your appreciation.

    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.

    Best,
    Shu

  4. jms202 commented on Dec 21, 2020

    @jms202
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions