Repository navigation
Alexander Rice's Notebook
- Learn more about Python free threading
- I’m trying to look more into the back-trace of the SIGSEV error. Its a problem with the Py_BEGIN_CRITICAL_SECTION() call and I can't tell if the error is from improper usage or something else with free threaded python.
- Get qemu environment setup for c_api example
- We presented the Kickoff presentation.
- In the sub-team meeting I decided to try to look into the free threading with Kaden and Bermet.
- Kickoff Presentation
- In the subteam meeting we divided up slides. I am working on the HELICS integration slide which is fairly similar to where the final presentation from last semester left off.
- Found a pdf for designing substations. It is outdated, but gives a lot of basics.
- Need to look more into simulation of substations. I’ve seen a lot of examples of the IEEE 4 node system in gridlabd, but gridlabd doesn’t
Introduction for new members and welcoming back returning members.
1/27/2025-2/2/2025 Working on a python script to create the JSON Files. So far the program creates a correctly formatted JSON file and allows you to pull publications from other files found in src (I need to add in the distribution and transmission files as well). The mapping from publications to subscriptions is a little weird and does not allow custom input and needs to be made more flexible for the different types of subscriptions. Python Script
- Improve python script
1/20/2025-1/26/2025 Presented the kickoff presentations. Both teams seem to have a clear grasp on their goals and hopefully we will begin integration with the ROS/HELICS subteam soon.
Currently working some persisting bugs where there is some odd behavior in the passing of the helics information (i.e. circuit breaker trip does not change the outputting voltage sometimes) and the result files are not being created correctly with a File Not Found error popping up (current fix just throws results into /dev/null). I will try reinstalling my cosim to see if the issue lies in the file structure.
- Reinstall cosim and test results file
- Fix bugs in circuit breaker behavior
1/14/2025-1/19/2025 Covered more details on the cosim and began working on kickoff presentation. I added my part of the helics integration to the networking tasks slide.
- Set up meeting time for subteam
- kickoff presentation
1/6/2025-1/12/2024 Introduction to the cosimulation and how it works
11/28/24-12/4/24 Happy Thanksgiving
- None
- Divided up work for the paper
- Decided to let whoever was not at the meeting add whatever they need to add to the paper on their own This was my section of the final paper: We are using HELICS to model our substation and each device is simulated with a python script. The devices will use publishers and subscriptions to pass values between devices with the networking being simulated by inter-process communication (IPC) as a serial networking solution and DNP3 as the main communication method within the substation. Each device in the substation is simulated as a federate where it can pass signals within HELICS. The process level communication will utilize the IPC and a library like asyncio within python will be used. Some considerations for this approach is that scalability may eventually call for the device simulation to be done mainly in python and the setup and configuration of devices is tedious and error prone.
11/21/24-11/27/24
- Final Presentation
- None
import asyncio
async def handle_fetch(reader, writer):
addr = writer.get_extra_info('peername')
data = 200
print(f' Send: {data!r}')
writer.write(bytes([data]))
await writer.drain()
print("Close the connection")
writer.close()
await writer.wait_closed()
async def main():
server = await asyncio.start_server(
handle_fetch, '127.0.0.1', 8888)
addrs = ',
.join(str(sock.getsockname()) for sock in server.sockets)
print (f' Serving on (addrs}')
async with server:
await server.serve_forever()
asyncio.run(main())
import asyncio
async def tcp_fetch_client():
reader, writer = await asyncio.open_connection(
'127.0.0.1', 8888)
data = await reader.read(100)
message = int.from_bytes (data, "big")
addr = writer.get_extra_info('peername')
print (f"Received {message!r} from {addr!r}")
print('Close the connection')
writer.close()
await writer.wait_closed()
asyncio.run(tcp_fetch_client())
11/14/24-11/20/24
- I worked on the IPC using asyncio and got a simple client server request and response working.
- Discussed final presentation
HELICS Integration I worked on integrating HELICS into the simulation and getting a working simulation. I am using the simple_gridlabd_example as a starting point. Each device is simulated as a federate within HELICS. The setup uses a shell script that creates all the result files and runs each section and script accordingly. The heavy lifting gets done in the python scripts where the inputs and outputs are passed and processed.
11/7/24-11/13/24
- Worked on fixing a bug with the federate not being created correctly
- Continue ongoing work
10/31/24-11/6/24 Happy Halloween
- Discussed which devices need to be worked on: Transformer, Switchgear, and Circuit Breaker
- I am working on the circuit breaker and trying to integrate it with HELICS
- Worked on device document and filled out a few sections that were left blank
- Begin HELICS integration with circuit breaker device
10/24/24-10/30/24
- Looked into where DNP3 rust gets the time from
- It gets time from the system time
- The system time call come from a function in rust that would have to be changed
- There is not a direct way to input the time from HELICS
- Continue work on the bindings
- Fill out ROS team document for our devices
10/17/24-10/23/24
- Looked into DNP3 bindings and implementation in python
- Went through DNP3 rust headers to see what was available
- Assigned tasks for next meeting. I am looking into timing intervals in the DNP3 rust and HELICS integration
- [] Time in rust DNP3 and HELICS
10/10/24-10/16/24
- Midterm Presentation
- Looked at previous devious model made by Xin Zhao to see what needs to be added.
- For the network there are two options: go w/ DNP3 and hardcode it fully or generalize everything and make it more flexible for the future. Adam and Kaden are working on the bindings and getting a python script working.
10/3/24-10/9/24
- Worked on paper section
- Gathered research on networking architecture and the data concentrator architecture for DNP3
My section:
As DNP3 is easier to work with while maintaining efficiency and integrity and it is highly prevalent in North America, it is the main protocol used in our co-simulation. DNP3 is based around master stations and outstations that can be configured into different architectures depending on the needs of the SCADA system. These architectures include one-on-one, multi-drop, hierarchal, and data concentrator. The one-on-one architecture is a simple connection between one master station and one out station, multi-drop uses multiple outstation communicating with a single master, hierarchal integrates a sub master station (sub-master) between the main master and the outstation, and the data concentrator is a hierarchal model with multiple outstations connected to the sub-master. The best architecture for our purposes is be the data concentrator as it provides the flexibility of the hierarchical structure while allowing for multiple outstations.
- Discussed paper
- Using past paper
- Adding onto networking section by taking out Modbus and expanding on DNP3
- Midterm Paper
9/26/24-10/2/24
- Met online due to weather
- Continued research
- Began discussing the paper
- I missed the meeting because I had to work, but we began writing the paper and assigning sections (I am working on the substation networking architecture section)
9/19/24-9/25/24
- Shared my research on substation networking architecture and we decided to use DNP3 as it is easier to work with and IEC61850 could be implemented later or even used as a comparison protocol
- Kaden shared his work on the python bindings for the new DNP3 library we are using
- Began discussing what we could do with the DNP3 api available to use through the library we are using
- Kaden created an example DNP3 repo that I was able to get working on my own computer by following his README
9/12/24-9/18/24
- Assisted in getting the simulation up and running
- Discussed the nature of the networking side of the project
- We decided to focus on DNP3 rather than juggling it and Modbus as DNP3 is more efficient and reliable despite being harder to work with
- Created Trello board for our sub team
- I Decided to research networking structure of substations
- Added tasks to Trello board
- Decided to split team meeting into monitoring, networking, and device modeling
- Research Substation Networking Structure
- Found another newer standard for substations called IEC61850 which is mainly found in Europe while DNP3 is predominately in North America
- IEC61850 is a more robust standard that allows for more complex data to be transferred and greater operability on the Human Machine Interface side of the network
- Possibly integrate IEC61850 into DNP3? Substation Networking Research.pdf
9/5/24-9/11/24
- Joined and reviewed GitHub repo
- Presented Kickoff presentation
- Did some initial research on DNP3 protocol
- Talked about getting the simulation an development environment working on our own devices
- Run simulation by following setup instructions in the README on GitHub repo (used WSL as I am on Windows)
- Review past notebooks in wiki section of GitHub repo
- Setup my own notebook in GitHub
- I had some issues running nix initially which was fixed by reinstalling
- Got an error when running
./run_example.shto test the examplebash:$'\r': command not found- Fixed by using the
dos2unixcommand on the file (alternative command:sed -i 's/\r$//' filename)
- Fixed by using the
- DNP3 vs Modbus
- DNP3 is faster, more efficient, and more secure (newer)
- Modbus is easier to use and setup (older)
8/29/24-9/4/24
- Went more in depth on the co-simulation and how to use it
- I chose to join the device modeling team with a focus on networking
- Our sub team decided to meet every Sunday at 3:30 pm *Kickoff presentation is next week
- Reviewed the rubric
- Reviewed final presentation from last year as a basis
- Discussed overarching goals of sub team based off the last semester's final presentation
- Main goal to find and integrate a networking structure into the co-simulation (testing and security later)
- Assigned slides to each member
- Kickoff presentation: Networking Tasks & Goals Slides
8/22/24-8/28/24
Active Notebooks
- Aditi Kulkarni's Notebook
- Aly Aadil Salewala's Notebook
- Carter Pattison's Notebook
- Christopher Gossmann's Notebook
- Esha Pansara's Notebook
- Estelle Jung's Notebook
- Favour Adekola's Notebook
- Galadriel Cho's Notebook
- Prisha Baravkar's Notebook
- Rishika Vunnama's Notebook
- Ryosuke Shibuya's notebook
- Txaber Trevino's Notebook
- Zeus Banda's Notebook
Archive
- Adam McAndrews Notebook
- Albert Nguyen Notebook
- Alexander Rice's Notebook
- Amani Bedwa's Notebook
- Aparupa Brahma's Notebook
- Arya Gujarathi's Notebook
- Bermet Talantbekova's Notebook
- Calvin Rioux's Notebook
- Christina Shih Notebook
- Chungman Kim's NoteBook
- Connor McCary's Notebook
- Dhruv Patels Virtual Notebook
- Elliot Kantor's Notebook
- Ethan Lee Notebook
- Filippos Notebook
- Gweneth Smith's Notebook
- Hubert Pan's Notebook
- Hussein Rmaile Notebook
- Isabella Jemal's Notebook
- Joseph Masson's Notebook
- Jude Karaki Notebook
- Kaden McCartney's Notebook
- Maria Cymbalyuk's Notebook
- Natalie Ajemian's Notebook
- Nguyen Nguyen's Notebook
- Nicholas Reed's NoteBook
- Piper Wright's Notebook
- Quintin's notebook
- Rahil's Notebook
- Raj Patel Notebook
- Reva Hajarnis Notebook
- Rick Berglund's Notebook
- Rossy's Notebook
- Sabina Sokol's Notebook
- Safiy Malik Notebook
- Sam Ling's Notebook
- Sam Litchfield Example Notebook
- Shrayes Upadhyayula Notebook
- Soyoung Moon's Notebook
- Suraj Shekar Notebook
- Vidur Modgil's Notebook
- Xin Zhao Notebook
- Xinyan(Rose) Jiang's Notebook
- Zaeem Ahmad Notebook