Skip to content

Commit

Permalink
Merge pull request #2921 from SciML/lin2
Browse files Browse the repository at this point in the history
fix some cosmetics in docs
  • Loading branch information
baggepinnen authored Aug 2, 2024
2 parents c097085 + f0249cf commit 3cef655
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/src/basics/InputOutput.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ An input-output system is a system on the form
\begin{aligned}
M \dot x &= f(x, u, p, t) \\
y &= g(x, u, p, t)
\end{aligned}
```

where ``x`` is the state, ``u`` is the input and ``y`` is an output (in some contexts called an _observed variables_ in MTK).
Expand All @@ -23,7 +24,7 @@ This documentation page lists utilities that are useful for working with inputs

## Generating a dynamics function with inputs, ``f``

ModelingToolkit can generate the dynamics of a system, the function ``M\dot X = f(x, u, p, t)`` above, such that the user can pass not only the state ``x`` and parameters ``p`` but also an external input ``u``. To this end, the function [`generate_control_function`](@ref) exists.
ModelingToolkit can generate the dynamics of a system, the function ``M\dot x = f(x, u, p, t)`` above, such that the user can pass not only the state ``x`` and parameters ``p`` but also an external input ``u``. To this end, the function [`generate_control_function`](@ref) exists.

This function takes a vector of variables that are to be considered inputs, i.e., part of the vector ``u``. Alongside returning the function ``f``, [`generate_control_function`](@ref) also returns the chosen state realization of the system after simplification. This vector specifies the order of the state variables ``x``, while the user-specified vector `u` specifies the order of the input variables ``u``.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/basics/Linearization.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ using ModelingToolkit: inputs, outputs

!!! note "Inputs must be unconnected"

The model above has 4 variables but only three equations, there is no equation specifying the value of `r` since `r` is an input. This means that only unbalanced models can be linearized, or in other words, models that are balanced and can be simulated _cannot_ be linearized. To learn more about this, see https://www.youtube.com/watch?v=-XOux-2XDGI&t=395s. Also see [ModelingToolkitStandardLibrary: Linear analysis](https://docs.sciml.ai/ModelingToolkitStandardLibrary/stable/API/linear_analysis/) for utilities that make linearization of completed models easier.
The model above has 4 variables but only three equations, there is no equation specifying the value of `r` since `r` is an input. This means that only unbalanced models can be linearized, or in other words, models that are balanced and can be simulated _cannot_ be linearized. To learn more about this, see [How to linearize a ModelingToolkit model (YouTube)](https://www.youtube.com/watch?v=-XOux-2XDGI&t=395s). Also see [ModelingToolkitStandardLibrary: Linear analysis](https://docs.sciml.ai/ModelingToolkitStandardLibrary/stable/API/linear_analysis/) for utilities that make linearization of completed models easier.

!!! note "Un-simplified system"

Expand Down

0 comments on commit 3cef655

Please sign in to comment.