How to rearrange an equation in matlab to get the poles?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
%Values
Vs = 1;
Z0 = 50;
R = 50;
C = 1e-9;
L = 0;
syms s
%Where s = j*w
%Impedance of the resistor
ZR = R;
%Impedance of the capacitor
ZC = 1/(s*C);
%Impedance of the inductor
ZI = s*L;
%Impednace of the load
ZL = ZR + ZC
%Transfer function
G = (2*ZL)/(ZL+Z0)
Currently I get:
G =
(2000000000/s + 100)/(1000000000/s + 100)
But I want to get:
Is there any way I can use matlab to rearrange the equation to get the poles?
0 Commenti
Risposte (2)
John D'Errico
il 5 Dic 2021
Vs = 1;
Z0 = 50;
R = 50;
C = 1e-9;
L = 0;
syms s
%Where s = j*w
%Impedance of the resistor
ZR = R;
%Impedance of the capacitor
ZC = 1/(s*C);
%Impedance of the inductor
ZI = s*L;
%Impednace of the load
ZL = ZR + ZC;
%Transfer function
G = simplify((2*ZL)/(ZL+Z0))
Easy enough now. simplify made it pretty clear. What does numden tell you?
[N,D] = numden(G)
The pole lives wherever D == 0.
solve(D==0)
0 Commenti
Star Strider
il 5 Dic 2021
If the Control System Toolbox is available —
%Values
Vs = 1;
Z0 = 50;
R = 50;
C = 1e-9;
L = 0;
s = tf('s');
%Where s = j*w
%Impedance of the resistor
ZR = R;
%Impedance of the capacitor
ZC = 1/(s*C);
%Impedance of the inductor
ZI = s*L;
%Impednace of the load
ZL = ZR + ZC
%Transfer function
G = (2*ZL)/(ZL+Z0)
Ps = pole(G)
Zs = zero(G)
figure
pzplot(G)
Gmr = minreal(G) % Remove Pole-Zero Cancellations
Psmr = pole(Gmr)
Zsmr = zero(Gmr)
figure
pzplot(Gmr)
.
0 Commenti
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox 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!