EstimatorGains[ssm,{p1,p2,…,pn}]
gives the estimator gain matrix for the StateSpaceModel ssm, such that the poles of the estimator are pi.
EstimatorGains[{ssm,{out1,…}},…]
specifies the measured outputs outi to use.
EstimatorGains
EstimatorGains[ssm,{p1,p2,…,pn}]
gives the estimator gain matrix for the StateSpaceModel ssm, such that the poles of the estimator are pi.
EstimatorGains[{ssm,{out1,…}},…]
specifies the measured outputs outi to use.
Details and Options
- EstimatorGains is also known as observer gains or observer pole placement.
- The 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 in either a continuous-time or a discrete-time system:
-

continuous-time system 
discrete-time system - If ssm is observable, the eigenvalues of
will be {p1,p2,…,pn}, where
is the computed estimator gain matrix. - For a descriptor system StateSpaceModel[{a,b,c,d,e}], the number of poles that can be specified is determined by the rank of e and the observability of the system. »
- EstimatorGains also accepts nonlinear systems specified by AffineStateSpaceModel and NonlinearStateSpaceModel.
- For nonlinear systems, the operating values of state and input variables are taken into consideration, and the gains are computed based on the approximate Taylor linearization.
- EstimatorGains[{ssm,{out1,…}},…] is equivalent to EstimatorGains[ssm1,…], where ssm1SystemsModelExtract[ssm,All,{out1,…}].
- The observer dynamics are given by:
-

continuous-time system 
discrete-time system - In the case of a square nonsingular matrix
, the state vector can be computed as
. - EstimatorGains accepts a Method option with settings given by:
-
Automatic automatic method selection "Ackermann" Ackermann method "KNVD" Kautsky–Nichols–Van Dooren method - The estimator gains are computed as the state feedback gains of the dual system.
Examples
open all close allBasic Examples (3)
Compute estimator gains for a continuous-time system:
EstimatorGains[StateSpaceModel[{{{2, 3}, {-1, 4}}, {{0}, {1}}, {{1, 0}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None], {-8 - 6 I, -8 + 6I}]EstimatorGains[StateSpaceModel[{{{0.9641, 0.2462, 0.0303}, {-0.2462, 0.9641, 0.1934}, {0, 0, 0.6065}},
{{0.0503}, {0.0296}, {0.0887}}, {{1, 0, 0}}, {{0}}}, SamplingPeriod -> 0.1,
SystemsModelLabels -> None], {0.3, 0.6, 0.7}]Estimator gains for a two-output system with only the second output measured:
EstimatorGains[{StateSpaceModel[{{{3, 0, -1}, {0, 2, 1}, {1, -1, 2}}, {{1, 1}, {0, 3}, {1, -1}},
{{1, -1, 0}, {0, 1, -1}}, {{0, 0}, {0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None], 2}, {-1 + 1.5I, -1 - 1.5I, -0.3}]Scope (6)
A set of gains for a SISO system:
{a, b, c} = {(| | |
| -- | - |
| -1 | 0 |
| 1 | 2 |), (| |
| - |
| 0 |
| 1 |), (0 1)};EstimatorGains[StateSpaceModel[{a, b, c}], {-5 + 2I, -5 - 2I}]Eigenvalues[a - %.c]An observer gain matrix for a two-output system:
EstimatorGains[StateSpaceModel[{{{-21, 0, 0, 0}, {0.1, -5, 0, 0}, {0, -1.5, 0, 0}, {0, -4, 0, 0}},
{{6000, 0}, {0, 0}, {0, 2.3}, {0, 0.1}}, {{0, 0, 1, 0}, {0, 0, 0, 1}}, {{0, 0}, {0, 0}}},
SamplingPeriod -> None, SystemsModelLabels -> None], {-3, -4.7, -8, -12}]Estimator gain matrix for a three-output system with specified measurements:
EstimatorGains[{StateSpaceModel[{{{-16, 0, 4, 0}, {0, -10, 0, 1}, {0, -6.6, 1.5, 0}, {0, 0, 2, 0}},
{{11, 0}, {0, -4}, {0, 1.8}, {5, 0}}, {{0, 0, 1, 0}, {0, 0, 0, 1}, {1, -0.1, 3, 1}},
{{0, 0}, {0, 0}, {0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {1, 3}}, {-12, -6.1, -8 + I, -8 - I}]//MatrixFormCompute the estimator gains with poles specified as the roots of a polynomial:
ssm = StateSpaceModel[{{{0, 1}, {-2, -3}}, {{0}, {1}}, {{1, 0}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];poly = λ^2 + 2 0.5 10λ + 100;EstimatorGains[ssm, λ /. Solve[poly == 0, λ]]Determine estimator gains symbolically:
l = EstimatorGains[StateSpaceModel[
{{{0, 1, 0, 0}, {0, 0, -3*g*(m/(4*m + 7*M)),
0}, {0, 0, 0, 1}, {0, 0, 6*g*((m + M)/
(4*L*m + 7*L*M)), 0}},
{{0}, {7/(4*m + 7*M)}, {0},
{-6/(4*L*m + 7*L*M)}}, {{1, 0, 0, 0}},
{{0}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {Subscript[p, 1], Subscript[p, 2], Subscript[p, 3], Subscript[p, 4]}];Simplify[MatrixForm[l]]Compute the gains for an AffineStateSpaceModel:
asys = AffineStateSpaceModel[{{-Sin[0.5 - Subscript[x, 1]],
Subscript[x, 1] - Subscript[x, 2]}, {{1}, {0}},
{Subscript[x, 1]}, {{0}}}, {{Subscript[x, 1], 0.5},
{Subscript[x, 2], 0}}, {u}, {Automatic}, Automatic,
SamplingPeriod -> None];ℓ = EstimatorGains[asys, {-1, -2}]estim = StateOutputEstimator[asys, ℓ]The estimator poles are at the desired location:
Eigenvalues[First[Normal[StateSpaceModel[estim]]]]Options (6)
Method (6)
For systems with more outputs than states, Automatic finds the gains using LinearSolve:
EstimatorGains[StateSpaceModel[{{{a}}, {{b}}, {{Subscript[c, 1]},
{Subscript[c, 2]}}, {{0}, {0}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {p}, Method -> Automatic]LinearSolve[{{Subscript[c, 1]}, {Subscript[c, 2]}}, {{a - p}}]The Ackermann method is used by default for systems with exact values:
ssm = StateSpaceModel[{{{-1, 1, 1}, {0, -3, 2}, {0, 1, 1}}, {{1}, {2}, {1}}, {{1, 0, 0}, {0, 1, 0}},
{{0}, {0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];EstimatorGains[ssm, {-7, -9, -11}]EstimatorGains[ssm, {-7, -9, -11}, Method -> "Ackermann"] == %The Ackermann method is also used for symbolic values:
ssm = StateSpaceModel[{{{0, 1}, {-c, -b}}, {{0}, {1}},
{{Subscript[k, 1], Subscript[k, 2]}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];EstimatorGains[ssm, {Subscript[p, 1], Subscript[p, 2]}]EstimatorGains[ssm, {Subscript[p, 1], Subscript[p, 2]}, Method -> "Ackermann"] == %For systems with numeric values, Automatic uses the "KNVD" method:
ssm = StateSpaceModel[{{{-1.2, 1.}, {0.2, -4.1}}, {{1.}, {1.1}}, {{2., 0.}, {0, 1.}}, {{0}, {0}}},
SamplingPeriod -> None, SystemsModelLabels -> None];
EstimatorGains[ssm, {-1., -2.}, Method -> Automatic]EstimatorGains[ssm, {-1., -2.}, Method -> "KNVD"] === %An inexact, multiple-output state-space model and desired estimator pole locations:
ssm = StateSpaceModel[{{{-20, 0, -20, 0}, {0, -0.79, 9.5, 0}, {0, -1.5, -0.79, 0}, {1, 0, 0, 0}},
{{20, 2.8}, {0, -3.13}, {0, 0}, {0, 0}}, {{2.7, 1, 0, -4.3}, {0, -6.1, -7.7, 0.345}},
{{0, 0}, {0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];
poles = {-40 + 10I, -40 - 10I, -40, -40};Find the condition number of the observability matrix for the first input:
ObservabilityMatrix[SystemsModelExtract[ssm, All, 1]];
SingularValueList[%, Tolerance -> 0];
(%[[1]]/%[[-1]])Find the condition number of the observability matrix for the second input:
ObservabilityMatrix[SystemsModelExtract[ssm, All, 2]];
SingularValueList[%, Tolerance -> 0];
(%[[1]]/%[[-1]])By default, the output with the lowest condition number is chosen:
EstimatorGains[ssm, poles, Method -> "Ackermann"]Find gains for estimation through the first output:
EstimatorGains[{ssm, 1}, poles, Method -> "Ackermann"]The KNVD method uses all available outputs to estimate the states:
EstimatorGains[StateSpaceModel[{{{1.38, -0.2077, 6.715, -5.676}, {-0.5814, -4.29, 0, 0.675},
{1.067, 4.273, -6.654, 5.893}, {0.048, 4.273, 1.342, -2.104}},
{{0, 1}, {2, 0}, {1.2, -3.7}, {2.1, 0}}, {{0, 5.679, 1.136, 1.136}, {0, 0, -3.146, 0}},
{{0, 0}, {0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None], {-0.2, -0.5, -5, -8.67}]Applications (2)
Construct an observer for a continuous-time system:
ssm = StateSpaceModel[{{{-3, -2, 2}, {1, -1, 0}, {-2, -1, 0}}, {{1}, {0}, {-1}},
{{1, 0, 0}, {0.5, 0.5, -1}}, {{1}, {0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];l = EstimatorGains[ssm, {-5 + 2I , -5 - 2I , -8}];ssmobsv = SystemsModelExtract[StateOutputEstimator[ssm, l], All, {1, 2, 3}]Simulate the system with input Sin[t] and from a random initial condition:
ic = RandomReal[2, 3];stateResp = StateResponse[{ssm, ic}, Sin[t], {t, 2}];Compare each state and its estimate:
y = OutputResponse[{ssm, ic}, Sin[t], {t, 2}];obsvResp = OutputResponse[ssmobsv, Join[{Sin[t]}, y], {t, 2}];MapIndexed[Plot[#, {t, 0, 2}, PlotLabel -> "State " <> ToString[First[#2]], PlotRange -> All, PlotStyle -> {Automatic, Dashed}]&, Thread[{stateResp, obsvResp}]]Construct an observer for a zero-input sampled-data system:
ssm = StateSpaceModel[{{{0.81, -0.23, -0.045}, {0.09, 0.98, -0.0023}, {0.005, 0.1, 1}},
{{0.09}, {0.0047}, {0.00016}}, {{1, 3.5, 3}}, {{0}}}, SamplingPeriod -> 0.1,
SystemsModelLabels -> None];l = EstimatorGains[ssm, {0.5, 0.6, 0.75}];ssobsv = SystemsModelExtract[StateOutputEstimator[{ssm, All, None}, l, Method -> "PredictionEstimator"], All, {1, 2, 3}]Compute the actual and estimated states for initial states {1,–0.75,0.5} and initial observer states {0,0,0}:
stateResp = StateResponse[{ssm, {1, -0.75, 0.5}}, {0}, {t, 6}];y = OutputResponse[{ssm, {1, -0.75, 0.5}}, {0}, {t, 6}];obsvResp = OutputResponse[ssobsv, y];Examine the state tracking achieved by the observer:
tspan = Range[0, 6, 0.1];ListLinePlot[Replace[Riffle[stateResp, obsvResp], pts : {__} :> Thread[{tspan, pts}], {1}], PlotRange -> All, ImageSize -> Medium, PlotMarkers -> Automatic,
PlotLegends -> {"SubscriptBox[x, 1]", "SubscriptBox[x, 1 obs]", "SubscriptBox[x, 2]", "SubscriptBox[x, 2 obs]", "SubscriptBox[x, 3]", "SubscriptBox[x, 3 obs]"}]Properties & Relations (7)
a = (| | |
| -- | -- |
| -1 | 2 |
| 1 | -4 |);
c = (1 0);l = EstimatorGains[StateSpaceModel[{a, Array[Subscript[b, ##]&, {2, 1}], c}], {-7 + I, -7 - I}];StateSpaceModel[{a - l.c, ConstantArray[0, {2, 1}], IdentityMatrix[2]}]StateOutputEstimator assembles an observer that estimates both the states and outputs:
ssm = StateSpaceModel[{{{0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}, {-35.52, -54.32, -34.56, -9.8}},
{{0}, {0}, {0}, {1}}, {{1, 1, 1, 0}}, {{0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];l = EstimatorGains[ssm, {-8 + 4 I, -8 - 4I, -12, -14}];StateOutputEstimator[ssm, l]The prediction estimator dynamics for a discrete-time system:
Subscript[ssm, d] = StateSpaceModel[{{{0, 1, 0}, {0, 0, 1}, {-0.234, 0.64, 0.01}}, {{0}, {0}, {1}}, {{-0.3, 1, 0}},
{{0}}}, SamplingPeriod -> 0.25, SystemsModelLabels -> None];l = EstimatorGains[Subscript[ssm, d], {-0.3, -0.2, 0}];StateOutputEstimator[Subscript[ssm, d], l, Method -> "PredictionEstimator"]Estimator gains are the conjugate transpose of state feedback gains of the dual system:
ssm = StateSpaceModel[{{{0, 1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, 1}, {0, 0, 11, 0}}, {{0}, {1}, {0}, {1}},
{{1, 2, 3, 4}}, {{0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];poles = {-1, -2, -1 + I, -1 - I};EstimatorGains[ssm, poles] == ConjugateTranspose[StateFeedbackGains[DualSystemsModel[ssm], poles]]StateFeedbackGains[ssm, poles] == ConjugateTranspose[EstimatorGains[DualSystemsModel[ssm], poles]]For an observable, nonsingular descriptor system, all the estimator poles can be placed:
nonsingularSS = StateSpaceModel[{{{1, 0, 0, 2}, {-1, -1, 0, 0}, {0, -1, 1, 1}, {11, 11, 0, 0}},
{{0}, {1}, {0}, {1}}, {{5, 0, 3, 8}}, {{0}}, {{0, 1, -1, 0}, {1, 0, 0, 2}, {1, 1, 0, 0},
{0, -1, 1, 1}}}, SamplingPeriod -> None, SystemsModelLabels -> None];
ObservableModelQ[nonsingularSS]EstimatorGains[nonsingularSS, {-1., -2., -3., -4.}]For a singular system that is observable, only MatrixRank[e] poles can be placed:
singularSS = StateSpaceModel[{{{0, 1, 0}, {0, 0, 1}, {0, 0, -1}}, {{0, 0}, {1, 0}, {0, 1}},
{{0, 1, 0}, {1, 0, 1}, {0, 0, -1}}, {{0, 0}, {1, 0}, {0, 1}}, {{1, 0, 0}, {0, 1, 0}, {0, 0, 0}}},
SamplingPeriod -> None, SystemsModelLabels -> None];
ObservableModelQ[singularSS]EstimatorGains[singularSS, {-1., -2.}]An impulsive system where only the slow subsystem is observable:
impulseSS = StateSpaceModel[{{{-5, 0, 0, 0, 0}, {0, 1, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0},
{0, 0, 0, 0, 1}}, {{1}, {0}, {0}, {0}, {-1}}, {{8, 0, 0, 1, -1}}, {{0}},
{{1, 0, 0, 0, 0}, {0, 0, 1, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}, {0, 0, 0, 0, 0}}},
SamplingPeriod -> None, SystemsModelLabels -> None];
{ObservableModelQ[impulseSS], ControllableModelQ[{impulseSS, "Slow"}]}Only the estimator pole for the slow system can be placed:
EstimatorGains[impulseSS, {-1.}]Possible Issues (4)
The KNVD method does not handle exact systems with fewer outputs than states:
ssm = StateSpaceModel[{{{-11, 0, 0, 0}, {1, -5, 0, 0}, {0, -3, 0, 0}, {0, -4, 0, 0}},
{{80, 0}, {0, 0}, {0, 20}, {0, 1}}, {{0, 0, 1, 0}, {0, 2, 0, 1}}, {{0, 0}, {0, 0}}},
SamplingPeriod -> None, SystemsModelLabels -> None];EstimatorGains[ssm, {-3, -4, -8, -12}, Method -> "KNVD"]
EstimatorGains[ssm, {-3, -4, -8, -12}//N, Method -> "KNVD"]The KNVD method does not support a pole multiplicity greater than the number of outputs:
ssm = StateSpaceModel[{{{9, 5.7, 0, 2}, {0, 0, -1, 0}, {-4, 0, 1, 0}, {0, 1, 12, 0}},
{{0}, {-1}, {0}, {1.6}}, {{1, 2, 3, 4}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];EstimatorGains[ssm, {-1, -7, -2.5, -2.5}]EstimatorGains[ssm, {-1, -7, -2.5, -2.5}, Method -> "Ackermann"]The KNVD method can give different sets of gains on different computer systems:
ssm = StateSpaceModel[{{{0, 1, 0, 0, 2, 0}, {2, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, -1}, {0, 0, 0, 3, 1, 0},
{-2, 0, 0, 0, 0, 1}, {0, -1, 0, 0, 0, 0}}, {{1, 0}, {0, 0}, {1, 0}, {0, 1}, {0, 0}, {0, -1}},
{{1, 0, 0, 0, 0, 0}, {2, 0, 1, -1, 1, 0}}, {{0, 0}, {0, 0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];poles = {-1, -2, -3, -4, -5, -7};{$SystemID, Subscript[l, 1] = EstimatorGains[ssm//N, poles, Method -> "KNVD"]}{$SystemID, Subscript[l, 2] = EstimatorGains[ssm//N, poles, Method -> "KNVD"]}The observer's eigenvalues are the same:
{$SystemID, With[{ssN = Normal[ssm]}, Eigenvalues[ssN[[1]] - Subscript[l, 1].ssN[[3]]]]}{$SystemID, With[{ssN = Normal[ssm]}, Eigenvalues[ssN[[1]] - Subscript[l, 2].ssN[[3]]]]}The system must be observable:
ssm = StateSpaceModel[{{{0, -1}, {-1, 0}}, {{1}, {-1}}, {{1, -1}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];EstimatorGains[ssm, {-2, -3}]ObservableModelQ[ssm]Related Guides
History
Introduced in 2010 (8.0) | Updated in 2012 (9.0) ▪ 2014 (10.0)
Text
Wolfram Research (2010), EstimatorGains, Wolfram Language function, https://reference.wolfram.com/language/ref/EstimatorGains.html (updated 2014).
CMS
Wolfram Language. 2010. "EstimatorGains." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/EstimatorGains.html.
APA
Wolfram Language. (2010). EstimatorGains. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EstimatorGains.html
BibTeX
@misc{reference.wolfram_2026_estimatorgains, author="Wolfram Research", title="{EstimatorGains}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/EstimatorGains.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_estimatorgains, organization={Wolfram Research}, title={EstimatorGains}, year={2014}, url={https://reference.wolfram.com/language/ref/EstimatorGains.html}, note=[Accessed: 12-June-2026]}