How to rearrange an equation in matlab to get the poles?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
%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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/824240/image.png)
Is there any way I can use matlab to rearrange the equation to get the poles?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/824245/image.png)
0 Kommentare
Antworten (2)
John D'Errico
am 5 Dez. 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 Kommentare
Star Strider
am 5 Dez. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!