A Water-Saving Technique Using Embedded System

A method for water-saving is presented in this paper. The proposed method is based on an electro mechanical approach and embedded system that is described mathematically. It describes a solution for water-saving in buildings by giving the ability to ensure that treasurer of water will never be empty before the maximum time T that the owner gives to the treasurer when it is filled with water. The rate of water pumped is altered based on water consumed at tr. Where tr is a random number generated by system. Simulation results in the last section shows that the method can save the water with different maximum time decided by the owner.


Introduction
Undoubtedly, the water is very important for our live.Many natural science scientists believe that in near future the wars between some countries will occur in order to gain the water.So, saving water is not only important, it is very important, especially in buildings.In fact, the main reason for high consuming of water comes from bad consuming by people who don't care about saving the water.
This paper is introduced to solve problems similar to the following problem.Assume that you have a building that contains a treasurer of water with volume and there are n taps in this building.If the treasurer is filled with water, and you believe that if it is full, the water should be enough approximately for three weeks.But, unfortunately you don't know who use the taps.Assume that there is a person that he doesn't care about watersaving and he lets the tap(s) open all the time, so the treasurer of water will become empty before three weeks (it may becomes empty within two days).This paper is going to solve problem similar to the previous problem by giving a way to ensure that the treasurer of water will approximately never become empty before the maximum time (i.e. one week that is determined by the owner of the treasurer when he decides to fill the treasurer).The method used in this paper is based on a differential equation method and numerical analysis [1,2].The proposed solution has the following properties: 2) Produce water-saving with high quality of services giving to people.
3) Flexibility, which means and can be extended to similar environment.4) Based on differential equations [2].5) Can be simulated to prove the validity of the method.
The paper is organized as follows.Section 2 gives reviews of embedded system.Section 3 explains the proposed method.Section 4 reports some simulation results.Finally, Section 5 gives the conclusion.

Reviews of Embedded Systems
An embedded system is a computer system designed for specific control functions within a larger system, often with real-time computing constraints [3,4].It is embedded as part of a complete device often including hardware and mechanical parts.By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of enduser needs.Embedded systems control many devices in common use today [5].
The structure of embedded systems has processing cores that are either microcontrollers or digital signal processors (DSP) [6].However, the characteristic is being widely dedicated for making a particular task.As long as the embedded system is dedicated to specific tasks, the engineers can apply optimization on it to reduce the size and cost of the product and increase the reliability and performance.Some embedded systems are mass-produced, benefiting from economies of scale [5].
Physically, embedded systems are used widely, the range of embedded systems distributed from portable devices such as simple digital watches, calculator and MP3 players, to large stationary installations like traffic lights, factory controllers.Complexity varies from low, with a single microcontroller chip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure [5].

A Proposed Water-Saving Technique
The method that we are going to use is combined between continuous and discrete variables [7][8][9].This method is based on differential equations.Assume that we have a building of different floors, the building has a treasurer of volume VOL = L (Length) × W (Width) × H (Height), and we have a controller that control the amount of water pumped per unit time from the treasurer as in Figure 1.The controller is programmed as an embedded system [10][11][12].Let us define V as the volume of water consumed from the treasurer at unit time t which is equal to (VOL-the volume of water remains in the treasurer at t) [13].
If the owner decides that when the treasurer is full with water, it will be enough for T unit time.So at T the treasurer becomes empty.To satisfy what is decided by the owner, the amount of water pumped per unit time (dV/dt) should equal to VOL/T, and the amount of water consumed from the treasurer at T is calculated as in Equation (1).
Equation ( 1) gives the volume of water used from the treasurer at T. Notice that V = VOL means that the treasurer becomes empty at T. If we want to find V at t i ; where 0 ≤ t i ≤ T, the amount of consumed water can be calculated by Equation (2).
Equation ( 2) shows the volume of water consumed.The V is calculated at each t i where 0 ≤ t i ≤ T, and V is always increasing until V = VOL Two things should be done by the controller: 1) Calculate the volume of water V used at each at time t r where t r is random number generated in our system.
2) Alter dV/dt based on the value of V at time t r .These two points are done in sequence.Assume that we reach on t r , the controller will calculate the volume of water V consumed at time t r and one of the three situation should happen depending on the value of V ( the amount of water consumed at t r ).We have three cases as the following.It is very obvious that dV/dt depends on the value of V (the amount of water consumed from the treasurer at time t), and at t r where t r is random number.The controller decides the new value of dV/dt that depends on amount of water consumed at t r .Also, you may see that an error may happen in simulation results.The main reasons for this error are the time taken to alter dV/dt at t r .

Simulation Results
A simulation program runs to test the validity of algorithm.Parameters used in simulation are: 1) A typical volume of treasure is .3) The delay taken from the treasurer to alter dV/dt is randomly selected between 0.001 sec to 1.5 sec.4) There are 30 to 45 taps are opened at the same time, and each tap is remaining open between 10 minutes to 20 minutes.
5) The unit time used in simulation is seconds.For example, if the owner decides that the maximum time should be one day, and then the maximum time in seconds should be , at each t r where t r is a random number, the controller will alter dV/dt depending on amount of water V consumed at t r .24 60 60 86,400 secs    6) A simulation program runs 40 times.Each time is a different maximum day decided by the owner (i.e. from day one to day 40) as Table 1.
Figure 2 shows the days taken by the treasurer to become empty.The relation between maximum day and days taken by the treasurer to become empty is semilinear.This indicates a very small percent of errors.Also    in Figure 2 you can see that the error is independent from the maximum day decided by the owner.The percent of error is depends on the time taken to Alter pumping of water at t r , the time taken to alter dV/dt and the random number generating by a simulation program.Moreover, Figure 3 shows the relation between maximum day and the percent of error.The percent of error does not exceed 8% in all maximum times from 1 to 40 decided by the owner.This reflects success of the proposed method.

Conclusion
This paper presents a technique for water-saving on buildings.The rate of water pumped is altered based on water consumed at t r .Where t r is a random number generated by system.Simulation results have proved the validity of proposed method by produce a very small percent of error.We saw that the owner can decide how many days the treasurer will be enough.The proposed method can be applied in any building.Also, the model is combined between continuous and discrete variables that are based on differential equations.It can be extended to be applied to more than one treasurer at the same time.

3 m l 1 )
Efficient and simple solution.

Figure 1 .
Figure 1.The treasurer and taps inside floors in the building.

Figure 2 .
Figure 2. Relation between maximum day and days taken by the treasurer to become empty.

Figure 3 .
Figure 3. Relation between maximum day and the percent of error.