I'm having trouble simulating what should be a simple circuit in LTspice. I am designing a simple PWM-regulated power supply, but I'm running into problems when I try to simulate it.

When I simulate it in Falstad circuit simulator I get a result I expect, that is that voltage is regulated proportionally to the PWM of the generator.

Falstad circuit

However, in LTspice I can't simulate this circuit with same and consistent result.

LTspice circuit

I tried constructing this circuit without ground connection, but LTspice gives me an error that it needs a ground connection. Then if I try to connect ground somewhere in this circuit, I am running into problems. If I connect it before the diode bridge, the diode bridge itself stops working and only works as a half-wave rectifier. If I try to connect it after the bridge, the simulation stops working correctly at all. It can slow down to simulating only a few us in one minute, I start getting either huge GV or small nV readings on the probe, lots of transients and artifacts.

How can I fix this to get correct simulation results in LTspice?

  • \$\begingroup\$ You haven't told us what the LTSpice result problem is. \$\endgroup\$
    – Andy aka
    Commented Feb 26, 2020 at 8:07
  • \$\begingroup\$ I would connect the ground in the lower terminal of the load resistor you have, before the diodes it could effectively cause a short on it. Also if you can please add the models you are using for the NMOS and diodes on LTspice \$\endgroup\$
    – Juan
    Commented Feb 26, 2020 at 8:17
  • 2
    \$\begingroup\$ LTSpice is correct. Falstad is making some assumptions and giving you more complicated components than you can see. PWM from a voltage source into an RC load will not give you what you expect. \$\endgroup\$
    – Neil_UK
    Commented Feb 26, 2020 at 8:20
  • 4
    \$\begingroup\$ To put it another way, LTSpice's 'errors' are telling you that you don't understand your circuit, and haven't drawn enough of it to work properly. There's a reason professional engineers will use LTSpice and won't use Falstad. \$\endgroup\$
    – Neil_UK
    Commented Feb 26, 2020 at 9:00
  • \$\begingroup\$ Don't use single ended sources. \$\endgroup\$
    – DKNguyen
    Commented Dec 7, 2020 at 23:32

1 Answer 1


LTspice needs ground to provide a reference voltage. You can put it where you like, but in some places the simulation may slow down due to the increased amount of 'above/below ground' activity. Generally it is best to put it where the real ground will be in your circuit.

You should choose real components (eg. MURS120 diode, IRFZ44N MOSFET, Al electrolytic 2200 uF capacitor) rather than the default, to give them realistic parameters. Default parts can cause the simulation to become very slow or fail when they are used outside their normal parameters.

Peculiar circuit configurations (such as trying to PWM a large capacitor) can also make the simulation slow.

When I simulate it in Falstad circuit simulator I get a result I expect, that is that voltage is regulated proportionally to the PWM of the generator.

You should not expect that. If the FET and diodes have low 'on' resistance then the capacitor will still charge up close to the peak rectified voltage, unless the PWM ratio is very low.


Your Answer

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

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