Circuit Theory/Example70/code

From Wikibooks, open books for an open world
Jump to: navigation, search
Node
vs1:=(1+I)/6;
vs2:=0.5 + I*sqrt(3)/2;
numeric::solve([(vs1-va)/5 - va - (va + vs2)/(sqrt(3)*I) = 0],[va])

Mesh
vs1:=(1+I)/6;
vs2:=0.5 + I*sqrt(3)/2;
numeric::solve([i1-i2-vs1+5*i1,i2*sqrt(3)*I - vs2 + i2 - i1,i3 = i1-i2],[i1,i2,i3])

Thevenin voltage
vs1:=(1+I)/6;
vs2:=0.5 + I*sqrt(3)/2;
numeric::solve([vth=(vs1+vs2)*sqrt(3)*I/(5 + sqrt(3)*I)-vs2],[vth])

Norton current
vs1:=(1+I)/6;
vs2:=0.5 + I*sqrt(3)/2;
numeric::solve([xn=vs1/5 - vs2/(sqrt(3)*I)],[xn])

calculating rth
 1/(1/5 + 1/(sqrt(3)*i)) = 0.5357 + 1.5465*i

checking rth
vth = 0.7479777026 + 0.5491833001*i;
xn = - 0.4666666667 + 0.3220084679*i;
rth = vth/xn

current in thevenin equivalent is
vth = 0.7479777026 + 0.5491833001*i;
rth=0.5357 + 1.5465*i
ixx = vth/(rth + 1)

power is
( 0.7479777026^2 +  0.5491833001^2)/(2*  0.5357)

checking with simulation
period is 2*pi = 6.2832 seconds

for the 1 ohm resistor
va = - 0.4206268848 + 0.06596618565*i = 
va(t) = 0.4258 * cos(t + 2.9860) (171 degrees)
xn =  - 0.4666666667 + 0.3220084679*i
i(t) = 0.5670 * cos(t+ 2.5376) (145.4 degrees)