Linear-Quadratic-Gaussian (LQG) Design

Linear-quadratic-Gaussian (LQG) control is a modern state-space technique for designing optimal dynamic regulators and servo controllers with integral action (also known as setpoint trackers). This technique allows you to trade off regulation/tracker performance and control effort, and to take into account process disturbances and measurement noise.

To design LQG regulators and setpoint trackers, you perform the following steps:

  1. Construct the LQ-optimal gain.

  2. Construct a Kalman filter (state estimator).

  3. Form the LQG design by connecting the LQ-optimal gain and the Kalman filter.

For more information about using LQG design to create LQG regulators , see Linear-Quadratic-Gaussian (LQG) Design for Regulation.

For more information about using LQG design to create LQG servo controllers, see Linear-Quadratic-Gaussian (LQG) Design of Servo Controller with Integral Action.

These topics focus on the continuous-time case. For information about discrete-time LQG design, see the dlqr and kalman reference pages.

Linear-Quadratic-Gaussian (LQG) Design for Regulation

You can design an LQG regulator to regulate the output y around zero in the following model.

The plant in this model experiences disturbances (process noise) w and is driven by controls u. The regulator relies on the noisy measurements y to generate these controls. The plant state and measurement equations take the form of

x˙=Ax+Bu+Gwy=Cx+Du+Hw+v

and both w and v are modeled as white noise.

Note

LQG design requires a state-space model of the plant. You can use ss to convert other model formats to state space.

To design LQG regulators, you can use the design techniques shown in the following table.

To design an LQG regulator using...Use the following commands:

A quick, one-step design technique when the following is true:

  • You need the optimal LQG controller and either E(wv') or H is nonzero.

  • All known (deterministic) inputs are control inputs and all outputs are measured.

  • Integrator states are weighted independently of states of plants and control inputs.

lqg

A more flexible, three-step design technique that allows you to specify:

  • Arbitrary G and H.

  • Known (deterministic) inputs that are not controls and/or outputs that are not measured.

  • A flexible weighting scheme for integrator states, plant states, and controls.

lqr, kalman, and lqgreg

For more information, see

Constructing the Optimal State-Feedback Gain for Regulation

You construct the LQ-optimal gain from the following elements:

  • State-space system matrices

  • Weighting matrices Q, R, and N, which define the tradeoff between regulation performance (how fast x(t) goes to zero) and control effort.

To construct the optimal gain, type the following command:

K= lqr(A,B,Q,R,N)

This command computes the optimal gain matrix K, for which the state feedback law u=Kx minimizes the following quadratic cost function for continuous time:

J(u)=0{xTQx+2xTNu+uTRu}dt

The software computes the gain matrix K by solving an algebraic Riccati equation.

For information about constructing LQ-optimal gain, including the cost function that the software minimizes for discrete time, see the lqr reference page.

Constructing the Kalman State Estimator

You need a Kalman state estimator for LQG regulation and servo control because you cannot implement optimal LQ-optimal state feedback without full state measurement.

You construct the state estimate x^ such that u=Kx^ remains optimal for the output-feedback problem. You construct the Kalman state estimator gain from the following elements:

  • State-space plant model sys

  • Noise covariance data, Qn, Rn, and Nn

    The following figure shows the required dimensions for Qn, Rn, and Nn. If Nn is 0, you can omit it.

    Required Dimensions for Qn, Rn, and Nn

Note

You construct the Kalman state estimator in the same way for both regulation and servo control.

To construct the Kalman state estimator, type the following command:

[kest,L,P] = kalman(sys,Qn,Rn,Nn);

This command computes a Kalman state estimator, kest with the following plant equations:

x˙=Ax+Bu+Gwy=Cx+Du+Hw+v

where w and v are modeled as white noise. L is the Kalman gain and P the covariance matrix.

The software generates this state estimate using the Kalman filter

ddtx^=Ax^+Bu+L(yCx^Du)

with inputs u (controls) and y (measurements). The noise covariance data

E(wwT)=Qn,E(vvT)=Rn,E(wvT)=Nn

determines the Kalman gain L through an algebraic Riccati equation.

The Kalman filter is an optimal estimator when dealing with Gaussian white noise. Specifically, it minimizes the asymptotic covariance
    limtE((xx^)(xx^)T)

of the estimation error xx^.

For more information, see the kalman reference page. For a complete example of a Kalman filter implementation, see Kalman Filtering.

Forming the LQG Regulator

To form the LQG regulator, connect the Kalman filter kest and LQ-optimal gain K by typing the following command:

regulator = lqgreg(kest, K);
This command forms the LQG regulator shown in the following figure.

The regulator has the following state-space equations:

ddtx^=[ALC(BLD)K]x^+Lyu=Kx^

For more information on forming LQG regulators, see lqgreg and LQG Regulation: Rolling Mill Case Study.

Linear-Quadratic-Gaussian (LQG) Design of Servo Controller with Integral Action

You can design a servo controller with integral action for the following model:

The servo controller you design ensures that the output y tracks the reference command r while rejecting process disturbances w and measurement noise v.

The plant in the previous figure is subject to disturbances w and is driven by controls u. The servo controller relies on the noisy measurements y to generate these controls. The plant state and measurement equations are of the form

x˙=Ax+Bu+Gwy=Cx+Du+Hw+v

and both w and v are modeled as white noise.

Note

LQG design requires a state-space model of the plant. You can use ss to convert other model formats to state space.

To design LQG servo controllers, you can use the design techniques shown in the following table.

To design an LQG servo controller using...Use the following commands:

A quick, one-step design technique when the following is true:

  • You need the optimal LQG controller and either E(wv') or H is nonzero.

  • All known (deterministic) inputs are control inputs and all outputs are measured.

  • Integrator states are weighted independently of states of plants and control inputs.

lqg

A more flexible, three-step design technique that allows you to specify:

  • Arbitrary G and H.

  • Known (deterministic) inputs that are not controls and/or outputs that are not measured.

  • A flexible weighting scheme for integrator states, plant states, and controls.

lqi, kalman, and lqgtrack

For more information, see

Constructing the Optimal State-Feedback Gain for Servo Control

You construct the LQ-optimal gain from the

  • State-space plant model sys

  • Weighting matrices Q, R, and N, which define the tradeoff between tracker performance and control effort

To construct the optimal gain, type the following command:

K= lqi(sys,Q,R,N)

This command computes the optimal gain matrix K, for which the state feedback law u=Kz=K[x;xi] minimizes the following quadratic cost function for continuous time:

J(u)=0{zTQz+uTRu+2zTNu}dt

The software computes the gain matrix K by solving an algebraic Riccati equation.

For information about constructing LQ-optimal gain, including the cost function that the software minimizes for discrete time, see the lqi reference page.

Constructing the Kalman State Estimator

You need a Kalman state estimator for LQG regulation and servo control because you cannot implement LQ-optimal state feedback without full state measurement.

You construct the state estimate x^ such that u=Kx^ remains optimal for the output-feedback problem. You construct the Kalman state estimator gain from the following elements:

  • State-space plant model sys

  • Noise covariance data, Qn, Rn, and Nn

    The following figure shows the required dimensions for Qn, Rn, and Nn. If Nn is 0, you can omit it.

    Required Dimensions for Qn, Rn, and Nn

Note

You construct the Kalman state estimator in the same way for both regulation and servo control.

To construct the Kalman state estimator, type the following command:

[kest,L,P] = kalman(sys,Qn,Rn,Nn);

This command computes a Kalman state estimator, kest with the following plant equations:

x˙=Ax+Bu+Gwy=Cx+Du+Hw+v

where w and v are modeled as white noise. L is the Kalman gain and P the covariance matrix.

The software generates this state estimate using the Kalman filter

ddtx^=Ax^+Bu+L(yCx^Du)

with inputs u (controls) and y (measurements). The noise covariance data

E(wwT)=Qn,E(vvT)=Rn,E(wvT)=Nn

determines the Kalman gain L through an algebraic Riccati equation.

The Kalman filter is an optimal estimator when dealing with Gaussian white noise. Specifically, it minimizes the asymptotic covariance
    limtE((xx^)(xx^)T)

of the estimation error xx^.

For more information, see the kalman reference page. For a complete example of a Kalman filter implementation, see Kalman Filtering.

Forming the LQG Servo Control

To form a two-degree-of-freedom LQG servo controller, connect the Kalman filter kest and LQ-optimal gain K by typing the following command:

servocontroller = lqgtrack(kest, K);
This command forms the LQG servo controller shown in the following figure.

The servo controller has the following state-space equations:

[x^˙x˙i]=[ABKxLC+LDKxBKi+LDKi00][x^xi]+[0LII][ry]u=[KxKi][x^xi]

For more information on forming LQG servo controllers, including how to form a one-degree-of-freedom LQG servo controller, see the lqgtrack reference page.

See Also

| | | | |

Related Topics