Skip to content

Commit aec29fe

Browse files
committed
handle named systems in LQGProblem construction
1 parent 81bb155 commit aec29fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lqg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function LQGProblem(
105105
iszero(sys.D12) || error("When providing quadratic penatly matrices, non-zero D12 is not supported since it is not clear how to interpret the control input cost. Consider using the H2 interface instead.")
106106
iszero(sys.D21) || error("When providing covariance matrices, non-zero D21 is not supported since it is not clear how to interpret the measurement noise. Consider using the H2 interface instead.")
107107
else
108-
sys = ExtendedStateSpace(sys, B1=I, C1=I)
108+
sys = ExtendedStateSpace(sys isa NamedStateSpace ? ss(sys) : sys, B1=I, C1=I)
109109
end
110110
@unpack B1, C1, C2 = sys
111111
Q1 = Q1 isa AbstractVector ? diagm(Q1) : Q1

0 commit comments

Comments
 (0)