Xingyi Du is a first-year Master’s student in the Atmosphere/Energy program.
This summer I have been working with the City of Palo Alto Utilities (CPAU), the city’s municipal public utility. CPAU plans, procures, and delivers electricity for Palo Alto while balancing reliability, affordability, and sustainability. To fulfill this mission over the long term, the utility must be prepared for market price volatility and changing generation conditions—especially in years when hydropower is limited and the timing of available energy matters more than usual.
My assignment is to move an hourly physical and financial load-resource model from Excel into a maintainable, documented workflow in R. In practice, that means rebuilding the analysis as a transparent pipeline: ingesting hourly generation, load, and price data; integrating contract terms; and producing clear tables and figures that show how resources stack against load and how exposure evolves through the day. The shift from Excel to R brings concrete benefits such as reproducibility and version control, fewer manual steps and clearer audit trails, and the ability to rerun the model quickly as inputs or assumptions change. It also creates a stronger foundation for scenarios—parameters can be updated once, and the entire analysis refreshes consistently without hand-editing formulas.
Looking ahead, I will use the rebuilt platform to run targeted scenarios, beginning with a low-hydro year (2022). The aim is to inform CPAU’s Hydro Rate Adjuster and its hydro stabilization reserve. In plain terms, the Hydro Rate Adjuster is a small annual credit or charge that smooths the ups and downs of hydropower revenues, and the reserve is the cushion that helps keep bills steady when water or prices swing. These scenarios will show how different hydro conditions hourly coverage and the budget, and what settings keep the reserve on target without affecting customer rates. Since the model transitioning is done and the framework is set next we will run the cases and translate the insights into guidance for hedging and rate planning.
The experience has diverged from what I first imagined because it has involved more than translation. Building on the prior framework, my focus has been to make the workflow clearer and more reliable—documenting assumptions, validating joins and units, and streamlining how inputs move through to results—so the model keeps the drivers of exposure visible rather than buried in averages.
As the fellowship goes on, I’m learning on both the technical and personal sides. Technically, I’m getting better at clean data joins, reshaping hourly datasets, and making plots that show the key patterns without clutter. I also had a clearer understanding about how missed forecasts show up in the budget, and how a solid reserve and thoughtful hedges can soften that impact. These lessons will guide my Atmosphere/Energy work at Stanford and the roles I pursue next at the intersection of modeling and policy, helping public utilities use hourly data to keep the lights on, keep rates steady, and keep risks in view.