SecondOrderSystem
IconSecondOrderSystem
Usage
SecondOrderSystem(k1, k2, k3)
Parameters:
Name | Description | Units | Default value |
---|---|---|---|
k1 | – | ||
k2 | – | ||
k3 | – |
Connectors
xdd
- This connector represents a real signal as an input to a component (RealInput
)
Behavior
\[ \begin{equation} \left[ \begin{array}{c} \mathrm{connect}\left( xdd(t), integrator1_{+}u(t), gain1_{+}u(t) \right) \\ \mathrm{connect}\left( integrator1_{+}y(t), integrator2_{+}u(t), gain2_{+}u(t) \right) \\ \mathrm{connect}\left( integrator2_{+}y(t), gain3_{+}u(t) \right) \\ \mathrm{connect}\left( gain1_{+}y(t), sum_{+}u3(t) \right) \\ \mathrm{connect}\left( gain2_{+}y(t), sum_{+}u2(t) \right) \\ \mathrm{connect}\left( gain3_{+}y(t), sum_{+}u1(t) \right) \\ \frac{\mathrm{d} \mathtt{integrator1.x}\left( t \right)}{\mathrm{d}t} = \mathtt{integrator1.k} \mathtt{integrator1.u}\left( t \right) \\ \mathtt{integrator1.y}\left( t \right) = \mathtt{integrator1.x}\left( t \right) \\ \frac{\mathrm{d} \mathtt{integrator2.x}\left( t \right)}{\mathrm{d}t} = \mathtt{integrator2.k} \mathtt{integrator2.u}\left( t \right) \\ \mathtt{integrator2.y}\left( t \right) = \mathtt{integrator2.x}\left( t \right) \\ \mathtt{gain1.y}\left( t \right) = \mathtt{gain1.k} \mathtt{gain1.u}\left( t \right) \\ \mathtt{gain2.y}\left( t \right) = \mathtt{gain2.k} \mathtt{gain2.u}\left( t \right) \\ \mathtt{gain3.y}\left( t \right) = \mathtt{gain3.k} \mathtt{gain3.u}\left( t \right) \\ \mathtt{sum.y}\left( t \right) = \mathtt{sum.k1} \mathtt{sum.u1}\left( t \right) + \mathtt{sum.k2} \mathtt{sum.u2}\left( t \right) + \mathtt{sum.k3} \mathtt{sum.u3}\left( t \right) \\ \end{array} \right] \end{equation} \]
Source
component SecondOrderSystem
xdd = RealInput() [{"Dyad": {"placement": {"icon": {"x1": -25, "y1": 475, "x2": 25, "y2": 525}}}}]
integrator1 = BlockComponents.Integrator() [{"Dyad": {"placement": {"icon": {"x1": 100, "y1": 100, "x2": 250, "y2": 250}}}}]
integrator2 = BlockComponents.Integrator() [{"Dyad": {"placement": {"icon": {"x1": 350, "y1": 100, "x2": 500, "y2": 250}}}}]
gain1 = BlockComponents.Gain(k = k1) [{"Dyad": {"placement": {"icon": {"x1": 100, "y1": 700, "x2": 250, "y2": 850}}}}]
gain2 = BlockComponents.Gain(k = k2) [{"Dyad": {"placement": {"icon": {"x1": 350, "y1": 400, "x2": 500, "y2": 550}}}}]
gain3 = BlockComponents.Gain(k = k3) [{"Dyad": {"placement": {"icon": {"x1": 600, "y1": 100, "x2": 750, "y2": 250}}}}]
sum = BlockComponents.Add3() [{"Dyad": {"placement": {"icon": {"x1": 850, "y1": 400, "x2": 1000, "y2": 550}}}}]
parameter k1::Real
parameter k2::Real
parameter k3::Real
relations
connect(xdd, integrator1.u, gain1.u) [{
"Dyad": {
"edges": [
{"S": -1, "M": [{"x": 80, "y": 175}], "E": 2},
{"S": -1, "M": [{"x": 80, "y": 775}], "E": 3},
{"S": -1, "E": 1}
],
"junctions": [{"x": 80, "y": 500}]
}
}]
connect(integrator1.y, integrator2.u, gain2.u) [{
"Dyad": {
"edges": [
{"S": -1, "E": 1},
{"S": -1, "E": 2},
{"S": -1, "M": [{"x": 320, "y": 475}], "E": 3}
],
"junctions": [{"x": 320, "y": 175}]
}
}]
connect(integrator2.y, gain3.u) [{"Dyad": {"edges": [{"S": 2, "E": 1}]}}]
connect(gain1.y, sum.u3) [{
"Dyad": {"edges": [{"S": 2, "M": [{"x": 820, "y": 520}, {"x": 820, "y": 775}], "E": 1}]}
}]
connect(gain2.y, sum.u2) [{"Dyad": {"edges": [{"S": 2, "E": 1}]}}]
connect(gain3.y, sum.u1) [{
"Dyad": {"edges": [{"S": 2, "M": [{"x": 820, "y": 430}, {"x": 820, "y": 175}], "E": 1}]}
}]
metadata {
"Dyad": {
"labels": [
{
"label": "Second Order System",
"x": 500,
"y": 50,
"layer": "diagram",
"attrs": {"font-size": "50"}
}
]
}
}
end
Flattened Source
component SecondOrderSystem
xdd = RealInput() [{"Dyad": {"placement": {"icon": {"x1": -25, "y1": 475, "x2": 25, "y2": 525}}}}]
integrator1 = BlockComponents.Integrator() [{"Dyad": {"placement": {"icon": {"x1": 100, "y1": 100, "x2": 250, "y2": 250}}}}]
integrator2 = BlockComponents.Integrator() [{"Dyad": {"placement": {"icon": {"x1": 350, "y1": 100, "x2": 500, "y2": 250}}}}]
gain1 = BlockComponents.Gain(k = k1) [{"Dyad": {"placement": {"icon": {"x1": 100, "y1": 700, "x2": 250, "y2": 850}}}}]
gain2 = BlockComponents.Gain(k = k2) [{"Dyad": {"placement": {"icon": {"x1": 350, "y1": 400, "x2": 500, "y2": 550}}}}]
gain3 = BlockComponents.Gain(k = k3) [{"Dyad": {"placement": {"icon": {"x1": 600, "y1": 100, "x2": 750, "y2": 250}}}}]
sum = BlockComponents.Add3() [{"Dyad": {"placement": {"icon": {"x1": 850, "y1": 400, "x2": 1000, "y2": 550}}}}]
parameter k1::Real
parameter k2::Real
parameter k3::Real
relations
connect(xdd, integrator1.u, gain1.u) [{
"Dyad": {
"edges": [
{"S": -1, "M": [{"x": 80, "y": 175}], "E": 2},
{"S": -1, "M": [{"x": 80, "y": 775}], "E": 3},
{"S": -1, "E": 1}
],
"junctions": [{"x": 80, "y": 500}]
}
}]
connect(integrator1.y, integrator2.u, gain2.u) [{
"Dyad": {
"edges": [
{"S": -1, "E": 1},
{"S": -1, "E": 2},
{"S": -1, "M": [{"x": 320, "y": 475}], "E": 3}
],
"junctions": [{"x": 320, "y": 175}]
}
}]
connect(integrator2.y, gain3.u) [{"Dyad": {"edges": [{"S": 2, "E": 1}]}}]
connect(gain1.y, sum.u3) [{
"Dyad": {"edges": [{"S": 2, "M": [{"x": 820, "y": 520}, {"x": 820, "y": 775}], "E": 1}]}
}]
connect(gain2.y, sum.u2) [{"Dyad": {"edges": [{"S": 2, "E": 1}]}}]
connect(gain3.y, sum.u1) [{
"Dyad": {"edges": [{"S": 2, "M": [{"x": 820, "y": 430}, {"x": 820, "y": 175}], "E": 1}]}
}]
metadata {
"Dyad": {
"labels": [
{
"label": "Second Order System",
"x": 500,
"y": 50,
"layer": "diagram",
"attrs": {"font-size": "50"}
}
]
}
}
end
Test Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses