How to rearrange an equation in matlab to get the poles?

2 visualizzazioni (ultimi 30 giorni)
%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?

Risposte (2)

John D'Errico
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))
G = 
Easy enough now. simplify made it pretty clear. What does numden tell you?
[N,D] = numden(G)
N = 
D = 
The pole lives wherever D == 0.
solve(D==0)
ans = 

Star Strider
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
ZL = 5e-08 s + 1 ----------- 1e-09 s Continuous-time transfer function.
%Transfer function
G = (2*ZL)/(ZL+Z0)
G = 1e-16 s^2 + 2e-09 s ------------------- 1e-16 s^2 + 1e-09 s Continuous-time transfer function.
Ps = pole(G)
Ps = 2×1
0 -10000000
Zs = zero(G)
Zs = 2×1
0 -20000000
figure
pzplot(G)
Gmr = minreal(G) % Remove Pole-Zero Cancellations
Gmr = s + 2e07 -------- s + 1e07 Continuous-time transfer function.
Psmr = pole(Gmr)
Psmr = -10000000
Zsmr = zero(Gmr)
Zsmr = -20000000
figure
pzplot(Gmr)
.

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!

Translated by