# On Hybrid Nanogrids Energy Management Systems--An Insight into Embedded Systems
## 2 Nanogrids Technologies and Architecture
### Structure and Components of a Nanogrid  
The basic composition of a hybrid nanogrid, as shown in Figure 3, includes many components. Energy sources (solar panels, wind turbines, battery storage, or diesel generators) are present to provide energy supply. Energy storage systems (ESSs) are used to store excess energy generated by energy sources and provide it during periods of low energy production. The loads are the end-use devices or systems that consume energy in the  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Feature** & **Nanogrid** & **Microgrid** \\ \hline Size & Small, serving a single house/building or small community & Larger, serving multiple houses/buildings or a larger community \\ \hline Power Generation & Includes renewable energy sources and energy storage, relying on local resources for power generation & Includes renewable energy sources, energy storage, and is connected to traditional power sources \\ \hline Control & Usually operates independently. Requires simpler regulations. & Can operate in grid-connected or island mode. Requires more complex regulations. \\ \hline Complexity & Simpler in design and operation & More complex due to the larger scale and integration of multiple power sources and energy storage options \\ \hline Flexibility & Designed for specific applications, with limited flexibility to adapt to changes & More flexible in terms of integrating different energy sources and adjusting to changes in demand \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison between nanogrids and microgrids based on different features.  
nanogrid, such as lighting, appliances, and communication systems. Power electronics and converters are used to convert and manage the flow of electrical energy within the nanogrid, ensuring that the energy is properly distributed to the loads. They also provide real-time visibility into the performance of the system. The energy management system (EMS) is responsible for controlling and regulating the flow of energy between the energy sources, energy storage, and loads. It consists of a control system responsible for coordinating the operational strategies of the nanogrid, such as load management and energy balancing, to ensure its stability and reliability.  
Microgrids are generally used for managing multiple homes or buildings, whereas nanogrids are usually used for one system (a single house/building or a small-scale load) [8]. Nanogrids and microgrids have separate functions in the power hierarchy. For instance, by linking multiple nanogrids, a microgrid can be established [11]. There are two categories of centralized and decentralized EMSs in the supervisory control architecture of the EMS. In the centralized EMS, the central controller collects all the data, including energy resource generation, cost function, weather information, customer energy consumption patterns, etc. The centralized EMS then decides on the best energy planning and informs all the local controllers of its findings. In the decentralized EMS architecture, however, the central controller sends and receives all data to the local controllers in real-time. Each local controller sends a demand or generation request to the central controller for both the present and the future. The best scheduling is decided by the central controller and sent back to the local controller. The latter can disagree with the way things are going and keep negotiating until both global and local targets are met [49].