Introduction to LTspice for Circuit Simulation
LTspice is a free, high-performance SPICE simulator widely used in electrical engineering education and industry. In this project, you will use LTspice to verify your circuit designs for the power supply, power amplifier, and passive loudspeaker filters before building them physically.
Why Simulate Before Building?¶
Simulation allows you to:
Verify that your theoretical calculations and design choices produce the expected circuit behavior
Identify potential issues (oscillations, instability, excessive power dissipation) before construction
Explore how circuit performance changes with component variations
Save time and reduce the risk of damaged components during physical assembly
Installation and Guides¶
LTspice can be easily installed on your own PC or laptop from here
Use the LTspice help menu
Many guides from beginner level to advanced.
Keyboard Shortcuts are helpful, even more so on Mac than on Windows.
LTspice on Windows vs. Mac
LTspice is available on both Windows and Mac, but there are some major UI and workflow differences:
Windows:
Native Windows application with standard menu bars and dialog boxes
Keyboard shortcuts follow Windows conventions (e.g., Alt+key for menu access)
Mac:
Mac version uses native macOS interface conventions
Menu bar has much fewer elements, need right mouse button with or without Ctrl, manual editing of SPICE directives (see below)
Keyboard shortcuts are much more important.
The core functionality and circuit simulation capabilities are identical on both platforms. Any differences in this guide related to keyboard shortcuts or menu navigation should be adapted to your operating system’s conventions.
Basic LTspice Workflow¶
The general process for simulating a circuit in LTspice follows these steps:
Draw the circuit schematic using LTspice’s component library and drawing tools
Define the analysis type by adding analysis statements (e.g.
.tranfor transient/time-domain,.acfor frequency response)Configure signal sources appropriate to your analysis (AC voltage, DC bias, pulse signals, etc.)
Run the simulation and examine the results
Interpret the results in the context of your design specifications
Drawing Your Schematic¶
When you open LTspice, you create a new schematic by:
Using the component library to place resistors, capacitors, inductors, operational amplifiers, and other components
Set component values (right mouse button)
Drawing wires to connect components
Adding voltage and current sources as needed
Labeling nodes to track voltages at key points in the circuit
Take time to organize your schematic logically—group related components together, avoid excessive wire crossings, and use clear labeling. A well-organized schematic makes it easier to verify that you’ve built the correct circuit and simpler to debug if results don’t match expectations.
See here: Guidelines for Drawing Schematics
Reuse Node Names to Create Global Nets
In LTspice, you can assign the same net name to multiple disconnected wires or components to create global nets. These nodes are implicitly connected even though they are not physically drawn with wires.
How to use:
Reuse names like
V_in,GND, orV_ccon multiple places in your schematicAll nodes with the same name are treated as a single electrical node
Benefits:
Reduces visual clutter by eliminating long wires across the schematic
Makes schematics easier to read and organize
Simplifies complex multi-page designs
Common practice in professional circuit schematics
Example:
Instead of drawing a wire from a power supply across the entire schematic to every component, label the supply rail as V_cc at the source and label all connections that use it as V_cc. They are automatically connected.
Case-Insensitive Number Prefixes (m, k, ...) and Engineering Number Notation
LTspice can use engineering notation like
e-6and case-insensitive letter multipliers for all numbers, in component values and in numbers for simulation setup. The letter multipliers are not SI-style, since SI-style is case-sensitive (in SI-style,mis different fromM, not in LTspice).forF(femto, 10⁻¹⁵),porP(pico, 10⁻¹²),norN(nano, 10⁻⁹),uorUorµ(micro, 10⁻⁶),morM(milli, 10⁻³),korK(kilo, 10³),megorMEG(mega, 10⁶),gorG(giga, 10⁹).So, a 10 pF capacitor value can be entered as
10p,10P, or10e-12and a 10 milliseconds transient analysis as.tran 0 10mor.tran 0 10e-3or.tran 0 1e-2.Note that LTspice uses implicit units based on component type and analysis context. For example, all capacitor values are in Farads, resistor values in Ohms, and frequencies in Hertz. You specify only the numeric value with its multiplier; the unit is inferred from context. However, units can be added.
More examples:
6k34 = 6.3k4 = 6.34k = 6.34e3(units not required, but allowed)kΩ = kohm = K = k(case-insensitive, with or without unit)
Ground Node Requirement¶
Every SPICE circuit simulation requires at least one ground node (node 0). This serves as the voltage reference point (0 V) for all other voltages in the circuit.
LTspice uses a down-pointing triangle as ground symbol to denote the reference node
All voltages in your circuit are measured relative to this ground
At least one component or wire must connect to ground
If you forget to include a ground connection, LTspice will report an error
Multiple ground symbols can be used, the work like global nets and invisibly/implicitly connect all such grounded nodes
Analysis Types and Signal Sources¶
Different analyses require different types of signal sources. The choice depends on what you want to know about the circuit.
Two key forms are transient analysis and ac analysis.
Transient analysis is to simulate the time-domain behaviour of a circuit. It produces plots with time on the horizontal axis.
AC analysis is to simulate the frequency-domain behahaviour af a circuit. It produces plots with frequency on the horizontal axis, similar to Bode-plots.
The type of analysis to be run by LTspice must be selected by a so-called directive:
.trandirective or.acdirective.These directives must be placed on the schematic in text form.
With transient analysis, you can e.g. check power supply ripple and verify maximum amplifier input voltage before clipping of the output waveform because of a limited supply voltage.
With AC analysis, you can e.g. plot the frequency response (magnitude and phase) of e.g. loudspeaker filters or a power amplifier.
Transient Analysis (.tran)¶
Signal source setup:
Use DC voltage sources for power supplies
Use AC signal sources with pulse or sine wave patterns to inject test signals
For power amplifiers: typically a sine wave at audio frequencies (e.g., 1 kHz) with small amplitude
On windows, use the menu.
On mac, right mouse click > Draft > SPICE Directive
Example transient statement:
.tran 50mThis simulates 50 milliseconds of circuit behavior, starting from time zero. The .tran directive has more settings, on Mac you can find them using the LTspice help menu.
AC Analysis (.ac)¶
Signal source setup:
Use AC voltage sources specified with a magnitude (typically 1 V for convenient normalization)
The AC source injects a small signal across the frequency range you specify
You do not need to specify the actual signal waveform—LTspice automatically sweeps the frequency
Example AC source declaration: In component properties, set the source to have both DC and AC components:
DC value: 0 V
AC magnitude: 1 V (or other reference value)
On windows, use the menu.
On mac, right mouse click > Draft > SPICE Directive
Example AC analysis statement:
.ac dec 100 10 100kThis simulates the frequency response from 10 Hz to 100 kHz with 100 points per decade (logarithmic sweep).
In general:
.ac <oct, dec, lin> <Nsteps> <StartFreq> <EndFreq>The frequency is swept between frequencies StartFreq and EndFreq.
The number of steps is defined as Nsteps per octave (oct), decade (dec) or linearly spaced (lin) between StartFreq and EndFreq
Setting Up Sources for Different Circuits¶
Power Supply Circuit¶
Input voltage source: DC source set to your mains voltage (e.g., 24 V for a rectified bridge circuit)
Load simulation: Use a resistor or current source to represent the amplifier and filter loads
Analysis: Use transient (
.tran) to observe voltage ripple and regulation
Power Amplifier Circuit¶
Input signal source: AC source (sine wave) at audio frequency
Power supply: DC voltage sources for ±21 V (or other rails), typically ideal sources for first-pass verification
Analysis: Use transient (
.tran) to check output waveform and measure gain; use AC (.ac) to verify frequency response and bandwidth
Passive Loudspeaker Filters¶
Input signal source: AC source from 10 Hz to 40 kHz (or other) to sweep the audio band
Load: Resistor representing speaker impedance (typically 4 Ω to 8 Ω) or the speaker model
Analysis: Use AC (
.ac) to verify filter cutoff frequencies, passband gain, and stopband attenuation
Running Your First Simulation¶
Complete your schematic and add the appropriate SPICE directive (type of analysis to run)
Start simulation (▶ on Windows, running figure on Mac)
LTspice opens a waveform viewer, use the probe in the schematics window to select signals to show or use the
add tracebutton Theadd tracebutton also allows to plot mathematical functions of wave values, including voltage differences.Examine the plots—do they match your expectations?
If not, check:
Component values and connections
Source definitions and amplitude
Analysis parameters (frequency range, time span, etc.)
Multi-Step Simulation (Advanced)¶
Multi-step simulations allow you to automatically run multiple simulations while stepping component values or source parameters through a range of values.
Purpose:
Optimize designs by stepping component values (e.g., load resistance, filter capacitance)
Analyze circuit behavior across a range of source parameters (e.g., supply voltage, signal amplitude)
Preparation: Use symbolic component and source values
Instead of fixed numeric values, assign symbolic names, e.g:
Component value:
{R_load}instead of10k. Note that symbolic parameter names are surrounded by{}Source parameter:
{V_supply}instead of15
SPICE directive for parameter stepping:
Use the .step command in combination with the analysis statement (can also be .ac instead of .tran):
.tran 0 100m
.step param R_load 5k 10k 1kThis runs a transient analysis for each value of R_load from 5 kΩ to 10 kΩ in 1 kΩ steps (values: 5k, 6k, ..., 10k)
Viewing results:
Use the waveform viewer’s Stepping feature to navigate between results. Right-click on traces to select which parameter values to display.
Tips for Successful Simulations¶
Start simple: Simulate subcircuits individually before combining them
Use realistic component values: Account for component tolerances and non-ideal behavior (ESR in capacitors, op-amp input impedance, etc.)
Label your nodes: Use net names like
V_in,V_out,GNDto make results easier to interpretDocument your analysis: Record what each simulation verified and what assumptions you made
Compare with theory: After each simulation, verify that results match your analytical calculations
Creating Schematic and Waveform Figures¶
Schematics¶
LTSpice circuits can be neatly included in your reports by printing them to pdf. The result is the circuit on a white background. Then take a screenshot, and save as png (preferred) or jpg. Enlarging the image before taking the screenshot (on a reasonable screen) will usually produce an image with a good enough resolution.
In the schematic window, go to
File>Print PreviewAlternatively, print to pdf directly
Enlarge and zoom
Take and save screenshot, can use standard windows
Snipping Toolapp
In the schematic window, click
cmd-pand selectPDF>Open in previewEnlarge and zoom
Waveforms¶
Waveforms can be exported to text files, for further processing using e.g. Python (with matplotlib) or most any other graphing tool.
With the plot window active, go to
File>Export data as textSelect the waveforms for export
Select where on your computer you want to store the exported data as a text file
Click OK
Click on the
Hammer(control panel) in the plot window >waveforms>Data export toolSelect the waveforms for export
Select where on your computer you want to store the exported data as a text file
Click OK
Learning More
For deeper exploration of circuit simulation and LTspice-specific techniques:
LTspice built-in help menu. Organized by topic, indexed, and searchable
LTspice XVII Tutorial Series — Video tutorials and documentation from Analog Devices
Your course textbook — Most circuit analysis textbooks include sections on simulation and SPICE basics