Theory¶
Solving¶
pycircuit.circuit uses the [MNA] (Modified Nodal Analysis) formulation to solve the voltages and currents of an electric circuit.
For a circuit with N nodes and M independent voltage sources or inductors, the unknown quantities in the MNA method can be written as:
where \(v\) is a vector of length N that contains the node voltages and \(j\) is a vector of branch currents through independent voltage sources and inductors.
The behaviour of a non-linear lumped circuit with energy storage elements such as inductors and capacitors can be found from the solution of a system of differential equations:
Where \(t\) denotes time, \(v(t)\) is a vector of node voltages and terminal currents. \(q(\cdot)\) is a function that maps \(v(t)\) to sums of capacitive charge or inductive fluxes at a node, \(i(\cdot)\) is a function that maps the \(x(t)\) vector to a sum of currents at a node and finally \(u(t)\) is the input to the system.
If the circuit is linear or linearized around the operating point, equation (1) can be rewritten in matrix form as:
where the matrix elements are given by:
AC analysis¶
In an AC analysis the stimuli the circuit is a complex sinusoid, that is:
The solution can be found by applying the Laplace transform to equation (2):