@@ -26,59 +26,69 @@ ssrand(T::Type, n; kwargs...) = ssrand(T, n, n, 2*n; kwargs...)
26
26
27
27
28
28
"""
29
- systemdepot(sysname::String; Ts=nothing, kwargs...)
29
+ DemoSystems
30
30
31
- Convenience function for setting up some different systems
32
- that are commonly used as examples in the control literature.
31
+ A module containing some different systems that are commonly used as examples in the control literature.
33
32
34
- Change the default parameter values by using keyword arguments.
33
+ Change the default parameter values using keyword arguments.
35
34
36
35
SISO systems
37
36
============
38
- 1) `fo ` First-order system `1/(sT+1)`
39
- 2) ` fotd` First-order system with time- delay `exp(-sτ)/(sT+1)`
40
- 3) ` sotd` Second-order non-resonant system with time- delay `exp(-sτ)/(sT+1)/(sT2 + 1)`
41
- 4) ` resonant` Second-order resonant systems `ω0^2/(s^2 + 2ζ*ω0*s + ω0^2)`
37
+ * `DemoSystems.fo(;T=1) ` First-order system `1/(sT+1)`
38
+ * `DemoSystems. fotd(;T=1, τ=1) ` First-order system with time delay `exp(-sτ)/(sT+1)`
39
+ * `DemoSystems. sotd(;T=1, T2=10, τ=1) ` Second-order non-resonant system with time delay `exp(-sτ)/(sT+1)/(sT2 + 1)`
40
+ * `DemoSystems. resonant(;ω0=1, ζ=0.25) ` Second-order resonant systems `ω0^2/(s^2 + 2ζ*ω0*s + ω0^2)`
42
41
43
42
MIMO systems
44
43
============
45
- 5) `woodberry` Wood--Berry distillation column
46
- 6) `doylesat` Doyle's spinning body example
47
- """
48
- function systemdepot (sysname:: String ; Ts= nothing , kwargs... )
49
- if sysname == " woodberry" # The Wood--Berry distillation column
50
- sys = woodberry (;kwargs... )
51
- elseif sysname == " fotd"
52
- sys = fotd (;kwargs... )
53
- elseif sysname == " sotd"
54
- sys = sotd (;kwargs... )
55
- elseif sysname == " fo"
56
- sys = first_order_system (;kwargs... )
57
- elseif sysname == " resonant"
58
- sys = resonant (;kwargs... )
59
- elseif sysname == " doylesat"
60
- sys = doylesat (;kwargs... )
61
- else
62
- error (" Unknown system name: $sysname " )
63
- end
44
+ * `DemoSystems.woodberry()` Wood--Berry distillation column
45
+ * `DemoSystems.doylesat(;a=10)` The spinning body example by Doyle
64
46
65
- if isnothing (Ts)
66
- return sys
67
- else
68
- Tsc2d (sys, Ts)
69
- end
70
- end
47
+ Fore more information, see the help for the specific systems.
48
+ """
49
+ module DemoSystems
50
+
51
+ using ControlSystems
52
+ using LinearAlgebra
53
+
54
+
55
+ """
56
+ fo(;T=1, τ=1)
71
57
72
- first_order_system (;T= 1 ) = ss (- 1 / T, 1 , 1 / T, 0 )
58
+ Returns a first-order system `1/(sT+1)` (`StateSpace`).
59
+ """
60
+ fo (;T= 1 ) = ss (- 1 / T, 1 , 1 / T, 0 )
61
+
62
+
63
+ """
64
+ fotd(;T=1, τ=1)
65
+
66
+ Returns a first-order system + a time delay `exp(-sτ)/(sT+1)` (`DelayLTISystem`).
67
+ """
73
68
fotd (;T= 1 , τ= 1 ) = ss (- 1 / T, 1 , 1 / T, 0 ) * delay (τ)
69
+
70
+
71
+ """
72
+ sotd(;T=1, T2=10, τ=1)
73
+
74
+ Returns a second-order system + a time delay `exp(-sτ)/(sT+1)/(sT2 + 1)` (`DelayLTISystem`).
75
+ """
74
76
sotd (;T= 1 , T2= 10 , τ= 1 ) = ss (- 1 / T, 1 , 1 / T, 0 )* ss (- 1 / T2, 1 , 1 / T2, 0 )* delay (τ)
77
+
78
+
79
+ """
80
+ resonant(;ω0=1, ζ=0.25)
81
+
82
+ Returns a second-order system + a time delay `exp(-sτ)/(sT+1)/(sT2 + 1)` (`DelayLTISystem`).
83
+ """
75
84
resonant (;ω0= 1 , ζ= 0.25 ) = ss ([- ζ - ω0; ω0 - ζ], [ω0; 0 ], [0 ω0], 0 ) # QUESTION: Is this the form that we like? Perhhaps not.
76
85
77
86
78
87
"""
79
- Doyle's spinning body (satellite) example
80
- ======================
81
- A classic example that illustrates that robustness analysis of MIMO systems
88
+ `doylesat(;a=10) = ss([0 a; -a 0], I(2), [1 a; -a 1], 0)`
89
+
90
+ Returns a model for the spinning body (satellite) example by Doyle,
91
+ which is a classic example that illustrates that robustness analysis of MIMO systems
82
92
is more involved than for SISO systems.
83
93
84
94
*References:*
@@ -93,9 +103,9 @@ doylesat(;a=10) = ss([0 a; -a 0], I(2), [1 a; -a 1], 0)
93
103
94
104
95
105
"""
96
- Wood--Berry distillation column
97
- ======================
98
- A classic example from the literature on process control of MIMO process.
106
+ `woodberry()`
107
+
108
+ Returns a model for the Wood--Berry distillation column, which is a classic example from the literature on process control of MIMO process.
99
109
100
110
*References:*
101
111
@@ -108,3 +118,6 @@ function woodberry()
108
118
return [12.8 / (1 + 16.7 * s)* delay (1.0 ) - 18.9 / (1 + 21 * s) * delay (3.0 )
109
119
6.6 / (1 + 10.9 * s) * delay (7.0 ) - 19.4 / (1 + 14.4 * s) * delay (3.0 )]
110
120
end
121
+
122
+
123
+ end
0 commit comments