Ltspice IV User Guide
Total Page:16
File Type:pdf, Size:1020Kb
Simulation Practices for Electronics and Microelectronics Engineering Graciano Dieck Assad / Matías Vázquez Piñón LTspice IV User Guide Contents Introduction 1. Hardware Requirements and Installation 2. LTspice IV Basics 2.1 Schematic capture 2.2. Schematic capture procedure 2.3. Analysis setup 2.3.1. DC operation point 2.3.2. Transient analysis 2.3.3. DC sweep 2.3.4. DC transfer function 2.3.5. AC analysis 2.3.6. Noise analysis 2.3.7. Parametric analysis 2.3.8. Temperature analysis 2.4. Plot window 2.4.1. Multiple traces 2.4.2. Mathematical expressions 1 D.R. © Instituto Tecnológico y de Estudios Superiores de Monterrey, México 201 2 Simulation Practices for Electronics and Microelectronics Engineering Graciano Dieck Assad / Matías Vázquez Piñón Introduction SPICE (Simulation Program with Integrated Circuit Emphasis) is a general-purpose circuit simulator developed at the Electronics Research Laboratory in the University of California, Berkeley, by the doctoral student Laurence W. Nagel. SPICE’s first version (SPICE1) was presented at the 16th Midwest Symposium on Circuit Theory in Canada in April of 1973. You can read the original SPICE paper by going to the following link: http://docs.google.com/viewer?url=http://www.eecs.berkeley.edu/Pubs/TechRpts/1973/ERL- 382.pdf. The last version that UC Berkeley released was SPICE3f4, which is still available for download at this page but they are no longer providing support for any SPICE release. Since circuit simulation has become an important stage in the analog electronics design, SPICE (originally an open source tool) has been adopted all over the world by both industry and academia as the standard simulation program. Nowadays, there is a wide variety of SPICE-based software available. Some versions have been made commercial (hence supported) and some others have been kept as open-source or freeware. One of the most promising SPICE-based programs in academia available today is LTspice IV by Linear Technology Corporation. LTspice IV is a high-performance, general-purpose SPICE simulator based on SPICE3f4/5 release, which includes a built-in schematic capture interface and a waveform viewer tool. Also, it is possible to write a SPICE deck directly in the program or another text editor and run your simulations using this program. One of the advantages of this last characteristic is that LTspice IV can also be used as a SPICE engine to perform analyses using SPICE decks generated automatically by other schematic capture software, a PCB or a physical design tool. Typically, a SPICE tool loads an input file (the SPICE deck file), which contains the circuit description, the type of analysis to be performed and the output variables to be printed or plotted; all this in a plain text format. This file is passed through the simulation engine and the desired output is generated in the form of an output text file or a graphic plot, depending on the analysis type you just performed. Recently developed tools (like LTspice IV) are capable of automatically generating the SPICE deck file using the schematic diagram (for the circuit description part) and the analysis setup interface (for the type of analysis and output variables to be presented). The software itself decides the best way to display the results. LTspice IV, unlike some other freeware simulation tools, is free to use, although is not an open-source software. Users can not modify the source code or the software structure, but they can 2 D.R. © Instituto Tecnológico y de Estudios Superiores de Monterrey, México 201 2 Simulation Practices for Electronics and Microelectronics Engineering Graciano Dieck Assad / Matías Vázquez Piñón use it for as long as they want and can capture and simulate circuits as big as they want (limited only by the computer resources). There is no circuit size limitation either. Linear Technology Corporation maintains LTspice IV working, so it is possible to install updates when released directly from the built- in update tool or set the program to check for new updates often. 1. Hardware Requirements and Installation LTspice IV is released as a pre-compiled Windows executable file (.exe) and it can be installed in almost any version of Windows running today (from Windows 98 to Windows 7). A free hard disk space of about 10 GB and RAM of 1 GB is recommended to avoid unfinished simulations for large circuits. LTspice IV can also be installed and executed over Linux using Wine (an open-source Windows emulator for Linux) as the installation interface. You can download the self-extracting installation file of LTspice IV from the Linear Technology Corporation site. For Windows, you just have to run the installation file and follow the instructions to install the tool. To open the installed tool, just double-click on the LTspice IV icon on the desktop or in the Programs menu. If you are a Linux user, you need to install Wine first (if you have not done it yet). Depending on your distribution, you can install it directly from your repositories or download a binary file from the Wine download section of the official website and install it. LTspice IV runs exactly the same on Linux as it does on Windows. There is a Mac distribution for Wine also, although it has not been tested by the authors of this manual. 2. LTspice IV Basics The great advantage of LTspice over other Spice-based tools available is that it is free and its capabilities are unrestricted. This means that the size of your circuits and the hierarchy levels are limited only by the resources of your computer. Also, you can simulate a circuit described by its Spice deck without worrying about the number of nodes present in your circuit. In LTspice it is easy to import sub-circuits like an OpAmp macro model and other circuits not included in the default LTspice library. Also, you can use a collection of symbols for your customized models or you can create new symbols. 3 D.R. © Instituto Tecnológico y de Estudios Superiores de Monterrey, México 201 2 Simulation Practices for Electronics and Microelectronics Engineering Graciano Dieck Assad / Matías Vázquez Piñón 2.1. Schematic capture When you run LTspice IV, a screen similar to Figure 1 will appear. From this screen you can create a new schematic file or open an existing one. You are also able to open a previously created netlist or Log file. To create a new schematic, click the “New schematic” button or go to File => New schematic. Figure 1. LTspice IV main screen LTspice has some shortcuts that are very useful for the schematic capture process. Additionally, there are some other shortcuts for the most commonly used electric elements such as resistors, capacitors, inductors, etc. Table 1 below shows the main shortcuts available in LTspice IV. Table 1. Most used shortcuts available in LTspice IV Command Shortcut Button Description Help F1 Open help. Resistor R Place a new resistor on the schematic. Inductor L Place a new inductor on the schematic. Place a new capacitor on the schematic. Capacitor C 4 D.R. © Instituto Tecnológico y de Estudios Superiores de Monterrey, México 201 2 Simulation Practices for Electronics and Microelectronics Engineering Graciano Dieck Assad / Matías Vázquez Piñón Diode D Place a new diode on the schematic. Place a GROUND symbol. This is node “0”, the global circuit Ground G common. Place a new component on the schematic. The command brings up Component F2 a dialog that lets you browse and preview the symbol database. Click the left mouse button to start a wire. Each mouse click will define a new wire segment. Click on an existing wire segment to Wire F3 join the new wire. Right-click once to cancel the current wire. Right-click again to quit this command. Specify the name of a node so the netlister does not generate an Label net F4 arbitrary one for this node. Delete F5 Delete objects by clicking on them or dragging a box around them. Duplicate objects by clicking on them or dragging a box around them. You can copy from one schematic to another if they are both Duplicate F6 opened in the same invocation of LTspice IV. Start the Duplicate command in the window of the first schematic. Then make the second schematic the active window and type Ctrl-V. Click on or drag a box around the objects you wish to move. Then Move F7 you can move those objects to a new location. Click on or drag a box around the objects you wish to drag. Then Drag F8 you can move those objects to a new location; the attached wires move to the new location. Rotate the selected objects. Note that this is grayed out when Rotate Ctrl + R there are no objects selected. Mirror the selected objects. Note that this is grayed out when Mirror Ctrl + E there are no objects selected. Undo F9 Undo the last command. Redo the last Undo command. Redo ↑ + F9 Place text on the schematic. This merely annotates the schematic Text T with information. This text has no electrical impact on the circuit. 5 D.R. © Instituto Tecnológico y de Estudios Superiores de Monterrey, México 201 2 Simulation Practices for Electronics and Microelectronics Engineering Graciano Dieck Assad / Matías Vázquez Piñón Place text on the schematic that will be included in the netlist. This lets you mix schematic capture with a SPICE netlist. It lets you set simulation options, include files that contain models, define new SPICE S models, or use any other valid SPICE commands. You can even use Directive it to run a sub-circuit that you do not have a symbol for by stating an instance of the model (a SPICE command that begins with an ‘X’) on the schematic and including the definition.