gives the optimal discrete-time state feedback gain matrix with sampling period τ for the continuous-time StateSpaceModel ssm and the quadratic cost function, with state and control weighting matrices q and r.


includes the state-control cross-coupling matrix p in the cost function.


specifies the feedback inputs of ssm.

Details 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 the continuous-time system .
  • The descriptor continuous-time state-space model ssm defined by can be given as StateSpaceModel[{a,b,c,d,e}].
  • The argument finputs is a list of integers specifying the positions of the feedback inputs in .
  • DiscreteLQRegulatorGains[ssm,{},τ] is equivalent to DiscreteLQRegulatorGains[{ssm,All},{},τ].
  • The cost function is given by .
  • In DiscreteLQRegulatorGains[ssm,{q,r},τ], the cross-coupling matrix is assumed to be zero.
  • DiscreteLQRegulatorGains computes the regulator gains based on the emulated system with cost function .
  • The matrix is the submatrix of associated with the feedback inputs .
  • The emulated closed-loop system with the computed feedback gain matrix k can be obtained from SystemsModelStateFeedbackConnect[ToDiscreteTimeModel[ssm,τ,Method->"ZeroOrderHold"],k]


open allclose all

Basic Examples  (1)

Compute a set of discrete-time regulator gains for a continuous-time system:

Scope  (3)

Compute a set of discrete LQ regulator gains for a continuous-time state-space model:

Only use the first input as the feedback input:

Compute the gains with state-control coupling in the cost function:

Use only inputs 1 and 3 for feedback:

Find the optimal gains for a descriptor state-space model:

Applications  (1)

Design an optimal controller by emulation:

The step response of the emulated system:

Properties & Relations  (1)

A continuous-time system:

Compute the weights for the emulated discrete-time system:

Compute the discrete LQ gains using the emulated system and corresponding weights:

DiscreteLQRegulatorGains directly gives the same result:

Possible Issues  (1)

It is not possible to compute an optimal regulator for a system that is not stabilizable:

The second mode is not stabilizable:

Wolfram Research (2010), DiscreteLQRegulatorGains, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscreteLQRegulatorGains.html (updated 2012).


Wolfram Research (2010), DiscreteLQRegulatorGains, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscreteLQRegulatorGains.html (updated 2012).


@misc{reference.wolfram_2020_discretelqregulatorgains, author="Wolfram Research", title="{DiscreteLQRegulatorGains}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/DiscreteLQRegulatorGains.html}", note=[Accessed: 19-April-2021 ]}


@online{reference.wolfram_2020_discretelqregulatorgains, organization={Wolfram Research}, title={DiscreteLQRegulatorGains}, year={2012}, url={https://reference.wolfram.com/language/ref/DiscreteLQRegulatorGains.html}, note=[Accessed: 19-April-2021 ]}


Wolfram Language. 2010. "DiscreteLQRegulatorGains." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/DiscreteLQRegulatorGains.html.


Wolfram Language. (2010). DiscreteLQRegulatorGains. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiscreteLQRegulatorGains.html