Find poles and zeros of transfer function

358 ビュー (過去 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 Center および File ExchangeState-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