How to rearrange an equation in matlab to get the poles?
2 views (last 30 days)
Show older comments
%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 Comments
Answers (2)
John D'Errico
on 5 Dec 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 Comments
Star Strider
on 5 Dec 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 Comments
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!