Next Article in Journal
Fast-Frequency-Response Control Method for Electrode Boilers Supporting New Energy Accommodation
Next Article in Special Issue
Enhancing Data Preservation and Security in Industrial Control Systems through Integrated IOTA Implementation
Previous Article in Journal
Experimental Study on Enrichment of Indole in Wash Oil by a Combined Process of Extraction and Re-Extraction
Previous Article in Special Issue
Research on Optimization Algorithm of AGV Scheduling for Intelligent Manufacturing Company: Taking the Machining Shop as an Example
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Algorithm for Optimizing the Process Parameters of the Spindle Process of Universal CNC Machine Tools Based on the Most Probable Explanation of Bayesian Networks

1
The Key Laboratory for Special Fiber and Fiber Sensor of Hebei Province, School of Information Science and Engineering, Yanshan University, Qinhuangdao 066004, China
2
School of Mechanical Engineering, Yanshan University, Qinhuangdao 066004, China
*
Author to whom correspondence should be addressed.
Processes 2023, 11(11), 3099; https://doi.org/10.3390/pr11113099
Submission received: 2 October 2023 / Revised: 26 October 2023 / Accepted: 26 October 2023 / Published: 28 October 2023
(This article belongs to the Special Issue Process Automation and Smart Manufacturing in Industry 4.0/5.0)

Abstract

:
As an essential component of a universal CNC machine tool, the spindle plays a critical role in determining the accuracy of machining parts. The three cutting process parameters (cutting speed, feed speed, and cutting depth) are the most important optimization input parameters for studying process optimization. Better processing quality is often achieved through their optimization. Therefore, it is necessary to study the three cutting process parameters of the CNC machine tool spindle. In this paper, we proposed an improved algorithm incorporated with the beetle antennae search algorithm for the most probable explanation in Bayesian networks to achieve optimization calculation of process parameters. This work focuses on building adaptive dynamic step parameters to improve detection behavior. The chaotic strategy is discretized and used to establish the dominant initial population during the population initialization. This article uses four standard network data sets to compare the time and fitness values based on the improved algorithm. The experimental results show that the proposed algorithm is superior in time and accuracy compared to similar algorithms. At the same time, an optimization example for the actual machining of a universal CNC machine tool spindle was provided. Through the optimization of this algorithm, the true machining quality was improved.

1. Introduction

With the arrival of a new industrial revolution, global industrial powers are deploying industrial strategies to accelerate their industrial development, such as the United States’ Advanced Manufacturing Partnership Program, Germany’s Industry 4.0, Japan’s Manufacturing White Paper, and “Made in China 2025” [1,2]. With the continuous development of artificial intelligence technology and industrial big data in the manufacturing industry, especially in CNC machine tool processing, some scholars have used artificial intelligence technology and big data to study the optimization of process parameters and processing quality and have made this research continue [3].
The Computer Numerical Control (CNC) machine tool [4] is one of the most widely used machine tools in machining. CNC machine tools process workpieces such as metal or wood. This process involves manufacturing products by cutting or milling workpieces according to pre-designed shapes. Manufacturing products using CNC machine tools can affect the cutting tools of the CNC machine tool, as the machine tool processes the workpiece while rotating the device fixed on the spindle motor of the CNC machine tool [5,6].
The universal machine tool is one of the most widely used and mass-produced machine tools. Its layout is reasonable and compact, with a small footprint, an independent spindle structure, good rigidity, and vibration resistance. It has a large processing capacity, stable accuracy, and high efficiency. The machine tool control system has strict protective measures to ensure personal and equipment safety. It is also suitable for large cutting capacity, high efficiency, and large-scale processing of parts in mechanical industries such as automobiles, ships, bearings, and military sectors [7].
At present, the process of establishing process parameter optimization models adopts multi-objective optimization algorithms, most of which are based on mechanism models. For example, the multi-objective parameter optimization model for multi-channel CNC and production cost was established based on the energy efficiency mechanism of the milling process [8]. The multi-objective optimization algorithm was studied based on teaching and learning (ITLBO) to optimize cutting and feed speed process parameters [9]. The multi-objective process parameter optimization model was established based on the transient-steady-state energy consumption mechanism with high-quality, low-energy consumption processing of CNC machine tools as the optimization goal [10]. The multi-objective cutting parameter optimization model for multi-pass turning of CNC machine tools was studied based on the cutting energy consumption mechanism to determine the optimal cutting parameters [11]. However, the utilization rate of processing quality data and process parameter data is low, and the relationship between data mining process parameters and quality still needs to be fully utilized. Therefore, this proposed algorithm fully uses data and the most probable explanation to establish an optimization algorithm for process parameters, improving the efficiency of utilizing machine tool manufacturing data.
Bayesian networks (BNs) [12] concisely model probability distributions over a set of random variables. They are self-explanatory, easy to understand, and well-suited for representing causal relationships [13]. BNs have been well recognized as a rigorous methodology for the quantification of risks, uncertainty modeling, and decision-making in the presence of structural dynamics [14]. A key computational problem in BNs is the computation of the most probable explanation (MPE). When the values of observed variables (evidence nodes) are given, MPE is obtained by calculating the values of all non-observed variables (non-evidence nodes), which satisfies the greatest joint probability [15,16]. In Bayesian networks, an explanation of evidence refers to a state combination of all variables in the network consistent with evidence, which is often the explanation with the greatest relationship probability.
The solution of BNs is used in some fields, and examples are as follows: the Bayesian network and neural network were used to model the thermal error of the CNC machine tool feed drive system and study the relationship between the temperature rise and positioning error of the feed drive system [17]. The Bayesian network reliability assessment method was proposed, which considers dynamics and fuzziness. It analyzes the dynamic fuzzy reliability of the balance circuit of the hydraulic system of CNC machine tools and verifies the application of this method in system reliability assessment, providing a basis for CNC machine tool hydraulic system balance circuits. It provides support for fault diagnosis of machine tools [18]. The machined surface quality detection system was developed using CNN architecture and Bayesian optimization, achieving low cost and reliability [19]. The Bayesian network was used to analyze the reliability of related failure modes of CNC machine tools, achieving reliability modeling of complex systems and effective analysis of related failures [20].
Searching MPEs from BNs is an NP-hard question [21,22]. Currently, there are two main methods for solving the problem: the query-based method and the local search-based method. The query-based method is more efficient in small networks, but finding effective solutions in large, complex networks takes a lot of work. The local search-based method can find approximate or optimal solutions in large networks. Still, many of these algorithms easily fall into the local optimum, and the optimization efficiency needs to be improved [23].
This paper proposes a most probable explanation algorithm based on the beetle antennae search algorithm (BAS-MPE). The population algorithm is applied to BN inference, which establishes the framework of MPE. The method of generating the dominant initial population is proposed. At the same time, the adaptive dynamic parameters are used to improve the beetles’ detection behavior. Through population iteration, MPE is obtained. In this paper, the algorithm’s convergence is proved by the probability measure method. Compared with several similar algorithms, the experimental results show that the proposed algorithm has higher optimization efficiency and better results.
The objectives of this article are to study the most probable explanation algorithm in Bayesian networks and apply it to the optimization of cutting process parameters (mainly including cutting speed, feed speed, and cutting depth) for universal machine tool spindles production to improve the optimization goal (machining quality). This paper provides a reference for the optimization of process parameters in production.
The main contributions of this article are as follows: (1) this study attempts to propose a most probable explanation algorithm in Bayesian networks based on the beetle antennae search for optimizing the spindle process parameters of universal CNC machine tools. Additionally, it was confirmed through experiments that using the spindle process parameters of general CNC machine tools optimized by the proposed algorithm can improve the actual machining quality. (2) The proposed algorithm combines the state information of nodes and uses a chaotic strategy to generate a dominant initial population to increase population diversity. (3) The proposed algorithm uses dynamic step size adjustment parameters in search behavior and detection behavior to balance global search and local development, enhancing the likelihood of the algorithm jumping out of the local optimum.
The organizational arrangement of the remaining parts is as follows: Section 2 introduces the related works on optimization of process parameters for CNC and the most probable explanation algorithm. Section 3 presents the implementation steps of the improved algorithm. In Section 4, the convergence proof of the algorithm is provided. In Section 5, we conducted experiments to verify the algorithm’s effectiveness and provide an optimization example of process parameters for the spindle of universal CNC machine tools. Finally, the conclusion is described in Section 6.

2. Related Works

2.1. Optimization of Process Parameters for CNC

The reasonable selection of process parameters will affect the machining quality during CNC. However, as manufacturing methods continue to evolve and new technologies are continuously introduced, it is crucial to consider the future of CNC machining operations [24]. Process parameters mainly include cutting speed, feed speed, cutting depth, cutting fluid, cutting tools, etc. The three cutting process parameters (cutting speed, feed speed, and cutting depth) are the most critical input parameters for studying process optimization, and it is often possible to achieve better optimization goals by optimizing them [25,26]. In the following, some researchers have used multi-objective optimization and some other methods to study the process parameter optimization problem of CNC machine tools.
The multi-objective particle swarm optimization algorithm was used to establish a multi-objective parameter optimization model for the multi-channel CNC milling process’s energy efficiency and production cost to determine the optimal cutting speed, feed rate, and cutting depth and prove that the optimized values are within the acceptable range of the machine [8]. The optimized multi-objective optimization algorithm based on teaching and learning (ITLBO) was studied to optimize the process parameters of CNC cutting, mainly cutting speed and feed speed [9]. The method was proposed based on population optimization by combining the extreme learning machine and the particle swarm optimization algorithm and applying it to the optimization of CNC turning process parameters to achieve control of the cutting speed, feed speed, cutting depth, and surface roughness [25]. The genetic regression neural network GA-GRNN was studied to design a milling performance prediction model. It optimized the process parameters in the milling process based on this model: spindle speed, number of grinding grooves, and grinding tooth feed [27]. The transient-steady-state energy consumption model was established for CNC lathes, and based on this, a multi-objective model was established with spindle speed, feed rate, and cutting depth as optimization variables, and high-quality, low-energy consumption processing of CNC machine tools as optimization goals [10]. The advanced Tabu search and scatter search were used to establish a multi-objective cutting parameter optimization model for multi-pass turning of CNC machine tools to determine the optimal cutting parameters, including spindle speed, feed speed, cutting depth, and roughness [11]. The OFAT technology was used to conduct CNC milling experiments and determined parameters such as optimal feed speed, cutting speed, cutting depth, and tool tip radius through experiments to ensure the integrity of the cutting surface and good cutting efficiency [26]. The Neural Network (NN) and Multi-objective Swarm Algorithm (MSA) were used to establish a CNC milling processing optimization model. It optimizes the helix angle, axial cutting depth, radial cutting depth, and cutting speed to achieve a better surface finish and minimum tool wear rate [28].
Currently, most of the optimization research on the process parameters of these CNC machine tools can better solve some process optimization problems. This provides a research basis for optimizing and applying CNC machine tool process parameters and better guides the production of enterprises. However, there are also some problems, such as most multi-objective optimization algorithms having optimization weight imbalance and easily falling into local optimum. Some model research focuses on mechanism modeling, and the utilization rate of processing quality data and process parameter data is low. The relationship between data mining process parameters and quality must still be fully utilized.
Therefore, this article fully uses quality data and process parameter data and combines the most probable explanation algorithm to optimize the cutting speed, feed speed, and cutting depth of CNC cutting process parameters to improve the processing quality of CNC.

2.2. The Most Probable Explanation of Bayesian Networks

Due to the limitations of the query-based method, experts have mainly used the local search-based method to solve MPE in recent years. In [29], the Ant Colony Optimization algorithm for the most probable explanation (ANT-MPE) is proposed. By constructing the pheromone tables, the heuristic function tables, and the ant decision tables, the effective optimization of the ant colony for MPE is realized. However, the accuracy of the solution depends on the choice of the weight of pheromone trails and the weight of the local heuristic function. Sriwachirawat et al. [30] proposed a niching genetic algorithm (NGA) for MPE, which uses the multi-fractal and clustering characteristics of Bayesian networks to increase the range of population solutions in the early stage of the algorithm. The algorithm makes use of the observation that there are regions within the joint probability distribution of the Bayesian networks that are highly self-similar. In [31], the Stochastic Local Search Algorithm (SLS) to solve MPE is proposed. The algorithm can quickly reach the vicinity of MPE through a random local search strategy, but it is easy for the algorithm to fall into the local optimal value in the later stage. Pillai et al. [32] proposed the probabilistic driving algorithm based on swarm intelligence (DMVPSO) to solve MPE. The algorithm can solve MPE using the particle swarm optimization algorithm when there are few network nodes. However, when the number of network nodes is large, the algorithm is not effective. In [23], the algorithm performs a single iteration of the traditional PSO algorithm for each group. Overlapping clusters compete on their individual state assignments and use communication mechanisms to share information between the clusters. The algorithm can obtain better results than the single population through population competition, but it needs more group competition operation, and its efficiency needs to be improved.
The abovementioned methods are of significant reference value for searching for MPE of BNs. However, these methods have their shortcomings, as mentioned above. For the MPE of BNs, scholars widely use the existing optimization algorithms to solve the problem directly but rarely improve the applicability and adaptability of the strategy for this problem. It is an excellent idea to transform the MPE problem into the optimal solution problem. The beetle antennae search algorithm (BAS) is a perfect way to solve the optimal situation. At present, BAS is rarely applied in the MPE of BNs. The population optimization algorithm is one of the most effective methods to solve MPE based on the local search method [23,29,31,32].
In this paper, the search strategy in the improved optimization algorithm is used to avoid the algorithm falling into local optimization. The beetle antennae search algorithm [33] is a mathematical model algorithm based on the behavior process of a beetle searching for food. The beetle searches for food sources through search behavior and detection behavior which returns it to the current optimal food source location. Compared with other population algorithms, such as particle swarm optimization algorithm, ant colony optimization algorithm, and bee colony optimization algorithm, the beetle antennae search algorithm inherits the excellent information from the previous generation of individuals effectively, and it avoids the blind randomness of the search. The algorithm does not need more parameters, gradient information, and specific function forms, making the optimization strategy of the algorithm simpler and more suitable for single-objective function optimization. However, the searching phase of the beetle antenna search algorithm only provides two directions, and the optimization effect is poor. The step size of the algorithm is a linear decreasing function, which makes the algorithm fall into the local optimum in the later stage. Therefore, combining the characteristics of the beetle antenna search algorithm, this paper designs a beetle antenna search algorithm, which is the most probable explanation in Bayesian networks. The significant differences between our work and the related works are summarized in Table 1.
Therefore, combining the problems of MPE algorithms and the characteristics of the beetle antenna search algorithm, this paper designs a beetle antenna search algorithm for the most probable explanation in Bayesian networks.

3. The Proposed Algorithm (BAS-MPE)

The proposed algorithm BAS-MPE establishes the dominant initial population by introducing a chaotic strategy and maps the strategy to the discrete domain. BAS-MPE improves the search behavior of the beetle and uses the adaptive dynamic parameters to adjust the moving step of the beetle in the detection behavior. Through population iteration, BAS-MPE finds the individual with the highest fitness.

3.1. Bayesian Networks and MPE Problem

A Bayesian network (Figure 1) is a Directed Acyclic Graph (DAG) where nodes represent random variables and edges represent conditional dependencies between random variables. Attached to each node is a Conditional Probability Table (CPT) that describes the conditional probability distribution of that node given its parents’ states. Distributions in a BN can be discrete or continuous. In this paper, we only consider discrete ones. BNs represent joint probability distributions in a compact manner. Let  B = { Q 1 , Q 2 , , Q n }  be the random variables in a network. Every entry in the joint distribution  P Q 1 , Q 2 , , Q n  can be calculated using the following chain rule:
P Q 1 , Q 2 , , Q n = i = 1 n P Q i π Q i ,
where  π Q i  denotes the parent nodes of  Q i . Figure 1 shows a simple BN with four nodes, the Sprinkler network [34].
Let  B , P  be a Bayesian network where  B  is a DAG and  P  is a set of CPTs, one for each node in  B . An evidence  E  is a set of instantiated nodes. An explanation is a complete assignment of all node values consistent with  E . Each explanation’s probability can be computed in linear time using Equation (1). For example, in the Sprinkler network (Figure 1), suppose we have observed that the grass is wet, i.e., the  E = W = T . One possible explanation of this is:  { C = T , R = T , S = F , W = T } . Its probability is:
P C = T , R = T , S = F , W = T = P C = T × P R = T C = T ×   P S = F C = T × P W = T R = T , S = F = 0.5 × 0.8 × 0.9 × 0.9 = 0.324 .
MPE is an explanation with the highest probability. Given the observed evidence, it provides the most probable state of the world. The algorithm proposed in this paper is to solve the Most Probable Explanation (MPE) problem in Bayesian networks. This network example (the Sprinkler network) is used as a network example. MPE has many applications in diagnosis, abduction, and explanation.

3.2. Variable Description and Initial Population

The correspondence between the variables of the population algorithm and Bayesian networks is as follows: the beetle individual  M : a combination state of all nodes in Bayesian networks (a probable explanation of Bayesian networks), as shown in Equation (3); the beetle population  G : a cluster representing individual beetles (multiple probable explanations of Bayesian networks), as shown in Equation (4).
M = { X 1 = x 1 , X 2 = x 2 , , X n = x n } ,
G = { M 1 , M 2 , , M m } ,
where  X i , ( i = 1 , 2 , , n )  is the i-th node of Bayesian networks,  x i , ( i = 1 , 2 , , n )  is the state value of the node  X i .
BAS-MPE produces  h  different beetle individuals  M k ( 0 ) , k = 1 , 2 , , h  consistent with DAG. According to Equation (5), BAS-MPE screens to obtain the individuals that, with the evidence nodes, state  e 1 , e 2 , , e v  in  E  from  M k ( 0 ) , k = 1 , 2 , , h . We generate non-repetitive individuals of longicorn beetles through the above operation, and combine them into  G 0 .
G 0 = M j ( 0 ) = M k ( 0 ) , if   ( X 1 k 0 = e 1 ) ( X v k 0 = e v )   ,
where  X w k 0  is the w-th evidence node of the k-th individual,  M k ( 0 )  is the k-th individual,  w = 1 , 2 , , v .
The chaotic number  z i 0 , 1  is generated at each node  X i j 0 , i = 1 , 2 , , n  of  M j ( 0 ) G 0 . All nodes’ chaotic numbers form an n-dimensional chaotic initial vector  Z 1 = z 1 1 , z 2 1 , , z n 1  of  M j ( 0 ) . We generate a discrete chaotic sequence  Z m = z 1 m , z 2 m , , z n m  by  m 1  iterations according to
Z l + 1 = 4 Z l 1 Z l , l = 1 , , m 1 .
BAS-MPE loads the chaotic individuals  M j , ch ( 0 )  according to the state range  a 1 , a 2  of each node in Equation (7). The algorithm only operates on non-evidence nodes, and the value state of evidence nodes remains unchanged. All the individuals complete the above steps to generate the dominant initial population  G ( 0 ) , as shown in Equation (8).  G ( 0 )  is used as the first generation of the algorithm.
X i j 0 = a 1 + r a n d n ( z i m ( a 2 a 1 ) ) , M j , ch ( 0 ) = X i j 0 ,
G ( 1 ) = M j ( 0 ) , j = 1 , 2 , , m ,
where  r a n d n ( )  means performing rounding on  .

3.3. Search Behavior

The search behavior of the beetle antennae search algorithm searches the left and right directions. We select different node state values at each node and assign the node state to the left and right antennae separately.
Assuming that there are  m i  states of the i-th node, each node state of the part (including  v 1  and  v 2 ) between the  v 1 -th node and the  v 2 -th node of the individual  M j ( t )  is randomly selected. The state of the individual evidence node and other nodes remains unchanged. The left antennae coordinate  M j , l t ( t )  of the individual  M j ( t )  is obtained in Equation (9).
M j , l t = X i = x p , if   p v 1 , v 2 x p e 1 , e 2 , , e v , x i , else , ,
where  x i  is the original state of  X i x p  is the state of node  X i  that excludes the original state in any other state.
Execute the above process again. Defining  x p  as the state node  X i  that excludes the original state  x i  and the left antennae coordinate  x i , l e  in any other state. The right antennae coordinate  M j , r t ( t )  for the individual  M j ( t )  is obtained.
The purpose of solving MPE is to find the node states when all nodes with the highest joint probability are in evidence. So, we use the joint probability that the value is 0 to 1 [22] as the evaluation of fitness. In order to observe the difference in probability more clearly, the logarithmic joint probability is used as the final evaluation of fitness. The fitness function evaluates the joint probability of all nodes’ state distribution. We calculate the fitness of  M j , l t ( t )  and  M j , r t ( t )  by Equation (10) (the fitness of  M j , l t ( t )  is  f j , l t t  and the  M j , r t ( t )  is  f j , r t t ).
f = l g n i = 1 P X i | P a ( X i ) ,
where  P a ( X i )  is the parent node of  X i .
Substitute  f j , l t t  and  f j , r t t  into Equation (9). It selects the larger fitness of the left and right coordinates as the better coordinate  M j , b e t t e r t  in the t-th generation.
M j , b e t t e r t = M j , l t ( t ) ,   if   f j , l t t > f j , r t t , M j , r t ( t ) ,   else .
Two crossover nodes ( X c 1 j t  and  X c 1 j t 1 c 1 < c 2 n ) are randomly selected in  M j , b e t t e r t = X 1 j t , X 2 j t , , X n j t . A portion (including the crossover nodes) between the two crossover nodes is used as a crossover region  C j t  according to Equation (12).  C j t  is inserted into the corresponding position of  M j ( t ) . For example, when  C j t = 231 M j ( t ) = 133 524 ¯ 121 c 1 = 4 , and  c 2 = 6  are given, the cross result is  M j , c ( t ) = 133 231 ¯ 121 . The method of crossover is shown in Equation (13). The individual  M j , c ( t )  after the operation is obtained.  M j , c ( t )  is substituted into Equation (10) to obtain the fitness  f j , c ( t ) .
C j t = X c 1 j t , X c 1 + 1 j t , , X c 2 j t ,
M j ( t ) = 133 524 ¯ 121 , C j t = 231 , M j , c ( t ) = 133 231 ¯ 121 .

3.4. Detection Behavior

In the detection behavior of the original beetle antennae search algorithm, the set step size is linearly decreasing with time. The reduction length is fixed, and the adjustment cannot be made according to the actual situation. The iteration speed is slow, making the algorithm easily fall into the local optimum. When the fitness of the right antennae is equal to the left, the beetle does not move, and the algorithm is in an undeveloped state. Therefore, we adjust the original linear decrement parameter of the step size of the beetle to the adaptive dynamic parameter. It enhances the ability of the algorithm to jump out of the local optimum.
Comparing the individual  M j , c ( t )  obtained by the search behavior with the optimal individual  M b e s t ( t )  of the t-th generation population, we select the individual with high fitness to update  M b e s t ( t ) . The process  M b e s t ( t )  is updated, as shown in Equation (14). The optimal fitness of the current population  f m a x ( t )  is calculated by Equation (10).
M b e s t ( t ) = M ,   if   f M j , c ( t ) > f M b e s t ( t ) , M b e s t ( t ) ,   else ,
where  M b e s t ( t ) = M 1 ( 1 )  when  t = 1 , j = 1 .
We calculate the overall fitness of the current population, which is sum of all individual fitness  f a l l ( t )  by Equation (15) and the average fitness  f a v ( t )  by Equation (16).
f a l l ( t ) = j = 1 m f j ( t ) ,
f a v t = j = 1 m f j ( t ) m .
BAS-MPE adaptively adjusts the algorithm’s direction and the rate of optimization of the algorithm according to the current fitness level  f a v f m a x  of the population. When the current fitness of BAS-MPE is at a higher level ( f a v f m a x  is higher), individuals need local development in a small area, and the corresponding moving step size should be reduced. The operation of assigning status to all nodes (its number is  n ) is to select the number of changed nodes. The moving step length increases when it is at a lower level. It makes the position change that a large number of beetles in the population move and jump out of the current local optimum. We set an adaptive operator to adjust the step size to the current fitness  f a v f m a x . We construct an adaptive step size as shown in Equation (17).
δ = r a n d n n × ( 1 f a v f m a x ) λ ,
where  λ 0 , 1  is the dynamic adaptive adjustment factor.
Individuals perform detection behavior based on adaptive moving steps. Select  δ  mutation positions  1 , 2 , , δ  and mutate at these positions. The variation range of each node  X 1 j t , X 2 j t , , X δ j t  is within the node state range  U 1 j t , U 2 j t , , U δ j t  (excluding the original state). The mutation is not performed if the node at the mutation position is the evidence node.
Assign any other node state  u w , r a U w j t , w = 1 , 2 , , δ  at the mutation location  X w j t  to the mutation node. Combine all nodes’ recombination status schemes into one individual  M j ( t ) . The detection behavior produces a new individual process, as shown in Equation (18).
X i j t = X w j t = u w , r a , u w , r a U w j t ,   if   i = = w X i j t e 1 , e 2 , , e v , X i j t , e l s e , M j ( t ) = X i j t .
We calculate the fitness of  M j ( t )  according to Equation (10) and compare it with  f j , c ( t ) , selecting the individual with high fitness as the j-th next-generation individual  M j ( t + 1 )  generated by the algorithm.
The search behavior and detection behavior generate all individuals in the t-th generation of the population  G t , forming a new population, the next generation population  G t + 1 . When the maximum number of iterations is reached, the algorithm outputs the current optimal individual, MPE.

3.5. The Steps and Flowchart of BAS-MPE

3.5.1. The Steps

  • Step 1: Input the structure of Bayesian networks (DAG) and conditional probability table (CPT), add evidence ( E ), and initialize  t = 1 t m a x .
  • Step 2: Generate a discrete chaotic sequence  Z m = z 1 m , z 2 m , , z n m . Construct an initial population  G ( 1 )  by calculating the current chaotic individual.
  • Step 3: Calculate the left and right antennae coordinates  M j , l t ( t )  and  M j , r t ( t )  by Equation (9).
  • Step 4: Calculate the fitness of  M j , l t ( t )  and  M j , r t ( t )  by Equation (10). Update the better coordinate  M j , b e t t e r t  by Equation (11) and the fitness  f j , c ( t ) .
  • Step 5: Calculate the crossover individual  M j , c ( t )  by Equations (12) and (13) and the fitness  f j , c ( t ) .
  • Step 6: Update the optimal individual  M b e s t ( t )  by Equation (16) and the fitness  f m a x ( t ) .
  • Step 7: Calculate the overall fitness level of the current population  f a l l ( t )  and the average  f a v ( t ) .
  • Step 8: Construct an adaptive step size  δ  by Equation (17), update the individual  M j ( t )  by Equation (18), and the fitness  f j ( t )  of  M j ( t ) .
  • Step 9: Compare the fitness of  M j ( t )  and  M j , c ( t ) , and select individuals with high fitness as the next generation of individual  M j ( t + 1 ) . Generate new individuals from all individuals  G t  in the t-th generation population and form new populations as the next generation population  G t + 1 .
  • Step 10: If the algorithm satisfies  t < t m a x , it goes  t = t + 1  and jumps to step 3; otherwise, it outputs the global optimal individual, that is, MPE.

3.5.2. The Flowchart

We developed an approach for the most probable explanation in Bayesian networks based on the beetle antennae search algorithm (BAS). In our approach, an individual is associated with the state of all nodes in the network. The node corresponding to each individual uses the search behavior of BAS and learns the left and right antennae in separate directions. Our algorithm sets an adaptive dynamic parameter according to the idea of adaptive factor to adjust the step size of the current individual movement in the detection behavior. This representation provides an advantage since the search range and optimization rate of the algorithm are adaptively adjusted according to the fitness level of the current population. The corresponding selection changes the number of nodes, Ih changes the position and makes many individuals in the population move and jump out of the current local optimum. The flowchart for our approach is shown in Figure 2.
The main loop of this algorithm consists of three phasIs. In the first phase (processes 1–3), all individuals in the population are initialized, and the dominant initial population is generated by the chaos strategy. In the second phase (processes 4–6), all individuals in the population execute a search strategy to generate the left and right antennae coordinates and generate optimal individuals. In the last phase (processes 7–8), our algorithm improves the detection behavior by adjusting the step size based on dynamic parameters, generates the individual, and forms a new population. Finally, our algorithm outputs the optimal individual of the current population when the iterative conditions are finally satisfied through iteration, which is the most probable explanation.

3.6. Application of BAS-MPE for the Spindle Process Parameter Optimization of CNC Machine Tools

This section uses the proposed algorithm BAS-MPE based on the beetle antennae search optimization strategy to establish an optimization model for the spindle process parameters of CNC machine tools and conducts experiments in Section 5.3.
The research applied in this section is to maximize the final target machining quality  Q u a l i t y  by optimizing the three cutting process parameters of CNC: cutting speed  V c , feed speed  f z , and cutting depth  a p . In the Bayesian network, we can use the maximization of conditional probability to express this optimization goal. It can be expressed as Equation (19).
V c , f z , a p = arg max [ P Q u a l i t y V c , f z , a p ]
First,  Q u a l i t y  is analyzed to clarify the optimization objective function. In the Bayesian network, it is difficult to directly establish the functional expression relationship between  V c f z a p , and  Q u a l i t y  through equations. Instead, obtaining the probability model diagram outputs the status of the corresponding process parameters under maximum probability. In this study, the maximum probability refers to the maximum conditional probability  P Q u a l i t y V c , f z , a p P V c , f z , a p  can be obtained from the data, so it is a fixed value. Therefore, maximizing  P Q u a l i t y V c , f z , a p  is equivalent to maximizing  P Q u a l i t y , V c , f z , a p , and  P Q u a l i t y , V c , f z , a p  is the objective function of the most possible explanation of Bayesian networks. Therefore, we derive the quality-process parameter optimization objective function in Equation (20).
V c , f z , a p = arg max [ P Q u a l i t y , V c , f z , a p ]
Then, we use the Bayesian network structure and its conditional parameter table to obtain the most probable explanation for modeling. The quality-process parameter Bayesian network structure  D A G  and its conditional probability table  C P T  are obtained through the quality-process parameter data  D A T A  and the Bayesian network structure algorithm [23]. This part can be expressed by Equation (21).
D A G , C P T = f D A T A
where  f  is to use the Bayesian network structure algorithm on  .
Finally, based on the quality-process parameter optimization objective function (Equation (20)) and,  D A G  and  C P T , the BAS-MPE is used to obtain the process parameter optimization values. The process parameter optimization model is expressed as Equation (22).
V c , f z , a p = BAS-MPE max [ P Q u a l i t y , V c , f z , a p ] D A G , C P T , t m a x
where  t m a x  is the maximum number of iterations.
The process of establishing the process parameter optimization model is as follows:
  • Step 1: Establish the quality-process parameter optimization objective function with Equation (20).
  • Step 2: Set the maximum number of iterations.
  • Step 3: Obtain the Bayesian network structure and conditional probability table with the Bayesian network structure algorithm and data from the machining spindle of CNC machine tools.
  • Step 4: Use the dominant initial population strategy to obtain the solution set of the initial state of the process parameters.
  • Step 5: Use the improved search behavior and detection behavior to update and iterate the solution set of the state of the process parameters.
  • Step 6: Find the optimal solution with the above steps, which is the obtained range of process parameters.

4. Convergence Analysis of BAS-MPE

For the convergence analysis of the algorithm, we use the theories of the Lebesgue measure method and the convergence criteria for random search algorithms to prove that it converges in a region. Firstly, our fitness function is the joint probability. In the iterative process, the algorithm always chooses the individual with a large fitness function as the next-generation individual. Therefore, the fitness value is always monotonous and gradually converges to the supremum of the solution space for the subset of the optimal solution set that satisfies the Borel criterion. Finally, it shows that the probability of our algorithm not finding the individual in the subset in infinite consecutive times is 0. That is, the algorithm must be able to find the subset individual in the finite iterative search. So, it meets the convergence criterion. It shows that there must be an individual in the optimal region after finite iterations.
In this paper, the convergence of BAS-MPE is analyzed by the Lebesgue measure method and the convergence criteria for random search algorithms [35]. When the algorithm satisfies Hypotheses 1 and 2, it trends the optimal solution set in solution space.
Hypothesis 1.
If   f H z , ξ f z  and   ξ W  are established,    f H z , ξ f ξ  is right in the BAS-MPE. 
  • where  f  is the fitness of BAS-MPE.  W  is the optimal solution set.  ξ  is a random individual in  W z  is the upper point of  W  that can generate the upper bound of the value of the objective function.
Hypothesis 2.
In the BAS-MPE, the solution sequence of the algorithm is  x k k = 0 +  . When the Lebesgue measure  x k k = 0 +  is always greater than 0,  x k k = 0 +  converges to the optimal solution set    W  with the probability 1.
  • where  W 1  is a subset of [35].
Lemma 1.
BAS-MPE satisfies Hypothesis 1.
Proof of Lemma 1.
It is proved that the iteration function  H ( )  of the algorithm is defined as:
H M b e s t ( t ) , M j ( t ) = M b e s t ( t ) ,   f M b e s t ( t ) f M j ( t ) , g M j ( t ) ,   f M b e s t ( t ) < f M j ( t ) ,  
where  g ( )  is the search and detection behavior function of the individual.  g M j ( t )  is the position of the beetle individual after the t-th updating.  M b e s t ( t )  is the current optimal individual position. □
From Equation (23), the iteration function selects the individual with high fitness as the updated individual and the corresponding fitness value in the algorithm is always monotonous and does not decrease. It gradually converges to the upper solution space. So  f H z , ξ f ξ  is right.
Lemma 2.
BAS-MPE algorithm satisfies Hypothesis 2.
Proof of Lemma 2.
For a subset of Borel  W 1  that belongs to  W , the probability measure is  v W 1 > 0 , so Equation (24) holds [36]. □
n = 1 1 μ n W 1 = 0 .
It shows that the probability of not searching for an individual in an infinite number of consecutive searches is 0. The algorithm must find the subset of individuals in the finite iteration search. According to the F.SOLIS’s convergence criterion [37], there is  lim k P x k W = 1 . This explains that the probability of the k-th step belonging to  x k  in the algorithm is 1. It shows that after a finite number of iterations in the algorithm, an individual must be in an individual in the optimal solution set  W .
According to the proofs of Lemma 1, Lemma 2, and the iterative principle of BAS-MPE, the individuals are close to each other, and the optimal individual converges in the optimal solution set in all subsequent iterations, which satisfies the convergence criterion [35]. The BAS-MPE algorithm converges to the optimal solution set.
Figure 3 shows the iteration curve of the fitness of the optimal individual under the four networks. The algorithm can converge to the global optimal in the first three networks. In the fourth network (the Asia network, Insurance network, Alarm network, and Hailfinder network [23,31,38,39,40]), there is no convergence to the global optimum in the first 100 generations because of the limitation of the number of iterations. However, the number of increasing iterations can further increase the convergence value. This is because the Hailfinder network is more complex than other networks, and the increase in nodes and edges leads to an exponential increase in the amount of calculation. Therefore, the first 100 generations in our experiment did not reach the convergence state of the network.

5. Experiments

The algorithm is implemented in MATLAB. The processor is an Intel (R) Core (TM) i5-3470 CPU, 3.2 GHz, running on a Windows 7 64-bit operating system with 12 GB RAM. The parameters of this algorithm are set, the maximum number of iterations is 100, and the individual size is 100.
The algorithms are compared in the Asia network, Insurance network, Alarm network, and Hailfinder network. The four “standard networks” used in our experiment are classic network examples commonly used in Bayesian network research. They are also used by many scholars as experimental benchmarks. They can well reflect the results and performance of comparative experiments, such as indicators in time, joint probability, and BIC score. Therefore, they are good benchmarks. These four networks are selected as experimental data set benchmarks in this paper. The experimental results of each algorithm are run 100 times independently to obtain the average value as the final statistical result. This experiment uses a common metric: logarithmic joint probability f [29,34], the formula of which is shown in Equation (10). The larger the value of f, the better the result of the algorithm. The relevant parameters of the classic network are shown in Table 2.
In Table 2, “Nodes size” represents the number of nodes owned by the network, which is essentially the modeling of variables. “Edges size” represents the number of edges owned by the network. Edges are the connection between two nodes and represent the ownership relationship between two nodes. “Nodes status range” represents the discrete state range of each node after discretization. For example, 1–2 means that there are two states, 1 and 2, and 2–5 means that there are four states in total, 2, 3, 4, and 5. “Maximum size parent node” refers to the maximum number of cases in which a node has an edge over another node, and the other node points to the direction of the node among all nodes in the network.

5.1. Experimental Comparison between Random and Dominant Initial Population

In this section, we analyze the influence of the dominant initial population on the algorithm using the BAS-MPE algorithm of the dominant initial population and the random initial population. In the case of (without) evidence, the experimental comparison is of the logarithmic joint probability f for MPE in the Asia network, the Insurance network, the Alarm network, and the Hailfinder network. The larger the value of f, the better the result of the algorithm. The results are shown in Table 3.
In Table 3, Rand indicates that the algorithm uses a random initial population without evidence. Advantage demonstrates that the algorithm uses the dominant initial population without evidence. Rand (E) indicates that the algorithm uses a random initial population under two random pieces of evidence. Advantage (E) indicates that the algorithm uses the dominant initial population under two random pieces of evidence.
Table 3 shows that f from the BAS-MPE algorithm with Advantage or Advantage (E) is larger than other algorithms with Rand or Rand (E), so it indicates that the results of the BAS-MPE algorithm using the dominant initial population are better than those using the random initial population. The BAS-MPE algorithm uses a chaotic strategy to increase the population diversity of the previous algorithm and reduce the possibility of the algorithm falling into the local optimum.

5.2. Experimental Comparison with Other Algorithms

This section uses the BAS-MPE algorithm, DOSI algorithm [23], ANT-MPE algorithm [29], NGA algorithm [30], SLS algorithm [31], and DMVPSO algorithm [32] to compare the average logarithmic joint probability f-av, maximum logarithmic joint probability f-max, minimum logarithmic joint probability f-min, and running time t(s). Our test data sets are derived from the Asia, Insurance, Alarm, and Hailfinder networks [23,31,38,39,40]. The results of the experiment are shown in Table 4, Table 5, Table 6 and Table 7. We have made the contents of Table 4, Table 5, Table 6 and Table 7 into Figure 4 to more intuitively reflect the results of the algorithm comparison.
For the DOSI algorithm [23], the number of particles in each swarm was set to 20, and σ was set to 0.2, which is an adjusting parameter. Other settings are consistent with the particle swarm optimization settings in the DMVPSO algorithm [32]. In the ANT-MPE algorithm [29], we used the most appropriate parameter setting from its conclusion. The parameter settings mainly include the weight of pheromone trails, which is 1, the weight of the local heuristic function, which is 5, and the skewness degree, which is 0.1. For the NGA algorithm [30], we still use the parameter settings of the original algorithm. The crossover rate is 1.0 and the mutation rate is 0.06. The SLS algorithm [31] is a variant of a random combination greedy search algorithm, which does not have the characteristics of selection adaptation. So, there is no process of parameter setting. For the DMVPSO algorithm [32], we use the parameter setting of the original algorithm with the learning factors of 2. A discrete control parameter of 0.2 is proposed in this paper. Other parameters, including inertia weight, are obtained adaptively and do not need to be set. The population size is 100, and the number of iterations is 100. In addition to some basic default settings, their parameter settings are the best settings proved by experiments.
Table 4 and Figure 4a–c show that the BAS-MPE algorithm, the ANT-MPE algorithm, the NGA algorithm, and the SLS algorithm can obtain the same maximum logarithmic joint probability of MPE in the Asia network. Their maximum logarithmic joint probability equals the minimum logarithmic joint probability, indicating that several algorithms are more stable in small networks. The average logarithmic joint probability obtained by the DOSI algorithm and the DMVPSO algorithm is poor, and the maximum logarithmic joint probability and the minimum logarithmic joint probability are not equal, indicating that the stability of the two algorithms is poor.
Table 5 and Figure 4a–c show that in the Insurance network, the average logarithmic joint probability, the maximum logarithmic joint probability, and the minimum logarithmic joint probability of the BAS-MPE algorithm are better than the other five algorithms. This is because the BAS-MPE algorithm improves the search behavior and uses the direction combination sequence as the guidance for generating the required coordinates. The algorithm has multi-directionality in the search process, which makes up for the problem that the algorithm selects the direction individually and avoids the algorithm falling into the local optimum early, so the algorithm finally gets the better results.
Figure 4d shows that the BAS-MPE algorithm runs with less time than the other five algorithms, which indicates that the BAS-MPE algorithm is more efficient in small networks (the Asia network and the Insurance network).
Table 6 and Figure 4a–c show that in the Alarm network, the average logarithmic joint probability of the BAS-MPE algorithm and the DOSI algorithm is close, and both are larger than the other four algorithms. The maximum logarithmic joint probability and the minimum logarithmic joint probability of the DOSI algorithm are smaller than the BAS-MPE algorithm, indicating that the DOSI algorithm has a relatively large range of solution fluctuations. In contrast, the BAS-MPE algorithm obtains better results with a smaller range of solution fluctuations.
Table 7 and Figure 4a–d show that in the Hailfinder network, the results of the BAS-MPE algorithm are far superior to the NGA algorithm, the DMVPSO algorithm, and the SLS algorithm. When the three algorithms are in a large number of network nodes, the search scope of the improved strategy in the previous generation is smaller, and the running time is longer, leading to the algorithm’s lower efficiency. The adaptive dynamic parameter of the BAS-MPE algorithm makes the detection behavior of the algorithm more effective, the relationship between the global and the local well balanced, the update speed of the individual population improved, the running time reduced, and the optimization efficiency increased.
Each algorithm calculates the most probable explanation of the top k logarithmic joint probability k-MPE (k = 2, 4, 6, 8) in four standard networks without evidence. We calculate its average logarithmic joint probability f*. Since f* is a negative value, f* takes the absolute value |f*| for comparison (the smaller its value |f*|, the better the algorithm performance), and the experimental results are shown in Figure 5 and Figure 6.
Figure 5a shows that in the Asia network, the absolute value of the logarithmic joint probability of 2-MPE, 6-MPE, and 8-MPE of the BAS-MPE algorithm is the smallest among the five algorithms. When the 4-MPE is solved, the absolute value of the logarithmic joint probability of the BAS-MPE algorithm is slightly larger than the ANT-MPE algorithm. The ANT-MPE algorithm establishes the ant colony pheromone feedback mechanism and the ant decision table well in the algorithm construction, but the random initial population of the algorithm makes the range of the previous search small, which constantly affects the optimization domain of the algorithm and results in poor overall performance of the algorithm. The BAS-MPE algorithm has the best optimization effect compared to the other four algorithms. The algorithm uses the adaptive dynamic parameter to adjust the step size of the detection behavior. It increases the step size when detecting that the current overall horizontal fitness is at a poor level, which helps the algorithm to jump out of the current local optimum. In the case of ensuring the convergence speed of the algorithm, the ability of global optimization of the algorithm is enhanced.
Figure 5b shows that in the Insurance network, the BAS-MPE algorithm has a lower absolute value of logarithmic joint probability when searching for MPE, which shows that when the overall fitness of the algorithm is the most searching after generation, the level is higher than the other four algorithms. When solving 2-MPE and 4-MPE, the results of the DOSI algorithm are close to the BAS-MPE algorithm. Because the population of the particle swarming optimization framework of the DOI algorithm increases the competition among populations, it has a good preference when selecting individuals, but the algorithm needs more group competition, which affects the efficiency of the algorithm. The improved search behavior and detection behavior of the BAS-MPE algorithm enable all individuals to balance the global search and local development of the algorithm without the need for group competition, which improves the optimization efficiency of the algorithm.
Figure 6a shows that the results of the five algorithms in the Alarm are similar at solving 2-MPE and 4-MPE. As the number of probable explanations to be solved increases, the BAS-MPE and DOSI algorithms show better results. The optimal individuals of the NGA algorithm, the DMVPS algorithm, and the ANT-MPE algorithm are always in rapid evolution when looking for probable explanations. In contrast, other individuals are slow to evolve, and the algorithm cannot get lower. When looking for more probable explanations, the algorithm cannot obtain a lower absolute value of the logarithm joint probability, and the overall fitness of the probable explanations is lower. When looking for 8-MPE, the logarithmic joint probability of the BAS-MPE algorithm has the lowest absolute value, indicating that the algorithm can find the better domain value of a higher-level solution than similar algorithms.
Figure 6b shows that the absolute value of the logarithmic joint probability of the BAS-MPE algorithm in the Hailfinder network is smaller than the other four algorithms. When solving 2-MPE and 4-MPE, the BAS-MPE algorithm, the ANT-MPE algorithm, and the DOSI algorithm can achieve the same logarithmic joint probability absolute value level. But with the number of probable explanations increasing, the BAS-MPE algorithm has a higher fitness level than the ANT-MPE and DOSI algorithms. When solving 6-MPE and 8-MPE, the fitness level of the NGA algorithm and DMVPSO algorithm is rapidly reduced, indicating that these two algorithms are unsuitable for finding more probable explanations of large networks, and the BAS-MPE algorithm can find lower pairs. The search efficiency of the BAS-MPE algorithm is higher than other similar algorithms.

5.3. An Example of Optimizing Process Parameters of the Spindle Process of Universal CNC Machine Tool CY-K510

In this section, we use the process parameter optimization model established in Section 3.6 for actual experimental verification.
We collected data on the quality of the tested objects and their corresponding process parameters for the spindle NPH02051 of the universal CNC machine tool CK-Y510. We discretized each quality and process parameter data to them adapt to data modeling. Figure 7 shows the universal CNC machine tool CY-K510 and its spindle NPH02051.
Table 8 shows the process parameter optimization model, which includes the following parameters. The cutting tool model, size, material, and structure for specific process steps and tasks in the machining process are basically fixed configurations. Therefore, the adjustment and optimization of cutting speed, feed amount, and cutting depth during the cutting process will affect the final processing quality. The optimization of process parameters in this study includes the calculation of the optimization range of cutting speed  V c , feed rate  f z , and depth of cutting  a p . The cutting speed  V c = π d n 1000  is determined by the rotational speed  n  and the tool diameter  d , while the feed rate  f z = V f n z  is determined by the feed speed  V f , the number of gears  z , and the rotational speed  n ; depth of cutting  a p  can be directly adjusted.
The study used data from the spindle NPH02051 of CY-K510 regarding process parameters (which include the three cutting process parameters: cutting speed, feed rate, and depth of cutting), as well as corresponding machining quality data. The optimal range of process parameters is based on the cutting speed, feed rate, and cutting depth corresponding to the maximum joint probability  P  in the most probable explanation.
Table 9 records the process parameter values of the following seven processing steps before and after optimization using the process parameter optimization model and the corresponding joint probabilities of the most probable explanation. The process parameter values after optimization using the process parameter model are the average values of the output of running 100 experiments. In Table 9, the values (old, new) of the process parameters before and after optimization are expressed as follows: old represents the value of the process parameter before optimization and new represents the value of the process parameter after optimization. It can be seen from Table 9 that the values of the process parameters have changed before and after optimization. Next, we used the process parameter values before and after optimization using the process parameter model in Table 9 as the process input to evaluate the quality results in actual processing.
We used the process parameters to conduct a machining experiment on the CY company’s spindle production line experimental platform. We conducted 100 experimental machining tests, measured the machining quality of the following seven machining work steps, and compared them with the original process parameters. The average quality results were compared, and the comparison results are shown in Table 10.
Table 10 shows the optimization results of the process parameters validated on the machining test bench, with improved quality results compared to the measured results. The percentage increase is between 0.23% and 2.18%.

6. Conclusions

This paper proposes a most probable explanation algorithm based on an improved beetle antennae search algorithm (BAS-MPE algorithm), which is used to solve the problems of algorithm optimization efficiency being poor and easily falling into local optimum. The BAS-MPE algorithm establishes the dominant initial population by introducing a chaotic strategy, which effectively increases the population diversity. At the same time, the direction sequence is guided as the direction of the individual, avoiding the algorithm falling into the local optimal optimum. The algorithm introduces the adaptive dynamic parameter to adjust the moving step size of the beetle, effectively balances the global and local search relationship, and finds the most probable global explanation by loop iteration. This paper uses the convergence criterion to prove that the BAS-MPE algorithm has good convergence. The results show that the BAS-MPE algorithm can find the most probable explanation of Bayesian networks in the four standard networks by the improved beetle antennae search algorithm. The efficiency and results are better than other similar algorithms and the BAS-MPE algorithm can effectively avoid MPE falling into local optimum. The proposed BAS-MPE algorithm was used to optimize the spindle processing parameters of the universal CNC machine tool CY-K510, and the optimization results were obtained. The optimization results were applied to actual processing experiments, and the quality results were all improved. In the future, the optimization method of CNC machining process parameters studied in this article (optimizing cutting speed, feed speed, and cutting depth to improve machining quality) can be used to improve the ultimate accuracy of industrial mother machines, which is very meaningful. The BAS-MPE used in this article can not only optimize the quality of a single objective but can also be extended to multi-objective optimization and to consider more restrictions. Therefore, the comprehensive consideration of the optimization of process parameters will be further studied.

Author Contributions

Data curation, L.Z.; Software, Y.Q.; Formal analysis, L.Z.; Investigation, N.W.; Methodology, E.C.; Resources, L.Z. and N.W.; Writing—original draft, L.Z.; Writing—review and editing, L.Z. and H.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by National Key R&D Program of China (No. 2019YFB1707301).

Data Availability Statement

Not applicable.

Acknowledgments

The author would like to thank Bin Liu from Yanshan University for his opinions and suggestions in the development process of this work. We would also like to thank Yashuang Huang from Yunnan CY Company for providing the experimental environment and Yun Zhang from Tsinghua University for their suggestions during this research and experimental phase.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. López, M.P.; Dintén, R.; Drake, J.M.; Zorrilla, M. A big data-centric architecture metamodel for Industry 4.0. Future Gener. Comp. Syst. 2021, 125, 263–284. [Google Scholar] [CrossRef]
  2. Zhou, J. Intelligent manufacturing--main direction of “Made in China 2025”. China Mech. Eng. 2015, 26, 2273–2284. [Google Scholar]
  3. Sahin, Y.; Aydemir, E. A comprehensive solution approach for CNC machine tool selection problem. Informatica 2022, 33, 81–108. [Google Scholar] [CrossRef]
  4. Mcafee, C. CNC machine tool. Control. Eng. 2009, 56, 31. [Google Scholar]
  5. Liu, Q.; Lu, H.; Zhang, X.; Qiang, Y.; Wang, Y. A non-delay error compensation method for dual-driving gantry-type machine tool. Processes 2020, 8, 748. [Google Scholar] [CrossRef]
  6. Jing, S.; Kim, M.; Kim, B.; Kim, J.; Kim, E.; Lee, H.; Kim, S. Fault detection for CNC machine tools using auto-associative kernel regression based on empirical mode decomposition. Processes 2022, 10, 2529. [Google Scholar] [CrossRef]
  7. Zajac, J.; Duplak, J.; Duplakova, D.; Cizamar, P.; Olexa, I.; Bittner, A. Prediction of cutting material durability by T = f(vc) dependence for turning processes. Processes 2020, 8, 789. [Google Scholar] [CrossRef]
  8. Chen, X.; Tang, Y.; Li, C.; Yi, Q. Multi-objective parameter optimization of multi-pass CNC machining. In Proceedings of the 2015 IEEE International Conference on Automation Science and Engineering, Gothenburg, Sweden, 24–28 August 2015; pp. 45–50. [Google Scholar]
  9. Wang, C.; Wang, Y.; Wang, K.; Dong, Y.; Zhou, X.; Wang, S. Cutting parameters optimization based on ITLBO algorithm with big data driven. In Proceedings of the 2017 IEEE International Congress on Big Data, Honolulu, HI, USA, 25–30 June 2017; pp. 577–581. [Google Scholar]
  10. Jia, S.; Wang, S.; Lv, J.; Zhang, N.; Zhang, Z.; Bai, S. Multi-objective optimization of CNC turning process parameters considering transient-steady state energy consumption. Sustainability 2021, 13, 13803. [Google Scholar] [CrossRef]
  11. Pangestu, P.; Pujiyanto, E.; Rosyidi, C.N. Multi-objective cutting parameter optimization model of multi-pass turning in CNC machines for sustainable manufacturing. Heliyon 2021, 7, e06043. [Google Scholar] [CrossRef]
  12. Pearl, J. Probabilistic reasoning in intelligent dystems: Networks of plausible inference. J. Philos. 1988, 88, 434–437. [Google Scholar]
  13. Benjumeda, M.; Bielza, C.; Larrañaga, P. Learning tractable Bayesian networks in the space of elimination orders. Artie. Intell. 2019, 274, 66–99. [Google Scholar] [CrossRef]
  14. Hosseini, S.; Ivanov, D. Bayesian networks for supply chain risk, resilience and ripple effect analysis: A literature review. Expert. Syst. Appl. 2020, 161, 113649. [Google Scholar] [CrossRef] [PubMed]
  15. Fan, S.; Blanco-Davis, E.; Yang, Z.; Zhang, J.; Yan, X. Incorporation of human factors into maritime accident analysis using a data-driven Bayesian network. Relia. Eng. Syst. Safe. 2020, 203, 107070. [Google Scholar] [CrossRef]
  16. Cao, Y.; Wang, X.; Wang, Y.; Fan, S.; Wang, H.; Yang, Z.; Liu, Z.; Wang, J.; Shi, R. Analysis of factors affecting the severity of marine accidents using a data-driven Bayesian network. Ocean. Eng. 2023, 269, 113563. [Google Scholar] [CrossRef]
  17. Shi, H.; Jiang, C.; Yan, Z.; Tao, T.; Mei, X. Bayesian neural network–based thermal error modeling of feed drive system of CNC machine tool. Int. J. Adv. Manuf. Technol. 2020, 108, 3031–3044. [Google Scholar] [CrossRef]
  18. Zuo, F.; Jia, M.; Wen, G.; Zhang, H.; Liu, P. Reliability Modeling and Evaluation of Complex Multi-State System Based on Bayesian Networks Considering Fuzzy Dynamic of Faults. CMES-Comp. Model. Eng. 2021, 129, 993–1012. [Google Scholar] [CrossRef]
  19. Liu, J.; Li, Y.; Ma, X.; Wang, L.; Li, J. Fault tree analysis using Bayesian optimization: A reliable and effective fault diagnosis approaches. J. Fail. Anal. Preven. 2021, 21, 619–630. [Google Scholar]
  20. Li, H.; Deng, Z.M.; Golilarz, N.A.; Soares, C.G. Reliability analysis of the main drive system of a CNC machine tool including early failures. Reliab. Eng. Sys. Safe. 2021, 215, 107846. [Google Scholar] [CrossRef]
  21. Shimony, S.E. Finding MAPs for belief networks is NP-hard. Artif. Intell. 1994, 68, 399–410. [Google Scholar] [CrossRef]
  22. Kwisthout, J. Motivating explanations in Bayesian networks using MAP-independence. Int. J. Approx. Reason. 2023, 153, 18–28. [Google Scholar] [CrossRef]
  23. Fortier, N.; Sheppard, J.; Strasser, S. Abductive inference in Bayesian networks using distributed overlapping swarm intelligence. Soft Comput. 2015, 19, 981–1001. [Google Scholar] [CrossRef]
  24. Soori, M.; Arezoo, B.; Dastres, R. Machine learning and artificial intelligence in CNC machine tools, a review. Sustain. Manuf. Serv. Econ. 2023; in press. [Google Scholar] [CrossRef]
  25. Janahiraman, T.V.; Ahmad, N.; Nordin, F.H. Extreme learning machine and particle swarm optimization in optimizing CNC turning operation. In Proceedings of the International Conference on Innovative Technology, Engineering and Sciences 2018, Pekan, Malaysia, 1–2 March 2018; p. 012086. [Google Scholar]
  26. Huang, Y.C.; Liao, H.S. Building prediction model for a machine tool with genetic algorithm optimization on a general regression neural network. J. Intell. Fuzzy Sys. 2020, 38, 2347–2357. [Google Scholar] [CrossRef]
  27. Shashwath; Sudhakar, R.P.; Prabhudev, M.S.; Vishaldutt, K.; Anjaiah, G. CNC milling of EN24 steel for assessment of the process parameters using OFAT technique: A preliminary investigation. Mater. Today Proc. 2023, in press. [Google Scholar] [CrossRef]
  28. Hameed, A.S.; Mallick, B.; Mondal, K.; Hikmat, S.K. Neural network (NN) based modelling and Multi-objective Swarm Algorithm (MSA) optimization of CNC milling operation. Mater. Today Proc. 2023, in press. [Google Scholar] [CrossRef]
  29. Guo, H.; Boddhireddy, P.R.; Hsu, W.H. An ACO algorithm for the Most Probable Explanation problem. In Proceedings of the 17th Australian Joint Conference on Artificial Intelligence, Cairns, Australia, 4–6 December 2004; pp. 778–790. [Google Scholar]
  30. Sriwachirawat, N.; Auwatanamongkol, S. On approximating K-MPE of Bayesian networks using genetic algorithm. In Proceedings of the IEEE Conference on Cybernetics and Intelligent Systems, Bangkok, Thailand, 7–9 June 2006; pp. 1–6. [Google Scholar]
  31. Ole, J.M.; Dan, R.; David, W.C. Portfolios in stochastic local search: Efficiently computing Most Probable Explanations in Bayesian networks. J. Autom. Reason. 2011, 46, 103–160. [Google Scholar]
  32. Pillai, K.G.; Sheppard, J.W. Abductive inference in Bayesian belief Nnetworks using swarm intelligence. In Proceedings of the International Conference on Soft Computing and Intelligence Systems and International Symposium on Advanced Intelligent Systems, Kobe, Japan, 20–24 November 2012; pp. 375–380. [Google Scholar]
  33. Jiang, X.Y.; Li, S. BAS: Beetle Antennae Search algorithm for optimization problems. arXiv 2017, arXiv:1710.10724. [Google Scholar] [CrossRef]
  34. Ligeza, A. Artificial intelligence: A modern approach. Appl. Mech. Mater. 2009, 263, 2829–2833. [Google Scholar] [CrossRef]
  35. Chen, Z.M.; Tian, M.C.; Wu, P.L.; Bo, Y.M.; Gu, F.F.; Yu, C. Research on particle filtering based on bat algorithm. Acta Phys. Sin. 2017, 66, 41–50. [Google Scholar]
  36. Xu, L.; Tan, G.Z.; Zhang, X. Probabilistic inference-based service level objective-sensitive virtual network reconfiguration. Comput. Commun. 2015, 57, 25–36. [Google Scholar] [CrossRef]
  37. Zakharov, V.K.; Mikhalev, A.V.; Rodionov, T.V. Descriptive spaces and proper classes of functions. J. Math. Sci. 2016, 213, 163–200. [Google Scholar] [CrossRef]
  38. Derks, I.P.; Waal, D.A. A taxonomy of explainable Bayesian networks. In Proceedings of the Artificial Intelligence Research: First Southern African Conference for AI Research, SACAIR 2020, Muldersdrift, South Africa, 22–26 February 2021; pp. 220–235. [Google Scholar]
  39. Renooij, S.; Salmeron, A.; Rumi, R. Relevance for robust Bayesian network MAP-explanations. In Proceedings of the 11th International Conference on Probabilistic Graphical Models, Almeria, Spain, 5–7 October 2022; pp. 13–24. [Google Scholar]
  40. Zhao, J.; Ho, S.S. Improving Bayesian network local structure learning via data-driven symmetry correction methods. Int. J. Approx. Reason. 2019, 107, 101–121. [Google Scholar] [CrossRef]
Figure 1. The Sprinkler Network.
Figure 1. The Sprinkler Network.
Processes 11 03099 g001
Figure 2. The flowchart of BAS-MPE.
Figure 2. The flowchart of BAS-MPE.
Processes 11 03099 g002
Figure 3. Iterative curve of fitness  f . The dash line shows the best fitness and the black line shows the optimal individual fitness in BAS-MPE.
Figure 3. Iterative curve of fitness  f . The dash line shows the best fitness and the black line shows the optimal individual fitness in BAS-MPE.
Processes 11 03099 g003
Figure 4. Experimental comparison results of the average logarithmic joint probability f-av, maximum logarithmic joint probability f-max, minimum logarithmic joint probability f-min, and running time t. (a) The average logarithmic joint probability f-av; (b) the maximum logarithmic joint probability f-max; (c) the minimum logarithmic joint probability f-min; (d) the running time t.
Figure 4. Experimental comparison results of the average logarithmic joint probability f-av, maximum logarithmic joint probability f-max, minimum logarithmic joint probability f-min, and running time t. (a) The average logarithmic joint probability f-av; (b) the maximum logarithmic joint probability f-max; (c) the minimum logarithmic joint probability f-min; (d) the running time t.
Processes 11 03099 g004aProcesses 11 03099 g004b
Figure 5. Experimental comparison results of |f*| in the Asia network and the Insurance network. (a) |f*| in the Asia network; (b) |f*| in the Insurance network.
Figure 5. Experimental comparison results of |f*| in the Asia network and the Insurance network. (a) |f*| in the Asia network; (b) |f*| in the Insurance network.
Processes 11 03099 g005
Figure 6. Experimental comparison results of |f*| in the Alarm network and the Hailfinder network. (a) |f*| in the Alarm network; (b) |f*| in the the Hailfinder network.
Figure 6. Experimental comparison results of |f*| in the Alarm network and the Hailfinder network. (a) |f*| in the Alarm network; (b) |f*| in the the Hailfinder network.
Processes 11 03099 g006
Figure 7. The universal CNC machine tool CY-K510 and its spindle NPH02051. (a) The universal CNC machine tool CY-K510; (b) the spindle NPH02051 of CY-K510.
Figure 7. The universal CNC machine tool CY-K510 and its spindle NPH02051. (a) The universal CNC machine tool CY-K510; (b) the spindle NPH02051 of CY-K510.
Processes 11 03099 g007
Table 1. Comparison between the related works.
Table 1. Comparison between the related works.
Ref.Nonrandom Initial PopulationImproved Optimization StrategyPopulation Competition Mechanism
[23]NoYesYes
[29]NoNoYes
[30]NoYesNo
[31]YesNoNo
[32]NoYesYes
This workYesYesYes
Table 2. Classic network related parameters.
Table 2. Classic network related parameters.
NetworkNodes SizeEdges SizeNodes Status RangeMaximum Size Parent Nodes
Asia881–22
Insurance27522–43
Alarm37462–54
Hailfinder56662–114
Table 3. Comparison results of logarithmic joint probability under different initial population settings.
Table 3. Comparison results of logarithmic joint probability under different initial population settings.
NetworkRandAdvantageRand (E)Advantage (E)
Asia−0.5371−0.5371−0.2335−0.2030
Insurance−5.7752−3.3708−6.2039−3.9432
Alarm−4.8818−1.3405−6.3621−1.3405
Hailfinder−17.2247−15.3525−18.3291−14.5678
Table 4. Logarithmic joint probability and running time of each algorithm in the Asia network.
Table 4. Logarithmic joint probability and running time of each algorithm in the Asia network.
Algorithmf-Avf-Maxf-Mint (s)
BAS-MPE−0.5371−0.5371−0.53710.86
ANT-MPE−0.5371−0.5371−0.53711.70
DOSI−0.5565−0.5371−0.56930.93
NGA−0.5371−0.5371−0.53711.57
DMVPSO−0.5829−0.5371−0.61271.25
SLS−0.5371−0.5371−0.53711.21
Table 5. Logarithmic joint probability and running time of each algorithm in the Insurance network.
Table 5. Logarithmic joint probability and running time of each algorithm in the Insurance network.
Algorithmf-Avf-Maxf-Mint (s)
BAS-MPE−3.9205−3.3708−4.062811.87
ANT-MPE−7.3592−6.9830−7.962921.26
DOSI−9.2839−8.7931−11.270916.76
NGA−4.2210−4.1052−4.492835.77
DMVPSO−8.5577−6.9991−12.298318.93
SLS−4.5824−3.6979−5.840637.98
Table 6. Logarithmic joint probability and running time of each algorithm in the Alarm network.
Table 6. Logarithmic joint probability and running time of each algorithm in the Alarm network.
Algorithmf-Avf-Maxf-Mint (s)
BAS-MPE−1.6908−1.3405−1.884619.01
ANT-MPE−2.9151−1.9913−3.549039.93
DOSI−1.7079−1.5964−2.003427.38
NGA−2.5826−1.8929−2.663742.47
DMVPSO−1.9500−1.7317−2.537935.57
SLS−1.9713−1.8711−2.885333.42
Table 7. Logarithmic joint probability and running time of each algorithm in the Hailfinder network.
Table 7. Logarithmic joint probability and running time of each algorithm in the Hailfinder network.
Algorithmf-Avf-Maxf-Mint (s)
BAS-MPE−20.7535−15.3524−22.793837.29
ANT-MPE−30.6043−24.0157−33.697266.11
DOSI−50.2858−46.8836−57.942040.50
NGA−90.2771−64.2572−110.972246.76
DMVPSO−136.7425−110.2583−155.834742.68
SLS−144.6733−129.6434−176.730055.27
Table 8. The description of process parameters.
Table 8. The description of process parameters.
Process ParametersComposition
Cutting toolModel
Size
Material
Structure
Cutting speedRotational speed
Tool diameter
Feed rateFeed speed
The number of gears
Rotational speed
Cutting depth/
Table 9. Comparison of process parameter values before and after process optimization.
Table 9. Comparison of process parameter values before and after process optimization.
Work Step Operation   P d
(mm)
n
(Old, New) (r/min)
  z V f
(Old, New) (mm/f)
a p
(Old, New) (mm)
Cutting   cylindrical   machining   according   to   size   Φ 105 h 6  by lathe.0.4516105
(Fixed value)
760, 7701
(Fixed value)
0.1, 0.120.6, 0.4
Drill   holes   according   to   size   Φ 85 .0.251885
(Fixed value)
380, 3601
(Fixed value)
0.09, 0.10.8, 0.7
Cutting   cylindrical   machining   according   to   size   Φ 110 h 6  by lathe and add a margin of 20 mm for processing.0.1921110
(Fixed value)
270, 2801
(Fixed value)
0.06, 0.080.9, 0.6
Cutting   cylindrical   machining   according   to   size   Φ 110 h 6  by lathe.0.2934110
(Fixed value)
300, 2801
(Fixed value)
0.08, 0.070.3, 0.25
Deepen   the   hole   according   to   dimension   Φ 82  to half the spindle length.0.642582
(Fixed value)
610, 6301
(Fixed value)
0.1, 0.110.4, 0.3
Expand   the   range   of   the   hole   from   Φ 23.8 h 8   to   Φ 23 .0.293023.6
(Fixed value)
670, 6801
(Fixed value)
0.14, 0.160.35, 0.2
The workbench mills 16N9 keyway at a 90° working angle.0.554614
(Fixed value)
2000, 19001
(Fixed value)
0.05, 0.040.4, 0.25
Table 10. The percentage of improvement results for each work step before and after process optimization.
Table 10. The percentage of improvement results for each work step before and after process optimization.
Work Step OperationQuality Improvement Results
Cutting   cylindrical   machining   according   to   size   Φ 105 h 6  by lathe.1.15%
Drill   holes   according   to   size   Φ 85 .0.95%
Cutting   cylindrical   machining   according   to   size   Φ 110 h 6  by lathe and add a margin of 20 mm for processing.0.23%
Cutting   cylindrical   machining   according   to   size   Φ 110 h 6  by lathe.2.18%
Deepen   the   hole   according   to   dimension   Φ 82  to half the spindle length.1.6%
Expand   the   range   of   the   hole   from   Φ 23.8 h 8   to   Φ 23 .0.27%
The workbench mills 16N9 keyway at a 90° working angle.0.59%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, L.; Liu, H.; Wang, N.; Qin, Y.; Chen, E. An Algorithm for Optimizing the Process Parameters of the Spindle Process of Universal CNC Machine Tools Based on the Most Probable Explanation of Bayesian Networks. Processes 2023, 11, 3099. https://doi.org/10.3390/pr11113099

AMA Style

Zhang L, Liu H, Wang N, Qin Y, Chen E. An Algorithm for Optimizing the Process Parameters of the Spindle Process of Universal CNC Machine Tools Based on the Most Probable Explanation of Bayesian Networks. Processes. 2023; 11(11):3099. https://doi.org/10.3390/pr11113099

Chicago/Turabian Style

Zhang, Liyue, Haoran Liu, Niantai Wang, Yuhua Qin, and Enping Chen. 2023. "An Algorithm for Optimizing the Process Parameters of the Spindle Process of Universal CNC Machine Tools Based on the Most Probable Explanation of Bayesian Networks" Processes 11, no. 11: 3099. https://doi.org/10.3390/pr11113099

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop