Back to basics: Microgrids and renewable energy
Microgrids can help system owners meet the special considerations necessary to integrate intermittent renewable power sources into power systems while enhancing electrical system reliability and resiliency.
Microgrid insights:
- Microgrid solutions are site-specific, requiring careful assessment of energy needs and financial feasibility.
- Battery energy storage enhances grid independence and reduce reliance on fossil-fuel-based generators.
NFPA 70: National Electrical Code (NEC) 2023 defined microgrids as “an electric power system capable or operating in island mode and capable of being interconnected to an electric power production and distribution network or other primary source while operating in interactive mode, which includes the ability to disconnect from and reconnect to a primary source and operate in island mode.” Microgrids can play a crucial role in integrating renewable energy sources into facilities while maintaining facility reliability, as they are inherently scalable and flexible. They may be small and only consist of a few system components, or they can be made up of an entire complex campus of different buildings and generation sources. Microgrids can operate in either grid-connected or islanding mode. Stand-alone or isolated microgrids have no utility connection and serve only as off-grid power systems.
Microgrids must function as a single controllable entity to accomplish the objectives set out by the system
owner, whether that is improving resiliency, decreasing dependence on the grid, maximizing the benefit of renewable energy sources, maximizing economic payback or a combination of these. Some common microgrid power management techniques and uses are listed below.
-
Islanding: Using on-site distributed energy resources (DER) to provide power to a facility when disconnected from utility power.
-
Renewable smoothing: Using an energy storage system (such as batteries) to reduce the effect of intermittent renewable energy generation.
-
Peak shaving: Reducing electrical power consumption by using on-site distributed generation during periods of maximum demand on the utility.
-
Scheduled power: Monitoring the energy market to determine when it would be more cost-effective to use on-site distributed generation to power facility loads in place of only the utility source.
-
Voltage and frequency regulation: Adjusting DER outputs to provide near-constant voltage and frequency regardless of changing load conditions.

Figure 1: A diagram showing how utility power can be integrated with distributed energy resources such a standby generator, battery storage, or renewable generation to form a microgrid. Courtesy: CDM Smith
By leveraging these features, microgrids can facilitate integration of intermittent renewable energy sources while enhancing the reliability and sustainability of the overall power system.
Applicable codes and standards
A microgrid system design must comply with the NEC and all other codes recognized by the authority having jurisdiction. The codes, standards and guidelines of the following organizations can also govern, where applicable:
- International Building Code
- International Fire Code
- InterNational Electrical Testing Association
- NFPA
- Unified Facilities Criteria
- Occupational Health and Safety Administration
- National Electrical Manufacturers Association
- Institute of Electrical and Electronics Engineers (IEEE)
- American National Standards Institute
- Underwriters Laboratories (UL)
Microgrid main components
Microgrids are composed of several key components that work together to manage energy flow through a power system. Some main components include:
-
Energy sources: Devices which produce energy on-site from DER, such as solar panels, wind turbines, diesel generators and fuel cells.
-
Energy storage: Batteries and other storage systems, like flywheels, that store excess energy for use when available generation is low or demand is high.
-
Microgrid controllers: The “brains” of the microgrid, including supervisory control and data acquisition (SCADA) systems and energy management software that balance supply and demand, optimize performance, ensure stability and make decisions on when to operate in islanded or grid-interactive mode.
-
Distribution infrastructure: This includes the electrical cables, transformers, inverters and switchgears that connect generation sources to consumers and manage the flow of electricity.
At the beginning of any project, the designers must review and evaluate which energy generation technologies might be best suited for the site. Designers must identify the project objectives and how much energy is required to meet the system requirements. Certain technologies may not be viable because of space, available solar or wind resources, or other geographical constraints.
Microgrid controllers play a crucial role in managing and optimizing microgrids to meet their target objectives. A microgrid controller functions as the top-level manager of the microgrid and coordinates the various components to ensure efficient operation and proper transitions between different modes of the microgrid operations for both grid-connected and islanding modes.
As renewable energy and other DER are increasingly deployed, microgrids will continue to play a key role in ensuring power system reliability and maximizing the benefits that DER can provide. The most common microgrid components are photovoltaic (PV), battery energy storage systems (BESS) and engine-driven generators.
Solar photovoltaic systems
Solar PV technology converts sunlight directly into electricity using the photovoltaic effect and is a common and cost-effective DER option. NEC Articles 690 and 691 cover general requirements for PV systems, both small scale and large scale. NEC Article 710 covers requirements for PV systems that operate independently from the grid.

Figure 2: An example roof-mounted PV array. Panels are oriented due south and integrated using a string PV inverter to convert from DC to AC power. Courtesy: CDM Smith
Some key components of PV systems are listed below:
-
PV modules/panels: PV cells are the basic units of modules/panels and use specific semiconductor materials. Busbars and diodes link cells together in series and parallel to form collection grids housed together in a single frame with the desired output voltage and current ratings.
-
String: Module direct current (DC) outputs are electrically connected in series to form a string. Multiple strings can be paralleled in combiner boxes.
-
Inverters: Convert the DC power output from PV modules to alternating current (AC)
-
Racking systems: Securely hold PV modules and other equipment in place.
-
Wiring: Interconnects PV modules, inverters and other system components.
-
Array: A mechanically and electrically integrated set of the above components is called an array.
There are many PV module technologies available, each optimized for different applications. Three well-developed and commonly deployed PV module technologies are listed below.
-
Monocrystalline silicon: Single crystalline silicon (c-Si) Its uniform structure yields higher efficiency rates and longer life span but has higher initial costs.
-
Polycrystalline silicon: Silicon substrate with many different crystals. It is easier to manufacture and less expensive than c-Si, but has lower efficiency.
-
Thin-film: A category of semiconductor substrates that are very lightweight and flexible. Often lower efficiency than c-Si options. Common thin film materials include Cadmium Telluride, Copper Indium Gallium Selenide, Amorphous Silicon or Gallium Arsenide.
There are three common PV inverter configurations: micro, string and central. Micro configurations convert the electricity from a single PV module from DC to AC. These are typical for residential installations. String configurations convert the electricity from a group of PV modules (or string) from DC to AC. They are typical for commercial/industrial installations. Central configurations convert the electricity from an entire PV array from DC to AC with one centralized inverter. They are suitable for certain commercial/industrial installations.
Micro-inverters provide the most resilient and costly option, since the output of the system is not greatly affected by the performance of a single module or inverter. Micro-inverters are easiest to integrate with a small number of modules. String inverters often lower the cost and simplify the design in systems with larger numbers of modules. Central inverters may be preferable for large systems. Central inverters also have advantages when designing a microgrid system, as it is easier to integrate a smaller number of components. However, central inverters provide a single point of failure and can struggle to efficiently handle constantly changing shadow profiles over the entire array.
PV arrays can be building-mounted, ground-mounted, or canopy-mounted and must be designed for all applicable structural loads.
Battery energy storage systems
BESS can store electrical energy from various sources and discharge it when required by using energy management strategies. NEC Article 706 covers general requirements for energy storage systems, including batteries. NEC Article 480 provides guidelines for the installation and maintenance of storage batteries.
BESS can strategically charge and discharge to synchronize energy production from intermittent renewable energy sources with demand. Sometimes referred to as renewable smoothing, this reduces the effect of renewable energy power fluctuations. Two common designs for BESS are container configurations and cabinet configurations.

Figure 3: In a BESS, individual battery cells are wired together to form modules, racks and panels. There is control and monitoring at each level of integration to ensure safe operation and control. Courtesy: CDM Smith
For large systems, containers can be paralleled together to meet the desired energy capacity. This can be accomplished through traditional paralleling switchgear or by using a microgrid controller or similar device designed to integrate multiple power sources.
Two prevailing battery chemistries for energy storage applications are lithium nickel manganese cobalt oxide (NMC) and lithium iron phosphate (LFP). NMC and LFP are both types of lithium-ion chemistries. LFP is more common in stationary applications than automotive applications, partially because of its heavier battery chemistry (i.e., lower energy density). However, it is much more difficult to make an LFP cell go into thermal runaway than an NMC cell, making it a great option where fire safety is a concern.
Although NMC batteries have a higher energy density (kWh per pound), LFP has emerged as the industry-leading energy storage chemistry for stationary applications, due to its thermal stability/safety and its reduced reliance on rare metals.
Generators
While conventional generators use fossil fuels and are considered a nonrenewable energy source, they can play a crucial role in filling in gaps between renewable production and demand in microgrid systems, particularly when demand cannot be met with BESS or another means of renewable energy storage. NEC Article 445 covers generator installation requirements. NEC Articles 700, 701, and 702 cover requirements for generators used in emergency systems, legally required standby systems and optional standby systems, respectively.
For brevity, the main components of generators and their sizing methodologies will be excluded in this article. The main considerations when selecting a generator as part of a microgrid are the fuel type, size and emissions rating. Two widely used generator fuels are natural gas and diesel. Some key characteristics of the two fuel types are listed below.
Natural gas generators:
-
Cost-effective fuel source, but not always accessible.
-
More environmentally friendly, less pollutants and odor.
-
Less energy dense fuel source, larger system footprint.
-
Does not typically experience wet stacking.
-
No on-site fuel storage (dependent on external utility).
Diesel generators:
-
More expensive fuel source, but also more accessible.
-
Less environmentally friendly, some pollutants and odor.
-
More energy dense fuel source, smaller system footprint.
-
Can experience wet stacking when underloaded.
-
Fuel storage on-site (fuel deliveries required for continued operation).
Additionally, engineers must consider the emissions rating. Generators rated for stationary emergency applications can participate in the microgrid only when utility power is unavailable. While acceptable for microgrids focusing on resiliency, microgrids with the goal to perform peak shaving or another utility-interactive activity may require a generator rated for stationary nonemergency use.
Integration and interconnection requirements
Utility interconnection requirements allow transparent communication between all parties involved for public and personnel safety and for power performance requirements. Utilities must be involved during the project planning or design stages to determine the feasibility of interconnection and to ensure requirements are met.
PV systems and BESS, which have DC power outputs, are sometimes referred to as inverter-based resources (IBR). For BESS, inverters must be bidirectional to allow the batteries to both be charged and to supply power to the electrical system.
In general, inverters can operate in either grid-forming mode (acts as a voltage source) or grid-following mode (acts as a current source). A grid-forming source is required when islanding, and grid-following mode is used when the inverter is not the primary power source.
Inverter behavior during external power outages, also called the inverter ride-through feature, is important for overall grid stability, especially as IBR become a larger portion of overall power generation resources. Codes and standards that govern inverter ride-through requirements include UL 1747, IEEE 1547 and IEEE 2800. These standards require inverters that back-feed the grid must not instantaneously go offline upon a momentary utility outage. Specific requirements are set by the utility and will impact inverter specifications and microgrid controller specifications.
The NEC also has specific connection requirements pertinent to microgrid systems. NEC 2023, Article 705 covers the installation of one or more electric power production sources operating in parallel with a primary source or sources of electricity. When DER are integrated into an existing system, careful attention must be paid to the requirements of Article 705 to ensure that power distribution equipment is not overloaded by multiple power sources.
Additionally, cybersecurity considerations also impact the inverter and controller design, including what communications protocols are used (wired vs. wireless) and where sensitive communications equipment is located. Designers must consult with cybersecurity experts to mitigate the risks of cyberattacks in sensitive facilities.
Solar photovoltaic system sizing
The first step in sizing any PV system is considering the energy demand of the associated facility or facilities. Collect historical energy consumption data from utility bills for at least one year to understand energy use patterns. Consider the average daily peak sun hours (PSH) for the project region. The National Renewable Energy Laboratory has libraries of solar resource data, tools and maps to obtain these numbers and guide this process.
The goals of the system will also impact sizing. The goal may be to offset the full energy consumption of the facility or a certain percentage of it. Financial goals such as maximizing return on investment or payback period may also dictate a certain system size.

Figure 4: A skid-mounted natural gas generator. The gas engine creates rotational mechanical power, which is converted to electrical power by the alternator. Courtesy: CDM Smith
Efficiency losses from inverters or resistive losses in the wiring should be considered. Other site-specific losses, such as temperature losses or shading, are not factored into the regional PSH number but should also be considered. Approximate shading analysis and temperature-based losses can be performed with software by modeling approximate sizes of adjacent buildings and. Detailed shading or other loss analysis can be difficult without thorough data collection.
Battery energy storage system sizing
There are two primary considerations when sizing BESS: the power rating (kW) and energy storage capacity (kWh).
When selecting the power rating of the BESS, the main consideration is the goal of the microgrid system. If the goal is to power the entire facility in the event of a power outage without using any other resources, the BESS must be sized for the facility’s peak demand. If the goal is to only power critical loads, the BESS should be sized for the peak demand of those loads.
The selection of the BESS energy storage capacity also depends heavily on the microgrid goals. For resilience, a common goal is to have a desired run-time for the facility without utility or other power sources (two and four hours are common target run-times). The minimum BESS capacity can then be selected by either multiplying by the peak or average hourly energy consumption. Using the peak hourly energy consumption guarantees that the BESS will support the facility for the selected run-time, if starting fully charged. If the energy storage capacity is instead selected based on the average hourly energy consumption, in periods of high electrical demand the BESS may not support the facility for the full duration of the run-time.
If the goal is to perform other energy management techniques, such as peak shaving or renewable smoothing, the BESS sizing may be more complicated and require more detailed analysis.
Consider a scenario where a local school requires upgrades for a backup power source, as it has just been identified for use as an emergency shelter in the event of a natural disaster. The school board aims to integrate renewable energy into these upgrades, cost permitting. The school’s energy bills for the last year were collected, and it was determined that the peak demand was 390 kW and that over the year the school used 1,752,000 kWh of energy.
Solar PV system sizing
The goal of the PV system will be to fully offset the annual energy consumption. The school receives 4.1 peak sun hours daily, or 1,496.5 peak sun hours per year. Dividing 1,752,000 kWh by 1,496.5 hours yields a target DC nameplate value for the PV system of approximately 1,170 kW.
At this point, equipment selections for the PV modules and inverters are made by considering PV module efficiency and size for the application and match the inverter capacity (either string, central or micro) to at least 80-90% of the target system size. String inverters are selected given they are cost-effective and do not consolidate to one failure point. Dividing the target system size in kW by the PV module nameplate DC kW rating yields the quantity of modules required. For the selected 400 W modules, this system requires at least 2,925 PV modules to reach the target 1,170 kW nameplate capacity.
The final step is to design the system layout based on available space. This can be approximated with satellite imagery but is best performed with a site survey. The tilt angle of the PV modules and module orientation is set based on the latitude to directly face the sun at solar noon on the average day. The module quantity, module racking, row spacing and maintenance clearances inform the layout and overall array footprint.
The electrical system layout is designed to include wiring, conduit runs, combiner boxes and connection points. At this point, a cost estimation is performed to determine the project’s viability. Detailed energy production is simulated based on local weather data using software tools, and the utility energy buyback rates and other rate structure is considered, alongside available government subsidies and incentives.
BESS sizing
By consulting with the local emergency planners, it was determined that the whole school is expected to be used in the worst-case natural disaster. Based on this, the BESS was sized, at minimum, for the peak demand of the whole facility. Based on the 390 kW peak demand, this allows the whole school to be powered on the BESS and ensures that immediate islanding can be provided if the utility power fails.

Figure 5: An example of a microgrid paralleling switchboard one line diagram. The microgrid controller electrically operates the circuit breakers and monitors power flow with power quality monitors. Courtesy: CDM Smith
Several factors were considered when deciding the method to determine the minimum energy capacity of the BESS. First, a substantial portion of the power demand is for air conditioning, and when the air conditioning demand is highest, significant solar power will also be generated by the solar array. Secondly, it was considered that a guaranteed source for critical power loads (an existing engine-driven generator) is available. Given these factors, it was decided that since some redundancy exists in the system, the BESS will be sized based on the average energy usage for four hours. Based on the utility bills, the hourly average energy demand is 200 kW, and it was determined that correspondingly the minimum BESS energy capacity is 800 kW per hour.
From the calculations above, a commercially available 500 kW/1000 kWh container-style BESS system was selected as the basis of design to participate in the new microgrid system. Similarly, to the PV system, a financial analysis is performed to determine if it is cost-effective to include BESS. The utility rate structure has a widespread based on time of use, and the primary method for the BESS to pay for itself is found to be through peak-shifting and charging during off-peak rates.
Microgrid integration
To tie the microgrid together, the solar PV system, BESS and existing generator must be interconnected. Space is limited in the existing electrical room, so a new switchboard was chosen to be installed outside where all DERs will be connected. To integrate the existing loads, the new switchboard was “inserted” between the existing service equipment and the utility transformer. This way, construction and disturbances inside the existing school and electrical room are minimized. The circuit breakers for the utility and DERs in the new switchboard are electrically operated and controlled by the microgrid controller, which allows it to manage the resources in real time and ensure that a constant source of power is available. Additionally, as an extra safeguard, the critical loads identified while sizing the battery were moved to their own breakers on the new switchboard so that non essential loads can be shed if limited power is available.
Do you have experience and expertise with the topics mentioned in this content? You should consider contributing to our WTWH Media editorial team and getting the recognition you and your company deserve. Click here to start this process.