Skip to content

singular matrix error unless I add a resistor to opamp output #1014

@mpictor

Description

@mpictor

At first glance this looks similar to #988 , but

  • I'm already using the ideal op-amps
  • That person doesn't seem to encounter singular matrix errors

This circuit worked fine until I added the highlighted diode, adjacent resistor, and the switches; after I added them I kept getting Singular matrix errors along with either extreme currents on the center opamp's output, or extreme voltages on its negative input.

I tried a dozen tweaks to the circuit to no avail, including replacing the switches with wire or adding a resistor next to the diode. Finally I added a resistor to the opamp output and haven't had problems since.

I've not had any such issues with the left op-amp. Not sure if that'd be because of the diode, lack of feedback, or what.


It seems like even a 1n resistor fixes it. I'm not sure how much overhead / inaccuracy that'd add if included in the models, but maybe an option?

Another possible solution, which might also serve as a general solution to simulation errors: if an error is encountered that stops simulation, add tiny series resistances to capacitors, opamp outputs, etc and re-run the last simulation step. On success, leave the resistances in for n cycles then remove them. (I'm assuming the issue is almost always inrush current.)


Image
$ 1 0.000005 7.619785657297057 37 5 50 5e-11
a 16 80 96 80 8 5 0 1000000 0.34396746666729217 0.3714013751661063 100000
172 304 16 304 -32 0 7 1.5097 50 0.01 0 0.5 %2B Voltage
O 112 16 160 16 1 0
w 304 80 304 96 1
t 256 64 304 64 0 1 -1.509699940454135 1.2941987520744888e-8 1000 default
r 304 144 304 256 0 0.01
w 304 16 304 48 0
w 0 144 0 64 0
w 16 96 -16 96 0
w 0 64 16 64 0
350 -272 64 -272 128 0 10000 3605 20 100 0.5 Temperature
R -128 -32 -128 -80 0 0 40 5 0 0 0.5
174 -80 96 -48 144 1 50000 0.7772000000000001 I lim
r -272 128 -272 192 0 10000
g -208 224 -208 256 0 0
w -272 192 -240 192 0
w -240 192 -208 192 0
w -208 64 -224 64 0
w -224 64 -272 64 0
w -208 64 -128 64 0
w -128 224 -208 224 0
174 -208 128 -176 192 1 50000 0.10400000000000001 temp lim
w -208 128 -208 64 0
a -160 272 -80 272 9 15 0 1000000 4.113181328349878 4.539149188077992 100000
w -272 128 -304 128 0
w -304 128 -304 288 0
w -304 288 -160 288 0
w -176 160 -176 256 0
w -176 256 -160 256 0
w -16 160 -16 96 0
d -16 160 -16 272 2 1N5711
w -16 272 -80 272 0
d 64 144 144 144 2 1N4148
r 0 64 0 -32 0 1000000
w 0 -32 -128 -32 0
w -128 -32 -128 64 0
r 256 256 176 256 0 1796
w 304 144 144 144 2
r -128 96 -128 64 0 100000
w -48 96 -16 96 0
w -48 128 -48 96 0
d -208 192 -208 224 2 1N4148
r -128 160 -128 96 0 10000
w -128 96 -80 96 0
w -128 160 -80 160 0
w -128 192 -128 160 0
d -128 192 -128 224 2 1N5712
d 48 256 176 256 2 1N4148
370 256 256 256 320 3 0 0
w 176 96 176 256 0
w 112 16 112 80 0
g 256 320 256 336 0 0
w 0 144 64 144 2
w 256 64 176 64 0
S 112 80 176 80 0 1 false 1 2
r 256 80 256 96 0 8039.999999999999
w 256 96 304 96 0
w 304 96 304 144 0
w 256 80 256 64 0
S 0 192 48 192 0 1 false 1 2
w 48 256 48 208 0
w 0 192 0 144 0
r 112 80 96 80 0 1
w 304 256 256 256 0
o 3 64 3 12291 0.0001 2.8860045420816625 0 1
o 1 64 0 12291 1.5097 2.7759114120891253 1 2 1 3
38 36 F1 0 300 2000 -1 Resistance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions