Hayes Michael
Electrical and Computer Engineering, University of Canterbury, Christchchurch, New Zealand.
PeerJ Comput Sci. 2022 Feb 18;8:e875. doi: 10.7717/peerj-cs.875. eCollection 2022.
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.
Lcapy是一个用于符号求解线性电路的开源Python包。它使用直流分析、交流(相量)分析、瞬态(拉普拉斯)分析和噪声分析的叠加。表达式使用计算机代数系统SymPy进行求值。Lcapy可以对由单端口和双端口网络组合而成的电路或使用类似Spice符号的网表指定的电路进行建模。Lcapy可以给出由节点分析、改进节点分析、回路分析和状态空间分析产生的方程组。表达式可以格式化为多种表示形式、参数化并转换到其他域。进行量纲分析以减少用户错误并以单位形式呈现结果。支持连续和离散信号。Lcapy产生高质量输出。可以从网表生成多种不同格式的教科书质量原理图,并针对不同惯例进行定制。表达式可以格式化为LaTeX格式以包含在文档中,或者进行数值求值和绘图。本文介绍了Lcapy的功能和能力概述,以及实现细节和性能考虑因素。