TF Evaluates a given transfer function expression in the s-domain
TF(str_expr)
Arguments
str_expr: String expression containing the transfer function
Returns
Returns an object of 'tf' class list with a transfer function. Numerator and denominator coefficients could then be retrieved from the object the same way as any other tf object
Details
TF Evaluates a given transfer function polynomial expression in the s-domain. The evaluation of the expressions are performed similar to symbolic math computations for polynomials. A transfer function model is created as the result of the expression evaluation. Thus, this is an alternative way of creating transfer function models following the natural math expressions found in block diagrams. It also provides an alternative way to perform system interconnections. Only transfer function models are currently supported for system interconnection using this function. System interconnections for other models could be performed using the series, parallel, feedback or connect functions. See the Examples section for further details.
Examples
# Example taken from the GitHub page of Julia Control - an electric motor exampleJ <-2.0b <-0.04K <-1.0R <-0.08L <-1e-4P <- TF("K/(s*((J*s + b)*(L*s + R) + K^2))")Cls <- TF("P/(1 + P)")# closed-loop connection# More examplesTF("s+1")sys1 <- tf(1, c(1,2,5))sys2 <- tf(2, c(1,2,5))TF("sys1 + sys2")# parallel system interconnectionTF("sys1 * sys2")# series system interconnectionTF("sys1 - sys2")TF("sys1 - 1")TF("sys1 + 1")TF("sys1 - sys2 + sys2")TF("sys1 / sys2 / sys2")