You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ĉm, D̂dm = Ĉ[i_ym, :], D̂d[i_ym, :] # measured outputs ym only
44
48
i_ym =collect(i_ym)
45
49
lastu0 =zeros(nu)
46
50
x̂ = [zeros(model.nx); zeros(nxs)]
@@ -92,8 +96,8 @@ ones, for ``\mathbf{Ĉ^u, D̂_d^u}``).
92
96
``\mathbf{Q}`` of `model`, specified as a standard deviation vector.
93
97
- `σR=fill(1,length(i_ym))` : main diagonal of the sensor noise covariance ``\mathbf{R}``
94
98
of `model` measured outputs, specified as a standard deviation vector.
95
-
- `nint_ym=fill(1,length(i_ym))` : integrator quantity per measured outputs (vector) for the
96
-
stochastic model, use `nint_ym=0` for no integrator at all.
99
+
- `nint_ym=default_nint(model,i_ym)` : integrator quantity per measured outputs (vector) for
100
+
the stochastic model, use `nint_ym=0` for no integrator at all (see Extended Help).
97
101
- `σQ_int=fill(1,sum(nint_ym))` : same than `σQ` but for the stochastic model covariance
98
102
``\mathbf{Q_{int}}`` (composed of output integrators).
99
103
@@ -111,25 +115,30 @@ SteadyKalmanFilter estimator with a sample time Ts = 0.5 s, LinModel and:
111
115
```
112
116
113
117
# Extended Help
114
-
The model augmentation with `nint_ym` vector produces the integral action when the estimator
115
-
is used in a controller as state feedback. The default is 1 integrator per measured outputs,
116
-
resulting in an offset-free tracking for "step-like" unmeasured output disturbances. Use 2
117
-
integrators for "ramp-like" disturbances. See [`init_estimstoch`](@ref).
118
+
The model augmentation with `nint_ym` vector adds integrators at model measured outputs
119
+
``\mathbf{y^m}``, producing the integral action when the estimator is used in a controller
120
+
as state feedback. The method [`default_nint`](@ref) computes the default value of
121
+
`nint_ym`. It can also be tweaked by following these rules on each measured output:
122
+
123
+
- Use 0 integrator if the model output is integrating (else it will be unobservable)
124
+
- Use 1 integrator if the disturbances on the output are typically "step-like"
125
+
- Use 2 integrators if the disturbances on the output are typically "ramp-like"
126
+
127
+
The function [`init_estimstoch`](@ref) builds the stochastic model from `nint_ym`.
118
128
119
129
!!! tip
120
130
Increasing `σQ_int` values increases the integral action "gain".
121
131
122
132
The constructor pre-compute the steady-state Kalman gain `K` with the [`kalman`](https://juliacontrol.github.io/ControlSystems.jl/stable/lib/synthesis/#ControlSystemsBase.kalman-Tuple{Any,%20Any,%20Any,%20Any,%20Any,%20Vararg{Any}})
123
-
function. It can sometimes fail, for example when `model` is integrating. In such a case,
124
-
you can use 0 integrator on `model` integrating outputs, or the alternative time-varying
125
-
[`KalmanFilter`](@ref).
133
+
function. It can sometimes fail, for example when `model` matrices are ill-conditioned. In
134
+
such a case, you can try the alternative time-varying [`KalmanFilter`](@ref).
0 commit comments