Maverick Hoziel

Circuit Simulation Framework – SPICE Style MNA Solver

This project is a SPICE style circuit simulation engine built across four major assignments. It parses netlists, builds Modified Nodal Analysis (MNA) matrices, and solves circuits in DC, transient, and frequency domain settings. Over the four stages it progresses from linear DC operating point, to nonlinear diode operating point with Newton Raphson, to transient analysis with Backward Euler, and finally to a Harmonic Balance solver that can be compared directly to Backward Euler steady state results.


Features Overview


1. Linear DC Operating Point Solver (.op, Dev1)

The first assignment implements a DC operating point solver for purely linear circuits.

Key aspects:

This stage focuses on getting the MNA formulation correct and matching DC results to known solutions or reference tools.

DC Netlist

DC Node Voltages Netlist

DC MNA Matrices

DC MNA Matrices


2. Nonlinear DC Operating Point with Diodes (.op, Dev2)

The second assignment extends the DC solver to handle nonlinear devices, specifically diodes.

New capabilities:

At this stage the simulator becomes a nonlinear DC analysis tool that can handle rectifiers, clipping networks, and other diode based circuits.

DC Non Linear Netlist

DC non Linear Netlist

DC Non Linear MNA Matrices

DC non Linear MNA Matrices


3. Transient Analysis with Backward Euler (.tran, Dev3)

The third assignment introduces time domain simulation and the .tran style analysis.

Main features:

This stage turns the framework into a dynamic circuit simulator that can model charging and discharging, diode switching behavior, and other time varying phenomena.

Transient Analysis Netlist

Transient Circuit

Transiant Analysis Output

Transient Output


4. Harmonic Balance vs Backward Euler (Dev4)

The fourth assignment focuses on periodic steady state analysis and compares two approaches:

Additions in this stage:

This shows how a frequency domain method like Harmonic Balance can reach the periodic steady state solution directly, while Backward Euler approaches the same steady state through time stepping.

Steady State Analysis Circuit, f=1kHz, Is=1e-14, Vt=25mv

Circuit

HB VS BE Output

Harmonic Balance vs Backward Euleur Results


Architectural Summary

Netlist Parsing

MNA Assembly

Solver Layer

Outputs


Skills Demonstrated


Access to Full Code

Dev1

Dev2

Dev3

Dev4