
Learn to automate LTspice circuit simulations with Python scripting, reducing manual steps, enabling overnight runs, and data visualization for efficient circuit analysis.
Please follow the instruction to install the LTSpice in the windows PC.
Please follow the instruction to install the Anaconda (including Spyder) in the windows PC.
Explore the first-order rc low-pass filter, a two-component circuit that passes low frequencies and attenuates high ones, demonstrated with a breadboard, resistor, capacitor, and oscilloscope.
Learn to perform AC analysis in LTspice, set up a staircase sweep from 100 kHz, and extract the transfer function Vout/Vin with polar and Cartesian exports.
Automate LTspice TRAN simulations by running a .asc schematic from Python using the command line, with dash for interactive runs and dash b for batch mode, generating raw data.
Learn to run a TRAN LTspice circuit (.cir) using Python scripting in batch mode, from setting the executable path to running the file and opening raw data.
Learn to automate LTspice circuit simulations by generating a TRAN .txt from a schematic and executing it with Python scripting in run or bash mode to produce raw data.
Edit the LTspice TRAN.txt to adjust R1 and C1 for the RC low-pass filter, then automate changes with Python scripting to run the simulation in batch mode and compare traces.
Discover how to read raw LTspice data into the Python IDE, automate batch data handling with open-source tools, and explore results in Spyder's variable explorer.
Explore the raw data format of LTspice trend outputs, including header and binary data, and analyze 64-bit double precision values for time, v in, and v out.
Describe the raw data format for ac analysis, including header and binary data, eight-byte real and imaginary parts, and how frequency, input voltage, and output voltage form complex traces.
Learn how to extract and interpret raw data from a DC sweep in LTspice using Python, including header structure, variables, and plotting current-voltage transfer curves.
Learn to read the raw data format for the dc transfer function in LTspice using delta tf syntax to obtain vout over vin and assess input and output impedances.
Learn the fft data format and analyze time-domain signals for frequency components. Observe how raw data and headers store voltages, currents, and magnitudes at 1 kHz and 100 kHz.
Automate ltspice circuit simulation using python scripting by following a flowchart that creates the schematic file, runs simulations in the background, and generates raw data for visualization.
Automate LTspice circuit data visualization with Python scripting, using Matplotlib and NumPy to plot raw Pacer data and save figures for efficient analysis.
Learn to use pyplot to create, name, save, and close figures for LTspice simulations, including formats like png, pdf, svg and controlling dpi.
Demonstrate reading and plotting raw LTspice data in Python, importing traces, and visualizing time-domain voltage with a low-pass filtered plot using pyplot, and saving the figure.
Read and import raw AC data from LTspice with Python scripting, compute magnitude and phase from complex traces, and plot input and output voltages across the frequency range.
Learn to script LTspice measurements using .meas, extract average, max, min, and derivative values from log files across DC, transient, and noise simulations, and verify results.
Automate LTspice circuit simulation with Python scripting, teaching how to modify text files, run simulations, read raw data into pacer, and plot results with matplotlib.pyplot for trending readouts.
Examine a second-order RC low-pass filter built from two cascaded RC stages, analyzing its two real poles, attenuation, and phase lag via transfer function and AC analysis.
Update history
12/25/2024: Course material "Material v1.18 (2024-12-25).zip" is uploaded: "ltspy3" module is updated to fix a bug in opening files (Credits to Torsten Lehmann)
02/08/2021: Course material "Material v1.17 (2021-02-08).zip" is uploaded: "ltspy3meas" module is updated to fix a bug in reading the stepped measurement
07/19/2020: Course material "Material v1.16 (2020-07-19).zip" is uploaded: "ltspy3meas" module is updated to fix a bug in reading the measurement name list
06/28/2020: Course material "Material v1.15 (2020-06-28).zip" is uploaded: New Section "Sec5-6 Spyder graphics backend setting".
06/15/2020: Course material "Material v1.14 (2020-06-15).zip" is uploaded: "ltspy3meas" has been updated to import .step measurement.
06/10/2020: Course material "Material v1.13 (2020-06-10).zip" is uploaded. The output solution waveforms of the 2nd order LPF project are corrected.
05/05/2020: Note that 1080p video is NOW available. Just go to video "settings" and enable the "Auto option". Then 1080p streaming will become possible for you!
05/06/2020: the pdf of "Sec5-2 Intro to Matplotlib" is updated on page 3 to avoid some potential bugs.
05/05/2020: The Matlab file name for Sec3-3 Bode Plot is changed to "BodePlot_Matlab.m"
04/19/2020: A bug is fixed in "ltspy3meas" for Section 6 Lecture 32: Read Measurement data in log file
A detailed step-by-step tutorial about how to automate LTspice circuit simulation using Python scripting
LTspice is the #1 SPICE simulation tools that is free, robust and fast. But it requires a lot of human efforts to run manually.
Python can automate LTspice for you!
Python is so easy to learn that is prefect for electrical engineers
Python can unleash the full potential of LTspice
Python can save you time and money from tedious and time-consuming LTspice simulation
Read raw data into Python and plot it as figures
Python opens the door for you to the world of data science