A fully automatic calibration for vision-based Selective Compliance Assembly Robot Arm and its application to intelligent wafer inspection scheduling

This study provides a complete Selective Compliance Assembly Robot Arm (SCARA) wafer inspection system. This system mainly includes two phases. In the first phase, a SCARA manipulator acts as an inspection application platform, and a depth camera is used to position the position vector of an inspection point and a cassette together with a single-axis visual frame so that SCARA can automatically perform calibration in the working area. In the second phase, the wafer ready for inspection is optimized for procedure sorting to perform all detection items in the shortest time when SCARA is in the process of inspection. This study has solved the problem of calibrating positions of a manipulator and a working area with consumption of manpower in a traditional wafer inspection field in such a way that the manipulator can complete a predetermined task with the economic benefits of the inspection center without colliding with the working area. In addition, optimized scheduling reduces the time for the manipulator to complete all inspection tasks to allow more wafers to be inspected per unit time. Finally, the relative positions of all inspection points are automatically calculated by the manipulator by placing SCARA in a field not calibrated by the inspection points. The predefined wafer inspection scheduling is sent to the system for optimization calculation, and the experimental results are presented by SCARA.


I. INTRODUCTION
This paper proposes "a vision-based SCARA design with intelligent automatic scheduling and calibration integration technology for integration and application in an industrial environment." A SCARA robot is designed to integrate a visual-moving system to collaborate with each other. SCARA can manually teach coordinates of an end position to a robot in a working platform to be dispensed, and the teaching and calibration between the robot and each inspection platform can be autonomously completed for achieve greater work efficiency. There are two methods in traditional factories for the manipulator and platform calibration, manual calibration [1] and calibration by a Teachbox [2], both of which require manpower, time, and a way to contain work safety issues. An automatic calibration technology used in selective compliance assembly robot arm (SCARA) is proposed to reduce the time for the calibration of the manipulator, the working platform and solve the timeconsuming problem of manual calibration. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2022.3172953, IEEE Access VOLUME XX The SCARA manipulator was first designed with reference to the axial design of SCARA manipulators on the market on the basis of vision-based automatic calibration [3]. A multi-degree-of-freedom mobile vision system is built on a task platform to detect target points to allow the SCARA manipulator to obtain calibration point positions.
Recently, many manufacturers have proposed the concept of digital scheduling and optimized management for intelligent factories [4]. Therefore, we proposed an algorithm to make SCARA learn how to effectively reduce and control the scheduling time of the overall work. Using coordinates of the wafer inspection points, the sequence of discharges in the cassette, the number of wafers, and movement distance of the vision-based SCARA manipulator, we extracted and analyzed the data to enable the SCARA manipulator to autonomously plan the movement trajectory of the scheduling, to effectively complete the scheduling task of each wafer. The schematic diagram of vision-SCARA applied to wafer inspection scheduling is shown in Fig. 1.
The remainder of this paper is organized as follows. The SCARA design and environment setting, and the proposed method of wafer inspection scheduling are described in the sections III, and IV, respectively. The experiments are presented in Section V. Finally, the conclusions are provided in Section VI.

II. RELATED WORK
This section describes technologies related to the proposed method, and a literature review was conducted for SCARA teaching and calibration methods, Fuzzy Inference, and scheduling optimization, respectively.

A. SCARA teaching and calibration methods
With the advent of Industry 4.0, the role of automatic technology is becoming more important in many industries and services, especially in production lines where speed and efficiency are required. Many manufacturers are gradually replacing manpower with robots to perform tasks that are more dangerous and repetitive because of cost.
SCARA is suitable for assembly and quick sorting of precision 3C electronic parts on production lines because of its simple structure, small load, fast speed, and high accuracy of repeatability. For instance, SCARA manipulators are widely applied in wafer and panel handling in integrated circuit (IC) plants and in food and pharmaceutical production inspection. A SCARA manipulator generally has four degrees of freedom, which are divided into three rotational axes and one upper and lower axis [5]. SCARA is an industrial robot with a cylindrical coordinate system as the basis of mechanical structure. Therefore, in addition to the differences in internal mechanical details, the overall mechanisms and axial designs of manipulators provided by domestic and foreign manufacturers are nearly the same. In recent years, there have also been studies on SCARA manipulators in dual-arm mechanisms with more variants [6] and the development of new manipulators with five axes [7]. In addition, several studies were conducted on the kinematics and spatial trajectory planning of SCARA manipulators. For example, in Ken and Yutaka's study [8], a neural-like network was used to learn the inverse kinematics of a two-linkage SCARA robot.
When an industrial robot is to perform a task, it must know exactly the location of the target point. There are currently two types of point-to-point calibration techniques for manipulators: a user performs point-to-point calibration of the target by operating the teachbox and a user manually pulls the manipulator for calibration [9], as presented in Fig. 2. Based on traditional teaching techniques, a manipulator needs to calibrate each target point one-by-one, which takes a lot of manpower and time. Therefore, this study proposes a manipulator with automatic calibration technology. With vision sensors, marker coordinates are identified via image recognition, and the manipulator is then controlled autonomously to the target point to achieve automatic calibration.
Calibration of manipulator end-effector is an important technology for robots to grab objects. In reference [10] improved positioning accuracy of six-axis industrial manipulators using a multi-parameter calibration model. In the literature [11] obtained camera position relative to the endeffector using different postures of the industrial manipulator on the basis of improvement of the kinematic model of robots and identified the position using trigonometry. In the article [12] applied meta-heuristic algorithms in the calibration of end-effector in industrial manipulator and obtained good error data based on experimental results. Most of the end-effector calibration methods mentioned above are used for six-axis manipulators, and they require costly sensing instruments and considerable complex algorithms to achieve good accuracy. In this study, a feature method that can rapidly and automatically identify a favorable inspection point location was employed for automatic correction; features were captured by a low-cost depth camera to rapidly obtain the position information of randomly placed objects, thus facilitating appropriate placement of wafers for inspection.

B. FUZZY INFERENCE SYSTEM
Fuzzy Inference has been widely used in various academic and industrial fields, and many scholars have used this technique to verify the proposed method. In the field of SCARA application, some scholars regarded the Sliding This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2022.3172953, IEEE Access VOLUME XX Fuzzy Control Theory as a control method and used the Fuzzy Rule to overcome the possible oscillation problem in the sliding mode control signal, resulting in satisfying experimental results by simulating on SCARA [13]. In addition, some scholars have proposed to control the manipulator with a new type of decentralized robust adaptive fuzzy control, and they also argued that the proposed method has excellent stability compared with traditional adaptive fuzzy control (AFC) [14]. Based on the work scheduling problem, some scholars have also proposed to integrate an NSODE method using differential evolution and Fuzzy Theory [15], which were compared with existing algorithms such as Ant Colony Optimization, Particle Swarm Optimization, Cuckoo Search. The experimental results indicated that NSODE could obtain a better solution. In the same year, the application of cloud manufacturing was also integrated with Fuzzy Theory using original inspiration algorithms, and four integrated models were proposed to solve cloud technology problems with complexity, heterogeneity, uncertainty, and geographical distribution [16].
Similarly, the application of Fuzzy Theory may show excellent results with the recent prevalence of electric vehicles [17] and green energy technology [18]. In this study, the wafer prioritization is handled by Fuzzy Inference, the available features were selected by the mutual operation membership between SCARA and inspection points, and the wafer prioritization was identified by the rule of thumb based on the review of the aforementioned literature.

C. APPLICATION OF SCHEDULING PROBRAM
Sorting Theory has been applied to many daily life cases. In [19], scholars distributed the operating procedures in batches by the sorting method, and then the items distributed in batches were categorized to achieve a shortened schedule to not break the capacity limit of the machine. In [20], the scholars transferred crude oil from the production storage and offloading tanks to the land-based storage port using offshore oil extraction and transportation system fleets.
Then, sorting and scheduling optimization was used to solve the total operating cost problem and improve the system reliability using Pareto Fronts. In [21] [22], scholars mentioned that the problem of wafer re-inspection would lead to serious complications in wafer inspection processes. The transient process method may be applied to solve the scheduling clogging problem. The use of manual or sequential scheduling can have a significant impact on the time sequence in different professional fields. Accordingly, this study was designed on a SCARA for wafer transfer and for an automatic calibration system for the wafer position. Finally, an optimal scheduling method has also been designed for wafer inspection.

III. SCARA DESIGN AND ENVIRONMENT SETTING
The architecture of the robot designed is a vision-based SCARA system, as shown in Fig. 3(a). In particular, SCARA is used to perform the handling procedure specified by the algorithm, and provide high precision and high torque characteristics, the Dynamixel Pro series motor [23] is used as the drives the motor. The visual frame is integrated into the SCARA manipulator and detects the feature points of the inspection point and wafer cassette from one height unit downward. Similarly, the visual frame moves the depth camera over the working area where the features need judging using the Dynamixel Pro series motor [24] as the drive motor.

A. SCARA DESIGN
The schematic diagram of the kinematics symbol of the SCARA manipulator is shown in Fig. 4. Unlike the general SCARA design that only has two axes and one linear movement, the manipulator mainly comprises a three-axis arm and a linear movement mechanism, where the D-H parameters are shown in Table 1. Based on the three-axis SCARA design, the manipulator designed for this study can have higher degrees of freedom, a more efficient solution, and more movement space than the general SCARA design. Under the premise that there is an error in the position of the working area, the manipulator designed is expected to reach the target point judged by the image better than the twodegree-of-freedom SCARA design.
Four ROBOTIS motors are used to drive the joints of a four-axis SCARA manipulator [25] [26]. The angles at the four joints respectively are 1  , 2  , 3  , and 4  . For the endpoint P (P x , P y , P z ), the Denavit Harenbreg representation [27] is used to establish the kinematics model of the SCARA manipulator, where the D-H       According to the manipulator in TABLE I, the transfer matrix of the SCARA end coordinate system relative to the base system can be obtained as shown in (1). Finally, the position of the endpoint is obtained through the transfer matrix, as shown in (2).
After obtaining the endpoint position of the forward kinematics P (P x , P y , P z ), the angles on each joint can be deduced to control the manipulator to the required position through inverse kinematics. Information on the inverse kinematics parameters can be obtained through (3). In (4-6), these angles can be obtained to control the SCARA manipulator.  P a n P a n r P a n a P a n a a For wafer inspection, the wafer cassette is usually a single space where items can be removed. Moreover, it is important to avoid impact as much as possible to reduce loss during transportation because wafers are high-value items. To avoid collisions, the manipulator must be able to move along a straight line to the designated target point at an equal rate. Using the Jacobian matrix of the developed manipulator, the manipulator can calculate the speed required for each motor at the instant moment in real-time and move wafers into and out of the working area with a stable trajectory to avoid damage.
SCARA must move along a fixed path and a specific speed when moving wafers. Therefore, it is necessary to calculate the Jacobian matrix [28] to find the rate at which the motor needs to rotate at each time point and each joint. Given that the 0th axis is a linear movement, and that the action developed for this study will first perform Z-axis height positioning followed by placing and removing actions, the Jacobian matrix can be simplified as three-axis velocity planning, as shown in (7).
In particular, z n is the vector of the z-axis of the ncoordinate system on the base coordinates, n P m is the distance from the origin of the n-coordinate system to the origin of the m-coordinate system, w is the rotation vector, v is the displacement vector, and n  is the speed of motor n. The Jacobian matrix can be calculated at the instant moment using the current motor position and DH parameters. Then, according to the inverse matrix, the corresponding required rotation speed is found given the expected speed and angular speed at the end to achieve the expected path of linear movement in three-dimensional space.

B. VISUAL FRAME
In this study, a visual frame is designed as the source of image acquisition in the working area. The mechanism is made of lightweight material as the connecting rod between the motor and camera, which can reduce the shaking and torque required for the motor to push the camera.  For accurate image calibration of the inspection area and wafer cassette, the default angle of the camera lens position should be orthogonal to the plane of the working area, and it can have different postures depending on the current calibration target. The visual frame designed for this study is shown in Fig. 3(b). By raising the camera above the SCARA with an axis motor, the camera can maintain a vertical working area for a picture plane with enough movement to cover all working areas. For the purpose of making the image extraction feature points available to SCARA, the coordinate system of the camera corresponding to the manipulator is found by the robot forward kinematics and DH table so the image-extracted data can be used directly and strategically, as shown in TABLE II.
When performing the forward kinematics, the DH parameter is brought directly into (8) to obtain the coordinate conversion between the two axes, and then the transfer matrix from the base coordinates to the camera coordinates is gained through (9), in such a way that the feature coordinates obtained from the camera can be projected directly to the coordinate system used by SCARA. 1 cos cos sin sin sin cos sin cos cos sin cos sin 0 sin cos

C. DEFINITION AND POSITIONING OF INSPECTION ENVIRONMENTS
Two types of inspection environments are defined in this study, namely a wafer cassette and a wafer inspection point. In particular, the adopted eight-inch wafer cassette has 25 slots, as shown in Fig. 5(a); the wafer inspection point is represented by an X-shaped bracket with four protrusions in the bracket where the wafers are placed, as shown in Fig.  5(b). The wafer cassette and the inspection point are labeled with circular labels for positioning. The inspection point with labels is shown in Fig. 5(c-d). The labels for the wafer cassette are red, and the labels for the wafer inspection point are yellow.
Regardless of the device, all attached labels must meet the following conditions: 1) The total number of labels is three.
2) The connecting lines of the three labels must form an obtuse triangle.
3) The obtuse triangle must form an isosceles triangle. 4) The label position of the point where the obtuse angle is located is the position where the end of SCARA will reach. 5) The opening of the obtuse angle must face the position where the end of the SCARA enters the device. 6) Apart from the obtuse triangle, the connecting line of the remaining two points is connected orthogonally to the entry direction of the end of SCARA. In addition to the conditional algorithm mentioned above, a small number of parameters are required. In the scenario of wafer cassette calibration, the algorithm needs to have the height difference between the label corresponding to the obtuse angle and the lowest slot of the wafer cassette so the cassette can be fully defined. In the scenario of wafer inspection point calibration, the algorithm needs to have the information of the label corresponding to the obtuse angle and the height of the wafer bracket at the wafer inspection point, so that the algorithm can calculate the height at which the end of SCARA should move. Provided that the six conditions mentioned above are met and the necessary parameters are known, positioning can be performed using positioning technology. When an inspection point is added to the working area, it is only necessary to set the inspection point in a position that can be seen by the visual frame. The algorithm automatically determines the location of the inspection point and the direction that lets the end of SCARA enter, and the membership between the entry direction of the end of SCARA and the label position of the inspection point is shown in Fig. 6.
Refer   This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication.    This study uses the Intel Realsense D435i depth camera to capture the image and depth of the workstation to calculate the angular information of the workstation position because the calibration algorithm of the inspection point requires the coordinate points labeled on the base coordinates and height information. The inspected depth value can represent the points on the Z-coordinate value of the base coordinates because the camera image plane is parallel to the ground. The algorithm first captures the depth and color images and maps the captured depth image to the color image.
To reduce noise interference, the algorithm in this study will first use the median filter to process the chromatic image, and then filter out the positions of the labels with parameters such as color masks and depth values. The algorithm converts the image to HSV color space after smoothing it through the filter. The feature of HSV color space allows the thresholds among different colors to be easily defined. With the predetermined thresholds, the algorithm can filter the labeled areas in the image to produce a binarized image, and then extract the outline of the labeled areas using the algorithm in [29].
Although the auto-calibration algorithm of this paper is expected to achieve arbitrary placement, there is a limitation in the movement range for both horizontal and vertical movement of SCARA. Therefore, there is a limit to the size of the labels of the workstation on the image plane. The outline area of the screened label area is also used as one of the indicators to inspect whether the outline is correct through the algorithm. The visual algorithm uses the library provided by OpenCV (Open-Source Computer Vision Library) for outline area calculation [30]. If the number of pixels occupied by the outline falls within a certain range, the outline is considered a permissible range. In the current algorithm, the unit for the outline area threshold is still based on the number of pixels. Relevant parameters can be set more easily using metric units as thresholds.
After checking the validity of the outline area, the algorithm calculates the coordinates of the labels via the outline. This algorithm uses the fundamental property of shapes often mentioned in geometry, namely moments [31] [32], to derive the center of the outline using "moments", as shown in (10).
In (10), , , and are the raw moments of the outline. The coordinates of each label in the chromatic image can be calculated using (10). This algorithm also regards the inspected label depth value as the final condition for screening the outline because of the limitation on the working interval of SCARA. If the depth of the inspected coordinates falls within a certain range, the coordinates are considered valid to represent the label.
The inspection algorithm of the label position was mentioned above. For the procedure shown in Fig. 7, when the algorithm obtains enough label positions, the position and angle of the workstation can be calculated.
After the three label positions were obtained, the position and direction of the workstation in the image can be defined. The position of the workstation is the point corresponding to the obtuse angle in the obtuse triangle formed by the labels. The direction of the workstation is the intersection of the extension of the obtuse angle bisector and the line segment formed by the other two points. Before the calculation of the direction and position, the three labels of the workstation may not be the same height, and the position of the label points may be inaccurate because of projection during imaging, as shown in Fig. 8. The red area in the figure is the label, and the correct coordinates of the label should be at X. However, because of the feature of the camera model, the label is similar to being located at X  . Error there between can cause misreading of the workstation position and angle. This algorithm uses a similar triangle approach to tackle this problem. As shown in Fig. 8, the actual label position should be the observed position shrunk toward the image center, and the amount of shrinkage is -XX  , where the value of X can be calculated using (11 Fig. 9. The green outline in the figure is the label positions inspected, and the blue dots in the outline is the center of the outline calculated using (10). If angles of the workstation are calculated using uncorrected coordinates, and dcalculation errors will occur. The obtuse triangle drawn by the three blue dots and red edges in the figure is generated using the dots corrected by projection, and the three dots are the real positions of the labels.
After the projection is corrected, the direction vector of the workstation in the camera coordinates is obtained from the angle bisector of the obtuse angle. The intersection of the angle bisector on the third side can be obtained by the Angle Bisector Theorem. Using Fig. 10 as an example, the angle bisector of angle a has the property of (12).
ad refers to the direction vector of the workstation, and the angle of the workstation can be obtained from (13). The final angle obtained is then used to calculate the angle value of the workstation at the base coordinates using the kinematics of SCARA. The complete workstation position and angle calculation procedure is shown in Fig. 11.
:: ab ac bd dc = (12) 2( , ) yx angle atan ad ad = (13) After the depth map and chromatic image are processed by filtering and projection correction, the position and angle of the workstation on the image plane will be obtained, and the value of the base coordinates will be calculated by the forward kinematics. To avoid misjudgment, the algorithm performs screening on the label outline and depth values. Finally, the workstation position can be automatically inspected by scanning the working area with the visual frame. This enables the SCARA manipulator to judge the position and angle of the workstation autonomously, reducing the tedious steps of manual calibration.

IV. Proposed method of wafer inspection scheduling
Each of the inspection points will be passed through during an operation of the wafer inspection. In this study, it is simulated that each inspection point has a different inspection method and time to determine whether each wafer meets the qualification standards. However, a different procedure may be adopted for each wafer depending on different inspection methods. The purpose of intelligent scheduling is to reduce manual processing procedures. The SCARA manipulator is enhanced to effectively reduce the scheduling time required for wafer inspection using an optimization approach through the fuzzy inference system and optimal sorting. A schematic diagram of the optimal scheduling inspection procedure is shown in Fig. 12.

A. WAFER INSPECTION INFORMATION
There is a wide range of wafer sizes on the market, among which 8-inch is in short supply [33] and the most popular in terms of price, as shown in Fig. 13(a). If the inspection time can be reduced and the inspection quantity increased efficiently during the wafer inspection process, the output value of the inspection center can be increased for economic efficiency at a factory.
This paper adopted an 8-inch wafer model, as shown in Fig. 13(b). In a computer simulation process, three inspection points with different inspection time periods were used as the basis for wafer inspection. While each wafer passes through the inspection points, the time required for different inspection methods was used to determine whether the material quality meets the verification standards. However, wafers themselves have different procedures depending on the inspection method. To reduce manual processing, we propose an intelligent scheduling method to enhance the inspection procedure required by SCARA for wafer inspection.
The number of wafers tested depends on the number of wafer cassette slots. A 25-slot cassette is used to test the adaptability of the algorithm for wafer scheduling in a scenario of possibly testing more wafers. In the inspection procedure, each wafer needs to pass through a number of inspection points. To realize the wafer inspection process in This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2022.3172953, IEEE Access VOLUME XX industries, we determine a set of scenarios where the number of inspection points can be set for different numbers of wafers using a computer simulation process, and the set scenarios are configured to each wafer so that the wafers can be processed through the inspection scheduling process. The conditions for each scheduling are as follows: (1) each wafer is inspected by computer simulation, simulating the number of inspection points randomly passed through, (2) wafers passing through the inspection points can be inspected in sequence, and (3) when the inspection is completed, the wafers are placed in Cassette-B. As shown in Fig. 14, Cassette-A represents the wafer cassette initially placed with each wafer, the Wafer Chuck Table represents inspection points, and Cassette-B represents the wafer cassette for placement after each wafer inspection.

1). FUZZY SET
When a certain number of wafers have been inspected, a manual or computerized process is required to determine which wafers need to be removed from the cassette first for inspection. Based on this issue, in [35][36], scholars mentioned selecting results favorable to feature recognition using the fuzzy set via testing systems or images; satisfactory results can be achieved by identifying the database through Fuzzy Inference.
Fuzzy Theory was mainly proposed by Zadeh in 1965. The fuzzy set in this theory can be used to define the degree of comparison among different items and properties. The method of Fuzzy Theory to identify the degree of wafer prioritization mainly comprises different feature numbers to form a full set, as shown in Fig. 15. Then, the fuzzy set is quantified by the attribution function.
For the use of Fuzzy Theory, we first determine and analyze the priority of each wafer that can be moved out to the inspection point using logical properties of multiple eigenvalues of fuzzy sets, as shown in TABLE III.
In Table III, two valid features were chosen as priorities for wafer selection: the distance difference F 1 between the slot position of each wafer cassette and the height of the wafer placed at the first wafer inspection point, and Time F 2 for the number of inspection points that a wafer has passed via the simulation process.
For the two features, the ranges of membership function, respectively, are

2). ATTRIBUTION FUNCTION
The method of quantifying fuzzy sets is called attribution function, which is used to determine fuzzy set data using mathematical equations. The continuous attribution functions are used to describe the infinite fuzzy set properties. The commonly used functions are Triangular MF, Gaussian MF, Trapezoidal MF, Bell MF, S-shaped MF, and Z-shaped MF. The attribution function used in this study is Triangular MF, as shown in (14).

3). FUZZY INFERENCE SYSTEM
After the design of fuzzy set attribution distribution, the explicit value can be obtained and mapped to the graph of its attribution function using the mathematical calculation of the attribution function and the fuzzy attribution degree can be generated. This process is called fuzzification. It is necessary to use the Fuzzy Inference process for the output result to know the membership problem of each feature. Finally, the output result is obtained by the defuzzification process. The Fuzzy Inference System (FIS) refers to a fuzzy rule base consisting of many inference rules. The Takagi-Sugeno fuzzy model is used for the project, and the definition of this rule base is developed jointly by Takagi, Sugeno, and Kang. The main purpose is to systematically generate the required front and back parts of IF-THEN rules from the input feature information to the output result of the required prioritization.
Moreover, it is possible to adjust the structure and parameters of the front part and the back part according to the wafer data. This model is often applied in control systems and other fields. The inference is shown in (15). In this equation, F 1 and F 2 represent input features; A 1 and B 1 refer to the degrees of each feature in the membership function; finally, output y is the result, namely wafer prioritization. The rule base used is shown in TABLE V.

4). DEFUZZIFICATION PROCESS
The final procedure of Fuzzy Inference is defuzzification. It is mainly used in the output of Fuzzy Inference to convert the fuzzification result inferred, that is, to convert fuzzy sets into explicit values. While there are many methods for defuzzification, this paper uses the center-of-gravity method for calculation, as shown in (16).

5). FUZZY INSPECTION SYSTEM OF WAFER PRIORITIZATION
In the fuzzy inspection system of wafer prioritization, the fuzzy controller input is two feature values: the difference in distance between the position of each wafer placed at the cassette slot and the placement height of the first wafer inspection point, and the time for the wafer to pass through the inspection points selected by the computer-generated process. Moreover, the overall framework of the fuzzy logic system designed on the MATLAB R2020b platform is used, as shown in Fig.16.
As shown in Fig. 17, the fuzzy set of the input variable distribution CASlot_to_T1 is concentrated between 0 and 100, and the fuzzy set Wafer Table work time is concentrated between 0 and 100, as shown in Fig. 18. Therefore, each input feature variable is divided into five fuzzy sets VS, S, M, L, and VL. The fuzzy set of the variable distribution of the wafer prioritization wafer select is concentrated between 0 and 1, as shown in Fig. 19. Finally, each fuzzy set is assigned a range of membership functions, and because the number of input features is 2, there are 25 fuzzy rules, as shown in Fig. 20.

C. INTELLIGENT SORTING
For the optimal sorting step, the inspection points that each wafer needs to pass through selected by the computer are mainly prioritized to effectively reduce the inspection time procedure. In the procedure design, each wafer will encounter problems during the inspection process, including vacancy filling, cross-hopping, inspection point elimination, and wafer inspection waiting for wafer delivery of SCARA time sequence vacancy filling. The scheduling flowchart is shown in Fig. 21.

1). INSPECTION POINTS FOR VACANCY FILLING
Each wafer has a certain number of inspection points to pass through. However, in three inspection points, at least two wafers can be inspected at the same time, and each wafer will only pass through a maximum of three inspection points. However, in the scenario of the two-wafer inspection, there will be a maximum of six inspection point paths. Therefore, if the number of wafers placed in the cassette is less than a multiple of 6, three additional inspection points should be added to the temporary storage location to avoid a shortage in the scheduling design sequence. Fig. 22 shows a schematic diagram of the inspection points for vacancy filling.

2). CROSS-HOPPING
The schematic diagram of cross-hopping is shown in Fig. 23.
In the test sorting of the wafer placed at the inspection point moved by SCARA, the wafer will be inspected at the inspection point. However, SCARA will detect the scheduling of the next wafer and can place the wafer at the other two inspection points arbitrarily. When the inspection points are full of wafers, SCARA chooses to wait for the wafer in the inspection points or move the wafer to Cassette-B. In this case, there is a high chance of encountering a conflict between two wafers inspected and placed at the same inspection point, so the prioritization sorting approach is adopted. When two wafers are in the same inspection point during the scheduling process, the inspection point in the sequence will be swapped with the next inspection point to avoid the conflict of the same inspection point when SCARA is handling wafers.

3). INSPECTION POINT ELIMINATION
The sequence of wafers passing through the inspection points is mainly planned to use a simulation process. This simulation method uses a computer to randomly select the number of inspection points through which the wafer needs to pass. When there is an inspection point that does not need to be passed through, it must be eliminated from the scheduling to facilitate overall wafer inspection time. In the case of eliminating unwanted inspection points, it is also important to consider whether there is a conflict between the current inspection point and the next inspection point. The schematic diagram of the inspection point elimination is shown in Fig. 24.  Figure 23. Cross-hopping.
Inspection point elimination Wafer Chuck Table   Wafer number Figure 24. Inspection point elimination.

4). SCARA TIME SEQUENCE VACANCY FILLING
Time sequence vacancy filling can significantly improve the time on the inspection procedure. When the wafer inspection is complete, the algorithm decides whether to move the uninspected wafers to another inspection point, or whether to move the inspected wafers to the cassette first. If the inspection point to which the uninspected wafers are to be moved is different from the current location of the finished wafers, the algorithm will move the uninspected wafers to the inspection point first, and then move the finished wafers to the wafer cassette, thus allowing the uninspected wafers to be inspected earlier. If the inspection point to which the uninspected wafers are to be moved is the same as the current location of the finished wafers, the wafer must first be moved to Cassette-B by SCARA to finish the inspection procedure, and then the uninspected wafer will be moved to fill the vacancy.

V. EXPERIMENTAL RESULTS
In industrial fields, it is necessary for most SCARAs to go through a series of tedious calibration procedures before operation to prevent SCARAs from hitting the surrounding walls or obstacles during operation. The automatic calibration procedure developed in this study can significantly improve the time required for accelerating calibration.

1). MANUAL CALIBRATION
As shown in Fig.25(a-h), the manual calibration procedure requires the worker to move the SCARA manipulator to the correct position, record the position, and then move it to the next position. These actions are repeated until all the working areas are calibrated.

2). AUTOMATIC CALIBRATION
When automatic calibration is performed, a worker does not need to do the calibration on his own. The computer system will automatically move and scan the visual frame in the working interval at one time, and the position and angle of the wafer inspection point will be deduced by image recognition analysis and kinematics, as shown in Fig. 26(ae).
From the experimental results, there is a difference between automatic calibration and manual calibration. Because manual calibration requires manual movement of the end of SCARA to the inspection point, and there is no clear benchmark to determine whether the expected target value is aligned, the operator of the SCARA manipulator still needs to record the data to complete the calibration of an inspection point despite completion of the alignment. In the scenario of the self-developed automatic calibration technology, the visual frame views each inspection point from above and also performs scanning in the working area. Specifically, the location and direction of each inspection point can be known, and errors caused by humans' operation as well as dangers in public security can be avoided. Moreover, this also saves the time of human recording and does not require any manpower in the process.
In this experiment, the time required for manual calibration and automatic calibration is compared, where the targets to be calibrated include two wafer cassettes and three wafer inspection points. Manual calibration involves a lot of tedious work, and each inspection point needs to be handled. In contrast, automatic calibration requires only a temporary stop and the acquisition of sufficient data. The time spent on the calibration of the five inspection points is shown in TABLE VI.

B. SCHEDULING EXPERIMENT
For the most work done per unit time in SCARA, how to design an effective time-saving schedule will affect the completion time of all the work. For this reason, this study develops an intelligent scheduling algorithm to increase efficiency and compare it with sequential inspection and manual scheduling inspection.

1). INTELLIGENT SCHEDULING INSPECTION
This scheduling is optimized for wafer inspection using an optimization approach through the Fuzzy Inference method and scheduling heuristics optimal sorting. Meanwhile, the scheduling is investigated by genetic algorithms and neural networks (GANN) binary hybrid method and compared with the proposed method. MATLAB 2020b was employed for algorithm calculations. Herein, NN parameters are set by referring to previous studies [37] [38] (with adjustment): the number of neurons in the hidden layer of the NN is 15, the number of iterations (Iter.) is 10000, and learning rate is 0.001; GA parameters are set by referring to previous studies [39] [40] (with adjustment): population size =50; the crossover rate =0.8; the mutation rate = 0.1. The algorithm terminates after 300 iterations.

2). SEQUENTIAL INSPECTION
Under the premise of sequential inspection planning, after SCARA moves a wafer, it must wait for the wafer to complete the inspection time before continuing the inspection procedure for the next wafer. Therefore, the time required is relatively long, which is considered inefficient.

3). MANUAL SCHEDULING INSPECTION
In this section, inspection time of scheduling that completely follows the placement order of wafers for inspection, manual empirical scheduling, GANN scheduling algorithm, and the proposed intelligent scheduling algorithm were compared with each other. All inspections were conducted using the first wafer box in the experiment, eight wafers in Slots 2-9 shall be transported to three workstations, and no requirement on the sequence was given. The inspection time of each workstation was 30, 40, and 35 s, respectively. After the wafers are extracted from the first wafer box, they went through three workstations and returned to the second wafer box. Table VII shows the average total inspection time of the four scheduling methods obtained from three duplicates in this scenario. Operational time sequences of the four scheduling methods were indicated by Gantt charts, as shown in Fig. 27. Experimental results revealed that the orange parts denote that the wafer is inspected at the inspection point, the blue parts denote that the SCARA manipulator is moving the wafer, and the gray parts denote that the wafer inspection at the inspection point has been completed and is ready for delivery. To facilitate result comparison, the inspection time of all time sequence diagrams in Figs. 27(a-d) were set to be 0-1600 s. As shown in Figs. 27(a-d), scheduling by the intelligent algorithm is the most effective one, and its inspection time was reduced by half compared with that of the sequential inspection case. Meanwhile, the four Gantt charts indicate that the blue part denotes the operation time of the SCARA manipulator. During intelligent scheduling shown in Figs. 27(c, d), the SCARA manipulator was almost completely in an effective working state, which is different from the fact that the SCARA manipulator remained in original posture until the completion of wafer inspection in the sequential scheduling case shown in Fig. 27(a). Therefore, Experimental results on time scheduling demonstrated that the more intensive the operation time of SCARA manipulator, the more successful the wafer scheduling is, which allows inspection of more wafers and effectively reduces the total inspection time.
Additionally, the inspection time of intelligent scheduling methods of GANN shown in Fig. 27(c) and the proposed method Fig. 27(d) were highly consistent (approximately 850-910 s), and both methods can effectively use the operation time of SCARA manipulator. Nevertheless, for the GANN method, the nature of its algorithm is that it must be trained and tested through data, and the operation results of the overall inspection can only be obtained by the iterative operation of multiple hidden layers. Table VIII shows the inspection time of the GANN method and the proposed method.

VI. CONCLUSION
This study developed a wafer inspection system with automatic calibration and optimized scheduling. By adding a calibration system of image vision to the SCARA manipulator, when the SCARA manipulator is placed in a new working area, it can be automatically calibrated according to the relative positions of the inspection point and the wafer cassette, so the SCARA manipulator can move the wafers correctly. Then, all wafer tasks are optimized using intelligent scheduling, such that all wafers were inspected in the shortest time.
The experiment indicates that the proposed method significantly improved the scheduling time. In terms of automatic calibration, the total time for automatic calibration is significantly shorter than that for manual calibration, and the accuracy of automatic calibration is comparable to that of manual calibration. Compared with unscheduled scheduling, intelligent scheduling has a shorter completion time, which is also better than manual scheduling in Fig. 27(c). Overall, the time from calibration to task completion can be greatly reduced. Future research will include setting up multiple stations for testing in the system and incorporate enhanced learning methods for wafer inspection scheduling.