eSim on Cloud
Getting Shortlisted
To get shortlisted for the FOSSEE Fellowship 2023, you need to complete at least one of the screening tasks given below and demonstrate a working software without breaking the existing functionality. The selection will be purely based on the evaluation criteria. Also note, you are allowed to use only open source libraries/technologies and attribute them appropriately in your project based on the license. In case a particular technology is already adopted in the platform, you will need to use the same and extend/modify the existing one.
Note:
You are required to have software skill sets mentioned under Technical skills given below.
Before attempting any task please discuss your ideas/approach with us on the Discord channel https://discord.gg/cZbDD8K
Please do NOT attempt the screening tasks that are marked in red and having a caption 'Do not attempt'.
Technical Skills
Django and REST framework
API-based design
Celery and Redis
Python
MySQL
React (front-end)
MxGraph Drawing library
ngspice simulator (http://ngspice.sourceforge.net/)
Chartjs (https://www.chartjs.org/)
Evaluation criteria
Usage of skills in locating the bugs
Clear design and documentation
API-based approach
Clear separation of backend and frontend
Coding style
Inclusion of Unit test cases
Reusable code
How to contribute your screening tasks?
Fork the repository so that you have your own repository in which you can work on.
Create a new branch (feature or bugfix) from the Develop branch and work on the newly created branch only of your repository. This way if we make some changes to the Develop branch in our repo, you can upstream it at anytime for maintaining the updated codebase.
We recommend that you regularly push your code to git. If you are new to git, please refer to the tutorial link given below: (https://spoken-tutorial.org/tutorial-search/?search_foss=Git&search_language=English)
Once you are done with the project do the following:
Create a file, 'SUMMARY.md' and write a summary of how did you approach the problem, what steps you took to solve, any new package/technology that you used, indicate which files were changed heavily. Make a note of the SUMMARY.md URL.
Record a demo by creating either a video, screencast or animated gif of your work and include it in the SUMMARY.md file
Tag a release on GitHub. Note down the release URL.
Finally, fill in the respective Google Form to submit the URL of your SUMMARY.md and the tagged release. The tagged release URL would be similar to: https://github.com/<your username>/<your project name>/releases/tag/v1.3
Getting Started
Before going through the tasks, it is recommended to install the system on your computer.
Min configuration for installation: Intel i3-9th generation, 8GB RAM, 10GB free space.
Installation steps (GitHub): https://github.com/frg-fossee/eSim-Cloud#installation
Screening Tasks -- 2023
Task 0: Supporting sub-circuits
eSim on Cloud has a facility to drag and drop components on the workspace (schematic editor), connect them using wires and save it as a circuit. In this task, we intend to create a new component by using the existing components and store it as a single new component. To elaborate, a user should be able to (a) draw a circuit, (b) save the entire circuit as a component instead of a circuit, and (c) provide a name to the component. This component should be saved as an SVG and can have a basic rectangular/square shape along with the input and output pins as desired. It should then be visible in the left pane of the schematic editor under a section 'MyComponents', which should then be usable (dragged and dropped) onto the schematic editor in a new circuit that one wishes to draw. The new circuit when simulated should be simulated correctly considering the new component along with other components. To conclude each user should be able to create N number of components which should be available for use to that user only. https://www.youtube.com/watch?v=Cl28e0UGaqE
https://docs.google.com/document/d/11twf5af62gW4Z-8BC2K1BEur9GCBEQYxg1SgJhz1bxA/edit?pli=1
Task 1: Auto Layout of Wires
eSim on Cloud has a facility to drag and drop components on the workspace and connect them using wires. However, a user can connect them in any arbitrary fashion and the entire circuit may look messed up. There needs to be a facility such that these wires are auto arranged/organized/re-drawn to make the circuit more presentable. The paper given below showcases an approach on how the layout can be updated automatically. In this screening task, you need to study the algorithm used in this paper and implement it in the React frontend using mxgraph for the eSim on Cloud.
https://www.researchgate.net/publication/307904840_Automatic_Layout_of_ScilabXcos_Diagrams
This auto layout feature has already been implemented in another system ‘Arduino on Cloud’, which is implemented in Angular and Raphael. Click on the link given below to view the implementation details.
Task 2: Supporting Simulation Analysis
eSim on Cloud supports the following types of simulation modes
DC Solver
DC Sweep
Transient Analysis
AC Analysis
Transfer Function Analysis
Noise Analysis
Support for the following simulation modes needs to be added
Sensitive Analysis
Pole-Zero Analysis
Small Signal Distortion Analysis
In this screening task you are required to attempt and implement any two simulation modes. Create a separate branch from the latest develop branch on your forked GitHub repository for each simulation mode that you implement. Refer to the ngspice manual for more details.
http://ngspice.sourceforge.net/docs/ngspice-36-manual.pdf
You may also need to refer to the following book for the required spice netlist: The Spice Book by Andrei Vladimirescu, Edition: 2, Wiley, 2019
Task 3: Drawing Circuits
In this task, you need to draw and submit any 5 circuits from the link given below
https://esim.fossee.in/circuit-simulation-project/completed-circuits
Steps for drawing and submitting
Navigate to the link and click on the desired Circuit Simulation Project
A new page will open up. You will find 2 links, 1) Download Abstract, 2) Download Circuit Simulation
Click ‘Download Abstract’
This will be a pdf/doc/txt file containing information about the circuit. Study the circuit and figure out how to simulate it
Click ‘Download Circuit Simulation’
A .zip/tar file will get downloaded. Extract it and navigate to the extracted directory
Locate the folder which contains .pro file i.e. KiCad project file. You may need to extract other zip/tar files in the directory as well.
Open the .pro file using KiCad
The KiCad project will open up. In the left pane, double click on the <filename>.sch file
The circuit will be displayed
Go to simulation.iitbx.in
Signup
Click ‘Launch’ for ‘eSim on Cloud’
Click ‘New user? Sign up’. Do not use Google Signup as we have disabled it.
Enter username, email, and password, and click the ‘Signup’ button
A verification email will be sent. Click on the verification link to activate your account
Login with your username and password.
Click ‘Schematic Editor’ or ‘Editor’ in the header or click https://simulation.iitbx.in/eda/#/editor to directly go to the editor
Write the name of the circuit i.e. the title present in the column ‘Circuit Simulation Project’ present in https://esim.fossee.in/circuit-simulation-project/completed-circuits and click tahe ‘Save’ button. Draw the circuit that you see in KiCad and save regularly.
Once you finish creating a circuit ensure that it is saved.
Simulate it
Click the right most button in the menubar ‘Create Project’
Version: Select the latest version from the dropdown
Title: Same as the name of the circuit
Description: You can take from the pdf file that you downloaded.
Procedure: Write it in your own words
Observation: Write it in your own words
Conclusion: Write it in your own words
Simulation Parameters: Select the simulation mode from the dropdown and provide appropriate parameters based on the mode.
Click ‘Create Project’
Under the section ‘Change Status’, select the dropdown that has value ‘draft’ and change to ‘Review’
Scroll up and click ‘Update Project’ located in the top right corner.
Click 'Preview' located in the top right corner and note the URL.
Follow these steps for drawing 5 circuits and submit the 5 URLs by clicking 'Click here to Submit Task 3'.
Screening Tasks of 2021
Task: Adding Parameters to Components
Please do not attempt this task. It has already been addressed.
The existing system has the functionality to drag-and-drop circuit components on the Schematic Editor. The user generally has to give component parameters to each of the components and proceed with wiring and then simulating the whole circuitry. To use this functionality, after installing and running the system, open the web browser, and navigate to the project URL (localhost). Click 'Launch' for eSim on Cloud and then click on ‘Schematic Editor’ to open it. The provision for adding parameters is not for all the components. They have been added for some. The task here is to:
Add the parameters for the remaining components. You may refer to Table 2.1, page 46 of the ngspice manual located at
http://ngspice.sourceforge.net/docs/ngspice-31-manual.pdf to identify such parameters for all the other components.
Implement functionality in the generation of netlist where such parameters get added automatically.
The js file in which these parameters are added is present in the front-end code of folder eda-frontend in a file ComponentParametersData.js This sub-task is to move the file at the backend and use API mechanism already present in the system to read such component parameters in the front-end.
Task: Simulator Display Output
Please do not attempt this task. It has already been addressed.
The existing system has a facility of Spice Simulator which allows the user to simulate by writing a netlist in the code editor. The simulation output is either a table containing values or a graph. To use this facility, after installing and running the system, open the web browser, and navigate to the project URL (localhost). Click 'Launch' for eSim on Cloud > 'Simulator' located at the top right. The standalone simulator opens up. This takes ngspice files as input (write in the textbox) and allows you to simulate.
There are cases where the output of the web simulator and that of the standard desktop ngspice output does not match. We have put in a few cases here in this google sheet for your quick reference:https://docs.google.com/spreadsheets/d/1GQFVc7fdoBsDask6zmBLO4RT60gCF1vi375vYlZ8rDU/edit?usp=sharing
You will observe the difference in the output as put in the above Google sheet. Before entering the circuit files you will have to replace the plot with the print statement, as shown in the Google sheet.
The task here is to:
Correct the output so that the exact behavior of the circuit is depicted.
Even the scales are not exact as you would see on the desktop version. You would need to address this issue too.
Another trivial improvement that can be done is to make the simulator work by the plot statement, without requiring the print statement.
Provide a facility to download the graph data in tabular (CSV) format
Hint: You will have to locate the backend python code responsible for this behavior.
Task: LTI Support for the System
Please do not attempt this task. It has already been addressed.
Learning Tools Interoperability, also known as LTI, is a way in which an LMS (learning management system like edX, Moodle, Canvas, Blackboard, etc. addressed as LTI Consumer) communicates with external tools/systems/utilities, addressed as LTI Producer (eSim on Cloud). To a normal user, it appears as if the external tool is embedded into the LMS in a frame.
LTI Consumer: The instructor adds the LTI tool (resource, in our case a circuit) into the LMS using the LMS tool and enters information like secret, key, and URL. When the students view the resource i.e. a circuit, the LMS uses the secret, key, and URL to activate the resource such that the resource can be viewed by the students in a remote tool/iframe.
LTI Producer: The external tool, in this case, eSim on Cloud, receives the request containing information like a secret, key, URL, user identity, course information, etc. This is communicated via HTTP using OAuth to ensure the security of the data that is sent. The external tool then renders the resource to the requested user.
In this task, you need to add LTI support to the existing eSim on Cloud application in the manner described above.
Links for Reference
Task: Circuit Publishing Workflow
Please do not attempt this task. It has already been addressed.
The users in the existing system do not have any roles assigned to them. They are allowed to create a circuit and share the link. Hence, the circuit is visible only to the user or to only those who have the link. There is no facility to collate circuits at one place for everyone to see. The task is to do the following:
Provide a facility to configure roles in the system. Some example roles are contributor, reviewer. Each user should be associated with a particular role. The roles and the association with the user should be configurable by the system admin, i.e. there should be a facility to add, edit, and delete roles.
Provide a configurable workflow such that a circuit moves from state 1 to state N; where State 1 denotes that the circuit is visible only to the user while State N denotes that the circuit is visible to everyone. Consider an example where the states are: Draft, Ready for review, and Published and roles are contributor and reviewer. A contributor, when creating a circuit, it goes in the Draft state. To convey/notify the reviewers that he/she would like to publish, the state is changed to Ready for review. At this state, the reviewer reviews the circuit and changes the state to either Draft i.e. the reviewer does not approve the circuit or Published depending on the quality and a facility to comment back. So, there should be a facility to add, edit, delete states, and define the transitions i.e. to configure which state is accessible by which user.
Given below is just a sample. To reiterate, the roles, states, and the workflow, all should be configurable. Also note that, when the reviewer creates a circuit, he is considered as a Contributor and thus, the reviewer for that circuit must be some other reviewer other than the one who created it.
In the draft mode above, the circuits are not visible or published in the public domain. There could also be a mechanism to view all the circuits in various states i.e. all states visible to the public. Such a switch could be set by an authorized user of the system, say admin. The users should then be able to search based on the state and then copy, re-use, modify the circuitry. The number of draft and inactive circuitry (not used for long) can be further hidden by authorized users (admin) to improve the overall search experience.
Task: Upload category and components
Please do not attempt this task. It has already been addressed.
This system uses the kicad symbols. The kicad categories and its components are available in the .lib and .dcm files at https://github.com/KiCad/kicad-symbols. These files are currently stored in our system in the esim-cloud-backend/kicad-symbol directory, which are then parsed and integrated into our system while building the system using docker. Each time a new library needs to be added, the process of adding .lib and .dcm files to the directory and building the system is required which causes the system to go down for a certain amount of time. Hence, there should be a facility for (a) an admin and (b) an authenticated user to upload the required (.lib and .dcm) files and process them at the backend such that they are integrated into our system without having the need of restarting/building the system. So, whenever this facility is used by the admin, the libraries get added into our system as a default list of libraries such that they are available to all users of the system. On the other hand, if an authenticated user uses this facility then that library will be available only to that user.
Task: My favourite/Pinned components
Please do not attempt this task. It has already been addressed.
In the schematic editor, the left pane displays the different categories of the components and on expansion, it displays the different components belonging to that category. In order for the user to drag and drop components onto the schematic grid, one would need to know the category of the component and scroll through the component list once the category is expanded. It is time-consuming and tedious. Hence, there should be a facility to pin or add certain components as ‘favorites’ which can then be displayed under a category called ‘My favorite components’.
Task: Simulation version history and compare simulation results
Please do not attempt this task. It has already been addressed.
Once the circuit is ready for simulation, the user enters the simulation parameters if any and simulates the circuit. Next time, the user changes the simulation parameters and again simulates the same circuit. However, currently, the user is unable to compare these simulation results. Hence, there should be a facility to store versions of each simulation (based on the simulation type), view and compare them. There should also be a facility for the user to download the graph as a CSV file and as a png file.
Task: Circuit version history and facility to revert to a particular version
Please do not attempt this task. It has already been addressed.
On eSim on Cloud, a general scenario is that a user creates a circuit, saves it, and keeps on making changes (adds and removes components, connects or disconnects them, sets parameters, etc.). There should be a facility to maintain versions of changes made to a saved circuit along with a facility to view the version and to revert back to a particular version. A version should be created every time a user saves the circuit.
GitHub: https://github.com/frg-fossee/eSim-Cloud
Chat with us (Discord): https://discord.gg/cZbDD8K
Email: frg.cloud.simulation@gmail.com