[Blog #4] Final Blog Post

Final Blog Post

Part One: Research Abstract

a. Introduction

During the course of my internship, I worked on different aspects of the Optimization & Control pathway for Heila’s technology. The aspects I worked the most on were data pre-processing, a price calculator, a bill calculator, and post-processing functions. Each of these are part of the larger picture of Heila’s algorithms. To help in my conceptual understanding of Heila’s algorithms, I created the following diagram, which I also shared with the larger team. 

Figure 1: Optimization and Control pipeline

This diagram helps to give an idea of the larger Optimization & Control functions of Heila. The aspects that occur in the cloud are indicated by a cloud icon, while those that occur on the Heila EDGE device are indicated by the chip icon. A key part of my work was making sure that the aspects I worked on that would be done on the EDGE (namely the price calculator) would be able to run quickly and not use unnecessary storage on the EDGE. 

b. Background Research

I spent time looking at rate structures in use by PG&E as well as those used by clients that Heila is working with. These rate structures included both demand and energy charges. Energy charges are based on the amount of energy consumed over a period of time (measured in kWh). However, demand charges, used primarily for commercial and industrial customers, are measured in kW and are based on the power consumed at a single point in time. Rate structures may include only energy charges or may include both energy and demand charges. Possible rate structures include TOU rates (time of use: different costs for energy at different hours), tiered rates (different costs for energy at different tiers of use), TOU-tiered rates (a combination of TOU and tiered), or flat rates. Shown below are example rate schedules I looked at. 

Figure 2: Example rate structure from PG&E

Figures 3 and 4: Example rate structures for two of Heila’s clients, the one on the right is a translation from Spanish to English

In addition to looking at the rate schedules, I also read existing Heila white papers. This helped me to understand the overall scope of the technology as well as the potential use-cases for an automatic plotting function that I worked on later on. 

d. Methodology

On the pre-processing side, I worked to create an automatic plotting function, as I mentioned previously. This function allows for Heila’s graphs to be neater, more standardized, and easier to create for future presentations and white papers. This came in handy as I worked on providing graphs for an investor presentation in early August. I also cleaned data for several of the projects that Heila is currently working on.

Figure 5: Example plot created using generic plotting function for a potential Heila client

For the price calculator and bill calculator, my work built off of the existing work done by those working for LBNL on their EcoBlock project, a project that Heila is also contributing to. My role involved testing the existing price calculator and bill calculator and altering it to work more smoothly within Heila’s framework. I removed dependencies, for example in the price calculator, that would take up too much space on the EDGE. I also created functions that would allow one to directly edit the tariff structures we used. I also worked on making sure the outputs of the bill calculator were useful for future analysis. I made changes to allow for more tiers to be used and more types of tariff structures to be used. I made template tariff structures for Heila to use as projects with new tariffs were used in the future. Outside of my work on this, I helped to run simulations of the optimization algorithms, as shown in the Discoveries section below. 

e. Discoveries

Incorporating all of the aspects of the diagram in Figure 1, we were able to produce optimization simulation results for projects that Heila is currently working on. Using the post-processing bill calculator, we were then able to see how much the customer saved on a monthly utility bill without using Heila’s tools, with prescient (perfect) data, and with forecasted data. 

Figure 6: Bill saving for prescient, predicted, and counterfactual load data. Client 1 on the left and Client 2 on the right.

Additionally, the plot below shows the scheduled costs (determined by the price calculator) and how the optimization algorithms caused the simulated microgrid to react. The plot below shows the price for energy and demand based on the weekday (top) and weekend (bottom) rates. The sell price is currently set to 0 since we did not have information about net metering rates. 

Figure 7: The demand and energy time-of-use rates on a weekday and weekend, for one of Heila’s clients.

Figure 8: This plot shows an optimization simulation for three days (March, 4, 5, and 6, 2020), using perfect or prescient load data.

Figure 9: This plot shows the optimization simulation for two days (December 1 and 2, 2019) using predicted data rather than perfect data.

Part Two: Personal Reflection

Working closely with the members of my team, Shuyang, Trudie, and Xinyi, was a wonderful learning experience for me. It was interesting to hear about each of their paths through academia and PhDs, and how they had eventually ended up working for Heila. Though I interacted the most with Shuyang, Trudie, and Xinyi, I found that everyone across the company was very excited to share their experiences and talk with me, helping me out during the internship in any way that they could.

Each week, we had “Decentralized All Hands/Socials” on Friday afternoons. Those who were new to the company would be introduced with an Ask Me Anything session and a round of two truths and a lie. Each week, a representative from each team shared the accomplishments the team had made that week. My manager, Trudie, was adamant that I speak up and share my and my team’s accomplishments regularly, helping me to push past any initial unease I may have had about speaking in front of the whole company. I appreciated that they all viewed my work and insights as important and necessary: I didn’t feel resigned to being “the intern”, and I knew my contributions would be valued. 

On one day in particular, the Optimization and Control team met to work at Stone Edge Farm, the birthplace of Heila, which operates as a fully islanded micro-grid. My grandparents were picking me up (they live nearby to the farm), but they had gotten lost and were running late. Heila’s CTO, Jorge, was insistent on waiting with me until they arrived and we had a great conversation about the founding and history of Heila and the previous renewable energy projects he had worked on in Mexico. This experience is just one example of the many times that people at Heila took time out of their day to help and encourage me. 

Technically, I think that my coding skills improved over the summer and I learned how to conceptualize big projects and think deeply about what the customer or end-user needs. We focused a lot on writing code that was production-ready and well-documented. This is a skill that I had not worked on as much before, so it was great to dedicate a lot of time to working on that skill. I put more thought into what the overall system of the final product would look like, not just my individual piece, and was able to think about that more clearly through creating diagrams that the whole company could use to understand our work, as well. I also became more familiar with the fast-paced and rapidly changing work of a start-up, like Heila, occasionally working on tasks that we later pivoted away from. 

Outside of work, I was mostly based in Berkeley, where I commuted a day or two a week to Oakland to work in person with members of Heila’s Optimization and Control team. While staying in Berkeley, I enjoyed hiking in the East Bay hills and spending time with my housemates. I am so thankful for all of the mentorship and support I received at Heila, as well as the support of Cal Energy Corps. Thank you all for this wonderful opportunity.