Basic Tutorial for Control System (I)
Let’s start with a very simple tutorial on how to create a transfer function using MATLAB and Control System Toolbox. We have a transfer function:
To create this transfer function in MATLAB, we need to understand how MATLAB create polynomial.
First, we define a variable for the numerator:
>> num = 1;
Second, we define the polynomial for the denominator:
>> den = [3 1 2];
Next, create the transfer function using the “tf” function:
>> G = tf(num, den);
How about this?
>> num = 1;
>> den = [3 0 2];
Do take note on the 0 in the middle, it must be there to represent the “missing” term for “s”.
Well, if you get error when you use “tf” command, make sure you have the control system toolbox as well. The location of a function can be location using “which” command:
>> which tf
More tutorial coming soon... :)
0 Comments:
Post a Comment
<< Home