Real-Time Digital Simulation of Microgrid Control Strategies

This is part of the work that I have been doing at the University of Washing in Seattle for Snohomish County Public Utility District in Washington State.

Real-Time digital simulations can be used to evaluate and design microgrid control strategies without any risk prior to actual deployment in the field.

Our paper mentioned below describes a model of the microgrid that the Snohomish PUD is building in Arlington, Washington State. This microgrid is currently in the design stage and is expected to be completed by the end of 2020. It consists of PV generation, a battery, an emergency generator, loads and a vehicle-to-grid (V2G) enabled electric vehicle (EV) charging station, as shown in the figure below. When the microgrid is synchronized to the main grid, the battery will be used for solar smoothing, peak-shaving and energy arbitrage. The battery and PV inverters will then operate in grid-following mode. On the other hand, when the microgrid is islanded, the battery inverter will operates in grid-forming mode while the PV inverter will operate in grid-following mode. The emergency generator will only be used when the battery is discharged and there is insufficient PV generation. The batteries of the EVs are capable of supporting the microgrid and the electrical grid. The simulation models developed in MathWorks® Simulink® using the Simscape Power Systems™ (formerly SimPowerSystems™) toolbox are available to the public and could be adapted to model other microgrids (see the download link below).

Three operational scenarios are studied: grid-connected operation; seamless transition to islanded mode with the battery inverter operating in grid-forming mode; and islanded operation using the emergency generator when the battery is discharged.

Download Simulink models here. You will need RT-LAB to run these models, if not comment out the components that are not from Simscape Power Systems™ toolbox. Send me an email if you have any questions or suggestions on these models. Email addresses can be found in the paper below.

Download our paper here.

Use this for citation: C. Keerthisinghe and D. S. Kirschen “Real-Time Digital Simulation of Microgrid Control Strategies,” in 2020 IEEE Power & Energy Society Innovative Smart Grid Technologies Conference (ISGT), Washington, DC, USA, Feb 2020, pp. 1-5.


Yosemite National Park, California

   Yosemite National Park, located about 190 miles east from San Francisco, is home to a range of beautiful water falls and hiking trails. Some of the water falls are Horsetail Fall, also known as Yosemite Firefall, Yosemite Falls, and Bridalveil Fall. There’s more but didn’t have time to explore all of them, so I will just share my experience. Hope it helps with your travel plans.


Horsetail Fall has recently gained popularity for its orange/fire like glow during sunset. This lighting effect is only visible on evenings with clear sky when the waterfall is flowing during mid to late February. Best view of the Firefall is from the parks’s El Captain picnic area. You will have to park at the Yosemite Valley Lodge and walk for around 1 mile. Make sure to view the  water fall from a roughly 35 degrees angle from the horizontal plane (or move roughly 55 degrees to right after facing the water fall from the front) for the best views and photos.


Yosemite Falls and the Bridalveil Fall can easily be seen from the Yosemite Valley. You can get the best view of the Bridalveil Fall and the valley from the Yosemite Tunnel View point (see the above pictures). Lower Yosemite Falls is a short and easy walk but hiking to the top is little challenging.

Accommodation: Either stay at the valley, which is a little expensive or at the small town called Mariposa, which is roughly 1 hour drive away depending on the traffic and snow conditions. Be careful the restaurants and grocery shops in this town may close early.

Getting there: Roughly 3 and half hours drive from San Francisco International Airport and add time for resting and photos. There are two ways to enter the valley when you come from San Francisco. Taking road 120 and then scenic Big Oak Flat road to the valley (see the photos below) and the other is through Mariposa.

Other important notes: Carry snow chains if you are going in winter. I got away without snow chains but I would definitely take them with me next time.
Parking at the valley can be very tricky during Firefall viewing days, so come early and park. Drop me a message if you think this information is helpful or have any comments. Feel free to download any photos. 🙂



Voluntary work in Puerto Rico after Hurricane Maria, 2017 – 2018

This is probably one of the best things that I have done in my life so far. Below is an article that we published in IEEE. Click here to access the full paper.

PV-Battery Systems for Critical Loads during Emergencies: Case Study from Puerto Rico after Hurricane Maria

         Hurricane Maria struck Puerto Rico on September 20, 2017 and left large parts of the island without electricity for months. As Figure 1 shows, restoration in remote mountainous regions took considerably longer.

      Long-term power outages can be lethal to individuals who rely on electrically-powered medical devices or require medicines that must be refrigerated. While the initial death toll of Hurricane Maria is 64, due to the lack of utilities, such as electricity, the actual number of deaths caused by Hurricane Maria is closer to 2975. This number is calculated by comparing the total medical-related deaths during 2017 with the average numbers in the past four years. Another study estimates the death toll at 4645. It is likely that remote areas were more severely affected because damaged roads not only prevented access to medical facilities but also hampered the regular delivery of medical supplies and fuel for portable generators. Communities at large were deprived of electricity, water, hospitals and clinics, communication and transportation availability for months; and still 200 days later, 0.16 million people lack electricity. The devastating destruction from the hurricane is highlighted in Figure 2.

        Small systems combining photo-voltaic (PV) generation and battery energy storage could be deployed during such emergencies to help affected individuals cope until grid-supplied power is restored. However, very little reliable data is available on how such systems would actually be used to meet critical medical needs and thus on what their design requirements should be. In order to gather data on how emergency systems would actually work, and to provide some relief to a severely affected community, researchers from the University of Washington in Seattle made three field-trips to Jayuya, a remote small town in the mountainous center of Puerto Rico, to collect preliminary information about medical needs, install some PV-battery systems and gather the data collected by these systems after several months of utilization. Some pictures highlighting the work carried out by researchers at the University of Washington is shown in Figure 3.

Read the full article here

C. Keerthisinghe, M. Ahumada-Paras, L. D. Pozzo, D. S. Kirschen, H. Pontes, W. K Tatum, M. A. Mattos, “PV-Battery Systems for Critical Loads During Emergencies: A Case Study from Puerto Rico After Hurricane Maria,” in IEEE Power and Energy Magazine, vol. 17, no. 1, pp. 82-92, Jan.-Feb. 2019. doi: 10.1109/MPE.2018.2877896

Grand Canyon National Park, Arizona

A day trip from Las Vegas is more than enough to explore the most visited area of the Grand Canyon. I would like to share my photos and video from my Grand Canyon Western Rim trip in June, 2017.

The first two things I did was a helicopter tour and boat ride. We took the helicopter into the the Grand Canyon, followed by a boat ride down the river, and finally, return via helicopter. We were greeted by a Native American after reaching the bottom of the Grand Canyon, which was pretty cool. I personally think helicopter and boat tours are worth the price, if you don’t have the time. Check out the video.

Next thing we did was the Skywalk and then a hike to Guano Point. Note that we are not allowed to take cameras during the Skywalk. Make sure to explore Native American sites around the area.