Tuesday, February 22, 2022

Nodal analysis of a RLC circuit with controlled sources

Consider the circuit below, which contains independent and dependent current and voltage sources. The circuit is from [1], Figure 4.8. Circuit analysis is a fundamental part of electrical engineering and this post describes using Python to analyze electrical circuits. The schematic of the circuit was redrawn in LTspice [2].


The zero volt source, V2, was added to the schematic so that the current through R4 could be measured since this current controls H1. The voltages and currents in the circuit were solved for in a Jupyter notebook running Python and using the SymPy and SciPy libraries. The netlist is used to generate modified nodal equations with the python program described here. To view the notebook click here, to open the notebook viewer. The Jupyter notebook is located on github, click here, to follow the link to the repository.

References  

1. Basic Electric Circuit Analysis, D. E. Johnson, J. L. Hilburn, and J. R. Johnson, Prentice-Hall, 1978

2. https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html

No comments:

Post a Comment