Roots of Symbolic Transfer Function
2 views (last 30 days)
Show older comments
I am trying to do some symbolic math. I can get a solution for the desired equation, Htf, ( S.Htf), but it is in a different form than I would like.
syms s gm1 gmp ro1 rop R2 R1 Cgs Cout Zcgs Zcgd Zcout Z1 Z2 Vinp Vinm Vout1 Vd Vout2 Htf
eqn1 = Vout1 == (-gm1*Vinp + gm1*Vinm)*Z1;
eqn2 = Z1 == 1/(1/ro1 + 1/Zcgs);
eqn3 = Vd == (-gmp*Vout1)*Z2;
%eqn4 = Iout1 == (Vout1 - Vd)/Zcgd;
eqn5 = Z2 == 1/(1/rop + 1/(R2 + R1) + 1/Zcout);
eqn6 = Vinm == Vd*(R1/(R1 + R2));
eqn7 = Vout2 == Vd*(Zcout/(Zcout));
eqn8 = Zcgs == 1/(s*Cgs);
%eqn9 = Zcgd == 1/(s*Cgd);
eqn10 = Zcout == 1/(s*Cout);
eqn11 = Htf == Vout2/Vinp;
%S = solve(eqn1,eqn2,eqn3,eqn5,eqn6,eqn7,eqn8,eqn10,eqn11,Zcgs,Zcgd,Zcout,Z1,Z2,Vinp,Vinm,Vout1,Vd,Vout2,Iout1,Htf,ReturnConditions=true);
S = solve(eqn1,eqn2,eqn3,eqn5,eqn6,eqn7,eqn8,eqn10,eqn11,Zcgs,Zcgd,Zcout,Z1,Z2,Vinp,Vinm,Vout1,Vd,Vout2,Htf);
S.Htf looks like:
S.Htf = (R1*gm1*gmp*ro1*rop + R2*gm1*gmp*ro1*rop)/(R1 + R2 + rop + Cgs*R1*ro1*s + Cgs*R2*ro1*s + Cout*R1*rop*s + Cout*R2*rop*s + Cgs*ro1*rop*s + R1*gm1*gmp*ro1*rop + Cgs*Cout*R1*ro1*rop*s^2 + Cgs*Cout*R2*ro1*rop*s^2)
I would like to get this in a symbolic form with factored roots in the variable 's', so that the equation looks like:
S.Htf = A/( (B + s)*(C+s) )
Is there a good way to accomplish this? I am struggling to figure it out.
0 Comments
Answers (1)
Walter Roberson
on 18 Dec 2024
Edited: Walter Roberson
on 18 Dec 2024
syms s gm1 gmp ro1 rop R2 R1 Cgs Cout Zcgs Zcgd Zcout Z1 Z2 Vinp Vinm Vout1 Vd Vout2 Htf
eqn1 = Vout1 == (-gm1*Vinp + gm1*Vinm)*Z1;
eqn2 = Z1 == 1/(1/ro1 + 1/Zcgs);
eqn3 = Vd == (-gmp*Vout1)*Z2;
%eqn4 = Iout1 == (Vout1 - Vd)/Zcgd;
eqn5 = Z2 == 1/(1/rop + 1/(R2 + R1) + 1/Zcout);
eqn6 = Vinm == Vd*(R1/(R1 + R2));
eqn7 = Vout2 == Vd*(Zcout/(Zcout));
eqn8 = Zcgs == 1/(s*Cgs);
%eqn9 = Zcgd == 1/(s*Cgd);
eqn10 = Zcout == 1/(s*Cout);
eqn11 = Htf == Vout2/Vinp;
%S = solve(eqn1,eqn2,eqn3,eqn5,eqn6,eqn7,eqn8,eqn10,eqn11,Zcgs,Zcgd,Zcout,Z1,Z2,Vinp,Vinm,Vout1,Vd,Vout2,Iout1,Htf,ReturnConditions=true);
S = solve(eqn1,eqn2,eqn3,eqn5,eqn6,eqn7,eqn8,eqn10,eqn11,Zcgs,Zcgd,Zcout,Z1,Z2,Vinp,Vinm,Vout1,Vd,Vout2,Htf);
[N,D] = numden(S.Htf);
R = solve(D, s);
HTF = N / ((R(1) - s) * (R(2) - s))
pretty(HTF)
0 Comments
See Also
Categories
Find more on Debugging and Analysis 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!