필터 지우기
필터 지우기

Find poles and zeros of transfer function

조회 수: 120 (최근 30일)
Siddhanth Sunil Shah
Siddhanth Sunil Shah 2022년 1월 7일
답변: Emiliano martin 2022년 5월 12일
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
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
Paul 2022년 1월 10일
I don't think this was the original code for this question ....

댓글을 달려면 로그인하십시오.

채택된 답변

Paul
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
Siddhanth Sunil Shah
Siddhanth Sunil Shah 2022년 1월 7일
편집: Siddhanth Sunil Shah 2022년 1월 7일
Sorry that I was not clear. Yes the MATLAB throws an error since Gsys is not square and a 2x3 sym.
And I am trying to figure out a way to find the Smith-McMillan form of Gsys and also a method to derive the Smith Form for non-square matrix but unable to succeed.
After finding the Smith-McMillan form of Gsys, I want to compute the poles and zeros of that form
Best Regards,
Siddhanth
Paul
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)
d(s) = 
Compute N(s) from d(s) and Gsys(s)
N(s) = simplify(d(s)*Gsys(s))
N(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))
M(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{:}]
smzeros = 
smpoles = [smpoles{:}]
smpoles = 
But your Gsys isn't square. Don't know why smithForm does not handle non square, polynomial matrices.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Emiliano martin
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!!

카테고리

Help CenterFile Exchange에서 State-Space Control Design and Estimation에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by