SecondOrderTest
IconSecondOrderTest
Usage
SecondOrderTest()
Behavior
\[ \begin{align} \mathtt{c.y}\left( t \right) &= \mathtt{pt2.u}\left( t \right) \\ \mathtt{c.y}\left( t \right) &= \mathtt{c.k} \\ \frac{\mathrm{d} \mathtt{pt2.x}\left( t \right)}{\mathrm{d}t} &= \mathtt{pt2.xd}\left( t \right) \\ \frac{\mathrm{d} \mathtt{pt2.xd}\left( t \right)}{\mathrm{d}t} &= \left( - 2 \mathtt{pt2.d} \mathtt{pt2.xd}\left( t \right) + \left( - \mathtt{pt2.x}\left( t \right) + \mathtt{pt2.k} \mathtt{pt2.u}\left( t \right) \right) \mathtt{pt2.w} \right) \mathtt{pt2.w} \\ \mathtt{pt2.y}\left( t \right) &= \mathtt{pt2.x}\left( t \right) \end{align} \]
Source
component SecondOrderTest
c = Constant(k=1)
pt2 = SecondOrder(k=1.0, w=1.0, d=0.5)
relations
connect(c.y, pt2.u)
metadata {
"JuliaSim": {
"experiments": {},
"tests": {
"case1": {
"stop": 10,
"initial": {"pt2.xd": 0},
"atol": {"pt2.y": 0.01},
"expect": {"final": {"pt2.y": 1}, "signals": ["pt2.y"]}
}
}
}
}
end
Flattened Source
component SecondOrderTest c = Constant(k=1) pt2 = SecondOrder(k=1.0, w=1.0, d=0.5) relations connect(c.y, pt2.u) metadata { "JuliaSim": { "experiments": {}, "tests": { "case1": { "stop": 10, "initial": {"pt2.xd": 0}, "atol": {"pt2.y": 0.01}, "expect": {"final": {"pt2.y": 1}, "signals": ["pt2.y"]} } } } } end