Linear quadratic regulator

  • System define:

  • Quadratic cost functional: , where is nonnegative definite matrix, is a positive definite matrix. is the penalty if the current state is not the desire state. is the penalty of “energy: consuming. 例:如果是向量,则设计为对角矩阵,对角线上的每个元素对应一个state的penalty weight,展开后为标准型的二次多项式(只含平方项)。和正定/半正定确保cost function不为负 Find the to minimize the quadratic cost function above (solving by solving Riccati equation). 最终为使最小,状态调节到0(最小),而不是error为0。

    • 其它变体
      • Or discrete-time , subject to
      • ,所以应如何选取?物理意义是什么(应该是未化为标准型时的的系数,但是这些系数怎么来的,如果有怎么消除将其化为标准型)?
      • , (state cost), (final state/terminal cost), , input cost. 应该和最上面的那个公式等价
  • 求解/优化

    • Matlab (Riccati equation and HJB, solve S from the equation) Then for , is given by ‘

    • 推导参考(stanford) 和(知乎待整理),若有项 对,用Dynamic programming求解。 对,定义value function: 将其分为两部分,第一部分,为下一状态/时刻到target时所需的cost,可写成。第二部分为从当前状态到下一状态的cost 可看作,value为,reward为的Bellman equation

      推导过程
      1. 假设 成为映射(将状态映射为数值),系统模型为,记此时的 为二次型,可写作,半正定 令,取

      2. 对于第一部分,即 忽略项(泰勒展开) 忽略项(泰勒展开)

      3. 对于第二部分

      4. 将两部分合并,可得

        若上式最小,则导数在处为0(只有可以主动影响系统) 为实对称阵时(实对称二次型求导)

        消去,且有 得

      5. 整理 由上可得Feedback为,,带回原式 得 1. 2. 3. 化简为

      (final state)

      Then solve this Riccati equation to get ,从而可以获得

  • Algebraic Riccati equation ?? 知乎? ??

  • Relationship with value iteration ucb stanford ucb

  • 优化器qpOASES