Initial Conditions
How do I set a voltage across a capacitor?
There are three ways to set a voltage across a capacitor. Let's assume there is a 100nF capacitor between nodes 6 and 7, and we want to set an initial condition of 5V across the capacitor.
Capacitor CAPACITANCE Attribute
The second way is in the CAPACITANCE attribute of a capacitor. Define the capacitor's CAPACITANCE attribute as:
100nF IC=5
This will place 5V across the capacitor. Note that the capacitor does have polarity, so this condition will place 5V across the capacitor in relation to its plus and minus pins. You can view which pin is which by enabling the Display Pin Names checkbox in the Attribute dialog box. If the polarity is reversed, just rotate the capacitor so that the plus pin is on node 6 and the minus pin is on node 7, or you can just set the condition to -5V. The capacitance value needs to be a constant for the initial condition to work.
.IC Statement
The first way is with a .IC statement. In the text area or the schematic area, type in the statement
.IC V(6,7)=5
State Variables Editor
When you initially enter transient analysis, go to the Transient menu and choose State Variables Editor. Set the node voltage of nodes 6 and 7 so that there is a 5V difference between them. You can then write these conditions to a file and use the Read option in the State Variables list, or close and use the Leave option in the State Variables list. The State Variables list is available in the Transient Analysis Limits dialog box.
In most cases, the operating point should probably be disabled in the Transient Analysis Limits dialog box to get desired results. If you use the State Variables Editor though, the operating point must be disabled.
|