.ic : LTspice -- Set Initial Conditions

This article details the use of the dot command ".ic".

The simulation time can be shortened by using ".ic" to set the initial conditions of voltage and current.

TOC

".ic" syntax

The ".ic" syntax is as follows. Normally, the initial condition at the start of a simulation is 0V, but by using ".ic", the initial conditions of voltage and current can be set to any value.

.ic [Voltage(NodeName) or Current(PartName)]=[Value]

The ".ic" syntax is not very difficult. For example, to set the initial state of V(n001) to 5V at the start of the simulation, the syntax is as follows:

.ic V(n001)=5

Examples of ".ic" simulation

As an example of ".ic" simulation, we would like to shorten the simulation time to check the ripple voltage after the output voltage reaches steady state in the demonstration circuit of the LT3580, a boost/inverting DC-DC converter, using ".ic".

1

Click on the link below to go to the Analog Devices demo circuits download page.

Analog Devices
LT3580 demo circuit download

Enter "LT3580" in the "Search" field. A link to the LT3580 demo circuit will appear in the search results.

2
LTspice XVII LT3580 simulation run

To make the waveform of the simulation results easier to distinguish, connect the "SS" label to the SS pin (soft-start pin) of the LT3580 in advance.

After connecting the label, first run the simulation normally by clicking "Run" without ".ic".

3
LTspice XVII LT3580 simulation result

Click "out" and "ss" on the LT3580 schematic with a voltage probe to display the "V(out)" and "V(ss)" voltage waveforms in the waveform viewer.

You can see that the LT3580 charges the SS pin voltage V(ss) to about 2.2V and the output voltage V(out) rises to 12V.

Furthermore, to check the ripple voltage after it becomes constant at 12V, we expand the range of V(out) from 0.5 to 0.6 msec.

4
LTspice XVII LT3580 ripple voltage

Expanding the 0.5 to 0.6 msec range of V(out), the ripple voltage of V(out) was confirmed.

5
LTspice XVII LT3580 time to rise

This simulation took about 17 seconds.

The reason the simulation takes so long is that it takes time to charge the voltage on the SS pin, which delays the rise of the output voltage.

Therefore, use ".ic" to set the initial condition of the SS pin voltage to 2V to shorten the time until the output voltage rises.

6
LTspice XVII LT3580 .ic simulation run

Add the ".ic" syntax, change the transient analysis time from 1 msec to 0.9 msec, and click "Run" to run the simulation.

LTspice XVII LT3580 .ic syntax

The ".ic" syntax is described and placed as follows:

.ic V(ss)=2

The initial condition of the voltage on the SS pin of the LT3580 will now be 2V.

LTspice XVII LT3580 transient analysis setting change

By setting the initial condition of the voltage on the SS pin of the LT3580 to 2 V, the rise time of the output voltage is shortened, so the transient analysis time is changed from 1 msec to 0.9 msec.

Also, uncheck "Start external DC supply voltage at 0V" because if it is left checked, the initial condition of the SS pin voltage will return to 0V at the start of the simulation even if the initial condition is set to 2V.

7
LTspice XVII LT3580 simulation short

The initial condition of V(ss) is now 2V using ".ic" and the rise time until the output voltage V(out) is constant at 12V has been shortened by 100usec.

Therefore, even a transient analysis time of 0.9 msec is no problem at all, resulting in a shorter simulation time.

8
LTspice XVII LT3580 ripple voltage

Of course, if you expand the 0.4 to 0.5 msec range of V(out), you can see the ripple voltage of V(out).

9
LTspice XVII LT3580 SPICE error log simulation time

Simulation times can be viewed by clicking on "View-SPICE Error Log" and opening the log file.

CountV(ss) Initial Condition: 0V
Simulation Time
V(ss) Initial Condition: 2V
Simulation Time
1st16.908sec16.531sec
2nd16.654sec16.383sec
3rd16.535sec16.386sec
4th16.510sec16.404sec
5th16.626sec16.372sec
Average16.6466sec16.4152sec

Comparing the simulation time when the initial condition of V(ss) is 0V and after changing the initial condition of V(ss) to 2V using ".ic", you see that the simulation time was shortened by 0.2314 seconds on average.

In this simulation example, the simulation time could not be shortened that much, but if the circuit is large, the effect of shortening the simulation time will be significant.

Let's share this post !
TOC