Utilizing fuzzy logic controller in manufacturing facilities design: Machine and operator allocation

Abstract In this paper, a fuzzy logic controller will be introduced and discussed that can be applied for manufacturing systems. Our proposed control system will utilize fuzzy logic principles to find the optimum number of machines and operators assignment by developing the heuristic relations between the inputs and the outputs of the controller. The project inputs are the desired daily production and the average product processing time by each machine. The production process is assumed to be automated and the routing of products to these machines will be automated and requires negligible time. All machines are also assumed identical in both the functionality (manufacturing process) and the service time. Given the inputs as the number of products and the average service time, the goal of this controller will be to determine the number of the machines and the number of the operators needed to meet the production demand.


PUBLIC INTEREST STATEMENT
Manufacturing systems are built to meet the varying customer demands and stay within acceptable profit margins. Production managers who utilize industrial automation principles such as Just-in-time and cellular manufacturing should optimize the number of machines and operators needed to achieve the customer's orders. This paper is showing how fuzzy logic can assist the manufacturing system in determining the number of machines and operators needed. This paper is a starting idea to create a helpful tool for manufacturing systems' managers to calculate the optimized numbers of machines and operators needed for their production plan, where this tool could be tuned by including their knowledge and experience.

Introduction
Manufacturing systems are designed and controlled to satisfy customer's orders and demands in a timely and cost-effectively manner; therefore, it is important to deliver the manufactured products at the exact time that was agreed upon with the customer. All current manufacturing systems, such as food, textile, or electronic devices, are implementing Just-In-Time (JIT), and industrial automation principles and cellular manufacturing layout to increase productivity and profit. This practice encouraged to develop methods to determine the allocation of cross-trained operators to handle more than one machine. Keeping with the high production rate and performance, assigning the correct and optimal number of machines assigned to each operator is essential, it will assure the utilization of the operators and not overload them and keep the machine running with minimum downtime due to changeover or loading/unloading activities. Therefore, knowing how many machines and how many employees needed to accomplish a specific manufacturing job is vital.
It is not profitable to have more employees attending the production machines (fewer machines assigned to one operator) because this will act as a burden on the company as there will be extensive operator's idle time and will increase the usage/workload on the machines which require extra maintenance over the production period. On the other hand, having fewer employees (more machines assigned to one operator) will result in overloading the operators and decrease their work moral standards, and machines will be idling for the operator availability. Both scenarios will cause a delivery delay. The same logic can be applied in the case of a bank where we need to determine how many tellers to have at different times depending on the number of customers. Our purpose in both cases is to accomplish the task of the production or the service for all the customers within the time and cost constraints. The number of machines should be higher than the calculated numbers because there is a possibility that some of these machines will fail down. This goal of this paper is to design a fuzzy control system to calculate the optimum number of machines needed to operate in order to finish a specified job with a given number of products (customer demand/queue size). The available operation time is assumed a regular shift time (8 hrs. per day). The proposed method assumes that all the machines are identical. The cycle time length, which is the sum of the machine run time, the service time, and the operator-machine interaction time, is assumed constant for a given product. The proposed control system will be designed using a fuzzy logic inference system. This system will have to input parameters; the number of the products and the service time and two outputs; the number of machines needed and the number of the operators, whose jobs are to operate (loading, unloading, and inspection) and observe any failures or quality concerns.
The paper is organized as follows: Section 2 is a background and literature review; Section 3 describes the model development; Section 4 deals with the analysis and results of the fuzzy logic controller to determine the optimum number of machines to be assigned to the operators; Section 5 concludes the paper and describe the team future plan.

Background and literature review
Production lines managers are working non-stop to maximize profits by increasing yields and reducing the cost of production at the same time (Tirkel & Rabinowitz, 2014). An important approach to achieve that goal is to determine the optimum number of operators needed to run the production machines. This paper is utilizing the fuzzy logic controller to provide an easy tool where management can determine the optimal number of operators to be assigned, and the number of machines that should be used by the operator in terms of controlling, or operation to reach the production goals (Hadad & Keren, 2016).
Assigning several machines to one operator may not increase the system's overall performance (Chien et al., 2014). Although assigning the proper number of machines to an operator is a critical and non-trivial decision. Trade-offs will take place and manger will need to select tradeoffs the best scenario (Stecke & Aronson, 1985). Too many machines assigned to one operator may increase overworked operator occurrences, idle machines, defects and failures, safety and health problems, and so on. On the other hand, few machines assignment may cause unnecessary labor costs associated with idle or bored operators (Stecke, 1982).
The operator-machine assignment affects both machine and operator utilization and production yields' cost (Haque & Armstrong, 2007;Stafford, 1988). The number of operators assigned to a given number of machines, and the number of machines that will be controlled by each operator, must both be optimized. Additionally, different objective functions such as minimizing cost, maximizing profit, minimum idle time, and/or minimum overload, may require different assignments. Many papers in the literature dealt with similar problems assigning the operations to machines/ operators, both in job-shops or flexible manufacturing systems (Chen & Ho, 2005;Park et al., 2014).
The traditional model to calculate the number of machines assigned to one operator starts with determining the number of machines needed to achieve the daily production rate using the simple equipment selection model (Tompkins et al., 2010). This equation is shown below: where P = desired daily production rate, t = = independent machine activity time to produce one unit (automatic machine run) (in hours), τ = machine available time (in hours) and η = machine efficiency. The machine-cell configuration will result in three different scenarios to calculate the desired production rate: (1) Simple machine-cell Yield Loss is shown in Figure 1: where P k : Production input to the operation, d k : Fraction of P k lost (scrap rate) and O k : Output of process k. (2) Simple machine-cell Yield Loss with rework capability illustrated in Figure 2: where P k : Production input to the operation, d k : Fraction of P k lost (Process scrap rate), r k : Fraction of Rework lost (Rework scrap rate) and O k : Output of process k.
(3) Series configuration of multiple simple machine-cells Yield Loss:  Thereafter, the number of machines assigned to one operator can be assigned mathematically using one of the following approaches: (1) The deterministic method, which utilizes the multiple activity chart shown in Figure 5 (Tompkins et al., 2010). This chart shows the relationships between multiple activities' periods such as Loading (L), unloading (U), Automatic Machine Run (R), Travel (T), and Inspection (I), graphically against a timescale. This method is useful in analyzing multiple activity relationships when a single operator supervises non-identical machines but it is tedious and takes time.
(2) The probabilistic method, which will be based on the Employee Requirements for Machine Operators equation.
where a = concurrent activity time (loading, unloading, etc.), b = independent operator activity time (inspecting, packing, etc.), t = independent machine activity time to produce one unit (automatic machine run), and n' = the maximum number of machines that can be assigned to an operator.  Tashtoush et al., Cogent Engineering (2020), 7: 1771820 https://doi.org/10.1080/23311916.2020.1771820 The optimization problem is an important issue that has been studied by many types of research throughout the last decade in various manufacturing fields such as structural design (Yildiz, 2013), cell formation (Anbumalar et al., 2015;Balakrishnan & Cheng, 2005, 2007Brauner & Finke, 2001;Burbidge, 1985;Gupta et al., 1996;Venugopal & Narendran, 1992), U-shaped manufacturing lines (Nakade & Nishiwaki, 2008;Nakade & Ohno, 1999;Sirovetnukul & Chutima, 2009Sparling & Miltenburg, 1998), and others. Our research is related to applying Fuzzy logic to the machineoperator allocation problem in the cellular manufacturing setting. Few researchers did utilize fuzzy logic to analyze facility layouts, working conditions, lighting effect on employee behavior, dynamic layout, and even the selection of the layout and machine allocations to estimate the downtime and Fuzzy Inference System (FIS) had been utilized to determine the machine criticality levels for maintenance activities ( Fuzzy logic was first invented by Lotfi Zadeh who proposed the fuzzy set theory in 1965. The fuzzy logic concept is widely used in different fields of life including industry, control theory, and artificial intelligence (Mamdani & Assilian, 1999). Unlike the binary logic that has only two values (0 or 1), the fuzzy logic has more than one value between (0, 1). In binary logic (for example), an object can be described as "it is heavy" or "it is light"; however, if fuzzy logic is being used, an object can be described as 80% heavy or 20% light. Furthermore, when linguistic variables are used, these degrees are usually managed by specific functions called membership functions (Jantzen, 2007).
Fuzzy inference systems have been used and implemented in many fields of industry including automatic control, decision analysis, data classification, expert systems, and artificial intelligence. Fuzzy inference systems have different names, such as fuzzy expert systems, fuzzy-rule-based systems; fuzzy associative memory, fuzzy modeling, fuzzy logic controllers, and they can also simply called fuzzy systems (Dell'Acqua, 2012).
Fuzzy logic controllers have been widely used after the invention of the fuzzy set theory. A comprehensive survey on fuzzy logic control was discussed in (Sugeno, 1985). The use of fuzzy in control systems logic was discussed in many papers (Graham, 1991;Lee, 1990;Pedrycz, 1993;Tao, 2002;Yeh, 1999;Yen & Langari, 1999;Zhou, 2008). Some researchers explored the use of fuzzy control in machine drive applications (Heber et al., 1997;Tang & Xu, 1994). It was shown that a well-designed and tuned fuzzy controller could outperform the conventional PID controller (Heber et al., 1997). Some books that elaborated on the use of fuzzy logic controllers in different applications were also published (Bose, 1994;Ross, 2005). Fuzzy logic allows controllers to mimics human logic while solving problems and they are inherently stable and proven to be cheaper to develop, fast, robust, flexible, and easy to modify and implement. Additionally, the fuzzy logic controller can be combined with conventional control techniques.
Mamdani's fuzzy inference method is one of the most famous approaches to build fuzzy controllers. Mamdani's approach was among the first control systems built using the fuzzy set theory. It was found in 1975 by Ebrahim Mamdani as an attempt to control a steam engine and boiler combination by synthesizing a set of linguistic control rules obtained from experienced human operators. Mamdani's method was based on Lotfi Zadeh's 1973 paper on fuzzy algorithms for complex systems and decision processes. Mamdani-type inference uses piecewise linear membership functions, triangular fuzzy numbers (TFN) and trapezoidal fuzzy numbers (TrFN) as shown in Figure 6 (Alazzam & Ahmed, 2018; Chang & Hsu, 2015). Mamdani's Fuzzy Inference system was used in many research papers to design different types of controllers (Lewis, 2013, Alazzam et al., 2013, Alazzam & Ahmed, 2018Alomar & Alazzam, 2018;Goldberg, 1989;Mastacan & Dosoftei, 2018;Simon, 2002).
The TFN membership function can be mathematically represented as displayed below in Equation (9): The TrFN membership function can be mathematically represented as displayed in Equation (10):

Methodology
The fuzzy logic based on Mamdani fuzzy logic inference system will be used in this research paper. First, the Fuzzy relations will be defined for the two inputs and the two outputs, which are the number of products (N), the service time (S), the number of machines (M), and the number of operators (P), respectively. These fuzzy relations are determined by heuristic knowledge and are somehow subjective.
The fuzzy relations or as sometimes called fuzzy sets, the inputs for our proposed control system in fuzzy terms are defined as: Where: N: The number of products to be manufactured.

Figure 7. Fuzzy membership function for the first input RN.
These fuzzy relations for the inputs and the output (R N , R S , R M , R P ) that will be used in the fuzzy controller and based on triangular membership functions are shown in Figures 7, 8, 9 and 10. The next step is to write the control rules for the output and in this case, these rules follow the logic or the heuristic knowledge. We have chosen the rules to be as follows: If (no of products is VL) and (Avg. Service time is VL) then (No. of machines is VL) and (No. of Operators is VL)   Tashtoush et al., Cogent Engineering (2020), 7: 1771820 https://doi.org/10.1080/23311916.2020.1771820

If (no of products is VL) and (Avg. Service time is M) then (No. of machines is VL) (No. of Operators is VL)
If ( After plotting the fuzzy relations for the inputs and the outputs and after writing the rules, the controller using the Mamdani fuzzy inference system will be designed. In this project, the MATLAB Fuzzy logic platform will be used for this purpose.
Since the team's goal is to use the Mamdani fuzzy system for the manufacturing system, a brief description of how Mamdani System works will be illustrated. Mamdani Fuzzy inference system consists of four steps: (1) Input Fuzzification: the input is transformed from numerical value into a linguistic term. To do that, we can use the membership function for the triangular fuzzy function given before, substituting the right values for a1, a2, a3. After this step, the input will look something like N′ = 0.6/L + 0.3/M + 0.2/H … etc.
(2) Output Fuzzification: the output is calculated from the inputs in terms of fuzzy linguistics terms. In this step, the output in fuzzy linguistic terms will be something like Y M ′ = 0.4/ L + 0.2/M.
(3) Transfer the fuzzy subset of the set of linguistic terms for the output to a fuzzy subset of the set of numerical values. In order to achieve that, fuzzy composition using the Max-Min Rule will be utilized. Expressing the Max-Min Rule could be written as shown in Equation (10) to represent the prosed case: (4) Defuzzification: Transforming the fuzzy set of the output in one numerical value, which can be estimated using the center of gravity method as shown in Equation (12): In our design, the output Y M takes all the real numbers [1,60], and Y O takes all the real numbers [1,10]. In this step, the membership value that we got from the previous step will be multiplied by each output value and find the summation. Afterward, this sum will be divided by the sum of all the output values by assuming that the estimated output is an integer between (a) and (b). If the output is the set of all the real numbers between (a) and (b), we have to do integration instead of the summation in the formula mentioned above, utilizing MATLAB for this calculation.
The Control steps of the Mamdani fuzzy inference system can be summarized in Figure 11.

Analysis and results
The focus of the paper was to illustrate using Fuzzy logic as a controller for the manufacturing system. The Mamdani Fuzzy control method can be used for different applications, where the choice of the Fuzzy inputs and outputs membership functions was based on the knowledge of the system, and this knowledge usually can be drawn out from experts in this field and can be used to tune the system to act as if they are manually controlled. The inputs and rules were all selected based on the logic, so what is low in one system may not be low for other cases. The design of the fuzzy controller can be tuned in different methods. First, the logic of the fuzzy rules should be chosen in a way that agrees with how we want to control the outputs. In addition, the correct parameters for the membership functions (a 0 , a 1 , a 2 ) should be used; this can be done by trial and error. Adding more fuzzy terms will also give us better performance and fewer errors. When more fuzzy terms are used, the control precision will be higher since we could have smaller steps within the range of numbers used. The output from the fuzzy controller can be compared to the desired output. An error function can be defined as the difference between the controller and the desired output. This error function can be optimized (minimized) using one of the metaheuristic optimization algorithms. Because all membership functions are a representation of the input and output linguistic variables, which can be expressed as p = (p1, p2, p3 … m) where parameters have a finite set of values. The error function can be defined as shown in Equation (13) (Tao, 2002): E(t) is the actual crisp error in the control system output at (t) time units after applying a test input function. Therefore, the objective is to determine the decision variables (p) which will minimize J value (Yen & Langari, 1999). The fuzzy inference system was implemented using MATLAB. The following figures illustrate a couple of scenarios provided by local manufacturing managers, the user of the Matlab GUI will be able to adjust the two inputs continuously while the controller changes the output correspondingly. For example, when 200 products and the service time was 10 minutes, the system will need five (5) machines and two (2) operator (after rounding up to closest integer) to meet the manufacturing need as shown in Figure 12. From the second output screen, when we changed the number of products to 910 and the service time to 20, the output to finish this job was 39 machines and almost 7 operators as shown in Figure 13.

Conclusions and Future Work
In this paper, an illustration of using the fuzzy logic-Mamdani fuzzy method as a controller for the manufacturing system application was discussed. This Fuzzy logic controller was used to determine the manufacturing environment settings, specifically the number of machines and human operators required to accomplish a specific job. The methodology of the design was discussed and the design was developed based on the Mamdani fuzzy inference system. After designing the controller, it was also implemented using MATLAB. In order to optimize the controller for the best performance, the tuning process for the fuzzy linguistics terms was also discussed. The fuzzy logic rules were based on a local manufacturing system manger's logic and practices. The model has a friendly GUI where users can easily check the output using the tool interface by moving the input slider or type them in and it will calculate the output. The model was tested for a few scenarios using Matlab and it gave good expected results. This tool will be a starting seed in developing a comprehensive package that can be used by managers in controlling and developing their manufacturing plans.
In future work, the auto-tuning process for the controller can be studied to optimize its performance, the optimization of the inputs to minimize the error function and a comparison with other conventional controllers will be included. Furthermore, Genetic algorithms (GAs) had been developed through observing natural genetics operations to guide the trek through a search space. GAs had been utilized widely to tuning a fuzzy-based controller by optimizing the membership function parameters. Genetic algorithms will assist in enhancing the fuzzy logic control system behavior and get it as closely as possible to control system expert behavior. They had been proven to provide a strong, efficient, and effective search approach for such problems (Bose, 1994). GAs will require a well-defined objective function to be a successful optimization method (Lewis, 2013). The team's future work will include the utilization of GAs to optimize the fuzzy controller and use the error as an objective function.