You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/index.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ pkg> add ControlSystemsMTK
21
21
22
22
23
23
## From ControlSystems to ModelingToolkit
24
-
Simply calling `ODESystem(sys)` converts a `StateSpace` object from ControlSystems into the corresponding [`ModelingToolkitStandardLibrary.Blocks.StateSpace`](http://mtkstdlib.sciml.ai/dev/API/blocks/#ModelingToolkitStandardLibrary.Blocks.StateSpace). If `sys` is a [named statespace object](https://juliacontrol.github.io/RobustAndOptimalControl.jl/dev/#Named-systems), the names of inputs and outputs will be retained in the `ODESystem` as connectors, that is, if `my_input` is an input variable in the named statespace object, `my_input` will be a connector of type `RealInput` in the resulting ODESystem. Names of state variables are currently ignored.
24
+
Simply calling `System(sys)` converts a `StateSpace` object from ControlSystems into the corresponding [`ModelingToolkitStandardLibrary.Blocks.StateSpace`](http://mtkstdlib.sciml.ai/dev/API/blocks/#ModelingToolkitStandardLibrary.Blocks.StateSpace). If `sys` is a [named statespace object](https://juliacontrol.github.io/RobustAndOptimalControl.jl/dev/#Named-systems), the names of inputs and outputs will be retained in the `System` as connectors, that is, if `my_input` is an input variable in the named statespace object, `my_input` will be a connector of type `RealInput` in the resulting System. Names of state variables are currently ignored.
25
25
26
26
### Example:
27
27
@@ -41,7 +41,7 @@ D =
41
41
42
42
Continuous-time state-space model
43
43
44
-
julia>@named P =ODESystem(P0)
44
+
julia>@named P =System(P0)
45
45
Model P with 2 equations
46
46
States (3):
47
47
x[1](t) [defaults to 0.0]
@@ -65,15 +65,15 @@ using ControlSystemsMTK, ControlSystemsBase, ModelingToolkit, RobustAndOptimalCo
65
65
P = named_ss(DemoSystems.double_mass_model(outputs = [1,3]), u=:torque, y=[:motor_angle, :load_angle])
66
66
```
67
67
68
-
When we convert this system to an ODESystem, we get a system with connectors `P.torque` and `P.motor_angle`, in addition to the standard connectors `P.input` and `P.output`:
68
+
When we convert this system to a `System`, we get a system with connectors `P.torque` and `P.motor_angle`, in addition to the standard connectors `P.input` and `P.output`:
69
69
```@example CONNECT
70
-
@named P_ode = ODESystem(P)
70
+
@named P_ode = System(P)
71
71
```
72
72
Here, `P.torque` is equal to `P.input`, so you may choose to connect to either of them. However, since the output is multivariable, the connector `P.output` represents both outputs, while `P.motor_angle` and `P.load_angle` represent the individual scalar outputs.
73
73
74
74
75
75
## From ModelingToolkit to ControlSystems
76
-
An `ODESystem` can be converted to a named statespace object from [RobustAndOptimalControl.jl](https://github.com/JuliaControl/RobustAndOptimalControl.jl) by calling [`named_ss`](@ref)
76
+
A `System` can be converted to a named statespace object from [RobustAndOptimalControl.jl](https://github.com/JuliaControl/RobustAndOptimalControl.jl) by calling [`named_ss`](@ref)
77
77
78
78
```julia
79
79
named_ss(ode_sys, inputs, outputs; op)
@@ -167,9 +167,9 @@ function SystemModel(u=nothing; name=:model)
167
167
]
168
168
if u !== nothing
169
169
push!(eqs, connect(u.output, :u, torque.tau))
170
-
return @named model = ODESystem(eqs, t; systems = [sens, torque, inertia1, inertia2, spring, damper, u])
170
+
return @named model = System(eqs, t; systems = [sens, torque, inertia1, inertia2, spring, damper, u])
Copy file name to clipboardExpand all lines: src/ControlSystemsMTK.jl
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ using RobustAndOptimalControl: NamedStateSpace
3
3
#=
4
4
Ideas: All connections handled by ModelingToolkit.
5
5
Names:
6
-
- handled either by named system, or directly in constructor to ODESystem.
6
+
- handled either by named system, or directly in constructor to System.
7
7
Functions:
8
8
- Give me linear system from [u1, u3] to [qm, a]
9
9
If the linearization of a full system produces a named system, one could implement getindex for vectors of names and obtain the desired transfer functions.
@@ -20,7 +20,7 @@ using ModelingToolkit, ControlSystemsBase
20
20
using ControlSystemsBase: ssdata, AbstractStateSpace, Continuous, nstates, noutputs, ninputs
21
21
# using ControlSystemIdentification
22
22
using RobustAndOptimalControl, MonteCarloMeasurements
0 commit comments