# Partial Fractional Representation Of Transfer Functions In MatLab®

Matlab® provides very useful commands for the designer of control systems. One of these commands is the ‘residue()’ command. With the ‘residue()’ command, you can convert a transfer function that is given as polynomials to partial fractional representation. Here we show how to use the ‘residue()’ command in Matlab® with a very basic coding example. You can try this code in your Matlab® software.

YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!

## How To Use The ‘residue()’ Command In MatLab®?

The use of the ‘residue()’ command is very simple. Check the example below.

```
>> nom = [2 5 3 6];
denom = [1 6 11 6];
[x, y, z] = residue(nom,denom)
x =
-6.0000
-4.0000
3.0000
y =
-3.0000
-2.0000
-1.0000
z =
2
>>
```

First of all, you need to create two vectors that include the coefficients of the polynomials of the nominator and the denominator of the transfer function. In the example above, these vectors are ‘nom’ and ‘denom’. Then you need to type these vectors inside the parentheses of the ‘residue()’ command.

Then you need to assign the ‘residue()’ command to three result variables which are ‘x’, ‘y’ and ‘z’ above. If you execute the code in the Matlab® command window, you will see the result.

The elements of ‘x’ column vector represent the nominators of partial fractions.

The elements of the ‘y’ vector represent the roots of the denominators.

The ‘z’ is the constant value.

In this example, the input transfer function is;

TF = (2s^3 + 5s^2 +3s + 6)/(s^3 + 6s^2 + 11s +6)

The output partial fraction form of the transfer function is;

TF = 6/(s+3) + 4/(s+2) + 3/(s+1) +2

You can compare the coefficients of the output with the ‘x’, ‘y’, and ‘z’ vector elements.

## Conclusion

So, the use of the ‘residue()’ command in Matlab® for the conversion of the transfer functions is very simple like above.

Do not forget to leave your comments and questions below about the use of the ‘residue()’ command in Matlab® below.

If you want further coding examples about the ‘residue()’ 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.