Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LTSpice issue...

Status
Not open for further replies.

smanches

New Member
I have been playing around with LTSpice recently (very cool) and successfully simulated a simple boost converter without issues. Takes less than 20-30 seconds to do the full 100ms simulation.

Yesterday I created a new circuit, but LTSpice is taking hours to run the same 100ms simulation on it.

Anyone have any idea of why this would be?
 

Attachments

  • ltspice.jpg
    ltspice.jpg
    122.9 KB · Views: 2,167
I have been playing around with LTSpice recently (very cool) and successfully simulated a simple boost converter without issues. Takes less than 20-30 seconds to do the full 100ms simulation.

Yesterday I created a new circuit, but LTSpice is taking hours to run the same 100ms simulation on it.

Anyone have any idea of why this would be?

hi,
Can you post the *.asc file.?

EDIT: why have you posted an image of a mains bridge rectifier.?
 
Last edited:
That's the circuit that is taking forever to simulate. It's so simple I can't see why it does that.

I just noticed that if I take out the caps it simulates quickly.

Here is the asc file.
 

Attachments

  • RectifiedMains.asc
    1.3 KB · Views: 725
That's the circuit that is taking forever to simulate. It's so simple I can't see why it does that.

I just noticed that if I take out the caps it simulates quickly.

Here is the asc file.

hi,
Remove the Rser from the Vsrc.
Modify to suit this image.
 

Attachments

  • esp01 Apr. 22.gif
    esp01 Apr. 22.gif
    29.4 KB · Views: 3,955
Yep, that was it. Thank you much!

Any idea why that was causing the simulation to go wacky?
 
Yep, that was it. Thank you much!

Any idea why that was causing the simulation to go wacky?

hi,
I only started using LTS a few weeks ago, but have found that it can give unexpected results at times.:)

I suspect with the inclusion of the Rsrc in the equations that it has to solve were slowing it right down.
Also notice I add the number of cycles over which to do the calculations.
 
Yep, that was it. Thank you much!

Any idea why that was causing the simulation to go wacky?
Damn strange. :confused:
I downloaded your .asc file and ran it, unmodified. It finished the sim almost instantaneously. I then duplicated your schematic on another instance of LTspice (same version), and it hung up at about 21ms, running very slowly past that time. Moving the series resistance outside the generator did not help. If I replace the diodes with 1N4004, it runs fast.
 
Damn strange. :confused:
I downloaded your .asc file and ran it, unmodified. It finished the sim almost instantaneously. I then duplicated your schematic on another instance of LTspice (same version), and it hung up at about 21ms, running very slowly past that time. Moving the series resistance outside the generator did not help. If I replace the diodes with 1N4004, it runs fast.

hi,

Re-ran the original it solved instantly, second run it hung up, so tried with MURS320 diodes, works OK.?

EDIT:
using the original circuit I deleted all 4 diodes, used the F2 and standard diode 'D' and rebuilt the bridge, works OK, no other changes.:confused:
 
Last edited:
Confirmed here too. Even with the Rser parameter set on the voltage source, setting the diodes to a specific model makes it fast.

I'd guess there are no default parameters for components, and it just gets confused. I'll make sure I set parameters for everything from now on.
 
Confirmed here too. Even with the Rser parameter set on the voltage source, setting the diodes to a specific model makes it fast.

I'd guess there are no default parameters for components, and it just gets confused. I'll make sure I set parameters for everything from now on.

Read my EDIT.????
 
hi smanches,
You may find this useful.

.MODEL 1N4007 D(Rs=0.010 Tt=2u Cjo=15p Vj=0.6 BV=1000 Ibv=5u)

.MODEL UF4007 D(Rs=0.161 Tt=75n Cjo=17p Vj=0.6 BV=1000 Ibv=10u)

To use these in your project, select key 'S' and paste the required diode model into the Spice directive box.

Change the 'D' on the diode symbol to either 1N4007 or UF4007 to suit the diode model directive.

The UF4007 model is the fast diode.

These models were downloaded from the web, author is ARO.
 
another thing to speed things up is to give your floating supply a ground reference. SPICE doesn't like floating voltage sources. you could make two supplies with half the voltage in series with the connection between the two grounded, or "cheat" and run 2 100MEG resistors from each supply rail to ground.

using actual models of devices rather than the "default" devices sometimes can speed hings up, or slow them down, depending how well written the model is.
 
another thing to speed things up is to give your floating supply a ground reference. SPICE doesn't like floating voltage sources. you could make two supplies with half the voltage in series with the connection between the two grounded, or "cheat" and run 2 100MEG resistors from each supply rail to ground.

using actual models of devices rather than the "default" devices sometimes can speed hings up, or slow them down, depending how well written the model is.
The source isn't floating if you have "real" diodes. I tried adding a resistor from the negative terminal of the source to ground. I started with R=1e12, and the sim would hang as before. I dropped the value to 1e11, and it still hung. It ran with R=1e10.
I then removed the resistor and went into the SPICE tab in the Control panel. Changing Gmin to 1e-10 allows the sim to run fast.
 
"I then removed the resistor and went into the SPICE tab in the Control panel. Changing Gmin to 1e-10 allows the sim to run fast."

i tried that (i've been leery of changing things like that without knowing what the effects would be) and a simulation of an audio amp that always seems to take forever to start because of Gmin stepping runs smoothly. i wonder what side effects it has.....
 
"I then removed the resistor and went into the SPICE tab in the Control panel. Changing Gmin to 1e-10 allows the sim to run fast."

i tried that (i've been leery of changing things like that without knowing what the effects would be) and a simulation of an audio amp that always seems to take forever to start because of Gmin stepping runs smoothly. i wonder what side effects it has.....
In the case of the diode bridge sim, the OFF resistance of the default diode model D is equal to 1/Gmin (search LTspice help for gmin). Changing the Gmin value to 1e-10 means a 10GigΩ resistor is in parallel with each diode. Not a big deal. It is also probably not a big deal for your audio amp.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top