Skip to content

Alexander Rice's Notebook

Hayden Cook edited this page May 7, 2026 · 1 revision

Fall 2025

Week 4

Tasks:

  • 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.

Week 3

Tasks:

  • 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.

Week 2

Tasks:

  • 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

Week 1

Introduction for new members and welcoming back returning members.

Spring 2025

Week 4

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

Tasks

  • Improve python script

Week 3

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.

Tasks

  • Reinstall cosim and test results file
  • Fix bugs in circuit breaker behavior

Week 2

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.

Tasks

  • Set up meeting time for subteam
  • kickoff presentation

Week 1

1/6/2025-1/12/2024 Introduction to the cosimulation and how it works

2025

Week 15:

11/28/24-12/4/24 Happy Thanksgiving

Class Meeting

  • None

Team Meeting

  • 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.

Week 14:

11/21/24-11/27/24

Class Meeting

  • Final Presentation

Team Meeting

  • 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())

Week 13:

11/14/24-11/20/24

Class Meeting

  • I worked on the IPC using asyncio and got a simple client server request and response working.

Team Meeting

  • 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.

Week 12:

11/7/24-11/13/24

Class Meeting

  • Worked on fixing a bug with the federate not being created correctly

Team Meeting

  • Continue ongoing work

Week 11:

10/31/24-11/6/24 Happy Halloween

Class Meeting

  • 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

Team Meeting

  • Worked on device document and filled out a few sections that were left blank

Tasks

  • Begin HELICS integration with circuit breaker device

Week 10:

10/24/24-10/30/24

Class Meeting

  • 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

Team Meeting

  • Continue work on the bindings

Tasks

  • Fill out ROS team document for our devices

Week 9:

10/17/24-10/23/24

Class Meeting

  • Looked into DNP3 bindings and implementation in python
  • Went through DNP3 rust headers to see what was available

Team Meeting

  • Assigned tasks for next meeting. I am looking into timing intervals in the DNP3 rust and HELICS integration

Tasks

  • [] Time in rust DNP3 and HELICS

Week 8:

10/10/24-10/16/24

Class Meeting

  • Midterm Presentation

Team Meeting

  • 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.

Week 7:

10/3/24-10/9/24

Class Meeting

  • Worked on paper section
  • Gathered research on networking architecture and the data concentrator architecture for DNP3 59e30c5a80e1be2cec46c78a6f66a6d7abda72aa 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.

Team Meeting

  • Discussed paper
  • Using past paper
  • Adding onto networking section by taking out Modbus and expanding on DNP3

Tasks

  • Midterm Paper

Week 6:

9/26/24-10/2/24

Class Meeting

  • Met online due to weather
  • Continued research
  • Began discussing the paper

Team Meeting

  • 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)

Week 5:

9/19/24-9/25/24

Class Meeting

  • 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

Team Meeting

  • 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

Week 4:

9/12/24-9/18/24

Class Meeting

  • 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

Team Meeting

  • Added tasks to Trello board
  • Decided to split team meeting into monitoring, networking, and device modeling

Tasks

  • Research Substation Networking Structure

Notes

  • 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

Week 3:

9/5/24-9/11/24

Class Meeting

  • Joined and reviewed GitHub repo
  • Presented Kickoff presentation
  • Did some initial research on DNP3 protocol

Team Meeting

  • Talked about getting the simulation an development environment working on our own devices

Tasks

  • 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

Notes

  • I had some issues running nix initially which was fixed by reinstalling
  • Got an error when running ./run_example.sh to test the example bash:$'\r': command not found
    • Fixed by using the dos2unix command on the file (alternative command: sed -i 's/\r$//' filename)
  • DNP3 vs Modbus
    • DNP3 is faster, more efficient, and more secure (newer)
    • Modbus is easier to use and setup (older)

Week 2:

8/29/24-9/4/24

Class Meeting

  • 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

Team Meeting

  • 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

Tasks

  • Kickoff presentation: Networking Tasks & Goals Slides

Week 1:

8/22/24-8/28/24

Class Meeting

  • Missed the first class due to not feeling well, but I reviewed the introduction slides posted on Canvas
  • Did some preliminary research on GridLAB-D and HELICS
Active Notebooks
Archive
Tutorials

Clone this wiki locally