Devan Grover’s Status Report for 12/09/23

This week I finished up some polishing touches on the circuit simulator and finalized some of the integration of our project. Stephen changed his computer vision algorithms to use functions that are not available in the default opencv framework. This means we have to build the framework using additional modules. I ran into some issues doing this because I have an Apple Silicon Macbook, but we hope to resolve this issue by using an Intel Mac.

 

I also polished up some of the integration code between the simulator and the rest of the app. Previously, the app would crash on my section if there were errors in the program. I have mitigated this issue and the app no longer crashes when the simulator errors out.

Team Status Report for 12/2/23

Stephen managed to get the individual component classification accuracy up to around ~85% in testing, and is still in the process of measuring the full circuit accuracy. The size of the dataset has increased to encompass 56 component images, but in terms of file size it is actually still 3 MB, which is what we predicted two weeks ago. In addition to this, because Stephen switched to using BRIEF descriptors, which are only available with opencv-contrib extra modules, this is an added step for the build process of the integration. This week we were able to completely finish integrating the entire project on one codebase. The CV and the phone app are correctly linked to display the circuit that the CV algorithm recommends and the circuit simulator is able to run with the inputs the user provided. All that is left to be done is to parse the output of the circuit simulator and display it on a final page, however this will be less than a day’s work as we have already parsed the output of the CV code which was far more challenging. In addition to this, the display of the circuit has a couple bugs that need to be worked on, but this is also expected to take around a day. Jaden is planning on finishing both these parts by Tuesday. 

Now that most of the integration is finished, Devan is finishing up working on the model for the diode. Once these parts are finished, the project will be completed.

Devan Grover’s Status Report for 12/2/23

This week I worked a lot on integration of the parts of our app. I first had to get openCV to build on our iOS platform. I ran into many issues because Jaden and my computers have Apple Silicon, which makes us unable to test our code on the iOS simulators on our systems. We initially remedied this by working in WEH5201, but I set the project up so that we can now build directly on our phones from our own machines.

I had to create an objective-c++ file to bridge the code between the frontend and backends of our application. This meant learning the syntax and nuances of objective-c++, which is very different to other languages I have used in the past. I had to create new data structures that were compatible with objective-c++ and Swift so that I could pass data between the two languages. This meant I also had to do more work in the simulator to parse this new data structure into a readable structure for the simulator. I also helped Jaden integrate the CV with the app in a similar fashion with an objective-c++ file.

Now that we have a working application, I will resume my focus on the diode model in the circuit simulator. I am a bit behind schedule on the diode, but believe I will be able to complete it by the end of next week. I am satisfied with this past week’s progress because we have integrated our application’s parts together.

Devan Grover’s Status Report for 11/18/23

This week I worked on integration and on implementing a diode into the circuit simulator. I was able to interpret the list of edges and coordinates that the computer vision algorithm returns. This means I can now take this list of components and coordinates, make the coordinates into node numbers, and then condense the nodes that are connected by wires. This means we can fully take a circuit image, run it through our computer vision algorithm, and then simulate it with our simulator (provided dummy component values).

I also tried a lot to integrate opencv into our Xcode project, but this proved to be a tough task. Since Jaden and I are developing on Apple Silicon macbooks, the opencv library does not work for the iPhone simulator in Xcode. Therefore, I am unable to build for iPhone. We will try to circumvent this issue by running the code on intel based macbooks since these have support for opencv in  XCode.

I tried a bit more to get the diode modeling to work but am still unable to make the correct guesses and get to the right value. I am still reading some papers but think I will be able to get this done over break. I am fairly good on schedule with integration but am behind with the diodes. I hope to make this up over break

Team Status Report for 11/18

One change that has an associated cost is the memory usage of the dataset file. Stephen created a YML file with feature vectors representing 27 component images that had a size of 1.4 MB. Our ideal dataset size would comprise 54 component images, which would correspond to a YML file size of ~3 MB. This is bigger than our previously anticipated 500 KB size for 50 component images, but because our maximum application size is set as 100 MB, we don’t expect this 2.5 MB difference to be a problem. In addition, there were some changes regarding how the user will input the component values. When showing progress there were concerns of the UI and it being tailored to a younger audience. Now rather than the user clicking on components to input values, they are presented with text of each component name to click on to input values. We expect this will be more user friendly and will cause less confusion.

We also worked a bit on integrating the computer vision and circuit simulator components of our project. Our circuit simulator is now directly able to simulate a circuit from an image generated by the computer vision algorithm. We are still unable to get the computer vision library to build for XCode though, which may mean we will have to use the Intel Mac lab.

Overall we are more behind schedule than we would like, but hope to make this up over next week’s break. Our goal is to have the full integration complete by the time we come back from break, which gives us time to work on final documentation during the first week back. 

We have all developed lots of skills that we did not previously have by working on our application. Stephen had never used computer vision before, Jaden had never coded an iOS app before, and Devan had limited c++ experience. By working on this project, we were able to develop our skills and become better engineers. From a logistical standpoint, we have learned to work well together by giving each other status updates often to mark our progress and make sure we are relatively on track. This also allows us to pass ideas between each other even though our work is very compartmentalized. Planning the gantt chart also helped a lot because we are able to manage our time better and not spend too much time thinking about what to do next after completing a task. 

Team Status Report for 11/11/23

Stephen made several large changes to the computer vision subsystem in an effort to improve accuracy of classifications so that we can hit our accuracy requirements. Because of this, he did not get to performing benchmark tests to quantify how accurate the system is as of now. The goal for the end of this week was to get 80% accuracy and 90% next  week. As long as by the end of next week Stephen can hit close to the 90% mark, he will remain on schedule. Otherwise, we will have to use some slack until this mark is hit.

Jaden worked on the application’s UI, specifically the value input for components. He was able to get the feature to work in a way where you can tap on each individual component on the circuit and enter in a value. He still needs to figure out how to display these values onto the screen though. Devan worked mostly on trying to integrate diodes into his circuit simulator. This proved to be very challenging because he has to incrementally solve a system of equations in a loop until his solution converges. He is a little behind, but will make this up over Thanksgiving.

Starting next week we’re going to gradually start working on the integration of our subsystems. This means creating bridge files for the C++ classes that Stephen and Devan have created, as well as some other minor details like what was mentioned in last week’s report.We will also start doing unit and integration testing in order to benchmark requirements and make further refinements.

 

Devan Grover’s Status Report for 11/11/23

This week I worked a bit on some integration and on getting diodes integrated into my model. I wrote a function to create a netlist from the coordinate, component data structure we are using to send information between our backend and frontend. This function will register the coordinates as nodes and create component entries for each component  in the netlist with the nodes that it determines for each component based on the coordinates. It then condenses the netlist by making nodes connected with a wire considered one node. By conducting this process, we can integrate the different parts of our application more easily.

I have also been trying to work on getting the diode to work in my modified nodal analysis circuit simulator model. This is proving to be incredibly difficult, because I must iteratively solve the system of equations to arrive at a correct solution. I have been doing research on the Newton Raphson method and how to implement it successfully in my code with the diode model. I am still unsuccessful in this aspect. Since I have not gotten the diode to work, I am falling a little behind but I will work on this over Thanksgiving break to compensate.

I have run test circuits that I randomly create through my circuit simulator and through an existing web based simulator. In the web simulator, I have to drag and drop the components then click each node I want to measure. This works at a small scale but will be annoying when I am stress testing my simulator. Thus, I plan to run automated testing on LTspice where I will run netlists through my simulator and LTspice and compare the outputs. I will then compare the outputs of these simulators to ensure the accuracy requirement is met.

Team Status Report for 11/04/23

We are on schedule with our progress. This week we finished developing our subsystems so that we are ready for the demo next week. Stephen finished converting the Python proof of concept to C++ code, and has developed a functional example of the computer vision system that he will show during the presentation. Jaden was able to finish debugging the phone application and is now able to display the circuit components with coordinates with a sliding page model. Devan was able to correctly simulate circuits that contain voltage sources, current sources, and resistors. Therefore, we now have each individual subsystem working at a basic level to show for the demo next week.

For the coming weeks we plan to start integrating the subsystems. We expect integrating the phone application and the computer vision code to take time and involve debugging. Therefore, before making further advancements on each subsystem our priority is to integrate and test the subsystems as one system. It should not be too tough to integrate the simulator with the application because the simulator has been developed within the build environment for the application. This means we already know the code to simulate circuits can be built and run on an iOS device like we intended. We are currently on track with the schedule we have planned.

Devan Grover’s Status Report for 11/04/2023

I made a lot of really good progress this week. I spend lots of time over the course of this week trying to implement modified nodal analysis in C++ using the Eigen library. I was able to get nodal analysis to work for circuits that use resistors, independent current sources, and independent voltage sources. This means I can now take in a netlist, parse through the netlist, generate the required matrices to analyze the circuit, and finally analyze the circuit. The result of the circuit analysis gives me the voltage at each node and the current through each voltage source. With this information, I can then find the current going through every component.

I also wrote all this code within the environment of our mobile app, which means I know this code can compile for iOS. Although I have not written an Objective-C header to bridge the code between C++ and Swift and make my file interact with the main app, I can call my netlist analyze function and ensure it works. I am now going to try to model a diode for next week and get diodes working within the simulator: after some studying and research, I will likely have to use the Newton-Raphson method to find a solution to the circuit with a diode. I am on progress with the schedule and hope to successfully analyze circuits with diodes in them by the end of next week.

Team Status Report for 10/28/23

There have been no major changes this week. The system and schedule are still the same, however there were a couple problems with the phone application this week. There is a bug creating the pages to display the circuit and was not resolved due to the ethics assignment taking up a lot of time. The frontend components were created, however they are not displaying on the sliding page correctly given coordinates. This is not a significant risk as this bug should be resolved within a day, however if it continues to persist into next week we plan to implement a different way to display the images instead of a sliding page. This would most likely be individual pages rather than just one. Even with this bug no changes are made to the schedule because the phone application should be able to display full circuits by next week given coordinates. Everything else is still on track.

We also got some bugs when trying to port the python code over to C++ this week. Thus far, all of the computer vision algorithms have been written in Python. Since our application is an iOS application, we will need to switch it to C++ code to build for iOS. We also made some progress on the netlist parsing for the circuit simulator. We now have an algorithm to parse through the netlist and are trying to generate the matrices using the Eigen library we installed last week.