LIBRARY
Examples.FirstOrderLoadPlant ​
First-order plant G(s) = k / (T s + 1) with a load disturbance added at the input.
Usage ​
MPCComponents.Examples.FirstOrderLoadPlant(T=10.0, k=1.0)
Parameters: ​
| Name | Description | Units | Default value |
|---|---|---|---|
T | – | 10.0 | |
k | – | 1.0 |
Connectors ​
u- This connector represents a real signal as an input to a component (RealInput)d- This connector represents a real signal as an input to a component (RealInput)y- This connector represents a real signal as an output from a component (RealOutput)
Variables ​
| Name | Description | Units |
|---|---|---|
x | – |
Behavior ​
Behavior of this component cannot be rendered because it includes path variables.
Source ​
dyad
"First-order plant G(s) = k / (T s + 1) with a load disturbance added at the input."
component FirstOrderLoadPlant
"Control input"
u = RealInput() {
"Dyad": {"placement": {"diagram": {"x1": -100, "x2": 0, "y1": 650, "y2": 750}}}
}
"Load disturbance acting at the input"
d = RealInput() {
"Dyad": {"placement": {"diagram": {"x1": -100, "x2": 0, "y1": 220, "y2": 320}}}
}
"Output"
y = RealOutput() {
"Dyad": {"placement": {"diagram": {"x1": 1000, "x2": 1100, "y1": 450, "y2": 550}}}
}
parameter T::Real = 10.0
parameter k::Real = 1.0
variable x::Real(initial = 0.0)
relations
der(x) = (k * (u + d) - x) / T
y = x
metadata {
"Dyad": {
"icons": {"default": "dyad://MPCComponents/FirstOrderLoadPlant.svg"},
"doc": {"behavior": false}
}
}
endFlattened Source
dyad
"First-order plant G(s) = k / (T s + 1) with a load disturbance added at the input."
component FirstOrderLoadPlant
"Control input"
u = RealInput() {
"Dyad": {"placement": {"diagram": {"x1": -100, "x2": 0, "y1": 650, "y2": 750}}}
}
"Load disturbance acting at the input"
d = RealInput() {
"Dyad": {"placement": {"diagram": {"x1": -100, "x2": 0, "y1": 220, "y2": 320}}}
}
"Output"
y = RealOutput() {
"Dyad": {"placement": {"diagram": {"x1": 1000, "x2": 1100, "y1": 450, "y2": 550}}}
}
parameter T::Real = 10.0
parameter k::Real = 1.0
variable x::Real(initial = 0.0)
relations
der(x) = (k * (u + d) - x) / T
y = x
metadata {
"Dyad": {
"icons": {"default": "dyad://MPCComponents/FirstOrderLoadPlant.svg"},
"doc": {"behavior": false}
}
}
endTest Cases ​
No test cases defined.
Related ​
Examples
Experiments
Analyses