lti_tf
Builtin index · Signal processing
result = lti_tf(num, den, [dt])
Input: num, den, dt · Output: result
What it is
No chapter describes this one yet. It exists -- the name comes from the interpreter's own table -- but the prose has not been written. That is a gap in the documentation, not in the engine.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = lti_tf(num, den, [dt]) | num vectornum, den: coefficient vectors, highest power first, so lti_tf([1], [1, 3, 2]) is 1/(s^2 + 3s + 2).den —Returns the single-input single-output system with transfer function num(s)/den(s) (or num(z)/den(z) when dt > 0) as an "lti" model.dt optionaldt as in lti_ss. | num(s)/den(s) —or num(z)/den(z) when dt > 0 | Returns the single-input single-output system with transfer function num(s)/den(s) (or num(z)/den(z) when dt > 0) as an "lti" model. num, den: coefficient vectors, highest power first, so lti_tf([1], [1, 3, 2]) is 1/(s^2 + 3s + 2); dt as in lti_ss. The realization is the controllable canonical form. An improper function (numerator degree above the denominator's) has no state-space form and is an error, as is a zero denominator. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
plant = lti_tf([1], [1, 3, 2, 0]) # 1 / (s (s+1) (s+2))
m = lti_margin(plant)
print("{m.gm} at {m.w_gm} rad/s") # 6 at 1.414214 rad/s
closed = lti_feedback(lti_series(2, plant)) # gain 2, unity negative feedback
print(lti_is_stable(closed)) # true
r = lti_step(closed, 20)
print(r.y[len(r.y) - 1]) # 1.006126
d = lti_c2d(lti_tf([1], [0.5, 1]), 0.1) # first-order lag, tau = 0.5
print(d.A) # [0.818731], exp(-0.1/0.5)
output
6 at 1.414214 rad/s true 1.006126 [0.818731]
from signal-processing