Control systems are very important in engineering and their applications are very common. Matlab® provides various kinds of tools to make it easier to devise different control systems. One of these commands is the ‘tf2zp()’ command. Here we explain the use of the ‘tf2zp()’ command with a very basic code example. You can try this in your Matlab® software.
How To Use ‘tf2zp()’ Command In MatLab®?
You know that in control system design, transfer functions are very important. Some mathematical manipulations are required to see transfer functions in intended forms. One of these forms is the zero-pole gain form. The ‘tf2zp()’ command does this thing in Matlab®. Take a look at the example below.
>> nom = [1 7 2]; denom = [1 9 26 24]; [x,y,z]=tf2zp(nom, denom) x = -6.7016 -0.2984 y = -4.0000 -3.0000 -2.0000 z = 1 >>
he use of the ‘tf2zp()’ command is very simple in Matlab®. First of all, you need to create two vectors that include the coefficients of the nominator polynomial of the transfer function. In this example, our nominator coefficients are the ‘nom’ vector. Do the same thing for the denominator polynomial of the transfer function. In this example again, it is ‘denom’.
Then type the names of these transfer functions inside the parentheses of the ‘tr2zp()’ command.
YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!
You need to equate the ‘tr2zp()’ command to three result variables, which are ‘x’, ‘y’ and ‘z’ here.
In this example the input transfer function is;
TF = (s^2+7s+2)/(s^3+9s^2+26s+24)
And the zero-pole gain form of this transfer function is;
TF = (s+6.7016)(s+0.298)/(s+2)(s+3)(s+4)
As you understand that values of ‘x’ gives the roots of the nominator of the zero-pole gain transfer function. And ‘y’ gives the roots of the denominator of the zero-pole transfer function.
The use and the expression of the ‘tf2zp()’ command in Matlab® are very simple like above.
Do not forget to leave your comments and questions below about the use of the ‘tf2zp()’ command in Matlab® below.
If you want further coding examples about the ‘tf2zp()’ command in Matlab®, inform us in the comments.
This article is prepared for completely educative and informative purposes. Images used courtesy of Matlab®
Your precious feedbacks are very important to us.