Applications of the Internet of Things Technology in Advanced Planning Systems

The Internet of Things (IoT) is a very popular research topic, which provides consumers more autonomy with commodity. It leads the commodity towards small-volume/multiple-type production of trends. To solve this problem, many manufacturers use an advanced planning system (APS), hoping thereby to reduce production costs and improve production processes. In fact, the successes of APS systems are few. The main reasons are that production equipment is diverse, information is not easy to integrate, and production process information cannot be rapidly updated. That means that APS systems cannot really function. These problems cannot be solved previously by sensor or communication technology limited in the past. However, these problems can be solved with the use of IoT technology. Therefore, this study uses the printed circuit board (PCB) industry as an example and applies IoT technology combined with an APS system to solve a small-volume/multiple-type and complex process of products. PCBs are carriers of all electronic products and are therefore very important components. PCB production processes are complex and lengthy; the production process is a combination of electronic, electrical, mechanical, chemical, and other technologies. Coupling with production processes for quality measurement and control makes the integration of production information more difficult. In this study, using radio-frequency identification (RFID) and IoT technology, we track the production equipment information and products at various points in the process with real-time updates. We use the information in the APS system to improve the efficiency of production and scheduling.


Introduction
The development of goods is moving toward small-volume/multiple-type production, which is expected to result in more goods being customized. For this trend, manufacturers have introduced production automation and IE 4.0 technology. They also use Internet of Things (IoT) technology to collect information on the production process and production equipment into a database. Then, they use the information in the database to increase the efficiency of the production equipment or to find the best production process. However, they have often found that the production equipment cannot send out the required information or that the production process information cannot be instantly transmitted. Therefore, we have established an IoT module to collect equipment and product information and to use an advanced planning system (APS) scheduling algorithm to schedule the collected information. In previous studies, Zhong et al. (1) proposed using radio-frequency identification (RFID) to construct real-time advanced production planning and scheduling (APPS). Through the impact of the rule sequence on decision making, they found a method of using the distribution strategy to control scheduling from the beginning of the schedule to the production of orders and other steps. They found that the strategy improved the efficiency by 44.46%. Gen and Lin (2) use multiobjective evolutionary algorithms (MOEAs) to solve the provider of job shop scheduling (JSP), flexible JSP, automatic guided vehicle (AGV) dispatching in a flexible manufacturing system (FMS), and integrated process planning and scheduling (IPPS); Staedtler (3) provided a complete introduction to supply chain management (SCM). Liu et al. (4) proposed to solve the problem of seed and workers, who were multifunctional and/or multiskilled, were grouped into workstations and cells under dual-resource constrained (DRC) scheduling setting problems. Zhong et al. (5) proposed the visualization of big data from RFID-enabled shop floor logistics in cloud manufacturing; the method makes the manufacturing industry more intelligent. Zhang et al. (6) proposed the use of IoT to frame the performance analysis and exception diagnosis model (PAEDM), which can be used to effectively analyze production performance and exceptions in real time for dynamic and stochastic manufacturing processes. Lee et al. (7) discussed the recent advances and trends in predictive manufacturing systems in a big data environment. From previous studies, we have found that the APS system is very important for the manufacturing industry. However, if the production equipment and product information cannot be obtained immediately, the APS system cannot schedule correctly. This study uses IoT technology to solve the problem of data collection and an APS algorithm to integrate information from the IoT so that the APS system can quickly and correctly schedule.
In this study, we chose the printed circuit board (PCB) industry as the object of the research. The PCB is one of the most important parts of all electronic products. It is similar to many electronic products with a short life cycle and comes in various types. Electronic products are becoming lighter and thinner, and thus PCB production processes have become more complex. Figure 1 shows the main production processes for PCBs, but there are more than one hundred steps in a complete production process. The procedure for PCB production is not to produce the full order but to divide an order into many lots. The main purpose is to control the quality of the product and, if a problem happens, they can be traced. However, this method brings excess production information. For example, if an order is 10000 pieces and the production is for 100 pieces per lot, by calculating using the process in Fig. 1, 2500 pieces of processing information are generated during production. In reality, it is possible to generate even more information because of other factors. A PCB manufacturer with 200 orders a month could produce 500000 pieces of production process information. If we use manpower to input such large amounts of information, a large amount of time is required and may even cause delays. Schedule delays or errors in production schedules may ensue. In contrast, if we can collect the production process information through the equipment, the production schedule will be more efficient and more accurate.
This process has been highly automated for production equipment in the PCB industry. However, the equipment does not have a data monitoring interface or an agreement to provide data transmission or communication. Consequently, it is very difficult to collect production information from the equipment. In this study, we develop an IoT module for use in the equipment without a data transmission interface or a protocol for information transmission or communication. The method uses an external sensor to collect information on production without damaging the equipment. For the equipment with a data transmission interface but without a network function, this module is used as a data bridge that transmits the information to the database through the network. In addition, we also add RFID tags on production process documents to record each lot in the process. Therefore, we can use this internet module to connect the RFID reader. When using manpower to enter production information, we can read the production information on an RFID. Figure 2 shows the entire structure for the collection of production information. This information will use an APS system for scheduling. This method improves the overall production efficiency and will also lead the PCB industry into the era of IE 4.0.

System Architecture
The IoT module in this paper uses the 8051 series single chip with a sensor signal processing circuit, a communication interface, and other peripheral circuits. The block diagram of the module is shown in Fig. 3. This module is based on IoT applications, so we have integrated Ethernet and Wi-Fi interfaces in communications. In addition, the module also has a universal asynchronous receiver/transmitter (UART) that can be converted to RS232/422/485 interfaces, such that the module can be connected with many traditional devices. Finally, we also provide This IoT module has strong communication functions and digital and analog interfaces. In the analog interface section, this module has eight 10-Bit analog-to-digital (A/D) channels; in the digital input/output (I/O) section, the module has 16 channels. The A/D can also be changed to digital I/O when necessary or when an A/D application is not used; thus, this module can have up to 24 digital I/O channels. In addition, this IoT module also has a 1280 Byte electrically erasable programmable read-only memory (EEPROM), which can be used to record A/D data, so it can handle the initial calculation or analysis of the data. This allows the IoT module to have a certain degree of decision capability, and this function can also be used for temporary data storage if the communication function fails.
The internet communication part of the IoT module uses uIP (micro IP) 0.9 (9) developed by Adam Dunkels from the Swedish Institute of Computer Science. The purpose of the uIP is to use transmission control protocol (TCP)/Internet protocol (IP) for network communications providing the basis of user datagram protocol (UDP) and TCP services within an 8-or 16-bit microcontroller. The uIP is written in C, which only uses a few kilo bytes and makes minimum use of random access memory (RAM) with only a few hundred bytes. Figure 4 shows the uIP structure. In the IoT module, we use TCP and UDP in the uIP, which are most commonly used in network communications. Consequently, so that we can develop different applications according to needs or use, the TCP should directly save IoT data into the database. In addition, we also set up a web server in the IoT module so that users can use the browser to operate the IoT module. For example, using the browser control I/O or setting the sensor type and thresholds adopts the IoT module to make management very convenient.

Algorithms
Because the market changes rapidly and customers demand diversification, product manufacturing models have been gradually transformed into "small-volume/multiple-type" and "shortened delivery time" modes of production. Faced with more temporary urgent orders, inserting order requests and maintaining quality consistencies are serious issues. The production line must quickly replace the required raw materials and product models, and the operator must be exchanged frequently under the pressures of limited delivery times; all of these will be essential to the success of enterprise transformation IE 4.0. To solve these problems, many manufacturers have introduced a manufacturing execution system (MES) and APS but without much success. The main reason for this is that production information cannot be collected immediately. The problem of not being able to collect production information instantly is due to the fact that production equipment communication is complicated, or that the production information is collected manually. This study uses an IoT module and RFID technology to collect information on production equipment to reduce the time to collect information manually. This information is then put into APS for production scheduling.
We use a sequential single-item auction algorithm and assign the task to the production equipment resource. A formal definition of the auction algorithm is given a number of tasks W = {W 1 , W 2 , ..., W n }, with the subtasks w 1,1 , w 1,2 , ..., w n,m . The subtask w j (R i ), j = 1, ..., m, is a set containing some tasks that are bided and completed by the resource R i . We define a fleet of production equipment resources set as R = {R 1 , R 2 , ..., R k }. The time required for each w n,m in R k is t k,n,m . The maximum working time for each R k is T k . The function P(R i , w i,n,j ), i = 1, ..., k specifies the cost of executing the task w n,j by the resource R i . The term Q = {Q 1,1 , Q 1,2 , ..., Q n,m } is the quality function of the work w n,m in R i . If W has never been executed in R i , then Q is assumed to be 100%. The term Q n (1-100%) is the quality function of the resource in W n , so we can rewrite the original evaluation function as P(R i , w n,j (R i )Q n ). The term E n is the cost that occurs when the resource is executed with a different W n , so when the resource changes to a different product, P(R i , w n,j (R i )Q n ) is rewritten. We can use the following formula: where P(R i , w n,j (R i )Q n,j ) specifies the cost of executing the subtasks w n,j (R i ) by the resource w n,j (R i ).
We have three performance functions to compare the efficiencies for allocating the multiple mobile resource executing tasks.
In task allocation, we use the MINMAX function to improve the allocation. The subtask allocation problem is implemented by the MINSUM function. How to schedule the subtask for the shortest work time or cost for the resource is a question. We use a greedy algorithm and a 2-op exchange algorithm to solve it.
The principle of the greedy algorithm means that the allocation for each task needs a tender and bidding process. The tender allocates a task to the most-fit bidder. (10) It can efficiently solve the optimization problem in task allocation. The allocated task may not be the best selection for work time or cost. The 2-op exchange algorithm can search for the shortest work time or lowest cost for the production equipment resource.
We define the searching set on the collision space to be G = (C, N), where N represents the set of all task points. The term N = {N 1 , N 2 , ..., N n } and S represent the segment set between two tasks, S{C 1 , C 2 , ..., C n }. The optimal assignment can be written as The term x ij represents a searching rule that is included in the shortest path from task i to task j. These equations let the task to be assigned to only one resource. That is, the resource cannot collide with the other resource on the same task. The new cost function is P′(W i , W(R i )) according to the proposed algorithm. The new MINSUM function can be represented by Using the above formula, we can allocate all the tasks to the lower cost resource to be used for work scheduling. The work of the virtual code can be expressed as the following formula: Using the above formula, we can carry out task scheduling. When there is a new production information update, we reschedule all tasks with Eqs. (1)-(7) and update t k,n,m . Using this method, we can find a reasonable time for the product in production. If the same product is presented, we can use a reasonable time to schedule it. If there are new products we never produced before, which occurred in the PCB industry, we use layers, hole number, product size, and other parameters as evaluation reference. We then assume that the product takes the time required for each process. As long as the production information update time is more accurate, we can find the real production time in the process. Next, we use an actual case to verify this theory.

Experimental Results
In this study, we selected work, a PCB manufacturer in Taiwan as an example. We used one of the production lines with the IoT module and RFID developed to collect production information. We then compared this with another production line using manual collection to see which one was better on production information updates and production schedule efficiency. Figure 5(a) shows the IoT module developed in this study and Fig. 5(b) the IoT module connected to an RFID reader. This module is based on the 8051 series single chip as the main controller. There are many production equipment communications, but the IoT module developed in this study has strong communication capabilities, so it can be easily connected to the production equipment. Figure 6 shows a block diagram of the IoT module connected to the production equipment and database system. The IoT module and equipment production connection part can be configured in two ways to connect production equipment. The first uses a communication interface, and the second uses an extend sensor. A process transfer document is used with the RFID tag to simplify the input action. Although the IoT module can be connected to the database through the local area network (LAN), to reduce the complexity of the network system and ensure the safety of the database, the IoT module information is saved in the production department computer first and then into the database. Figure 7 shows an example of the actual connection of the IoT module to the production equipment. Figure  7(a) shows the PCB drilling equipment based on the programmable logic control (PLC). We used the IoT module and PLC connection to collect production information from the equipment. Figure 7(b) shows the status of the IoT module connected to the device PLC. Figure 7(c) shows the PCB optical inspection equipment. This device does not provide a communication interface, so we added sensors to the device. These sensors are connected and powered through   the network, and we use the IoT module to collect information from these sensors. Figure 7(d) shows the status of the IoT module connected to these sensors. We used this method to collect information from the production equipment. In the process of transfer, the original method was to manually enter production information into the database. Inputs were laborious and delayed using this method. To address this, we added an RFID tag to the transfer process of the documents. In the process of transfer, we use the IoT module connection to the RFID reader to read the data of the product change process. This reduces the time associated with manual input along with the delay input and also reduces input error. Figure 8 shows the results of adding an RFID tag to the process transfer documents. The IoT module developed in this work is capable of collecting input from the production process equipment and manufacturing process. We selected five sets of order data to test with a production line connecting the IoT module and a production line with manual updates of production information with which a production schedule test was carried out. Table 1 shows our choice of five sets of order information. Because the production process for these five orders is different, we only select the process information shared by all orders to do the comparison. The comparison time is at the completion of each lot production plus the time required for information to be entered into the database. We ordered the same production process using the IoT module and manual input to determine the production time after the average and then produce the chart, respectively. Figure 9 shows the actual results. From the chart, we can see that the use of IoT module Line 1 update production information required only 130 s. Using manual updates on Line 2, the production information update time required was about 360 s. Therefore, based on the update efficiency of production information, the use of an IoT production line was nearly 2 times as efficient. The APS system obtained the delivery information on the order, the completion rate of the order, and the equipment production data returned by the IoT module to the database from the database (Fig. 10). Then, the APS system scheduled the production based on delivery information and production management staff adjustments. If the production management staff is not satisfied with the results of the scheduling, it can also be manually adjusted. The result of the schedule is then passed to the production department and stored in the database. Under normal conditions, the APS automatically reschedules every hour, and this time can   be adjusted by the user. The process can also be set to complete the scheduled job and allow the APS system to automatically schedule it. When the APS system found abnormalities in the production equipment data, or when the production schedule was delayed, the APS system alerted the production management staff that it will also delay or shift the scheduling of anomalous equipment to other equipment. Finally, in the production scheduling part of the manual operation, each takes about 30 to 120 min, while the APS system scheduling averages only 4 min to complete. If the APS system reschedules the entire task of all rearrangements, only 10 min is required to complete. Therefore, the efficiency of production scheduling is nearly 10 times higher when using the APS system than when using the manual schedule.
Using IoT technology and RFID, the entire production information and production scheduling can be significantly more efficient.

Conclusions
We used a 8051 single chip to design an IoT module combined with an RFID to collect information on production equipment and production processes. We chose the PCB industry as the target of this study because of the complex manufacturing processes in this industry and the difficulty in collecting information from equipment. This is also a problem encountered by many manufacturing industries. The use of this IoT module does not change the structure of the production equipment with external sensors to collect information on the device. This IoT module does not connect devices without network capabilities to the internet. The IoT module is inexpensive, so it can solve for the manufacturing industries the problem of quickly and correctly collecting information on equipment.
In addition, we also used the IoT module to collect information used in the APS system developed using the auction algorithm. Using an APS system for production scheduling is more efficient than the original manual production scheduling by nearly 10 times. The IoT module and APS system developed in this work offer great benefits to the manufacturing industry.
In the future, we will continue to increase the capabilities of the IoT module and RFID so that they can be applied directly to the product to provide a more accurate production status. In addition, with the APS system, we currently collect only information on the production line; in the future, we will also add quality inspection information. This will improve the scheduling efficiency of the APS system. In addition, we will use the collected production and quality inspection data to carry out product and production equipment-related analyses, so that new products can be more efficiently produced using better quality production equipment.
We use the IoT module with RFID to allow production information to be collected quickly and correctly, and we use this information in the APS system. This work is an important part of Industry 4.0. We will continue to let our IoT module and APS system be applied in different industries. We expect that our study enables manufacturers to import products in Industry 4.0, and allow consumers to use inexpensive products.