Back to Blog
Simulation

Spice Simulation Online: What .tran and .ac Results Actually Tell You

11 min read
NevilLabs Spice simulation showing an RC low-pass circuit with AC Analysis selected and a Bode plot of gain in decibels against a logarithmic frequency axis

Most people meet SPICE the same way: they draw a circuit, press Run, get a beautiful smooth curve, and assume the curve is the truth. Then they build the board and it rings, or oscillates, or clips at a voltage the plot never mentioned. The simulator wasn't wrong (it almost never is, in the narrow sense). It answered exactly the question it was asked, and the question wasn't the one the engineer had in mind.

The Spice simulation in NevilLabs belongs to the same family of engines engineers use daily. It gives you Operating Point, DC Sweep, AC and Transient analysis in one workspace with no install, and each analysis type answers a different question about a circuit. This post is about the two you will reach for most when checking a design's behaviour: the transient analysis (.tran) and the small-signal AC analysis (.ac). I'll go through what each one actually computes, how to read what comes out, and the specific ways each can quietly mislead you, using the Spice simulation inside NevilLabs as the worked example.

What You Will Learn

  • Which question .op, .dc, .ac and .tran each answer, so you pick the analysis before you pick the plot
  • What the Step value in a transient analysis controls, and why a coarse step can hide ringing
  • Why an AC analysis linearises the circuit first, and why 100 V of AC excitation will not clip anything
  • How to read a Bode plot: gain in decibels, phase in degrees, and a logarithmic frequency axis
  • What the −3 dB corner, gain crossover and phase margin markers tell you about a filter or a feedback loop
  • Why the device models in a netlist matter more than the solver, and how to swap in a real one

Four Analyses, Four Different Questions

Before touching a single setting, it helps to say the question out loud. Each analysis in Spice is built to answer one of these:

  • Operating point (.op): with every source at its DC value, capacitors open and inductors shorted, where does every node settle? This is the bias point everything else is built on.
  • DC sweep (.dc): if I step one source through a range of values, how does an output follow it? This is how you get a transfer curve or an I–V curve.
  • AC analysis (.ac): for a tiny sinusoidal wiggle around the operating point, how much does the circuit amplify or attenuate it, and how much does it shift its phase, at each frequency?
  • Transient analysis (.tran): starting from t = 0, what does every voltage and current actually do over time, including all the nonlinear behaviour?

The NevilLabs analysis menu lists all four (Operating Point, DC Sweep, AC Analysis and Transient). The rest of this post stays with .tran and .ac, because those are the two whose plots people most often misread.

.tran: What Actually Happens Over Time

A transient analysis is the closest thing SPICE has to an oscilloscope (a very patient one). It writes the circuit's equations, solves for the DC starting point, then marches forward in time, solving the full nonlinear equations again at each new time point. Diodes conduct and stop conducting, transistors saturate, capacitors charge: everything the circuit really does is in there, which is exactly why a transient run is the one to trust for switching behaviour, start-up and clipping.

In the netlist it is one line, .tran TSTEP TSTOP, and in NevilLabs those are the Step and Stop boxes (both in seconds) that appear when you choose Transient. TSTOP is easy: how long do you want to watch? TSTEP is the one people get wrong.

The Step You Type Is Not the Step the Solver Takes

Spice does not walk through time in fixed increments. It adapts its own time step, shrinking it when voltages change quickly and stretching it when nothing much is happening, and it places extra points at the corners of pulse and piecewise-linear sources so it doesn't jump over them. TSTEP is better read as the output resolution you are asking for. If you need a hard ceiling on the internal step, that is a separate, optional value (TMAX, the fourth number on the .tran line), which you can add by editing the netlist in Manual / Example mode.

Here's the trap. If your fastest event is a 50 ns edge and you ask for a 10 µs step over a 10 ms run, the solver will still honour the source edges, but anything the circuit does in response (ringing on an LC node, a fast overshoot) can fall between your output points. The plot comes out smooth because you asked it to be coarse, not because the circuit is well behaved. A good habit is a quick sanity run with TSTEP at least ten times finer than the fastest thing you expect to see, before you trust the clean version.

Transient plot in the NevilLabs Spice simulation showing a square input pulse and the rounded charging and discharging curve of the capacitor voltage in an RC circuit, overlaid on a linear time axis
A transient run of an RC circuit driven by a pulse: the input (square) and the capacitor voltage (exponential), overlaid on one time axis.

Once the run finishes, every probed node and branch current becomes a trace on the plot. Hover anywhere to read the time and each trace's value, switch between overlaid traces and stacked charts when the scales differ too much to share an axis, and export the data as CSV when you want to post-process it in your own tools.

.ac: Small-Signal Frequency Response

The AC analysis is a completely different animal, and treating it like a fast transient is the most common mistake I see. Spice first finds the DC operating point, then replaces every nonlinear device with its linear equivalent at that point (a transistor becomes a small set of resistances, capacitances and controlled sources), and only then sweeps a sinusoid across frequency. What you get back is a ratio at each frequency: how much bigger or smaller the output is than the input, and how far its phase has shifted.

In the netlist it reads like .ac dec 10 1 1Meg: a logarithmic sweep, ten points per decade, from 1 Hz to 1 MHz. NevilLabs generates a decade sweep and gives you the start and stop frequencies as inputs (f_start and f_stop, in hertz) when you choose AC Analysis.

Why 100 V of AC Will Not Clip Anything

Because the circuit has been linearised, the AC magnitude you give the source is just a scale factor. Put AC 100 on the input of an amplifier with a 5 V supply and the AC result will happily show 500 V at the output, with no clipping at all, because there is nothing nonlinear left in the model to clip. This is not a bug, it is the definition of small-signal analysis. The convention that keeps you honest is to set the AC magnitude to 1, so that the output in decibels reads directly as gain, and to use a transient run whenever the question is how big a signal can get before it distorts.

Reading the Bode Plot

An AC result is usually shown as a Bode plot: gain in decibels and phase in degrees, both against a logarithmic frequency axis. (Spice reports phase in radians unless told otherwise; NevilLabs sets it to degrees, so the phase plot reads the way a datasheet does.) The logarithmic axis matters more than it looks, because it turns a first-order roll-off into a straight line falling at 20 dB per decade, which is how you spot the order of a filter at a glance.

Bode plot of an RC low-pass filter in the NevilLabs Spice simulation, gain in decibels falling past a dashed marker at the −3 dB corner frequency, with a markers panel listing bandwidth and roll-off rate
The same RC circuit in an AC sweep. The dashed fc marker sits at the −3 dB corner, close to 1/(2πRC).

NevilLabs draws the reference points onto the plot so you don't have to eyeball them: fc at the −3 dB corner, fgc where gain crosses 0 dB, fpc where phase crosses −180°, and fp at a resonant peak. The markers panel adds the derived numbers (bandwidth, gain margin, phase margin and roll-off rate). For a filter, fc and the roll-off rate are the headline. For a feedback loop, phase margin is the number that tells you whether it will settle cleanly or ring, which is why power-supply designers stare at it for a living. If you want to go a level deeper on frequency-domain plots, the Smith chart in our post on RF yield analysis is the same information drawn as impedance.

Where the Work Runs, and Why That Matters

Each time you press Run in NevilLabs, the netlist goes to our servers, where the Spice simulation runs it and the results come back to your browser for plotting. There is nothing to install, and every person on a team gets the same simulation engine, which removes a whole category of "it works on my machine" arguments. Draw, press Run, read the plot, change a value and run again, all in one workspace.

You also get to see exactly what the simulator saw. In Auto mode the netlist is generated from the circuit you drew and shown read-only. Switch the source to Manual / Example and the netlist becomes editable, so you can change a directive, add sweep points or paste in a model by hand. The results pane carries the full simulation log alongside the data, which is where warnings appear, in the same words an engineer would read in a terminal. For how this electrical engine sits alongside digital logic and mechanical analysis, see our post on multi-domain simulation.

Device Models and Convergence in a SPICE Result

A SPICE result is only as good as the device models in the netlist, and this is the part tutorials skip. A circuit you draw in NevilLabs starts from textbook models: a diode, a transistor with a current gain of 100, and an op-amp that is an ideal gain block (a gain of 100,000, no supply rails and no bandwidth limit), which is a clean way to learn how feedback works. To predict a real amplifier, bring in the real part's model: the ideal op-amp's gain never rolls off, so its AC sweep looks better than the part you will actually solder. For a specific component, paste the manufacturer's SPICE model into the netlist in Manual mode (most PSpice-format models load, sometimes with a compatibility setting).

The second reality is convergence. Spice solves nonlinear circuits iteratively with Newton–Raphson, a proven method that every SPICE relies on, and it settles fastest when the circuit is physically well posed. Watch for a node with no DC path to ground, an ideal switch, a source with a perfectly vertical edge. The classic symptom in a transient run is the message that the timestep is too small. The fix is almost never to loosen the tolerances until the error goes away. It is to find the unphysical thing in the circuit (give that node a large resistor to ground, give that edge a rise time) and remove it.

And the last one: a simulation at nominal values describes one circuit. The board you build is one sample from a spread of component tolerances, temperature and layout parasitics that the schematic doesn't contain at all. A smooth plot is evidence, not proof.

Where Spice Simulation Is Used in the Real World

  • Integrated circuit design: SPICE-family simulators combine DC, small-signal AC and nonlinear transient analysis in one program, which is why IC designers rely on them (Nagel, ERL-M520). Cadence PSpice is a commercial SPICE simulator, and its model format is one that many component manufacturers publish their device models in.
  • Power electronics: switching regulator designers use AC analysis of the control loop to set crossover frequency and phase margin, and transient runs to check start-up and load-step response (Erickson and Maksimović, Fundamentals of Power Electronics). LTspice from Analog Devices is a free desktop SPICE simulator widely used for switching-regulator design.
  • Audio and instrumentation: filter and amplifier frequency response is checked with an AC sweep, while clipping, slew-rate limits and overload recovery need transient runs (Horowitz and Hill, The Art of Electronics).
  • Analogue front-ends and sensor interfaces: anti-aliasing filters, transimpedance stages and biasing networks are sized from small-signal frequency response before any prototype is built (Sedra and Smith, Microelectronic Circuits). KiCad has a built-in Spice simulator in its Schematic Editor, and Xyce, developed at Sandia National Laboratories, is an open-source SPICE-compatible simulator designed to run very large circuits in parallel.
  • NevilLabs has a Spice simulation in the browser workspace: draw the circuit or edit the netlist, choose Operating Point, DC Sweep, AC Analysis or Transient, and read the result as a multi-trace plot with Bode markers, the raw simulation log and CSV export, with no installation.
The simulator always answers the question you asked. The skill is asking the one you meant.

Ask the Question First, Then Press Run

If you take one habit away from this, make it this: before you run anything, say which question you are asking. How does it behave over time, including the nonlinear parts? That's .tran, with a step fine enough to catch the fastest thing that matters. How does a small signal pass through it across frequency? That's .ac, with an AC magnitude of 1 and models that resemble the parts you will actually use. Then read the plot with that question in mind, rather than the plot alone.

NevilLabs is opening access in small batches, and the Spice simulation is one of the first things I'd point an engineer at. Join the waitlist, bring a circuit that has surprised you before, and let's see which question it was really asking. Keep asking your circuits questions through simulation, and enjoy learning the language they answer in.

References

  1. Nagel, L. W. (1975). SPICE2: A Computer Program to Simulate Semiconductor Circuits. Memorandum No. ERL-M520, Electronics Research Laboratory, University of California, Berkeley. — https://www2.eecs.berkeley.edu/Pubs/TechRpts/1975/9602.html (opens in a new tab)
  2. Vladimirescu, A. (1994). The SPICE Book. John Wiley & Sons.
  3. Sedra, A. S., & Smith, K. C. (2020). Microelectronic Circuits (8th ed.). Oxford University Press.
  4. Horowitz, P., & Hill, W. (2015). The Art of Electronics (3rd ed.). Cambridge University Press.
  5. Erickson, R. W., & Maksimović, D. (2020). Fundamentals of Power Electronics (3rd ed.). Springer.
  6. KiCad. SPICE Simulation. — https://www.kicad.org/discover/spice/ (opens in a new tab)
  7. Analog Devices. LTspice Simulator. — https://www.analog.com/en/resources/design-tools-and-calculators/ltspice-simulator.html (opens in a new tab)
  8. Sandia National Laboratories. Xyce Parallel Electronic Simulator. — https://xyce.sandia.gov/ (opens in a new tab)
  9. Cadence Design Systems. PSpice. — https://www.pspice.com/ (opens in a new tab)

Start your first build with NevilLabs

Design a circuit, run the simulation, and see the physics behind it — in your browser. We're inviting early users in small batches.

Join the Waitlist

More articles

Education
Explore Your Potential with Experiential Learning: A Comprehensive Guide to STEM Education
Inspiration
Sir M. Visvesvaraya: Explorer, Creator, Scholar
Inspiration
C.V. Raman: The Light That Changed Physics
Wireless
Guglielmo Marconi: The Engineer Who Shrank the Planet
Technology
Inside a Quadcopter: The Engineering That Keeps Drones in the Air
Physics
Newton's Laws of Motion: A Visual Guide to Forces, Inertia, and Action-Reaction
Education
Why Virtual Labs Are Rewriting the Economics of STEM Education
Simulation
Multi-Domain Simulation: Why Splitting Analog and Digital Tools Is a Mistake
RF
RF Simulation and Yield Analysis: Reading a Smith Chart Before You Fabricate
Electronics
VirtuBuild Space: Taking One Circuit From Breadboard to PCB Without Leaving the Browser
AI Design
Prompt-to-3D-Structure: What AI-Generated Geometry Is Actually Good For
Design
One Design, Three Views: Why Layout, 2D, and 3D Shouldn't Be Separate Files
Robotics
Mechatronics Simulation: Where Circuits Stop Being Circuits and Become Machines
AI
What an AI Debugging Assistant Can (and Can't) See in Your Circuit
Learning
Adaptive Learning Paths: Why 'Personalised Pace' Only Works If the Physics Is Real
Safety
What 'Child Safety' Actually Means in a STEM Simulation Platform
Visualization
Visualizing the Invisible: What 3D Field Simulation Actually Shows You
Education
What a STEM Lab Actually Costs: A Budget Framework for Administrators
Electronics
Inside the 555 Timer: Build One, Then Make an LED Flash
Electronics
Reading a Bode Plot for the First Time (an RC Filter Walkthrough)
RF
FEM vs FDTD: Choosing a 3D Solver for a Patch Antenna
PCB
Gerber and Excellon Files: What Your PCB Fab Actually Receives
Materials
Material Science You Can Test: Interactive 3D Experiments
Electronics
Resistor E-Series Explained: What E12, E24 and E96 Mean
RF
RF Cascade Analysis: Gain, Noise Figure, IIP3 and P1dB Through a Chain
Materials
The Stress-Strain Curve: Tensile, Compressive and Shear, Explained
RF
From Datasheet to Smith Chart: Importing Touchstone S-Parameters