[LTSpice] Simulating a simple circuit

Greetings to all,

I would like to simulate this simple variable power supply circuit:

but I am having problems, mainly:

  1. Running my attached schematic gives error because the circuit is over-defined. Where is it exactly over-defined ?

  2. Am I simulating the transformer right ? (Self-inductance values don’t matter now)

Attached are the parts’ libraries and symbols. All are found via the great LTSpice Yahoo group and the credit goes to the original makers.
Schematic + Libraries + Symbols

Usually when something is ‘over defined’ it usually means there are an abundance of non-linear elements (such as diodes/transistors). This leads to solutions that do not converge when it does stepping of various voltages/currents.

Have you tried simulating everything from R1 onwards? I usually start by ripping out everything but the things closest to the output and then work my way back, adding stuff back in. Taking out the bridge and inductor should ease up on the simulation engine.

Also, what is your eventual goal with your simulation? Unfortunately, a SPICE simulation should be used to test a hypothesis, not necessarily replicate behavior wholesale.

Hi @egy,

LTSpice generates the following error:

The equation solver in LTSpice can’t find a solution for V1 in combination with L1 without having some resistance in the loop. To know why this is a limitation, you’d have to know a lot about how Spice simulates circuits.

A work-around is to add a very small resistor in series with the inductor; 0.1 Ohm will do, for instance. Or you can simply make the voltage source have a non-zero output resistance by setting the Series Resistance to 0.1 like so:

After doing that, LTSpice complains that there is a floating node. This is because the V1/L1 combination does not have a reference point in the circuit. Adding a ground to the voltage source cures this. Note that, while you need to add this ground in the simulation, you don’t have to do that in real life :slight_smile: It’s just to make LTSpice happy.

The circuit now looks like this:

And simulates without problems.

Regards,
Niels.

2 Likes

I am sorry I didn’t understand this sentence. Stepping a voltage/current is like stepping a resistance ? Or do you mean time-varying voltages and currents ?

Very clever and modular! Thanks for the helpful tip.

Great question. I am actually a beginner and haven’t got used to any EDA or simulators. Long story short, it’s just a homework (I know :slight_smile: )
And warm thanks Chris for re-creating Getting to Blinky and setting up this forum. I am sure, beside other popular forums, that’ll help people like me and the advanced likewise.

@n.a.moseley Ah! I remember now! Inductance practical model is a series resistance with the coil. SPICE was right to complain. I shouldn’t have made it too ideal (let alone the perfect mutual inductance). Your solution (along with the ground node to make LTSpice happy) is great. Thanks for sharing your experience :slight_smile: I’ll edit the post once I modify the circuit.
EDIT: Worked great and as expected.

This is basically how SPICE works…it looks at the source in your circuit and steps the voltage or current in small increments to see what happens when it solves the matrix math. That’s all I meant here.

@n.a.moseley gave an overall great analysis/bit of help. I would continue to caution you about creating the circuit as a replication of the circuit you’re looking at. I can try to explain this in a future video, perhaps.

@egy, in most situations, you can get away without adding parasitic resistance to inductors, capacitors, voltage sources etc. Most circuits have enough components in each loop that LTSpice won’t complain. You were just unlucky :slight_smile: