TFunction: Evaluate Transfer function Expressions

Description Usage Arguments Details Value See Also Examples

Description

TF Evaluates a given transfer function expression in the s-domain

Usage

1
TF(str_expr)

Arguments

str_expr

String expression containing the transfer function

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.

Value

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

See Also

tf tf2ss series parallel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Example taken from the GitHub page of Julia Control - an electric motor example
J <- 2.0
b <- 0.04
K <- 1.0
R <- 0.08
L <- 1e-4
P <- TF("K/(s*((J*s + b)*(L*s + R) + K^2))")
Cls <- TF("P/(1 + P)") # closed-loop connection

# More examples
TF("s+1")
sys1 <- tf(1, c(1, 2, 5))
sys2 <- tf(2, c(1, 2, 5))
TF("sys1 + sys2") # parallel system interconnection
TF("sys1 * sys2") # series system interconnection
TF("sys1 - sys2")
TF("sys1 - 1")
TF("sys1 + 1")
TF("sys1 - sys2 + sys2")
TF("sys1 / sys2 / sys2")

benubah/control documentation built on May 10, 2020, 1:38 a.m.