Clear Filters
Clear Filters

Bode form of a transfer function

34 views (last 30 days)
Suppose I have the transfer function k*(s-z1)/((s - p1)*(s - p2)), i.e., in the form that comes from the zpk() function. This form is convenient in that I can see immediately the location of the poles and zeros, but in order to obtain the gain at s=0, I need to compute k*(-z1)*(-p1)*(-p2). Is there a way to instead have the transfer function displayed in Bode form: k2*(-s/z1 + 1)/((-s/p1 + 1)*(-s/p2 + 1)), so that k2 = (-z1)*(-p1)*(-p2), and this represents the gain at s=0? I find this much nicer because I can see the poles, zeros, and the gain at s=0 without having to do any calculations in my head.
Thanks, Luke

Accepted Answer

Arkadiy Turevskiy
Arkadiy Turevskiy on 27 Jun 2013
Yes, as descsribed in zpk doc.
>> sys=zpk(1,[2 3],4)
sys =
4 (s-1)
-----------
(s-2) (s-3)
Continuous-time zero/pole/gain model.
>> sys.DisplayFormat='frequency';
>> sys
sys =
-0.66667 (1-s)
---------------
(1-s/2) (1-s/3)
Continuous-time zero/pole/gain model.
  1 Comment
Dale
Dale on 27 Jun 2013
Excellent! I knew Matlab must have this capability, thank you for finding it.

Sign in to comment.

More Answers (1)

David Sanchez
David Sanchez on 27 Jun 2013
s=tf('s');
% dummy values for the parameters
k=1;
z1=1;
p1=1;
p2=1;
H=k*(s-z1)/((s - p1)*(s - p2));
k2= (-z1)*(-p1)*(-p2);
H2=k2*(-s/z1 + 1)/((-s/p1 + 1)*(-s/p2 + 1));
bode(H);
figure;
bode(H2);
  1 Comment
Dale
Dale on 27 Jun 2013
Edited: Dale on 27 Jun 2013
My question is not about how to make a Bode plot. It is about how to print the transfer function as it would be written mathematically.
Is there a single function built into Matlab that already implements the code you have written? I can write the function to do this myself for an arbitrary transfer function, but I figured since they already have tf() and zpk(), which put things in the other two common forms of a transfer function, they might have a Bode form of the transfer function as well. If they do have it, I can't find it anywhere in the documentation.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!