repeated roots in residue fn, how to read/ display??
12 views (last 30 days)
Show older comments
my code is as follows
clc ;
clear;
n1=[5 20 6];
d1=[1 2 1 0];
tf1=tf(n1,d1)
[r,p,k]= residue(n1,d1)
% r values are the numeratior of the tf
% p values are the poles,
%NOTE
%THEY ARE oposite
%VALUE AKA p = -5 is ACT (s+5)
Id really like to be able to get some repeated root values from this but i dont know what to do code wise to get there..
Btw this is from the tf bellow
( 5s^2 + 20s + 6 ) / ( s^3+ 2s^2 + s )
this should yeild 6/s - 1/(s+1) + 9(s+1)^2
but i get
r =
-1
9
6
p =
-1
-1
0
which is great, but doesnt show that the (s+1) of the 9/(s+1) should be ^2 ... can i edit my code some how to show that i needs to be squared?
0 Comments
Answers (1)
Mahesh Taparia
on 3 Oct 2019
Hi,
It is possible to know if the fraction contains multiple roots. As per your given code, ‘r’ contains the residue, ‘p’ contains the poles and ‘k’ contains the direct terms of your transfer function. If ‘p’ contains any duplicate element entry, then it means there are multiple roots at the same location. As per your case, p= [-1 –1 0] it means there are two roots at –1.
For more information on residue function, you can refer to the documentation link given below:
3 Comments
Mahesh Taparia
on 4 Oct 2019
Hi,
If multiple roots are present at same location, then residue are arranged as per the pole multiplicity. In your case, '-1' residue corresponds to (s+1), '9' residue is for (s+1)^2. In general, for a pole of multiplicity m, you can refer to the following link for residue arrangement:
Hope it will help.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!