Bode form of a transfer function

34 次查看(过去 30 天)
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

采纳的回答

Arkadiy Turevskiy
Arkadiy Turevskiy 2013-6-27
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 个评论
Dale
Dale 2013-6-27
Excellent! I knew Matlab must have this capability, thank you for finding it.

请先登录,再进行评论。

更多回答(1 个)

David Sanchez
David Sanchez 2013-6-27
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 个评论
Dale
Dale 2013-6-27
编辑:Dale 2013-6-27
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Model Order Reduction 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by