@@ -187,7 +187,7 @@ function augment_model(model::LinModel, As, Cs; verify_obsv=true)
187187 B̂d = [model. Bd; zeros (nxs,nd)]
188188 D̂d = model. Dd
189189 # observability on Ĉ instead of Ĉm, since it would always return false when nym ≠ ny:
190- if verify_obsv && ! isobservable (Â, Ĉ)
190+ if verify_obsv && ! observability (Â, Ĉ)[ begin ]
191191 error (" The augmented model is unobservable. You may try to use 0 " *
192192 " integrator on model integrating outputs with nint_ym parameter." )
193193 end
@@ -213,22 +213,14 @@ function default_nint(model::LinModel, i_ym)
213213 As , _ , Cs = stoch_ym2y (model, i_ym, Asm, [], Csm, [])
214214 Â , _ , Ĉ = augment_model (model, As, Cs, verify_obsv= false )
215215 # observability on Ĉ instead of Ĉm, since it would always return false when nym ≠ ny
216- isobservable (Â, Ĉ) || (nint_ym[i] = 0 )
216+ isobservable, = observability (Â, Ĉ)
217+ isobservable || (nint_ym[i] = 0 )
217218 end
218219 return nint_ym
219220end
220221" One integrator per measured outputs by default if `model` is not a [`LinModel`](@ref)."
221222default_nint (:: SimModel , i_ym) = fill (1 , length (i_ym))
222223
223- """
224- isobservable(A, C)
225-
226- Verify if the state-space `A` and `C` matrices of are observable.
227-
228- Based on the [Popov-Belevitch-Hautus (PBH) test](https://en.wikipedia.org/wiki/Hautus_lemma).
229- """
230- isobservable (A, C) = all (map (λ-> rank ([λ * I - A; C]) == size (A, 1 ), eigvals (A)))
231-
232224@doc raw """
233225 f̂(estim::StateEstimator, x̂, u, d)
234226
0 commit comments