how to get transfer function for this problem?

8 visualizaciones (últimos 30 días)
K
K el 11 de Oct. de 2012
Comentada: roopa el 2 de Mayo de 2024
I am working on following .m file.
n1=1;d1=1;
n2=1;d2=[1 1];
n3=1;d3=[1 2];
n4=1;d4=[1 3];
n5=4;d5=1;
n6=8;d6=1;
n7=12;d7=1;
nblocks=7;
blkbuild
q=[2 1 -5 0 0;3 2 -6 0 0 ;4 2 -6 3 -7;5 3 0 0 0;6 3 0 0 0;7 4 0 0 0];
input=1; output=4;
[A, B, C, D]=connect(a,b,c,d,q,input,output);
[num,den]=ss2tf(A,B,C,D);
printsys(num,den,'s')
when I get the answer it looks like this:
num/den =
1.0658e-014 s^2 + 1 s + 3
--------------------------
s^3 + 26 s^2 + 179 s + 210
BUT I WANT IT TO LOOK LIKE THIS, HOW CAN I DO IT. THANKS.
num/den =
1 s + 3
--------------------------
s^3 + 26 s^2 + 179 s + 210
  1 comentario
roopa
roopa el 2 de Mayo de 2024
n1=[1];
d1=[1];
n2=[1]
d2=[1 1];
n3=[1]
d3=[1 2];
n4=[1]
d4=[1 3];
n5=[4];
d5=[1];
n6=[8];
d6=[1];
n7=12
d7=[1];
nblocks=7;
blkbuild
q=[1 0 0 0 0
2 1 -5 0 0
3 2 -6 0 0
4 2 -6 3 -7
5 3 0 0 0
6 3 0 0 0
7 4 0 0 0]
input=1
output=4
[aa bb cc dd]=connect(a,b,c,d,q,input,output)
[num den]= ss2tf(aa,bb,cc,dd)
printsys(num,den)
[aa bb cc dd]=connect(a,b,c,d,q,input,output)
i am not getting above conversion what is a,b,c,d how it will convert please exaplain each step

Iniciar sesión para comentar.

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 11 de Oct. de 2012
you have just to remove the first coefficient from num
num=num(2:end)
model1=tf(num,den)

Más respuestas (1)

Udita Singh
Udita Singh el 9 de Feb. de 2021
Editada: Walter Roberson el 9 de Feb. de 2021
blkbuild command is showing an error
how can i resolve this??
close all;
clear all;
n1=1; d1=1;
n2=1; d2=[1 1];
n3=1; d3=[1 2];
n4=1; d4=[1,3];
n5=4; d5=1;
n6=8; d6=1;
n7=12; d7=1;
input=1;
output=4;
nblocks=7;
blkbuild;
q=[2 1 -5 0 0
3 2 -6 0 0
4 3 -7 2 -6
5 3 0 0 0
6 3 0 0 0
7 4 0 0 0];
[aa,bb,cc,dd]=connect(a,b,c,d,q,input,output);
[n,d]=ss2tf(aa,bb,cc,dd);
printsys(n,d,'s')
  2 comentarios
Walter Roberson
Walter Roberson el 9 de Feb. de 2021
What error are you observing? It seems to execute without difficulty.
n1=1; d1=1;
n2=1; d2=[1 1];
n3=1; d3=[1 2];
n4=1; d4=[1,3];
n5=4; d5=1;
n6=8; d6=1;
n7=12; d7=1;
input=1;
output=4;
nblocks=7;
blkbuild;
State model [a,b,c,d] of the block diagram has 7 inputs and 7 outputs.
q=[2 1 -5 0 0
3 2 -6 0 0
4 3 -7 2 -6
5 3 0 0 0
6 3 0 0 0
7 4 0 0 0];
[aa,bb,cc,dd]=connect(a,b,c,d,q,input,output);
[n,d]=ss2tf(aa,bb,cc,dd);
printsys(n,d,'s')
num/den = s + 3 -------------------------- s^3 + 26 s^2 + 179 s + 210
Udita Singh
Udita Singh el 9 de Feb. de 2021
Editada: Udita Singh el 9 de Feb. de 2021
Actually its not its showing me error
can you pls help me because its working perfectly in online matlab

Iniciar sesión para comentar.

Categorías

Más información sobre Event Functions en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by