Litcius/Paper detail

Lcapy: symbolic linear circuit analysis with Python

Michael Hayes

2022PeerJ Computer Science22 citationsDOIOpen Access PDF

Abstract

Lcapy is an open-source Python package for solving linear circuits symbolically. It uses a superposition of DC analysis, AC (phasor) analysis, transient (Laplace) analysis, and noise analysis. Expressions are evaluated using the computer algebra system SymPy. Lcapy can model circuits comprised of combinations of one-port and two-port networks or circuits specified using a netlist with a Spice-like notation. Lcapy can present the system of equations produced from nodal analysis, modified nodal analysis, loop analysis, and state-space analysis. Expressions can be formatted into many representations, parameterized, and transformed to other domains. Dimensional analysis is performed to reduce user errors and to present results with units. Both continuous and discrete signals are supported. Lcapy produces high-quality output. Textbook quality schematics in a number of different formats can be generated from netlists and customized for different conventions. Expressions can be formatted into LaTeX format for inclusion into a document or numerically evaluated and plotted. An overview of the features and capabilities of Lcapy is presented, along with implementation details and performance considerations.

Topics & Concepts

Computer scienceSymbolic data analysisNetlistNodal analysisNetwork analysisElectronic circuitPython (programming language)Modified nodal analysisTheoretical computer scienceAlgorithmProgramming languageElectronic engineeringComputer hardwareQuantum mechanicsAnatomyEngineeringMedicineElectrical engineeringPhysicsNODALComputational Physics and Python ApplicationsNumerical Methods and AlgorithmsModel Reduction and Neural Networks