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
The module `Blocks` contains common input-output components, referred to as blocks.
3
-
4
-
In general, input-output blocks follow the convention
5
-
```
6
-
┌───────────┐
7
-
u │ ẋ=f(x,u) │ y
8
-
────►│ y=g(x,u) ├────►
9
-
│ │
10
-
└───────────┘
11
-
```
12
-
where `u` are inputs, `x` are state variables and `y` are outputs. `x,u,y` are all implemented as `@variables` internally, `u` are marked as `[input=true]` and `y` are marked `[output=true]`.
13
3
"""
14
4
module Blocks
15
5
using ModelingToolkit, Symbolics, IfElse, OrdinaryDiffEq
6
+
using IfElse: ifelse
16
7
17
8
@parameters t
18
-
Dₜ =Differential(t)
9
+
D =Differential(t)
10
+
11
+
export RealInput, RealOutput, SISO
12
+
include("utils.jl")
19
13
20
-
export Gain, Sum
14
+
export Gain, Sum, MatrixGain, Sum, Feedback, Add, Product, Division
0 commit comments