What is MATLAB doing when adding multiple ZPK transfer functions together?
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to add multiple zpk transfer functions by directly accessing the zeros, poles, and gains without the use of the "parallel" or "+" operations (for runtime reduction), and I was wondering what "+" does:
zero1 = [1, 2];
pole1 = [3, 4];
gain1 = 2;
tf1 = zpk(zero1, pole1, gain1)
% tf1 =
%
% 2 (s-1) (s-2)
% -------------
% (s-3) (s-4)
zero2 = [-1, -2];
pole2 = [-3, -4];
gain2 = -2;
tf2 = zpk(zero2, pole2, gain2)
% tf2 =
%
% -2 (s+1) (s+2)
% --------------
% (s+3) (s+4)
tf = tf1 + tf2
% tf =
%
% 16 s (s-2.345) (s+2.345)
% ------------------------
% (s-3) (s-4) (s+3) (s+4)
I googled how to add two ZPK transfer functions and it said that it's simply linearly adding them together but Matlab is definitely doing something different (as "tf" has a zero at +/- 2.345 when neither "tf1" nor "tf2" have those zeros)
0 Commenti
Risposte (1)
Aquatris
il 14 Giu 2024
Modificato: Aquatris
il 17 Giu 2024
Yes but you are doing a fractional algebra. To refresh your memory:
a/b + c/d = (a*d + c*b)/(b*d)
Since numerator stays b*d, you maintain the same poles. However your denominator is changed significanty, meaning you do not necessarily maintain the same zeros after the addition.
In transfer function terms
(s-2)/(s-5) + (s-1)/(s-3) = [(s-2)*(s-3) + (s-1)*(s-5)] / [(s-5)(s-3)]
So your numerator is the same, poles of your tf1 and tf 2. However your denominator that defines your zeros is now
(s-2)*(s-3) + (s-1)*(s-5) = 2*s^2 - 11*s +11
So zeros of your tf1 and tf2 are no longer the zeros when you add them together
0 Commenti
Vedere anche
Categorie
Scopri di più su Pole and Zero Locations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!