DiscreteLQEstimatorGains[ssm,{w,v},τ]
gives the optimal discrete-time estimator gain matrix with sampling period τ for the continuous-time StateSpaceModel ssm, with process and measurement noise covariance matrices w and v.
DiscreteLQEstimatorGains[{ssm,sensors},{w,v},τ]
specifies sensors as the noisy measurements of ssm.
DiscreteLQEstimatorGains[{ssm,sensors,dinputs},{w,v},τ]
specifies dinputs as the deterministic inputs of ssm.
DiscreteLQEstimatorGains
DiscreteLQEstimatorGains[ssm,{w,v},τ]
gives the optimal discrete-time estimator gain matrix with sampling period τ for the continuous-time StateSpaceModel ssm, with process and measurement noise covariance matrices w and v.
DiscreteLQEstimatorGains[{ssm,sensors},{w,v},τ]
specifies sensors as the noisy measurements of ssm.
DiscreteLQEstimatorGains[{ssm,sensors,dinputs},{w,v},τ]
specifies dinputs as the deterministic inputs of ssm.
Details and Options
- The standard state-space model ssm can be given as StateSpaceModel[{a,b,c,d}], where a, b, c, and d represent the state, input, output, and transmission matrices of 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 input
can include the process noise
, as well as deterministic inputs
. - The argument dinputs is a list of integers specifying the positions of
in
. - The output
consists of the noisy measurements
, as well as other outputs. - The argument sensors is a list of integers specifying the positions of
in
. - DiscreteLQEstimatorGains[ssm,{…},τ] is equivalent to DiscreteLQEstimatorGains[{ssm, All,None},{…},τ].
- The noisy measurements are modeled as
, where
and
are the submatrices of
and
associated with
, and
is the noise. - The process and measurement noises are assumed to be white and Gaussian:
-
, 
process noise
, 
measurement noise - The estimator with the optimal gain minimizes
, where
is the estimated state vector. - DiscreteLQEstimatorGains computes the estimator gains based on the discrete equivalent of the noise matrices.
- The state-space model ssm is discretized using the zero-order hold method.
Examples
open all close allBasic Examples (1)
Compute the discrete LQ estimator gains for a continuous-time state-space model:
DiscreteLQEstimatorGains[StateSpaceModel[{{{0, 1}, {0, -5}}, {{0, 0}, {1, 0.1}}, {{1, 0}}, {{0, 0}}},
SamplingPeriod -> None, SystemsModelLabels -> None], {(| | |
| -- | - |
| 10 | 0 |
| 0 | 1 |), {{1}}}, 0.1]Scope (3)
Compute the discrete-time Kalman gains for a state-space model:
ssm = StateSpaceModel[{{{-1.7, 50, 160}, {0.22, -1.4, -32}, {0, 0, -12}},
{{-272, 0.02, 0.1}, {0, -0.0035, 0.004}, {14, 0, 0}}, {{1, 0, 0}, {0, 1, 0}},
{{0, 0, 0}, {0, 0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];DiscreteLQEstimatorGains[ssm, {(| | | |
| ----- | ----- | ----- |
| 0.001 | 0 | 0 |
| 0 | 0.001 | 0 |
| 0 | 0 | 0.001 |), (| | |
| - | - |
| 1 | 0 |
| 0 | 1 |)}, 0.5]//MatrixFormThe gains based on the measurement of just the second output:
DiscreteLQEstimatorGains[{ssm, 2}, {(| | | |
| ----- | ----- | ----- |
| 0.001 | 0 | 0 |
| 0 | 0.001 | 0 |
| 0 | 0 | 0.001 |), (1)}, 0.5]//MatrixFormThe gains for a system in which all inputs except the first are stochastic:
ssm = StateSpaceModel[{{{0, 0, 1, 0}, {0, 0, 0, 1}, {-29.4, 19.6, 0, 0}, {14.7, -14.7, 0, 0}},
{{0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}, {0.125, 0, 0, 0, 1}},
{{1, 0, 0, 0}, {0, 0, 1, 0}}, {{0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];DiscreteLQEstimatorGains[{ssm, All, {1}}, {10^6(| | | | |
| - | - | - | - |
| 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |), (| | |
| - | - |
| 1 | 0 |
| 0 | 1 |)}, 0.2]Find the optimal gains for a descriptor state-space model:
DiscreteLQEstimatorGains[StateSpaceModel[{{{-0.3, 0.65, 0}, {0, -1, 1}, {0.25, -0.5, -0.6}},
{{-1, 0}, {0.5, 0}, {0.7, -0.6}}, {{1, 0, 0}, {0, -1, -1}}, {{0, 0}, {0, 0}},
{{3, 0, 0}, {0, 5, 0}, {0, 0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {(| | |
| -- | -- |
| 1. | 0. |
| 0 | 2. |), (| | |
| -- | -- |
| 5. | .1 |
| .1 | 3. |)}, .1]Properties & Relations (1)
Find estimator gains using DiscreteLQEstimatorGains:
ssm = StateSpaceModel[{{{0, 1, 0}, {-1, -1, 0}, {0, 0, -1}}, {{0, 0}, {1, 0}, {0, 1}}, {{2, 1, 1}},
{{0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];Subscript[l, 1] = DiscreteLQEstimatorGains[{ssm, All, 1}, {(16), (1)}, 0.5]//ChopCreate a discrete-time Kalman estimator with the gains and a discretized model:
kalman1 = StateOutputEstimator[{ToDiscreteTimeModel[ssm, 0.5, Method -> "ZeroOrderHold"], All, 1}, Subscript[l, 1]];This is different from that obtained by discretizing a continuous-time estimator:
kalman2 = ToDiscreteTimeModel[KalmanEstimator[{ssm, All, 1}, {(16), (1)}], 0.5, Method -> "ZeroOrderHold"];Response of the first estimator in the presence of process and measurement noises:
pnoise = Interpolation[Thread[{Range[0, 20], RandomReal[NormalDistribution[0, 4], {21}]}], t];mnoise = Interpolation[Thread[{Range[0, 20], RandomReal[NormalDistribution[0, 1], {21}]}], t];noisyout = OutputResponse[ssm, {UnitStep[t], pnoise}, {t, 20}] + mnoise;res1 = OutputResponse[kalman1, {UnitStep[t], noisyout[[1]]}, {t, 20}];Response of the discretized Kalman estimator:
res2 = OutputResponse[kalman2, {UnitStep[t], noisyout[[1]]}, {t, 20}];Show[{ListPlot[res1, Joined -> True], ListPlot[res2, PlotStyle -> Dashed, Joined -> True]}, PlotRange -> All]Possible Issues (1)
The system must be detectable:
DiscreteLQEstimatorGains[StateSpaceModel[{{{-1, 0, 0}, {0, 2, 0}, {0, 0, 3}}, {{1, 1}, {-1, 0}, {0, 1}},
{{1, 0, 0}, {0, 0, 1}}, {{0, 0}, {0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {(| | |
| - | - |
| 1 | 0 |
| 0 | 1 |), (| | |
| - | - |
| 1 | 0 |
| 0 | 1 |)}, 0.1]See Also
Related Guides
Text
Wolfram Research (2010), DiscreteLQEstimatorGains, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscreteLQEstimatorGains.html (updated 2012).
CMS
Wolfram Language. 2010. "DiscreteLQEstimatorGains." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/DiscreteLQEstimatorGains.html.
APA
Wolfram Language. (2010). DiscreteLQEstimatorGains. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiscreteLQEstimatorGains.html
BibTeX
@misc{reference.wolfram_2026_discretelqestimatorgains, author="Wolfram Research", title="{DiscreteLQEstimatorGains}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/DiscreteLQEstimatorGains.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_discretelqestimatorgains, organization={Wolfram Research}, title={DiscreteLQEstimatorGains}, year={2012}, url={https://reference.wolfram.com/language/ref/DiscreteLQEstimatorGains.html}, note=[Accessed: 13-June-2026]}