• Post category:StudyBullet-3
  • Reading time:11 mins read


Discover the theory behind today’s circuit simulators and implement it in Python.

What you will learn

Graph theory applied to Circuit Analysis

Apply Modified Nodal Analysis (MNA) to electrical circuits in time domain and frequency domain

Python Fundamentals

Basics of version control, Git and GitHub

Develop a circuit solver in time domain and frequency domain

Get familiar with NumPy, the most popular Python scientific library

Basics of the pandas library for easy data manipulation and nice output formatting

Object-Oriented Programming with Python

The Don’t Repeat Yourself (DRY) principle with class inheritance in Python

Code refactoring to improve your program structure

Description

Welcome to one of the very few online courses that will teach you how to develop an electrical circuit solver!

Are you interested in the theory used in most circuit simulators and how to implement it yourself?

Are you an electrical engineering student/professional wishing to develop coding skills?

Would you like to switch to a software engineering career and start with a programming project linked to electrical engineering?

If the answer to any of these questions is yes, this course is for you.

If you are a university student, you will find that this course is complementary to your curriculum.

You will discover Modified Nodal Analysis (MNA), a powerful method to solve electrical circuits. Leonhard Martin Wedepohl, a noted electrical engineering educator, emphasised that “the absence of this circuit analysis technique from many academic engineering courses is totally at variance with its widespread application in modern circuit simulation packages”. And here is where you can learn this awesome technique!

Please note that this course does not cover the development of a graphical interface for drawing electrical circuits. However, this may be your next project after completing this one!


Get Instant Notification of New Courses on our Telegram channel.


In the theory part of this course, you will get the foundations to build a circuit solver both in time domain and frequency domain. Although the implementation only covers independent voltage sources, independent current sources and RLC elements, modelling other components will require minimal additional effort!

If you have never programmed in Python, don’t worry, we have dedicated a section to teach you how to code in Python as well as all the language concepts you need to complete this project! There are many exercises along the way before beginning the development of your circuit solver. These exercises will let you feel better ready for the real project.

You will start your program with a warmup challenge: build a DC solver in steady state. Once done, you will continue with the development of a frequency domain solver followed by a time domain solver.

During your adventure, you will learn an essential software engineering concept: version control. This will make it easier for you to monitor the progress of your development and avoid any loss of information if you screw things up or your program crashes at any time! In this course, you will use Git with GitHub (you will have to create a GitHub account -it’s free- to better understand and apply version control concepts).

The last section of this course focuses on improving the structure of your code and defining an appropriate output format for your end-user.

If, at the end of this course, you are keen to continue with this project and develop further functionalities, you will find many creative opportunities that will help you to expand your programming skills and, in addition, enable you to show up with great achievements to employers! If you need guidance, some improvement suggestions are listed in the very last lecture of this course.

English
language

Content

Introduction
Introduction
Circuit Theory
Introduction to Modified Nodal Analysis (MNA)
MNA Basics – Example 1 – Part 1
MNA Basics – Example 1 – Part 2
MNA Basics – Example 2 – Part 1
MNA Basics – Example 2 – Part 2
Application of the MNA Principles – Part 1
Application of the MNA Principles – Part 2
Application of the MNA Principles – Exercise Solution
MNA Computational Formulation
Calculation of Branch Voltages and Currents
Incidence Matrix
Branch Admittance Matrix and Complete Equation for Currents
LC Modelling in Time Domain – Trapezoid Area
LC Modelling in Time Domain – Trapezoidal Rule
LC Modelling in Time Domain – Common Representation and Iterative Process
LC Modelling in Time Domain – Proof of the Inductor Model
LC Modelling in Time Domain – Proof of the Capacitor Model
LC Modelling in Time Domain – Impact on the MNA Matrix Equation
Exercise – Proof of the Nodal Analysis Formulation
Presentation of the Proof of the Nodal Analysis Matrix Equation
Exercise – Proof of the MNA Formulation
Presentation of the Proof of the MNA Formulation
Python Fundamentals
Python Installation
Code Editor and IDE
Getting Started with PyCharm
Integers, Floats and Strings
Lists
Conditional Statements
Loops – Part 1
Loops – Part 2
Exercises – Lists, Loops and Conditional Statements
Exercises Solutions – Lists, Loops and Conditional Statements
Dictionaries – Part 1
Dictionaries – Part 2
Exercise – Dictionaries
Functions – Part 1
Functions – Part 2
Functions – Part 3
Exercises – Functions
Functions – Solution to Exercise 1
Functions – Solution to Exercise 2
Object-Oriented Programming – Part 1
Object-Oriented Programming – Part 2
Object-Oriented Programming – Part 3
Exercise – Object-Oriented Programming
Object-Oriented Programming – Solution to the Exercise
Files I/O
Introduction to NumPy
Introduction to Pandas
Introduction to Matplotlib
__name__ and __main__
Virtual Environments
DC Circuit Solver
Introduction
Program Structure
Solution – Part 1 – Storing the Input Data
Solution – Part 2 – Input Pre-processing
Solution – Part 3 – Node Admittance Matrix
Solution – Part 4 – Incidence Matrix and MNA Matrix
Solution – Part 5 – RHS Vector and System Solution
Solution – Part 6 – Branch Voltages and Currents
Documentation and Arbitrary Nodes Labelling
Introduction to Version Control
Version Control Definition and Concepts
Token Authentication for Git Operations
Practicing Git From the Command Line
Version Control with PyCharm
Frequency Domain Solver
Introduction
Tips and Hints
Solution – Part 1 – Input Pre-processing
Solution – Part 2 – System Solution and Results Validation
Time Domain Solver
Introduction
Tips and Hints
Solution – Part 1 – Before the Main Loop
Solution – Part 2 – Main Loop Implementation
Results Validation
Code Refactoring and Output Formatting
Introduction
Introduction to Class Inheritance
Changes to the Input Files Format
Base Class Implementation
Decorators and Static Methods
Output Formatting – Introduction
Output Formatting – Implementation
Defining the Python End-User Interface – Introduction
Defining the Python End-User Interface – Implementation
Allowing Alpha-Numerical Nodes Labelling – Introduction
Allowing Alpha-Numerical Nodes Labelling – Implementation
Running a Python Script With Additional Command Line Arguments
Improvements Suggestion