Date of Thesis
Summer 2026
Description
This thesis began with a simple idea: to restore the control system of a smart residential microgrid to respond intelligently to electricity prices while remaining safe, reliable, and practical on low-cost hardware. At the start, the goal was to design an economically aware microgrid that could look at electricity prices from the PJM market and make better operational decisions than traditional rule-based control. The motivation was straightforward. As residential renewable energy adoption increases, microgrids are expected to do more than just supply power. They are expected to respond to price volatility, integrate renewable generation, and operate reliably using embedded controllers that are affordable and widely deployable (see Chapter 1).
The project was initially framed as an intelligent control problem. The idea was to use artificial intelligence (AI), specifically artificial neural networks (ANN), to predict short-term electricity prices and then use those predictions to guide microgrid dispatch decisions. This approach appeared attractive because PJM electricity prices exhibit strong hourly volatility, creating opportunities for cost savings if a system can respond proactively rather than reactively (see Chapter 2). However, very early in the work, it became clear that the problem was not just about control or optimization. It was about infrastructure, data availability, system reliability, and engineering constraints that are often hidden in high-level designs (see Chapter 3).
This thesis is built around the restoration and modernization of a legacy smart residential microgrid originally commissioned in 2015. Before any intelligent control could be attempted, the system itself had to be brought back to a reliable operational state. Much of the early work focused on restoring data acquisition, replacing broken cloud dependencies, re-establishing local sensing, and ensuring continuous logging of electrical and environmental data. A Raspberry Pi 4 was adopted as the primary controller, paired with an AcuRev smart power meter to log voltage, current, power, power factor, and frequency at five-minute intervals. Over time, a stable and reliable data pipeline was achieved, with over 99% local logging uptime and over 93% successful cloud uploads during continuous operation. This restoration phase fundamentally reshaped the thesis. What was originally envisioned as a control-centric project became a cyber-physical systems (CPS) study grounded in real operational behavior rather than simulation (see Chapter 3).
With a functioning system in place, the work progressed toward intelligent decision making. Because PJM real-time (RT) prices are only published after the fact, the first challenge was prediction. This led to the development of Layer 1 of a two-layer ANN framework. Layer 1 was designed to predict the next hour of PJM RT Locational Marginal Price (LMP) using historical market data and time-based features. The model demonstrated strong performance, explaining approximately 92% of the variation in RT prices and outperforming simple persistence-based forecasts by a wide margin. This result confirmed that short-term price prediction is feasible using publicly available PJM data and modest computational resources (see Chapter 4).
The success of price prediction motivated the second phase of the project: intelligent load control. Layer 2 of the framework was designed to combine predicted electricity prices with RT electrical measurements to determine operational control modes such as normal operation, load management, pre-cooling or pre-heating, and islanded operation. The control logic was intentionally designed to be interpretable, reflecting realistic operating decisions rather than opaque black-box outputs. Training and validation used real microgrid data collected over multiple months of continuous operation (see Chapter 4).
At this stage, the project delivered mixed but important results. Economically, the AI-based dispatch strategy consistently outperformed a traditional rule-based baseline, achieving measurable additional cost savings. While the absolute dollar savings were modest for a single residential system, the relative improvement demonstrated that AI can identify marginal opportunities that fixed thresholds miss. From a purely economic perspective, the intelligent controller worked (see Chapter 4).
However, the most important insight of this thesis emerged when economic performance was evaluated alongside system stability. When the AI-based controller was allowed to operate without explicit safety constraints, it introduced voltage violations that were not present under the original rule-based system. Although the controller saved more money, it did so at the cost of violating acceptable voltage limits, which is unacceptable for real deployment. This finding fundamentally changed the direction and conclusions of the work (see Chapter 4).
The key lesson is simple but critical: safety cannot be learned implicitly. It must be enforced. While the neural network learned economic patterns effectively, it did not inherently respect voltage stability constraints unless those constraints were explicitly encoded. This result highlights a core limitation of unconstrained AI control in power systems. Optimizing for cost alone is not sufficient, and in some cases, it is dangerous. Engineering judgment, standards, and protective logic remain essential (see Chapter 4).
As a result, the thesis does not argue for fully autonomous AI control. Instead, it supports a hybrid control philosophy: Predict, Decide, Protect. The results demonstrate that, under the current training formulation, the ANN does not inherently learn safety constraints, motivating the use of this hybrid control framework. In this framework, AI is used for economic optimization and forecasting, while rule-based protections are proposed to enforce voltage and frequency limits and ensure safe operation. This approach combines data-driven intelligence with rule-based protection, while highlighting the need for future work in constraint-aware learning (see Chapter 4). It is important to note that the protection layer is not implemented in the current system but is proposed based on the observed limitations of unconstrained ANN control (see Chapter 5).
Beyond technical results, this work also has strong educational and industry relevance. The microgrid served as a real instructional platform where students worked with authentic data, imperfect systems, and real engineering trade-offs. The project exposed challenges that are often ignored in idealized studies, including limited historical data availability from PJM APIs, seasonal data gaps, uncertainty and limited accuracy in short-term weather forecasts used for prediction, embedded hardware constraints, and the difficulty of balancing cost savings with reliability and system stability. These challenges are not failures of the project; they are the main contributions (see Chapter 3).
In its current state, the system is not ready for fully autonomous deployment. Key work remains, including enforcing hard safety constraints, collecting years of seasonal data, improving performance during extreme price events, and validating the approach across different operating conditions. However, the foundation is solid. The data pipeline works. The models work. The limitations are well understood (see Chapter 5).
This thesis ultimately documents a journey rather than a single result. It began as an attempt to build an intelligent controller and evolved into a deeper study of what it actually takes to make AI-assisted microgrid control realistic, safe, and deployable. By combining system restoration, data integrity, ML, and engineering judgment, this work provides a grounded perspective on intelligent residential microgrids and offers a clear direction for future research and deployment (see Chapter 5).
Keywords
Smart Residential Microgrid, Artificial Neural Networks, Energy Management System, Raspberry Pi, Locational Marginal Pricing, Artificial Intelligence
Access Type
Masters Thesis
Degree Type
Master of Science in Electrical Engineering
Major
Electrical Engineering
First Advisor
Peter Mark Jansson
Second Advisor
Rich Kozick
Third Advisor
Stewart Thomas
Recommended Citation
Nyoyoko, Anthony, "Control System Emendation and AI-Driven Optimization for Enhancing a Smart Residential Microgrid" (2026). Master’s Theses. 315.
https://digitalcommons.bucknell.edu/masters_theses/315
Included in
Controls and Control Theory Commons, Other Electrical and Computer Engineering Commons, Power and Energy Commons
