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/basics/Linearization.md
+8-2
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ y &= Cx + Du
15
15
\end{aligned}
16
16
```
17
17
18
-
The `linearize` function expects the user to specify the inputs ``u`` and the outputs ``u`` using the syntax shown in the example below:
18
+
The `linearize` function expects the user to specify the inputs ``u`` and the outputs ``u`` using the syntax shown in the example below. The system model is *not* supposed to be simplified before calling `linearize`:
19
19
20
20
## Example
21
21
@@ -43,12 +43,15 @@ using ModelingToolkit: inputs, outputs
43
43
44
44
## Operating point
45
45
46
-
The operating point to linearize around can be specified with the keyword argument `op` like this: `op = Dict(x => 1, r => 2)`.
46
+
The operating point to linearize around can be specified with the keyword argument `op` like this: `op = Dict(x => 1, r => 2)`. The operating point may include specification of state variables, input variables and parameters. For variables that are not specified in `op`, the default value specified in the model will be used if available, if no value is specified, an error is thrown.
47
47
48
48
## Batch linearization and algebraic variables
49
49
50
50
If linearization is to be performed around multiple operating points, the simplification of the system has to be carried out a single time only. To facilitate this, the lower-level function [`ModelingToolkit.linearization_function`](@ref) is available. This function further allows you to obtain separate Jacobians for the differential and algebraic parts of the model. For ODE models without algebraic equations, the statespace representation above is available from the output of `linearization_function` as `A, B, C, D = f_x, f_u, h_x, h_u`.
51
51
52
+
## Symbolic linearization
53
+
The function [`ModelingToolkit.linearize_symbolic`](@ref) works simiar to [`ModelingToolkit.linearize`](@ref) but returns symbolic rather than numeric Jacobians. Symbolic linearization have several limitations and no all systems that can be linearized numerically can be linearized symbolically.
54
+
52
55
## Input derivatives
53
56
54
57
Physical systems are always *proper*, i.e., they do not differentiate causal inputs. However, ModelingToolkit allows you to model non-proper systems, such as inverse models, and may sometimes fail to find a realization of a proper system on proper form. In these situations, `linearize` may throw an error mentioning
@@ -65,11 +68,14 @@ If the modeled system is actually proper (but MTK failed to find a proper realiz
65
68
66
69
[ModelingToolkitStandardLibrary](https://docs.sciml.ai/ModelingToolkitStandardLibrary/stable/) contains a set of [tools for more advanced linear analysis](https://docs.sciml.ai/ModelingToolkitStandardLibrary/stable/API/linear_analysis/). These can be used to make it easier to work with and analyze causal models, such as control and signal-processing systems.
0 commit comments