@@ -130,12 +130,14 @@ state of the next time step ``\mathbf{x̂}_k(k+1)``. This estimator is allocatio
130
130
julia> model = LinModel([tf(3, [30, 1]); tf(-2, [5, 1])], 0.5);
131
131
132
132
julia> estim = SteadyKalmanFilter(model, i_ym=[2], σR=[1], σQint_ym=[0.01])
133
- SteadyKalmanFilter estimator with a sample time Ts = 0.5 s, LinModel and:
134
- 1 manipulated inputs u (0 integrating states)
135
- 3 estimated states x̂
136
- 1 measured outputs ym (1 integrating states)
137
- 1 unmeasured outputs yu
138
- 0 measured disturbances d
133
+ SteadyKalmanFilter estimator with a sample time Ts = 0.5 s:
134
+ ├ model: LinModel
135
+ └ dimensions:
136
+ ├ 1 manipulated inputs u (0 integrating states)
137
+ ├ 3 estimated states x̂
138
+ ├ 1 measured outputs ym (1 integrating states)
139
+ ├ 1 unmeasured outputs yu
140
+ └ 0 measured disturbances d
139
141
```
140
142
141
143
# Extended Help
@@ -395,12 +397,14 @@ This estimator is allocation-free.
395
397
julia> model = LinModel([tf(3, [30, 1]); tf(-2, [5, 1])], 0.5);
396
398
397
399
julia> estim = KalmanFilter(model, i_ym=[2], σR=[1], σP_0=[100, 100], σQint_ym=[0.01])
398
- KalmanFilter estimator with a sample time Ts = 0.5 s, LinModel and:
399
- 1 manipulated inputs u (0 integrating states)
400
- 3 estimated states x̂
401
- 1 measured outputs ym (1 integrating states)
402
- 1 unmeasured outputs yu
403
- 0 measured disturbances d
400
+ KalmanFilter estimator with a sample time Ts = 0.5 s:
401
+ ├ model: LinModel
402
+ └ dimensions:
403
+ ├ 1 manipulated inputs u (0 integrating states)
404
+ ├ 3 estimated states x̂
405
+ ├ 1 measured outputs ym (1 integrating states)
406
+ ├ 1 unmeasured outputs yu
407
+ └ 0 measured disturbances d
404
408
```
405
409
"""
406
410
function KalmanFilter (
@@ -639,12 +643,14 @@ This estimator is allocation-free if `model` simulations do not allocate.
639
643
julia> model = NonLinModel((x,u,_,_)->0.1x+u, (x,_,_)->2x, 10.0, 1, 1, 1, solver=nothing);
640
644
641
645
julia> estim = UnscentedKalmanFilter(model, σR=[1], nint_ym=[2], σPint_ym_0=[1, 1])
642
- UnscentedKalmanFilter estimator with a sample time Ts = 10.0 s, NonLinModel and:
643
- 1 manipulated inputs u (0 integrating states)
644
- 3 estimated states x̂
645
- 1 measured outputs ym (2 integrating states)
646
- 0 unmeasured outputs yu
647
- 0 measured disturbances d
646
+ UnscentedKalmanFilter estimator with a sample time Ts = 10.0 s:
647
+ ├ model: NonLinModel
648
+ └ dimensions:
649
+ ├ 1 manipulated inputs u (0 integrating states)
650
+ ├ 3 estimated states x̂
651
+ ├ 1 measured outputs ym (2 integrating states)
652
+ ├ 0 unmeasured outputs yu
653
+ └ 0 measured disturbances d
648
654
```
649
655
650
656
# Extended Help
@@ -1002,12 +1008,15 @@ differentiation. This estimator is allocation-free if `model` simulations do not
1002
1008
julia> model = NonLinModel((x,u,_,_)->0.2x+u, (x,_,_)->-3x, 5.0, 1, 1, 1, solver=nothing);
1003
1009
1004
1010
julia> estim = ExtendedKalmanFilter(model, σQ=[2], σQint_ym=[2], σP_0=[0.1], σPint_ym_0=[0.1])
1005
- ExtendedKalmanFilter estimator with a sample time Ts = 5.0 s, NonLinModel and:
1006
- 1 manipulated inputs u (0 integrating states)
1007
- 2 estimated states x̂
1008
- 1 measured outputs ym (1 integrating states)
1009
- 0 unmeasured outputs yu
1010
- 0 measured disturbances d
1011
+ ExtendedKalmanFilter estimator with a sample time Ts = 5.0 s:
1012
+ ├ model: NonLinModel
1013
+ ├ jacobian: AutoForwardDiff
1014
+ └ dimensions:
1015
+ ├ 1 manipulated inputs u (0 integrating states)
1016
+ ├ 2 estimated states x̂
1017
+ ├ 1 measured outputs ym (1 integrating states)
1018
+ ├ 0 unmeasured outputs yu
1019
+ └ 0 measured disturbances d
1011
1020
```
1012
1021
"""
1013
1022
function ExtendedKalmanFilter (
@@ -1169,6 +1178,10 @@ function update_estimate!(estim::ExtendedKalmanFilter{NT}, y0m, d0, u0) where NT
1169
1178
return predict_estimate_kf! (estim, u0, d0, F̂)
1170
1179
end
1171
1180
1181
+ function print_details (io:: IO , estim:: ExtendedKalmanFilter )
1182
+ println (io, " ├ jacobian: $(backend_str (estim. jacobian)) " )
1183
+ end
1184
+
1172
1185
" Set `estim.cov.P̂` to `estim.cov.P̂_0` for the time-varying Kalman Filters."
1173
1186
function init_estimate_cov! (
1174
1187
estim:: Union{KalmanFilter, UnscentedKalmanFilter, ExtendedKalmanFilter} , _ , _ , _
0 commit comments