Devan Grover’s Status Report for 10/28/23

This week I worked on the netlist parser for the circuit simulator. I setup the Eigen library last week to compile for iOS – this allows me to generate and use matrices and other linear algebra functions. Therefore, I wrote code to parse through the netlist and start creating the required matrices for modified nodal analysis. As I described in the design report, we need to generate two matrices to solve our circuit. The first of these two matrices is composed of four sub-matrices. I am now trying to use the parsed netlist information and generate the sub-matrices for solving. Although I got the Eigen library to compile last week, I ran into some issues when actually using the matrix data structures and doing computations. I was able to solve these errors by fixing the linking settings and import settings in XCode and am now able to actually generate matrices and do computations on them. I also did a lot of work this week on the ethics assignment and completed it for our discussion next week. I am on schedule and hope to have some matrices generated next week to finally get the simulator up and running.

Devan Grover’s Status Report for 10/21/23

This week I made progress with the circuit simulator by installing matrix libraries and adding them to our iOS development environment. I am going to be using eigen, which is a C++ library that allows for matrix calculations. I also created a basic wrapper file to call C++ code from Swift, which is what our application uses. I am now able to conduct matrix calculations in C++ code that is called from the frontend of our application.

One tool that I need to learn further is the eigen library. It is an open source C++ library used for linear algebra. It supports matrices and vectors which are heavily used when solving circuits. I will need to use eigen to create the required A and z matrices in the modified nodal analysis equation. I will also need to use it to solve the system of equations and calculate the inverse of various matrices. I think my progress is good, and I hope to parse through the netlist and create the A matrix by next week.

Team Status Report for 10/21/23

One major change that we thought of over fall break is what circuit data structure we send to the frontend of the application from the computer vision output. Previously we have been set on a netlist: the computer vision sends a netlist to the frontend, and the input to the circuit simulator is also a netlist. What we have realized while constructing the netlist from the computer vision algorithm is that there is a discrepancy between the circuit that the user drew and the orientation of the circuit that the netlist represents. A properly constructed netlist (which is easy to do) will guarantee that the right components are connected at the appropriate nodes and that the relative positioning of each component to one another is correct. What a correct netlist does not give us is the same orientation of the circuit as what the user draws. For example, say that a user draws a circuit where the components starting from the left side and going in a clockwise direction are voltage source -> resistor -> wire -> wire (back to voltage source). The generated netlist will guarantee this ordering, but when drawn the circuit could look like (also from the left side, clockwise) wire->wire->voltage source->resistor (back to wire). We may end up accidentally throwing the user off by showing them what is technically the same circuit as the one they drew but oriented differently, which may lead to correct circuit classifications not being deemed correct by the user. Our solution to this also simplifies some work; the computer vision algorithm naturally produces a list of edges where each is denoted by the coordinates of a pair of connecting nodes and the component that is connecting the nodes. By giving the frontend the coordinates of the nodes, they can construct the relative orientation of the circuit that the user expects. We made progress with the circuit simulator by installing the required libraries to the development environment and creating the required matrices. 

There have been no changes in the schedule. We are on track with our work and plan to meet all of our deadlines accordingly. Next steps include testing the iOS application to make sure it will integrate with the computer vision algorithm correctly. This means feeding coordinates into the application and making sure the circuits displayed are correct. 

Devan Grover’s Status Report for 10/07/2023

This week, I worked a lot on the design presentation, especially because I was the one presenting. We only finished roughly 30-50 percent of the slides on Saturday, so I spent my whole day on Sunday working on it. After finishing the slides, I drafted a rough script of what I was to say during the presentation and iteratively practiced and got better. At night, I practiced and had to keep cutting parts out of my presentation in order to stay at the proper time. I presented to Stephen over zoom to practice and to my roommates to get a more realistic feel for how I would present in class. This let me practice movement and hand gestures.

I also looked at existing algorithms used to solve circuits – a good way for computers to solve simple DC circuits is by creating a conductance matrix, which is a matrix describing how well current flows through specific parts of the circuit. You then create voltage equations describing the voltage drops across each component and arrange these into a matrix. You can then solve the system of equations to find the current at each node and the voltage drop across each component. I have not been able to figure out how to implement this in practice, so I am still reading more.


I got sick this week so I am a bit behind schedule, but I will definitely make up for this by putting work in every day over fall break. I hope to get a conductance matrix created for a simple circuit by next week.

Devan Grover’s Status Report for 9/30/23

I did research on possible computer vision algorithms, netlists, and worked on the design presentation this week. I did more research into netlists since most of our research was focused on computer vision last week. Netlists are commonly used in various programs such as SPICEand SystemVerilog to generate schematics of how various components are connected to each other. I plan on using a hierarchical, object oriented system in which all components share their properties – this way I do not need to handle extraneous cases for components that act differently from other components (eg. diode vs resistor). I wrote basic code to connect two resistors together to test this concept.

I also researched computer vision algorithms specifically for our design presentation. During our discussions with Professor Yu and Mukundh this week, we realized that we need to dig deeper into the computer vision aspect of our project and flesh out the techniques we will use. I read through many papers that tried to solve similar problems to our computer vision algorithm, and we all collectively decided on using ORB for feature detection and a brute force matching algorithm.
Since I am presenting the design presentation next week, I also spent time writing up scripts and notes to look at while practicing my presentation. In order to ensure I give the best presentation possible, I want to prepare and practice in front of real people. By creating notes ahead of time, I can review these and refine my presentation skills after presenting multiple times to my roommates.

I am a little bit behind schedule. I had three interviews this past week that took up lots of my time, and I was therefore unable to do as much as I originally planned in terms of researching netlists. I did not write very much code for the netlist, but since I only have one interview next week I will be able to devote much more time to this project and therefore will be able to catch up. I hope to complete a netlist with more than just two components and create more than one type of component.

In my work this week I used concepts from 18-220 for the circuit simulation. I have not taken a computer vision course, so I have been reading up on many guides and papers on the subject in order to better understand the concepts and educate myself. OpenCV also has many guides and tutorials online that I have been trying to do and follow along with to get a better grasp on computer vision.

Devan Grover’s Status Report for 09/23

This week I explored computer vision algorithms to separate the components from the rest of the circuit. In order to properly do this, I came up with the idea to have circular nodes at the end of every component’s two terminals. Then, I will use an algorithm to detect circles such as the Hough Circle’s algorithm in order to find these nodes. Next, each node that is found will have an algorithm run upon it in which it will find the closest nodes in the same x and y coordinates. Then, a bounding box will be drawn between the sets of two dots and this box will be looked at to find a component.

I tried to implement this with a simple picture of a resistor but was unable to get it to work. The circles were not being detected in the image. I tried to run a simple filter on the image to detect the components being drawn. I made every pixel that had a black value of over a threshold value completely black, and every pixel with a lower black value completely white. This also did not work well in differing light conditions like the picture below.

Furthermore, the circles on the end of the resistor were not even detected. I believe I need to look further into the problem because we need to make sure we can detect components separately from the whole circuit. I tried a contour plot which detected edges relatively well, but the nodes on each component were not filled in because the contour plot only detects edges. This is problematic because we will have other circular components like voltage and current sources that we will need to ensure By individually identifying components and wires with this technique, we can easily build a netlist for our circuit simulator. I also briefly explored the concept of netlists and how they work so that we can implement it for our circuit simulator.

I am still on track with the schedule because I am still researching CV algorithms. I want to have a picture of a resistor with the circles on its ends being detected properly by our circle detection algorithm. This will prove that we can go on with the technique I discussed above to detect individual components.