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
Copy file name to clipboardExpand all lines: src/lqg.jl
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -179,13 +179,13 @@ function LQGProblem(P::ExtendedStateSpace)
179
179
end
180
180
181
181
function ControlSystemsBase.kalman(l::LQGProblem; direct =false)
182
-
@unpack A, C2, B1, R1, qR, B2, R2, SR = l
182
+
(; A, C2, B1, R1, qR, B2, R2, SR)= l
183
183
# We do not apply the transformation D21*R2*D21' since when the user has provided an ESS, R2 == D21*D21', and when the user provides covariance matrices, R2 is provided directly.
184
184
K =kalman(l.timeevol, A, C2, Hermitian(B1*R1*B1'+ qR * B2 * B2'), R2, SR; direct)
185
185
end
186
186
187
187
function ControlSystemsBase.lqr(l::LQGProblem)
188
-
@unpack A, B2, C1, Q1, qQ, C2, Q2, SQ = l
188
+
(; A, B2, C1, Q1, qQ, C2, Q2, SQ)= l
189
189
L =lqr(l.timeevol, A, B2, Hermitian(C1'Q1*C1 + qQ * C2'C2), Q2, SQ)
190
190
end
191
191
@@ -292,7 +292,7 @@ system_mapping(Ce) == -C
292
292
Please note, without the reference pre-filter, the DC gain from references to controlled outputs may not be identity. If a vector of output indices is provided through the keyword argument `z`, the closed-loop system from state reference `xᵣ` to outputs `z` is returned as a second return argument. The inverse of the DC-gain of this closed-loop system may be useful to compensate for the DC-gain of the controller.
0 commit comments