We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 823fd78 commit b9e6d6dCopy full SHA for b9e6d6d
src/model/linmodel.jl
@@ -229,7 +229,9 @@ disturbances ``\mathbf{d_0 = d - d_{op}}``. The Moore-Penrose pseudo-inverse com
229
``\mathbf{(I - A)^{-1}}`` to support integrating `model` (integrator states will be 0).
230
"""
231
function steadystate!(model::LinModel, u, d)
232
- model.x .= pinv(I - model.A)*(model.Bu*(u - model.uop) + model.Bd*(d - model.dop))
+ M = I - model.A
233
+ rtol = sqrt(eps(real(float(oneunit(eltype(M)))))) # pinv docstring recommendation
234
+ model.x .= pinv(M; rtol)*(model.Bu*(u - model.uop) + model.Bd*(d - model.dop))
235
return nothing
236
end
237
0 commit comments