A Byte of PhysicsLogo

Transient analysis

Transient circuits change state through time. A capacitor voltage or inductor current is carried from one step to the next, while Kirchhoff constraints determine its derivative. That memory is the difference between a transient model and a static resistor calculation: changing a source now need not change the state instantly.

Think like a programmer

Give every stored quantity an initial value, unit, timestamp, and owner. Keep the circuit constraint solver separate from the integrator. Log source schedule, step size, integrator, state trace, and energy/power residual. Compare a numerical update with an analytic RC step at fixed physical timestamps before adding switching, nonlinear components, or larger networks.

Model checklist

Inputs
Component values, topology and sign convention, source schedule, initial capacitor voltage or inductor current, start/end time, step size, integrator, and output sample schedule.
State
Time, capacitor voltage, inductor current, source values, and accumulated energy/power transfers.
Rule
Solve the instantaneous circuit derivative from the stored state, then advance state with the declared integrator and record diagnostics at named timestamps.
Output
Time-series state, branch voltage/current, energy ledger, reference residual, and stability/refinement result.
Check
Initial state is reproduced at t = 0; a constant-source RC trace approaches the source voltage; a discharge decays toward its final state; smaller stable steps converge at identical output times; source, resistor, and stored-energy power balance within tolerance.

For a constant source and arbitrary initial capacitor voltage, the analytic RC reference is:

\[V_C(t)=V_s+(V_C(0)-V_s)e^{-t/(RC)}\]

The familiar charging equation is the special case VC(0) = 0. Tests should not assume that special case: at t = 0, the output must equal the stored initial voltage; as t becomes large, it approaches Vs; and if VC(0) = Vs, it stays constant. These fixtures catch a common implementation error where every run silently begins discharged.

An explicit Euler update for the ideal RC equation is simple but has a stability/accuracy contract. It advances using the previous state and a chosen Δt; large steps can overshoot or distort the curve even if the final value looks plausible. Run the same physical interval with Δt, Δt/2, and Δt/4, sample at the same timestamps, and compare with the analytic result. Separate solver error from output interpolation error.

Try this experiment

Prediction: A larger RC time constant slows the response, while changing the initial capacitor voltage changes the starting point but not the final constant-source value.

Choose Vs, R, C, and a nonzero initial voltage. Verify the t = 0 fixture, one-time-constant value, and long-time limit. Implement an explicit update, halve the step twice, and report the maximum difference from the analytic reference at shared timestamps. Repeat with the source already equal to the initial voltage and predict the flat trace.

Where this model breaks

Ideal components omit parasitic resistance, capacitance, inductance, switching dynamics, nonlinear sources, saturation, temperature dependence, distributed wires, and measurement loading. Explicit time steps can be unstable for stiff networks; an analytic RC reference cannot validate an unrelated topology or a time-varying source without a matching reference.

Summary

Treat dynamic circuit quantities as timestamped state. Validate arbitrary initial conditions, final limits, power/energy accounting, and step refinement against a matching RC reference before trusting a larger transient simulation.

Glossary

Sources

Model contract

Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.

\[\text{observable output} = f(\text{inputs},\,\text{state})\]
Inputs
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.

Implement the idea as a model

For Transient Analysis, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Currents and Circuits, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.

Guided experiment

Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.

Where this model breaks

This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.

Summary

Treat Transient Analysis as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.

Glossary

  • Input: a measured value or chosen parameter supplied to a model.
  • State: the smallest set of values needed to continue or reproduce a model.
  • Validation: comparing an output with a known result, limit, invariant, or measurement.

Self-check

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. Which assumption would you test first before applying the model to a real system?

Model review: turn Transient Analysis into a test

Integrate circuit state explicitly and validate it against an ideal RC step response.

  1. Name the inputs and units that the currents and circuits model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: