User Stories

Sandia National Laboratories Simulates Hawaii Microgrid and Photovoltaic Systems

View PDF

An array of solar panels
An array of solar panels.

“MATLAB, Simulink, and SimPowerSystems enable mechanical, power, and controls engineers to work together using the same tools, which helps in a multidisciplinary environment like ours.”

Ben Schenkman, Sandia National Laboratories

A primary goal of Hawaii’s Clean Energy Initiative is to increase energy efficiency and renewable energy resources to meet 70% of the state’s energy demand by 2030. As part of this initiative, Castle & Cooke Company created a 1.2 megawatt photovoltaic (PV) solar farm on Lanai, an island served by Maui Electric Company.

Before the PV system was installed, Maui Electric partnered with Sandia National Laboratories to ensure it could be integrated reliably and efficiently with the diesel generators that were already supplying the island with electricity. Sandia developed a model of the Lanai microgrid using Simulink® and SimPowerSystems and conducted simulations to assess various configuration and control options.

“SimPowerSystems provides models of many of the components in our system, so there was little we had to build ourselves,” says Ben Schenkman, member of the technical staff at Sandia. “Bringing actual data into the Simulink environment was straightforward, which made the entire process of modeling, simulation, and verification very efficient.”


Sandia wanted to determine how much battery capacity would be required to ensure the stability of the entire system should the PV provide reduced power or fail. When clouds pass over the PV array, energy output drops; batteries must be large enough to provide power until the diesel generators can engage to pick up the load. Oversized batteries, however, could impose hundreds of thousands of dollars of unnecessary cost to Maui Electric’s Lanai customers.

To identify a cost-effective, reliable solution, Sandia needed to model the microgrid and compare the results of simulations that incorporated different control strategies, insolation profiles, and battery sizes.

With just three months to complete the evaluation, Sandia needed to develop models quickly. The ability to adapt the model for future use was also a key requirement. “We knew that new generators and other renewable energy sources like wind farms were being planned, but detailed information on them was not yet available,” explains Schenkman. “We had to develop a model that was flexible and easily understood by other engineers so that Maui Electric could use it going forward.”


A team of three Sandia engineers used Simulink and SimPowerSystems to model and simulate the supervisory control systems, PV arrays, power inverters, batteries, conventional generators, and system loads that make up the Lanai microgrid.

In Simulink, Sandia engineers created a simplified model of Lanai’s existing system with a single generator and simple constant current load from SimPowerSystems.

Maui Electric had provided Sandia with a Siemens® PSS®E model of the system that used a negative load to model the PV array. To validate their Simulink model, Sandia engineers added a Three-Phase Dynamic Load block from SimPowerSystems to mimic the negative load, ran simulations in Simulink, and compared the results with the PSS/E results.

Next, the team began refining the model in Simulink and adding the required battery capacity and control systems. They replaced the basic PV model with a more realistic one that incorporated solar irradiance profiles, a voltage-controlled current source, and low-pass filters. The team also added a three-phase d-q controlled battery source, a four-quadrant-inverter, more loads, and a more sophisticated control system.

To evaluate different control parameters and battery sizes, Sandia conducted Simulink simulations that incorporated real irradiance data captured from sensors on Lanai.

Sandia researchers are using MATLAB® to further analyze the sensor data and create more detailed irradiance profiles, which will improve the accuracy of future PV models.

As battery installation moved forward, Sandia researchers used the Lanai Simulink models as the basis for an internal research and development project on advanced microgrid control systems.

On this R&D project, Sandia researchers used Simulink Coder to generate C code from the model, which they used with Opal-RT eMEGAsim to perform real-time simulations.

The simulations showed that with advanced control systems and generators that can respond faster to power demands, no additional FACTS device is needed. Planning is underway within Sandia to implement the system for solar and wind power generation.


  • Model development time cut by 80%. “Using Simulink and SimPowerSystems, we developed models in a day or two that would have taken two weeks to develop by hand-coding,” says Schenkman.
  • Costs reduced through battery right-sizing. “Initial estimates for the Lanai system included a 700 kilowatt-hour battery,” says Schenkman. “The Simulink simulations demonstrated that a battery about half that size would be sufficient and that a flexible AC transmission device was not needed. Together, that amounted to more than $200,000 in cost savings.”
  • Simulation accuracy verified with real data. “We can bring real sensor data into the Simulink environment with a single command,” says Schenkman. “This makes it much easier to develop and quantitatively verify the model early in the project, so we know our simulations are accurate.”


Evaluate the battery capacity and control systems required for reliable operation of a new solar power generation facility


Use Simulink and SimPowerSystems to model and simulate microgrid distribution systems with photovoltaic sources


  • Model development time cut by 80%
  • Costs reduced through battery right-sizing
  • Simulation accuracy verified with real data

Products Used

Learn more about Sandia National Laboratories (2)