# 基爾霍夫交流電路定律

vS（t）= V.SM cos 2
p英尺; 我（t）=我SM cos 2p英尺; VSM = 10 V; 一世SM = 1 A; f = 10 kHz;

R = 5歐姆; L = 0.2 mH; C1 = 10 mF; C2 = 5 mF

M2 - VRM + VLM = 0

M3 - VLM + VC2M = 0

M4 - VC2M + V主義 = 0

VLM = j*w* L *ILM

IC1M = j*w*C1*VC1M

IC2M = j*w*C2*VC2M

N的節點方程1 - IC1M - ISM + IRM + ILM +IC2M = 0

ivs （t）= 1.81 cos（wt + 79.96°）一個

{TINA口譯員的解決方案}
OM：= 20000 * PI;
VS：= 10;

Vs=Vc1+Vr{M1}
Vr=VL{M2}
Vr=Vc2{M3}
Vc2=可見光{M4}
Ivs=Ir+IL+Ic2-Is{N1}
{歐姆定律}
Ic1 = j的* OM * C1 * Vc1
VR = R *銥
VL = j的* OM * L * IL
Ic2 = j的* OM * C2 * Vc2
IVS = Ic1

IVS = [3.1531E1 + 1.7812E0 * j]的
ABS（IVS）= [1.8089]
fiIvs：= 180 *弧（IVS）/ PI
fiIvs = [79.9613]
#Python解決方案

cp= lambda Z : “{:.4f}”.format(Z)
om=20000*c.pi
VS=10

Ic1,Ir,IL,Ic2,Vc1,Vr,VL,Vc2,Vis,Ivs=s.symbols('Ic1 Ir IL Ic2 Vc1 Vr VL Vc2 Vis Ivs')
A=[s.Eq(Vc1+Vr,Vs),s.Eq(VL,Vr),s.Eq(Vc2,Vr),s.Eq(Vis,Vc2),#M1, M2, M3, M4
s.Eq(Ir+IL+Ic2-Is,Ivs), #N1
s.Eq(1j*om*C1*Vc1,Ic1),s.Eq(R*Ir,Vr),s.Eq(1j*om*L*IL,VL),s.Eq(1j*om*C2*Vc2,Ic2),s.Eq(Ic1,Ivs)] #Ohm’s rules
Ic1,Ir,IL,Ic2,Vc1,Vr,VL,Vc2,Vis,Ivs=[complex(Z) for Z in tuple(s.linsolve(A,(Ic1,Ir,IL,Ic2,Vc1,Vr,VL,Vc2,Vis,Ivs)))[0]]

print(“abs(Ivs)=”,cp(abs(Ivs)))
print(“180*c.phase(Ivs)/c.pi=”,cp(180*c.phase(Ivs)/c.pi))

VS = VC1 +VZ

VZ = Z · IZ

I = j w C1· VC1

{使用阻抗Z的解決方案}
OM：= 20000 * PI;
VS：= 10;

Z：= replus（R，replus（j * OM * L，1 / J / OM / C2））;
Z = [2.1046E0-2.4685E0 * j]的

I = [3.1531E1 + 1.7812E0 * j]的
ABS（I）= [1.8089]
180 *弧（I）/ PI = [79.9613]
#Python解決方案

Replus= 拉姆達 R1, R2 : R1*R2/(R1+R2)
om=20000*c.pi
VS=10

Z=Replus(R,Replus(1j*om*L,1/1j/om/C2))

I=s.symbols('I')
A=[s.Eq(1j*om*C1*(Vs-Z*(I+Is)),I),]
I=[複數(Z) for Z in tuple(s.linsolve(A,I))[0]][0]

print(“abs(I)=”,cp(abs(I)))
print(“180*c.phase(I)/c.pi=”,cp(180*c.phase(I)/c.pi))

i（t）= 1.81 cos（wt + 80°）一個

vS（t）= 10 cos wt V， iS（t）= 5 cos（w t + 30°）mA;

C1 = 100 nF， C2 = 50 nF， R1 = R.2 = 4 k; L = 0.2 H， f = 10 kHz。

VR2M = R.2*IR2M

IC1m = j *w*C1*VC1M

IC2m = j *w*C2*VC2M

VLM = j *w* L * ILM

{TINA口譯員的解決方案}
F：= 10000;
VS：= 10;
S：= 0.005 * EXP（j * PI / 6）;
OM：= 2 * PI * F;
sys ir1，ir2，ic1，ic2，iL，vr1，vr2，vc1，vc2，vL，vis，ivs
ivs=ir1+ic2 {1}
ir1=iL+ic1 {2}
ic2+iL+ic1+Is=ir2 {3}
Vs=vc2+vr2 {4}
Vs=vr1+vr2+vc1 {5}
vc1=vL {6}
vr2=可見 {7}
vr1=ir1*R1 {8}
vr2=ir2*R2 {9}
ic1=j*om*C1*vc1 {10}
ic2=j*om*C2*vc2 {11}
vL=j*om*L*iL {12}

ABS（vr1）= [970.1563m]
ABS（vr2）= [10.8726]
ABS（ic1）= [245.6503u]
ABS（ic2）= [3.0503m]
ABS（vc1）= [39.0965m]
ABS（vc2）= [970.9437m]
ABS（IL）= [3.1112u]
ABS（VL）= [39.0965m]
ABS（IVS）= [3.0697m]
ABS（VIS）= [10.8726]
#Python解決方案

cp= lambda Z : “{:.4f}”.format(Z)
F = 10000
VS=10
S=0.005*c.exp(1j*c.pi/6)
om=2*c.pi*f
ir1,ir2,ic1,ic2,iL,vr1,vr2,vc1,vc2,vL,vis,ivs=s.symbols('ir1 ir2 ic1 ic2 iL vr1 vr2 vc1 vc2 vL vis ivs')
A=[s.Eq(ir1+ic2,ivs), #1
s.Eq(iL+ic1,ir1), #2
s.Eq(ic2+iL+ic1+Is,ir2), #3
s.Eq(vc2+vr2,Vs), #4
s.Eq(vr1+vr2+vc1,Vs), #5
s.Eq(vL,vc1), #6
s.Eq(vis,vr2), #7
s.Eq(ir1*R1,vr1), #8
s.Eq(ir2*R2,vr2), #9
s.Eq(1j*om*C1*vc1,ic1), #10
s.Eq(1j*om*C2*vc2,ic2), #11
s.Eq(1j*om*L*iL,vL)] #12
ir1,ir2,ic1,ic2,iL,vr1,vr2,vc1,vc2,vL,vis,ivs=[complex(Z) for Z in tuple(s.linsolve(A,(ir1,ir2,ic1,ic2,iL,vr1,vr2,vc1,vc2,vL,vis,ivs)))[0]]

print(“abs(vc1)=”,cp(abs(vc1)))
print(“abs(vc2)=”,cp(abs(vc2)))
print(“abs(iL)=”,cp(abs(iL)))
print(“abs(vL)=”,cp(abs(vL)))
print(“abs(ivs)=”,cp(abs(ivs)))
print(“180+度(相位(ivs))=”,cp(180+m.度(c.相位(ivs))))
print(“abs(vis)=”,cp(abs(vis)))
print(“度(相位(vis))=”,cp(m.度(c.相位(vis))))
print(“度(相位(vr1))=”,cp(m.度(c.相位(vr1))))
print(“度(相位(vr2))=”,cp(m.度(c.相位(vr2))))
print(“度(相位(ic1))=”,cp(m.度(c.相位(ic1))))
print(“度(相位(ic2))=”,cp(m.度(c.相位(ic2))))
print(“度(相位(vc2))=”,cp(m.度(c.相位(vc2))))
print(“度(相位(vc1))=”,cp(m.度(c.相位(vc1))))
print(“度(相位(iL))=”,cp(m.度(c.相位(iL))))
print(“度(相位(vL))=”,cp(m.度(c.相位(vL))))

VS = V.C2 + R2 IR2 一個。）

VS = V.C1 + R2 IR2 + R1 IR1 灣）

VC1 = V.L = jwL = jwL（我R1 - 一世C1）= jwR1 -jwwC1 VC1

C。）

d。）

IR2 = IC2 +我R1 +我S = jwC2 VC2 +我R1 +我S

iR1（t）= 0.242 cos（wt + 155.5°） 嘛