TestDiscreteTransferFunction_UnitStep Icon
TestDiscreteTransferFunction_UnitStep
Test component for DiscreteTransferFunction in controller canonical form. Tests a first-order system H(z) = (1 + 0.5z^-1) / (1 - 0.8z^-1) with unit step input.
Usage
PrimitiveComponents.TestDiscreteTransferFunction_UnitStep()
Behavior
\[ \begin{equation} \left[ \begin{array}{c} \mathrm{connect}\left( constant1_{+}y(t), tf_{+}u(t) \right) \\ \mathtt{tf.x1}\left( t \right) = 0.8 Shift(t, -1)\left( \mathtt{tf.x\_1}\left( t \right) \right) + \mathtt{tf.u}\left( t \right) \\ \mathtt{tf.x\_1}\left( t \right) = \mathtt{tf.x1}\left( t \right) \\ \mathtt{tf.y}\left( t \right) = 0.5 Shift(t, -1)\left( \mathtt{tf.x\_1}\left( t \right) \right) + \mathtt{tf.x1}\left( t \right) \\ \frac{\mathrm{d} \mathtt{tf.dummy.l}\left( t \right)}{\mathrm{d}t} = 0 \\ \mathtt{constant1.y}\left( t \right) = \mathtt{constant1.k} \\ \end{array} \right] \end{equation} \]
Source
"""
Test component for DiscreteTransferFunction in controller canonical form.
Tests a first-order system H(z) = (1 + 0.5z^-1) / (1 - 0.8z^-1)
with unit step input.
"""
test component TestDiscreteTransferFunction_UnitStep
tf = PrimitiveComponents.DiscretePrimitives.DiscreteTransferFunction(dt = 0.1, n_num = 2, n_den = 2, num = [1.0, 0.5], den = [1.0, -0.8], ic = 0.0)
constant1 = BlockComponents.Constant(k = 1.0)
relations
connect(constant1.y, tf.u)
end
Flattened Source
"""
Test component for DiscreteTransferFunction in controller canonical form.
Tests a first-order system H(z) = (1 + 0.5z^-1) / (1 - 0.8z^-1)
with unit step input.
"""
test component TestDiscreteTransferFunction_UnitStep
tf = PrimitiveComponents.DiscretePrimitives.DiscreteTransferFunction(dt = 0.1, n_num = 2, n_den = 2, num = [1.0, 0.5], den = [1.0, -0.8], ic = 0.0)
constant1 = BlockComponents.Constant(k = 1.0)
relations
connect(constant1.y, tf.u)
metadata {}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses
- Tests