A Unified Data Profile for Microgrid Loads, Power Electronics, and Sustainable Energy Management with IoT

: Controllable devices in a classical centralized grid work independently, providing desired functionalities for the owner only, making grid stability and efficient energy management challenging. Therefore, the dynamically developing communication infrastructure has been crucial in improving local energy management and stability, introducing the Internet of Things and, finally, creating micro-or smart grids. Communication technology already allows for exchanging data and information with high bandwidth in practical industrial and grid applications. However, considering the increasing number of electrical devices with different purposes, parameters, and possibilities to work as an energy source or storage, the challenge is device profile standardization, especially for power electronics devices. As many devices as possible should be able to exchange information with the grid operator or local area/home energy management device, like industrial agents, energy routers, or smart transformers. The number and types of parameters, outputs, and input signals available in the devices from the communication point of view are significantly different, making it extremely difficult to apply the advanced energy management algorithm. Therefore, the unified data profile for modern loads was developed and discussed. The proposed device model was standardized, including mandatory information about the device’s work and parameters, with the possibility of reading the control commands from the supervisor device. The proposed unified model was studied in simulation research, integrating self-balanced and self-control areas.


Introduction
The development of communication and information technology for power grids to increase the efficiency of energy conversion and management has led to the transformation of a classical paradigm into a cyber-physical system (CPS) [1][2][3][4][5][6].CPS is a generic term for integrating information systems with physical devices for process automation and optimization.It uses computing stations with appropriate communication systems linking the executive devices involved in a process.In the case of the power grid, these include energy substations, distributed energy sources, energy storage, charging stations for electric vehicles, etc.In the CPS, the process of physical grid devices' virtualization (e.g., generators, power electronics converters, energy storage, active and passive loads) and their connection with a selected communications interface with a computer system for data acquisition, collection, processing, and smart energy management is crucial.Taking a modern microgrid or smart grid into consideration, it mainly focuses on the integration of converter systems that interconnect renewable energy sources, storage, and intelligent, controllable loads and relays with the current power system [2,4,7].This integration should provide the highest efficiency and effectiveness of electricity generation and energy distribution.Researchers have developed the Internet of Things (IoT) paradigm in the past few years, proposing many solutions for the simple interconnection and control of many electronic and electrical The communication between devices and users, energy suppliers, operators, management centers, and IA has become a crucial part of the modern power system providing locally balanced and self-managed local smart grids [3,16,[38][39][40].In comparison to the Internet, where routers, being the access points, manage data exchange, a similar concept can be applied to the power system.CPS would then be split based on the small local areas managed by IAs, working as "energy routers".Therefore, it is possible to divide the power grid into areas, as presented in Figure 1, with the following hierarchical structure [40][41][42][43].
HAN-it covers the area of an intelligent building, which could be a home or business/public building managing mainly electronic devices for temperature maintenance, air conditioning, life comfort solutions, and lighting-a local network of IoT.Currently, device manufacturers already offer their non-unified platforms for managing smart home systems and intelligent buildings.However, integrating those platforms into one centrally managed system is still difficult.Additionally, the increasing number of renewable microgeneration devices and small energy storage devices, including electrical vehicle charging stations, all based on power electronics, changes the character and features of the loads in homes or business buildings.In that case, the lack of a unified approach to communication limits smart devices to their essential functions: power generation or consumption, monitoring, and scheduling.The HAN is the biggest challenge for system integration to CPS because it is the responsibility of the users and prosumers to participate in the smart energy management process and the producers to provide a unified, open, easy-to-use information exchange process.HAN-it covers the area of an intelligent building, which could be a home or business/public building managing mainly electronic devices for temperature maintenance, air conditioning, life comfort solutions, and lighting-a local network of IoT.Currently, device manufacturers already offer their non-unified platforms for managing smart home systems and intelligent buildings.However, integrating those platforms into one centrally managed system is still difficult.Additionally, the increasing number of renewable microgeneration devices and small energy storage devices, including electrical vehicle charging stations, all based on power electronics, changes the character and features of the loads in homes or business buildings.In that case, the lack of a unified approach to communication limits smart devices to their essential functions: power generation or consumption, monitoring, and scheduling.The HAN is the biggest challenge for system integration to CPS because it is the responsibility of the users and prosumers to participate in the smart energy management process and the producers to provide a unified, open, easy-to-use information exchange process.
NAN-integrates many HANs using the communication between the central IA of NAN and local IAs or advanced metering interfaces (AMIs) in the integrated HANs.Data collected from smart meters installed in HANs help determine the appropriate tariff and forecast energy demand.Moreover, combining many HANs in a NAN provides additional features like energy exchange between HANs, demand-side control, energy saving, and grid support in case of higher energy demand.A promising technology for the NAN grids is a smart transformer (ST), working as an IA from a communication point of view and as an energy router from an electrical point of view.Using power electronics converter technologies like ST with an advanced digital controller enables two-way controlled energy transmission with additional services based on communication with other devices in the network.
Wide Area Network (WAN) is the core of the entire power grid, managed by the authorized operators.Within it, automation systems are standardized, and their operation is critical for the whole distribution system and long-distance energy exchange.The WAN is managed and monitored centrally.However, the problem is the lack of proper communication with NAN subnets, resulting from using conventional transformers instead of advanced STs.The whole grid, including sub-grids, is monitored and managed in the WAN's data center to obtain more efficient energy production, transmission, and utilization than in a classical centralized grid.
All the above sub-systems create a novel smart grid that works like an "energy internet", with communication and data transmission between nodes with IA and ST.The energy is transferred from nodes with surplus energy to nodes with energy shortages, relieving the central source based on fossil fuels, shifting energy generation to renewable distributed sources.
Summing up the area division of smart networks, communication is well-known because of the appropriate wired or wireless interfaces and protocols that can be selected for each case from many available options [40].Modeling the network and creating a suitable information model, which, after mapping to the selected communication interface, will facilitate the integration of intelligent devices into a coordinated, intelligent network, IoT is a much more significant challenge and must be continuously developed.It requires a standardized approach to modeling grid devices, loads, sources, and IA that will enable the successful implementation of smart grid technologies from a communication and information exchange point of view.

Unified Model of Smart Grid Devices
The concept of physical processes and device virtualization is dynamically developed due to the development of IoT technology.The communication protocols used in modern smart devices transport small data packets since the process is reduced to a small, fixed, standardized set of variables [25,44,45].However, the number of IoT devices is constantly growing, generating vast amounts of data collected in the smart grid that must be stored and processed.The complexity additionally increases if devices do not have a standardized and minimized information model.Adopting one unified information model enables logging subsequent values in the database and adding new devices to the system without a complex setup process.The proposed models described in the literature are mainly limited to conceptual studies and apply the IEC61850 standard, which presents defined classes and namespaces related to the basic parameters of current and voltage waveforms [23,46].Due to the need for a standardized definition of the set variables in the information model of the grid-connected device, it is challenging to configure the device during the energy management process.In addition, different data collection methods require individually tailored databases and additional data processing to include the whole system data in the aggregate database used by microgrid management algorithms.
Devices connected to the power grid have several standard features resulting from the grid parameters, such as voltage, frequency, number of phases, and direction of energy transmission (receiving or supplying).Based on those parameters, it is possible to specify unified variables to create a general information model applied to all smart devices connected to the network, creating the "Energy Internet".
A multidimensional approach should be considered in the analyzed power grid structure, as shown in Figure 1.Categorizing network parameters and network devices, a necessary set of variables that cannot be ignored in monitoring and energy management of a smart grid must be selected.
First, the nature of the power grid itself must be considered.The primary implementation of a local microgrid is a low-voltage (LV) network with commonly used devices, which are supplied by a one-or three-phase connection to the grid.Therefore, the LV grids are characterized by a four-wire, three-phase topology with voltage parameters 230 V RMS (line-neutral) and 50 Hz based on EU standards.Considering these parameters, different connection types of the devices can be distinguished, as shown in Table 1.Another crucial parameter of the grid devices is the power that the device consumes or supplies to the grid.Depending on the connection type (Table 1), the device can be characterized by one, two, or three different power values (for each phase separately).The power can take positive and negative values depending on the direction of the energy flow, working with varying power values from hundreds of Watts to dozens or hundreds of kW.
Modern grid devices have different roles, including passive, active, and reactive power loads.Considering the controlled power electronics devices, the direction of energy transmission between the grid and the device, and the control and communication infrastructure, the following roles of the load can be listed: • receiver-a device capable of only consuming the energy, characterized by active and reactive power-could be a passive, non-controllable, or active electronic load.

•
source-a device capable of only generating the energy, characterized by active and reactive power, integrated by a power electronics device designed to the specification of the source.

•
energy storage-a device capable of storing energy and transferring it in both directions, characterized by active and reactive power, managed by the power electronics converter.

•
reactive power compensator-a device intended to improve the quality of the energy, characterized mainly by reactive power; could be a passive RLC circuit or active power electronics compensator.

•
measurement/control device-a piece of monitoring and controlling equipment for devices directly connected in a small area (HAN).

•
control/communication router-a device dedicated to data collection and energy management in a dedicated cluster (HAN and NAN).
The energy in a smart grid can be efficiently managed by controlling the sources and energy storage and establishing a demand-side response via load management [47][48][49][50].Therefore, additional information about the device type and purpose is needed to prioritize the loads.In critical cases (e.g., power shortage in the grid, overload in demand peak over a day, energy overproduction in renewable energy sources), all devices in the smart grid can be controlled by their category, and depending on needs, firstly, low-priority loads can be rescheduled or disconnected from the grid.Therefore, the following list should be taken into consideration as a device destination based on priority and successively increased and improved in a future unified device model: The categorization of receivers is debatable and can be standardized depending on the region and needs.Still, it is worth having the IA aware of the critical role of the high-priority receivers.In the case of an energy shortage, when the management principle assumes that there is a threat to life or valuable property, the energy should be supplied as long as possible.On the other hand, devices used for entertainment and increasing the standard of living can be disconnected first.The method of switching on and operating time of the devices may also be considered for listed groups.Low-priority loads are characterized by the possibility of long disconnection from the grid, while medium-priority devices can be disconnected for a few hours to keep the power balance.The user should be able to start the device on demand (e.g., in a medium-priority group), or it can be started at different hours of the day.
Returning to a group of devices with a specific role in the grid, in which energy is managed and not consumed (sources and storage), it should be noted that electric cars and batteries, which can be receivers, provide an opportunity to store energy as well as exchange it with the grid (Vehicle-to-Grid, V2G).In addition, the amount of charging energy is relatively large compared to the rest of the household receivers.Considering the possibility of storing energy and integrating the power in time, receivers and storage can provide information about the stored or required energy resources.Considering the power demand in each period, how the device turns on, and how long it is used should also be considered.The possible circumstances are characterized in Table 2.
Based on the device power demand information, the efficient energy management strategy can predict the power demand during the day and control all IA and grid devices to provide local grid stability and minimize the cost based on the energy tariff [51,52].
Besides the described parameters of the smart grid load device, the critical aspect is its status and ability to read the commands sent from the IA.The status of an electrical device includes options: idle, ready, operational, and fault, which the IA can read, and commands: connect, disconnect, start, stop, and reset, read by the device.
Moreover, the power electronics converters with their own control, communication, and measurement units can send information about instantaneous powers, current's total harmonic distortion factors (THD), root mean square values (RMS), or average values of voltages and currents, energy storage capacity, and state of charge (SOC) to the IA or energy management center.Therefore, the additional structure of the advanced electrical parameter monitoring can be included in the load model, helping to improve energy management.Considering many different devices integrated into one modern smart grid, implementing the unified device model will require changes to many manufacturers' software based on the one proposed unified standard.The device model has been implemented in C++, and its data are stored in a structure called SGD_buffer_t in the device memory (Figure 2).Inside this element, the reference to the device parameters is included by implementing a structure SGD_t with all groups of parameters, like rated values, operating parameters set to start the device work, measured and stored instantaneous values, the setpoint for the device control, and energy management.The selected device priority, implemented as an enum list, provides important information to the IA, especially from the energy management standpoint.
The third group of device information is related to the instantaneous values of the crucial electrical parameters and operation status, which can be changed in each communication cycle.Parameters like information about actual powers (based on the list in Table 3) or energy quality can improve the grid's voltages and currents and provide a self-balanced area or zero-emission building.Each device may get a fault, stop operation, or change its operation mode; therefore, the device status update is sent to the IA as an instantaneous value based on the defined list in the proposed unified model.
The last group of device parameters has been included in the structure SGD_setpoint_t.Inside this group are parameters received from IA or AMI (which manage the local grid) and read by the device to participate in the power management process.First, control commands have been defined in the enum list.Secondly, the referenced values of powers are set by sending the values from IA to the device, which are The first group of parameters written as a structure SGD_rated_t represents basic information characterizing the device, listed in Table 3.It allows reading the device's name, unique serial ID number, and rated power.Moreover, it provides information about the number of used grid lines defined in an enumeration data type (Table 3).Next, the defined role of the device in the smart grid or smart home is included.The final structure inside the SGD_rated_t defines the work type of the device, providing the information that can be used in an advanced energy management algorithm for the smart grid.The work types are shown in Table 3.The second group of device parameters has been proposed in the structure SGD_ operating_parameters_t.In this group, information about actual operating parameters is provided, like connected specified grid lines or set priority of the device.Depending on needs or customer preferences, they can be changed at the beginning of the device's operation.The first parameter in this group is based on the enum list defining all possible connections of one-and three-phase devices.
The selected device priority, implemented as an enum list, provides important information to the IA, especially from the energy management standpoint.
The third group of device information is related to the instantaneous values of the crucial electrical parameters and operation status, which can be changed in each communication cycle.Parameters like information about actual powers (based on the list in Table 3) or energy quality can improve the grid's voltages and currents and provide a self-balanced area or zero-emission building.Each device may get a fault, stop operation, or change its operation mode; therefore, the device status update is sent to the IA as an instantaneous value based on the defined list in the proposed unified model.
The last group of device parameters has been included in the structure SGD_setpoint_t.Inside this group are parameters received from IA or AMI (which manage the local grid) and read by the device to participate in the power management process.First, control commands have been defined in the enum list.Secondly, the referenced values of powers are set by sending the values from IA to the device, which are calculated in the power management algorithm implemented for the whole considered area or building.
Summarizing the proposed unified device model, it is possible to split all exchange information for: • parameters-constant during device operation, exchanged at the start: • SGD_rated_t; • SGD_operation_parameters_t; • outputs-values sent from the device to the IA or AMI: • SGD_instantanous_t; • inputs-values sent from IA or AMI to the device to manage the operating parameters and provide advanced energy management: This classification makes the proposed model easy to implement in many different communication standards suitable for industrial networks, power systems, micro-or smart grids like EtherCAT (for distances under 100 m between devices, e.g., buildings) [53,54], Ethernet, the MQTT protocol designed for IoT systems [25], PROFINET used in industrial application, e.g., renewable energy systems [27], Modbus RTU, or TCP/IP, widely used in the communication of power electronics devices [26].

Results
The developed model of the loads (sources, storage, and passive components) has been implemented in the C++ language separately for each device, HAN, and NAN IAs, working as energy routers.The language has been selected based on the specific applications-all small devices connected to the local grids controlled by microcontrollers.These devices communicate with the server by sending and receiving small, fixed-size data packets.C++ implementation allows precise management of data types and bit sizes to optimize data size.This makes it possible to determine how many bits are needed to store a given piece of information or parameter, e.g., SGD_lines_t can be stored on 2 bits, SGD_role_t on 4 bits, and SGD_work_type_t on 2 bits, which together gives 8 bits and can be stored in one memory address using the bit field structure mechanism.These three pieces of information can be sent as a single byte.However, for larger devices with large memory and database, IA, Energy Routers, etc., the same unified data model can be implemented using, e.g., Python or C#.
The proposed information model was verified in the simulation process, including two HANs with different devices cooperating in one NAN.The simulation model is presented in Figure 3.
to optimize data size.This makes it possible to determine how many bits are needed to store a given piece of information or parameter, e.g., SGD_lines_t can be stored on 2 bits, SGD_role_t on 4 bits, and SGD_work_type_t on 2 bits, which together gives 8 bits and can be stored in one memory address using the bit field structure mechanism.These three pieces of information can be sent as a single byte.However, for larger devices with large memory and database, IA, Energy Routers, etc., the same unified data model can be implemented using, e.g., Python or C#.
The proposed information model was verified in the simulation process, including two HANs with different devices cooperating in one NAN.The simulation model is presented in Figure 3.The distances between each device/load and HANs have been simulated by resistances relative to the lengths of electrical cables used in the local grid.The selected resistances are shown in Table 4.The different values of the resistances influence the voltage drop in each point of common coupling (PCC) managed by the HAN's IA.As a microgrid control strategy, the self-balanced process for each HAN was simulated based on The distances between each device/load and HANs have been simulated by resistances relative to the lengths of electrical cables used in the local grid.The selected resistances are shown in Table 4.The different values of the resistances influence the voltage drop in each point of common coupling (PCC) managed by the HAN's IA.As a microgrid control strategy, the self-balanced process for each HAN was simulated based on the examples of loads' and renewable energy sources' profiles.In each self-balanced area, the energy storage was simulated, charged only from local sources to decrease the power delivered from the main source (from WAN).

Symbol of the Resistor
Value Relative Distance The unified information model of each connected device is sent in both directions between the HAN and devices, as well as HANs and NAN IA.The studied power management method utilizing the proposed unified device model is shown in Figure 4.In the first step of the implemented control strategy, each HAN control unit collects the values of the actual active powers of the controlled N number of devices (included in SGD_power_t-Table 3).Then, the total power in the local HAN is derived: SGD_power_t-Table 3).Then, the total power in the local HAN is derived: Depending on the current direction, the power can be negative (related to the source or storage-energy is delivered to the grid/loads) or positive (energy is consumed or accumulated in the storage).Then, based on the device role, the algorithm can check if the storage is available to balance the power in the local area (based on SGD_role_t).If there is no storage, the power balance Ptotal is sent to the NAN controller as a total_active power of the HAN (SGD_power_t); otherwise, if there is storage with operating or ready mode (SGD_status_t), the algorithm checks the information about actual SOC.As long as the storage is not fully charged or discharged, the control unit calculates the reference power Pstorage_ref to provide the self-balanced operation: Data Get from local devices: loads, sources, storage (Figure 2) Depending on the current direction, the power can be negative (related to the source or storage-energy is delivered to the grid/loads) or positive (energy is consumed or accumulated in the storage).Then, based on the device role, the algorithm can check if the storage is available to balance the power in the local area (based on SGD_role_t).If there is no storage, the power balance P total is sent to the NAN controller as a total_active power of the HAN (SGD_power_t); otherwise, if there is storage with operating or ready mode (SGD_status_t), the algorithm checks the information about actual SOC.

Calculate
As long as the storage is not fully charged or discharged, the control unit calculates the reference power P storage_ref to provide the self-balanced operation: Providing complete information about the device, the HAN control unit can check in the next step if the calculated reference value is within the limit of the device's rated power (SGD_rated_t).In case of higher power demand than the rated power of the storage or if the SOC is in the limit, the information about the power balance in the HAN (1) is sent to the NAN to provide the balance from the nearest HANs or WAN.
From an electrical point of view, each device, load, storage, and source was simulated as a controlled current source based on the proposed unified information model.The simulation process was performed in a 24 s window, considering dynamic loads and source power changes like the typical day characteristics.The local sources could produce the energy only between 4 and 19 s of simulation (e.g., PV panels during summer days).The energy storage was considered fully discharged initially and charged only from local sources.The waveforms of the loads, sources, and storage powers obtained during the analyzed case are shown in Figure 5.All electrical parameters were transmitted with the delay of one sample time-277.8µs.As described in the previous section, the transmitted data were grouped separately as parameters, outputs, and input signals for each device.
be transmitted from WAN through transmission lines and the distribution grid, causing the voltage drop for the farthest point of the system (HAN PCC).It is shown in Figure 7b.The voltage can drop significantly depending on the internal line resistance (in the cable lines of the distribution grid).This situation corresponds to the standard grid operation without advanced power management algorithms or the proposed unified load information model.The process of charging energy storage starts at 9 when the balance of local loads' powers and local sources' powers calculated in the HAN's IA P total is negative (1).For each HAN, the different energy storage capacities were considered; therefore, at the peak of the power, the capacities reach a different level, as shown in Figure 6.Considering self-balanced areas (HANs) as a case study for implementing a developed unified load information model and energy management based on the exchange data, the power balance in the whole grid must be kept all the time.When the local microgrid-HAN-cannot provide the power balance for its loads, the HAN control unit sends a load information model to the NAN and provides information about the lack of power.Then, in 22 s, the NAN controller manages the energy exchange between the nearest HANs instead of WAN and the faraway generators.After the dynamic state, no current is transmitted from WAN (Figure 7a), and the currents between NAN and HANs appear.In the first 9 s, the power system works without energy accumulated in the storage.Therefore, there is no possibility of balancing the power in local HANs.The energy must be transmitted from WAN through transmission lines and the distribution grid, causing the voltage drop for the farthest point of the system (HAN PCC).It is shown in Figure 7b.The voltage can drop significantly depending on the internal line resistance (in the cable lines of the distribution grid).This situation corresponds to the standard grid operation without advanced power management algorithms or the proposed unified load information model.
After 9 s, the power balance in HANs allows for energy accumulation in the local storage and self-balancing separately in each local area.This situation can be observed in the current waveforms measured between HANs and NAN PCCs, shown in Figure 7a.No current is transmitted from the WAN or NAN part of the grid to the local areas.As a result, the local power balance improves the level of the local voltages in PCCs (Figure 7b), restoring the nominal RMS values of the measured voltages.During the condition changes, e.g., sudden load disconnection, the delay in the communication process causes the current and voltage impulses-dynamic states of the self-balancing process.Depending on the used communication interface and the distance between local devices and IA or energy routers, they can take a few seconds to minutes in the actual smart grid.
crogrid-HAN-cannot provide the power balance for its loads, the HAN control unit sends a load information model to the NAN and provides information about the lack of power.Then, in 22 s, the NAN controller manages the energy exchange between the nearest HANs instead of WAN and the faraway generators.After the dynamic state, no current is transmitted from WAN (Figure 7a), and the currents between NAN and HANs appear.

Discussion
The proposed unified data profile for the load, source, storage, IA, or Energy Router has been implemented in the C++ language in the simulation model of the microgrid, consisting of two local HANs and NAN.However, the defined code structure allows Considering self-balanced areas (HANs) as a case study for implementing a developed unified load information model and energy management based on the exchange data, the power balance in the whole grid must be kept all the time.When the local microgrid-HAN-cannot provide the power balance for its loads, the HAN control unit sends a load information model to the NAN and provides information about the lack of power.Then, in 22 s, the NAN controller manages the energy exchange between the nearest HANs instead of WAN and the faraway generators.After the dynamic state, no current is transmitted from WAN (Figure 7a), and the currents between NAN and HANs appear.

Discussion
The proposed unified data profile for the load, source, storage, IA, or Energy Router has been implemented in the C++ language in the simulation model of the microgrid, consisting of two local HANs and NAN.However, the defined code structure allows using any other language, like C or Python.The proposed solution models control and communication, including parameter-based profiles, input, and output data.Based on advanced communication with the pre-defined model of devices, including energy routers in HAN and NAN grids, this allows the development of many different power management strategies depending on the needs or grid codes.From the most common approach, the following can be considered:

•
Self-balanced local grids in HANs-tested with the described solution; • Dynamic energy tariffs and energy transmission based on the economic profits for customers;

•
Reduction in energy transmission in MV grids usually used between WAN and NAN grids; • Lack of energy compensated from the closest HANs to limit the current in the distributed NAN grids-tested with the described solution; • Energy management in the grid is based on artificial intelligence, machine learning, or optimization processes.
The same developed unified data profile for the loads and devices in the grid can be a source for the management algorithms.
In a future study, more strategies will be considered in developing an energy management algorithm based on the designed unified device profile.The research will focus on a comprehensive simulation analysis of developed algorithms and experimental verification of the developed dedicated laboratory station, including communication technologies like Ethernet, EtherCAT, PROFINET, Modbus TCP/IP, etc.

Conclusions
Without a unified device model, management of electrical energy systems in areas wider than one HAN, building, or residential sub-system and with many modern devices connected to the local grids is difficult and time-consuming.The unified data model split for strictly specific groups, parameters, inputs, and outputs, increases the possibility of developing advanced energy management methods dedicated to distributed generation systems.It must be possible to implement in the microcontroller with limited memory.Therefore, the proposed model was implemented in a low-level programming language, namely C++.It allows precise management of data types and bit sizes so that data packets are optimized in size.This makes it possible to determine how many bits are needed to store a given piece of information or parameter, e.g., SGD_lines_t can be stored on 2 bits, SGD_role_t on 4 bits, and SGD_work_type_t on 2 bits, which together give 8 bits and can be stored in one memory address using the bit field structure mechanism.These three pieces of information can be sent as a single byte.
From the point of view of the energy or power management algorithms described in the literature, the model provides all the needed information to use advanced management methods, optimization processes, artificial intelligence, machine learning, etc.One unified model implemented in each device separately can be used with different communication infrastructure and protocols, and it does not require integrating many different communication interfaces or additional data mapping in area control units, which is needed when each device has a different data model.

Figure 1 .
Figure 1.The block scheme of a smart grid as a CPS-Energy Internet split to HAN, NAN, and WAN zones.

Figure 1 .
Figure 1.The block scheme of a smart grid as a CPS-Energy Internet split to HAN, NAN, and WAN zones.

Figure 2 .
Figure 2. The block diagram of the unified smart grid device model used in the HAN.

Figure 2 .
Figure 2. The block diagram of the unified smart grid device model used in the HAN.

Figure 3 .
Figure 3.The block scheme of simulated microgrid with two HANs in one NAN.

Figure 3 .
Figure 3.The block scheme of simulated microgrid with two HANs in one NAN.

Figure 4 .
Figure 4.The flowchart of the selected power management method (locally balanced power) was implemented in the HAN control unit.

Figure 4 .
Figure 4.The flowchart of the selected power management method (locally balanced power) was implemented in the HAN control unit.

Figure 5 .
Figure 5. Active powers of the loads, sources, and storage during the analyzed time window: (a) power waveforms for HAN 1; (b) power waveforms for HAN 2.Figure 5. Active powers of the loads, sources, and storage during the analyzed time window: (a) power waveforms for HAN 1; (b) power waveforms for HAN 2.

Figure 5 .
Figure 5. Active powers of the loads, sources, and storage during the analyzed time window: (a) power waveforms for HAN 1; (b) power waveforms for HAN 2.Figure 5. Active powers of the loads, sources, and storage during the analyzed time window: (a) power waveforms for HAN 1; (b) power waveforms for HAN 2.

17 Figure 6 .
Figure 6.The energy capacity of the storage in each HAN during the analyzed time window.After 9 s, the power balance in HANs allows for energy accumulation in the local storage and self-balancing separately in each local area.This situation can be observed in the current waveforms measured between HANs and NAN PCCs, shown in Figure 7a.No current is transmitted from the WAN or NAN part of the grid to the local areas.As a result, the local power balance improves the level of the local voltages in PCCs (Figure 7b), restoring the nominal RMS values of the measured voltages.During the condition changes, e.g., sudden load disconnection, the delay in the communication process causes the current and voltage impulses-dynamic states of the self-balancing process.Depending on the used communication interface and the distance between local devices and IA or energy routers, they can take a few seconds to minutes in the actual smart grid.Considering self-balanced areas (HANs) as a case study for implementing a developed unified load information model and energy management based on the exchange data, the power balance in the whole grid must be kept all the time.When the local microgrid-HAN-cannot provide the power balance for its loads, the HAN control unit sends a load information model to the NAN and provides information about the lack of power.Then, in 22 s, the NAN controller manages the energy exchange between the nearest HANs instead of WAN and the faraway generators.After the dynamic state, no current is transmitted from WAN (Figure7a), and the currents between NAN and HANs appear.

Figure 6 .
Figure 6.The energy capacity of the storage in each HAN during the analyzed time window.

Figure 7 .
Figure 7. Currents between each grid area (WAN to NAN, NAN to HAN 1, NAN to HAN 2) and voltages in PCCs: (a) currents between HANs and NAN, and current from WAN to NAN; (b) voltages in HANs and NAN PCCs.

Figure 7 .
Figure 7. Currents between each grid area (WAN to NAN, NAN to HAN 1, NAN to HAN 2) and in PCCs: (a) currents between HANs and NAN, and current from WAN to NAN; (b) voltages in HANs and NAN PCCs.

Table 1 .
Connection types of smart grid devices.

Table 2 .
Types of the load work time and the main energy sources to keep the power balance.

Table 3 .
Structures and enumeration list implemented in the proposed load model.

Table 4 .
Resistances of low-voltage grid cables connected to the loads and different microgrid areas.