RobustAndOptimalControl.jl Named State Space With Time Delay

Is there a way to make a named state space model with a time delay? The following code produces an error:

julia> named_ss(ss(-1, 1, I, 0)) * delay(0.1)
ERROR: promotion of types NamedStateSpace{Continuous, StateSpace{Continuous, Int64}} and DelayLtiSystem{Float64, Float64} failed to change any arguments
Stacktrace:
 [1] error(::String, ::String, ::String)
   @ Base ./error.jl:44
 [2] sametype_error(input::Tuple{NamedStateSpace{Continuous, StateSpace{Continuous, Int64}}, DelayLtiSystem{Float64, Float64}})
   @ Base ./promotion.jl:405
 [3] not_sametype(x::Tuple{NamedStateSpace{Continuous, StateSpace{Continuous, Int64}}, DelayLtiSystem{Float64, Float64}}, y::Tuple{NamedStateSpace{Continuous, StateSpace{Continuous, Int64}}, DelayLtiSystem{Float64, Float64}})
   @ Base ./promotion.jl:399
 [4] promote
   @ ./promotion.jl:382 [inlined]
 [5] *(sys1::NamedStateSpace{Continuous, StateSpace{Continuous, Int64}}, sys2::DelayLtiSystem{Float64, Float64})
   @ ControlSystemsBase ~/.julia/packages/ControlSystemsBase/CUXI9/src/types/Lti.jl:4
 [6] top-level scope
   @ REPL[16]:1

This same code will work if its not a named state space system. Any help is appreciated.

Cheers.

NamedStateSpace does not support delays at the moment. It’s on my long-term wishlist to implement a type that supports all the different features currently scattered around multiple different subtypes of AbstractStateSpace, but for now this is unfortunately not supported :frowning:

1 Like

Cheers, no problem at all.