Petri net Modelling of the Automatic Test System for Mobile Phone Battery

— Considering recent cases of mobile device battery incidents widely reported in the news and the internet, more and more companies are looking to develop not only safer and more reliable products, but also robust and automated manufacturing processes, seeking greater reliability and efficiency. Thus, the purpose of this research is to model a mobile phone battery test automation system using the Petri Nets (PN) graph and mathematics tool to automate the dipole alignment, voltage test and internal resistance, anode and cathode battery terminal cut, visual inspection of these and battery thickness selection in a mobile phone battery production line of a company in the Industrial Pole of Manaus (PIM). The Visual Object Net ++ v2.7a software was used for PN modeling and the present research is structured in detailed description of the automatic system components, flowchart, modeling and PN analysis. Considering this as a Discrete Event System (DES), the PN showed that it is fully possible to model the Automatic Testing System for Mobile Phone Battery. It was also demonstrated that the PN analysis by the mark enumeration method, through the coverage tree building and accessible markings graphs that the system has good properties of Reachability, Liveness and Boundedness, being fundamental in PN. It was also possible to verify that using this tool it is possible to obtain a high level of understanding of real progress and evolution of the system through the dynamic visualization of graphs related to the DES.


INTRODUCTION
Considering the recent cases of mobile device battery incidents widely reported by the newspapers and the internet, more and more companies are looking to develop not only safer and more reliable products, but also robust and automated manufacturing processes, seeking greater reliability and efficiency. Currently in a mobile phone battery production line of a factory located in the Manaus Industrial Pole (MIP), the manufacturing process is performed by manual and semiautomatic devices and equipment for tests execution and productive preparation of the battery. Among these tests the most important would be the open circuit voltage (OCV) test and the internal resistance (IR) test that were described by [1] which would present a strong correlation between capacity and impedance of the battery. Regarding the main production process, it is possible to list: the positive and negative pole alignment, the dipole terminal cutting according with the specified length by the battery developer, sample inspection by manual tool to verify the parallelism and the terminal length of the battery and lastly the cell thickness verification to classify it in a pre-defined group. Each process is performed separately and is executed by different collaborators; this production process leads to a high level of product manual interaction in the manufacturing environment that increases the operation cycle. Due to the shift changes (as it operates on a twenty-hour day and sixday-a-week basis) or inefficiency of the primitive solutions without the necessary robustness that a manufacturing process requires, the current production process can not keep the repeatability and reproducibility of the activities. As explained by [2] [20] the battery cell stores the electrical energy as chemical energy between two electrodes, the anode and the cathode, separated by an electrolyte that transfers the ionic component resulting from the chemical reaction inside the cell and forces it out of the battery. The output is a discharge electrical current (I) and a voltage (V) during the time defined as Δt. The chemical reaction of a rechargeable battery must be reversible under the application of a charging voltage. The main critical parameters of a rechargeable battery are: safety, energy density that can be stored in a specific input power and output recovery, cycle, lifespan, storage efficiency and manufacturing cost. When under overload or overheating the lithium ion batteries present a thermal leakage hazard that in the worst case could result in an explosion. Even if some electronic components with Positive Thermal Coefficient (PTC) would be applied as a safety measure, it is not possible to prevent internal shortcircuit [3]. The lithium ion polymers applied in all of the rechargeable batteries of lithium ion used in mobile devices are composed of multiple cells arranged in series or in parallel. This arrangement must be shared with the whole production chain such as the cell manufacturers, battery assemblers and system integrators [4]. The research main purpose is to model a test system for mobile phone batteries which includes the innovation, automation and optimization of the production process. To apply a PN in any process is necessary to follow some steps such as: the description of the system components, system flowchart in order to build the PN, the modeling of the PN and lastly the analysis of the PN. The present research is justified due the application of models simulations to characterize the functioning of a system that may or may not exist and also by the financial relevance of the automation and optimization of the process [5]. The simulated environment is an alternative developed that reproduce the real system and enable the analysis and the understanding of the discrete events dynamics of the process. In order to model a test system for mobile phone battery it is necessary the prior understanding of the manufacturing processes correlation. In other words, the interactions performed by its components, and how the interdependencies between states and links are related. Therefore, it is evident that the parts that compose the battery test system, have dynamic behavior defined by the discrete states changes as a result of instantaneous events that form a system type known as Discrete Event System (DES). Similarly, the network model proposed by Carl Petri modeled the communication between automatons, used at that time, to represent the DES [6]. The PN is considered as one of the most robust graphical and mathematical method used to model, analysis and design of discrete events systems [7]. The PN allows the direct and interpreted association of the functions and verification of the process evolution, making possible the mapping of the progress and performance of the system, and also control of the same. The PN presents two interesting features: firstly, it allows modeling and the visualization of behaviors with parallelism , simultaneity, synchronization and resource sharing; secondly, the theoretical result regarding the simulation of the PN is extensive [8]. The obtained models can be analyzed and validated by simulation according to the activities requirements and services of an industrial automation system and checked according to the PN characteristics [9]. The PNs excel in the current engineering due the following qualities: they capture the precedence relationships and structural links of real systems, are graphically expressed, conflicts and queues can be modeled, have mathematical and practical foundation, and support various specializations such as timing, color, stochastic, reliability and etc [10].
After the modeling and construction of the PN, it is necessary to verify and validate it. In order to analyze a marked PN it is necessary to verify the good properties, such as: Reachability, Liveness and Boundedness [11][12][13]. The method proposed by [11][12][13] to verify the good properties is based on the analysis by markings enumeration, checking if the PN is limited by the reachability tree building and then the design of the accessible markings graph in order to validate if the graph is strongly connected, in other words if all the nodes in pairs are connected by a path is possible to evaluate if the PN is resettable which means that the PN is capable of recovering from disruptive operating events, such as: interruptions by the operator or by the safety device. The vivacity is evaluated when it is possible to access every part of the PN without any type of blockage [10].

II. LITERATURE REVIEW 2.1 DISCRETE EVENT SYSTEM
A system can be defined as a set of elements that can be represented mathematically by a set of interdependent variables [14]. In the literature, such system is classified as static or dynamic, where the dynamic systems current outputs depend on the previous inputs values presented to the system and can be represented by differential equations [6]. Currently there are many Discrete Event Systems present in the contemporary civilization; it is possible to find DES occurrences in industries, in public related services, in bureaucratic processes, in real-time software and database, in manufactures, etc [10]. Figure 1 shows the macro classification of systems.

PETRI NETWORK
The PN is a mathematical formalism which allows the graphic representation with a high level of abstraction, presented by Carl Adam Petri in his doctoral thesis in 1962, initially applied for performance evaluation and flow representation communication protocols [9]. An overview of the different approaches for solving a PN-based optimization problem can be found in [21] [22] [23].

PETRI NETWORK CONCEPTS (PN) Definition 1.
The PN structure is a quadruple G = (P;T;I;O), where the model set of places is defined by P ={p1, p2,...,pn}, and the set of transitions by T ={t1, t2,...,tm} where I : P × T → Z + is a function that represents weight of the arcs (flow relation) that reach the transitions and O : P × T → Z + is a function that represents the weight of the arcs that leave the transitions. Z + is the set of non-negative integers. The places pn represent the possible states that the modeled system can assume and are described graphically by a circle. The transitions tm are represented graphically by a horizontal bar, associating the places that precede the transition with the places that succeed them, being connected through the arcs which posses individual weights. The incidence matrix C represents the interactions between the places (i) and the transitions (j) where each element is defined as: cij = O (pi; tj) − I (pi; tj). The marking function M: P → Z + is the function that defines the network current marking [15] [16].

Definition 2.
The Petri Network is a quintuple (P, T, A, W, m0) wherein P = {p1… pn} is a finite set of positions or places, T = {t1… tm} is a finite set of transitions, A is a finite set of arcs that belongs to (P X T) U (T X P), where (P X T) represents the arcs set from pi to tj, also defined as (pi, tj), and (T X P) represents the arcs set from ti to pj, or (ti, pj ), W is a function that assigns a weight w (integer) to each arc and lastly m0 is a vector whose i-th coordinate defines the marking number (tokens) of the pi position, during the early stage of the network evolution [10], as shown in the figure 2.


The T and P sets are disjoint, i.e., T ∩ P = Ø.  n = |P| is the cardinality of the P set, in other words is the position numbers of the PN.  m = |T| is the transition number of the PN.

III. MATERIALS AND METHODS
The materials used in this modeling and simulation are: The method is the set of s ystematic and rational activities that, with greater security and economy, that allows the objective achievementvalid and true knowledgetracing the path to be followed, detecting the errors assisting the decisions of the scientist [17]. Thus, the methodology used to conduct this research will follow the steps as below: 1.
Components detailed description, in order to show the operation of the automatic test system for mobile phone battery; 2.
Build the flowchart to organize and synthesize the steps of the system operation;

3.
Modeling of the PN with the objective to base the simulation with a robust mathematical tool, considering that in addition to being widely used in modeling, they are also used in verification and validation of control systems for discrete events; 4.
PN modeling analysis to verify the good properties, such as: Reachability, Liveness and Boundedness, as shown in the figure 3 of the methodology flowchart.

IV. RESULTS AND DISCUSSIONS 4.1 SYSTEM COMPONENTS DESCRIPTION
The components of the proposed automated test system for mobile phone battery are described below and shown in the figure 4: a) Input conveyor with M2 motor, S1 sensor indicates the battery initial position on the input conveyor, sensor S2 indicates the battery final position on the input conveyor, Rm1 is the input conveyor handling robot; b) Turntable M1 motor with seven slots to house the parts, sensor Sb1 indicates the part presence in the first slot and the sensor Sb7 indicates the part presence in the last slot, sensor Sb indicates the turntable slots position; c) The C2 cylinder handles the battery terminal aligner; d) The C3 cylinder handles the execution of the open circuit voltage (OCV) and internal resis tance (IR) measurement, besides there is a datamatrix code reader used to associate the measured results with battery serial number; e) The C4 cylinder handles the battery terminal cutter; f) The C5 cylinder handles the visual inspection using a camera to inspect the terminal cutting, after the inspection the serial number is read in order to associate the measured result; g) The C6 cylinder handles the battery cell thickness meter, after the inspection the serial number is read in order to associate the measured result; h) The C7 cylinder reads the serial number to inform both the data center and the Rm2 robot the battery traceability, approved/ disapproved status and the measured thickness. i) Output conveyor with M3 motor, S3 sensor indicates the battery initial position on the output conveyor, S4 indicates the battery final position on the output conveyor, the Rm2 robot is the output conveyor horizontal handler; j) The S5 sensor indicates if there is a battery in the defect area. k) Front panel with Auto/Manual button, emergency button and on/off switch. The automatic mobile phone battery test system was designed to meet the prerequisite of non-human intervention during the production process, in other words, automatic operation. Considering that the system was previously loaded and in automatic mode which means that the on/off switch is in "on" position, the emergency button is normally closed and the automatic button is pressed is possible to affirm that the system is in the operation state. The loading process means that the battery must be placed over the input conveyor moved by the M2 motor. After the battery is detected by the S1 sensor, the input conveyor is activated until the battery is detected by the S2 sensor, after the detection the conveyor stops and the Rm1 horizontal handler robot picks up the battery and places it in the slot 1 of the turntable. When the Sb1 sensor detects that a battery was placed in the first slot, the Sp sensor detects that the position 1 is under use and the M1 motor is activated shifting the battery position from the first slot to the second slot where the C2 cylinder perform the terminals alignment, in the next step the battery is shifted to the third slot and the C3 cylinder performs the OCV and IR measurements reading the serial number to associate the measured results with the battery, in the fourth slot the C4 cylinder performs the battery terminal cutting and in the fifth slot the C5 cylinder performs the terminal cutting visual inspection reading the serial number to associate the inspection result with the battery, the last verification is conducted in the sixth slot where the C6 cylinder performs the battery thickness measurement due the gases generated by the initial electrical charge that dilates the battery, after the measurement the serial number is read and the result is associated with the battery. Next, the Sb7 sensor detects the battery in the seventh slot and the C7 cylinder performs the serial number reading to inform the manufacturing data center to verify if the battery is approved or disapproved, after the status confirmation the Rm2 horizontal handler robot directs the battery to the defect área if the battery is disapproved and the S5 sensor is vacant or to the position of the S3 sensor if the battery is approved and the S3 sensor is vacant, if the S4 sensor is vacant the output conveyor M3 motor activates and the battery is transported until the S4 sensor detects it concluding the production cycle.

Rm1
It is important to emphasize that the described steps are discrete events and act in a concomitant way.

PETRI NETWORK 4.2.1 FLOWCHART PREPARATION
-The operation dynamics of the automation system described in the previous topic can be seen in the flowchart shown in figure 5. The process steps are described in the flowchart, and from this flowchart it is possible to construct the PN graph. [18].

International Journal of Advanced Engineering Research and Science (IJAERS)
[  In the figure 5 flowchart presentation, it is considered the use of a single part for the automation system dynamics and the previously loaded system, as detailed described in topic 4.1.

PN DEVELOPMENT
The PN design and modeling were developed following the assumptions that there should be an automatic input, automatic processing and automatic output, from which the following items were detailed:  On/Off switch state, emergency Button state and Auto/Manual Button state -Control panel;  Battery input process through conveyor;  Battery process in the turntable;  Output process through conveyor.

PN DEVELOPMENT -CONTROL PANEL
The figure 6 shows the PN graphic representation of the front panel in charge to energize the system, the emergency protection system and the setting of the automatic manual operation mode. In the initial state the On/Off switch is in the On position, the emergency button is normally closed and the operation mode is in Auto, so all the records are previously loaded in the initial state. After initialization of the PN modeling dynamics, the place record Aux-Energ is activated by the arc that comes from the T8 transition, after the system is energized the Aux-AutoA also is activated by the arc from the T8 transition, the Aux-AutoA position and the Auto/Manual state are loaded as a record by the arc from the T6 transition, the system is triggered and the records position are changed to the Aux-AutoB auxiliary variable, in the next step the record will be connected to the input conveyor transition. This PN also includes the modeling graph that describes the emergency button activation as regulated for machines and equipments operations according to [19]. In this graph the emergency button was previously marked in the Emergency place and is limited by the inhibitory arc of the T7 transition, once the emergency button is activated, the 24-place weight arc is activated to transfer the records to the Aux-Emergency position, taking into consideration the weighting, the arc weight will correspond to the transitions number that will be disabled in the emergency moment, in this way, following the machine safety regulatory rule (NR) the system will be stopped only recovering after the emergency release.

Of f / On
Aux-AutoA Aux-Of f

PN DEVELOPMENT -BATTERY INPUT PROCESS
The figure 7 shows the PN of the automatic input process of the battery using the conveyor, in this process the T0 transition will be activated by the Aux-AutoB place that results from the control panel modeling and also by the markings that are in the BufferConveyorIN state.
Considering that the first state of the conveyor is empty, represented by the place of the S1 sensor, the arc from T0 will transfer the record to the T1 transition. The place of the M2 motor, with the marking indicating that the motor is turned off, will receive the marking from the arc of the T1 transition when the S1 sensor detects a battery, the marking of the M2 motor changes and the conveyor is activated until the S2 sensor detects the battery and the conveyor stops due to the M2 motor is turned off, after the S2 sensor detection, the arc from the T3 transition will activate the Rm1 place which represents the handling robot that transfers the battery to the first slot and the Sb1 sensor detects the presence of the battery in the turntable. The Aux-CY_LB place monitors the activation of battery processing cylinders and transfer the record to the T5 transition, the Aux-IN place receives the record by the arc from the T5 transition and start the battery processing. All the inhibiting arcs can be directly controlled according to the emergency button graph using the Aux-Off place.

International Journal of Advanced Engineering Research and Science (IJAERS)
[  Fig.7 -Petri Network detail of the battery input process using a conveyor.

PN DEVELOPMENT -BATTERY PROCESSING IN THE TURNTAB LE
The figure 8 shows the PN of the battery proces sing in the turntable, considering that the Aux-Y place is marked with five records or batteries, the T9 transition is triggered by the Aux-Energ place from the PN of the control panel, by the Aux-IN place from the PN of the battery input process and the marking from the Sp sensor that indicates the correct position of the turntable to start the turn to the cylinders position, the M1 motor will be activated and the turntable also activates, so the T10 transition activates the Aux-X place by 5-weight arc, due to the simultaneous activation of the 5 cylinders. Therefore, the cylinder C2 (terminal aligner) will be activated by the marking from the T21 transition, the cylinder C3 (open circuit voltage and internal resistence) will be activated by the marking from the T31 transition, the cylinder C4 (terminal cutter) will be activated by the marking from the T41 transition, the cylinder C5 (cutting inspection) will be activated by the marking from the T51 transition, the cylinder C6 (battery thickness meter) and the cylinder C7 ( datamatrix reader to verify if the battery is approved or disapproved) are activated by the marking from the T61 transition, so the Aux-Y place Will receive 5 records from the T22, T32, T42, T52 and T62 transitions, and then transfers the marking to the T12 transition which represents the first transition of the battery output process, however using a 5-weight arc, in this way is guaranteed that only one battery is removed from the turntable in each M1 motor turn. The feedback of the cylinder drive and the motor drive M1 is indicated by the arc from the t22, t32, t42 e t52 transitions and from the Aux-M1_LB place, so any turn is avoided during the cylinder activation.

International Journal of Advanced Engineering Research and Science (IJAERS)
[  Source: Authors (2018).

PN DEVELOPMENT -BATTERY OUTPUT PROCESS
The figur 9 shows the PN of the battery automatic output using a conveyor, in this simple graph the T12 transition will be activated by the Aux-Y place through the 5-weight arc and the Aux-M1_LB place marked by the M1 motor transition. After the T12 transition is triggered, the Sb7 position is marked which means that the battery is in the seventh slot and so the T13 transition is activated to trigger the Rm2 place. The Rm2 represents the handling robot that removes the battery from the output slot and places it in the output conveyor or in the reject area, detected by the S5 sensor, depending on the battery status. The failure condition will occur when the Aux-signal-failure variable receives the transition from the datacenter, however if the battery is approved the S3 place is marked by the T15 transition which means that the battery is over the output conveyor, with the detection of the battery the T16 transition is activated to mark the M3 motor place which activates the output conveyor. Following the M3 motor activation the T17 transition is triggered to mark the S4 place, which represents the end-of-stroke sensor of the output conveyor, the T18 transition activates the Buffer Conveyor OUT place, where the batteries processed are placed and finally the output inhibitor arc linked with the M3 motor that disables the conveyor while a battery is detected by the S4 sensor.

International Journal of Advanced Engineering Research and Science (IJAERS)
[  Figure 9 -Petri Network detail of the battery output process.

PN DEVELOPMENT -FULL MODEL
The figure 10 shows the modeled and complete PN of the automatic test system for mobile phone battery. Considering the detailed view of the previous subsystems (control panel, battery input process, battery process in the turntable and battery output process) it was developed a mathematical model of oriented graphs that have two node types which are the position node and the transition node. The nodes are linked by the arcs molding a quintuple PN (P, T, A, W, m0), where the P represents the positions, T represents the transitions, A represents de arcs, W represents the arcs weight and the m0 vector wich represents the i-th coordinate that defines the marks number of the initial position.   /dx.doi.org/10.22161/ijaers.6744  ISSN: 2349-6495(P) | 2456-1908(O) www.ijaers.com The table 1 presents the place states of the PN, it is possible to verify the sensors and actuators descriptions according to the detection and activation, for example S1 sensor that indicates the battery presence in the start positions of the input conveyor when activated turns to high logic level, while the M1-means that the turntable motor is off. S4 sensor of PRESENCE indication of the battery in the output conveyor end point. S1 S1 sensor of PRESENCE indication of the battery in the input conveyor start point.
S4-S4-sensor of ABSENCE indication of the battery in the output conveyor end point. S1-S1-sensor of ABSENCE indication of the battery in the input conveyor start point. The table 2 presents the activated transitions by the markings from the PN states, it is possible to verify that the T1 trans ition detects the battery presence in the start point of the input conveyor and the T18 transition detects battery presence in the buffer_out of the output conveyor. the S1 vectorial position is marked representing that the detection sensor of the battery in the start point of the input conveyor is activated by the T0 transition. The same condition happens with the M8 and M9 vectors weighted with 5 transitions, signaling that there are initially marked pieces, the oriented arc coming from the vector position Aux-Y has weight 5, thus providing unit marking for the T12 transition at the start point of the output conveyor, in this way keeping the PN modeling coherent. Finally, the M15 and M16 vectors, S4-vector position and Buffer-OUT respectively, were enabled by the T17 and T18 transitions, depicting that the part traveled all the PN from the input conveyor, turntable processing and output conveyor to the buffer-out. In this way it is possible to state that this marked PN modeling of the automated test system for mobile phone battery is limited if it falls within the first good property, because if all the positions of a RP are k-bound, then the network is k-limited, being a safe PN if it is k-bounded with k = 1 according to [10]. Following the enumeration marking analysis , since the marked network is limited, the second and third part of the analysis is to build the accessible markings graph as shown in the figure 11, in order to verify and certify that the graph is strongly connected [13], since there is a path between the initial marking M0 and any marking Mj belonging to the graph vectors, in this way for all accessible markings there must be at least one tagged transition enabling the progress of the transition states. Thus, the marked PN has Liveness, since it is capable of recovering from operation disturbing events, such as interruptions by the operator or safety device [10] and also has a Boundedness characteristic, since all parts of the PN are accessible and it is ensured that there will be no blockage.

V. CONCLUSION
The modeling research came from the restlessness in innovation pursuit and contribution of the automatic testing system development for lithium ion polymer battery used in mobile phone. Considering this as a DES, the PN showed that it is fully possible to model the automatic testing system for mobile phone battery and including the evaluation of a secondary scenario with fault treatment in the battery reject area. It was demonstrated that the analysis of PN by the markings enumeration method, through the coverage tree building and accessible markings graph, has the good properties of Reachability, Liveness and Boundedness, being fundamental in the PN analysis. In addition, it is possible to obtain a high level of understanding of real progress and real system evolution through the dy namic visualization of discrete events graphs. This fact does not diminish the mathematical formalism inherent of the PN, which is also a distinct point from the developed model in this research. The financial relevance proved to be interesting by analyzing at least two scenarios: the first one is related to the five to two manual processes optimization, one for the input process and another for the output process, thereby optimizing efficiency by 60%, estimated in USD 1,200 per monthly manual process, there will be an annual increase in efficiency of USD 138,000.00 per year, applied to three production lines currently present in this company; the second scenario considers that the application of the automatic test system for mobile phone battery integrated with all the related production process will represent a 100% efficiency increment because the previous process will provide parts to the automatic system and the later process will receive the parts processed by the automatic test system, thus increasing efficiency by USD 234,000.00 per year. In addition, the process innovation allows greater assertiveness in the repeatability and reproducibility indicator. Finally, the pertinence in the continuity of the system development with the migration of this modeling results to machine algorithms and also the application of this technique in researches which includes concurrent events and logical conflicts.