Monday, February 25, 2013

Circuit Solver - IV

Spent the weekend reading on different integration techniques and got only more confused.

So need to investigate a little more. Take the simple circuit below:

These are the parameters and the loops found:
--------------------------------------------------------------------------------------------------------------------
Resistor is  R4 = 10.000000  located at  9I
Inductor is  L4 =0.100000  located at  9K
Ammeter is  A5  located at  9J  with positive polarity towards 9K
Ammeter is  A2  located at  3H  with positive polarity towards 4H
Resistor is  R3 = 10.000000  located at  6I
Ammeter is  A4  located at  6J  with positive polarity towards 6K
Inductor is  L3 =0.100000  located at  6K
Ammeter is  A1  located at  1B  with positive polarity towards 1C
Resistor is  R1 = 0.100000  located at  1E
Resistor is  C1 = 10.000000  located at  4H
Inductor is  L1 =0.000100  located at  1F
Resistor is  R2 = 10.000000  located at  1I
Inductor is  L2 =0.100000  located at  1K
Ammeter is  A3  located at  1J  with positive polarity towards 1K
Resistor is  V1 = 100000.000000  located at  4D
Voltage Source is  V1 of 120.000000 V(peak), 60.000000 Hz(frequency) and 0.000000 (degrees phase shift)  located at  4A  with positive polarity towards 3A
**************************************************
Number of nodes 5
Number of branches 8
Number of loops 4
**************************************************
1D 2D 3D 4D 5D 6D 6C 6B 6A 5A 4A 3A 2A 1A 1B 1C 1D
6H 7H 8H 9H 9I 9J 9K 9L 8L 7L 6L 6K 6J 6I 6H
1H 1G 1F 1E 1D 2D 3D 4D 5D 6D 6E 6F 6G 6H 5H 4H 3H 2H 1H
1H 1G 1F 1E 1D 2D 3D 4D 5D 6D 6E 6F 6G 6H 7H 8H 9H 9I 9J 9K 9L 8L 7L 6L 5L 4L 3L 2L 1L 1K 1J 1I 1H
**************************************************
--------------------------------------------------------------------------------------------------------------------

Which is correct. However, these are the system matrices that result:
--------------------------------------------------------------------------------------------------------------------
a=
100000.0  0.0  100000.0  100000.0
0.0  20.0  0.0  10.0
100000.0  0.0  100010.1  100000.1
100000.0  10.0  100000.1  100020.1

e=
0.0  0.0  0.0  0.0
0.0  0.2  0.0  0.1
0.0  0.0  0.0001  0.0001
0.0  0.1  0.0001  0.2001

b=
1.0
0.0
0.0
0.0
--------------------------------------------------------------------------------------------------------------------

I chose resistor V1 as a large resistor. And that has caused all the problems. It appears in three out of four loops. And the entire ODE becomes stiff. One glaring element is in row 4, column 2 of matrix a. This is 10.0 while all other elements are 100000 or greater. This can be one way of reducing the system.

The resistor V1 should appear in at least one loop. Suppose it appears in a loop and we neglect the dynamics of that loop and consider a static equation. This may be OK because if you have a ridiculously low time constant, why solve it unless you want to. So can we reduce the time constants of the other equations to values that we can integrate peacefully? In the above example, resistor V1 appears quite conveniently in a static equation. So we can get rid of it from the other equations.

Performing row operations:

R3=R3-R1
R4=R4-R1

will get rid of these small time constants.

So this makes we wonder, if I need to do a preprocessing to isolate the time constants as far as possible. And if that needs to be done, what should be logic?

No comments:

Post a Comment