Machine Learning based Autonomous Fire Combat Turret

The time lag between the identification and the initiation of the actuation protocol is more in conventional fire combat system. This in turn increases the response time resulting in financial loss as well as injuries to human beings. In this paper an efficient method of fire combat is proposed to eliminate resource loss. This system extinguishes fire before it reaches its destructive level. It eliminates all the flaws of the conventional fire extinguishers and improves the damage limitation by raising an alarm. Further by applying HAAR cascade classifier machine learning algorithm, accuracy of 70-75 % is achieved to detect fire. It also provides minimum latency and optimal response in detecting fires and differentiating them from false triggers. It is observed that the response time of proposed fire combat system is 2-4 seconds. The automatic mode is reliable in the presence of multiple units that are deployed in the same area of interest. The system is able to cover the entire hemispheric 3D volume of the room as per the industrial and domestic safety standards.


Introduction
Fire breakouts cause a lot of damage to life and property. The conventional methods for fire detection and extinguishing make use of gas sensors and temperature sensors. Here, smoke detection and temperature variation sensing form the basis of these techniques. These systems offer more latency in detecting fire and hence more damage. Further, water sprinklers are used for combating fire breakouts. But the drawback of using sprinklers is that they deploy water-jets throughout the given room and hence fail to combat fires that are localized to a certain area of the room. Deploying waterjets over electrical equipment leads to short circuits and could thereby worsen the situation. On the other hand, resolving such methods leads to off target deployment of water. Therefore, this demands that the response time of conventional fire combat system needs to be reduced as it does not provide immediate assistance in critical situations [1][2].
The time lag between the identification and the initiation of the actuation protocol is a major concern. The arrival time of fire brigade further compromises the damage limitation. It is important that an efficient method for combating fire must be developed, tested and implemented to overhaul the flaws offered by the pre-existing systems [3]. This work eliminates all the flaws of the conventional fire extinguishers. It reduces damage limitation by raising an alarm as well as initiating the actuation protocol as quick as possible. The Computer Aided Threedimensional Interactive Application (CATIA) is used as 3D software to generate model dimensions and create reference dimensions of the system [4].
This work aims at developing a more efficient and responsive fire combat system with added functionalities such as early fire detection, self-learning algorithm lessens the response time, remote sensing and control over the actuation protocol. The actuation module for systems works in response to an external control signal provided by the image processing module. The major components of this module are positioning system comprising of two servo motors, a submersible water pump, a hose pipe assembly, a mode control switch and a camera mounted on the mechanical assembly for imaging as well as surveillance purposes. After reception of the control signal, the submersible water pump via hose pipe assembly deploys a water-jet and resumes the surveillance. Alternately in an impending case of a malignant fire the security personnel can take over the control from the auto-surveillance mode. It can remotely control the positioning of the hose pipe and effectively deploy a water-jet extinguishing agent.
In this paper a system is proposed that extinguishes fire before it reaches its destructive level. The object detection algorithm is used in implementing the fire recognition phase of the turret's functionality based on machine learning. Further, system provides minimum latency and optimal response in detecting fires and differentiating them from false triggers. This paper consists of seven sections. Section I gives the introduction and motivation of this work in present scenario. Section II presents an brief view of the literature survey. Section III presents design and implementation aspect. Section IV elaborates object detection algorithm with machine learning techniques. Development of mechanical model of the system is presented in section V. Section VI ponders the results in detail. Whereas Section VII gives the conclusion followed with future scope.

Literature Review
In this section the contemporary technologies and the existing state of art techniques are discussed briefly. The conventional methods for fire detection and extinguishing make use of IR sensors and temperature sensors. On the other hand, fire alarm scheme consists of devices that are connected together to detect presence of smoke or fire or carbon monoxide or other emergencies in [5]. It also warns persons with the help of visual and audio appliances. In such systems alarms are activated automatically with the help of smoke or heat detectors. Whereas a manual fire alarm activation devices is used in some systems. Alarms considered are either motorized bells. Further, it can also be a wall mountable sounders or horns. Water sprinklers used for combating fire breakouts is explained in [6]. But the main drawback of using sprinklers is that they deploy water-jets throughout the given room and hence fail to efficiently combat fires that are limited to a certain area of the room. The identification protocol involved in identification of the flames or any such fire outbreak is usually carried out by considering the physical parameters and the chemical properties of the residues after combustion [7]. Smoke density over a region of interest or a random increase in the temperature of an area of interest is being monitored in the state of art systems. These smoke sensors and heat monitors are configured an arrays of integrated sensing elements connected in feedback discussed in [8].
In addition to water sprinklers immobile hose pipes targeting water jet deployment over one particular area of interest are installed [9]. Their targets are to be manually adjusted and there is no control over the amount of water deployed. Thus there is a compromise over the amount of the water being used. These water jet deploying hose pipes are solenoid valve operated. GSM Modules are also interfaced in addition to the locally raised alarm. The GSM module enables sending text messages to the nearest proximally present emergency services or the fire combat brigade itself. Such fire-sprinkler system are considered as fire-protection method described in [10]. Here, water supply arrangement is proposed to provide adequate pressure as well as flow-rate in controlling the fire. Further fire sprinklers are attached to a water supply piping system. Such system is preferred for large commercial buildings as well as factories. Presently, these are cost effective systems available for homes as well as small buildings worldwide. Here 40 million sprinkler heads are fitted every year. It is concluded that buildings supported with such systems ae able to control 96% of fires. Widely used systems for automatic fire detection and extinguishing are gas sensor based presented in [11]. These systems have fixed mounted water sprays for the extinguishing purpose. This type of system detects the presence of any gas in atmosphere. It deploys the water sprays if the gas is detected. Another system similar to this is where it uses temperature sensor instead of gas sensor. The working principle remains same just that the extinguishing condition changes depending upon the temperature threshold is crossed. A 3D scanning system is proposed [12]. It translates into a virtual object by scanning a real time stationary object. A 3D digital model is built with such associated data. This unit operates at 650 nm. A tilting angle of 60 degrees is considered and the unit is spaced at 15 cm distance from web cam. Today in era of mobile, an efficient polar code based OFDM system is proposed in [13 -14] to accommodate more people to use such system to save the life of human beings in the society.
Based on collective information assimilated by Department of Fire Control Mumbai Municipal Corporation, Table 1 highlights various causes of fire breakouts recorded in Maharashtra, India. Table 1. List of incidents caused due to fire Particulars Causes A Fire breaks out injured firemen were injured near Fort area, Mint Road, Mumbai. Further, few more got injured in a massive fire erupts. This happened in in an industrial area near Andheri, Mumbai.

Electrical failure
The Income Tax office caught major fire that was positioned in the Scindia House, New Fort, New Delhi. It has killed firemen's and labours.

Domestic Negligence
A Cine Vista: Film studio located on Kanjur Marg(West) got damaged in a massive fire. Few technicians met with an accident. Nearly 100 labourers in Goregaon were rescued by the fire brigade.

Short circuit
A fire broke out in a commercial complex located in Mumbai. It has killed fourteen firemen.

Negligence smoking
A fire broke out in Army building of Colaba area, South Mumbai.
Mishandling of Explosives A massive fire broke out in a chemical factory. The site was located in Asalfa Village, Ghatkopar. The occurred due to negligent storage of highly corrosive substances..

Negligent storage of corrosive substances
A fire broke out injured residents in a building due to leakage in Malad.
LPG leakage A fire broke out that damaged a cloth mill located in Italian Industrial Estate, Goregaon, Mumbai.

Electrical Sparking
Four people died and five people were injured after A fire broke out in Maimoon building injured many peoples. This was a residential territory placed in the suburban part of Marol, Mumbai.

Inefficient Fire combat system
A massive fire broke out at a Snack shop has killed many peoples. This shop is placed in Saki Naka area, Khairani Road.
Negligent microwave usage The available present systems are not preferred in manufacturing industries where there is possibility of fire in a remote part of room that is not under the mounted sprays. In first case where gas sensor is used, it is possible by a person to false trigger the fire alarm caused due to smoking under the sensor or mischief. In the second case that uses the temperature sensor, the sensors may bet triggered due to industrial components getting too hotter crossing the threshold limit and thus causing alarm. Thus flaws of the conventional systems need to be solved for protection of life and property. Therefore, system is proposed that can detect fire by machine learning technique. Further, it can access any remote area in the room.

Design and Implementation of Autonomous Fire Combat System
A block diagram of Autonomous Fire Combat System is shown in Figure 1. Software used is Processing 3 IDE. Two servo motors and a mode switch are conneted to the microcontroller. The camera module constantly checks of any fire to be detected. If a fire is detected, the motors rotates accordingly. Thus the fire extinguishing outlet controlled by the solenoid valve can face the specific coordinates. A xcluma Thin Film Transistor (TFT) is connected as a display device to the microcontroller. The manual mode of operation is controlled by an optical mouse. The detailed system functionality is described with flow chart in Figure 2 and Algorithm 1. The system operating in manual mode takes feed from optical mouse, Further the python library pyautogui, returns the coordinates of cursor on screen as well as dimension of screen. Let as well as represents the dimension of screen, as well as denotes location of cursor and as well as gives angle for movement. The angle calculated for motor rotation is serially fed to Arduino given by Use 'S' key to toggle the mode (Manual/Automatic). Here the default mode is programmed to be automatic mode.
• In Manual mode use 'F' key to deploy the extinguishing agent. • In Automatic mode the system will run autonomously to detect, process and terminate the fire. Figure 3. represents Arduino and Raspberry pi control with flow chart. Here, Arduino works on instructions received from Raspberry Pi. It is coded to perform particular function for certain type of input. On the other hand, Raspberry Pi performs various tasks such as image detection, sending command to Arduino etc. It computes necessary data needed and delivers it to Arduino. The high torque servo motors can handle high load that occurs during the firing of water jet.

Object Detection with Machine Learning
Object detection algorithm used in implementing the fire recognition phase of the turret's functionality is the Haar Cascade Method. It uses the principle of machine learning. It uses the concept of image or video features to recognize objects. This approach makes use of a cascade function. This function is trained by positive as well as negative images. This cascade function can distinguish fire from each individual frame captured by the turret's surveillance phase. A huge Haar features are needed to detect an object by enough accuracy. Therefore, are structured into cascade in generation of strong classifier as shown in Figure 4. There are four stages to implement this function. First is Haar Feature based selection. Second is creation of Integral Images followed with Adaboost training as well as cascading classifiers. An Haar feature based on cascade classifiers detect objects. This is also identified as machine learning centered approach for face detection. Further, is also detect objects in other images. This algorithm initially requires lots of positive as well as negative face images to train the classifier. It extracts Haar features of face images and looks like convolutional kernel. Thus each feature represents as single value. It is obtained by deducting pixel sum belonging to white rectangle as well as to black rectangle. It is observed that creating Haar Cascade looks intimidating at the beginning but it's not as difficult a task. It finds the best threshold for each feature. This classifies faces as positive or negative images. But evidently it may also result in generation of errors or misclassifications. Thus features that has error rate minimum is chosen to best classify face and non-face images. This process task must be completed with minimum delay and more accuracy. To start, each image is assigned equal weight. The weights of images that are misclassified are increased after every iteration of classification. The process repeats again to calculate fresh error rates as well as weights. It is continued till desirable accuracy as well as error rate with good number of features are extracted.
OpenCV is used to train designed classifier for any objects. It emanates with a trainer and detector. Initially thousands of negative images are gathered. Such negative image does not comprise the object for which the Haar cascade is designed. Thereafter one positive face image as object is needed that can be detected by the Haar cascaded function. This detection is as per training by vector file obtained from machine learning techniques. This file contains features for further matching. These bunch of negative as well as positive face images is used to train Haar cascade. After training is done a vector file is created. This vector file is used in the program which detects the required image from the video feed. The speed to evaluate features does not sufficiently compensate for their numbers. However, it is observed that a standard sub-window having pixel size of 24x24 provides 162,336 likely features. Thus it is extortionately costly to evaluate complete features of them when testing an image.

Development of Mechanical Model of the Proposed System
The machining steps involved to develop mechanical model mechanical aspects in the manufacturing process is described in this section. It holds the camera, the hose pipe and the servo motors.
• Selection of Material: The chassis of the camera hose pipe assembly is based on mild steel. The factors favoring the choice of this material are strength, ease of machining operations, cost and designing. • 3D modelling using CATIA: CATIA modelling relies on spline modelling. It generates coherent solids that can be easily transformed into a physical object. Bending tolerances were considered during the design. Various points that were considered during 3D modelling are: different bodies in the model don't intersect, elements in model has a thickness, object has a clear interior as well as exterior face. Further files with optimal size of less than 50Mb after the export is enough not to lose any detail or information. Thereafter, MG99R motors are placed orthogonal to each other such that the aperture of the camera is placed at the intersection of the two axes of rotation as Shown in Figure ( Figure 7. Flat-out representation A 2D orthogonal view is extracted from the previously rendered 3D model. This 2D sketch is used to derive the G-code. The laser optics as well as Computer Numerical Control (CNC) directs the generated light beam. In general, commercial laser is preferred to cut materials. It comprises a motion control based system. This helps to track a G-code pattern on the material under the cut area as shown in Figure 7. The concentrated laser beam focused keeps portion of edge and is able to provide high quality material surface finish. It either melts or burns to get vaporized. Further it is blown away with the help jet of gas.
• CNC Bending and Grinding CNC bending operation is a manufacturing process. It is carried with the help of CNC press brakes. The sheet metal work can be bended just a tiny mm across to the sections. In down forming machine, brakes have fixed bottom bed available with V-block clamp in place. It may either have a top beam traveling under the force alongwith V-blade tools. Whereas in up-forming machine it is seen that bottom bend is moving whereas top beam is fixed. Both process method produces the similar components of sheet metal. However, there remain no restraints to the component design that can suit to either machines. Arc welding is a welding process that joins metal to metal. An electricity is used to produce sufficient heat to melt metal. Whereas results in a binding of the metals after cooling. Grinding is a rough machining process in which grinding wheel is used as a cutting tool. In general, grinding was used to improve aesthetic finish of the chassis and also to even out the wielding points. To enhance the aesthetics and to improve resistance to corrosion, the surface of the work piece is sprayed with a rust proof primer aerosol. This is followed by application of a matte finished aerosol paint.

Result and Discussions
This work eliminates all the flaws of the conventional fire extinguishers. A prototype is design as per the industrial and domestic safety standards. A machine learning algorithm provides minimum latency and optimal response in detecting fires and differentiating them from false triggers. Simulation of this project is done in Proteus8.1. Figure 9. shows the implementation of python code. When the code is running, it will detect a fire in live video. When it detects fire, a square box will be used to enlighten the detected fire. Rapid fire detection detects the object to be detected and returns its coordinate pixels. It helps to locate the required object from the entire image. Along with the visual detection, python code also returns the x-y coordinates of the detections. The detection is in pixels. This pixel is later converted to degrees the motors need to rotate to make the detected fire center of the detection.  x, y = pyautogui.position() #Location of cursor on screen xsend = str((x*180)/xs) #Move X coordinates ysend = str((y*180)/ys) #Move y coordinates s1.write(xsend.encode()) temp = str('x') s1.write(temp.encode()) s1.write(ysend.encode()) temp = str('y') s1.write(temp.encode()) s1.flush() k=cv2.waitKey (30)

Conclusion and Future Scope
A proposed system is able to extinguish fire before it reaches its destructive level. This system eliminates all the flaws and improves the damage limitation by raising an alarm. Further the Haar Cascade training used achieves accuracy of 70-75 % to detect fire. The pilot run with the training set classified sample as positive and negative images. An efficient method of fire combat is designed and developed using Machine learning technique provides the response time of 2-4 seconds. The performance of the cascade classifier depends on the competency of the training set. Further, it is observed that subjecting the classifier for more training improves the performance. However, it must not be over trained. Over training the classifier would lead to overfitting. This noise and imperfections in the training set will degrade the model. Thus optimal training is desirable. The mechanical actuation design proposed can traverse the entire volume of the room without leaving any blind spots. Further, controlling the turret remotely with an optical mouse provides a free moving experience to the user and carries out the actuation at satisfying pace with no evident latency. Provides faster response to fire breakouts. It is an efficient alternative fire combat system when fire brigade assistance is not available.