-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I use delayed systems quite a bit and I love the functionality of named systems when plotting. I was wondering what your thoughts were on creating a named delayed system type (continuous)?
Take the following example of how I currently use named systems with delays:
using ControlSystems, RobustAndOptimalControl
# create named state space plant
P = ss([1 0; 0 -1], [0; 1], [1 0], 0)
P_named = named_ss(P, x=[:pos, :vel], u=[:force], y=[:pos])
# create delayed system (input is delayed)
D = c2d(delay(0.1), 0.05)
D_named = named_ss(D, y=:force, u=:force_cmd)
P_delayed = c2d(P_named, 0.05) * D_named
NamedStateSpace{Discrete{Float64}, Float64}
A =
1.051271096376024 0.0 0.0 0.0
0.0 0.9512294245007141 0.04877057549928599 0.0
0.0 0.0 0.0 1.0
0.0 0.0 0.0 0.0
B =
0.0
0.0
0.0
1.0
C =
1.0 0.0 0.0 0.0
D =
0.0
Sample Time: 0.05 (seconds)
Discrete-time state-space model
With state names: pos vel x1 x2
input names: force_cmd
output names: pos
Ideally, however, because I normally leave systems in continuous form, it would be great if this worked:
P_delayed = P_named * delay(0.1)
I'm not an expert of how delays are internally handle so if I'm missing something obvious please let me know!
Thanks
Metadata
Metadata
Assignees
Labels
No labels