@@ -253,13 +253,13 @@ its initial value with ``\mathbf{P̂}_{-1}(0) =
253
253
254
254
# Arguments
255
255
- `model::LinModel` : (deterministic) model for the estimations.
256
+ - `σP0=fill(1/model.nx,model.nx)` : main diagonal of the initial estimate covariance
257
+ ``\m athbf{P}(0)``, specified as a standard deviation vector.
258
+ - `σP0int_u=fill(1,sum(nint_u))` : same than `σP0` but for the unmeasured disturbances at
259
+ manipulated inputs ``\m athbf{P_{int_u}}(0)`` (composed of integrators).
260
+ - `σP0int_ym=fill(1,sum(nint_ym))` : same than `σP0` but for the unmeasured disturbances at
261
+ measured outputs ``\m athbf{P_{int_{ym}}}(0)`` (composed of integrators).
256
262
- `<keyword arguments>` of [`SteadyKalmanFilter`](@ref) constructor.
257
- - `σP0=σQ` : main diagonal of the initial estimate covariance ``\m athbf{P}(0)``, specified
258
- as a standard deviation vector.
259
- - `σP0int_u=σQint_u` : same than `σP0` but for the unmeasured disturbances at manipulated
260
- inputs ``\m athbf{P_{int_u}}(0)`` (composed of integrators).
261
- - `σP0int_ym=σQint_ym` : same than `σP0` but for the unmeasured disturbances at measured
262
- outputs ``\m athbf{P_{int_{ym}}}(0)`` (composed of integrators).
263
263
264
264
# Examples
265
265
```jldoctest
@@ -277,15 +277,15 @@ KalmanFilter estimator with a sample time Ts = 0.5 s, LinModel and:
277
277
function KalmanFilter (
278
278
model:: SM ;
279
279
i_ym:: IntRangeOrVector = 1 : model. ny,
280
+ σP0:: Vector = fill (1 / model. nx, model. nx),
280
281
σQ :: Vector = fill (1 / model. nx, model. nx),
281
282
σR :: Vector = fill (1 , length (i_ym)),
282
- σP0:: Vector = σQ,
283
283
nint_u :: IntVectorOrInt = 0 ,
284
284
σQint_u :: Vector = fill (1 , max (sum (nint_u), 0 )),
285
- σP0int_u :: Vector = σQint_u ,
285
+ σP0int_u :: Vector = fill ( 1 , max ( sum (nint_u), 0 )) ,
286
286
nint_ym :: IntVectorOrInt = default_nint (model, i_ym, nint_u),
287
287
σQint_ym :: Vector = fill (1 , max (sum (nint_ym), 0 )),
288
- σP0int_ym:: Vector = σQint_ym ,
288
+ σP0int_ym:: Vector = fill ( 1 , max ( sum (nint_ym), 0 )) ,
289
289
) where {NT<: Real , SM<: LinModel{NT} }
290
290
# estimated covariances matrices (variance = σ²) :
291
291
P̂0 = Hermitian (diagm (NT[σP0; σP0int_u; σP0int_ym]. ^ 2 ), :L )
@@ -443,15 +443,15 @@ responsibility to ensure that the augmented model is still observable.
443
443
function UnscentedKalmanFilter (
444
444
model:: SM ;
445
445
i_ym:: IntRangeOrVector = 1 : model. ny,
446
+ σP0:: Vector = fill (1 / model. nx, model. nx),
446
447
σQ :: Vector = fill (1 / model. nx, model. nx),
447
448
σR :: Vector = fill (1 , length (i_ym)),
448
- σP0:: Vector = σQ,
449
449
nint_u :: IntVectorOrInt = 0 ,
450
450
σQint_u :: Vector = fill (1 , max (sum (nint_u), 0 )),
451
- σP0int_u :: Vector = σQint_u ,
451
+ σP0int_u :: Vector = fill ( 1 , max ( sum (nint_u), 0 )) ,
452
452
nint_ym :: IntVectorOrInt = default_nint (model, i_ym, nint_u),
453
453
σQint_ym :: Vector = fill (1 , max (sum (nint_ym), 0 )),
454
- σP0int_ym:: Vector = σQint_ym ,
454
+ σP0int_ym:: Vector = fill ( 1 , max ( sum (nint_ym), 0 )) ,
455
455
α:: Real = 1e-3 ,
456
456
β:: Real = 2 ,
457
457
κ:: Real = 0
@@ -669,15 +669,15 @@ ExtendedKalmanFilter estimator with a sample time Ts = 5.0 s, NonLinModel and:
669
669
function ExtendedKalmanFilter (
670
670
model:: SM ;
671
671
i_ym:: IntRangeOrVector = 1 : model. ny,
672
+ σP0:: Vector = fill (1 / model. nx, model. nx),
672
673
σQ :: Vector = fill (1 / model. nx, model. nx),
673
674
σR :: Vector = fill (1 , length (i_ym)),
674
- σP0:: Vector = σQ,
675
675
nint_u :: IntVectorOrInt = 0 ,
676
676
σQint_u :: Vector = fill (1 , max (sum (nint_u), 0 )),
677
- σP0int_u :: Vector = σQint_u ,
677
+ σP0int_u :: Vector = fill ( 1 , max ( sum (nint_u), 0 )) ,
678
678
nint_ym :: IntVectorOrInt = default_nint (model, i_ym, nint_u),
679
679
σQint_ym :: Vector = fill (1 , max (sum (nint_ym), 0 )),
680
- σP0int_ym:: Vector = σQint_ym ,
680
+ σP0int_ym:: Vector = fill ( 1 , max ( sum (nint_ym), 0 )) ,
681
681
) where {NT<: Real , SM<: SimModel{NT} }
682
682
# estimated covariances matrices (variance = σ²) :
683
683
P̂0 = Hermitian (diagm (NT[σP0; σP0int_u; σP0int_ym]. ^ 2 ), :L )
0 commit comments