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/API/linear_analysis.md
+22-8Lines changed: 22 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,8 @@ Linear analysis refers to the process of linearizing a nonlinear model and analy
7
7
8
8
-[`get_sensitivity`](@ref) get the [sensitivity function (wiki)](https://en.wikipedia.org/wiki/Sensitivity_(control_systems)), $S(s)$, as defined in the field of control theory.
9
9
-[`get_comp_sensitivity`](@ref) get the complementary sensitivity function $T(s) : S(s)+T(s)=1$.
10
-
-[`get_looptransfer`](@ref) get the (open) loop-transfer function where the loop starts and ends in the analysis point.
11
-
-[`linearize`](@ref) can be called with two analysis points denoting the input and output of the linearized system. Parts of the model not appearing between the input and output will be removed.
10
+
-[`get_looptransfer`](@ref) get the (open) loop-transfer function where the loop starts and ends in the analysis point. For a typical simple feedback connection with a plant $P(s)$ and a controller $C(s)$, the loop-transfer function at the plant output is $P(s)C(s)$.
11
+
-[`linearize`](@ref) can be called with two analysis points denoting the input and output of the linearized system.
12
12
-[`open_loop`](@ref) return a new (nonlinear) system where the loop has been broken in the analysis point, i.e., the connection the analysis point usually implies has been removed.
13
13
14
14
An analysis point can be created explicitly using the constructor [`AnalysisPoint`](@ref), or automatically when connecting two causal components using `connect`:
@@ -52,7 +52,7 @@ We create `ControlSystemsBase.StateSpace` objects using
this particular transfer function should be equivalent to the linear system `P`, i.e., equivalent to this call
85
-
```@example LINEAR_ANALYSIS
86
-
@unpack input, output = P # To get the correct namespace
87
-
linearize(P, [input.u], [output.u])[1]
84
+
this particular transfer function should be equivalent to the linear system `P(s)S(s)`, i.e., equivalent to
85
+
```@example LINEAR_ANALYSIS_CS
86
+
feedback(P, C)
87
+
```
88
+
89
+
### Obtaining transfer functions
90
+
A statespace system from [ControlSystemsBase](https://juliacontrol.github.io/ControlSystems.jl/latest/man/creating_systems/) can be converted to a transfer function using the function `tf`:
91
+
```@example LINEAR_ANALYSIS_CS
92
+
tf(S)
88
93
```
89
94
95
+
## Gain and phase margins
96
+
Further linear analysis can be performed using the [analysis methods from ControlSystemsBase](https://juliacontrol.github.io/ControlSystems.jl/latest/lib/analysis/). For example, calculating the gain and phase margins of a system can be done using
97
+
```@example LINEAR_ANALYSIS_CS
98
+
margin(P)
99
+
```
100
+
(they are infinite for this system). A Nyquist plot can be produced using
0 commit comments