Repository navigation
Chungman Kim's NoteBook
Thanks giving week
[x] Using docker for NIX
Try to run Nix on the docker container but continuing having a problem.
c++: fatal error: Killed signal terminated program cc1plus
according to the community GitHub This is normal due to c compiler has insufficient memory. I relocated docker memory limit upto 8GB and set the make -j 1 flag so that no more parallel jobs overloading. However, it kept giving same error. My Mac only have 8GB so I think I don't have much solution other than changing the laptop...?
[x] Designed Simple Distribution Substation
This diagram represents a simple distribution substation modeled for co-simulation with GridLAB-D and basic protection & control logic. • The left side (GridModel) is the upstream grid model (transmission or higher-level distribution), implemented in GridLAB-D. • The middle is the substation, split into: • a power transformer bay (PT bay) with its protection and bay controller, and • a feeder bay (F1) with feeder protection and bay controller. • The right side shows the substation controller (RTU) and the control center (Master Station). • Solid arrows (-->) represent power flow / primary circuit. • Dashed arrows (-. ->) represent measurement, status, or control signals.
[x] Debugging for Nix
Continuing figure out the problem of NIX with my M2 MacBooK.
Look like I can able to install HELICS but the Gridlab-d. Also, Kaden's DNP is not correctly working on my NIX develop environment.
Reinstalled and reset up multiple times but not able to make any progress.
<img width="1660" height="1101" alt="Screenshot 2025-10-24 at 3 07 22 PM" src="https://github
.com/user-attachments/assets/0661cf2d-35b3-4c86-a414-446c8c0990bb" />
During the Friday's meeting, Kaden attempted to create Docker for nix.
After updated to MacOS26, Nix gave me another problem. Nix is currently installed but not running on the terminal.

I completely remove nix on my laptop and reinstalled.
After successful nix reinstallation, I followed new DNP3 guidelines WIKI
- having lots of error while
make all-install - got 3 log while running example.sh but giving error.
- Kaden will look over on Thursday
-
-
we found this is useful for the simple substation.
-
power transformer
disconnecting switch
Circuit breaker
air break switch ?
power line
During the meeting on Friday, Maria and Arya will concentrate on the DNP3 side, while I’ll focus on setting up the simple substation setup and utilizing GridLabD.
However, I have three midterms coming up this week, so I believe I need to prioritize studying.
Mid Presentation
- task [x] : Midterm paper
- Researched about PMU (phasor measurement unit)
Why does frequency exist?
- Traditional generators have a rotor (magnet/electromagnet) spinning inside a stator coil.
- As N/S poles sweep past the coils, magnetic flux changes periodically, inducing AC voltage (Faraday’s law).
- The number of oscillations per second is frequency (US: 60 Hz, Europe: 50 Hz).
- All grid resources must operate at the same frequency to remain synchronized.
- Supply–demand imbalance nudges generator speed → frequency deviates (key real-time signal).
- Relation to phase angle:
$$f = \frac{1}{2\pi} \frac{d\theta}{dt}$$ - Frequency is “how fast the phase angle changes.”
- Think of a 60 Hz AC voltage as a spinning arrow.
- The arrow’s length = how strong the voltage is (RMS size).
- The arrow’s direction (how far it’s turned) = the voltage angle (θ).
- Instead of drawing the full wavy sine curve in time, we just keep this one arrow
- Why do this? Because one arrow is much easier to compare and calculate with than a whole wavy line.
- It tells you how “early” or “late” that spinning arrow is compared to a reference.
- Example: 120 V ∠ −10° means “same 120 V strength, but it’s 10 degrees behind the reference.”
- What operators actually watch is the difference between two places: δ = θ₁ − θ₂
- Bigger δ → more active power tends to flow along the line between those places.
- If δ ≈ 0° (and the line is mostly inductive, voltages similar), very little active power flows.
-We must compare the same instant in time. -PMUs use GPS/PTP so clocks are synced; then we can compare arrows directly.
- Larger angle separation → larger voltage vector difference → more current → bigger in-phase component → larger P.
- Deploy PMUs at transmission substations to collect synchronized phasor data, then use corridor angle-difference, frequency, and residual-based checks to detect anomalies and isolate the bad measurement channel.
- set up the Co-simulation again
- Used Docker to run the official GridLAB-D image (gridlabd/master).
- Cloned the PNNL Taxonomy Feeders repository (standard U.S. distribution feeder models).
- Selected R1-12.47-1.glm as a test case.
STEP for run gradLAB-D in docker
-
Install Docker Desktop for Mac and sign in (docker login). In terminal type
docker pull gridlabd/masterdocker run --platform linux/amd64 -it --rm gridlabd/master gridlabd --version| Using --platform linux/amd64 silences the Apple-Silicon warning. -
Go to whatever your cosimulation folder in mine
cd /Users/chungmankim/Documents/GitHub/cps-cosimulation-env -
from there clone the feeder from git
git clone https://github.com/gridlab-d/Taxonomy_Feeders.git -
move into the Taxonomy_Feeders folder that you just cloned it
-
Pick a feeder (we’ll use R1-12.47-1.glm as an example).
-
now mount this feeder to docker
docker run --platform linux/amd64 -it --rm \ -v "$PWD:/models" -w /models \ gridlabd/master gridlabd R1-12.47-1.glm
- Had Kickoff presentation link
Device sub team set up 3 tasks for this week
- Inventory out current Device model : For me
- Find basic / broad outline of Substation architecture : All of our sub team
- Current research in industrial systems and network security : All of our sub team secure protocols
Task Board Link
Substation serve at least one of the following purpose
- Increase the voltage produced by Power generation, using step up transformer
- Interconnection of different power grids
- Reducing Voltage
- Coverting AC to DC
1. Transmission Substation link
2. Distribution Substation link
- Collector Substation
- Converter Substations
- Switching Station
TASK
- Final paper
During Team Meeting
- Device team will take introduction of final paper
During Class meeting
- DID final presentation.
Final Paper



TASK
- Final presentation
- API diagram
- Final paper
During Team Meeting
- Device team will take introduction
- I will make a diagram for API using draw.io
During Class meeting
- Maria and I talked about API. Since Maria researched and made a document for API , I will make a diagram for final ppt.
Technical Note Final Presentation
-
Master Station Role: Central controller/supervisory system. Communication: Receives measurements (INPUTs) from outstations and sends commands (OUTPUTs) to them over DNP3.
-
Outstation Role: A field device or gateway that interfaces with actual equipment (e.g., switchgear, circuit breakers, sensors). Communication: Sends measured data up to the master station (INPUT) and receives commands from the master (OUTPUT).
-
DNP3 Protocol Role: Main industrial protocol used for real-time, event-driven communication between the Master Station and field devices (Outstations). INPUT vs. OUTPUT: In DNP3 terminology, “INPUT” means the field device is sending data to the master (e.g., measured values, statuses). “OUTPUT” means the master is sending control commands to the device (e.g., open, close, setpoint changes).
-
IPC Protocol Role: Internal communication channel for configuration or non‑time‑critical data. For example, configuration updates or advanced diagnostics that do not require the guaranteed reliability or timing of DNP3.

TASK
- Learning DNP3 database structures
During Team Meeting
- I will keep research and learn about DNP3 data structures.
During Class meeting
- Sam gave us a lecture on the INPUT and OUTPUT of DNP3 structures. I understood that the INPUT is a signal from devices to the SCADA, and the OUTPUT is a command from the SCADA to the devices.
Technical Note
I have not done anything due to upcoming midterms but I will make diagram from the Device API that Maria already made.
According to Kaden's explanation, each outstation in a DNP3 system maintains a database which stores device data like voltage or current. This data is organized into points.
Components of Points
- index : identification
- value : measurement (e.g. 120volts)
- type : group
- variation : input, output , bits
- class: priorities
The Master nations sends periodic polls to request data by class. Higher the class -> frequent update.
TASK
- Learning DNP3 data structure
During Team Meeting Since Kaden shared the link to the documentation, Maria and I will begin reading it.
During Class meeting
- We’ve already implemented devices in the substation. Kaden suggested we begin integrating the DNP3 protocol into our substation. Our networking team is currently working on DNP3, while our device team will develop an API to integrate with DNP3. Based on Kaden’s research, we need to gather all information (data types, priorities, input/output) about each device.
Technical Note
Read through the document for DNP protocol from DataBase DNP3 Protocol Primer
Spring break
TASK
- Push our branch repo
- Read DNP3 document
During Team Meeting
- Since we have spring break next week, we skipped the meeting.
During Class meeting
- Kaden shared a document with us, and I’ll begin reviewing it now.
Technical Note
Maria and I finished all devices in the substation. Now, we will collaborate with Networking team and try to implement device API for the DNP3.
We will gather some more information at Device API
We will sort out what kind of information should be transferred in-between devices or through the network.
TASK
- Intrim presentation
During Team Meeting
- Device team will do Introduction of ppt.
Interim Presentation
Our device modeling team is on the track and almost finished modeling.

TASK
- Mid-term Paper
Technical Note
This week is for mid research paper due. So I focused on writing this.
Last semester, we implemented a transformer device within the process level station. During that time, we did not identify the voltage and current transformation but instead made a brief idea that the transformer changes the voltage up and down. However, in further study this semester, we discovered a significant difference between voltage transformers and current transformers. Therefore, we decided to divide these two transformers into a child class of 'transformer.py' so that we can select the appropriate transformer at the appropriate time.
There are several types of transformers, but we can categorize them into two main groups: voltage transformers and current transformers. Voltage transformers are the most common type of transformer, as they convert voltage levels. They are primarily used to transform voltage from the power generation source (such as thermal, nuclear, hydraulic, or wind energy) to substations and then distribute it to end users (businesses and individuals). The primary reason for using voltage transformers is to reduce energy waste. Over long distances from the power source to the end user, energy is likely to be lost during transmission. Therefore, it is more efficient to increase the voltage to send more energy while minimizing losses. On the other hand, at the distribution point, we need to maintain the correct voltage level to ensure that the end user can use the energy safely. This is why voltage transformers are essential.
We didn’t research the current transformer last semester, and We are interested in delving deeper into its mechanism. We’ll likely discuss the research we conducted in the next section.
Unlike a voltage transformer, a current transformer(CT) reduces the primary current in high-current equipment to a much lower, standardized secondary current (5A or 1A). This serves two primary purposes: accurate measurement for metering and reliable input for protection relay. Directly measuring the high currents found in substations would overload most devices, so the CT's magnetic coupling safely steps down the current and provides isolation from unsafely high voltages.
Just like Voltage transformer, CT also relies on the electromagnetic induction. the primary conductor passes through magnetic core, creating a magnetic field. The secondary winding, wrapped around the same core, picks up this magnetic field and carries a reduced current as determined by the ratio of turns between the primary and secondary.
\begin{figure}[ht] \centering \includegraphics[width=1\linewidth]{single.png} \caption{Mechanism of CTs} \label{fig:sensorDeviceParent} \end{figure}
The ratio of primary winding and secondary winding convert primary current inversely proportional to the secondary current. $$ Current_{secondary} = Current_{primary}*\frac{Ratio_{primary}}{Ratio_{Secondary}} $$
In most cases, a CT has a fixed ratio (like 600/5), but multi-ratio CTs also exist and allow selection of different ratios through secondary taps. This flexibility lets operators match the CT to varying current ranges without replacing the entire unit. However because a CT's produces high voltage if left open-circuited under load, it must always be connected to a proper 'SHORT' to ensure safe operation.
\begin{figure}[ht] \centering \includegraphics[width=1\linewidth]{Multi.png} \caption{Multi-ratio CTs} \label{fig:sensorDeviceParent} \end{figure}
For multi-ratio CTs, a single secondary winding with multiple tap points is used. By selecting which tap operator connects to the secondary terminals, the current ratio can be switched.
TASK
- Keep implementing Current Transformer
During Team Meeting
- We don't have much thing to share to other teams but keep working on the current task.
During Class meeting
- Maria and I talked about transformer and its Sensor because both devices are closely interacting each other.
Technical Note
Current Transformers (CTs) operate similarly to Voltage Transformers (VTs) based on the principle of magnetic field induction. Inducing a primary current into the core generates a secondary current that is induced in the primary winding and then transmitted to the secondary winding. Unlike VTs, CTs are designed to provide a small current to other measurement devices and have a fixed current value. Consequently, they do not require a tap changer for adjustment. However, I have discovered the existence of multi-ratio CTs, which operate similarly to tap changers. Notably, this multi-ratio mechanism is integrated into the CT, and the entire CT must be shut down before changing the ratio of the CTs. While the precise purpose of this feature remains unclear, I intend to conduct further research to gain a deeper understanding of its functionality.
To alter the ratio in multi-ratio CTs, the operator must first deactivate the transformer. Subsequently, either shorting the screw or joining the screw to the shorting bar can be performed to manually adjust the ratio.

TASK
- Start deeper research about Transformers
Technical Note
We have two type of transformer.
- Voltage
- Current
Since last semester's research was purely about voltage (general) transformer, I will focus on current transformers (CTs).
We know there is tap changer in voltage transformer to change the ratio during operation. However, while I researched about CTs, there is no such thing tap changer in CTs. I wonder there should be similar one that work as tap changer in CTs.
Jan 24 2025
TASK
- Kickoff presentation
Note
This week, we concluded our kickoff presentation. Our goal for the device sub-team is to complete at least five substation devices by the end of this semester. I will continue with the transformer sub-devices, as I completed the transfer device last semester. We will initiate research on these devices and discuss them in our class meetings.
NOVEMBER 14 - NOVEMBER 20
Working on Final presentation
NOVEMBER 07 - NOVEMBER 13
Made Class diagram
-We have made minor changes to the communication networking implementation. Instead of implementing for DNP3, Modbus, and IEC protocols, we will now hardcode DNP3 as the hierarchical outstation protocol.
OCTORBER 31 - NOVEMBER 06
-nothing much done due to midterms.
OCTORBER 24 - OCTORBER 30
Implemented tap's turning ratio in transformer_device.
The tap regulate the secondary voltage depending on Tap position/ which is turning ratio

OCTORBER 17 - OCTORBER 23
- Main focus and Task: 3-5 devices within a substation that we want to model. Include API for functionality we want each device to perform
- Since we do not have concrete models for substation. We start developing device models. We need to narrow down further in Thursday meeting however now we have
- Transformers
- Circuit breakers
- Busbars
- Disconnectors
- Protective Relays
- Capacitor banks and reactors
- Transmission Lines
- CTs and Pts
- SCADA
OCTORBER 10 - OCTORBER 16
Fall Break
OCTORBER 02 - OCTORBER 09
This week we have Mid-Term Progress Report

SEPTEMBER 26 - OCTORBER 02
This week I mainly focus on the midterm research paper.
SEPTEMBER 19 - SEPTEMBER 25
Here is DNP3 network model we need to design DNP3 Network model
- Master (SCADA)
-
Issue commands and receiving data from outstation
1-1. Data Polling and Event Handling Model
-
master stations can poll outstations for data or respond to event-driven messages
- Outstation
-
Outstation devices - send data back to the master
2-1. RTU (remote Terminal Unit)
-
a type of outstation that interfaces with sensors and transmits data such as voltage or temperature measurements to the master station.
2-2. IED (inteligent Electronic Device)
-
IEDs are specialized devices that both control and monitor equipment like circuit breakers, offering more complex functionalities than typical outstations.
- Communitcation Model
- communication between the master station and outstations (RTUs, IEDs)
- Found git repo for DNP3 modeling
https://github.com/VOLTTRON/dnp3-python/blob/main/examples/master.py
SEPTEMBER 19 - SEPTEMBER 25
- I haven't made much progress on the project due to academic overload, but I will get back to working on it after this wee's tests and assignments are done.
- My development environment isn't running properly after installing macOS Sequoia. I'll bring up the issue with the TA during Thursday's meeting
- The Ta discovered that the new macOS update caused a crash when trying to find nix develop in zsh. The TA also suggested I use Docker due to potential memory issues on my M2 MacBook. I'll follow up on the issue and address it later.
Upcoming Task
- Midterm paper due on October 10
SEPTEMBER 12 - SEPTEMBER 18
Meeting Note
- Will focus on DNP3 instead of MODBUS
- Made 3 tasks on Trello Board
- Network members take each task
- Research assigned task by Thursday
- team meeting will split into Monitor, Network, and Device modeling
Task
- Research Substation Networking Structure
- Study Python
Task Note
- Studied Python
Since the primary programming language I learned was Java, I spent time learning Python.
Referring to the Python Tutorial
- Researched about Substation Networking Structure
DNP3
Substation use DNP3 protocol to control system such as Supervisory Control and Data Acquisition (SCADA) systems
DNP3 enables communication b/t master station and substation and external devices
DNP3 has seven layers
- Physical Layer
- Data Link Layer
- Application Layer

References: openDNP3 , OpenDNP3 Code Archive
IEC 61850 Most modern substations follow the IEC 61850 standard
Here is Wiki about IEC 61850
- IEDs (Intelligent electronic Device): IEC61850 integrates IEDs through Ethernet-based communication.
- Process Bus : handles realtime data and measure from the field device such as *Voltages and Currents . This datas are transmitted to the IEDs.
- Station Bus : Manages communications b/t devices. Uses TCP/IP protocols to integrate w/ external systems and operators
- Parallel Redundancy Protocol (PRP) and High-availability Seamless Redundancy (HSR) : maintaining the substation's operation integrity (security).
Comparison to DNP3
- DNP3 is more commonly used for older communication system.
- Monitoring and Controlling -> DNP3
- Networking b/t device -> IEC 61850
- Can be hybrid
- Next Step
Find the way to integrate DNP3 with Python
SEPTEMBER 05 - SEPTEMBER 11
Class Meeting
- Presented the kickoff presentation
- Invited to the GitHub repo for our project and joined
Team meeting
- Team discussed the installation of developing tools and environment set up (co-simulation, Helics, gridlab-d)
TASK
- Set up developing environment via reading
- Review the documentations on Github (especially README)
- Start writing NOTEBOOK on GitHub wiki
Challenges
- Went though the installation steps in the README of the GitHub repo (co-simulation) However, not sure if the installation was successful. There were error , but seemed to complete somehow
Potential Solutions : I will confirm that all necessary components are installed correctly in the next class meeting.
- To build gridlab-d, CMAKE installation is necessary but MacOS doesn't support raw CMAKE.
Solution : Installed CMAKE through the Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
AUGEST 29 - SEPTEMBER 4
Class meeting
- During this week, we were divided into sub-teams. I chose to join the Device Modeling team.
- Set up a sub team meeting time: every Sunday at 15:30. This will help our communication.
- We have to present the kickoff presentation at the next class meeting. We will discuss further about this topic at upcoming sub team meeting and prepare the contents.
Team meeting
- Brainstormed the key points to cover in the presentation.
- Tasks were delegated to each members
TASK
- Prepare for the kickoff presentation: Road map slide.
HERE is copy of the kickoff PPT
AUGEST 22- AUGUEST 28
Class meeting
- Attended the introduction meeting for the VIP project. The instructor provided an overview of the project goals and expectation for the semester.
- Jointed the project Discord server to communicate with team member and get updated on upcoming tasks.
Next Step
- Start familiarizing myself with the project materials (cosimulation, Helics, gridlab-d).
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
