Find poles and zeros of transfer function
조회 수: 120 (최근 30일)
이전 댓글 표시
A = [-3 5 -7 0; 0.5 -1.5 0.5 -7.5;-5 0 -3 0; -0.5 -5 0 .7];
B = [1 0 0; 0 -1 0; -2 0 0; 0 1 2];
C = [1 0 0 0; 0 -1 0 0];
D = [-1 0 0; 2 0 0];
S = ss(A, B, C, D)
G = tf(SS)
% Compute Poles
poles = eig(A)
%Compute Zeros
zeros = tzero(A,B,C,D)
Gss = minreal( ss( S ) )
When I run this code i get the following error:
Error using ss (line 278)
The "D" matrix must be a numeric array with no Inf's or NaN's.
Error in Q5 (line 23)
Gss = minreal( ss( S ) );
댓글 수: 2
Paul
2022년 1월 10일
Why did you delete the code from your question?
And why did you change the question itself? It used to be Find poles and zeros of a transfer function
채택된 답변
Paul
2022년 1월 7일
편집: Paul
2022년 1월 7일
That error shows up because minreal() and ss(), etc. are functions in the Control System Toolbox. Those functions cannot accept sym objects like Gsys.
Even if you just use Control System Toolbox functions, you're going to have troubles because the elements of Gsys are improper (degree of numerator > degree of denominator).
Also, I thought the Smith form only applies to the "numerator" of the transfer function matrix, not the entire tranfser function matrix.
Also, doesn't that call to smithForm throw an error because Gsys isn't square?
What exactly are you you trying to do? Find the Smith-McMillan form of Gsys?
댓글 수: 2
Paul
2022년 1월 7일
If Gsys were square, then it seems like it should be doable. Here's a simple example.
Define a simple transfer function matrix
syms s
Gsys(s) = [s/((s + 1)^2*(s + 2)^2), s/(s + 2)^2; -s/(s + 2)^2, -s/(s + 2)^2];
Get the least common denominator of all the terms
[num,den] = numden(Gsys);
d(s) = lcm(den)
Compute N(s) from d(s) and Gsys(s)
N(s) = simplify(d(s)*Gsys(s))
Get the Smith form of N(s)
[U1,U2,L] = smithForm(N(s));
The Smith-McMillan form of Gsys is then
M(s) = simplify(L/d(s))
Get the zeros and the poles
[num,den] = numden(M(s));
for ii = 1:2
smzeros{ii} = solve(num(ii,ii),s).';
smpoles{ii} = solve(den(ii,ii),s).';
end
smzeros = [smzeros{:}]
smpoles = [smpoles{:}]
But your Gsys isn't square. Don't know why smithForm does not handle non square, polynomial matrices.
추가 답변 (1개)
Emiliano martin
2022년 5월 12일
clear all
close all
clc
s=tf('s');
TF_Sys=8/s(2*s+1)*(.05*s+1);
figure (1)
pzmap(TF_Sys)
is giving me an arror, please help!!
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!