LQRegulatorGains

LQRegulatorGains[ssm, {q, r}]
gives the optimal state feedback gain matrix for the StateSpaceModel ssm and the quadratic cost function, with state and control weighting matrices q and r.

LQRegulatorGains[ssm, {q, r, p}]
includes the state-control cross-coupling matrix p in the cost function.

LQRegulatorGains[{ssm, finputs}, {...}]
specifies finputs as the feedback inputs of ssm.

Details and OptionsDetails and Options

  • The standard state-space model ssm can be given as StateSpaceModel[{a, b, ...}], where a and b represent the state and input matrices in either a continuous-time or a discrete-time system:
  • continuous-time system
    discrete-time system
  • The descriptor state-space model ssm can be given as StateSpaceModel[{a, b, c, d, e}] in either continuous time or discrete time:
  • continuous-time system
    discrete-time system
  • The argument finputs is a list of integers specifying the positions of the feedback inputs in .
  • LQRegulatorGains[ssm, {...}] is equivalent to LQRegulatorGains[{ssm, All}, {...}].
  • The cost function is:
  • continuous-time system
    discrete-time system
  • In LQRegulatorGains[ssm, {q, r}], the cross-coupling matrix p is assumed to be zero.
  • The optimal control is given by , where is the computed feedback gain matrix.
  • For continuous-time systems, the optimal feedback gain is computed as kappa=TemplateBox[{r}, Inverse].(b_f.x_r+p), where is the solution of the continuous Riccati equation a.x_r+x_r.a-(x_r.b_f+p).TemplateBox[{r}, Inverse].(b_f.x_r+p)+q=0, and is the submatrix of associated with the feedback inputs .
  • For discrete-time systems, the optimal feedback gain is computed as kappa=TemplateBox[{{(, {{{{b, _, f}, }, ., {x, _, r}, ., {b, _, f}}, +, r}, )}}, Inverse].(b_f.x_r.a+p), where is the solution of the discrete Riccati equation a.x_r.a-x_r-(a.x_r.b_f+p)TemplateBox[{{., {(, {{{{b, _, f}, }, ., {x, _, r}, ., {b, _, f}}, +, r}, )}}}, Inverse].(b_f.x_r.a+p)+q=0.
  • The optimal control is unique and stabilizing if is stabilizable, is detectable, , and .

ExamplesExamplesopen allclose all

Basic Examples (5)Basic Examples (5)

Compute the optimum feedback gain matrix for a continuous-time system:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Calculate the optimal control gains for an unstable system:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input

Compare the open- and closed-loop poles:

In[3]:=
Click for copyable input
Out[3]=

Compute the optimal state-feedback gain matrix for a discrete-time system:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Calculate the feedback gains for controlling a two-input system using the first input:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

A set of feedback gains for a stabilizable but uncontrollable system:

In[1]:=
Click for copyable input
Out[1]=
New in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »