5
\$\begingroup\$

My circuit

I faced some errors while trying to simulate a circuit. I tried to simplify it, but errors still stayed in place :|

The following error message is what I get:

                    *************** PROCESS COMMAND ***************

/usr/bin/ngspice -n -b /home/rasakereh/Desktop/sharif/9602/EEC/test/test.ckt

                *************** PROCESS RESPONSE **************

Warning: singular matrix:  check nodes v3#branch and v3#branch

Warning: singular matrix:  check nodes v3#branch and v3#branch

Note: Starting dynamic gmin stepping
Trying gmin =   1.0000E-03 Warning: singular matrix:  check nodes v3#branch and v3#branch

Warning: Further gmin increment
Trying gmin =   5.6234E-03 Warning: singular matrix:  check nodes v3#branch and v3#branch

Warning: Further gmin increment
Trying gmin =   8.6596E-03 Warning: singular matrix:  check nodes v3#branch and v3#branch

...

Warning: gmin step failed
Warning: source stepping failed
doAnalyses: iteration limit reached

run simulation(s) aborted
Error: no such vector v(4)

Circuit: ********************************************************************************

Doing analysis at TEMP = 27.000000 and TNOM = 27.000000


CPU time since last call: 0.009 seconds.

Total CPU time: 0.010 seconds.

Total DRAM available = 7880.691406 MB.
DRAM currently available = 4678.652344 MB.
Total ngspice program size = 14.774414 MB.
Resident set size = 1.865234 MB.
Shared ngspice pages = 1.638672 MB.
Text (code) pages = 1.333008 MB.
Stack = 0 bytes.
Library pages = 404.000 kB.

I am using gEDA gscheme to generate the schematic, netlisting it using gnetlist and spice-sdb backend, trying to simulate it in gSpiceUi.

Thanks

\$\endgroup\$
5
  • 2
    \$\begingroup\$ What do you think the voltage at the top node should be, 23 V or 63 V? \$\endgroup\$
    – The Photon
    Mar 15, 2018 at 21:36
  • \$\begingroup\$ wow .... those power supplies would really smoke if they were real \$\endgroup\$
    – jsotola
    Mar 15, 2018 at 22:44
  • \$\begingroup\$ note: the orientation of V2 and V4 shows a lack of attention to detail and to neatness. \$\endgroup\$
    – jsotola
    Mar 15, 2018 at 22:45
  • \$\begingroup\$ @ThePhoton: you are right :)) \$\endgroup\$ Mar 16, 2018 at 6:08
  • \$\begingroup\$ @jsotola smoke :D \$\endgroup\$ Mar 16, 2018 at 6:08

3 Answers 3

4
\$\begingroup\$

You have voltage sources connected in a loop. That can't work.

Add some series resistance or change the circuit.

\$\endgroup\$
2
  • \$\begingroup\$ In fact, the main circuit had dependent voltage sources (CCVS) instead of V2 and V4. Would it force the controller currents to have specific values? \$\endgroup\$ Mar 16, 2018 at 6:39
  • \$\begingroup\$ No it can't force the inputs like that. It may even fail with two exactly equal voltage sources in parallel if there is no resistance in the circuit. \$\endgroup\$ Mar 16, 2018 at 8:38
4
\$\begingroup\$

In general, a 'singular matrix' error means you either have

a) A loop of zero impedance elements (for instance inductors, voltage sources)

b) An infinite impedance node (for instance a series connection of two capacitors)

In both cases, judicious use of a small resistor to put some impedance in the loop, which is probably realistic anyway, or a big resistor from the node to ground (10meg, 100meg) will make the simulator maths happy without changing the operation of your circuit too much.

\$\endgroup\$
0
3
\$\begingroup\$

You are probably missing a 0 node that denotes GND (zero potential reference point). That was my case when simulating in KiCAD [1] :-)

[1] https://kicad.org/

\$\endgroup\$
2
  • \$\begingroup\$ That was it for me. I wonder why the software can't detect this automatically and output a warning... seems simple enough. \$\endgroup\$
    – smheidrich
    Dec 23, 2021 at 18:53
  • \$\begingroup\$ Same. When I exported a circuit from KiCAD it failed to include a ground / 0 reference. \$\endgroup\$
    – bathMarm0t
    Apr 5, 2022 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.