1
\$\begingroup\$

I'm studying for my electrical circuits exam and since Eagle is used for some future exams I thought I could learn it and double-check my calculations by simulating with Eagle.

I'm trying to simulate the following circuit, but Eagle is giving me a "singular matrix warning" and failing to simulate. It's also telling me to "check nodes l_l2#branch and l_l2#branch" but I don't know how which nodes those are, or how to get nodes' names.

I searched for this error and what I found concerned voltage sources in a loop (only one source here) or infinite impedance branches (there shouldn't be any). Why isn't the simulation running? Thanks in advance!

Netlist:

* SpiceNetList
* 
* Exported from Main.sch at 5/12/19 12:37 PM
* 
* EAGLE Version 9.4.0 Copyright (c) 1988-2019 Autodesk, Inc.
* 
.TEMP=25.0

* --------- .OPTIONS ---------
.OPTIONS ABSTOL=1e-12 GMIN=1e-12 PIVREL=1e-3 ITL1=100 ITL2=50 PIVTOL=1e-13 RELTOL=1e-3 VNTOL=1e-6 CHGTOL=1e-15 ITL4=10 METHOD=TRAP SRCSTEPS=0 TRTOL=7 NODE

* --------- .PARAMS ---------

* --------- devices ---------
V_V1 N_1 0 DC 1V AC 1V 
R_R2 0 N_1 4 
L_L1 0 N_3 20m 
L_L2 0 N_1 20m 
R_R1 N_3 N_1 2 

* --------- simulation ---------
.control
set filetype=ascii
OP
write Main.sch.sim
.endc



.END

Schematic:circuit schematic

P.S. Are there any good Eagle tutorials out there focused on SPICE simulation? Moreover, Eagle only allows simulating DC/AC sweeps, transients or at operating point. How do I simulate a constant-frequency AC source?

\$\endgroup\$
  • \$\begingroup\$ the inductor is shorting the voltage source. \$\endgroup\$ – analogsystemsrf May 12 at 10:52
  • \$\begingroup\$ Which inductor, and how would I go about fixing this? I don't see any short-circuit in the schematic and I copied it verbatim from the professor's handout... \$\endgroup\$ – vaporK May 12 at 10:56
  • \$\begingroup\$ If you cannot see that L2 is across your voltage source, perhaps this is a good time to practice redrawing the circuit to get familiar with seeing parallel and series connections. \$\endgroup\$ – Tyler May 12 at 11:36
  • \$\begingroup\$ Add a tiny resistance in series with L2. \$\endgroup\$ – Chu May 12 at 12:32
  • \$\begingroup\$ Got it, thank you. So this is a shortcoming of ngspice's capabilities, it can't simulate ideal circuits? (makes sense) How would I go about solving it? Adding a small resistor in series? EDIT: @Chu, didn't see your comment. I'll try, thank you! \$\endgroup\$ – vaporK May 12 at 12:38
0
\$\begingroup\$

The problem is that you have asked for an operating point (OP) analysis which is a dc simulation, regardless of whether your voltage source is intended to be an ac source. So, the inductor L2 is shorting the voltage source.

I have no experience with how Eagle does simulations, but there may be an option to skip the OP. You might then be able to run a transient simulation, if you want to see voltage and current as a function of time. If you only want to see the magnitude and phase of ac signals then run an "AC sweep"...you can usually have that run at a single frequency rather than sweep the frequency.

\$\endgroup\$
  • \$\begingroup\$ Thank you! If I try to make it run at a single frequency, however, Eagle tells me that end frequency must be greater than starting frequency. Moreover, if I try to run an AC sweep, the error is still there :( \$\endgroup\$ – vaporK May 12 at 12:40
  • \$\begingroup\$ It sounds like you will have to add a small resistance in series with L2. Try 0.001 ohm and see if that helps. Yes, your ac results will be a bit incorrect, but the other option is to use a different simulator. \$\endgroup\$ – Elliot Alderson May 12 at 12:44
  • \$\begingroup\$ Works. Thank you! \$\endgroup\$ – vaporK May 12 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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