Author Topic: startup option in simulations: LTSpice and ngspice  (Read 3400 times)

0 Members and 1 Guest are viewing this topic.

Offline BigmanTopic starter

  • Regular Contributor
  • *
  • Posts: 80
startup option in simulations: LTSpice and ngspice
« on: April 12, 2015, 07:13:28 am »
Hi,

let's have a very basic circuit like this: GND|---- voltage source ----- capacitor ---- resistor -----|GND
When I run a simulation with LTSpice, the voltage at the capacity is NOT building up like an exponential function. The reasoning I found by googeling: as long as the "startup" option is not set, the simulation would assume the full voltage is instantly available at the connected elements.

Since I am a Linux guy, I do my simulations with ngspice which doesn't have such a "startup" option (e.g. there is no ".tran 0.1m 10m [...] startup").
As an interim solution, I add to my voltage source a PWL instruction like this one: "V1 node1 node2 PWL(0 0 1e-9 3.6)"

I am wondering: how would professional people solve this issue? I also just took 1 nanosecond by random. What duration would be really meaningful?
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: startup option in simulations: LTSpice and ngspice
« Reply #1 on: April 12, 2015, 07:29:02 am »
Quote
the simulation would assume the full voltage is instantly available at the connected elements.
Not quite. LTSpice assumes a stady state and therefor a loaded capasitor.
You have to apply a stepfunction do the RC-network, in order to see the stepresponse.
Click on the voltage source, choose ADVANCED and then PULSE.
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: startup option in simulations: LTSpice and ngspice
« Reply #2 on: April 12, 2015, 08:32:14 am »
Since I am a Linux guy, I do my simulations with ngspice which doesn't have such a "startup" option (e.g. there is no ".tran 0.1m 10m [...] startup").
Alternatively, you could just use LTspice with wine. That has worked just fine for many versions now...
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21671
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: startup option in simulations: LTSpice and ngspice
« Reply #3 on: April 12, 2015, 09:47:20 am »
Most SPICEs have options for DC startup conditions; I don't know offhand what NGSpice does.

Worst case, you can indeed use a VPULSE to do the same thing with a small delay.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Anand

  • Contributor
  • Posts: 36
  • Country: 00
Re: startup option in simulations: LTSpice and ngspice
« Reply #4 on: April 12, 2015, 09:54:16 am »
Another option is to use initial conditions for the cap (inital voltage would be Vcap = 0V), but that would be a waste for circuits with a lot of caps.
trashf.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf