How to rearrange an equation in matlab to get the poles?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
%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 comentarios
Respuestas (2)
John D'Errico
el 5 de Dic. de 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 comentarios
Star Strider
el 5 de Dic. de 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 comentarios
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!