The logical architecture developed for the interaction between devices and control algorithms is represented in the figure, which is based on the European Project FIWARE. - Develco Gateway: The entry point from the hardware perspective is this gateway that interfaces the ZigBee network with the local IP network. At the lowest level, a JAVA application is responsible for the interaction with the devices. This application manages the system status by adding, removing and maintaining the ZigBee network and devices in it, using the Develco API for this interface. To transmit the information to higher layers, the lightweight text-based HTTP protocol UL 2.0 is used due to the limited resources. - Smart Spot Gateway: As the Develco gateway, it acts as the interface between the Weather station and an IP based network. In this case, the M2M communication protocol LwM2M is used for communication with the higher layers. - IoT Agents: They are FIWARE Generic enablers (GEs), which translate the information coming from the gateways into a standardised representation. This standard is the NGSI, which models the different physical and logical entities in the house. - Context Broker: The context broker is the cornerstone of the system. It contains the most recent state of each of the entities. In our case, that means the measures and command status of the IoT devices as well as the characteristics of the resources (Appliances and DERs) and additional entities such as Rooms and Houses used for grouping purposes during energy management algorithms. - 3rd Party API: The context broker can also subscribe to information that is provided by external services such as dynamic energy prices, and consumption and generation forecasting models. - EMS modules: This service, developed at AAU, allows for optimal management of the renewable resources with different objectives such as minimum cost, maximum renewable usage or peak shaving among others. - DR module: This service was also developed at AAU and carries out the internal management of the appliances to comply with the consumption limits and curtailments imposed by the EMS. For this aim, it implements a series of algorithms where priorities are set among loads to disconnect those considered not critical for the conform of the users. - Persistence: The context broker provides the most recent state of the entities. To implement a memory in the system, this module subscribes to all the changes in the context broker and store the historical information into a database system. - Visualisation & Configuration: A series of utilities were developed to monitor the historical information of the system, visualise real-time operation, act over the appliances and configure the system both from the installation point of view and from the energy management and demand response parameters.

    These two boards integrate all the possible connection in the house when it comes to energy resources and supply system. From the resources point of view (board on the right) seven connectors are available with: - PV roof installation - Wind turbine - µCHP unit - Battery pack - Electrical vehicle charger - DC connection to the Microgrid and Energy internet laboratory - Electrical underfloor heating Regarding the supply options (board on the left) three different supply rings can be used around the house: - 3-phase AC system - DC system at 24 or 48 V. - DC system from 400 to 500 V In addition to the resources board, the current configuration is shown in the green schematic (top left). In brief, the connection with the main grid is done through a Smart meter as in every house in Denmark. Subsequently, a point of common coupling is created with the Prosumer meter. This device, manufactured by Develco products, allows for the measurement of 3 different components: (i) the exchanges with the grid, (ii) the household consumption, and (iii) the renewable production. Among the variables that can be measured in each component we have: - Active, reactive and apparent power per phase. - Voltage and per phase, and frequency. It should be also pointed out the before connecting the renewable production, in this case just the wind turbine, to the prosumer meter, a relay has been connected in series to be able to schedule the wind turbine.

    Every room in the IoT Microgrid Laboratory has two underfloor heating systems. Due to the fact, that water-based heating (district heating) is extremely common in Denmark, every room in the IoT Microgrid Laboratory has a water-based underfloor heating system. Together with that, as underfloor electrical heating is another fairly common solution, each room is also equipped with an electrical heating system. In the case of the hot water, it comes from the µCHP unit that burns gas to heat to the water while also producing electricity as a by-product. Then, the water is circulated to the room from a central manifold in the control room. For the electrical system, it can be either be supply directly from the grid or from a connector installed in the resource board. The temperatures in each room can be controlled individually by means of wireless thermostatic interfaces which are connected to a centralised system.

    In order to interface the different available resources with the supply system of the IoT Microgrid Laboratory, various stages of power conversion are needed. This cabinet, currently under development, will allocate all of them. Among the power converters that will be used we can name the ones shown in the picture (From left to right): - Regatron: AC/DC converter which can provide a regulated DC bus up to 500 V. - TDK Lambda: DC/DC bidirectional converters, which can be used as battery charging/discharging controllers or for regulating the voltage between two DC buses with different levels. - Danfoss FC 302 converters: with rates of 2.2 and 11 kW, they can be used for AC/DC, DC/AC and DC/DC conversion between resources and supply buses. - Imperix full and half-bridge converters: can be used for low power demanding conversions specific functions such as MPPT tracking systems for the PV roof installation. In addition, a dSPACE real-time platform is installed in the cabinet for coordinated control of the power conversion units. As a novelty here, the dSPACE will be interface with wireless communication modules so the control parameters can be provided directly and autonomously from the IoT infrastructure.