# 线性二次调节器

**线性二次调节器**（linear–quadratic regulator，LQR）是一种最优反馈控制器，适用于性能指标关于状态与控制输入均为二次型的线性系统；它计算出一条状态反馈律，在惩罚控制代价的同时将状态驱向零。<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup> 这一名称可以逐字拆解：动力学是*线性的*，代价是*二次型的*，而控制器是一个*调节器*，对偏离零状态与零控制量的程度施加惩罚。<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup> 麻省理工学院（MIT）的欠驱动控制课程讲义称其很可能是最优控制理论中最重要的、最具影响力的成果。<sup>[2](https://underactuated.mit.edu/lqr.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 问题类别 | 线性动力学 \( \dot{x} = Ax + Bu \)（或离散时间 \( x_{t+1} = Ax_t + Bu_t \)），代价关于状态与输入为二次型；控制无约束<sup>[3](https://liberzon.csl.illinois.edu/teaching/cvoc/node107.html)</sup> |
| 最优律 | 线性状态反馈 \( u^* = -Kx \)，连续时间下 \( K = R^{-1}B^TP \)<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup> |
| 有限时域 | 由动态Riccati方程求解，从终端条件 \( P_T = Q_T \) 出发沿时间反向迭代；增益 \( K_t \) 随时间变化<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup> |
| 无限时域 | \( P \) 收敛为常数，满足代数Riccati方程：离散时间为DARE，连续时间为CARE<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup> |
| 稳定性保证 | 值函数 \( V(x,t) = x^TP_tx \) 是闭环系统的有效Lyapunov函数，因此在基本假设下LQR保证收敛到原点的稳定性<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup> |
| 存在条件 | 对 (A, B) 必须可镇定，且 R 必须正定<sup>[4](https://www.mathworks.com/help/control/ref/lti.lqr.html)</sup> |
| 历史地位 | 20世纪60年代初与Kalman滤波器同期发展；二者结合即为线性二次高斯（LQG）方法<sup>[5](https://ntrs.nasa.gov/api/citations/20000097938/downloads/20000097938.pdf)</sup> |

## 问题表述

在有限时域连续时间形式下，系统是线性时变的，\( \dot{x} = A(t)x + B(t)u \)，其中 \( x \in \mathbb{R}^n \)，\( u \in \mathbb{R}^m \) 无约束，目标是固定的终端时间与自由端点，代价为

\[ J(u) = \int_{t_0}^{t_1} \left( x^T Q(t) x + u^T R(t) u \right) dt + x^T(t_1) M x(t_1), \]

其中 Q 对称半正定，R 对称正定。<sup>[3](https://liberzon.csl.illinois.edu/teaching/cvoc/node107.html)</sup> 矩阵 Q 对状态偏差加权，R 对控制代价加权，设计者由此在调节速度与执行器使用之间权衡；MATLAB 的文档称 Q、R 以及可选的交叉项 N 正是在定义这一权衡。<sup>[4](https://www.mathworks.com/help/control/ref/lti.lqr.html)</sup><sup> • </sup><sup>[6](https://www.mathworks.com/help/control/getstart/linear-quadratic-gaussian-lqg-design.html)</sup>

## 通过Riccati方程求解

**动态规划。** 在离散时间下，结合LQR假设的Bellman方程给出的值函数关于状态是二次型的，\( V(x,t) = x^T P_t x \)。对所得表达式（关于 \( u \) 为二次型）取极小，得到递推

\[ P_{t-1} = Q + A^T P_t A - A^T P_t B (B^T P_t B + R)^{-1} B^T P_t A, \quad P_T = Q_T, \]

增益为 \( K_t = (B^T P_{t+1} B + R)^{-1} B^T P_{t+1} A \)，控制为 \( u_t^* = -K_t x_t \)。这一更新即动态Riccati方程；所有 \( P_t \) 与增益 \( K_t \) 都可以从时域终端反向迭代离线算出，因此在线步骤只需查表与一次乘法。<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup>

**连续时间。** 同样的结构可由Hamilton–Jacobi–Bellman方程推出，该方程归结为Riccati微分方程

\[ -\dot{P}(t) = Q + A^T P(t) + P(t)A - P(t)BR^{-1}B^T P(t), \quad P(T) = Q_T, \]

其中 \( K(t) = R^{-1}B^T P(t) \)。<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup> 即使 A、B、Q、R 均时不变，有限时域的增益 \( K_t \) 仍随时间变化。<sup>[7](https://solmaz.eng.uci.edu/Teaching/MAE274/Lecture7.pdf)</sup>

**无限时域。** 随着时域增长，\( P_t \) 收敛为常数 \( P_\infty \)。令 \( \dot{P} = 0 \) 即得代数Riccati方程：离散时间代数Riccati方程（DARE），

\[ P_\infty = Q + A^T P_\infty A - A^T P_\infty B (B^T P_\infty B + R)^{-1} B^T P_\infty A, \]

以及连续时间代数Riccati方程（CARE），

\[ 0 = Q + A^T P_\infty + P_\infty A - P_\infty B R^{-1} B^T P_\infty. \]

两者都有成熟的数值解法，控制软件包中也内置了相应函数。<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup> 无限时域的结果是常增益反馈律，这正是它对时不变系统更易于实现的原因。<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup>

## 稳定性与Lyapunov联系

Riccati方程形似带有额外项的Lyapunov方程。对于闭环动力学 \( x_{t+1} = (A - BK_t)x_t \)，值函数 \( V(x,t) = x^T P_t x \) 是有效的Lyapunov函数，这意味着LQR为线性动力学提供了一种构造性方法来寻找控制Lyapunov函数，并在满足基本假设时保证收敛到原点的稳定性。<sup>[1](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)</sup>

无限时域解还可作为镇定非线性系统轨迹的工具：一条终止于可镇定不动点的有限时间轨迹，可以用无限时域解初始化有限时域Riccati方程，即 \( S(t_2) = S_\infty \)，再反向求解，从而加以镇定。<sup>[2](https://underactuated.mit.edu/lqr.html)</sup>

## 扩展

**跟踪。** 标准表述将状态驱向零，但线性二次跟踪版本惩罚的是对参考轨迹 \( x_d(t), u_d(t) \) 的偏差。此时值函数在二次项之外还包含线性项与常数项，并从与 \( Q_f \) 相关的终端条件反向积分。<sup>[2](https://underactuated.mit.edu/lqr.html)</sup>

**严格终端条件。** 硬终端约束可以通过让终端权重 \( Q_f \) 趋于无穷来施加；从无穷条件反向积分Riccati方程并不现实，因此改为求解 \( P(t) = S(t)^{-1} \)，终端条件为 \( P(t_f) = 0 \)。当 \( Q = 0 \) 时，这一逆方程变为线性常微分方程，该关系可用于推导可控性格拉姆矩阵。<sup>[8](https://underactuated.csail.mit.edu/lqr.html)</sup>

**LQG。** LQR假设全状态可测。当状态不可全测时，LQR与Kalman滤波器配对使用，二者组合即为线性二次高斯（LQG）控制器；分离原理允许这两项设计独立进行。<sup>[5](https://ntrs.nasa.gov/api/citations/20000097938/downloads/20000097938.pdf)</sup><sup> • </sup><sup>[9](https://ocw.mit.edu/courses/2-154-maneuvering-and-control-of-surface-and-underwater-vehicles-13-49-fall-2004/2609f8b1bdebe4566891080afe007f51_1349_notes.pdf)</sup> 这种配对有一个已知局限：尽管LQR与Kalman滤波器各自都具备良好的鲁棒性，但对某些被控对象而言，LQR与Kalman滤波器组合而成的LQG补偿器不具备任何鲁棒性保证。<sup>[9](https://ocw.mit.edu/courses/2-154-maneuvering-and-control-of-surface-and-underwater-vehicles-13-49-fall-2004/2609f8b1bdebe4566891080afe007f51_1349_notes.pdf)</sup>

## 实际设计与软件

控制软件包直接实现LQR。MATLAB 的 `lqr` 函数针对连续时间或离散时间状态空间模型返回最优增益矩阵 K、Riccati解 S 以及闭环极点 \( P = \mathrm{eig}(A - BK) \)，离散时间对象则使用 `dlqr`。<sup>[4](https://www.mathworks.com/help/control/ref/lti.lqr.html)</sup> 输入数据必须满足存在条件：(A, B) 必须可镇定，R 必须正定，由 Q、N、R 构成的块矩阵必须半正定，且虚轴上（离散时间为单位圆上）不存在不可观测模态。<sup>[4](https://www.mathworks.com/help/control/ref/lti.lqr.html)</sup>

选取 Q 与 R 的一个常见起点是Bryson规则，它用每个状态与输入的最大可接受值进行归一化；MATLAB 的[倒立摆](https://www.edgepedia.org/zh/inverted-pendulum)示例在调用 `lqr` 之前用它来设定 Q 与 R，并指出结果通常只是迭代调参过程的起点。<sup>[4](https://www.mathworks.com/help/control/ref/lti.lqr.html)</sup>

## 应用

凡需对线性化对象进行调节之处，都有LQR的用武之地。美国航空航天局（NASA）一项关于[国际空间站](https://www.edgepedia.org/zh/international-space-station)的研究采用无限时域LQR技术，最小化一个标量二次型性能指标，为对地指向的航天器姿态获得线性控制律，包括力矩平衡姿态以及相对于局部垂直局部水平坐标系的姿态保持，并有使用飞轮、控制力矩陀螺与推力器的变体。<sup>[10](https://ntrs.nasa.gov/api/citations/20030038806/downloads/20030038806.pdf)</sup> 小车上的倒立摆是标准的教学示例。<sup>[4](https://www.mathworks.com/help/control/ref/lti.lqr.html)</sup>

## References

1. [Linear Quadratic Regulator, Linear Multivariable Control lecture notes (University of Washington)](https://uw-ctrl.github.io/lmc-book/lectures/lqr.html)
2. [Ch. 8, Linear Quadratic Regulators, Underactuated Robotics (MIT, Russ Tedrake)](https://underactuated.mit.edu/lqr.html)
3. [6.1 Finite-horizon LQR problem, Daniel Liberzon, Calculus of Variations and Optimal Control Theory](https://liberzon.csl.illinois.edu/teaching/cvoc/node107.html)
4. [lqr, Linear-Quadratic Regulator (LQR) design, MATLAB documentation](https://www.mathworks.com/help/control/ref/lti.lqr.html)
5. [NASA Technical Report on LQG controller design history](https://ntrs.nasa.gov/api/citations/20000097938/downloads/20000097938.pdf)
6. [Linear-Quadratic-Gaussian (LQG) Design, MATLAB documentation](https://www.mathworks.com/help/control/getstart/linear-quadratic-gaussian-lqg-design.html)
7. [Optimal Control Lecture 7, MAE274 (UC Irvine)](https://solmaz.eng.uci.edu/Teaching/MAE274/Lecture7.pdf)
8. [Ch. 8, Linear Quadratic Regulators, Underactuated Robotics (MIT CSAIL mirror)](https://underactuated.csail.mit.edu/lqr.html)
9. [Loop Transfer Recovery notes, MIT OCW 2.154 Maneuvering and Control of Surface and Underwater Vehicles](https://ocw.mit.edu/courses/2-154-maneuvering-and-control-of-surface-and-underwater-vehicles-13-49-fall-2004/2609f8b1bdebe4566891080afe007f51_1349_notes.pdf)
10. [NASA Technical Report on LQR attitude control and momentum management for the ISS](https://ntrs.nasa.gov/api/citations/20030038806/downloads/20030038806.pdf)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 工程与制造 › 工程方法与系统工程

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/linear-quadratic-regulator

English original: https://www.edgepedia.org/linear-quadratic-regulator
