Welcome to Lcapy’s documentation!¶
Lcapy is a Python package for symbolic linear circuit analysis, systems, and signal-processing. It uses SymPy for the underlying symbolic analysis and infrastructure. In addition, Lcapy can semi-automate the drawing of high-quality schematics from a netlist, including diodes, transistors, and other non-linear components. It can also symbolically transform both continuous-time and discrete-time signals, using Laplace, Fourier, and z-transforms. Expressions can be formatted in many forms and plotted with auto-labelling of the axes.

- _
>>> H = 5 * (s**2 + 1) / (s**2 + 5*s + 4) >>> H(t) -t -4⋅t 10⋅ℯ 85⋅ℯ 5⋅δ(t) + ────── - ──────── for t ≥ 0 3 3
If you have suggestions for improvements, please create an issue at https://github.com/mph-/lcapy/issues.
For a graphical user interface, see https://github.com/mph-/lcapy-gui or https://pypi.org/project/lcapygui/
If you are using Lcapy for teaching, please email to ‘’.join(reversed([‘nz’, ‘.’, ‘ac’, ‘.’, ‘canterbury’, ‘@’, ‘hayes’, ‘.’, ‘michael’])).
To cite Lcapy in publications use Hayes M. 2022. Lcapy: symbolic linear circuit analysis with Python. PeerJ Computer Science 8:e875 https://doi.org/10.7717/peerj-cs.875
Contents:¶
- Installation
- Overview
- Expressions
- Introduction
- Domains
- Quantities
- Units
- Containers
- Signals and transfer functions
- Expression attributes
- Expression methods
- Formatting methods
- Utility functions
- Domain transformation
- Expression manipulation
- Assumptions
- Discrete-time approximation
- Plotting
- Parameterization
- Network synthesis
- Special functions
- Heaviside unit step H(t)
- Signum function sign(t)
- Ramp function ramp(t)
- Rampstep function rampstep(t)
- Rectangle function rect(t)
- Triangle function tri(t)
- Trapezoid function trap(t, alpha)
- Cardinal sine function sinc(t)
- Periodic sinc function psinc(M, t)
- Discrete-time unit step u[n]
- Discrete-time unit impulse delta[n]
- Discrete-time rectangle function rect[n]
- Discrete-time signum function sign[n]
- Expression manipulation tips
- Discrete-time signals
- Circuit analysis
- Networks
- One-port networks
- Network schematics
- Network synthesis
- Random networks
- Network analysis examples
- Two-port networks
- Basic two-port networks
- A-parameter two-port
- B-parameter two-port
- G-parameter two-port
- H-parameter two-port
- Y-parameter two-port
- Z-parameter two-port
- Shunt two-port
- Series two-port
- Series-pair two-port
- L-section two-port
- T-section two-port
- Pi-section two-port
- Ladder two-port
- Transmission lines
- List of two-ports
- Two-port network attributes
- Two-port network methods
- Two-port combinations
- Two-port network models
- Netlists
- Continuous-time systems
- Discrete-time systems
- Schematics
- Introduction
- Components
- Antennas
- Batteries
- Blocks
- Capacitors
- Constant phase elements (CPE)
- Crystals
- Diodes
- Ferrite beads
- Flip-flops and latches
- Gyrators
- Inductors and chokes
- Integrated circuits
- Logic gates
- Meters
- Miscellaneous components
- Multiplexers
- Opamps
- Potentiometers
- Reluctances
- Resistors
- Switches
- Transformers
- Transistors
- Transmission lines
- Mechanical components
- Wires
- Cables
- Block diagrams
- Styles
- Labels and annotations
- Attributes
- Includes
- Macros
- Namespaces
- Examples
- Customisation
- File formats
- schtex
- Drawing tips
- Problems
- Schematic gallery
- Tutorials
- Circuit analysis for novices
- Advanced circuit analysis
- Using Lcapy with LaTeX
- Tables of transforms
- Configuration
- Applications
- Troubleshooting
- Internals
- Release notes
- V1.20
- V1.19
- V1.18
- V1.17
- V1.16
- V1.15
- V1.14
- V1.13
- V1.12
- V1.11
- V1.10.1
- V1.10
- V1.9
- V1.8
- V1.7
- V1.6
- V1.5.1
- V1.5
- V1.4
- V1.3
- V1.2.4
- V1.2.3
- V1.2.2
- V1.2.1
- V1.2
- V1.1
- V1.00
- V0.99
- V0.98
- V0.97
- V0.96
- V0.95
- V0.94
- V0.93
- V0.92
- V0.91
- V0.90
- V0.89
- V0.88
- V0.87
- V0.86
- V0.85
- V0.84
- V0.83
- V0.82
- V0.81
- V0.80
- V0.79
- V0.78
- Older versions
- Development
- Modules
show_version()
- Circuit analysis
- Circuit
- Netlist
- Netfile
- MNA
- Statespace
- Loopanalysis
- Nodalanalysis
- Oneport
- Expr
- Sexpr
- Cexpr
- Texpr
- Fexpr
- Nexpr
- Kexpr
- Zexpr
- Sequence
- Omegaexpr
- Noiseexpr
- Phasor
- Matrix
- Smatrix
- Tmatrix
- Network
- Voltage
- Current
- Super
- Admittance
- Impedance
- Functions
- Symbols
- Mnacpts
- Laplace
- Fourier
- Ztransform
- Transform
- Plot
- Acdc
- Ratfun
- Schematics
- General
- About