# Design of a Partially Grid-Connected Photovoltaic Microgrid Using IoT Technology
## 1 Introduction
The implementation of DR is still limited due to the lack of deploying smart technologies as well as the corresponding regulations [17]. The current Saudi Electricity Company (SEC) billing structure still utilizes traditional flat tariffs with no incentive packages to decrease their demand during peaks. In a recent study, a pricing scheme that includes time-of-use tariffs (TOU) is discussed and analyzed [18; 19; 20]. The TOU could increase billing during summer to 42-57% higher. In this study, the households were assumed to respond in different ways: (1) regulate their thermostat set-point to lower air conditioning demand, (2) either shift unneeded appliances to different periods of the day, or (3) invest in energy measures. Meanwhile, the SEC has started an ambitious project towards digital transformation by installing 10 million smart meters throughout the Kingdom by the year 2021 G. The most interesting feature is that customers can access real-time data about their consumption and hence, adjust their consumption patterns as needed [21]. Furthermore, regulations and bylaws that govern small-scale photovoltaic integration into distribution systems have been approved by Electricity and Cogeneration Regulatory Authority's Administrative [22]. This shows the Saudi Electricity Company's commitment to the objectives of the Kingdom's Vision 2030 on renewable and sustainable energy [23; 24]. Smart grid systems rely heavily on communication facilities to function. Power-line communication, wireless mesh networks, Cellular, satellite communication, fiber-optics, and short-range communication, are among the communication technologies projected to be used in the smart grid. The use of modern communication technologies in the smart grid is influenced by a variety of factors including geographic locations, application requirements, regulations, environmental issues, pricing, security, reliability, and many other factors [25]. Since the smart grid is currently receiving widespread usage from modern communication technologies, cyber security has become more essential for secure practices [26; 27]. The cyber security measures aim to prevent data eavesdropping, prevent hazardous malware from running on smart grid embedded devices in addition to protect ing customer privacy. A cyber-physical system (CPS) generally consists of a three-layer architecture (application, communication, and physical sensor devices) considered to employ contemporary ICT to manage physical system components remotely. The current use of CPS has been extended to many vital sectors including: construction, transportation, E-health, military, and smart-grids [28]. The emerging internet of things (IoT) technology interconnects the CPS system whereas its architecture can be modeled as a multilayer system. Integration of IoT technology has provided comparable potentials and several benefits to the electricity industry [29]. The whole process of power generation, transmission, distribution, consumption, and management may be made more efficient and intelligent by integrating the IoT components in power system nodes. By making autonomous decisions and taking reliable actions based on monitored situations, the performance of these intelligent nodes can be greatly enhanced. They can also interact with each other and coordinate the efforts to more effectively achieve system-wide goals. Communication infrastructure is a vital element in the design of the microgrid. There are two types of information that need to be transmitted across the microgrid: control signals and raw data. Each category should be treated with a given quality of service (QoS) and security level. Furthermore, the transmission distance, frequency of transmissions, and cost are also key parameters that need to be accounted for to choose the suitable communication protocol [26; 30]. Various reports have been published that compare and contrast the existing communication standards to fulfill the requirements for each smart grid application [31; 32].