Filter löschen
Filter löschen

Bode form of a transfer function

34 Ansichten (letzte 30 Tage)
Dale
Dale am 27 Jun. 2013
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

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

David Sanchez
David Sanchez am 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 Kommentar
Dale
Dale am 27 Jun. 2013
Bearbeitet: Dale am 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.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by