DiscreteLQRegulatorGains
DiscreteLQRegulatorGains[sspec,wts,τ]
gives the discretetime state feedback gains with sampling period τ for the continuoustime system specification sspec that minimizes a cost function with weights wts.
DiscreteLQRegulatorGains[…,"prop"]
gives the value of the property "prop".
Details and Options
 DiscreteLQRegulatorGains is also known as discrete linear quadratic regulator, discrete linear quadratic cost equivalent regulator or discrete linear quadratic emulated regulator.
 DiscreteLQRegulatorGains is typically used to compute a digital implementation of a regulating controller or tracking controller.
 A regulating controller aims to maintain the system at an equilibrium state despite disturbances pushing it away. Typical examples include maintaining an inverted pendulum in its upright position or maintaining an aircraft in level flight.
 The regulating controller is given by a control law of the form , where is the computed gain matrix.
 The continuoustime cost function is given by .
 A tracking controller aims to track a reference signal despite disturbances interfering with it. Typical examples include a cruise control system for a car or path tracking for a robot.
 The tracking controller is given by a control law of the form , where is the computed gain matrix for the augmented system that includes the system sys as well as the dynamics for .
 The approximate discretetime system:
 The continuoustime cost function is given by , where are the augmented states.
 The number of augmented states is given by , where is given by SystemsModelOrder of sys, the order of y_{ref} and the number of signals y_{ref}.
 The choice of weighting matrices results in a tradeoff between performance and control effort, and a good design is arrived at iteratively. Their starting values can be diagonal matrices with entries , where z_{i} is the maximum admissible absolute value of the corresponding x_{i} or u_{i}.
 DiscreteLQRegulatorGains computes the discretetime controller using an approximated discretetime equivalent of a continuoustime cost function.
 The discretetime approximated cost function is , with the following terms:

state weight matrix input weight matrix crosscoupling weight matrix state vector for regulation and for tracking  The weights wts can have the following forms:

{q,r} cost function with no crosscoupling {q,r,p} cost function with crosscoupling matrix p  The system specification sspec is the system sys together with the u_{f}, y_{t} and y_{ref} specifications.
 The system sys can be given as StateSpaceModel[{a,b,c,d}], where a, b, c and d represent the state, input, output and feedthrough matrices in the continuoustime system .
 The discretetime design model dsys is a zeroorder hold approximation with the following terms:

state matrix input matrix  The system specification sspec can have the following forms:

StateSpaceModel[…] linear control input and linear state AffineStateSpaceModel[…] linear control input and nonlinear state NonlinearStateSpaceModel[…] nonlinear control input and nonlinear state SystemModel[…] general system model <… > detailed system specification given as an Association  The detailed system specification can have the following keys:

"InputModel" sys any one of the models "FeedbackInputs" All the feedback inputs u_{f} "TrackedOutputs" None the tracked outpus y_{t} "TrackedSignal" Automatic the dynamics of y_{ref}  The feedback inputs can have the following forms:

{num_{1},…,num_{n}} numbered inputs num_{i} used by StateSpaceModel, AffineStateSpaceModel and NonlinearStateSpaceModel {name_{1},…,name_{n}} named inputs name_{i} used by SystemModel All uses all inputs  For nonlinear systems such as AffineStateSpaceModel, NonlinearStateSpaceModel and SystemModel, the system will be linearized around its stored operating point.
 DiscreteLQRegulatorGains[…,"Data"] returns a SystemsModelControllerData object cd that can be used to extract additional properties using the form cd["prop"].
 DiscreteLQRegulatorGains[…,"prop"] can be used to directly give the value of cd["prop"].
 Possible values for properties "prop" include:

"Design" type of controller design "DesignModel" model used for the design "DiscreteTimeClosedLoopPoles" poles of "DiscreteTimeClosedLoopSystem" "DiscreteTimeClosedLoopSystem" dcsys {"DiscreteTimeClosedLoopSystem",cspec} whether to merge the discretetime closedloop system "DiscreteTimeControllerModel" dcm "DiscreteTimeDesignModel" approximated discretetime model dsys "DiscreteTimeOpenLoopPoles" poles of dsys "DiscreteTimeWeights" weights ϕ, ρ, π of the approximated cost "FeedbackGains" gain matrix κ or its equivalent "DiscreteTimeFeedbackGainsModel" dgm or {dgm_{1},dgm_{2}} "FeedbackInputs" inputs u_{f} of sys used for feedback "InputModel" input model sys "InputsCount" number of inputs u of sys "OpenLoopPoles" poles of "DesignModel" "OutputsCount" number of outputs y of sys "SamplingPeriod" sampling period τ "StatesCount" number of states x of sys "TrackedOutputs" outputs y_{t} of sys that are tracked  Possible keys for cspec include:

"InputModel" input model in csys "Merge" whether to merge csys "ModelName" name of csys  The diagram of the approximated discretetime regulator layout.
 The diagram of the approximated discretetime tracker layout.
The approximate discretetime system:
Examples
open allclose allScope (27)
Basic Uses (7)
Compute the discretetime state feedback gain of a system:
The discretetime approximation is stable:
The discretetime closedloop system is even more stable:
The gain for an unstable system:
The discretetime approximation is also unstable:
The discretetime closedloop system is stable:
The gains for various sampling periods:
The discretetime approximations:
The discretetime closedloop systems:
Compute the state feedback gains for a multiplestate system:
The dimensions of the result correspond to the number of inputs and the system's order:
Compute the gains for a multipleinput system:
Reverse the weights of the feedback inputs:
A higher weight does not lead to a smaller norm:
Increase the weight even more to reduce the relative signal size:
Compute the gains when the cost function contains crosscoupling of the states and feedback inputs:
Plant Models (5)
A descriptor StateSpaceModel:
A SystemModel:
Tracking (4)
Design a discretetime tracking controller:
The closedloop system tracks the reference signal :
The closedloop system tracks two different reference signals:
Compute the controller effort:
Track a desired reference signal:
The reference signal is of order 2:
Design a controller to track one output of a first order system:
Properties (11)
DiscreteLQRegulatorGains returns the discretetime feedback gains by default:
In general, the feedback is affine in the states:
It is of the form κ_{0}+κ_{1}.x, where κ_{0} and κ_{1} are constants:
The systems model of the feedback gains:
An affine systems model of the feedback gains:
The discretetime closedloop system:
The poles of the linearized closedloop system:
Increasing the weight of the states makes the system more stable:
Increasing the weight of the feedback inputs makes the system less stable:
The model used to compute the feedback gains:
The poles of the design model:
The discretetime approximate model used to compute the feedback gains:
The poles of the approximate discretetime model:
The approximate discretetime weights:
Applications (1)
Properties & Relations (1)
Compute the weights for the emulated discretetime system:
Compute the discrete LQ gains using the emulated system and corresponding weights:
DiscreteLQRegulatorGains directly gives the same result:
Text
Wolfram Research (2010), DiscreteLQRegulatorGains, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscreteLQRegulatorGains.html (updated 2021).
CMS
Wolfram Language. 2010. "DiscreteLQRegulatorGains." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/DiscreteLQRegulatorGains.html.
APA
Wolfram Language. (2010). DiscreteLQRegulatorGains. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiscreteLQRegulatorGains.html