我使用Erik Cheever的SCAM link脚本生成方程组。
我制作了文件example3.cir link,它是具有输入源Vs的香料RLC电路。
我还尝试了netlist2linss link github,但它不在laplace域中,并且无法正常工作。
example3.cir:
R1 2 1 R
C1 3 0 C
L1 2 3 L
Vs 1 0 V
>> fname = 'example3.cir'; scam; system_of_eqns = [Z == A*X]
Solved variables:
v_1
v_2
v_3
I_Vs
system_of_eqns =
0 == I_Vs + v_1/R1 - v_2/R1
0 == v_2*(1/R1 + 1/(L1*s)) - v_1/R1 - v_3/(L1*s)
0 == v_3*(C1*s + 1/(L1*s)) - v_2/(L1*s)
Vs == v_1
>> [A_,b_] = equationsToMatrix(system_of_eqns, X)
A_ =
[ -1/R1, 1/R1, 0, -1]
[ 1/R1, - 1/R1 - 1/(L1*s), 1/(L1*s), 0]
[ 0, 1/(L1*s), - C1*s - 1/(L1*s), 0]
[ -1, 0, 0, 0]
b_ =
0
0
0
-Vs
预期(电容器电压作为输出):
A =
[ 0, 1/C1 ]
[ -1/L1, -R/L1 ]
B =
[ 0, 1/L1 ]
C =
[ 1, 0 ]
D =
[ 0 ]
states = [sVC1 sIL1]
input = [ Vs ]