Perspectives on Dual-Purpose Smart Water Power Infrastructures for Households in Arid Regions

In hot arid climates, freshwater and power are produced simultaneously through seawater desalination since these regions receive little rainfall. This results in a unique urban water/power cycle that often faces sustainability and resilience challenges. Elsewhere, such challenges have been addressed through smart grid technologies. This chapter explores opportunities and initiatives for implementing smart grid technologies at household level for a case study in Qatar. A functional dual-purpose smart water/power nanogrid is developed. The nanogrid includes multiloop systems for on-site water recycling and on-site power generation based on sustainability concepts. A prototype dual-purpose GSM-based smart water/ power nanogrid is assembled and tested in a laboratory. Results of case study implementation show that the proposed nanogrid can reduce energy and water consumptions at household level by 25 and 20%, respectively. Economic analysis shows that implementing the nanogrid at household level has a payback period of 10 years. Hence, larger-scale projects may improve investment paybacks. Extension of the nanogrid into a resilient communal microgrid and/or mesogrid is discussed based on the concept of energy semantics. The modularity of the nanogrid allows the design to be adapted for different scale applications. Perspectives on how the nanogrid can be expanded for large scale applications are outlined. is expected to rise in large-scale applications. Payback analysis shows that the combined smart water power nanogrid is moderately attractive and yet environmentally friendly by nature. Prototype tests demonstrated that the proposed system could function properly when implemented in homes. Improvements in gray water collection and treatment processes could result in more benefits. A future improvement of the prototype is to devise the capability to identify the number of leaks as well as determine the exact location of the leaks. Results of such findings can shed light on the further contribution of nanogrids in reducing (a) water losses and (b) water and energy consumptions, thus making homes more energy efficient.


Introduction
Water and energy are among the most important commodities in life. They support growth, development, and human survival on earth. Consequently, sustainable water and energy supply have become critical issues of consideration in most parts of the world [1,2]. Moreover, the water and energy nexus has been a great subject of debate for decades [3,4]. For example, the United Nations has predicted a 40% global shortfall of water availability by 2030 and a 50% global short fall on energy [5,6]. In spite of these observations, the demand for energy has been on the rise as various national economies become more and more advanced. In addition, climate change studies have projected unique changes in urban water cycles, thus making it more difficult for national economies to balance water supply and distribution now and in future plans. These difficulties add more strain on energy supply and freshwater access [7]. Freshwater concerns are even more critical in hot arid regions characterized by low rainfall and harsh climate. This chapter discusses potential solutions to sustainability challenges with reference to water and energy conservation. The underlying theme lies in that implementation of smart water and energy technologies has a significant impact on water and energy conservation practices in arid regions.
In most arid regions, water and energy supply networks are implemented as separate single-loop systems. This means that the stages of the current water/power cycle do not intersect and yet these commodities are produced simultaneously in dual-purpose water/power production plants. In practice, the urban water/power cycles often face challenges that require further investment by local authorities in a bid to mitigate the effects of sustainability challenges. In addition, population growths and rapid economic developments often strain water/power supply and distribution networks, thus making the urban water/power cycle less sustainable. It is therefore important to rethink the urban water/power cycle in a bid to develop water/power infrastructures that can improve the water/power use efficiencies at the household level by incorporating smart technologies.
Smart technologies have been implemented with benefits that support sustainability goals [8][9][10]. In the public literature, smart energy grids have been discussed thoroughly by many authors [11][12][13]. Smart energy grids have also been successfully implemented in various parts of the world [14][15][16]. A number of benefits associated with smart energy grids have been identified including economic [17,18], environmental [18,19], reliability [20,21], and customer choice [22,23]. Such benefits significantly contribute to both resilience and sustainability. While the literature is overwhelmed with smart energy grids, relatively little is known about smart water grids [24][25][26]. Of late, smart water grids have been found to hold a lot of potential for unlocking the requirements for a sustainable, stable, reliable, high-quality, resilient, and secure water supply system. Another prominent gap in the public literature lies in that water and energy smart grids are usually discussed separately. While this may be appropriate for other regions of the world, the unique connection between water and energy in arid regions requires special considerations and technologies that are more appropriate. In the Gulf Region, for example, water and energy are produced simultaneously [27][28][29]. It has been shown that there is an inherent link between energy and water [30][31][32]. It is, therefore, necessary to investigate opportunities and initiatives for developing dual-purpose water/power smart grids. Perspectives on the design and operations of such a smart grid will be discussed with reference to a case study in Qatar.
The common practice in Qatar is that once water and power are produced, they are distributed separately to residential areas. At the household level, water is pumped into a tank positioned at the roof of villas. After use at different end points, this water is directed into a sewer line where it is mixed with black water and further directed to wastewater reservoirs. Separating and reusing this water at the source (household) may prove beneficial. On the other hand, solar energy in Qatar is currently found in isolated areas that are far from grid connections. Most of the energy generated from solar is used as supplements to the main grid power. There is a need to increase the fraction of renewable energy in Qatar since the insolation is relatively high. This can position Qatar toward achieving sustainability goals as stipulated in the Qatar National Vision 2030.
One way of addressing sustainability issues is to closely examine the 6Rs of sustainability, i.e., reduce, reuse, rethink, recycle, refuse, and repair [33]. The purpose in implementing the 6Rs is to obtain the most practical benefits from products, processes, and systems and to generate the least amount of wastes. This approach also activates other external positive issues such as pollution reduction, resource saving, and avoidance of greenhouse gas emissions. The discussions in this chapter derive inspiration from four of these 6Rs, i.e., reduce, reuse, recycle, and rethink. Rethink is about trying to think (in a different way) how to generate electricity and provide useful water in order to minimize the consumption of the main grid electricity and freshwater. For example, generating electricity from the velocity of clean or wastewater in water pipes (in-pipe hydropower generation) and treating the wasted water instead of disposing it to the main sewage directly after use are noble initiatives that can help in conserving both energy and water. In addition, current system designs for water are single-loop system from utilities. The idea in this work is to investigate the usefulness of multi-loops of water (freshwater, gray water, and black water) and energy (main grid supply, renewable energy micro-generation, and in-pipe hydroelectricity) at the household level in a bid to rethink and reuse available resources to the maximum possible. Design, development, and implementations of such multiple loops of energy and water deviate from the common single-loop systems and thus constitute an initiative for rethinking the energy and water networks at end-use locations.
Reduce is about reducing and minimizing the wasted water "produced" in the household as well as reducing the consumption and electricity from the main grid supply by implementing renewable energy and smart technologies in the existing infrastructure. It is also about behavioral changes due to the conscious realization, by residents, of "wasteful" consumption of water and energy. Reuse is about reusing gray water produced in the house after treating it. The treated water can be "reused" for watering the gardens, car washing, as well as toilet flushing instead of "throwing the water down the drain." Recycle is about collecting the gray water that is produced at different end points in the house, such as sinks, showers, and washing machines for the purpose of treating and reusing the gray water at the source instead of sending it to the main sewage line where it is further contaminated by black water. Based on the concepts discussed in the previous paragraphs, this chapter discusses the development of a smart dual-purpose water/power nanogrid under the climatic conditions in Qatar.
According to the Qatar National Vision 2030, Qatar aspires to be an advanced society capable of sustaining its development and providing a high standard of living for its residents [34]. However, with the current population explosion and numerous construction projects, the utility companies in Qatar may face a number of water and electricity consumption challenges. For example, the residents in Qatar consume nearly twice the average consumption of water and electricity in other parts of the world, the EU being a specific example [35]. Statistical projections show that these consumption rates are expected to double in the near future, thus further straining the balance between water/energy supply and demand. In a bid to provide solutions for these challenges, the effects of implementing smart technologies are discussed in this chapter. A combination of smart water and smart energy technologies are discussed, and perspectives on how to integrate them into a functional nanogrid for a single household are outlined. The motivation emanates from the observation that residential water and energy infrastructures often waste substantial quantities of freshwater and energy. Therefore, there is a need to reduce water and energy consumptions at the household level.

Background
Water and energy resources are communally and reciprocally linked since meeting energy needs requires water and vice versa [3,4]. The consensus is that saving Electric Power Conversion water saves energy and energy efficiency opportunities are often linked to water savings. Albeit, both initiatives result in less carbon emissions. In hot arid climates, this relationship is intertwined since water and energy are produced simultaneously in dual-purpose water/power production plants. Therefore, addressing water and energy issues in tandem can result in significant benefits for utility companies.
Improving efficiency of energy and water in the supply and demand sides can allow national economies to reduce resource consumptions as well as maximize benefits for utilities, consumers, businesses, and communities. National economies need to increase water and energy security while reducing the environmental impacts of water and energy use. This means that available water and energy must be used more efficiently. Energy consumption in water reticulation systems can be reduced by using energy recovered from household water systems and wastewater at nanoscale to produce power on-site. Power consumption can be reduced at the household level by, for example, giving residents detailed energy consumption information that can be used by residents to decide on how best to use energy in their homes.
Assessment of end-use energy and water efficiencies provides information that can be used to find ways of reducing the strain on the main power grid and water distribution network. However, a number of barriers and challenges may exist. In the Gulf countries, for example, there is currently an overall trend toward larger homes and a greater variety of appliances and electronics in each home. This trend further strains the water and energy resources at the national level and hence contributes to the imbalance on water and electricity supply and demand. Options for increasing end-use energy efficiencies include renewable on-site power generation, implementing well-designed energy codes and standards, improving end-use appliance energy efficiency, using efficient plumbing fixtures, and educating homeowners about behavioral changes that will result in significant reductions in energy consumptions. Since water and power are produced in expensive seawater desalination plants, water conservation and water recycling are important initiatives that can be used to leverage end-use efficiencies. Furthermore, such initiatives support sustainable developments.
Energy use in residential buildings account for about 17% of US greenhouse gas (GHG) emissions [36,38]. Unlike the Gulf countries, the large share of residential building energy consumption is attributable to space heating and cooling, which varies with climate conditions. In the Gulf countries, cooling accounts for about 70% of energy used in residential buildings [37]. Other energy uses are related to providing power to various household appliances that are used randomly. Reducing energy consumptions of these end uses is difficult since it requires different technological improvements for each appliance as well as behavioral changes that aim at increasing energy efficiency and conservation . This represents significant challenges to sustainability goals. While many options are available for providing clean water, seawater desalination has taken the center stage in the Gulf countries. Common technologies for seawater desalination include multistage flash distillation, multi-effect distillation, and reverse osmosis. Since environmental concerns are on the rise, renewable energy technologies are becoming more important and attractive partners for powering water desalination projects in arid regions [39], while desirable, renewable energy cannot cope with the quick, discontinuous, and uncontrollable falls and peaks in electricity demand. Since renewable energy technologies depend on the season and the time of the day, their integration poses challenges to the traditional grid systems. Generating electricity from renewable energy, mainly photovoltaics (PV), wave, and wind power depend extremely on the unpredictable nature of weather conditions and status [40]. If new electric devices are employed in the renewable energy-based electricity systems, great achievements can be realized. Examples of electric devices and components that can support renewable energy electricity integration include advanced batteries, inverters, advanced controllers, and smart technologies [40].
In the case of clean water, drivers that support water security are water conservation, water recycling, and efficient water use. A number of mechanisms are available for conserving water. Typically, groundwater aquifers collect less than 40 million m 3 annually as natural recharge. This imbalance makes the need for changes and rethinking the water cycle obvious. Minor changes such as changing a showerhead to a more efficient one can save small amounts of water at the household level. Hence, the impact of such changes is limited if one household is considered. This impact can be significant if large communities and neighborhoods are the bases of the analysis. Other opportunities include industries and commercial sectors taking the initiative to recycle and reuse both gray and black water on-site. A collective support of this kind from residential areas, industries, and commercial sectors can significantly impact the strain on the main grid freshwater supply.
Water use patterns are critical to any water conservation solutions. For example, in the urban areas in Portugal, the residential sectors were observed to have the highest water demand when compared with the industrial, commercial, and institutional sectors [41]. Reducing the domestic water consumption rises important benefits like the postponement of investments in the water supply system expansion and pump nanogrid upgrade. It also reduces peak and average effluent loading to the wastewater system [42]. A significant reduction on energy requirement is caused by a lower water demand in the household (e.g., for water heating). In addition, the water end-use sector of a distribution system (i.e., activities that use water in buildings and homes) has been found to be the highest energy intensive part in the urban water supply systems [43]. Such analysis, data, and information gathering can provide useful insight into practical water end-use efficiency programs that can be used by utility companies for the benefit of national economies.
Many studies have been conducted, for example, by Loh and Coghlan [44], Willis et al. [45], Beal et al. [46], Matos et al. [47], Cole and Stewart [48], and Omaghomi and Buchberger [49], to describe and characterize the types of water uses. These studies show that water end-use characteristics generally differ from place to place. Hence, it is important to analyze water end-use within local context in order to develop tools, mechanisms, and techniques for improving water end-use efficiencies. Studies by Willis et al. [50], Matos et al. [51], and Hunt and Rogers [52] demonstrated the relationships between consumer sociodemographic characteristics, end uses and consumer attitudes, and water end-use efficiencies. Willis et al. [53], Lee et al. [54], and Carragher et al. [55] reviewed the effect and the influence of the residential water use efficiency measures on water demand.
Improving the collection of gray water might significantly decrease the amount of clean water that is being used in landscaping, gardening, and toilet flushing at the household level. In Qatar, for example, gardening consumes around 5% of the total freshwater at household level. Albeit, gray water produced at houses is usually sent down the drain in sewage pipelines. Although the amount at one household may seem small, it is the collective actions of all residential areas that will affect the main grid strain on freshwater supply for a national economy. In addition, a lot of gray water is produced in other places such as mosques, air-conditioning units, shopping malls, and corporate buildings. By rethinking this practice, gray water collected for recycling from different places can be treated using simple processes to make this water suitable for gardening, landscaping, agriculture, construction works, and district cooling services. In spite of these potential reuses and recycling possibilities, gray water and black water in the case study villa is currently being channeled into a shared sewage system, which makes the gray water highly unusable. Although Qatar has a huge and a broad network system for collecting and treating the domestic wastewater, separation of the wastewater at the source can be more beneficial and more cost-effective in the long run than the central collection and treatment practices in the case study.
Due to the problems and challenges faced by the water sector, a number of water intelligence tools have been developed worldwide to alleviate global water issues. Information and communications technology (ICT) offers valuable chances to improve the efficiency and the productivity within the water sector, with the purpose of contributing to the sustainability of the resource. The increasing availability of more intelligent, ICT-enabled means to manage and protect the water resources of various national economies has led to the development of smart water management (SWM). The SWM approach promotes the sustainable consumption of water resources through coordinated water management, by integrating ICT products, solutions, and systems, targeted at maximizing the socioeconomic welfare of a society without compromising environment [56]. In Qatar, the potential use of ICT-enabled technologies has been initiated by Ooredoo, the telecommunication company in a pioneer project that aims to make Qatar's Lusail City a smart city.
The concept of smart water involves gradual convergence and integration of ICT solutions applied within the water domain. The smart water concept seeks to promote a sustainable, well-coordinated development and management of water resources by the integration of ICT products, tools, and solutions, thus providing the basis for a sustainable method to water management and consumption. An alternative way for more efficient water management could be offered by an approach that is fully linked to the quality of the vision developed for the Water Business Information System [57]. The more advanced ICTs used in the water system, the smarter the water becomes. For example, a water system with smart meters and smart pumps and valves is smarter than a system with smart meters only.
The concept of smart water and the level of water smartness depend on the number and the advancement of ICTs successfully implemented in the system. The implementation of the smart water concept has enabled significant improvement in water distribution, has helped to enhance wastewater and storm water management, and has helped to decrease losses due to nonrevenue water. The advantages of applying the smart water concept include increasing water quality and reliability, decreasing water loss due to leakage, reducing operational costs, ensuring proper management of green systems, and improving customer control and choice. At the household level, these advantages increase water end-use efficiencies, while at the national level, they increase the efficiency of the water sector and hence play a significant role in conserving water and thus reducing the strain on the main grid water supply and distribution [56]. A number of countries and communities have embraced smart water technologies [58][59][60]. Data obtained from implementation of smart technologies can help utilities in discovering problems on the consumer end of the water system. Consumption rates of water and power in Qatar are relatively high. This puts a large strain on the utility company. While the utility company has successfully implemented a number of projects to conserve water and power along the supply and distribution network, relatively few projects have been done in Qatar to reduce water and power consumptions at the household level. Most of the successful attempts at the household level have been through plumbing fixtures and conservation programs aimed at making residence aware of the need to conserve both water and power through Tarsheed, a proponent of the local water and power company.

Methodology
Both qualitative and quantitative approaches were used to synthesize the smart water/power nanogrid for households. Data was collected from a case study villa in Qatar. Analysis of the current situation revealed that at the household level, a number of factors influence water and power consumptions in Qatar. One of the factors is the water and power technologies implemented at the household level. Although a number of water and power saving tips have been provided by the utility company, no strict rules, regulations, or policies that directly influence water and power consumptions at the household level are available, although there are plans underway. Typically, most houses in Qatar are water and power metered, but the water and power rates are heavily subsidized by the government. In addition, no smart metering was available in households at the time when this project was carried out, although plans for smart metering were in place in the developing smart city of Lusail. Moreover, no information devices and except readings from conventional meters were available at the household level. Among the various types of residential unit villas were selected for case study since they composed the vast majority of residential preference of Qatar's residents. With various customer sectors, the focus on residential units also stems from its consumption contribution, with almost 90% of the national water consumption concentrated in residential areas [61]. A description of the case study villa is given in the following section.

Case study description
A typical three-storey villa was chosen as a case study in the development of the proposed smart water/power system. At the villa, consumption points include the bathroom and kitchen sinks, bathtubs, toilet, washing appliances, and garden watering. Wastewater from the houses is classified into two categories, i.e., black water (water produced from toilets and bidets) and gray water (water produced from all sinks, showers, and bathtubs). Black water and gray water are not separated in the current household water network outlet piping but are collected into one sewer pipe before disposal into the main sewage network. It is important to note that most villas in Qatar have a flat roof and there is no provision for harvesting rainfall since there is very little rainfall. In addition, vertical roof-mounted tanks are a common site in most villas in Qatar. Usually, a camouflage or protection structure is provided to make the roof tanks less visible. It is also important to note that typical families in Qatar are relatively large, with an average of 10 incumbents. A pictorial, schematic, and plan view of the case study villa is shown in Figure 1.

Assumptions
Based on survey results, a number of assumptions incorporated into the analysis were made as follows: • A typical house in Qatar is designed for a family of 10 people.
• Consumption of water is the same in all households, as they are averaged per residential unit.
• All household pipes can be customized to meet the functional requirements of smart water and power technologies. This allows retrofitting.
• All smart water and power technologies will not cause any interference or degradation of the water and power quality or services provided by the main grid components.

Data collection
Sources of data include data logging of water and power consumption data, in-home interviews, as well as water and electricity meter billing data. Smart meters and a logger were installed in the case study to collect flow observations from each water consumption point in the house. The collected data was used to determine the various water consumption events in the household such as volume, average flow, and maximum flow. Water and power consumptions are the amounts of water and power that reach consumers or end users and are usually estimated by water or electricity meters at the consumer and end-user points.

Water and energy consumptions
Pattern of water consumption on a typical day for the case study villa is shown in Figure 2. Typical monthly water consumption for the case study villa is also shown in Figure 3. Figure 2 shows that water consumption per day varies from hour to hour depending on the needs of the people in the household. For example, Figure 2 shows peaks at certain times (e.g., 7 am and 5 pm-7 pm) of the day corresponding to the times when water is required by most people in the household.   Figure 3 shows that the daily water consumption in the case study varies greatly from day to day. For example, it can be observed that there are peaks of water consumption at regular intervals throughout the month corresponding to high water consumptions. Interviews with residents in the case study villa revealed that more water is required on these respective days of the month for other uses such as various types of cleaning activities. Although variations are inevitable, the analysis in this work is based on the fact that there is a consistency in the flow patterns of residential water uses [62]. Pattern of power consumption on a typical day for the case study villa is shown in Figure 4. Typical monthly power consumption for the case study villa is also shown in Figure 5. Figure 4 shows that power consumption per day varies from hour to hour depending on the needs of the residents. For example, Figure 4 shows peaks at certain times (e.g., 7 am-9 am and 12 noon-8 pm) of the day corresponding to the times when power is required most in the household. Figure 5 shows that power consumption per month varies from day to day depending on the needs of the residents. For example, Figure 5 shows peaks on certain days of the month corresponding to days when power is required most in the household.

Water and power end-use fractions
It has been observed that the majority of Qatar's water consumption is centered on residential areas [35]. Hence, more has to be done to conserve water in residential areas. The main sources of leakages in households are the faucets, toilet seats, bidets, showerheads, tubs, and junction points between pipes. Some of the reasons cited for these leakages include different types of materials used in pipping, changes in different pipes sizes, high water pressure at junctions' points between pipes, and the materials' corrosions of pipes. Besides losses at these leakage points, a lot of water is used by residents for various reasons. Figure 6 shows the daily water and power fraction end use for the case study villa.
From Figure 6, it can be observed that the main points of potable water consumptions in the house are bathing, personal washing, and toilets. Bathing contributes 43% of the total daily potable water consumed in a typical house, while air conditioning contributes 60% of power consumed in a typical house in Qatar. Since air conditioners are used most of the day during summer, a lot of condensate is drained and redirected into the sewer line as gray water. The proposed household nanogrid collects gray water from various consumption points and redirects it for reuse.

Design and analysis
The design analysis presented in this section is based on the information obtained from the case study villa. Proposed design perspectives are based on rethinking the urban water and energy cycles. The theme is devised based on methods, techniques, and technologies for transforming the current water and energy infrastructures into a completely redesigned setup based on the following concepts: multi-utility loops, smart water and energy, integrated gray water infrastructures at the household level, and separation of water resources at the household level.

Multi-utility loops
Multi-utility design features can be used to collect data from all types of smart meter installations. This requires implementations of multi-utility metering and multi-utility controllers that ensures security in data communication. For the case study, the proposed design implies a system that enables multiple loops for multiple alternative water sources, i.e., water from the main utility grid, water collected from various consumption points in the house, and water collected from air-conditioning units. Water from the household consumption points and water from the air-conditioning systems are gray water that can be treated on-site. The aim in implementing the multi-loop system is to ensure maximum use of water available at a household. This requires additional piping as well as wastewater treatment systems. The objective is to design and implement a water nanogrid that minimizes the carbon footprint of water use and reduces water leakages. The electricity network is envisaged to have multiple loops, each loop representing the source of on-site energy generation. Available power loops that have been included in the analysis are main power grid, solar PV, and in-pipe hydroelectricity. In such a design, a multi-utility controller will enable communication among the various consumption meters installed in the house in order to determine how much water or power is at disposal. Several costs are involved when upgrading the current water and energy infrastructures in households. Such costs include cost of smart meters, cost of installation and maintenance, as well as costs of data communication tools.

Design requirements
The dual-purpose smart water/power nanogrid is envisaged to be made up of water and energy smart technologies integrated into a nanogrid for household use. The purpose of such a nanogrid is to help in conserving water and energy. Such a nanogrid includes on-site power generation, on-site water recycling and reuse, as well as communication interfaces that will provide real-time information to household users about water and energy consumption levels. On-site power generation will reduce dependence on the main power grid and hence alleviate the strain on balancing power supply and demand. On-site water recycling will reduce consumption of freshwater, thus relieving the strain on freshwater supply networks. Information provided through the communication interface is expected to influence the behavior of household users in terms of sensible water and energy consumptions at the household level. Design parameters were collected from the case study. Based on the results of a survey carried out in a residential community in Qatar as well as the survey from the utility company, a number of design requirements for a smart water/ power system at the household level were identified and are summarized as follows: The conceptual design of the smart water/power system consists of different types of components. System design parameters for visualizing the architecture of the proposed smart water/power system were derived from the general nanogrid concept, i.e., nanogrids are autonomous renewable energy systems that do not interfere with the main grid. This consideration was important since currently the utility company in Qatar does not allow transfer or sharing of power across the main grid. The conceptual extension of nanogrids relates to an integral nanogrid composed of both smart water and energy technologies. The combined inclusion of smart water and power technologies in one nanogrid constitutes an important nanogrid design worth pursuing. With such nanogrids in place, it will be easier to translate existing nanogrid into a functional smart microgrid. Technologies selected for the nanogrid include solar PV, reverse osmosis, pumped storage, inpipe hydropower generation, as well as energy storage components such as batteries. Target design specifications for the smart water/power system were derived as follows: 1. On-site generated power must be able to supply at least 20% of total household energy requirements (based on the Qatar National Vision 2030 aspirations). 2. Solar PV panels (monocrystalline type-as per utility company preference) are to be roof mounted, and the total area of these panels must not exceed the roof area ≈ 400 m 2 for a typical villa in Qatar.
3. Since the AC load will be provided by the main power grid, there must be two controllers in the system: one for the DC load and another one for energy storage.
4. In-pipe generator unit has to be installed within 25 mm of water supply pipes in the other floors of the house based on the current water reticulation pipe network system in the case study.
5. In-series generator units must have a distance of 4× pipe diameter apart.
6. Reverse osmosis unit should be able to process gray water with the following parameters: temperature ≈25°C and pressure ≈1.5-7 bar. The treated gray water must be suitable for flushing toilets, gardening, and on-site landscaping. 7. The system must include the following components to enable a certain level of smartness: smart meters, smart valves, pumps, and pH sensors. 8. Selected system components must be able to communicate with components in the existing household nanogrid.
9. The water/power system must be able to send information to household users for decision-making.
10. System components should be able to work based on the following specifications: 240 V, electrical frequency of about 50 Hz, and 900 GSM frequency (as per Qatar specifications).
The smart water/power system consists of three main units: (i) on-site power generation, (ii) on-site gray water recycling and reuse, and (iii) communication unit that will provide users with information about water and energy consumption as well as quality of the recycled gray water. Technologies used to assemble the smart water/power system include in-pipe electricity generators, pumped storage, solar photovoltaics, reverse osmosis, and a control system. The in-pipe electricity generator will be used to produce electricity by utilizing the water pressure as the water moves through the water supply pipe network as well as the gravity from the pumped storage. The roof-mounted tanks will facilitate pumped storage that will be used to maximize the use and reuse of recirculated water in the household. Solar photovoltaic panels will be used to generate solar electricity. In cases when the power generated on-site is not sufficient, the main grid power will be used instead. A reverse osmosis unit was used to treat gray water to sufficient quality for use in watering gardens, landscaping, car washing, or flushing the toilets. A control system was used for managing the operation of components and devices in the system as well as to provide household users the information on the system status. Smart meters were used to digitally send meter readings to household users so that they know their water and power consumptions will be added. Smart shut-off valves were used to facilitate remote control of water in the household. pH sensors were incorporated to facilitate the effective control and communication of the water quality in the system. A plumbing network, additional to the existing infrastructure, was used for water circulation in the system. Figure 7 shows a schematic representation of the proposed system components.
Most houses in Qatar have little space available outside the building area. Therefore, the best place for the solar panels and storage tanks is on the roof. For practical implementation in the case study, these components must meet the minimum standards stipulated by the local utility company. The standards for the pipe network type and materials are controlled by the available local construction standards, codes, and regulations. As further requirement, additional components of the communication network must not degrade performance of currently existing infrastructure.

On-site power generation
The major components for on-site power generation are a solar PV system and in-pipe hydropower generation. The solar PV components include an array of PV modules, a charge controller, inverter, and battery bank. In pipe hydropower, generation was considered for both the existing network and the auxiliary network meant for recycling gray water at the villa. Available in the existing network is a pump that pumps water to the roof tank. The movement, flow, and velocity of this pumped water are captured to form the first type of in-pipe hydropower generated on-site. When the gray water is recycled, through the reverse osmosis unit, the water is pumped to the rooftop so that it can be conveniently used by taking advantage of the gained potential energy.

Solar PV system sizing
In order to size the solar PV system, the following steps were followed: 1. Calculate the total power for all loads that will use solar PV electricity by adding the total watt-hours for each appliance used and finding the total watthours per day needed from the PV modules.  2. Sizing the PV modules by calculating the total watt-peak rating needed for PV modules and finding the number of required solar PV panels.
Total watt − hours per day for appliances used = Sum of watt − hours for all household appliances ( excludes microwave ovens, cooker and any electrical machines, AC units, and any e lectric tools with power rating more than 1500 W ) Total watt − hours per day provided by PV modules = 1.3 × sum of watt − hours for all appliances ( to cater for energy lost in the system ) Total watt − peak rating needed for PV modules = total watt − hours per day provided by PV modules / panel generation factor (3) Minimum number of PV panels required = total watt − peak rating needed for PV modules / the rated output watt − peak of the PV modules (4) Inverter size = 1.3 × total watts of household appliances Battery capacity ( Ah ) = total watt − hours per day used by appliances × days of autonomy ( 0.85 × 0.6 × nominal battery voltage ) (6) The requirements for the solar PV system and parameters used for sizing the solar PV system are shown in Table 1.

Pico hydroelectricity
In-pipe hydropower (or pico hydroelectricity) represents a clean source of energy that focusses on recovering the energy used to supply water to households. The energy used to treat gray water can also be partially recovered by taking advantage of pumped storage. In pico hydroelectricity generation, a turbine is forced to rotate due to flow and pressure of water in a water pipe network. The rotating turbine is connected to a generator that generates electricity. This technology has been successfully implemented in various contexts [62][63][64]. The amount of power generated at the household level is relatively small [65][66][67]. However, this amount becomes significant to the utility provider if the technology is implemented in all houses as a national level project. Since in-pipe generators are preferred in the aboveground location with gravity-fed delivery pipelines, their position outside the villa's walls is ideal for maintenance and requires minimal changes to the system's operations when retrofitted. The in-pipe generators were designated to the main supply pipe based on the following criteria: • Size: The main supply pipe is installed with the largest diameter among the gravity-fed plumbing pipes, thus allowing the installation of the largest possible generator to yield the highest possible power.
• Pressure: The pressure within the supply pipe is maintained by the roof pump at 20 psi, with a maximum pressure head at the ground floor before it reaches the first floor's outlet.
• Water quality: The water flowing through the main supply pipe is potable and does not carry the risk of containing debris, solid waste, or mixed fluids (e.g., oil from the kitchen) that may affect the operations of the turbine blades or cause damage to its physical structure. Assumptions: • The in-pipe generator's installation begins 0.25m above the ground level to avoid the interference with the distribution inlet of the first floor.
• The in-pipe generators operate with an efficiency of 65%, a practical estimation since in-pipe generation is a proven technology with high reliability and capacity, allowing it to maintain high efficiency even when facing variable flows.
• Cumulative water consumption occurs in the house for 8 hours a day.
The number of in-pipe generators to be installed is determined with consideration to: • Spacing factor: In the current installation procedures, it is recommended by most suppliers to space the generators by a 4-diameter factor. The spacing is to prevent generator from affecting the functionality of the following one; such effect includes allowing the water turbulence to dissipate.
• The loss of power generated: When positioning the generators 4 diameters apart, the height of the water column causing the pressure head will decrease, resulting in a drop in the power produced between successive in-pipe generators.
Eqs. (7)-(10) were used to calculate hydropower generated at the household level. Table 2 shows the design parameters for the hydropower generation.
Head loss across pipe, hl = (16 Head loss due to turbine, ht = (z) − ( V 2 / ( 2 × g ) ) − hl (9) Power output per in − pipe generator = Q × ht × W × η (10) A typical multi-loop power network for the case study is shown in Figure 8(a). Figure 8(a) shows multiple power flows from three different sources: main power grid, solar PV, and in-pipe hydropower. Figure 8 also shows converters that facilitate the use of generated power in the household depending on whether the appliance requires AC or DC power. A typical multi-loop water network for the case study is shown in Figure 8(b). Figure 8(b) shows multiple water flows from two different sources: main water supply from utility and flow of recycled gray water.

Gray water recycling
Gray water recycling was achieved by installing a reverse osmosis (RO) unit. Requirements for the feed water include the water pressure inside the pipes, the quantity of gray water to be treated, and the temperature of feed water. The size and quantity of membranes required to produce the desired volume of permeate were selected based on off-the-shelf units. Table 3 shows a comparison of the properties of feed water data at the household level, reverse osmosis requirements, and local authority requirements for recycled gray water. From Table 3, it can be observed  that the feed water temperature is 28°C, i.e., 3° more than the required. Although this difference will have an effect on the quantity of treated water, the produced quantity is expected to be within the range of that stipulated by the local authority. The range of pressure (95-100 psi) is suitable for the reverse osmosis unit since it is high enough to allow all the solutes to be rejected from the solvent, thus creating treated gray water with the required specifications. Since the total dissolved solids (TDS) of gray water is less than the TDS of what the feed water supposed to be, no filter was required for reducing the total dissolved solids. However, a sediment filter was required in order to remove dust, sand, suspended solids, particles, and rust, down to 5 μm. The hardness of the feed water is higher than that required. Hence, a hardness filter (water softener) was required in order to decrease the hardness of the gray water so that the reverse osmosis unit can function and produce treated gray water with the desired hardness limits. The concentration of chlorine in feed water is too high. Therefore, an activated carbon cartridge prefilter was required in order to minimize the level of chlorine in the gray water to an acceptable range before it goes to the granular activated carbon filter. The granular activated carbon filter was used to get rid of unpleasant chlorine, tastes, odors, cloudiness, colors, organic chemicals, sulfur, suspended particles, and dirt. This filter will also reduce the amount of the chlorine in the water to a desired value. Since the turbidity of feed water is high, a micro cartridge filter was used in order to reduce the turbidity of the gray water. This will help in achieving the required turbidity in the treated gray water.

Communication unit
Smart meter sensors allow water consumers to gain information on the water usages, on the water leaks, and on the quantity of water that is being drawn from the main grid and consumed in the house. This information is expected to allow users to control water leaks and abnormal usages. The implemented sensor is noncontact with water and makes use of the "pulse output" facility that is built in to most water meters. The smart meter sends information related to the water flow and the water quantity withdrawn from the grid to the control unit using a wireless connection.
The control unit sends this information to the user's phone at regular predetermined intervals to indicate real-time water consumption from the water meter as well as provide visual and sound alerts if there is an incident such as an abnormal water usage. Water leak detection is programmed to notify the users of the house when there is a water leak at a specific point in the house by producing a sound alert and an SMS for the user to take an action. If the user does not take any action after 10 min, a signal will be sent to the control unit via a wireless connection. In return, the control unit will send a message to the user's phone asking him/her to take an action as a soon as possible. The smart valves are smart due to their ability to open and close automatically based on specified conditions and commands from the control unit. As an example, pH sensors are used to measure the pH of the treated gray water. The pH sensor plays an important role in blending the treated gray water. Water blending was required to ensure that the pH of the treated gray water is suitable for garden watering and other applications. If the pH of the treated gray water is less or more than the required value, the pH sensor sends a signal to the control unit to open the smart valve in order to allow potable water to flow from the potable water tank to treated gray water tank. This flow is expected to neutralize the pH of the treated gray water so that the gray water is suitable for different purposes.

Prototype materials and assembly
In order to realize the functionality of the proposed design, a prototype was constructed. Components for the smart water/power system were assembled from standard components available off the shelf. The prototype construction included the physical structure and the control system. The physical structure consists of the positioning of devices such as in-pipe generators and flowmeters in addition to the plumbing network. The control system was assembled from Arduino Mega boards, and the control actions were programmed using the C

Constituent
Gray water  Table 3.

Comparison of feed water data with reverse osmosis and local authority requirements.
language and the Arduino software. Prototype components included pumps, wastewater tank, treated water tank, a battery, storage tanks, reverse osmosis unit, in-pipe electricity generator, flowmeters, smart valves, photovoltaic panels, pipes, flexible hose, pipe fittings, sensors, pH meter, Arduino Mega board, and a GSM shield board. The selected pump has a voltage of 12 V, so it can be connected to a battery of 12 V, since this 12 V battery will supply the prototype with electricity. The battery was continuously charged by a 100 W solar panel. The suction lift of this pump is 1.2 m, which means that this pump will be able to pump the water to the storage tank at a height of 0.91 m and circulate water in the pipe network for simulated water use in the house. The voltage of the in-pipe electricity generator is 5 V, which is compatible with the battery and to the Arduino, which can take a maximum of 5 V. The in-pipe electricity generator has a water pressure of 0.05 MPa, which is suitable for the pipe dimensions used to construct the prototype. Reverse osmosis unit was chosen to have specifications that depend on the flow rate and the pressure of the water within the pipe networks. The reverse osmosis unit used in the prototype has a maximum capacity of 280 L/day, which is sufficient for prototype demonstrations. In addition to measuring the flow of water, flowmeters were used as devices to detect the leakages within the pipes. This was done by installing two flowmeters at a junction point or "leak hole" to simulate water leakages. Differences in the flowmeter readings would indicate a leakage. The function of smart shut-off valve was linked to that of flowmeters in such a way that when there is a difference between the values of flowmeters at leak points the smart shut-off valve will stop water flow in the pipe. Figure 9 shows a pictorial view of the assembled prototype as well as a sample of main prototype elements. Experiments with in-pipe hydropower demonstrated that electricity was produced and used to light a bulb in the prototype. Initial testing of the water section of the prototype included running potable water through the prototype with normal flows. It was observed that the reverse osmosis unit was taking too long to treat gray water, due to low pressure. The low efficiency and slow speed processing of the reverse osmosis unit was identified as a bottleneck in processing gray water. Gray water was supplied to the reverse osmosis unit to determine if the quality of the treated gray water was good enough for its intended purposes. Treated gray water parameters were found to be 4.3 ppm for total dissolved solids, 10 ppm biochemical oxygen demand, and a pH of 7. These values are close to the treated gray water requirements as stipulated by the local authority. Further testing of the prototype was done with the simulated pipe leak and running both portable and gray water in the prototype. The results of this test showed that the proposed method for identifying water leaks was suitable since differences in flowmeter reading were observed when a simulated leak occurs. The prototype was also able to send user notifications (to a smart phone) regarding the condition of the treated gray water and the presence of a leak.

Case study results
After experimenting with the prototype, the main components of the nanogrid were installed parallel to the existing infrastructure at the case study villa. The parallel installation was designed to replicate functionality of the prototype as well as for minimum interruption of normal household activities as per the requirements of the household owner. In addition, the parallel installation allowed easy removal of installed components after data collection. The following subsections summarize the analysis of data collected from the case study.  Table 4 shows the expected power to be generated from the in-pipe hydropower generators installed on the main water supply line.

In-pipe hydropower generation
From Table 4 the insertion of four in-pipe generators provides the house with 2.59 kWh of electricity, for 8 h of water consumption per day. Taking in account assumptions and constraints, four in-pipe generators were positioned as follows: • Supply in-pipe generator 1 at elevation 25 mm, at the lowest point considering the assumed 25 mm clearance.
• Supply in-pipe generator 2 at elevation 165 mm, 140 mm apart from generator 1 after spacing an amount of 4 diameters.
• Supply in-pipe generator 3 at elevation 305 mm, 140 mm apart from generator 2 after spacing an amount of 4 diameters.
• Supply in-pipe generator 4 at elevation 445 mm, 140 mm apart from generator 1 after spacing an amount of 4 diameters.
Since the water tank will be placed on the roof, power and placement of the inpipe generators for the recycled gray water will be a replica of that shown in  The total power generated from the recycled gray water's main water supply pipe is 2.59 kWh. Therefore, the total potential power generated from in-pipe hydropower generators at the case study villa is 5.17kWh (i.e., 155.06 kWh per month). These values agree with other research findings [68][69][70][71][72].

On-site solar PV power generation
The specifications for the solar PV power generated on-site are shown in Table 5. From Table 5, solar PV panels cover 40% of the total roof area. This leaves enough space for pumped hydro tank, AC units, and other equipment. From Figure 6, 60% of the energy at the household level is used for air conditioning, and this will be provided from the main grid power.

Water savings
Water saving calculations per month for the case study are shown in Table 6. From Table 6, total freshwater savings amounts to 25% per month due to reuse of on-site treated gray water. This calculation takes into account losses in gray water collection system, efficiency of equipment used, as well as water loses during treating and recycling of gray water on-site. Efficiency improvements in the gray water collection network and gray water treatment systems can increase the total amount of reusable gray water with additional benefits at the household level.

Economic analysis
The economic analysis was done for the case study villa. The proposed nanogrid at the household level is viewed as the responsibility of the house owner. Therefore, investment costs are borne by the household owner for individual villas. While economic benefits are important to the household owner, the utility company is also interested in how the proposed nanogrid can be used to mitigate the effects of climate change through a reduction of the energy and water consumption. The following equation was used in the cost analysis.   Table 7 shows the cost saving parameters in Qatari Riyals for retrofitting system components to enable multi-utility loops at the household level.
The payback periods at a discounting rate of 10% from the case study household owner's perspective are shown in Tables 8 and 9. From Tables 8 and 9, it can be inferred that the payback period based on the simple payback calculation for smart water metering (7.25 years) is less than that of smart energy metering (9.59 years). As expected, the value of the discounted payback period is always higher than that from simple payback period. Further improvements to these investment paybacks can be realized by improving the efficiency of the gray water collection and treatment system.

Toward a smart water/power microgrid
The smart water/power concept discussed in this chapter is at the household level. In the proposed implementations, smart water/power nanogrid is the smallest unit of a dual-purpose smart water/power distribution network that is capable of independent operation to support the main grid water and power distribution and utilization at the household level. This essentially represents a smart water/ power nanogrid composed of local small-scale generators of water (recycled gray water) and electricity (solar PV and in-pipe hydropower electricity). The proposed smart water/power nanogrid can be used to conserve water end use at the household level, thus relieving the strain on the main water grid as well as to supplement power supply at the household level, thus relieving the strain on the main power grid.

Water
Annual cost saving QR A network of smart nanogrids could be interconnected into a microgrid without any central entity. Thus, the proposed smart water/power nanogrid for a single household can be connected to another nanogrid of a neighboring house. A group of interconnected nanogrids can be configured into a microgrid, and a group of microgrids can be configured into a mesogrid as shown in Figure 10.
When extending the proposed nanogrid concept to microgrid and mesogrid, each smart residential unit is viewed as a single node with interconnectivity. Such interconnectivity provides the household users with water/power availability and  consumption status in neighboring units through real-time user notifications. The information would include excess power and water generation in a neighboring node and neighbor's willingness to share such excess, along with the sharing conditions. The ability of the system to share provides the unit owner with the option of setting usage priority to or from the main grid or the mesogrid as preferred when the unit's power and water generation do not satisfy the user's demands. Such access promotes the status of the residential unit to that of a prosumer, a producer, and a consumer simultaneously. In the evolution process of the nanogrid toward the smart grid, the scales of water and power production are expected to increase. For example, simple water recycling and reuse at nanogrid can be expanded to freshwater production sources (small-scale water desalination, bigger water treatment structures, and water reservoirs) supported by zero water discharge policies. Power production scales can evolve from the rooftop solar PV panels to solar PV arrays. The increase in scales will help in stabilizing the water/power decentralization plans. A node's sharing conditions are dependent on the individual prosumer's discretion in terms of selling cost, quantity, and the threshold of personal consumption. The exchange of information between various nodes in the microgrid or mesogrid and the level of access is to be governed through applications of energy semantic networking [73]. In the energy semantic concept, the system's "big data" enables it to function efficiently by operating with a high level of context awareness. The contextual awareness of the system will guarantee that the shared network between the nodes is capable of interpreting information and user commands as well as communicating them. In addition to data and command processing, the systems elevate user concern when determining the source of power and water by constantly indicting the optimum alternative based on the originator consumption and the varying nodes and main grid availability and pricing. Operating at the community level, the mesogrid enabler will be a semantically capable software, which receives data from the various sensors, devices, user preferences, and other data sources to allow user control over the system's hardware without clashing with the systems operations as well as water and energy consumption patterns. This evolution of the proposed smart water nanogrid provides the following advantages to the resultant smart water/power grid: operational excellence, environmental compliance, grid reliability, safety in operations, energy and water access, security of water and energy supply, consumer participation, grid resilience in normal operation, and disaster situations. © 2019 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Concluding remarks
In this chapter, a smart water/power technological solution for residential areas has been analyzed based on case study specifications and operating conditions. The solution includes on-site power generation using PV modules, in-pipe hydropower generation from water supply and distribution networks, treatment of gray water via reverse osmosis technology, and reuse of treated gray water at the household level. Management and control of the water/power technological solution at the household level was done through a centralized controller. Coordination of the water/power components was achieved through networking and communication capabilities facilitated by the controller and GSM technology. This coordination provides the user with real-time data and information about water and power consumptions, flows, and water quality. The user can then make decisions and control actions based on the data and information provided. This allows the user to be in total control of water and power consumptions within their residential area. Although the analysis is based on one case study villa, the same concepts can be applied to other villas and large-scale residential units such as compounds and residential towers without loss of much generality. Experiments with the developed prototype showed that the proposed system is able to (1) generate, store, and provide information that can be used to control water/power consumptions at the household level, (2) allow two-way flows of data and information on the current state of power and water, and (3) treat and recycle treated gray water for use at the villa. The proposed system is expected to reduce freshwater consumption by 20% and power consumption by 25% in residential villas in Qatar. The research study has shown that the in-pipe hydro system can generate small amounts of electricity and contributes to 5% of on-site power generation based on the configurations discussed in this chapter. This contribution is expected to rise in large-scale applications. Payback analysis shows that the combined smart water power nanogrid is moderately attractive and yet environmentally friendly by nature. Prototype tests demonstrated that the proposed system could function properly when implemented in homes. Improvements in gray water collection and treatment processes could result in more benefits. A future improvement of the prototype is to devise the capability to identify the number of leaks as well as determine the exact location of the leaks. Results of such findings can shed light on the further contribution of nanogrids in reducing (a) water losses and (b) water and energy consumptions, thus making homes more energy efficient.