Skip to main content
Top

2018 | Book

Simulating Nonlinear Circuits with Python Power Electronics

An Open-Source Simulator, Based on Python™

insite
SEARCH

About this book

This book provides readers with an in-depth discussion of circuit simulation, combining basic electrical engineering circuit theory with Python programming. It fills an information gap by describing the development of Python Power Electronics, an open-source software for simulating circuits, and demonstrating its use in a sample circuit. Unlike typical books on circuit theory that describe how circuits can be solved mathematically, followed by examples of simulating circuits using specific, commercial software, this book has a different approach and focus. The author begins by describing every aspect of the open-source software, in the context of non-linear power electronic circuits, as a foundation for aspiring or practicing engineers to embark on further development of open source software for different purposes. By demonstrating explicitly the operation of the software through algorithms, this book brings together the fields of electrical engineering and software technology.

Table of Contents

Frontmatter
Chapter 1. Introduction
Abstract
This chapter introduces the concept of simulation by describing its usefulness with a few general engineering examples. The chapter then describes the current state of the power system and the recent changes that have occurred along with the changes that are expected in the future. The chapter describes the challenge of tackling climate change with renewable energy and the recent advances in wind and solar energy. With this background, the chapter introduces Python Power Electronics and describes the usefulness of a free and open-source circuit simulator and building a community of power engineers.
Shivkumar V. Iyer
Chapter 2. Introduction to Python
Abstract
This chapter introduces the Python programming language briefly so as to serve as a quick reference for the later chapters. This chapter describes the features of the programming language and also the different types of objects and their associated functions. This chapter does not serve as a detailed tutorial on Python programming but is a quick reference for the material in the book.
Shivkumar V. Iyer
Chapter 3. User Interface
Abstract
This chapter describes the interface that the simulator uses to interact with the user. The chapter describes the philosophy behind choosing spreadsheets as the mode of extracting information from the user whether to enter simulation parameters, circuit schematics, parameters of the components in the circuit schematics, and also the structure of control functions. The chapter describes how the structure of every component class in the simulator library and how the data entered by the user is processed by each component class. The chapter also describes the concept of how classes are instantiated for every component found resulting in objects and how these objects are referenced by the simulator. The chapter describes the execution flow in the simulator and how the simulator processes the data provided by the user and makes it available to the core simulation engine.
Shivkumar V. Iyer
Chapter 4. Interface for User Control Functions
Abstract
This chapter describes how a user can write control functions for a simulation. The chapter describes how the control functions have to be written as Python files and specified in the simulation parameter spreadsheet. Every control function will have an interface to the simulation in terms of inputs and outputs, and this interface is described by a spreadsheet called a descriptor. Besides inputs and outputs, every control function can use certain types of variables that perform special actions. The chapter describes the importance of each type of control variable and how they are implemented in the simulator. The chapter describes how control functions are scheduled by the simulator using time events, and with an example, it is described how the simulator ensures that the control functions execute at the desired time instant. A simple example has been provided to describe how control functions can be interfaced with the simulation and also with each other.
Shivkumar V. Iyer
Chapter 5. Case Study—Shunt VAR Compensator
Abstract
This chapter describes how a user can simulate a shunt-connected three-phase VAR compensator realized using a two-level voltage source converter in a three-phase system. The voltage source converter consists of controllable ideal Switches that are turned on and turned off by pulse width modulation. The chapter describes how the user can build this simulation in stages such that every new subsystem added to the circuit can be verified. The chapter also describes how the user can write control functions with detailed examples of each control function in the simulation and also design the control interfaces through descriptors. Every stage of the chapter contains simulation results to show how the project develops. Through this example, every feature of the simulator has been described with details so that users can develop their own simulations.
Shivkumar V. Iyer
Chapter 6. Nodes, Branches, and Loops
Abstract
This chapter describes how the simulator processes the circuit schematics that the user enters in spreadsheets. The connectivity information is extracted from the circuit schematics in the form of nodes, branches, and loops. Nodes, branches, and loops are used to perform circuit analysis through loop analysis and nodal analysis which are described in the next chapters. The chapter describes through sample circuits, the algorithms used to determine the nodes, branches, and loops. The chapter introduces the concept of the LoopMap which is used for performing loop analysis in Chap. 7 and the concept of KCLBranchMap which is used for performing nodal analysis in Chap. 8.
Shivkumar V. Iyer
Chapter 7. Circuit Analysis—Loop Analysis
Abstract
This chapter describes how loop analysis is performed in the simulator. The chapter describes how the matrix equation for performing loop analysis is generated from the LoopMap described in Chap. 6. A brief description is provided about how the matrices in this equation are transformed using row operations such that they can be solved by using numerical integration techniques. The chapter describes how loop currents and branch currents in the circuit can be mapped which allows for calculation of branch currents from loop currents and vice versa. The chapter describes with an example how time constants of branches of the circuit can make the simulation unstable and introduces the concept of a stiff loop. By providing a sample circuit and its corresponding LoopMap, the chapter describes the need to isolate stiff loops so as to be able to simulate a circuit. With this example, the concept of loop manipulations is described and with advanced examples, the effectiveness of the procedure is described. The chapter describes the limitation of loop analysis with another set of examples and therefore the need for nodal analysis.
Shivkumar V. Iyer
Chapter 8. Circuit Analysis—Nodal Analysis
Abstract
This chapter describes how nodal analysis can be used to determine the currents through stiff branches (that have a very low time constant) in the circuit. With the example of a simple buck converter, the chapter describes how loop analysis is insufficient in determining the conduction of power devices during switching events. The chapter then describes how nodal analysis can be used effectively in determining how power devices conduct and the transfer of current from one device to another. The chapter introduces the concept of events and how the matrix equations for the circuit will be constant until an event occurs. The chapter finally describes the logical flow of processes in the simulator as it performs loop analysis and nodal analysis one after the other.
Shivkumar V. Iyer
Chapter 9. Conclusions
Abstract
This chapter will conclude the book by highlighting the advantages of the simulator and the future development intended in this project.
Shivkumar V. Iyer
Backmatter
Metadata
Title
Simulating Nonlinear Circuits with Python Power Electronics
Author
Shivkumar V. Iyer
Copyright Year
2018
Electronic ISBN
978-3-319-73984-7
Print ISBN
978-3-319-73983-0
DOI
https://doi.org/10.1007/978-3-319-73984-7