Go to file
2026-01-18 17:52:05 -06:00
images Added images of example circuits along with ltspice simulations and accompanying code simulation waveforms 2026-01-18 15:00:37 -06:00
LTspice/pcb_trace Added images of example circuits along with ltspice simulations and accompanying code simulation waveforms 2026-01-18 15:00:37 -06:00
.gitignore gitignore 2026-01-18 15:10:13 -06:00
helpers.py Comment changes 2026-01-18 15:07:40 -06:00
main.py Comment changes 2026-01-18 15:07:40 -06:00
README.md Readme updated with example results 2026-01-18 17:52:05 -06:00
Simulation.py Comment changes 2026-01-18 15:07:40 -06:00

Purpose

The purpose of this simulation class is to provide a simple, resistor-inductor-capacitor (RLC) circuit solver. Currently, it can perform a transient simulation given a time-varying input. It has personally provided a better intuition on certain effects such as routing a PCB trace over a ground plane split or an impedance mismatch between the source and the load.

Next steps are to provide an adjoint parameter optimizer for optimizing the network for impedance matching or any other cost-quantifiable objective.

Examples

Ground Plane Split Example 1

In this example, the source and load are matched but there is a split in a ground plane.

The representative circuit is shown below. The split in the ground plane is modeled by creating a separate, "local ground" on the right side of the circuit that as an inductor and capacitor branch and a parallel resistor connecting it to the true ground.

The LTspice results are shown below.

The LTspice results are compared to the Python simulation. results

Ground Plane Split Example 2

In this example, the source and load are matched but there is a split in a ground plane. It varies with the prior example by changing key component values in the model, providing a completely different response.

Circuit

The results of the simulation are below.

Ground Plane Split with Mismatched Load

This example includes both the ground plate split and a mismatched source and load impedance.

The circuit in LTspice is shown below

The LTspice simulation results are below

A comparison between the LTspice simulation and Python simulation are below