Transient analysis and the waveform viewer
Understand time constants and use cursors and expressions to analyse waveforms.
Transient analysis (.tran) simulates how the circuit evolves over time. The syntax is .tran Tstop, or .tran Tprint Tstop Tstart Tmaxstep when you need control.
For the RC circuit from lesson 2 the time constant is tau = R x C = 1 kohm x 1 uF = 1 ms. After one tau a charging capacitor reaches about 63 percent of the final value; after five tau, about 99 percent.
- Run the RC circuit with .tran 20m and plot V(OUT) and V(IN) together.
- Click the V(OUT) trace name in the plot header to attach a cursor. Drag it to 1 ms after a rising edge and read the value (about 3.16 V for a 5 V step).
- Right-click the plot and choose Add Trace. Type I(R1) to plot resistor current, or V(IN)-V(OUT) to see the voltage across the resistor.
- Use Plot Settings > Add Plot Pane to give current its own pane with its own axis.
- Use the Zoom buttons or drag a box to zoom, and Ctrl+G to toggle the grid.
If curves look jagged, add a maximum timestep: .tran 0 20m 0 10u