lcapy.mna.MNA

class lcapy.mna.MNA(cct, solver_method)

Bases: object

This class performs modified nodal analysis (MNA) on a netlist of components. There are several variants:

1. DC analysis if all the independent sources are DC. The .V and .I methods return DC expressions with the dc assumption set.

2. AC analysis if all the independent sources are AC. The .V and .I methods return phasors.

3. Initial value Laplace analysis if an L or C has an explicit initial value. The .V and .I methods return s-domain expressions with no assumption sets; thus the time-domain results are only valid for t >= 0.

4. General Laplace analysis. If all the sources are causal and all the initial conditions are zero (explicitly or implicitly) then the time-domain results are causal.

  1. Noise analysis.

Note, it is assumed that the user of this class uses superposition to solve problems with mixed independent sources, such as DC and AC.

Methods

__init__(cct, solver_method)

equations([inverse])

System of equations used to find the unknowns.

matrix_equations([form, invert])

System of equations used to find the unknowns.

Attributes

A

Return A matrix for MNA

B

Return B matrix for MNA

C

Return C matrix for MNA

D

Return D matrix for MNA

E

Return E vector for MNA

G

Return G matrix for MNA

I

Return I vector for MNA

Idict

Return dictionary of transform domain branch currents indexed by component name

Vdict

Return dictionary of transform domain node voltages indexed by node name

X

Return X vector (of unknowns) for MNA

Z

Return Z vector for MNA

property A

Return A matrix for MNA

property B

Return B matrix for MNA

property C

Return C matrix for MNA

property D

Return D matrix for MNA

property E

Return E vector for MNA

property G

Return G matrix for MNA

property I

Return I vector for MNA

property Idict

Return dictionary of transform domain branch currents indexed by component name

property Vdict

Return dictionary of transform domain node voltages indexed by node name

property X

Return X vector (of unknowns) for MNA

property Z

Return Z vector for MNA

equations(inverse=False)

System of equations used to find the unknowns.

If inverse is True, evaluate the matrix inverse.

This is for compatibility and is deprecated. Use matrix_equations instead.

matrix_equations(form='default', invert=False)

System of equations used to find the unknowns.

Forms can be:

A y = b b = A y Ainv b = y y = Ainv b

If invert is True, evaluate the matrix inverse.