The Use of Genetic Algorithms in UV Disinfection of Drinking Water

In order to have drinking water, some countries have to use chlorine. It is use cause is effective and it’s cheap. An alternative to this process is the UV disinfection of drinking water. Most of the devices in the market use UV bulbs or mercury lamps. The UV LED, which is cheaper and smaller, allows creating new smaller devices. The main contribution of this paper is the use of Genetic Algorithms to help design a drinking water device with UV LEDs.


I. INTRODUCTION
N the last years, we can find many devices that use the Ultra Violet disinfection technologies. It has been used in many different devices: Systems for the control of airborne pathogens and allergens in indoor environments [1], pond pumps and soap for phones or even Reptile Bulbs for taking care reptile pets. There is also portable UV water purifier like the SteriPEN Sidewinder, or even the wastewater system from trojanUV. Some uses mercury lamps, UV bulbs, and some started to use UV LEDs. One of the reasons of the use of LEDs is because nowadays are cheaper and last longer.
But just because LEDs are cheap, does not mean that we should put a lot of LEDs inside a box to disinfect water. We can optimize how many LEDs use, searching for the minimum LEDs to purify water. The genetics Algorithms are good for optimization problem solving. We can use them find how many LEDs are the minimal to disinfect water in a given space.
Genetic algorithms have boomed in recent decades. Its basic principles were proposed by Holland [2], and are well described in several books, as Goldberg [3], Poli, Langdon, McPhee [4], Michelle [5] or Davis [6]. They had been used for Traffic Signal Timings Optimization [7], for transport management in docks [8], to improve the Production of Biochemical Pathway [9], for recognizing the position of Ezafe construction in Persian Texts [10], or even for GPGPU Implementation of a Genetic Algorithm for Stereo Refinement [11]. Just to name a few. On this paper we will use them to design a disinfection box of drinking water with them.
The goal of the genetic algorithm is to find a set of parameters that minimizes the output of a function. [12]. GA differs from most optimization methods, because they have the following characteristics [3]. 1) They work with a coding of parameters, not the parameters themselves.
2) They search from many points instead of a single point 3) They don´t use derivatives 4) They use random transition rules, not deterministic rules.
This paper is structured as follows: Section II is a brief overview of the UV Light water disinfection. Also, a brief overview of LED's. Section III explains the implementation of a Genetic Algorithm to design a water purifying device using UV LED light. In section IV some results are presented and in section V some conclusions are drawn.

a. Brief history of Ultraviolet disinfection
The ability of sunlight to destroy microbial life has been known since 1877, with Downes and Blunt who reported that bacteria were inactivated by sunlight, and found that the violet-blue spectrum was the most effective [13]. This is caused by the invisible ultraviolet (UV) rays. With the development of the mercuryvapor lamp in 1901, the UV radiation technology was established. The low cost of chlorine for disinfecting of water slowed the development of UVradiation technology, until 1950. In that year, the use of this technology began to increase in Europe. [14] b. Disinfection Theory Ultraviolet germicidal irradiation (UVGI) is defined as electromagnetic radiation in the range of about 200 to 320 nm that is used to destroy microorganisms. UVGI systems for water and surface disinfection have demonstrated reliability and effectiveness for the past century [1].
The term "germicidal" implies that these UV systems destroy, kill, or inactivate microorganisms. Microorganisms such as fungi, bacteria and viruses. The germicidal effectiveness peaks at about 260-265 nm.
This peak corresponds to the peak of UV absorption by bacterial DNA [13]. The next table summarizes the definitions of the primary bands of UV radiation. Dr. Kowalski writes that the definitions of the UV bands UVA, UVBA and UVC given in the table, have not yet been fully incorporated into every relevant guideline or adopted by every agency, but likely to be adopted eventually and universally. [13] In fact, you can buy UVC germicidal light bulbs or LED's asking UV-C or UV-B. The design of UV systems for water disinfection differs from surface and air disinfecting systems. The reason is that the attenuation of UV irradiance in water occurs within about 15ms and this necessitates both closely packed arrays of UV lamps and higher UV power levels. That is the reason that water disinfection required ten times higher doses that air disinfection applications.
c. Advantages of ultraviolet radiation over other systems 1) Secure destruction of all microorganisms. 2) Do not alter or modify the chemical composition of water, or its smell or taste. 3) There is no possibility of formation of harmful secondary compounds. 4) No corrosive action on the system. 5) No corrosive action on the system. Simple, clean and safe handling without risks or discomforts for maintenance. 6) Easy installation. [15].

d. Exposure time
Like all the disinfectants, the exposure time is vital to ensure good performance. This depends on the type of flow; as well as the characteristics of the system. However, the period must be related to the dosage required. Normal exposures are of the order of 10-20 seconds [16].
e. Brief introduction to how LED's work LED stands for Light Emitting Diode. The first commercial LED was offered by the Texas Instruments Corporation in the early 1960s. The LED emitted infrared radiation near 870 nm. The manufacturing quantities of the product were low. Probably caused by the high price for one single LED, which reportedly was 130 US$ [17]. Today, you can buy a single LED for 0.01 to 0.50 US$ in www.alibaba.com or www.amazon.com LEDs are semiconductors devices which gives off light when powered. The color is determined by the properties of the semiconductor material. The semiconductor material is in the form of a small chip. This sits in a small reflector which together with the case shape, determines the overall shape of the emerging beam.
LEDs have 2 connections: The Anode and the Cathode. The Anode is the positive connection and the Cathode is the ground connection (negative connection). There are also High power LED's.  As we said, the overall shape of the emerging beam is determined by the small reflector together with the case shape.

III. DESIGN OF DEVICES USING GENETICS ALGORITHMS
a. Antennas and GA One of the most famous cases of the use of genetic algorithms, is the creation and patenting of an antenna, which was designed using a Genetic Algorithm [4] Genetic algorithms have been successfully applied to the design of a variety of antennas. [19]. We can name the design of thinned array in 1994 by Randy Haupt [12], wire antennas by Derek Linden in 1997, and Derek Linden with Altshuler in 1998 and 1999 [20], patch antennas by M. Johnson and Rahmat-Samii in 1999, linear and planar array by D. Marcano and F. Duran in 1999 [21]. The NASA also work in Evolutionary Algorithms to design Evolutionary Antenna [22].

A book called "Electromagnetic Optimization by Genetic
Algorithms" describes numerous applications of the genetic algorithm to antenna design [21]. But there is no research done for the use of Genetic Algorithms in UV disinfection of drinking water.

b. Disinfection of drinking water and GA
The same way that genetic algorithms are used for the antenna design, the principles of a genetic algorithm are going to be applied to help design a water purifier using UV LEDs. This is for academic purposes, for further construction and validation of the prototype.
The algorithm will seek to optimize the use of LED light in the device, in order to minimize the LEDs to be used. This will reduce consumption. To do this, we define that water will be deposited in a cube of 15 cm 3 , inside the device that will purify the water. We establish that water comes without solid pieces that can protect viruses and bacteria from the germicidal effect of UV light. We do this with a filter placed at the inlet of water.

c. Chromosomes
We established that the cube is 15 cm per side, as the binary representation of 15 is "1111". Then, for each point with 3 coordinates (X, Y, Z) requires 12 genes. These coordinates indicate where the LED is located. Also we add a gene for LED orientation. "0" if the LED is down pointing up. "1 if it is up pointing down. Therefore, our minimum chromosome set as follows: (1) This example will translate into up direction (0), with XYZ= 10, 3, 7 (1010 is 10, 0011 is 3, 0111 is 7). If we need to add another LED in the chromosome, 13 more genes will be added. With this we establish a proper representation of the chromosome.

d. Fitness
First, for this genetic algorithm, we will establish that the light is emitted from a Flat Top Led UV, and which forms a sphere of light from the LED, fig 6. To define which chromosome is more fit than another, we will check how many points are left uncovered. This can be calculated by establishing that each centimeter of each axis (X, Y, Z), we have a small cube of 1 x 1 x 1 cm 3 , which it will have a value of 1. We have 16 possible positions for each axis (0 to 15), obtaining a total of 4,096 positions to be illuminated by the LEDs inside the cube.
Additionally, we know that the attenuation of the UV light in water occurs about 15 cm [13]. Therefore, we establish that for this AG the diameter of the sphere of light is 15 cm, and its radius is 7.5 cm. The genetic algorithm will seek how many LEDs and where they should be placed so that the cube is fully illuminated by the spheres.
We count the number of genes that has the chromosome that is being evaluated. Then divided by the number of genes representing the coordinate of an LED (13). This way we get how many LEDs are on that chromosome.
For each LED, the position and orientation is obtained by the genes. We create a sphere from this point, and will travel up or down, depending on their orientation. Each point within the sphere is changed to 0. This can be done walking the Z axis, from 0 to 15. A chromosome that leave a space of 50 unlit cells is better than other one that leaves chromosome 75.
To define the points of the sphere that will be reached by the UV light, we start from the spherical coordinates, and switched to the Cartesian coordinates. Spherical coordinates are represented by the radius r, and θ and φ angles. These elements relate to the Cartesian coordinates using the same origin, as shown in Fig. 7  x = r sen θ cos φ y = r sen θ sen φ (2) z = r cos φ Now, we put the value of φ = 0 °. Therefore Cosine 0 ° = 1. Sine 0 ° = 0. Thus, X is 0, Y is simplified, and Z does not change.
x = r (0) cos φ => x = 0 y = r (1) sen φ => y = r sen φ (3) z = r cos φ => z = r cos φ By having the angle φ at 0 ° and X = 0, we have two dimensions, as shown in Fig. 8  If we see the sphere from above, we can see several circles of different circumferences. r' is the radius of the circle resulting from the sphere see it from above for that level of Z. As we know the value of z ', which is the axis that the AG will walk along, and r is the radius of the sphere. If we keep z' and r constant, the angle θ is kept constant. We know the value of r and Z '. Now, we can calculate the value of r' with the Pythagorean theorem, where we know the hypotenuse, because is the radius of the sphere, and Z'. (4) Setting the value of r 'as constant, we have a cylinder. Using cylindrical coordinates we obtain X and Y as follows: x = r' cos φ y = r' sen φ z = h, where h = z' Then, changing first Z ( -7 to 7, steps 1), and then changing the angle φ 1-360 °, we can have the points in the sphere, moving the origins to add the coordinates of the LED. Then, in the process, to explore the angle of 1° to 360°, we get the value of X and Y. Then, we keep the value of X as a constant, and Y axis is traversed, from "-Y" to "Y" to place a value of 0 at that coordinate. For these calculations, discard decimals, approaching to the lower integer. Also, the radius we will use will not be 7.5, will approach the lower integer, so we'll use 7.
The AG must stop when the sum of all cells in the cube is 0. In other words, all the cells are illuminated.

e. Mutation
We use the standard mutation, with a little change. If the GA not obtain a solution after n generations, for the mutation, we added 14 more genes. That is, add another LED.

IV. RESULTS
With the GA completed, we have results:  It took on average 85.7 generations. This means 9 LEDs (13 gens * 9 = 117). The coordinates of the LEDs can be read in Table II. V. CONCLUSIONS In this paper, an implementation of a genetic algorithm has been proposed to help design a disinfection device of drinking water using UV Light LED.
Thanks to the Genetic Algorithm, we can simplify the behavior of the UV light in water. Using the attenuation of UV light in water and using a planar LED. We can adjust the GA with other LEDs and knowing the shape of the emerging beam. We can change the space we are going to use it: Could be a big pipe in a Wastewater Treatment Facility.
For future research, it is the construction of the device, and add features that were not taken into account with the genetic algorithm to the water purifier. The genetic algorithm was useful to establish what is the minimum number of LEDs to disinfect water, in a given space.
Additions features are power supply of the LEDs, and resistance are not taken into account in the algorithm. The power supply could come from solar cells, or a dynamo, to use it when needed, even if there is no light.
Additionally, the design may include UV light sensors, and place them in the coordinate where the sphere ends. Thus an alert if needed would replace an LED.
For the work presented, we can conclude that it is feasible to apply genetic algorithms for water purification.