Solving multiple symbolic equations

4 visualizaciones (últimos 30 días)
Niels ter Heerdt
Niels ter Heerdt el 9 de Mzo. de 2021
Comentada: Star Strider el 10 de Mzo. de 2021
I'm analyzing a very large electronic circuit and need the symbolic equations to describe input impedance. I've found the equations that I need, but substiting them in by hand is a hassle. My goal is to take i_in and plug it into z_in, and do something similar for all the equations until I get z_in terms of just resistances. I've tried subs, solve, isolate, but I'm not able to get the result I want.
syms z_in V_in i_b2 i_in V_5 i_e2 i_r2l V_r2l R6 R5 R4 g_m1 V_eb1 g_m2 V_be2 V_r2l R2 RL a2 V_b1 R_eq R1;eq1 = z_in == V_in/i_in
eq2 = i_in == (V_in/(R6+R4))+i_b2
eq3 = i_b2 == ((V_in - V_5)/R1)+i_e2
eq4 = V_5 == i_b2*R5
eq5 = i_e2 == -g_m1*V_eb1 - g_m2*V_be2 + i_r2l
eq6 = i_r2l == ((V_r2l)/(R2+RL))
eq7 = V_r2l == V_in-V_5-(a2/g_m2)*i_e2
eq8 = V_eb1 == -V_b1
eq9 = V_b1 == -g_m2*V_be2*(R_eq)
eq10 = V_be2 == (a2/g_m2) * i_e2
sub1 = subs(eq1, i_in, eq2);
sub2 = subs(sub1, i_b2, eq3);
sub3 = subs(sub2, i_e2, eq5);
sub4 = subs(sub3, V_5, eq4);
sub5 = subs(sub4, V_be2, eq10);
sub6 = subs(sub5, V_eb1, eq8);
sub7 = subs(sub6, i_r2l, eq6);
sub8 = subs(sub7, V_b1, eq9);
sub9 = subs(sub8, V_r2l, eq7);

Respuestas (1)

Star Strider
Star Strider el 9 de Mzo. de 2021
The resistances do not appear to have specific solutions, although other variables do:
S = solve([eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9,eq10])
V_5 = S.V_5
z_in = S.z_in
And all the resistances appear to be identically 0, although intuitively, I doubt that is actually the situation.
  2 comentarios
Niels ter Heerdt
Niels ter Heerdt el 10 de Mzo. de 2021
I also don't think that would be the solution, but the aim was to find a solution to z_in by substituding all the gotten equations into one. the values for the resistors gm_1, gm_2, a1 and a2 are known. I also tried the following but this gave an error that the equation must be arithmetical, Is there a way to solve this?. I also included the values.
syms z_in V_in i_b2 i_in V_5 i_e2 neweq neweq2 i_r2l V_r2l R6 R5 R4 g_m1 V_eb1 g_m2 V_be2 V_r2l R2 RL a2 V_b1 R_eq R1;
V_be2 = (a2/g_m2) * i_e2
V_b1 = -g_m2*V_be2*(R_eq)
V_eb1 = -V_b1
V_5 = i_b2*R5
V_r2l = V_in-V_5-(a2/g_m2)*i_e2
i_r2l = ((V_r2l)/(R2+RL))
eqn = i_e2 == -g_m1*V_eb1 - g_m2*V_be2 + i_r2l
neweq = isolate(eqn, i_e2)
eqn2 = i_b2 == ((V_in - V_5)/R1) + neweq
neweq2 = isolate(eqn2, i_b2)
i_in = (V_in/(R6+R4)) + neweq2
z_in = V_in/i_in
RL = 4
R1= 5300
R2 = 5300
R4 = 1
R5 = 50
R6 = 50
g_m1 = 1.9944
g_m2 = 0.056
a1 = 30
a2 = 30
Rb1 = 500
Star Strider
Star Strider el 10 de Mzo. de 2021
I looked at that with the new values and I still cannot make any sense out of what you want to do, nor can I get any useful results from it.
I have used the Symbollic Math Toolbox to analyse circuits, and have always use the node-voltage approach, such that each node was expressed as a current as a function of relevant voltages and impedances (or resistances). The equations at every node are then the sum of the currents into and our of that node. String enough of those together and the transfer function for the circuit emerges at the end.
I have no idea what you are doing, or what circuit you are analysing. I cannot get anything useful out of your code, even with the supplied variable values.

Iniciar sesión para comentar.

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by