How to solve a trasfer function absolute value whit the tf function command.

I'm tryng to implement a control system method in matlab but I have a problem in plotting a curve so I don't find a solution to compute the absolute value of a tranfer function declared with the classical command "tf". The function "abs()" is not useful so I ask you which the way to solve the problem. Thank you so much.

5 件のコメント

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 20 日
編集済み: Azzi Abdelmalek 2013 年 8 月 20 日
what does mean: a trasfer function absolute value
Graz  Mand
Graz Mand 2013 年 8 月 20 日
An absolute value of a transfer function in the Laplace domain, sorry.
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 20 日
Ok, but what does that mean mathematically ?
Graz  Mand
Graz Mand 2013 年 8 月 20 日
Not mathematically! I'm tryng to implement a control system method but the curves I want to plot, are in function of the absolute value of other functions.
I want to plot, for example C1=|P1|/(1-|P2|);
the problem is that P1 e P2 are transfer function too! Please help me! It's important for my work..
Graz  Mand
Graz Mand 2013 年 8 月 20 日
If I want to plot the Bode diagram of P1 or P2 is not a problem, but that's for C1..

サインインしてコメントする。

回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 20 日
Example
N=1;
D=[1 10]
model=tf(N,D) % your transfer function
Now what do you mean by: An absolute value of a transfer function

7 件のコメント

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 20 日
編集済み: Azzi Abdelmalek 2013 年 8 月 20 日
If you want to plot the abs of your transfer function
p=0:0.1:10;
tf1=1./(p+10)
tf1a=abs(tf1)
plot(p,tf1)
%or for example
N=[1 2]
D=[1 2 3]
p=0:0.1:10
f=abs(polyval(N,p)./polyval(D,p))
plot(p,f)
Graz  Mand
Graz Mand 2013 年 8 月 20 日
Thanks Azzi, but I think your way don't consider p like a Laplace domain variable, i.e. p=jw where w is \omega, the frequency..what do you think?
I don't know exactly what you want, but in the above case, by replacing p by jw you will get a frequency response. You can do it like this
N=[1 2];
D=[1 2 3];
w=-10:0.01:10;
p=w*j;
f=abs(polyval(N,p)./polyval(D,p));
plot(w,f)
Graz  Mand
Graz Mand 2013 年 8 月 20 日
編集済み: Azzi Abdelmalek 2013 年 8 月 20 日
It's the code with your solution: it doesn't work, I don't know the reason the outpout f is a constant.
function [] = plotting1(P1,P2)
[num1,den1]=tfdata(P1,'v');
[num2,den2]=tfdata(P2,'v');
w=0:0.01:100;
p=w*j;
P1=abs(polyval(num1,p)./polyval(den2,p));
P2=abs(polyval(num2,p)./polyval(den2,p));
f=P1/(1-P2)
plot(w,f)
Graz  Mand
Graz Mand 2013 年 8 月 20 日
I want to plot the function: C1=|P1|/(1-|P2|);
Graz  Mand
Graz Mand 2013 年 8 月 20 日
編集済み: Graz Mand 2013 年 8 月 20 日
Anyways with p or w the plot of P1 results the same one..
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 20 日
編集済み: Azzi Abdelmalek 2013 年 8 月 20 日
It's not f=P1/(1-P1) but
f=P1./(1-P1)
plot(w,f)

サインインしてコメントする。

Negin Abaeian
Negin Abaeian 2015 年 12 月 12 日

0 投票

Hey Graz.
I can see the post belongs to long ago. But did you ever find the answer to this question? I'm trying to plot the exact same transfer function for an Audio application.

質問済み:

2013 年 8 月 20 日

回答済み:

2015 年 12 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by