This article is part of a series about the dot commands available in SPICE. This seventh installment explains the command (.ic) used to set initial conditions within LTspice.
By completing the final survey, you can download supplementary materials for the Initial Conditions (.ic) command found in LTspice Help. While the Help documentation is netlist-based, if you would like to obtain explanatory materials and sample circuits that perform schematic-based simulations, as in this article, please complete the survey.
Initial conditions (.ic command)
The `.ic` command is used to define initial conditions that can be used within LTspice. It allows you to set initial conditions for node voltages to which capacitors are connected and inductor currents. In particular, in transient analysis, as illustrated in the next chapter's example, if initial conditions are not specified, the analysis starts with capacitors in an open state and inductors in a short state. This can lead to unintended results, so it may be necessary to use the `.ic` command to set these conditions.
Syntax of initial conditions (.ic)
This section explains the netlist notation for initial conditions (.ic). The LTspice syntax is as follows: < > are required fields during configuration. [ ] are optional.
.ic [ V (<n1>) = <voltage> ] [ I (<inductor>) = <current> ]
|
Item |
content |
|
n1 |
Specify the node name |
|
voltage |
Node voltage settings |
|
inductor |
Specify the inductor. |
|
current |
Setting the inductor current |
Example of using the initial conditions command
Here, we will create the following circuit to verify how to use the initial conditions (.ic) command.
We will create a circuit that constructs an RC circuit and checks the charging characteristics of the capacitors connected to nodes A and B when a voltage is applied to the capacitors. The power supply voltage is 20V supplied from V1.
Figure 1: Initial condition (.ic) command verification circuit
Setting initial conditions
Initial conditions are set using the .ic command.
Click on SPICE Directive and enter the following to set the initial conditions using the .ic command.
.ic V(a)=0
Set the simulation to start with the voltage at node A set to 0V (zero).
simulation result
The simulation results are as follows: After execution, the voltage V(a) at node A (green waveform) rises according to the RC time constant because the initial condition is set to 0V (zero). The voltage at node B is treated as open immediately after the simulation is run because no initial conditions are met, so the voltage at node B becomes 20V, which is equal to the set voltage of V1. Therefore, the simulation result shows that the voltage at node B is constant at 20V.
Figure 2: Simulation results
The Help documentation provided by Macnica explains the initial conditions using a circuit diagram as an example. If you would like to obtain the documentation and sample circuits, please cooperate by answering the survey.
Examples of setting initial conditions
1. When the voltage setting of the node to which the capacitor is connected is set.
2. When the initial current value of the inductor is set.
3. When the discharge characteristics of the capacitor are checked.
Download supplementary material for user-defined functions (.func) commands
You can download documentation and sample circuits explaining the initial conditions (.ic) command from the LTspice Help. After completing the survey, we will send you an email with a URL to download the supplementary materials.
If you have any requests, such as what kind of seminars you would like us to hold in the future or what kind of technical materials you would like us to provide, please write your opinions in the free-form section of the survey. We would like to use your opinions to hold seminars and provide technical materials that will be useful to you.
At the end
If you have not used LTspice yet, please download it from the link below!
Please try once.
Click here to download LTspice
If you are just starting LTspice, we recommend that you look at the "Basic Edition" from the list below.
Click here for the list of Let's try using LTspice series
Also, if you would like to see a video on how to write a basic circuit and how to execute it, there is an on-demand seminar that does not require you to enter personal information. Detailed information about the seminar is also provided to those who fill in the questionnaire.
LTspice On-Demand Seminar - Function check with RC circuit -
We also regularly hold LTspice seminars for beginners. We hope you will join us as you will be able to learn the basic operations of LTspice.
Click here for information on LTspice seminar
Click here for recommended articles/materials
List of articles: Let's use LTspice Series
LTspice FAQ: FAQ list
List of technical articles: technical articles
Manufacturer introduction page: Analog Devices, Inc.
Click here for recommended seminars/workshops
Inquiry
If you have any questions regarding this article, please contact us below.
Analog Devices Manufacturer Information Top
Analog Devices Manufacturer Information If you would like to return to the top page, please click below.