Linear–quadratic regulator explained

The theory of optimal control is concerned with operating a dynamic system at minimum cost. The case where the system dynamics are described by a set of linear differential equations and the cost is described by a quadratic function is called the LQ problem. One of the main results in the theory is that the solution is provided by the linear–quadratic regulator (LQR), a feedback controller whose equations are given below.

LQR controllers possess inherent robustness with guaranteed gain and phase margin,[1] and they also are part of the solution to the LQG (linear–quadratic–Gaussian) problem. Like the LQR problem itself, the LQG problem is one of the most fundamental problems in control theory.[2]

General description

The settings of a (regulating) controller governing either a machine or process (like an airplane or chemical reactor) are found by using a mathematical algorithm that minimizes a cost function with weighting factors supplied by a human (engineer). The cost function is often defined as a sum of the deviations of key measurements, like altitude or process temperature, from their desired values. The algorithm thus finds those controller settings that minimize undesired deviations. The magnitude of the control action itself may also be included in the cost function.

The LQR algorithm reduces the amount of work done by the control systems engineer to optimize the controller. However, the engineer still needs to specify the cost function parameters, and compare the results with the specified design goals. Often this means that controller construction will be an iterative process in which the engineer judges the "optimal" controllers produced through simulation and then adjusts the parameters to produce a controller more consistent with design goals.

The LQR algorithm is essentially an automated way of finding an appropriate state-feedback controller. As such, it is not uncommon for control engineers to prefer alternative methods, like full state feedback, also known as pole placement, in which there is a clearer relationship between controller parameters and controller behavior. Difficulty in finding the right weighting factors limits the application of the LQR based controller synthesis.

Versions

Finite-horizon, continuous-time

For a continuous-time linear system, defined on

t\in[t0,t1]

, described by:
x

=Ax+Bu

where

x\inRn

(that is,

x

is an

n

-dimensional real-valued vector) is the state of the system and

u\inRm

is the control input. Given a quadratic cost function for the system, defined as:

J=

T(t
x
1)F(t

1)x(t1)+

t1
\int\limits
t0

\left(xTQx+uTRu+2xTNu\right)dt

the feedback control law that minimizes the value of the cost is:

u=-Kx

where

K

is given by:

K=R-1(BTP(t)+NT)

and

P

is found by solving the continuous time Riccati differential equation:

ATP(t)+P(t)A-(P(t)B+N)R-1(BTP(t)+NT)+Q=-

P

(t)

with the boundary condition:

P(t1)=F(t1).

The first order conditions for Jmin are:

1) State equation

x

=Ax+Bu

2) Co-state equation

-λ

=Qx+Nu+ATλ

3) Stationary equation

0=Ru+NTx+BTλ

4) Boundary conditions

x(t0)=x0

and

λ(t1)=F(t1)x(t1)

Infinite-horizon, continuous-time

For a continuous-time linear system described by:

x

=Ax+Bu

with a cost function defined as:

J=

infty
\int
0

\left(xTQx+uTRu+2xTNu\right)dt

the feedback control law that minimizes the value of the cost is:

u=-Kx

where

K

is given by:

K=R-1(BTP+NT)

and

P

is found by solving the continuous time algebraic Riccati equation:

ATP+PA-(PB+N)R-1(BTP+NT)+Q=0

This can be also written as:

lATP+PlA-PBR-1BTP+lQ=0

with

lA=A-BR-1NT    lQ=Q-NR-1NT

Finite-horizon, discrete-time

For a discrete-time linear system described by:[3]

xk+1=Axk+Buk

with a performance index defined as:

J=

T
x
Hp
Q
Hp
x
Hp

+

Hp-1
\sum\limits
k=0

\left(

T
x
k

Qxk+

T
u
k

Ruk+2

T
x
k

Nuk\right)

, where

Hp

is the time horizon

the optimal control sequence minimizing the performance index is given by:

uk=-Fkxk

where:

Fk=(R+BTPk+1B)-1(BTPk+1A+NT)

and

Pk

is found iteratively backwards in time by the dynamic Riccati equation:

Pk-1=ATPkA-(ATPkB+N)\left(R+BTPkB\right)-1(BTPkA+NT)+Q

from terminal condition

P
Hp

=

Q
Hp
.[4] Note that
u
Hp
is not defined, since

x

is driven to its final state
x
Hp
by

A

x
Hp-1

+B

u
Hp-1
.

Infinite-horizon, discrete-time

For a discrete-time linear system described by:

xk+1=Axk+Buk

with a performance index defined as:

J=

infty
\sum\limits
k=0

\left(

T
x
k

Qxk+

T
u
k

Ruk+2

T
x
k

Nuk\right)

the optimal control sequence minimizing the performance index is given by:

uk=-Fxk

where:

F=(R+BTPB)-1(BTPA+NT)

and

P

is the unique positive definite solution to the discrete time algebraic Riccati equation (DARE):

P=ATPA-(ATPB+N)\left(R+BTPB\right)-1(BTPA+NT)+Q

.

This can be also written as:

P=lATPlA-lATPB\left(R+BTPB\right)-1BTPlA+lQ

with:

lA=A-BR-1NT    lQ=Q-NR-1NT

.

Note that one way to solve the algebraic Riccati equation is by iterating the dynamic Riccati equation of the finite-horizon case until it converges.

Constraints

In practice, not all values of

xk,uk

may be allowed. One common constraint is the linear one:

Cx+Du\leqe.

The finite horizon version of this is a convex optimization problem, and so the problem is often solved repeatedly with a receding horizon. This is a form of model predictive control.[5] [6]

Related controllers

Quadratic-quadratic regulator

If the state equation is quadratic then the problem is known as the quadratic-quadratic regulator (QQR). The Al'Brekht algorithm can be applied to reduce this problem to one that can be solved efficiently using tensor based linear solvers.[7]

Polynomial-quadratic regulator

If the state equation is polynomial then the problem is known as the polynomial-quadratic regulator (PQR). Again, the Al'Brekht algorithm can be applied to reduce this problem to a large linear one which can be solved with a generalization of the Bartels-Stewart algorithm; this is feasible provided that the degree of the polynomial is not too high.[8]

Model-predictive control

See main article: articles. Model predictive control and linear-quadratic regulators are two types of optimal control methods that have distinct approaches for setting the optimization costs. In particular, when the LQR is run repeatedly with a receding horizon, it becomes a form of model predictive control (MPC). In general, however, MPC does not rely on any assumptions regarding linearity of the system.

References

  1. Lehtomaki . N. . Sandell . N. . Athans . M. . 1981 . Robustness results in linear-quadratic Gaussian based multivariable control designs . IEEE Transactions on Automatic Control . en . 26 . 1 . 75–93 . 10.1109/TAC.1981.1102565 . 0018-9286.
  2. Doyle . John C.. 1978 . Guaranteed Margins for LQG Regulators . IEEE Transactions on Automatic Control . en . 23 . 4 . 756–757 . 10.1109/TAC.1978.1101812 . 0018-9286.
  3. Book: Chow, Gregory C. . Analysis and Control of Dynamic Economic Systems . Krieger Publ. Co. . 1986 . 0-89874-969-7.
  4. Shaiju, AJ . Petersen, Ian R. . Formulas for discrete time LQR, LQG, LEQG and minimax LQG optimal control problems . IFAC Proceedings Volumes . 2008 . 8773–8778 . Elsevier. 41 . 2. 10.3182/20080706-5-KR-1001.01483 .
  5. Web site: Ch. 8 - Linear Quadratic Regulators . underactuated.mit.edu . 20 August 2022.
  6. Constrained Linear Quadratic Regulation . IEEE Transactions on Automatic Control . 43 . 8 . August 1998 . 1163–1169 . 1793/10888 . 20 August 2022 . Pierre O. M. . Scokaert . James B. . Rawlings . 10.1109/9.704994.
  7. Book: Borggaard . Jeff . Zietsman . Lizette . 2020 American Control Conference (ACC) . The Quadratic-Quadratic Regulator Problem: Approximating feedback controls for quadratic-in-state nonlinear systems . 20 August 2022 . 818–823 . 10.23919/ACC45564.2020.9147286 . July 2020. 1910.03396 . 978-1-5386-8266-1 . 203904925 .
  8. Borggaard . Jeff . Zietsman . Lizette . On Approximating Polynomial-Quadratic Regulator Problems . IFAC-PapersOnLine . 329–334 . en . 10.1016/j.ifacol.2021.06.090 . 1 January 2021. 54 . 9 . 221856517 . free . 2009.11068 .

. Mathematical Control Theory: Deterministic Finite Dimensional Systems . Springer . 1998 . 0-387-98489-5 . 2nd . Eduardo D. Sontag.

External links