DiscreteTransferFunction Icon
DiscretePrimitives.DiscreteTransferFunction
DiscreteTransferFunction(; name, dt, n_num, n_den, num, den, ic=0.0, _...)Implements a discrete transfer function in controller canonical form:
\[H(z) = \frac{b_0 + b_1z^{-1} + ... + b_{n_num}z^{-(n_num)}}{a_0 + a_1z^{-1} + ... + a_{n_den-1}z^{-(n_den)}}\]
- Arguments
ic initializes the internal delay/state memory (previous-tick values) to ic dt is the sample time of the discrete transfer function n_num is the number of numerator coefficients n_den is the number of denominator coefficients num is a vector of numerator coefficients den is a vector of denominator coefficients
Usage
PrimitiveComponents.DiscretePrimitives.DiscreteTransferFunction(ic=0.0)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
dt | – | ||
n_num | – | ||
n_den | – | ||
num | – | ||
den | – | ||
ic | – | 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
Behavior of this component cannot be rendered because it includes path variables.
Source
"""
DiscreteTransferFunction(; name, dt, n_num, n_den, num, den, ic=0.0, _...)
Implements a discrete transfer function in controller canonical form:math H(z) = \frac{b0 + b1z^{-1} + ... + b{nnum}z^{-(nnum)}}{a0 + a1z^{-1} + ... + a{nden-1}z^{-(nden)}}
- Arguments
`ic` initializes the internal delay/state memory (previous-tick values) to `ic`
`dt` is the sample time of the discrete transfer function
`n_num` is the number of numerator coefficients
`n_den` is the number of denominator coefficients
`num` is a vector of numerator coefficients
`den` is a vector of denominator coefficients
"""</span>
<span class="hljs-keyword">external</span> <span class="hljs-keyword">component</span> DiscreteTransferFunction
<span class="hljs-symbol">u</span> = <span>Dyad.RealInput</span>() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": -40, "y1": 480, "x2": 0, "y2": 520, "rot": 0},
"diagram": {"iconName": "default", "x1": -40, "y1": 480, "x2": 0, "y2": 520, "rot": 0}
}
}
}
<span class="hljs-symbol">y</span> = <span>Dyad.RealOutput</span>() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": 1010, "y1": 480, "x2": 1050, "y2": 520, "rot": 0},
"diagram": {"iconName": "default", "x1": 1010, "y1": 480, "x2": 1050, "y2": 520, "rot": 0}
}
}
}
<span class="hljs-keyword">structural</span> <span class="hljs-symbol">dt</span>::<span>Real</span>
<span class="hljs-keyword">structural</span> <span class="hljs-symbol">n_num</span>::<span>Integer</span>
<span class="hljs-keyword">structural</span> <span class="hljs-symbol">n_den</span>::<span>Integer</span>
<span class="hljs-keyword">structural</span> <span class="hljs-symbol">num</span>::<span>Real</span>[n_num]
<span class="hljs-keyword">structural</span> <span class="hljs-symbol">den</span>::<span>Real</span>[n_den]
<span class="hljs-keyword">parameter</span> <span class="hljs-symbol">ic</span>::<span>Real</span> = 0.0
<span class="hljs-keyword">relations</span>
<span class="hljs-keyword">metadata</span> {"Dyad": {"doc": {"behavior": false}}}
<span class="hljs-keyword">end</span></code></pre>
Flattened Source
"""
DiscreteTransferFunction(; name, dt, n_num, n_den, num, den, ic=0.0, _...)
Implements a discrete transfer function in controller canonical form:math H(z) = \frac{b0 + b1z^{-1} + ... + b{nnum}z^{-(nnum)}}{a0 + a1z^{-1} + ... + a{nden-1}z^{-(nden)}}
- Arguments
`ic` initializes the internal delay/state memory (previous-tick values) to `ic`
`dt` is the sample time of the discrete transfer function
`n_num` is the number of numerator coefficients
`n_den` is the number of denominator coefficients
`num` is a vector of numerator coefficients
`den` is a vector of denominator coefficients
"""</span>
<span class="hljs-keyword">external</span> <span class="hljs-keyword">component</span> DiscreteTransferFunction
<span class="hljs-symbol">u</span> = <span>Dyad.RealInput</span>() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": -40, "y1": 480, "x2": 0, "y2": 520, "rot": 0},
"diagram": {"iconName": "default", "x1": -40, "y1": 480, "x2": 0, "y2": 520, "rot": 0}
}
}
}
<span class="hljs-symbol">y</span> = <span>Dyad.RealOutput</span>() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": 1010, "y1": 480, "x2": 1050, "y2": 520, "rot": 0},
"diagram": {"iconName": "default", "x1": 1010, "y1": 480, "x2": 1050, "y2": 520, "rot": 0}
}
}
}
<span class="hljs-keyword">structural</span> <span class="hljs-symbol">dt</span>::<span>Real</span>
<span class="hljs-keyword">structural</span> <span class="hljs-symbol">n_num</span>::<span>Integer</span>
<span class="hljs-keyword">structural</span> <span class="hljs-symbol">n_den</span>::<span>Integer</span>
<span class="hljs-keyword">structural</span> <span class="hljs-symbol">num</span>::<span>Real</span>[n_num]
<span class="hljs-keyword">structural</span> <span class="hljs-symbol">den</span>::<span>Real</span>[n_den]
<span class="hljs-keyword">parameter</span> <span class="hljs-symbol">ic</span>::<span>Real</span> = 0.0
<span class="hljs-keyword">relations</span>
<span class="hljs-keyword">metadata</span> {"Dyad": {"doc": {"behavior": false}}}
<span class="hljs-keyword">end</span></code></pre>
Test Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses
- Tests