Open bryaan opened 1 year ago
Why won't LsimWorkspace work with a discrete transfer function specified as system?
MSD = tf([2000.0],[1600.0, 40, 1]) sys = MSD Ts = 250000 dsys = c2d(sys, Ts) ws = LsimWorkspace(dsys, length(datetimes)) y, t, x, uout = lsim!(ws, dsys,u,t) MethodError: no method matching LsimWorkspace(::TransferFunction{Discrete{Int64}, ControlSystemsBase.SisoRational{Float64}}, ::Int64) Closest candidates are: LsimWorkspace(::AbstractStateSpace, ::Int64) at ~/.julia/packages/ControlSystemsBase/eWEYr/src/timeresp.jl:26
You cannot simulate a transfer function, under the hood, transfer functions are always converted to statespace before simulation. To create the workspace, you have to convert to statespace yourself first.
Why won't LsimWorkspace work with a discrete transfer function specified as system?