Author Topic: How do we simulate a real voltage (non-ideal) source with LTSpice?  (Read 6037 times)

0 Members and 1 Guest are viewing this topic.

Offline AQUAMANTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: gb
For example if we buy a +5 to 12V DCDC converter with a regulated output, sure it is +12V source most of the time

But when you ask to draw significant amounts of current from the source, even regulated voltage sources drop their value momentarily (perhaps for only several us), but this drop can be quite large

After all, this is why we add storage caps on our voltage sources right? To help the DCDC maintain the voltage under strong transient load

But how do I simulate this drop under load in LTSpice? I have a simulation where in order to simulate correctly what happens in real life, I need to be able to view the drop of voltage on the source under load and how it recovers depending on how large the caps are to help it
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20551
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: How do we simulate a real voltage (non-ideal) source with LTSpice?
« Reply #1 on: November 18, 2014, 04:15:10 pm »
You will never have an accurate simulation of real life. But you can have a "good enough" simulation provided that you can define what constitutes "good enough" or "what I don't care about".

Question: why are you doing the simulation? If to see how your circuit will respond to voltage transients, then simply model transients using ideal voltage sources. If to see how the power supply will vary when your circuit is operating, then you will need a model of the specific PSU (good luck getting that) plus all the other non-ideal components such as wires (which are really inductors).

Depending on what your circuit is, you might be able to simply insert a resistor in series with the ideal voltage. But you might also need to insert inductor(s) in the PSU lines. Or more complex inter-dependencies yet.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline DanielS

  • Frequent Contributor
  • **
  • Posts: 798
Re: How do we simulate a real voltage (non-ideal) source with LTSpice?
« Reply #2 on: November 18, 2014, 04:23:27 pm »
The easiest way to simulate a "non-ideal" source is simply to add the resistance and inductance in: the resistance provides droop proportional to current and the inductance provides some degree of sagging/surging from transients.

Depending on exactly what you really want to achieve here, this may be good enough to simulate the regulation lag of a DC-DC converter for your purposes.

If it is not, you can add a whole DC-DC converter to your simulations and put up with the increased simulation time.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20551
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: How do we simulate a real voltage (non-ideal) source with LTSpice?
« Reply #3 on: November 18, 2014, 11:53:17 pm »
Another obvious point. IRL a significant part of your design+implementation will be to ensure that your circuit's performance is unaffected by whatever components happen to be between it and the power station.
« Last Edit: November 19, 2014, 01:04:10 am by tggzzz »
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline liquibyte

  • Frequent Contributor
  • **
  • Posts: 475
  • Country: us
Re: How do we simulate a real voltage (non-ideal) source with LTSpice?
« Reply #4 on: November 19, 2014, 12:31:07 am »
I don't know if this is the kind of thing you're after but you can simulate noise with a behavioral voltage source with V=(white(2e6*time)/10) but beware, it takes forever to solve.

Quick edit:  I've been modelling a transient voltage spike at startup with a pulse voltage as well PULSE(0 18.3 0 5ms 5ms 100u 0 3).
« Last Edit: November 19, 2014, 12:33:10 am by liquibyte »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf