Symbolic Modified Nodal Analysis
using Python

Author

Tiburonboy

Published

26 December 2025

Note
  • This book is a draft copy and many sections are still under construction.
  • Basic spelling and grammar checks have not been completed.

Welcome

Welcome to Symbolic Modified Nodal Analysis using Python. This book is personal project that is being made available online during the development of the book.

The Python code presented in this book will allow students and professionals to automatically generate symbolic network equations from a circuit’s netlist. Then using the power of SymPy, NumPy and SciPy those equations can be symbolically or numerically solved. The JupyterLab notebooks presented in this book can be used as templates to analyze almost any linear electrical circuit.

This book was written in R MarkDown using plain text files and JupyterLab notebooks. The source files were rendered into an HTML book using Quarto, an open-source scientific and technical publishing system. HTML books are actually just a special type of Quarto Website. Quarto does a good job of formatting the documents into web pages for a book. Some of the lines of code and mathematical expressions are wider than the page and Quarto inserts a slider bar in the code or equation windows. Chapter and paragraph numbering are automatically generated by Quarto as well as the numbering of figures and tables.

I don’t have a proof reader or professional editors for this project. Instead, I’m relying on the LibreOffice spell checker and the grammar and spell checker of Google Docs to help me with the proof reading part of the writing process. Employing professional editors to work on this project may happen in the future.

Some sections of this work were developed with the assistance of Gemini, an artificial intelligence developed by Google. While this technology was utilized to draft some of the initial content, second and subsequent draft versions have been meticulously reviewed by the author. Every Gemini assisted section has been reworded for style and fact-checked for accuracy.

Python code contained in this book can run in a browser-based environment, see Appendix C — Google Colab. Additionally, online schematics editors are available, see Appendix E — EasyEDA. By using web based tools, the reader is not required to install any programs.

Source Code

The source code for this project can be found on GitHub. Here you will find markdown files, JupyterLab notebooks, LTSpice schematics and image files. I will do my best to keep these files current. All the source code is subject to the license stated in License.

Overview

The first four chapters introduce the topic of circuit analysis with some light background theory and describe my implementation of symbolic modified nodal analysis with Python. In addition, basic circuit analysis topics of - Resistive Networks, RLC Networks, Transfer Function, Transient Analysis, Mutual Inductance and Initial Conditions using Python are presented.

The next part of the book, Example Problems, contains circuit analysis example problems. This is followed by Validation Tests, which are 15 test circuits used to validate the Python code. This is followed by the Appendices which contain: references, code listing, notes about Colab and EasyEDA, a change log and a short history of electric circuit analysis.

The right margin of each page contains index with links to all the chapters. The left margin contains links to sections within the current chapter.

About the Author

This book is published under the pseudonym Tiburonboy.

When I was about ten years old, my parents gave me an electronics kit for Christmas. It was a collection of resistors, capacitors, transistors and other assorted electronic components. The kit included about ten plans to build various circuits like an AM radio and audio oscillator. Ever since then I have been interested in radios and electronics.

After graduating from high school, my Dad asked me what I was going to study in college and I told him mathematics. He suggested that I study electrical engineering since engineers were more in demand than mathematicians and electrical engineering was very math oriented. This turned out to be the best advice he gave me, because for the next 37 years my interest in electronics evolved into a very rewarding career as an electrical engineer.

My first job after graduating from college was working as a civilian for the US Navy. For more than 40 years I have been designing electronic circuits for instrumentation and telemetry systems. I have five Patents and have published seven technical papers.

Feedback

If you have complaints, find any errors, or have suggestions, send me an email at:
juan1543cabrillo@sudomail.com

Citation

If you find the book useful, please cite it as follows:

@online{Tiburonboy2024, 
    author = {Tiburonboy}, 
    title = {Symbolic Modified Nodal Analysis using Python},
    year = {2024},
    url = {https://tiburonboy.github.io/Symbolic-Modified-Nodal-Analysis-using-Python/},
    urldate = {2025-08-13}
}

Python Module Versions

The following versions were used in this book.

Table 1: Library versions
Package version
Python 3.10.9
JupyterLab 3.5.3
IPython 8.10.0
NumPy 1.23.5
SymPy 1.11.1
SciPy 1.10.0
Pandas 1.5.3
Tabulate 0.8.10
matplotlib 3.7.0
LTSpice 17.1.8
Quarto 1.4.553

The Jupyter notebooks are available from my GitHub repository. The results presented in this book should be reproducible if the libraries and modules have the same version numbers.

Revision History

This book will be updated occasionally to update content and fix spelling and grammar mistakes - see Table B.2. Additionally, new content will be added as new chapters in the Example Problems section.

License

This work (includes python code, documentation, test circuits, etc.) is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

  • Share — Copy and redistribute the material in any medium or format.
  • Adapt — Remix, transform, and build upon the material for any purpose, even commercially.
  • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.

Creative Commons License