Retracted: A simple algorithm for reducing the operation frequency of residential water pumps during peak hours of power consumption

In developing countries where water supply pressure is low, or frequent water outages and electricity shortages happen, domestic end‐users are forced to install water pump‐storage systems, consisting of water pumps and ground‐level and rooftop tanks to satisfy their daily water demands. This contributes to increasing electrical energy consumption, particularly during peak electricity demand hours. This study presents a simple, practical, computational, and cost‐effective shifting water level control algorithm to manage water‐energy nexus, by reducing pump‐storage system electric energy consumption during peak hours. The proposed algorithm requires a simple modification to the existing water level control scheme, by installing an additional float switch in the rooftop water tank below the currently available float switch that is usually adjusted to trigger the pump when the level in the tank drops by 5‐10% from the maximum level. Based on the simulation results, the algorithm preserves the domestic end‐users’ comfortable daily water demand and reduces water pump energy consumption during peak hours by 90%. During off‐peak hours, the control algorithm triggers the pump to refill the rooftop tank based on the upper float switch when water level drops by 5%, while during peak hours, the pump is triggered only when the water drops by 30%. The performance of the algorithm is found to be comparable to the performance of the model predictive control (MPC) approach developed for the same purpose, but MPC needs a high computation capacity and a complex analog feedback level sensor. The algorithm succeeds in reducing and shifting pump energy consumption under various possible operation scenarios and water demand disturbances. A mathematical model is developed for the domestic water pump‐storage system using Matlab/Simscape to cope with the complexity of solving nonlinear fluid flow equations and measure the data required to develop the control algorithm. The performance of the algorithm is tested based on a real case study.


| INTRODUCTION
Water demand management in residential buildings can be a beneficial practice as continuous potable water can be provided while saving energy. 1 This can be achieved through control algorithms, efficient technologies, and increased awareness.
The uncertainty and unreliability of continuous potable water supply in many developing countries forces householders to invest in water pump water storage devices. 2 The domestic water pump-storage devices that are commonly used in the residential sector, either in single houses or multistory buildings, consist of a ground-level water storage tank and a rooftop tank for each apartment in the building or a single house. The transfer of water between the tanks is automatically controlled by pressure or float switches. Each rooftop tank is equipped with a float switch that controls the operation of the electric water pump which is installed at ground level to pump water to the rooftop tank. These domestic water pump-storage systems increase electric energy consumption. Also, the existing water level control scheme does not track daily peak hours which increases the electric energy consumption during these hours.
Water-energy nexus is defined as the energy consumed in the extraction, purification, delivery, heating or cooling, treating and disposing of water. Water-energy nexus management is an important aspect of sustainability and has recently been addressed by many researchers. Chen et al 3 investigated the nexus between energy consumption and water use in cities in the Beijing area. They found that the city ' s energy consumption and energy used for city water services are directly connected. Talebpour et al 4 studied the water-energy nexus of rainwater pump-storage systems in Australia, by measuring the energy intensity needed to serve the microcomponents (such as water closets, dishwashers, washing machines, etc.) of various houses. Vieira et al 5 studied the water-energy nexus in Brazil. Their study objective was to determine potential energy savings by proposing management strategies for water and sewage services in low-income households.
Water-energy nexus management can be achieved by applying control algorithms that reduce the contribution of domestic electric pumps to peak consumption, and shift work to off-peak hours without disturbing the end-users' water consumption. In a number of studies, 6-9 researchers proposed peak shifting algorithms for domestic electric loads in order to maximize the distribution grid load factor and minimize the end-user electricity bill, through scheduling the operation of some houses' electric loads at off-peak hours. Also, water-energy nexus management and shifting the peak can be achieved by applying water level closed loop classical control approaches. Proportional-integral-derivative (PID) and model predictive control (MPC) approaches to shifting algorithms have been investigated and compared by many researchers. Abirami 10 and Li 11 found that MPC is better than PID in handling multi-input multi-output (MIMO) nonlinear systems, where the former is better for single input single output (SISO) linear systems. Wanjiru et al 12 studied MPC level control and load shifting of domestic pump operation tracking of time-of-use (TOU) tariff in South Africa, where the MPC gave a good result.
In the literature, there are many studies [8][9][10][11][12] concerning the shifting and scheduling of household electric loads based on advanced control approaches. However, these control algorithms and approaches require high computational capacity, and are only suitable for implementation in places where well prepared high computation capacity devices exist, such as pumping stations. Zhuan et al 13 formulated the scheduling of pumping as a dynamic optimization problem. As the solving of optimization problems needs high computation capacity, the authors use an algorithm that comparatively reduces computation time. Wamalwa et al 14 formulated a multi-objective optimization problem to minimize the pumping energy demand and wear and tear of a hydropower plant pumping system by minimizing the switching frequency of the pumping work. Tang et al 15 considered the demand-side management load shifting strategy, and saved 30% of pumping station energy consumption by introducing an optimal control approach. The high computation capacity makes these optimization algorithms difficult to apply using low computational capacity, cost effective integrated circuits, such as microcontrollers. These integrated circuits are suitable for simple applications such as level control of domestic water pump-storage systems. Moreover, the work of these closed loop control approaches depends on costly analog level measurement sensors, which increases the complexity of the control system, 12 and cannot be handled easily by those who install domestic systems.
The main objective of this study was to present a simple, practical, cost-effective, and low computational capacity water level control algorithm to control and shift domestic water pump-storage system operation to off-peak hours, without disturbing comfortability and satisfying domestic end-users' water demand. The proposed algorithm requires a simple modification to the currently used water level control scheme, the installation of an additional float switch in the rooftop water tank below the currently existing float switch that is adjusted to trigger the pump when the level in the tank drops by 5-10% from the maximum level. The added float switch is adjusted to detect the water level when it drops by 30% from the maximum level. Due to the low computational capacity of the algorithm, and the simplicity of manipulating the digital feedback water level signal, which is determined from both the existing and added float switches in the rooftop tank, the algorithm can be applied using a simple standalone control integrated circuit, such as a simple microcontroller.
The water level control shifting algorithm can be utilized for newly installed, as well as existing, domestic pump-storage systems. It can be utilized in any country that uses similar domestic water pump-storage systems. The control algorithm performance has been verified, validated, and compared to the performance of the MPC control approach under the conditions of North Cyprus.

IN AREAS WITH WATER AND POWER SHORTAGES
Many developing countries experience shortages in electrical power capacity at peak demand periods. Frequent electricity outages, together with water shortages and unreliable supply, force end-users to invest in water storage devices that can either be rooftop tanks or water pump-storage systems comprising ground-and roof-level tanks and an automatically controlled water pump. 16 The domestic water pump-storage system is as shown in Figure 1 . The system consists of a ground-level water tank, a water pump, and a rooftop (roof-level) water tank. It is possible to automatically run the water pump to fill the tank on the roof by either level control or pressure control systems. The pressure control system utilizes a pressure control switch which turns the pump "on" when the water pressure in the system drops below a set value. This system has the advantage of pumping water from the ground-level tank to water draw-off points directly with high pressure while assuring a full tank of water at the roof-level kept ready for use during electricity cuts. However, due to high pressure in the system, the water consumption is high too and the adjustment of the pressure switch can be tricky.
The most common technology used in North Cyprus is the level control switches shown in Figure 1 . The pump operates when all the switches, S 1 , S 2 , and S 3 , are on. The water level of the rooftop tank is controlled by a float which activates an electric switch ( S 2 ) connected in series to the main switch ( S 1 ) and the float switch ( S 3 ) placed in the ground-level tank. The switch S 3 prevents the pump from operating if the water lever in the ground-level tank is not suitable. A mechanical ball valve prevents the overflow of the main water in this tank. It is possible to adjust the levels at which the switches S 2 and S 3 turn the pump on or off. It can be clearly seen that, in this way (adjusting the on-off interval of the float switches), the frequency of pump operation can be controlled. Usually in domestic water pump-storage systems, the on-off band is set in such a way that when the water level in the rooftop tank drops to 5% to 10% below the adjusted maximum level, the tank is refilled.
North Cyprus residential building stock consists of 242 000 houses with a mean area of 172.9 m 2 , and 68% of these are single houses. 17,18 The second most common building type is multistory buildings. The majority of these buildings consist of 2-4 floors where each floor consists of 1-4 apartments. North Cyprus encountered a total of 166 electricity outages between September 2013 and September 2014 due to insufficient, or zero, generation capacity during peak electricity demand. 19,20 North Cyprus also encounters water shortages leading to low water supply pressure in the main pipes. For these reasons, households install water tanks (typically 2000 L at ground level and 1000 L on the roof) in order to overcome the problem of intermittent water supply and electricity shortages. The water supply to the house is from the rooftop tank by gravity. 20 A one horsepower centrifugal electric pump is used by each F I G U R E 1 Schematic diagram of the existed domestic water pump-storage and its control scheme in North Cyprus residential sector single house or apartment to pump the water between the two tanks. 20 The operation of these pumps causes extra electricity demand, and may occur without consideration of the electricity peak demand time.

| SIMULATION MODEL
A mathematical Matlab/Simscape simulation model has been developed, as shown in Figure 2 , for solving nonlinear fluid flow equations (continuity equation, head and flow losses equations, and laminar and turbulent flow limitations). Measuring variations in water flow and pump efficiency is necessary due to the difference in elevation of the ground-level and rooftop tanks and various operational limitations, such as drops in mains AC voltage. These measurements are needed to test the control algorithm performance under different operational scenarios. Also, the model developed helps designers of domestic water pump-storage systems choose the optimal design by testing the system with many variables, for example, a change of piping system, change of pump capacity, etc.
The common features of the pumps used in the pumpstorage systems in North Cyprus residential buildings are given in Table 1 . A pump with similar features (Elettropompe KF4) 21 is used in the mathematical simulation for the present work.
The pump is driven by a single phase capacitor-start AC motor. The catalog values of the pump brake power and flow rate against head are inserted into a spline interpolation vector as needed by the Simulink parameter block of the pump (Figure 2 B). The lengths, diameters, and friction coefficient parameters of the pipes at the start are assumed and inserted into the model to suit the existing single domestic water pump-storage system with an elevation height of 4 m. Then, these parameters are varied to simulate the variation in apartment heights with respect to ground level. The domestic water demand is controlled using a gate valve connected to the output port of the unpressurized 1,000 L capacity rooftop storage tank (Figure 2 C).
The control time horizon for one pump operation day is selected from 0 to 24 h with a sampling time n of 1 second, thus the sample numbers are N = 86 400 , where Small sample time (1 second to a few seconds) guarantees smooth power consumption curves such that it prevents a group of pumps working collectively in the case where a group of rooftop apartment tanks call for refilling at the same time.
The pump operation is controlled by a combination of switches S . The status of S at any sample time n can be expressed as S ( n ) and determined by the statuses (either 0 or 1) of the switches S 1 , S 2 , and S 3 at any sample time n as follows: Pump energy consumption E p for each S ( n ) that equals 1, is determined by the pump start power P s (kW) and the steady state power P s s (kW), such that: where, t s : Start time in seconds. t ss : Steady-state time in seconds. The total pump energy consumption E T during the control time horizon is given by: The pump operation ratio R which represents the number of times the pump is turned on during electricity peak demand period to the total number of times the pump is turned on during 24 hr is expressed as follows: Assuming water mass is conserved, water density is constant in the temperature range that the domestic water pump system works in and incompressible water flow. Also, by assuming that the volume change of the nonpressurized rooftop storage tank is just with respect to time and the dimension variables are constant, then the volume change rate of the rooftop tank is given by: where, dv dt : Tank volume rate change (L/s). Q in : The net flow input rate (L/s) that enters the rooftop tank.
Q out : Output flow rate (L/s) at the exit orifice of the rooftop tank.
Q d : Domestic water demand (L/s). Q p : Pump flow rate (L/s). Q lin , Q lout : The flow rates (L/s) lost in input and the output tank piping system respectively. h . The rooftop tank level (m). ρ, g : The water density (kg/m 3 ) and gravitational acceleration (m/s 2 ), respectively.
(1) n ∈ N, n = 1,2, … 86 400 (2) S(n)= (S 1 (n).S 2 (n).S 3 (n)) S(n) ∈ {1,0} 1: pump on, 0: pump-off The values of flow rates in Equations (6-9) are measured and monitored using a simulation flow meter sensor in the Matlab/Simsacape mathematical model developed. Equations ( 8 ) and ( 9 ) show how the water demand Q d is affected by the water level in the tank. The net flow which enters the rooftop tank Q in given in Equation (7) is affected by the friction losses in the piping system which is proportional to the height of the building.
By integration of Equation (6) , and by converting the integration result into the discrete time domain, the tank volume V in L at each sample time interval difference, can be expressed as: As stated, the pump used for the pump-storage system in North Cyprus is a fixed speed type, thus, the pump flow rate Q p is assumed to be constant unless the efficiency of the pump decreases. Also, Q lin and Q lout are assumed to be constant for each piping system installation scenario. Water demand Q d is the daily domestic water demand of single houses estimated every one sample time.

| PROPOSED CONTROL STRATEGIES
Two control approaches are proposed in this study. The purpose of these control approaches is to minimize the frequency of operation of the water pumps during peak hours in order to reduce the load on electric utilities. The first approach requires no addition to the existing domestic water pump-storage system shown in Figure 1 except increasing the on-off interval of the existing switch S 2 which actuates the pump between water level h ref (pump on) and water level h max (pump off). By moving h ref down relative to h max , the number of times the pump is turned on is reduced compared to the existing adjustment. The second approach differs from the first in its capability of tracking the water level in the rooftop tank, electricity outages, water supply shortages, and peak electricity demand hours. A simple change needs to be made to the existing pump-storage system. An extra float switch S 4 that determines the water level h peak is installed in the rooftop tank as shown in Figure 3 . Depending on switches S 2 and S 4 , the algorithm divides the pump operation into two modes. During peak hours the pump on-off cycle is determined by the water levels h peak and h max , respectively, while during off-peak hours, the on-off cycle of the pump is determined by the water levels h ref and h max , respectively. Because h peak measured relative to h max (in meters) is adjusted to a value less than h ref , this action decreases the number of times the pump is turned on during peak hours. Consequently, the pump energy consumption is reduced during peak hours and the high consumption is shifted to off-peak hours. At the same time, the supply water pressure is preserved at a value that does not disturb the comfort level of the end-users.

| Approach I: Modifying the level of the float switch
In the current situation, the pump starts refilling the tank when the level of water in the rooftop tank drops to h ref until it reaches h max . Therefore, the refilling volume V ref is determined by multiplying the area of the rooftop tank ( A ) in square meters by the difference of water levels h ref and h max in meters. Then, the water volume in the tank at any sample time n in the current control scheme is constrained as follows: It is possible to readjust h ref to a lower value ( h rnew ) by rearranging the position of the float switch S 2 (see Figure 1 ) at which the pump is activated for refilling. The new volumetric constraint for this setup is expressed as follows: Where V(n) , V max and V rnew are in m 3 and V(n) is calculated by multiplying the area of the rooftop tank ( A ) in m 2 by the difference of water levels h max and h rnew in m respectively, then the result is multiplied by 1000 to convert the volume measurement unit into L.
When the water volume in the tank drops to V rnew , the control level switch S 2 in the rooftop tank closes the electric circuit (starting the pump) given that the ground-level tank control level switch S 3 is closed. But when the water volume reaches V max , the control level switch in the rooftop tank opens the pump electric circuit (stopping the pump). V rnew is adjusted to a value that is less than the value of V ref . This results in decreasing the cyclic operation time of the pump. However, this approach does not track the electricity peak demand hours. Moreover, by lowering the refilling volume, the domestic water supply pressure decreases, leading to disturbed comfort, especially in one-story buildings or for those who live on the top floors of apartments. This approach is investigated in order to see the consequence of just lowering the rooftop tank refilling volume from 5%-10% to about 30%. It would be ideal to design a control system that tracks the peak hours and delays the pump refilling operation until the water level drops to a certain level in the rooftop tank during these hours. This can be done by designing a controller, alongside an extra float switch S 4 in the rooftop tank. The controller detects the peak hours, at which time it changes to S 4 from S 2 . The starting level for the pump refilling is now h peak as shown in Figure 3 . Throughout off-peak electricity demand hours, the water volume in the tank is bounded at each sample interval n by Equation (11) , while throughout the peak electricity demand hours, the volumetric constraints are given as follows: During peak hours the pump starts operating when the volume in the tank drops to a level ( V peak ) adjusted to a lower value than that in the off-peak hours. V peak is equal to the area of the rooftop tank ( A ) multiplied by the height ( h peak ) in the water tank.
Tracking the peak hours as shown in the algorithm in Figure 4 , V peak is determined by considering the amount of water which satisfies the domestic water demand during peak hours, and not dropping below a value that decreases the indoor domestic water supply pressure. This is explained in Section 5.3 . The algorithm tracks the electricity peak demand hours based on predetermined statistical peak time data, or by processing the real-time signal obtained from smart meters installed in houses. The algorithm tracks the water level in the rooftop tank by a closed loop signal provided by switches S 2 and S 4 . These types of switches are cost effective and simple to implement compared to the analog level sensors that are usually used in closed water level control. Moreover, the computation cost is lower than MPC or PID. It is possible to use a microcontroller integrated circuit which is coded with any programming language, such as C/C ++ , as illustrated in Table 2 .

| CASE STUDY
A single family house with an area of 150 m 2 and four occupants is considered 20 in this study. The pump-storage water system in the house consists of a horizontal cylindrical rooftop water storage tank with a volume of 1000 L, a ground-level storage tank with a volume of 2000 L and a 1 hp 2850 rpm fixed speed centrifugal pump. Currently, in the existing system, two float switches are employed, one inside the tank on the ground level and the other installed in the rooftop tank to control the cyclic operation of the pump. It is assumed that the water refilling takes place in the rooftop tank between volumes of 950 L and 1000 L. The purpose of the switch in the ground-level tank is to stop the operation of the pump when the tank runs out of water.

| Water demand
For the present study, the estimated hourly average daily water demand profile given in Figure 5 is considered as an example with which to run the control algorithm. It should be noted that the control algorithm is capable of working under any water demand. The profile coincides with the findings of Polycarpou et al 22 who economically analyzed the water demand of three urban areas in Cyprus (Nicosia, Limassol and Larnaca). They found that the average daily water consumption is equal to 40 L/hr for the Larnaca area. Also, the shape of the demand profile is similar to the daily hot water consumption profile in Kalogirou ' s study 23 obtained for the winter season. The water consumption peaks coincide with the findings of Willis et al 24 and the daily average water consumption per person is similar to the estimations of Memon et al 25 who estimated the average water consumption in the UK as 150 L/person per day. Based on the findings of the above literature, 22-25 the typical water demand curve in North Cyprus can be estimated as shown in Figure 5 .
As shown in Figure 5 , there are two water consumption peaks, a smaller one from 6:00 AM to 9:00 AM and a larger one from 4:00 PM to 9:00 PM. The first is due to the occupants waking up and preparing themselves for work, while the second is due to their return from work.

| Electricity peak demand hours
The algorithm control approach proposed is designed to track the peak hours of electricity demand. In the case of North Cyprus, the peak times of typical days in January and June, measured in 2012, are shown in Figure 6 . 26,27 The average value of the demand curve is referred to as base demand. 28 Using the data in Figure 6 , the base demands (shown as dashed lines) are computed to be 221 MW and 191 MW for summer and winter, respectively. The peak hours are defined

F I G U R E 3
Schematic diagram of approach II with the additional level floating electric switch to be those hours during which demand exceeds the base demand. The peak hours on a typical summer day are approximately from 9:00 AM to 7:00 PM and on a typical winter day from 5:00 PM to 11:00 PM. The longer period of 10 peak hours occurring in summer is selected to verify the control algorithm ' s performance.
The North Cyprus electricity authority, KIB-TEK, put smart electric meters into operation from January 2016. 29 This makes the authority capable of sending a real-time peak hours signal to end-users' smart meters. This signal can be communicated to the control algorithm to update the peak demand hours during the day in real time.

| Refilling volumes
Indoor water demand changes with the head pressure produced by the building ' s height and the water level in the rooftop tank. To find the best values of v rnew and v peak to assure a suitable indoor water supply pressure, particularly in single houses or the rooftop apartments in multistory buildings where head pressure is low, using Equations ( 8 ) and ( 9 ), the simulation mathematical model (Figure 2 ) was run for about 1000 s, while measuring the indoor domestic water demand versus the rooftop tank level, as shown in Figure 7 . It was found that, in the case of the maximum indoor water demand 58 L/hr (see Figure 5 ), the new refilling volumes v rnew and v peak introduced in the first and second control approaches, respectively, can be adjusted to 700 L such that the pressure head satisfies the maximum indoor water demand of 58 L/hr without annoying the end-user.

| RESULTS AND DISCUSSION
Based on the water demand daily profile, Figure 8 shows the simulation results of the currently existing domestic water F I G U R E 4 Algorithm for the peak tracking control system pump-storage control approach of a single house in North Cyprus. The pump switch S state is 1, 10 times during electricity peak demand hours, of 19 times during the whole control horizon time (Figure 8 A). The cycling-water emptying and refilling volumes of the rooftop storage tank are preserved between v ref = 950 L and v max = 1000 L (Figure 8 C). The pump energy consumption during peak hours, and the ratio of pump operation ( R ) throughout the control horizon time are calculated using Equations ( 4 ) and ( 5 ) and are found to be 0.17 kWh and 53%, respectively. These results are considered the baseline for comparing the performance of the proposed first and second control approaches.
In the case of altering the level of the float switch to give the pump a late-start at all times (first approach), v ref is readjusted from 950 to 700 L. The pump operations during the control time horizon are reduced to four, two being during peak hours (Figure 9 A). The pump energy consumption during peak hours reduces to 0.128 kWh, while the ratio of pump operation R is equal to 50%. The tank water volume has a longer falling off time in the morning hours when water demand is low, then starts to cycle between v rnew and v max (Figure 9 B). It is not surprising that R and pump peak energy consumption decrease, but at the expense of decreasing the water supply pressure for the whole day. This approach is good whenever water demand and peak hours do not change in value or shape. It is also suitable for flats located on lower floors in apartments, since the water head is already high.
In comparison to the existing and first control approaches, the second approach, utilizing a control algorithm, depends on the constraints given by Equations ( 11 ) and ( 13 ). The designed algorithm reduces the frequency of the pump running during peak hours, resulting in more operation during off-peak hours compared to the two previous cases, while  26,27 preserving the water supply pressure at higher levels than the first approach (Figure 10 B).
The number of operations of the pump is 11; one being during peak hours, that lasts for 7 min (Figure 10 A) due to the long electricity peak demand time and the high water demand at the same time. On the other hand, R is equal to 9%, which is considerably lower than the values of the current system and the first approach. The pump energy consumption during peak hours is equal to 0.087 kWh.
The control approaches are verified for one single house, but there are at least 240 000 houses in North Cyprus which can implement one of these control strategies. Table 3 presents a summary of the simulation results. Figure 11 shows how much energy consumption in kWh has the potential to be shifted to off-peak hours, assuming that all 240 000 properties implemented these control approaches. The second approach shifts more energy consumption than the existing or first approach to off-peak hours. The contribution of the control approaches to the electricity demand is in the form of peak clipping as well as peak shifting, as the pumps operate less frequently at peak hours and more frequently, or for longer periods, at other times.

| Sensitivity analysis and operation scenarios of the second approach
Disturbances that may affect the performance of the control algorithm include: (a) a random increase in the daily water demand profile; (b) a spike increase in water demand during electricity peak hours; (c) a change in the starting operation point of the pump; and (d) a change in the electricity peak hours or a change in the daily demand water profile shape. A sensitivity analysis is conducted examining these four cases.

| Random increase in water demand
To present a random increase in the daily profile water demand, Q d in Equation (10) is replaced by the following equation: where, Q rand : Randomly changing flow rate due to changing demand (L/s). r ( n ): Random number between 0.5 and 1 (representing 50%-100% increase in usage).
The random water demand created is given in Figure 12 .
The control algorithm performs well under this random increase in daily water demand, compared to the performance of the current control approach. When the algorithm is applied, the pump operations during peak hours are 3 out of 22 over the day, with R being 13.6%. The water volume in the tank is preserved to satisfy the end-users' demand without any disturbance (Figures 13 A,B).
It is noted that with the current control system, the number of pump operations during peak hours is 18, of 38 over the whole day, with R equal to 47% (Figure 14 ). This number of pump start-stop cyclic operations causes high power consumption due to the high starting current and increased maintenance cost of the pump. These consequences are reduced by applying the control algorithm approach, as compared to the existing control approach.

| Spike increase in water demand
It is possible that a spike increase in water demand may take place during peak hours for unforeseen reasons, such as a special occasion or an increased number of occupants. To demonstrate this scenario, a spike is added to the daily water demand profile during peak hours as shown in Figure 15 . The pump is turned on twice by the control algorithm during peak hours, of a total of 12 times over the day, with R equal to 17%. The water volume in the tank is preserved at the specified control levels (Figures 16 A,B). The control algorithm is proved to be robust, reducing pump power consumption, maintenance cost, and the ratio of pump operation under any change of daily water demand.

| Starting point of pump operation
The pump starting operation point may be altered by either water supply outages or electricity shortages. As shown in Figure 4 , the control algorithm tracks these two disturbances and prevents pump operation if one or both disturbances occur. The algorithm restarts the pump operation when both are available. To demonstrate the behavior of the algorithm under a water outage, a random signal {0, 1} is created to (14) Q rand = Q d (1 + r(n)) F I G U R E 7 The relation between domestic water demand and rooftop storage tank water level (simulation time 1000s) represent the water source (0 for no water, 1 for available water) and another random signal between 200 and 1000 is generated to represent the initial starting and maximum volumes of the tank. The scenario given in Figure 17 is one of many situations that can occur. Figure 17 B shows a starting water volume of 1000 L, randomly chosen at the beginning of the first day, then the water level in the tank declines until it reaches zero (due to water shortage). When the water source returns at the beginning of the next day, water is pumped into the tank to fill it (Figure 17 A).
In each control horizon, the initial volume in the tank is the remaining water from the previous simulation run. Therefore, the refilling process starts with this volume in the tank. In another scenario, the initial volume in the tank is 200 L, as shown in Figure 18 B. The pump fills the tank and at the end of the same day the water volume is between 950 and 1000 L.
One feature of the algorithm is that it always keeps the water volume in the tank between 950 and 1000 L during electricity off-peak hours to satisfy domestic water demand during peak hours without disturbing end-user comfort.

| Validation of the algorithm for different water demand shapes and different peak hours
An open and closed loop model predictive control (MPC) strategy for controlling domestic water pump-storage systems  Figure 19 . The system comprised of a rooftop storage tank with a capacity of 1000 L and a 1 hp water pump with a flow rate of 900 L/hr. Electricity peak hours were assumed to be between 7 AM and 10 AM and between 6 PM and 8 PM. The control algorithm proposed in the present study is validated with the same data.
The results obtained, shown in Figure 20 , are based on running the proposed control algorithm with the data of 12 and the constraints on the water volume in the tank given in Equations ( 11 ) and ( 13 ) (the refilling volumes during peak and off-peak electricity demand hours of v ref = 950 L and v peak = 700 L, respectively). The pump operates six times during the control horizon to cope with the water demand. The operation of the pump at the beginning of the control horizon, lasts for 20 min (Figure 20 A) to fill the tank from 200 L to v max of 1000 L, then starts again at 8 AM to satisfy the peak water demand. A suitable indoor water supply  Off-peak Peak Off-peak pressure is assured by preserving the water volume in the tank at a volume between 1000 and 700 L (Figure 20 B). In, 12 the pump works nine times with the open loop MPC and five times with the closed loop MPC, none of them being during peak hours. However, the water volume in the tank is allowed to decline to 123 L and 447 L respectively, causing decreased indoor supply pressure. On the other hand, with the proposed algorithm, the pump operates once during peak time and ensures at least 700 L of water in the tank, keeping the end-use water supply pressure higher than. 12 It is possible to eliminate the pump operation during peak hours if the water volume in the tank is allowed to drop to 400 L during peak hours ( Figure 21 ). With this new constraint the pump operates 5 times during the day, none being during peak hours. Moreover, the water volume declines to 400 L only once during the first electricity consumption peak. The maintenance cost of the pump can be reduced by reducing the refilling volume during off-peak hours v ref to a value lower than 950 L, but this causes the indoor water supply pressure to drop to a value that can be felt by the endusers (especially in single story buildings or top floor apartments). In this scenario, water demand takes a longer time to satisfy, or it may affect the operation of home appliances such as washing machines and dishwashers which require a certain water pressure to operate efficiently. Also, when the water level in the rooftop tank drops below a certain level, air bubbles may occur in the supply piping system.

| Summary of sensitivity analysis
The control algorithm reduces the operation frequency of the pump by 86.4% compared to the currently existing control approach, when both approaches are tested under a random increase of daily indoor water demand (see Figures 12-14 ). When there is a spike increase in indoor water demand during peak hours (see Figure 15 ), the control algorithm turns the pump on twice during peak hours as shown in Figure 16 A. Considering the performance of the closed loop MPC of Wanjiru et al 12 as a baseline to test the sensitivity of the proposed algorithm to changes of domestic indoor water demand and peak hours, shows that the closed loop MPC operates the pump 5 times along the whole control horizon, none of these being during peak hours, while the algorithm operates the pump six times along the whole control horizon to cope with the new higher water demand, one being during peak hours (see Figure 20 ). This is due to the peak in water demand at 8:00 AM (see Figure 19 ). Thus, the algorithm is sensitive to high increases of indoor water demand, because the algorithm ' s first priority is to satisfy the end-users' indoor water demand with a suitable water supply pressure, by limiting the rooftop tank water volume to not less than 700 L (Figures 14 B, 16 B and 20 B). The algorithm is robust for a long control horizon (see Figures 17 and 18 ) during which municipal electricity and water supply cutoff can happen, as the algorithm starts the pump immediately if the rooftop tank drops below 700 L either in peak or non-peak hours.

| Additional comments
The elevation of the water tanks above the usage points in the houses is assumed to be equal to 4 m in the above examples. The flow rate of the pump selected in this study at this height is about 2700 L/hr as measured from the F I G U R E 1 4 Simulation results of the current used control approach with random water demand. A, operation times of the pump. B, rooftop storage tank water volume F I G U R E 1 5 Spike increase in daily water demand profile during peak hours mathematical model shown in Figure 2 , with an efficiency of 81% at a supply voltage of 230 VAC. When the supply voltage drops to 200 VAC, the flow rate and the efficiency of the pump become about 2460 L/hr and 75%, respectively. When the tank is on the roof of a four-floor apartment building, the end-use head is about 14 m. In this case, the pump flow rate and its efficiency decrease to 2500 L/hr and 74.4%, respectively. These effects increase the time required for the pump to refill the rooftop water storage tank (Figure 22 A) and, as a consequence, the energy consumed by the pump for the whole day per apartment is increased to 0.84 kWh, compared to the time required for the pump at 2700 L/h and efficiency 81% (Figure 22 B), where the energy consumed is 0.32 kWh.
The North Cyprus electricity authority, KIB-TEK, has been replacing domestic electric meters with "Kamstrup"  30 These smart meters have the "ZigBee" wireless protocol communication capability. 31 The control algorithm in this study can be built (programmed) into integrated controller circuits 32 to track the electricity peak demand hours in real time using ZigBee wireless protocol capability. The algorithm tracks the peak hours as well as the water level in the storage tanks such that, even if peaks exist and the water level is low, the algorithm operates the pump to preserve the comfort of the end-users, which is something that cannot be achieved with a simple adjustable timer.
Moreover, the algorithm can be developed to become a predictively distributed algorithm, scheduling pump operation across all the houses implementing the control algorithm, in order to overcome the possibility of creating an electricity consumption peak during off-peak hours due to load shifting. This can be done by developing the algorithm to store daily updated water demand data to predict the demand profile. The unique addresses of the water meters can be used to schedule the operation for each pump, or group of pumps, to operate within the time shifting scheme. The development of the algorithm verif ication is left for further study.

| CONCLUSION
In places where water sources are limited with low supply pressure or electricity shortages (as is the case in North Cyprus), householders are forced to install water pumpstorage systems to cope with these problems. These systems provide an additional load on the electricity demand curve, mostly during peak hours. The aim of this study was to propose a control algorithm that reduces the number of operations of domestic water pumps during peak hours and shifts the consumption to off-peak hours.
Although it is possible to adjust the current refilling volume from 950 to 700 L, this results in lowering the supply pressure along with the benefit of the pump operating less frequently all day and during peak hours. This reduces the energy consumption of a single house from 0.17 to 0.128 kWh and the ratio of the pump operation R from 53% to 50%.
A more versatile approach would be using a control algorithm which can easily be built into the existing float switch control mechanism. An additional float switch and a controller programmed to track the peak hours are integral parts of the system. The algorithm cycles the pump between 950 and F I G U R E 2 0 Algorithm validation under different water demand profile and electricity peak hours V peak 700 L F I G U R E 2 1 Algorithm validation under different water demand profile and electricity peak hours V peak 400 L 1000 L during off-peak hours, and 700 and 1000 L during peak hours. The operation of the pump during peak hours is significantly reduced ( R = 9%) by this system, and it preserves a suitable indoor water supply pressure during peak and off-peak hours. The whole system is simple and requires lowcost hardware with low computational capacity, and can be installed with new and existing pump-storage arrangements.