Matlab® provides various tools to transform the different forms of transfer functions. One of these tools is used for the finding state-space model of a zero-pole gain form of transfer functions. You can do this kind of thing in Matlab® with the ‘zp2ss()’ command.
YOU CAN LEARN MatLab® IN MECHANICAL BASE; Click And Start To Learn MatLab®!
Here we explain how to use the ‘zp2ss()’ command in Matlab® with a very basic coding example. You can try this code in your Matlab® software.
How To Use The ‘zp2ss()’ Command In MatLab®?
Consider a situation that we want to find the state-space model of the zero-pole gain transfer function of;
TF = 10/((s+3)(s+1))
The code is;
>> x = ; y = [-3;-1]; z = ; [a,b,c,d] = zp2ss(x,y,z) a = -4.0000 -1.7321 1.7321 0 b = 1 0 c = 0 5.7735 d = 0 >>
As you see above, you need to create the required column vectors to define the input variable of the ‘zp2ss()’ command. In this example, ‘x’ and ‘y’ column vectors include the roots of the transfer function. ‘z’ is the nominator of the transfer function which is ’10’. You must define the transfer function like this.
Then you need to type these variables that define the zero-pole gain form of the transfer function, inside the parentheses of the ‘zp2ss()’ command respectively.
And you need to assign four result variables which are ‘a’, ‘b’, ‘c’ and ‘d’. here. According to these results, the state-space form of the example above is like this;
[x1; x2] = [-4 -1.7321; 1,7321 0]*[x1(t); x2(t)] + [0; 1]*u(t);
y(t) = [0 5.7735][x1(t), x2(t)]
You can extract your solution of your ‘zp2ss()’ command with the assistance of this example.
Calculation of the state-space model of a zero-pole gain transfer function in MatLab® with the ‘zp2ss()’ command is very simple like above.
Do not forget to leave your comments and questions below about the use of the ‘zp2ss()’ command in Matlab® below.
If you want further coding examples about the ‘zp2ss()’ 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.