LTspice - the free and complete SPICE simulator
LTspice is a new SPICE that was developed to simulate analog circuits fast enough to make simulation of complex SMPS systems interactive. The program is freely downloadable from the Linear Technology website and is a high-performance, general-purpose SPICE simulator.
Incorporated into the new SPICE are circuit elements to model practical board level components. Capacitors and inductors can be modeled with series resistance and other parasitic aspects of their behavior without using sub-circuits or internal nodes. Also, a simulation circuit element was developed for power MOSFET's that accurately exhibits their usual gate charge behavior without using sub-circuits or internal nodes. Reducing the number of nodes the simulator needs to solve significantly reduces the computation required for a given simulation without compromising the accuracy or detail of the switching waveforms. Another benefit of these new simulation devices is that convergence problems are easier to avoid since they, like the board level component the model, have finite impedance at all frequencies.
Modern switch mode power supplies include controller logic with multiple modes of operation. For example, devices may change from pulse switch modulation to burst-mode or to cycle skipping depending on the circuit's operation. An original new mixed-mode compiler and simulator were written into LTspice that allows these products to be realistically modeled in a computationally fast manner.
But despite LTspice’s close association with SMPS design, it not a SMPS-specific SPICE but simply a SPICE program fast enough to simulate a SMPS interactively.
Getting Started
Included with the SPICE is a full-featured schematic entry program for entering new circuits. As a few introductory steps, we will have an overview of this user interface and we will perform a short transient simulation of one of the simplest electronic circuits in existence: the voltage divider.
In order to download the installer please visits the http://www.linear.com/designtools/software/ltspice.jsp website. After download, install it in the regular manner in which any windows application is installed and then run it.
First of all, you need to create a new schematic, by choosing from the menu available at the top of the screen: File->New Schematic:
Once you do that a new schematic sheet is available in the main workspace, where you will be able to draw the circuit you need to simulate. As I wrote before, we will start with a simple circuit, a resistive voltage divider. So the entire circuit will be made up by two resistors and one voltage source. In order to place the resistors in the schematic, choose the appropriate symbol from the toolbar available on top:
This will link a floating resistor symbol to the pointer of your mouse. Move the mouse on the main worksheet and then place two similar symbols like in the figure below:
Once you have successfully placed the resistors, hit the ESC key to return your mouse pointer to its original state as an arrow.
Adding the voltage source will be a little more elaborated, as there is no dedicated toolbar button for voltage sources only. Instead, it is treated as a generic component, and you will have to pick it from a library of components. To access the library, click the Component button on the toolbar at the top of the screen:
Figure 4 – Access the component libraries
The Select component symbol window is opened and you need to scroll maximum to the right there, pick the voltage component and then click OK:
Just like you did with the resistors, place the symbol for the voltage source on the worksheet. You circuit should now look like this:
Once you have successfully placed the voltage source, hit the ESC key to return your mouse pointer to its original state as an arrow.
Of, course, now you have to connect the components in your schematic with wires. You do this by choosing the button looking like a pencil from the top toolbar:
This will change your pointer to a cross, and now you can connect your components by drawing the wires between their terminals. Once you have successfully connected all the components, you should be in the possession of a circuit similar to the one below:
Once you have successfully connected the components, hit the ESC key to return your mouse pointer to its original state as an arrow.
Of course, like any other SPICE program, LTspice requires a node to be defined as the ground, this being the reference against which all voltage values in the circuit will be computed against. You can easily define the ground in LTspice by connecting a ground symbol the node you want to use as reference. Chose the appropriate symbol from the top toolbar:
and then place the symbol on the schematic. Once this is done, wire it to the bottom node of your circuit like indicated here:
It is now the time to adjust the value of the components in your circuit. To do this, you need to successively right-click on the values of each component, which are initially set to “V” for the voltage source and to “R” for the resistors:
Each time you right click on these values, the Enter new value dialog box opens up, and you can enter there the new values you want for your circuit elements:
For this example, you should choose 10V for the voltage source, and 1k for each of the two resistors. At the very end, the circuit prepared for the simulation should be similar to:
All you have to do now is to set up the simulation. For this, from the top menu you need to choose Simulate->Edit Simulation Cmd:
and this will pop up the Edit Simulation Command dialog box:
We want to perform a time analysis, which is generally referred to as “transient” analysis in SPICE programs. Only minimum input from us is required in this dialog box: write “10m” in the Stop Time text box, which means we want to perform a 10 milliseconds simulation. Click OK, and this will attach a shadow text to your mouse pointer. Place this text somewhere on the worksheet:
All we need to do now in order to start the simulation is to click the appropriate button in the top toolbar:
For such a simple circuit, the simulation will be instantaneous, and immediately after you press the button a black waveform plot widow will also open in the worksheet. This is where you will be able to view the waveforms in your circuit. Use the mouse to click the wire connecting the two resistors in you circuit. You will notice that when you hover the mouse over that particular point in the circuit, the pointer changes to a probe. When you actually click it, the waveform of the voltage signal at that point is plotted in the black window of the waveform viewer. In this particular case, the signal available between the two resistors should be a 5V continuous signal:
We will want now to change the display limits in the waveform viewer so that we also see the 0V line. To do this, you need to right-click somewhere inside the plot window and from the pop-up menu you need to choose Manual limits.
This will open the Plot limits dialog box, where you need to enter 0V and 12V in the Bottom and Top textboxes, respectively
.
Once you did that, click OK, and then also click on the wire between the voltage source and the top resistor, so that we also add to the plot the signal at that point. Now, your plot should look like this:
This was a very simple example of how to use the interface of LTspice and how to perform a transient simulation. Further examples will show how to perform AC analysis, how to use time varying sources, how to use predefined models and how to add simulation models to the libraries of the program.
Additional resources:
LTspice download:
http://www.linear.com/designtools/software/ltspice.jsp
CMOSedu additional libraries and examples:
http://cmosedu.com/cmos1/LTspice/LTspice.htm
University of Evansville LTSpice IV Library and Tutorials:
http://csserver.evansville.edu/~richardson/courses/Tutorials/LTspiceIV/
- brumbarchris's blog
- 1933 reads





Post new comment