Closed scls19fr closed 7 months ago
u
must a function of the state x
and time t
: see https://juliacontrol.github.io/ControlSystems.jl/stable/lib/timefreqresponse/#ControlSystemsBase.lsim-Tuple{AbstractStateSpace,%20AbstractVecOrMat,%20AbstractVector}
u = (x, t) -> (t < t0 ? 0 : 1)
this is function of the state x
and time t
but it raises now
u must be a vector of size (1,)
Sorry for my questions!
u = (x, t) -> (t < t0 ? [0] : [1])
works fine but is quite tricky (especially when dealing with SISO systems
t = 0:0.01:10
t0 = 1.0
u = (x, t) -> (t < t0 ? [0] : [1])
res = lsim(T1, u, t)
plot(res, label=["output" "input"], plotu=true, sp=[2 1])
Try
u = (x, t) -> [t < t0]
Thanks
u = (x, t) -> 2 * [t > t0]
works fine
Hello,
plots
but
raises
PS : but it works fine with pade https://github.com/JuliaControl/ControlSystems.jl/blob/0d825400f1fd0126a4ccaa63408ba2b38351d47a/lib/ControlSystemsBase/src/delay_systems.jl#L128-L134