Polynomial Icon
Mathematical.Polynomial
Polynomial evaluation block (up to cubic).
Evaluates polynomial: y = c0 + c1u + c2u^2 + c3*u^3
Arguments: c0 - Constant term c1 - Linear coefficient c2 - Quadratic coefficient c3 - Cubic coefficient
Usage
PrimitiveComponents.Mathematical.Polynomial(c0=0.0, c1=1.0, c2=0.0, c3=0.0)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
c0 | Polynomial coefficients [c0, c1, c2, c3] | – | 0 |
c1 | – | 1 | |
c2 | – | 0 | |
c3 | – | 0 |
Connectors
u- 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)
Behavior
\[ \begin{align} y\left( t \right) &= \mathtt{c0} + \mathtt{c1} u\left( t \right) + \left( u\left( t \right) \right)^{2} \mathtt{c2} + \left( u\left( t \right) \right)^{3} \mathtt{c3} \end{align} \]
Source
"""
Polynomial evaluation block (up to cubic).
Evaluates polynomial: y = c0 + c1*u + c2*u^2 + c3*u^3
Arguments:
`c0` - Constant term
`c1` - Linear coefficient
`c2` - Quadratic coefficient
`c3` - Cubic coefficient
"""
component Polynomial
"Input signal port"
u = RealInput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 0, "y1": 450, "x2": 100, "y2": 550, "rot": 0}
}
}
}
"Output signal port"
y = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 900, "y1": 450, "x2": 1000, "y2": 550, "rot": 0}
}
}
}
"Polynomial coefficients [c0, c1, c2, c3]"
parameter c0::Real = 0.0
parameter c1::Real = 1.0
parameter c2::Real = 0.0
parameter c3::Real = 0.0
relations
# Evaluate polynomial: y = c0 + c1*u + c2*u^2 + c3*u^3
y = c0 + c1 * u + c2 * u ^ 2 + c3 * u ^ 3
metadata {"Dyad": {"icons": {"default": "dyad://PrimitiveComponents/Polynomial.svg"}}}
end
Flattened Source
"""
Polynomial evaluation block (up to cubic).
Evaluates polynomial: y = c0 + c1*u + c2*u^2 + c3*u^3
Arguments:
`c0` - Constant term
`c1` - Linear coefficient
`c2` - Quadratic coefficient
`c3` - Cubic coefficient
"""
component Polynomial
"Input signal port"
u = RealInput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 0, "y1": 450, "x2": 100, "y2": 550, "rot": 0}
}
}
}
"Output signal port"
y = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 900, "y1": 450, "x2": 1000, "y2": 550, "rot": 0}
}
}
}
"Polynomial coefficients [c0, c1, c2, c3]"
parameter c0::Real = 0.0
parameter c1::Real = 1.0
parameter c2::Real = 0.0
parameter c3::Real = 0.0
relations
# Evaluate polynomial: y = c0 + c1*u + c2*u^2 + c3*u^3
y = c0 + c1 * u + c2 * u ^ 2 + c3 * u ^ 3
metadata {"Dyad": {"icons": {"default": "dyad://PrimitiveComponents/Polynomial.svg"}}}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses
- Tests