FirstOrderTest
IconFirstOrderTest
Usage
FirstOrderTest()
Behavior
\[ \begin{align} \mathtt{c.y}\left( t \right) &= \mathtt{pt1.u}\left( t \right) \\ \mathtt{c.y}\left( t \right) &= \mathtt{c.k} \\ \frac{\mathrm{d} \mathtt{pt1.x}\left( t \right)}{\mathrm{d}t} &= \frac{ - \mathtt{pt1.x}\left( t \right) + \mathtt{pt1.k} \mathtt{pt1.u}\left( t \right)}{\mathtt{pt1.T}} \\ \mathtt{pt1.y}\left( t \right) &= \mathtt{pt1.x}\left( t \right) \end{align} \]
Source
component FirstOrderTest
c = Constant(k=1)
pt1 = FirstOrder(k=1.2, T=0.1)
relations
connect(c.y, pt1.u)
metadata {
"JuliaSim": {
"experiments": {},
"tests": {
"case1": {
"stop": 10,
"atol": {"pt1.y": 0.001},
"expect": {"final": {"pt1.y": 1.2}, "signals": ["pt1.y"]}
}
}
}
}
end
Flattened Source
component FirstOrderTest c = Constant(k=1) pt1 = FirstOrder(k=1.2, T=0.1) relations connect(c.y, pt1.u) metadata { "JuliaSim": { "experiments": {}, "tests": { "case1": { "stop": 10, "atol": {"pt1.y": 0.001}, "expect": {"final": {"pt1.y": 1.2}, "signals": ["pt1.y"]} } } } } end