Skip to content

Commit 5094c76

Browse files
committed
fix LF augmentation with subset of inputs
1 parent abe38c9 commit 5094c76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/model_augmentation.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ function add_low_frequency_disturbance(sys::AbstractStateSpace, Cd::Union{Nothin
7878
Cd === nothing && (Cd = I(ny))
7979
add_measurement_disturbance(sys, Ad, Cd)
8080
else
81-
Ad = -ϵ*I(nu)
82-
isdiscrete(sys) && (Ad += I)
8381
Cd === nothing && (Cd = sys.B)
82+
Ad = -ϵ*I(size(Cd, 2)) # We use the size of Cd here in case not all inputs are augmented
83+
isdiscrete(sys) && (Ad += I)
8484
add_disturbance(sys, Ad, Cd)
8585
end
8686
end

0 commit comments

Comments
 (0)