How to rearrange an equation in matlab to get the poles?
조회 수: 3 (최근 30일)
이전 댓글 표시
%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
답변 (2개)
John D'Errico
2021년 12월 5일
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
Star Strider
2021년 12월 5일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!