How does the division operator work with transfer function objects?

42 vues (au cours des 30 derniers jours)
Shovnik Paul
Shovnik Paul le 28 Déc 2021
Réponse apportée : Paul le 28 Déc 2021
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)

Réponse acceptée

Paul
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)
G = (s+1) ----------- (s+2) (s+3) Continuous-time zero/pole/gain model.
We want to find the closed loop transfer function H = G/(1 + G)
oneplusG = 1 + G
oneplusG = (s+1.586) (s+4.414) ------------------- (s+2) (s+3) Continuous-time zero/pole/gain model.
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 = (s+1) (s+2) (s+3) ------------------------------- (s+2) (s+1.586) (s+3) (s+4.414) Continuous-time zero/pole/gain model.
H = G/(1 + G)
H = (s+1) (s+2) (s+3) ------------------------------- (s+2) (s+1.586) (s+3) (s+4.414) Continuous-time zero/pole/gain model.
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)
H = (s+1) ------------------- (s+1.586) (s+4.414) Continuous-time zero/pole/gain model.
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)
G = (s+1) (s+4) ----------------- (s+2) (s+3) (s+4) Continuous-time zero/pole/gain model.
H = feedback(G,1)
H = (s+4) (s+1) ------------------------- (s+1.586) (s+4) (s+4.414) Continuous-time zero/pole/gain model.
Here, the pole/zero at s = -4 is inherent to the system and so remains in H.

Plus de réponses (0)

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!

Translated by