I can not zero my transfer function

1 次查看(过去 30 天)
how do you do this ?

回答(1 个)

Stephan
Stephan 2019-2-11
编辑:Stephan 2019-2-11
Hi,
i assume you want to use zero instaed of zeros. The first is for control - the second creates an array of all zeros, which makes no sense in your context. Also note that you wrote
z=zero(Tfx)
instead of
z=zero(TFx)
Both is fixed here and works:
clear all
close all
clc
syms X Y s
F1 = (5*s^2+12*s+5)*X-(8*s+4)*Y; %laplace by hand
F2 = (3*s^2+8*s+5)*Y-(8*s+4)*X-(5/s);
[A B] = equationsToMatrix([F1 F2],[X Y]);
sol = inv(A)*B;
x = sol(1);
y = sol(2);
[Numx,Denx] = numden(x);
[Numy,Deny] = numden(y);
Nx = sym2poly(Numx);
Dx = sym2poly(Denx);
[r p k] = residue(Nx,Dx)
TFx = tf(Nx,Dx)
xp=poles(x)
yp = poles(y)
z=zero(TFx)
Best regards
Stephan

Community Treasure Hunt

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

Start Hunting!

Translated by