represent a complicated transfer function?
represent a complicated transfer function?
(OP)
Hi every one
I am new to matlab but have viewed a lot of tutorials, but i could not find one that shows me how to enter a complicated transfer function like
30s
----------------------
(1 + s/0.2)(1 + s/0.5)
i couldn't find an easy way to represent s/0.2 so i was going to just cheat and do 5s.
but its the brackets on the bottom that are really confusing me, do i have to use the conv command.
i treid and got the following error
>>conv ([5 , 1]),([2, 1])
??? Input argument 'b' is undefined.
Error in ==> C:\MATLAB6p5\toolbox\matlab\datafun\conv.m
On line 15 ==> nb = length(b);
where that was supposed to represent (1 + s/0.2)(1 + s/0.5)
sorry for bothering you with beginner questions
and thanks in advance for your help.
I am new to matlab but have viewed a lot of tutorials, but i could not find one that shows me how to enter a complicated transfer function like
30s
----------------------
(1 + s/0.2)(1 + s/0.5)
i couldn't find an easy way to represent s/0.2 so i was going to just cheat and do 5s.
but its the brackets on the bottom that are really confusing me, do i have to use the conv command.
i treid and got the following error
>>conv ([5 , 1]),([2, 1])
??? Input argument 'b' is undefined.
Error in ==> C:\MATLAB6p5\toolbox\matlab\datafun\conv.m
On line 15 ==> nb = length(b);
where that was supposed to represent (1 + s/0.2)(1 + s/0.5)
sorry for bothering you with beginner questions
and thanks in advance for your help.





RE: represent a complicated transfer function?
when you play with the equation more, then you will come up with the equation in the end:
3s
--------------
(s^2+0.7s+0.1)
and if you write the followings in Matlab "Command Window";
>>s = tf('s');
H = (3*s)/(s^2+0.7*s+0.1)
you can get the transfer function like:
Transfer function:
3 s
-----------------
s^2 + 0.7 s + 0.1
RE: represent a complicated transfer function?
bode(H);
Regards,
ridbay
RE: represent a complicated transfer function?
never expected a reply that quickly.
once again thanks for your help it is much appreciated.
drey
RE: represent a complicated transfer function?
A factored transfer function such as yours can take on two main forms.
The kind you wrote, where the s terms are divided by a number (the pole frequency), is called the Bode form. This form makes it easy to see the steady state gain and the pole frequencies. E.g., 30s/[(1+s/0.2)(1+s/0.5)] has a steady state gain of 5 (allow s to go to zero) and a pole at -5 rad/sec, so Bode plotting is easy.
The kind that MATLAB works best with is known as the Evans form. This form is used with the MATLAB zpk system object. E.g., 3s/[(s+0.2)(s+0.5)]. Not as easy to see information, but it works well for root locus design methods. It also happens to be the same transfer function.
To convert your transfer function from Bode form to Evans form for use with MATLAB, simply multiply the numerator by each of the pole values and then multiply each of your individual denominator terms by the pole location inside the parentheses. This gives 30s*0.2*0.5 for the numerator (or 3s), and (s+0.2)(s+0.5) for the denominator. Form the system sys = zpk([0],[-0.2,-0.5],3), and you've got your transfer function in MATLAB.
If you have a polynomial transfer function provided by multiplying out the denominators of the Evans form, you use the tf command as demonstrated by ridbay.
xnuke
"Do you think you used enough dynamite there, Butch?"
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.