How does the division operator work with transfer function objects?
42 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am new to MATLAB so I apologize if the answer to this is obvious: I was under the impression that since the * operator is overloaded to perform multiplication with transfer functions, the / operator might, likewise, perform division. I tried dividing to obtain the closed loop using the / operator but that gave me erroneous results. The right way, apparently, is to use the function called 'feedback', which works as expected. So I was wondering what the / operator does on tf objects. Any help is appreciated. Thanks!
G = tf([1 2], [3 4 5]) % open loop TF
H = 1;
k = 10;
T = k*G/(1 + k*G*H) % closed lopp TF (wrong)
T = feedback(k*G, H) % closed loop TF (correct)
0 commentaires
Réponse acceptée
Paul
le 28 Déc 2021
Let's solve a simpler problem "by-hand" using the zpk format to see what's happening.
Define the plant model:
G = zpk([-1],[-2 -3],1)
We want to find the closed loop transfer function H = G/(1 + G)
oneplusG = 1 + G
After clearing the fractions H = G/(1 + G) will end up with (s+2)(s+3) in both the numerator and denominator of H
H = G/oneplusG
H = G/(1 + G)
Now, if you're doing this by hand, you would probalby decide to cancel the common terms in the numerator and denominator, but Matlab won't do that unless you tell it to do so, using a function like minreal().
The feedback() function works differently and does not result in the apparent, common pole/zero pairs that result from the algebraic manipulations
H = feedback(G,1)
which is the same results as above after cancelling the common terms.
Futhermore, feedback() is smart enough to not cancel common pole/zero pairs should there be any in G to begin with.
G = zpk([-1 -4],[-2 -3 -4],1)
H = feedback(G,1)
Here, the pole/zero at s = -4 is inherent to the system and so remains in H.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Stability Analysis dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!