Method, device and equipment for estimating discharge time of workpiece and storage medium
By obtaining the discharge characteristics of the workpiece and electrodes, using nonlinear regression model and deep learning model, the workpiece discharge time estimate model is constructed, which solves the problem of insufficient applicability of the existing model and achieves the stability of the workpiece processing quality.
Patent Information
- Application Number
- CN202510219235.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-07-04
AI Technical Summary
The existing model of workpiece discharge time estimates is difficult to apply to all types of workpiece and electrode materials, resulting in deviations from the actual situation and affecting the stability of workpiece processing quality.
By obtaining the discharge characteristics of the workpiece and electrode, using a nonlinear regression model and a deep learning model, combining the discharge characteristics of the workpiece and the discharge characteristics of the electrode, a workpiece discharge time estimate model is constructed to determine the discharge time of the workpiece to be processed.
It improves the accuracy of discharge time prediction, reduces prediction errors, and ensures the stability of workpiece processing quality.
Smart Images

Figure CN120258197A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of numerical control machining, and particularly to a method, device, equipment and storage medium for estimating the discharge time of a workpiece. Background Art
[0002] Electrical discharge machining is a common machining method. It generates arcs or sparks in the discharge area to form a large number of micro pores on the workpiece surface, thereby achieving the machining purpose. The discharge time is a crucial parameter in this process, which directly affects aspects such as machining quality, machining efficiency and equipment life.
[0003] The length of the workpiece discharge time affects aspects such as the size of the discharge area, the surface finish of the machining surface, and the surface hardness of the workpiece. If the discharge time is too long, problems such as excessive burning and low machining efficiency will occur. If the discharge time is too short, problems such as uneven machining surface and low machining accuracy will occur.
[0004] Since different materials in electrical discharge machining have different physical and chemical properties, the influence on the discharge process is also different. Existing estimation models for the workpiece discharge time often have difficulty applying to all types of workpieces and electrode materials. Especially today, with the continuous emergence of new materials, the applicability of the estimation model is more restricted. An inappropriate estimation model will cause a deviation between the estimated discharge time and the actual situation, resulting in unstable workpiece machining quality. Summary of the Invention
[0005] Embodiments of the present invention provide a method, device, equipment and storage medium for estimating the discharge time of a workpiece, so as to solve the problem that existing estimation models for the workpiece discharge time are difficult to apply to all types of workpieces and electrode materials, and an inappropriate estimation model will cause a deviation between the estimated discharge time and the actual situation, resulting in unstable workpiece machining quality.
[0006] A method for estimating the discharge time of a workpiece includes: Obtaining workpiece discharge characteristics and electrode discharge characteristics that are relevant to the discharge time of the workpiece to be machined; According to the workpiece discharge characteristics and electrode discharge characteristics, and in combination with a workpiece discharge time estimation model used to characterize the relationship between the estimated discharge time and the workpiece discharge characteristics and electrode discharge characteristics, determining an estimated value of the discharge time of the workpiece to be machined.
[0007] A device for estimating the discharge time of a workpiece includes: An obtaining module, configured to obtain workpiece discharge characteristics and electrode discharge characteristics that are relevant to the discharge time of the workpiece to be machined; A building block for constructing a workpiece discharge time prediction model based on the workpiece discharge characteristics including the volume of the workpiece to be machined, the surface area of the workpiece to be machined, the volume of the workpiece removed by each discharge of the discharge electrode, and the electrode discharge characteristics including the discharge depth of the discharge electrode, the gap between the discharge electrode and the workpiece to be machined, and the discharge area of the discharge electrode; An estimation module for determining an estimated value of the discharge time of the workpiece to be machined according to the workpiece discharge characteristics, the electrode discharge characteristics, and the workpiece discharge time prediction model used to characterize the relationship between the estimated discharge time and the workpiece discharge characteristics and the electrode discharge characteristics.
[0008] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned workpiece discharge time prediction method is implemented.
[0009] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned workpiece discharge time prediction method is implemented.
[0010] The above-mentioned method, device, equipment and storage medium for predicting the discharge time of a workpiece include obtaining workpiece discharge characteristics and electrode discharge characteristics that are relevant to the discharge time of the workpiece to be machined; according to the workpiece discharge characteristics and the electrode discharge characteristics, and combining the workpiece discharge time prediction model used to characterize the relationship between the estimated discharge time and the workpiece discharge characteristics and the electrode discharge characteristics, determining an estimated value of the discharge time of the workpiece to be machined.
[0011] Since the workpiece discharge characteristics of different workpiece materials and the electrode discharge characteristics of different electrode materials may have different effects on the workpiece discharge time, the present invention fully considers the relationship between the estimated discharge time and the workpiece discharge characteristics and the electrode discharge characteristics, and uses a workpiece discharge time prediction model based on different discharge characteristic parameters to predict the discharge time of workpieces to be machined with different materials, so that the final prediction result of the discharge time is more accurate, can be closer to the actual discharge time, and reduces the prediction error. Therefore, the present invention solves the problem that the existing workpiece discharge time prediction model is difficult to be applicable to all types of workpiece and electrode materials, and an inappropriate prediction model will cause a deviation between the estimated discharge time and the actual situation, resulting in unstable workpiece processing quality. Description of the Drawings
[0012] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for the description of the embodiments of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0013] Figure 1 is a schematic diagram of an application environment of a method for estimating the discharge time of a workpiece in an embodiment of the present invention; Figure 2 is a flowchart of a method for estimating the discharge time of a workpiece in an embodiment of the present invention; Figure 3 is a schematic diagram of an apparatus for estimating the discharge time of a workpiece in an embodiment of the present invention; Figure 4 is a schematic diagram of a computer device in an embodiment of the present invention. Detailed implementation manners
[0014] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0015] A method for estimating the discharge time of a workpiece provided by an embodiment of the present invention can be applied to an application environment as Figure 1 shown. Specifically, the method for estimating the discharge time of a workpiece is applied in a system for estimating the discharge time of a workpiece, and the system for estimating the discharge time of a workpiece includes a client and a server as Figure 1 shown. The client communicates with the server through a network, and is used to solve the problem that the existing estimation models for the discharge time of workpieces are difficult to be applicable to all types of workpieces and electrode materials, and an inappropriate estimation model will cause a deviation between the estimated discharge time and the actual situation, resulting in unstable workpiece processing quality. Among them, the client, also known as the user end, refers to a program that provides local services for the client corresponding to the server. The client can be installed on, but not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers.
[0016] In one embodiment, as Figure 2 shown, a method for estimating the discharge time of a workpiece is provided. Taking the method applied to the Figure 1 server as an example for illustration, the method includes the following steps: S01: Obtain workpiece discharge characteristics and electrode discharge characteristics that are correlated with the discharge time of the workpiece to be machined.
[0017] The workpiece to be machined in this embodiment refers to the object whose material is removed under the action of electric sparks in electrical discharge machining. Electrical discharge machining utilizes the discharge effect of electrical pulses. The tool electrode and the workpiece are placed at a certain distance, and material machining is carried out through electrical pulse discharge. Electrical discharge machining can machine various-shaped holes, bosses, and fine structures.
[0018] The main parameters of electrical discharge machining include electrode voltage, current pulse, discharge time, etc. Among them, the discharge time is one of the important factors affecting the machining effect. If the discharge time is too short, the workpiece cannot be completely penetrated, resulting in surface deformation and a decline in machining quality; if the discharge time is too long, excessive electro-erosion will occur between the electrode and the workpiece, which will not only damage the electrode but also generate too much heat to melt the surrounding materials, thus forming larger pits or burrs.
[0019] There are numerous experimental parameters in electrical discharge machining, and different experimental parameters will affect the discharge time. Therefore, in this embodiment, workpiece discharge characteristics and electrode discharge characteristics that are correlated with the discharge time of the workpiece to be machined are obtained. Among them, workpiece discharge characteristics refer to characteristics such as the area, volume, and material of the machined workpiece that can directly affect the discharge efficiency, energy distribution, and discharge stability during electrical discharge machining; electrode discharge characteristics refer to characteristics such as the relative position of the electrode to the workpiece, the shape and size of the electrode discharge marks, etc. that can directly affect the distribution of heat and current, current transmission efficiency, and discharge stability during electrical discharge machining.
[0020] In this embodiment, considering that the characteristic units and magnitudes of workpiece discharge characteristics and electrode discharge characteristics are different, in order to eliminate the influence of different dimensions, normalization or standardization processing is required to ensure that different workpiece discharge characteristics and electrode discharge characteristics can be compared and analyzed on a unified scale, thereby better constructing a workpiece discharge time prediction model. The purpose of normalization is to scale the data to a unified range (usually [0, 1] or [-1, 1]) so that the workpiece discharge time prediction model training will not be affected by the too large or too small range of certain characteristic values. The specific common normalization formula is as follows: Among them, X is the original data of the workpiece discharge characteristics or electrode discharge characteristics, and Xmin and Xmax are the minimum and maximum values of the workpiece discharge characteristics or electrode discharge characteristics respectively. After normalization using the above formula, all data will fall within the range of [0, 1].
[0021] Standardization is to transform the original data of the workpiece discharge characteristics or electrode discharge characteristics into a mean of , with a standard deviation of distribution. The commonly used standardization formula is: where is the mean after transformation of the original data of the workpiece discharge characteristics or electrode discharge characteristics, is the standard deviation after transformation of the original data of the workpiece discharge characteristics or electrode discharge characteristics. After standardizing the original data using the above formula, the distribution of the standardized data is not affected by the original scale and distribution, and is suitable for use in many machine learning and non-linear regression models.
[0022] Whether to choose normalization or standardization to process the original data depends on the characteristics of the data and the machine learning algorithm used. In practical applications, it may be necessary to try different methods and evaluate which method is more suitable for a specific dataset and algorithm. In this embodiment, the above standardization formula is selected to transform the original data of the workpiece discharge characteristics and electrode discharge characteristics in this embodiment into a data distribution with a mean of 0 and a standard deviation of 1.
[0023] S02: According to the workpiece discharge characteristics and electrode discharge characteristics, and in combination with a workpiece discharge time prediction model for characterizing the relationship between the predicted discharge time and the workpiece discharge characteristics and electrode discharge characteristics, determine the predicted value of the discharge time of the workpiece to be processed.
[0024] In this embodiment, according to the characteristics and requirements of the electric discharge machining process, a suitable artificial intelligence (AI) model is selected for construction. For example, non-linear regression models in machine learning (such as exponential regression model, power-law regression model, polynomial regression model, etc.) or deep learning models (such as neural networks, etc.). When constructing the model, it is necessary to fully consider the characteristics of the data and the complexity of the model to ensure the accuracy and generalization ability of the model.
[0025] Among them, artificial intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results of theory, method, technology and application system. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, robotics technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0026] In this embodiment, a non - linear regression model is used to characterize the relationship between the estimated discharge time and the workpiece discharge characteristics and the electrode discharge characteristics. The non - linear regression model is a statistical tool used to describe the non - linear relationship between a dependent variable and one or more independent variables. In the simulation of the discharge time, the non - linear regression model can help understand how the discharge time changes with the changes of various workpiece discharge characteristics and electrode discharge characteristics.
[0027] Assuming that the discharge time is a function of each discharge characteristic, the multiple non - linear regression model can be expressed as: Where T is the discharge time, f is a non - linear function, and xi is the workpiece discharge characteristic or the electrode discharge characteristic. Considering the physical and engineering characteristics of the discharge process, common forms of non - linear functions may include power - law functions, exponential functions, or polynomial functions, etc.
[0028] In this embodiment, when f is a power - law function, the multiple non - linear regression model refers to the power - law regression model. The power - law regression model can describe the complex non - linear relationship between a dependent variable and multiple independent variables, where each independent variable appears in the model in the form of a power. The power - law regression model can be expressed as: Where T is the discharge time (dependent variable), xi (i = 1, 2, 3,..., n) is the workpiece discharge characteristic or the electrode discharge characteristic (independent variable), C is the constant term, and ai (i = 1, 2, 3,..., n) is the power - exponent of each workpiece discharge characteristic or electrode discharge characteristic. The power - law regression model describes how the discharge time T changes with the change of the workpiece discharge characteristic or the electrode discharge characteristic xi, where each workpiece discharge characteristic or electrode discharge characteristic affects the discharge time T in a specific power form.
[0029] In this embodiment, when f is an exponential function, the multiple non - linear regression model refers to the multiple exponential regression model or the non - linear exponential regression model. The multiple exponential regression model is a statistical method used to analyze the exponential relationship between a dependent variable and multiple independent variables. By constructing an exponential regression model, it can describe how the dependent variable shows exponential growth or decay with the changes of multiple independent variables. The multiple exponential regression model is usually expressed as: Where, is the discharge time (dependent variable), xi (i = 1, 2, 3,..., n) are the workpiece discharge characteristics or electrode discharge characteristics (independent variables), and bi (i = 1, 2, 3,..., n) are the parameters of the multiple exponential regression model. The parameter k represents the initial value or base number, and the parameter bi determines the influence of each workpiece discharge characteristic or electrode discharge characteristic on the growth or decay rate of the discharge time.
[0030] In this embodiment, the workpiece discharge time prediction model that characterizes the relationship between the predicted discharge time and the workpiece discharge characteristics and electrode discharge characteristics is obtained through the above power-law regression model or multiple exponential regression model. If it is not certain which model is the most suitable, several different models can be tried, and techniques such as cross-validation can be used to evaluate their performance.
[0031] The present invention determines the predicted value of the discharge time of the workpiece to be processed by obtaining the workpiece discharge characteristics and electrode discharge characteristics that are correlated with the discharge time of the workpiece to be processed; and combining the workpiece discharge characteristics and electrode discharge characteristics with the workpiece discharge time prediction model used to characterize the relationship between the predicted discharge time and the workpiece discharge characteristics and electrode discharge characteristics.
[0032] Since the workpiece discharge characteristics of different workpiece materials and the electrode discharge characteristics of different electrode materials may have different effects on the workpiece discharge time, the present invention fully considers the relationship between the predicted discharge time and the workpiece discharge characteristics and electrode discharge characteristics, and uses the workpiece discharge time prediction model based on different discharge characteristic parameters to predict the discharge time of the workpiece to be processed with different materials, so that the prediction result of the final discharge time is more accurate, can be closer to the actual discharge time, and reduces the prediction error. Therefore, the present invention solves the problem that the existing workpiece discharge time prediction model is difficult to be applicable to all types of workpieces and electrode materials, and the inappropriate prediction model will cause a deviation between the predicted discharge time and the actual situation, resulting in unstable workpiece processing quality.
[0033] In one embodiment, in the above step S02, that is, the determination step of the workpiece discharge time prediction model includes: S201: Set an initial workpiece discharge time prediction model for characterizing the relationship between the predicted discharge time and the workpiece discharge characteristics and electrode discharge characteristics. The initial workpiece discharge time prediction model includes a weight coefficient for characterizing the influence degree of the workpiece discharge characteristics and electrode discharge characteristics on the workpiece discharge time.
[0034] The initial workpiece discharge time prediction model in this embodiment refers to the power-law regression model or multiple exponential regression model in the above step S02. The independent variables in the model are the workpiece discharge characteristics and electrode discharge characteristics, the dependent variable in the model is the discharge time, and the parameters in the model are all unknown.
[0035] The weight coefficients in this embodiment for characterizing the influence degrees of workpiece discharge characteristics and electrode discharge characteristics on the workpiece discharge time refer to the unknown parameters in the power-law regression model or the multiple exponential regression model. For example, the weight coefficients of each discharge characteristic in the power-law regression model refer to the power exponents ai and the constant term C; the weight coefficients of each discharge characteristic in the multiple exponential regression model refer to the parameters bi and k.
[0036] S202: Obtain the workpiece discharge experiment feature dataset during the historical workpiece machining process. The workpiece discharge experiment feature dataset includes the same electrode material, workpiece material, and machining stage; set an initial value of the weight coefficient for the weight coefficient.
[0037] The workpiece discharge experiment feature dataset in this embodiment refers to the dataset about workpiece discharge characteristics and electrode discharge characteristics obtained by changing the value of one of the workpiece discharge characteristics or electrode discharge characteristics on the premise of the same electrode material, workpiece material, and machining stage. Among them, the electrode materials include materials such as graphite electrodes, copper electrodes, cemented carbide electrodes, tungsten cobalt alloys, and tungsten titanium alloys. The workpiece materials include materials such as steel, aluminum, copper, and titanium. The machining stages include rough machining stage, semi-finishing stage, and finishing stage. Since different workpiece materials and electrode materials in electrical discharge machining have different physical and chemical properties and different influences on the discharge process, and the existing prediction models of workpiece discharge time are often difficult to be applicable to all types of workpiece and electrode materials, therefore, in order to construct different workpiece discharge prediction models for different types of workpieces and electrode materials in this embodiment, it is required that the workpiece discharge experiment feature dataset includes the same electrode material, workpiece material, and machining stage, so as to make the predicted workpiece discharge time closer to the actual workpiece discharge time and improve the stability of workpiece machining quality.
[0038] In this embodiment, the initial value of the weight coefficient is obtained by using the method of random initialization. Specifically, select a Gaussian distribution with a mean of 0 and a standard deviation of a positive number; use the random number generator provided in the programming language or deep learning framework to generate the required number of random numbers according to the specified Gaussian distribution parameters (mean and standard deviation); then use these random numbers as the initial value of the weight coefficient. Among them, the selection of the standard deviation can be adjusted according to the complexity of the model and the characteristics of the data. A smaller standard deviation may cause the weights to be closer to 0 initially, which helps to maintain the stability of the model, but may also lead to the problem of gradient disappearance during the training process. A larger standard deviation may cause the weights to have larger values initially, which helps the model to explore the parameter space faster, but may also lead to the problem of gradient explosion during the training process. It should be noted that the result of random initialization may have a large uncertainty, so it may be necessary to try multiple times to obtain a better fitting effect.
[0039] S203: Substitute the workpiece discharge characteristics, electrode discharge characteristics, and the initial value of the weight coefficient in the workpiece discharge experiment feature dataset into the initial workpiece discharge time prediction model to obtain the predicted value of the discharge time.
[0040] In this embodiment, first, substitute the initial value of the weight coefficient obtained in step S202 into the initial workpiece discharge time prediction model to complete the initialization of the model. Then, use the discharge feature data (including workpiece discharge characteristics and electrode discharge characteristics) in the workpiece discharge experiment feature dataset obtained in step S202 as the input and transfer it to the initialized initial workpiece discharge time prediction model. The model performs internal calculations based on the input feature data and the initial value of the weight coefficient and outputs the predicted value of the workpiece discharge time.
[0041] S204: Obtain the actual value of the discharge time, and based on the actual value and the predicted value of the discharge time, obtain the discharge time error function.
[0042] Since the predicted value of the workpiece discharge time obtained in step S203 is based on the currently input feature data and the initial value of the weight coefficient, there may be a certain error. Therefore, it is necessary to further compare the predicted value with the actual value of the discharge time, calculate the error between the two, and analyze the source and magnitude of the error in order to optimize the model later.
[0043] In this embodiment, the methods for calculating the above error mainly include the mean squared error (MSE) and the mean absolute error (MAE). In the field of artificial intelligence, both are two commonly used indicators for evaluating the performance of regression models, and both can measure the difference between the predicted value and the actual observed value of the model, but the calculation methods and focuses are different. The specific calculation methods are as follows: The mean squared error is the average of the squares of the differences between the predicted value of the discharge time and the actual value of the discharge time. Its calculation formula is: where n is the number of samples in the workpiece discharge experiment feature dataset, is the actual value of the discharge time corresponding to the i-th sample data, is the predicted value of the discharge time corresponding to the i-th sample data.
[0044] The advantage of MSE is that it punishes large errors more severely because the errors are squared. If there is a large difference between a predicted value and the actual value, the MSE will increase significantly. Using MSE to evaluate the model helps the model to be more sensitive to extreme values, which may improve the overall performance of the model. However, MSE is very sensitive to the scale of the data. If the scale of the data changes greatly, the value of MSE will also change accordingly.
[0045] The mean absolute error is the average of the absolute values of the differences between the predicted values of the discharge time and the actual values of the discharge time. Its calculation formula is: where n is the number of samples in the workpiece discharge experiment feature dataset, is the actual value of the discharge time corresponding to the i-th sample data, is the predicted value of the discharge time corresponding to the i-th sample data.
[0046] Compared with MSE, MAE punishes large errors less severely because only the absolute values of the errors are considered. Even if there is a large difference between a predicted value and the actual value, MAE will not increase as significantly as MSE. Therefore, MAE has better robustness to outliers.
[0047] However, in the regression problems of artificial intelligence, since MAE is based on absolute values, the calculation is usually more complex than MSE, especially in the process of taking derivatives and optimization. Therefore, in this embodiment, the method of mean square error is used to calculate the average of the squares of the differences between the actual value and the predicted value of the discharge time, and the discharge time error function is obtained.
[0048] S205: Obtain the gradients of the discharge time error function with respect to the weight coefficient and the tuning coefficient, and use the gradient descent method to iteratively update the weight coefficient to obtain the optimal weight coefficient when the value of the discharge time error function is minimized.
[0049] In this embodiment, artificial intelligence technologies (such as machine learning and deep learning) are applied to determine the initial value of the weight coefficient and subsequent iterative updates. For example, the gradient descent method is used as an optimization algorithm to iteratively update the weight coefficient to minimize the error function of the discharge time.
[0050] In this embodiment, the gradient is a vector pointing in the direction of the maximum rate of change of the discharge time error function with respect to the weight coefficient. To find the gradient, partial derivatives of the discharge time error function with respect to each weight coefficient need to be taken.
[0051] Let β be the weight coefficient vector and Xi be the feature vector of the i-th sample. Then the discharge time predicted by the multiple non-linear regression model in the above step S02 can be expressed as = f(Xi, β), where f is a multivariate non - linear regression model function.
[0052] Then the partial derivative of the error function MSE in the above step S204 with respect to the weight coefficient is: where is the j - th weight coefficient, n is the number of samples in the workpiece discharge experiment feature dataset, is the actual value of the discharge time corresponding to the i - th sample data, is the predicted value of the discharge time corresponding to the i - th sample data, and MSE is the mean square error function. Then the specific steps of using the gradient descent method to iteratively update the set value of the weight coefficient are as follows: 1) Update the weight coefficient along the opposite direction of the gradient (i.e., the direction in which the error decreases fastest). The update formula is: where is the j - th weight coefficient, MSE is the mean square error function, is the value of the weight coefficient obtained at the t - th update, is the learning rate, which is a value that needs to be set according to some empirical rules. The learning rate determines the magnitude of the change in the weight coefficient at each update. The choice of the learning rate is crucial for the performance and convergence of the gradient descent method.
[0053] 2) Repeat the above step 1), continuously iteratively update the weight coefficient , until a certain stopping condition is met (such as the error function reaches a certain threshold, the number of iterations reaches the upper limit, etc.). In each iteration, the gradient needs to be recalculated and the weight coefficient updated.
[0054] Finally, when the error function reaches the minimum value (or is close enough to the minimum value), the optimal weight coefficient is obtained.
[0055] The method for predicting the workpiece discharge time in this embodiment uses the gradient descent method in artificial intelligence technology to calculate the gradient of the discharge time error function with respect to the weight coefficient. According to the gradient information, the weight coefficient is iteratively updated to gradually reduce the value of the error function. By continuously iterating and adjusting the weight coefficient, the model gradually approaches the optimal solution.
[0056] S206: Substitute the optimal weight coefficient into the initial workpiece discharge time prediction model to obtain the workpiece discharge time prediction model.
[0057] Substituting the optimal weight coefficient obtained in the above step S205 into the initial workpiece discharge time prediction model can obtain the workpiece discharge time prediction model. At this time, it is also necessary to evaluate the prediction accuracy of the workpiece discharge time prediction model.
[0058] In the field of artificial intelligence, especially in the fields of machine learning and deep learning, the evaluation and optimization of models are crucial steps. As an important method for evaluating the goodness of fit of statistical models, residual analysis can help researchers and data scientists determine whether a model is suitable for the data, thereby guiding the optimization of the model. In this embodiment, the residual analysis method is used to evaluate the prediction accuracy of the above-mentioned workpiece discharge time prediction model. Among them, the residual analysis method evaluates the accuracy of the model by analyzing the difference (i.e., the residual) between the model prediction value and the actual observed value. The following are the steps for using the residual analysis method to evaluate the prediction accuracy of the workpiece discharge time prediction model: 1) Calculate the difference between the predicted value of each discharge time and the actual value of the discharge time to obtain the discharge time residual. The discharge time residual can be expressed as: Discharge time residual = Actual observed value of discharge time - Predicted value of discharge time Taking the discharge time residual as the ordinate and the predicted value as the abscissa, plot a scatter plot to obtain a residual plot.
[0059] Observe and analyze the residual plot. If the scatter points on the residual plot are randomly distributed near the zero line without obvious patterns or trends, this indicates that the prediction of the workpiece discharge time prediction model is random and not affected by other unconsidered factors. Therefore, the workpiece discharge time prediction model may be reasonable. If the scatter points on the residual plot show obvious patterns or trends, such as increasing or decreasing with the increase of a certain variable, this may mean that there are systematic biases or heteroscedasticity in the workpiece discharge time prediction model, and it is necessary to further adjust the workpiece discharge time prediction model to better fit the data. For example, different non-linear regression models can be tried, certain discharge feature data can be added or deleted, and the model weight coefficients can be adjusted to improve the prediction accuracy of the model. Among them, systematic bias refers to a trend that the data analysis results always deviate from the actual situation. Heteroscedasticity means that in regression analysis, the variance of the error term is not constant but varies with different explanatory variables or observed values. Through the residual analysis method, the prediction accuracy of the workpiece discharge time prediction model can be evaluated, and the problems existing in the model can be found. According to these problems, the model can be improved to improve its prediction performance.
[0060] The predicted discharge time function constructed by comprehensively considering multiple discharge characteristics and their weight coefficients in the present invention can more comprehensively reflect the actual situation of the discharge process, make the prediction result of the final discharge time more accurate, be closer to the actual discharge time, and reduce the prediction error. The present invention solves the problem that in the existing prediction methods of discharge time, the weight influence of each parameter on the electrode discharge time is not considered, resulting in inaccurate prediction of the discharge time and unstable workpiece processing quality.
[0061] In one embodiment, in the above step S204, that is, the specific steps of obtaining the actual value of the discharge time include: Input the workpiece discharge characteristics and electrode discharge characteristics in the workpiece discharge experiment feature dataset into the pre-trained discharge time prediction neural network model, and output the actual value of the discharge time for evaluating the prediction accuracy of the workpiece discharge time prediction model.
[0062] The neural network model is an important tool in the field of artificial intelligence, especially suitable for dealing with complex and non-linear data relationships. The discharge time prediction neural network model in this embodiment includes an input layer, a hidden layer, and an output layer. The input layer receives the original data (including workpiece discharge characteristics and electrode discharge characteristics) and transmits it to the discharge time prediction neural network. Among them, the number of neurons in the input layer is equal to the number of input discharge characteristics. For example, if each sample in the dataset has 100 discharge characteristics, then the input layer will have 100 neurons.
[0063] The hidden layer is the core part of the discharge time prediction neural network, responsible for extracting complex patterns or features from the information transmitted by the input layer. The neurons in each layer process the input data through activation functions to produce non-linear outputs. There is no fixed standard for the number of neurons in the hidden layer, and it is usually selected through experiments. A common practice is to gradually increase the number of neurons in the hidden layer until the performance of the validation set reaches the optimal. Usually, it ranges from dozens to hundreds of neurons. The neurons in the hidden layer usually use the ReLU (Rectified Linear Unit) activation function or the Sigmoid activation function. Since the ReLU function can effectively solve the problem of gradient disappearance, the ReLU activation function is used as the activation function of the hidden layer in this embodiment.
[0064] The output layer outputs the final prediction result according to the calculation result of the hidden layer. Since the neural network in this embodiment solves a non-linear regression problem, only 1 neuron is set in the output layer, and no activation function is used.
[0065] The training steps of the pre-trained discharge time prediction neural network model in this embodiment include: Obtain a discharge feature training dataset regarding the workpiece discharge time during the historical workpiece processing. The discharge feature training dataset includes the same electrode material, workpiece material, and processing stage, and the workpiece discharge time in this discharge feature training dataset is a discharge feature training dataset with true labels of the workpiece discharge time after being manually verified. Randomly initialize the weights of the discharge time prediction neural network, and the bias term can be initialized to zero or a small constant.
[0066] Input the discharge characteristics (including workpiece discharge characteristics and electrode discharge characteristics) in the discharge time training dataset into the input layer of the discharge time prediction neural network, and obtain the predicted value of the workpiece discharge time under the condition of this discharge characteristic through the output layer.
[0067] Calculate the mean square error between the predicted value of the workpiece discharge time output by the discharge time prediction neural network and the true label of the workpiece discharge time, and obtain the mean square error loss function.
[0068] Adjust the weights and biases in the discharge time prediction neural network through the backpropagation algorithm to minimize the mean square error loss function.
[0069] By repeating and iterating the above step 4) until the mean square error loss function converges below a certain threshold or reaches the preset number of iterations. In each iteration, the neural network will perform forward propagation using the new weights and biases, calculate the value of the mean square error loss function, and then perform backpropagation and update the parameters.
[0070] When the above discharge time prediction neural network model is trained, input the workpiece discharge characteristics and electrode discharge characteristics in the workpiece discharge experiment feature dataset into the pre-trained discharge time prediction neural network model to obtain the actual value of the discharge time for evaluating the prediction accuracy of the workpiece discharge time estimation model.
[0071] In the present invention, by manually annotating the true label of the workpiece discharge time, a relatively accurate discharge characteristic training dataset is obtained. The discharge characteristic training dataset is input into the neural network for learning. The neural network in the field of artificial intelligence has a powerful non-linear mapping ability and can establish an accurate prediction model by learning the relationship between the discharge characteristics and the workpiece discharge time. By improving the accuracy of the actual value of the discharge time, the predicted value of the discharge time of the workpiece discharge time estimation model is made closer to the actual processing situation, thereby further improving the stability of the workpiece processing quality.
[0072] In one embodiment, in all the above steps, that is, the workpiece discharge characteristics include the volume of the processed workpiece, the surface area of the processed workpiece, and the volume of the processed workpiece removed by each discharge of the discharge electrode; the electrode discharge characteristics include the discharge depth of the discharge electrode, the gap between the discharge electrode and the processed workpiece, and the discharge area of the discharge electrode. Then the relevant expression of the workpiece discharge time estimation model is: where T is the estimated discharge time, is the overall weight coefficient for reflecting the overall influencing factors of the workpiece discharge characteristics and the electrode discharge characteristics, is the surface area of the processed workpiece, is the discharge area of the discharge electrode, is the discharge depth of the discharge electrode, is the gap between the discharge electrode and the workpiece to be machined, is the volume of the workpiece to be machined, is the volume of the workpiece to be machined removed by each discharge of the discharge electrode, is the weight coefficient corresponding to the surface area of the workpiece to be machined, is the weight coefficient corresponding to the discharge area of the discharge electrode, is the weight coefficient corresponding to the volume of the workpiece to be machined, is the weight coefficient corresponding to the volume of the workpiece to be machined removed by each discharge of the discharge electrode, is the weight coefficient corresponding to the discharge depth of the discharge electrode, is the weight coefficient corresponding to the gap between the discharge electrode and the workpiece to be machined.
[0073] In this embodiment, the volume of the workpiece to be machined refers to the overall volume of the workpiece, and the actual volume of the workpiece can be calculated according to the workpiece's archival materials. The surface area of the workpiece to be machined refers to the outer surface area of the workpiece, and the outer surface area of the workpiece can also be calculated according to the workpiece's archival materials.
[0074] In this embodiment, the volume of the workpiece to be machined removed by each discharge of the discharge electrode refers to the volume of the workpiece material removed by the electrode during a single discharge process, which depends on the discharge energy, the properties of the workpiece material, and the discharge conditions. Since the volume removed by each discharge of the workpiece to be machined is uncertain and unmeasurable, but under the premise that the processing conditions such as the electrode material and the workpiece material are the same, the volume change of the same material workpiece removed by each discharge will not be particularly large. Therefore, the volume removed by each discharge of the same material workpiece can be estimated by statistical methods. In this embodiment, the volume of the workpiece removed by each discharge is calculated according to the discharge electrode's movement. The specific calculation steps are as follows: 1) Accurately measure the position change of the electrode relative to the workpiece surface before and after discharge, that is, the discharge electrode movement amount, by measuring the electrode height before and after discharge or using a high-precision three-dimensional measurement device.
[0075] 2) During the discharge process, the shape of the discharge pit formed by the electrode on the workpiece surface is usually approximately circular or elliptical. Its shape and size can be estimated by measuring the diameter and depth of the discharge pit. The diameter and depth of the discharge pit are related to the discharge energy, discharge time, and the properties of the workpiece material.
[0076] 3) According to the shape and size of the discharge pit, the corresponding volume calculation formula can be used to calculate the volume of the workpiece removed by each discharge. For example, if the shape of the discharge pit is approximately circular, the volume formula of a cylinder can be used for calculation; if the shape of the discharge pit is approximately elliptical, the volume formula of an ellipsoid can be used for calculation.
[0077] The volume removed by each discharge of the historical machined workpieces is statistically calculated multiple times by the above calculation method, and the average value of the volumes removed by discharges obtained from multiple statistics is calculated to obtain the volume of the machined workpiece removed by each discharge of the discharge electrode.
[0078] In this embodiment, the discharge depth of the discharge electrode refers to the depth at which the electrode removes the workpiece material during the discharge process, which can be determined by measuring the surface topography of the workpiece after discharge. Since the discharge depth of the discharge electrode of the workpiece to be machined is also unmeasurable. However, on the premise that the processing conditions such as the electrode material and the workpiece material are the same, the change in the discharge depth of the discharge electrode is not particularly large under the same processing conditions of the electrode material and the workpiece material. Therefore, through actual electrical discharge machining experiments, the discharge depth of each electrode can be measured under the same workpiece material. The specific calculation steps for the discharge depth of the discharge electrode in this embodiment are as follows: 1) Before the discharge machining, use measuring tools (such as micrometers, microscopes, etc.) to measure the initial height of the workpiece surface.
[0079] 2) After the discharge machining, measure the height of the workpiece surface again.
[0080] 3) The difference in the height of the workpiece surface before and after the discharge machining is the discharge depth.
[0081] The discharge depth of the discharge electrode of the historical machined workpieces is statistically calculated multiple times by the above calculation method, and the average value of the discharge depths of the discharge electrodes obtained from multiple statistics is calculated to obtain the discharge depth of the discharge electrode of the workpiece to be machined.
[0082] In this embodiment, the gap between the discharge electrode and the machined workpiece is usually also called the discharge gap, which refers to the distance between the electrode and the workpiece during the discharge, and is a key parameter for forming the discharge channel during the discharge process, which is set and measured manually.
[0083] In this embodiment, the discharge area of the discharge electrode refers to the part of the area that actually participates in the discharge between the electrode and the workpiece or between the electrode and other electrodes during the discharge process. The specific calculation steps for the discharge area of the discharge electrode are as follows: Fix the discharge specimen on the electrode, and submerge the specimen and the electrode in the electrolyte solution to ensure the smooth progress of the discharge.
[0084] Perform discharge treatment on the specimen through the discharge equipment. After the discharge is completed, use observation equipment such as a microscope to observe the discharge traces left on the surface of the specimen.
[0085] Measure the diameter or other relevant dimensions of the discharge traces.
[0086] Based on parameters such as the measured trace size and shape, the discharge area of the discharge electrode is calculated through relevant formulas. For example, if the shape of the discharge pit is approximately circular, the area formula of a circle can be used for calculation; if the shape of the discharge pit is approximately elliptical, the area formula of an ellipse can be used for calculation.
[0087] Through the above calculation method, the discharge area of the discharge electrode is statistically calculated multiple times, and the average value of the discharge areas of the discharge electrode obtained from multiple statistics is calculated to obtain the discharge area of the discharge electrode.
[0088] In this embodiment, the power-law regression model is used for the multiple non-linear regression model. Then, based on the volume of the workpiece to be machined, the surface area of the workpiece to be machined, the volume of the workpiece removed by each discharge of the discharge electrode, the discharge depth of the discharge electrode, the gap between the discharge electrode and the workpiece to be machined, and the discharge area of the discharge electrode as independent variables, they are substituted into the power-law regression model, and the relevant expression for the estimated discharge time function is obtained as follows: Among them, T is the estimated discharge time, is the overall weight coefficient for the overall influencing factors reflecting the workpiece discharge characteristics and electrode discharge characteristics, is the surface area of the workpiece to be machined, is the discharge area of the discharge electrode, is the discharge depth of the discharge electrode, is the gap between the discharge electrode and the workpiece to be machined, is the volume of the workpiece to be machined, is the volume of the workpiece removed by each discharge of the discharge electrode, is the weight coefficient corresponding to the surface area of the workpiece to be machined, is the weight coefficient corresponding to the discharge area of the discharge electrode, is the weight coefficient corresponding to the volume of the workpiece to be machined, is the weight coefficient corresponding to the volume of the workpiece removed by each discharge of the discharge electrode, is the weight coefficient corresponding to the discharge depth of the discharge electrode, is the weight coefficient corresponding to the gap between the discharge electrode and the workpiece to be machined.
[0089] In the present invention, by using the power-law regression model as the workpiece discharge time prediction model, since the workpiece discharge time often exhibits the characteristics of a power-law distribution, that is, a small number of workpieces with longer discharge times account for most of the total discharge time, while the discharge times of most workpieces are relatively short. The power-law regression model can capture this distribution characteristic, thereby more accurately predicting the discharge time of the workpiece, and further making the predicted value of the discharge time of the workpiece discharge time prediction model closer to the actual machining situation, thereby further improving the stability of the workpiece machining quality.
[0090] In one embodiment, in the above step S202, that is, the processing stage includes a rough machining stage, a semi-finishing machining stage, and a finishing machining stage, the estimation method further includes: S301: Set a corresponding rough machining ratio coefficient for the rough machining stage.
[0091] In this embodiment, the rough machining stage is the preliminary processing stage that transforms the raw material or blank into an intermediate product closer to the final product form through a series of operations. Its main task is to remove most of the machining allowance on each machining surface of the blank, making the blank close to the part finished product in shape and size. The machining requirements are important factors in determining the rough machining ratio coefficient. Since the main purpose of rough machining is to lay the foundation for subsequent machining, its accuracy requirements are relatively low. As long as the basic shape and size of the product meet the requirements. For example, for workpieces that require high surface quality or dimensional accuracy, a smaller cutting depth and feed rate may be used, and the rough machining ratio coefficient can be appropriately increased to meet the machining requirements of the workpiece. On the contrary, for workpieces that need to quickly remove a large amount of material, a larger cutting depth and feed rate may be used, and the rough machining ratio coefficient can be appropriately reduced to meet the machining requirements of the workpiece. Therefore, a suitable rough machining ratio coefficient can be set for the rough machining stage, and on the basis of the predicted value of the workpiece discharge time obtained through the above workpiece discharge time prediction model, appropriate adjustment can be made to obtain the estimated adjustment value of the discharge time corresponding to the rough machining stage.
[0092] S302: Obtain the estimated adjustment value of the discharge time corresponding to the rough machining stage according to the product of the rough machining ratio coefficient and the predicted value of the discharge time output by the workpiece discharge time prediction model.
[0093] In this embodiment, on the basis of the predicted value of the discharge time output by the workpiece discharge time prediction model obtained in the above step S206, multiply by the rough machining ratio coefficient set in the above step S301 to obtain the estimated adjustment value of the discharge time corresponding to the rough machining stage.
[0094] S303: Set a corresponding semi-finishing machining ratio coefficient for the semi-finishing machining stage.
[0095] In this embodiment, the semi-finishing stage is between rough machining and finishing machining. Its main task is to prepare for the finishing machining of the main surfaces of the workpiece and complete the machining of some secondary surfaces. The machining accuracy requirements in the semi-finishing stage are moderate. It is necessary to leave a margin for subsequent finishing machining and ensure the basic shape and dimensional accuracy of the part. Compared with rough machining, the cutting parameters (such as cutting depth, feed rate, and cutting speed) in the semi-finishing stage usually decrease to reduce the cutting force and instantaneous cutting heat, thereby reducing the deformation and surface roughness of the workpiece. Therefore, according to the machining accuracy and surface quality requirements of the workpiece, analyze the influence of the semi-finishing stage on the subsequent finishing stage. If the accuracy and surface quality requirements in the semi-finishing stage are relatively high, it may be necessary to increase the semi-finishing ratio coefficient of this stage to ensure sufficient machining time and material removal amount.
[0096] S304: Obtain the estimated adjustment value of the discharge time corresponding to the semi-finishing stage according to the product of the semi-finishing ratio coefficient and the predicted value of the discharge time output by the workpiece discharge time prediction model.
[0097] Based on the predicted value of the discharge time output by the workpiece discharge time prediction model obtained in the above step S206 in this embodiment, multiply it by the semi-finishing ratio coefficient set in the above step S303, so as to obtain the estimated adjustment value of the discharge time corresponding to the semi-finishing stage.
[0098] S305: Set the corresponding finishing ratio coefficient for the finishing stage.
[0099] In this embodiment, the finishing stage is after rough machining and semi-finishing. Its main task is to ensure that the main surfaces of the workpiece meet the specified dimensional accuracy and surface roughness requirements. Compared with rough machining and semi-finishing, the metal layer removed in the finishing stage is thinner. The main purpose is to make minor corrections to the part to achieve higher accuracy and surface quality. Therefore, according to the machining allowance left by the previous machining stages (such as rough machining and semi-finishing), determine the amount of material to be removed in the finishing stage to determine the initial value of the finishing ratio coefficient; then, according to the quality indicators such as surface roughness and tolerance required by the workpiece, determine the finishing ratio coefficient of the finishing stage. Usually, the higher the surface quality requirements, the more likely it is necessary to appropriately increase the finishing ratio coefficient.
[0100] S306: Obtain the estimated adjustment value of the discharge time corresponding to the finishing stage according to the product of the finishing ratio coefficient and the predicted value of the discharge time output by the workpiece discharge time prediction model.
[0101] Based on the predicted value of the discharge time output by the workpiece discharge time prediction model obtained in the above step S206, this embodiment multiplies it by the finish machining ratio coefficient set in the above step S305 to obtain the estimated adjustment value of the discharge time corresponding to the finish machining stage.
[0102] The present invention sets corresponding ratio coefficients for the rough machining stage, semi-finish machining stage, and finish machining stage, so as to obtain the workpiece discharge time in different machining stages. According to the requirements of different machining stages, the discharge time of the machine tool can be reasonably allocated, which can improve the utilization rate and machining efficiency of the machine tool. In addition, setting different ratio coefficients can meet the machining requirements of different materials, thereby enhancing the applicability and flexibility of the workpiece discharge time prediction model.
[0103] In one embodiment, in the above step S01, that is, the step of obtaining the workpiece discharge characteristics and electrode discharge characteristics includes: S401: Obtain a workpiece discharge experiment data set during the historical workpiece machining process; the workpiece discharge experiment data set includes the parameters required for discharging during workpiece machining and the workpiece discharge time.
[0104] The parameters required for discharging during workpiece machining in this embodiment mainly include the volume of the workpiece being machined, the surface area of the workpiece being machined, the volume of the workpiece removed by the discharge electrode each time it discharges, the discharge depth of the discharge electrode, the gap between the discharge electrode and the workpiece being machined, and the discharge area of the discharge electrode, etc.
[0105] The workpiece discharge experiment data set in this embodiment refers to the premise of the same electrode material, workpiece material, and machining stage. By changing one of the parameters required for discharging during workpiece machining, for each workpiece, record the observed value of the workpiece discharge time from the start of discharge to the end of discharge. Organize the discharge parameters and the observed values of the discharge time of each workpiece into a data set to obtain the workpiece discharge experiment data set, and perform data cleaning on the workpiece discharge experiment data set to remove outliers, missing values, or duplicate values in the data. Ensure the consistency and accuracy of the data. If the units of the discharge parameters are different, standardization processing is required for correlation analysis.
[0106] S402: Analyze the correlation between the parameters required for discharging during each workpiece machining and the workpiece discharge time to obtain the workpiece discharge time correlation coefficient.
[0107] This embodiment can process relevant data based on artificial intelligence technology. For example, through the correlation coefficient method in the feature selection algorithm of machine learning, the most critical features for discharge time prediction are extracted from the original data. These features may include the change trend, fluctuation range, etc. of certain key parameters during the discharge process. Through feature extraction, the model input can be simplified, and the model training speed and prediction accuracy can be improved.
[0108] The correlation coefficient in this embodiment refers to the Pearson correlation coefficient, which is used to measure the correlation between the parameters required for discharging during workpiece machining and the workpiece discharge time. Its value is usually between -1 and 1. The expression for the workpiece discharge time correlation coefficient is: Wherein, is the workpiece discharge time correlation coefficient, is the i-th sampling data value of the parameters required for the current discharge, is the average value of the sampling data values of the parameters required for the current discharge, is the i-th sampling observation value of the workpiece discharge time corresponding to the parameters required for the current discharge, is the average value of the sampling observation values of the workpiece discharge time, and n is the number of influencing factors of the workpiece discharge time or the number of observation values of the workpiece discharge time.
[0109] Substitute the sampling data sequence of each parameter and the sampling observation value sequence of the corresponding workpiece discharge time in the workpiece discharge experiment data set into the above expression of the correlation coefficient to obtain the workpiece discharge time correlation coefficient between each parameter and the workpiece discharge time.
[0110] S403: Obtain the workpiece discharge characteristics and electrode discharge characteristics related to the workpiece discharge time according to the workpiece discharge time correlation coefficient and a preset correlation threshold.
[0111] The correlation threshold in this embodiment is set according to the experience and knowledge of experts. By comparing and determining the magnitude relationship between the workpiece discharge time correlation coefficient obtained in the above step S402 and the preset correlation threshold, the workpiece discharge characteristics and electrode discharge characteristics related to the workpiece discharge time are screened out from the workpiece discharge experiment data set.
[0112] The present invention calculates the correlation coefficient between the discharge parameters of the workpiece and the workpiece discharge time, obtains the workpiece discharge characteristics and electrode discharge characteristics related to the workpiece discharge time according to the correlation coefficient, and then predicts the workpiece discharge time of the workpiece to be machined through the workpiece discharge characteristics and electrode discharge characteristics related to the workpiece discharge time, which can further improve the accuracy of predicting the workpiece discharge time and the stability of the workpiece machining quality.
[0113] In one embodiment, in the above step S403, that is, the step of according to the workpiece discharge time correlation coefficient and a preset correlation threshold includes: S501: Determine that when the absolute value of the workpiece discharge time correlation coefficient is greater than a pre-set correlation threshold, the parameter of the current workpiece discharge time is correlated with the workpiece discharge time.
[0114] In this embodiment, the value range of the workpiece discharge time correlation coefficient is between -1 and 1. When the value of one variable increases, if the value of another variable also increases accordingly, then these two variables are considered to be positively correlated, and the value of the workpiece discharge time correlation coefficient will be between 0 and 1. Conversely, if the value of one variable increases while the value of another variable decreases, they are considered to be negatively correlated, and the workpiece discharge time correlation coefficient will be a negative value. If there is no clear pattern or relationship between the two variables, then the workpiece discharge time correlation coefficient is close to 0. The absolute value of the workpiece discharge time correlation coefficient reflects the strength of the correlation. The closer it is to 1 or -1, the stronger the relationship between the two variables. Therefore, by comparing the size relationship between the absolute value of the workpiece discharge time correlation coefficient and the pre-set correlation threshold, it can be determined whether the parameter of the current workpiece discharge time is correlated with the workpiece discharge time.
[0115] Specifically, calculate the absolute value of the workpiece discharge time correlation coefficient. Determine that when the absolute value of the workpiece discharge time correlation coefficient is greater than the pre-set correlation threshold in step S403 above, the parameter of the current workpiece discharge time is correlated with the workpiece discharge time.
[0116] S502: When the absolute value of the workpiece discharge time correlation coefficient is not greater than the pre-set correlation threshold, the parameter of the current workpiece discharge time is not correlated with the workpiece discharge time.
[0117] Specifically, calculate the absolute value of the workpiece discharge time correlation coefficient. Determine that when the absolute value of the workpiece discharge time correlation coefficient is not greater than the pre-set correlation threshold in step S403 above, the parameter of the current workpiece discharge time is not correlated with the workpiece discharge time.
[0118] In the present invention, when it is determined that the absolute value of the correlation coefficient is greater than the threshold, it indicates that the selected parameter has a strong correlation with the discharge time. The discharge time prediction model established using these parameters will have higher accuracy. It can more accurately predict the discharge time of the workpiece under specific conditions, providing a more reliable reference for the subsequent processing process.
[0119] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0120] In one embodiment, a device for estimating the discharge time of a workpiece is provided. The device for estimating the discharge time of the workpiece corresponds one-to-one with the method for estimating the discharge time of the workpiece in the above embodiment. As Figure 3 shown, the device for estimating the discharge time of the workpiece includes an acquisition module, a construction module, and an estimation module. The detailed description of each functional module is as follows: The acquisition module is configured to acquire workpiece discharge characteristics and electrode discharge characteristics that are relevant to the discharge time of the workpiece to be machined.
[0121] The construction module is configured to construct a workpiece discharge time estimation model based on the workpiece discharge characteristics including the volume of the workpiece to be machined, the surface area of the workpiece to be machined, the volume of the workpiece removed by each discharge of the discharge electrode, and the electrode discharge characteristics including the discharge depth of the discharge electrode, the gap between the discharge electrode and the workpiece to be machined, and the discharge area of the discharge electrode.
[0122] The estimation module is configured to determine an estimated value of the discharge time of the workpiece to be machined based on the workpiece discharge characteristics, the electrode discharge characteristics, and the workpiece discharge time estimation model that characterizes the relationship between the estimated discharge time and the workpiece discharge characteristics and the electrode discharge characteristics.
[0123] Optionally, the above-mentioned estimation module includes: The first setting sub-module is configured to set an initial workpiece discharge time estimation model that characterizes the relationship between the estimated discharge time and the workpiece discharge characteristics and the electrode discharge characteristics. Weight coefficients for characterizing the influence degrees of the workpiece discharge characteristics and the electrode discharge characteristics on the workpiece discharge time are set in the initial workpiece discharge time estimation model.
[0124] The second setting sub-module is configured to acquire a workpiece discharge experiment feature data set during the machining process of historical workpieces. The workpiece discharge experiment feature data set includes the same electrode material, workpiece material, and machining stage; and set an initial value of the weight coefficient for the weight coefficient.
[0125] The prediction sub-module is configured to substitute the workpiece discharge characteristics, the electrode discharge characteristics, and the initial value of the weight coefficient in the workpiece discharge experiment feature data set into the initial workpiece discharge time estimation model to obtain a predicted value of the discharge time.
[0126] The error calculation sub-module is configured to acquire the actual value of the discharge time, and obtain a discharge time error function based on the actual value of the discharge time and the predicted value.
[0127] The optimization sub-module is configured to acquire the gradients of the discharge time error function with respect to the weight coefficient and the tuning coefficient, and use the gradient descent method to iteratively update the weight coefficient to obtain an optimal weight coefficient when the value of the discharge time error function is minimized.
[0128] A model acquisition sub-module, configured to substitute the optimal weight coefficients into the initial workpiece discharge time prediction model to obtain the workpiece discharge time prediction model.
[0129] Optionally, the above error calculation sub-module includes: A neural network unit, configured to input the workpiece discharge characteristics and electrode discharge characteristics in the workpiece discharge experiment feature dataset into a pre-trained discharge time prediction neural network model, and output the actual value of the discharge time for evaluating the prediction accuracy of the workpiece discharge time prediction model.
[0130] Optionally, the above model acquisition sub-module includes: An estimation model unit, where the relevant expression for the workpiece discharge time prediction model is: where T is the estimated discharge time, is the overall weight coefficient for reflecting the overall influencing factors of workpiece discharge characteristics and electrode discharge characteristics, is the surface area of the machined workpiece, is the discharge area of the discharge electrode, is the discharge depth of the discharge electrode, is the gap between the discharge electrode and the machined workpiece, is the volume of the machined workpiece, is the volume of the machined workpiece removed by the discharge electrode each time of discharge, is the weight coefficient corresponding to the surface area of the machined workpiece, is the weight coefficient corresponding to the discharge area of the discharge electrode, is the weight coefficient corresponding to the volume of the machined workpiece, is the weight coefficient corresponding to the volume of the machined workpiece removed by the discharge electrode each time of discharge, is the weight coefficient corresponding to the discharge depth of the discharge electrode, is the weight coefficient corresponding to the gap between the discharge electrode and the machined workpiece.
[0131] Optionally, the above second setting sub-module includes: A classification unit, where the machining stage includes a rough machining stage, a semi-finishing machining stage, and a finishing machining stage.
[0132] A first proportional coefficient setting unit, configured to set the corresponding rough machining proportional coefficient for the rough machining stage.
[0133] A first adjustment unit, configured to obtain the estimated adjustment value of the discharge time corresponding to the rough machining stage according to the product of the rough machining proportional coefficient and the predicted value of the discharge time output by the workpiece discharge time prediction model.
[0134] A second proportionality coefficient setting unit, configured to set a corresponding semi-finishing proportionality coefficient for the semi-finishing stage.
[0135] A second adjustment unit, configured to obtain a predicted adjustment value of the discharge time corresponding to the semi-finishing stage according to the product of the semi-finishing proportionality coefficient and the predicted value of the discharge time output by the workpiece discharge time prediction model.
[0136] A third proportionality coefficient setting unit, configured to set a corresponding finishing proportionality coefficient for the finishing stage.
[0137] A third adjustment unit, configured to obtain a predicted adjustment value of the discharge time corresponding to the finishing stage according to the product of the finishing proportionality coefficient and the predicted value of the discharge time output by the workpiece discharge time prediction model.
[0138] Optionally, the above-mentioned acquisition module includes: An experimental data acquisition sub-module, configured to acquire a workpiece discharge experiment data set during the machining process of historical workpieces; the workpiece discharge experiment data set includes the parameters required for discharging during machining of the workpiece and the workpiece discharge time.
[0139] A correlation analysis sub-module, configured to analyze the correlation between the parameters required for discharging during machining of each workpiece and the workpiece discharge time, and obtain a workpiece discharge time correlation coefficient.
[0140] A result judgment sub-module, configured to obtain workpiece discharge characteristics and electrode discharge characteristics that are correlated with the workpiece discharge time according to the workpiece discharge time correlation coefficient and a preset correlation threshold.
[0141] Optionally, the above-mentioned result judgment sub-module includes: A first judgment unit, configured to judge that when the absolute value of the workpiece discharge time correlation coefficient is greater than a preset correlation threshold, the parameters required for discharging during the current machining of the workpiece are correlated with the workpiece discharge time.
[0142] A second judgment unit, configured to judge that when the absolute value of the workpiece discharge time correlation coefficient is not greater than a preset correlation threshold, the parameters required for discharging during the current machining of the workpiece are not correlated with the workpiece discharge time.
[0143] Since the workpiece discharge characteristics of different workpiece materials and the electrode discharge characteristics of different electrode materials may have different effects on the workpiece discharge time, the present invention fully considers the relationship between the estimated discharge time, the workpiece discharge characteristics, and the electrode discharge characteristics, and uses different workpiece discharge time estimation models to estimate the discharge time of the workpiece to be processed, so that the prediction result of the final discharge time is more accurate, can be closer to the actual discharge time, and reduce the prediction error. Therefore, the present invention solves the problem that the existing workpiece discharge time estimation model is difficult to be applicable to all types of workpieces and electrode materials, and the inappropriate estimation model will cause a deviation between the estimated discharge time and the actual situation, resulting in unstable workpiece processing quality.
[0144] For the specific limitations of the workpiece discharge time estimation device, reference can be made to the limitations of the workpiece discharge time estimation method in the above text, which will not be elaborated here. Each module in the above workpiece discharge time estimation device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0145] In one embodiment, Figure 4 is a schematic structural diagram of a computer device provided by the present invention. As Figure 4 shown, the computer device of this embodiment includes: at least one processor ( Figure 4 only one is shown in the figure), a memory, and a computer program stored in the memory and executable on at least one processor. When the processor executes the computer program, it implements the steps in any of the above-mentioned health prediction method embodiments.
[0146] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that Figure 4 is only an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown in the figure, or combine some components, or different components. For example, it may also include a network interface, a display screen, and an input device, etc.
[0147] The so-called processor may be a CPU, and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0148] The memory includes a readable storage medium, an internal memory, etc. Among them, the internal memory may be the memory of the computer device, and the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be the hard disk of the computer device, and in some other embodiments, it may also be an external storage device of the computer device. For example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the memory may also include both the internal storage unit of the computer device and the external storage device. The memory is used to store the operating system, application programs, boot loaders, data, and other programs, etc. The other programs such as the program code of the computer program. The memory may also be used to temporarily store the data that has been output or will be output.
[0149] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present invention. The specific working processes of the units and modules in the above device can refer to the corresponding processes in the foregoing method embodiments and will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above method embodiments of the present invention, a computer program can be used to instruct the relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device capable of carrying the computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.
[0150] All or part of the processes in the above method embodiments of the present invention can also be completed by a computer program product. When the computer program product runs on a computer device, the computer device can be made to execute the steps in the above method embodiments.
[0151] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0152] In one embodiment, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the method for estimating the workpiece discharge time in the above embodiment is implemented. For exampleFigure 2 For S01 and S02 shown, to avoid repetition, they will not be elaborated here. Alternatively, when the computer program is executed by a processor, it realizes the functions of each module / unit in the above-described embodiment of the workpiece discharge time prediction device. For example Figure 3 the functions of the acquisition module, construction module, and prediction module shown. To avoid repetition, they will not be elaborated here.
[0153] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0154] All or part of the processes in the methods of the above embodiments of the present invention can also be completed by a computer program product. When the computer program product runs on a computer device, it causes the computer device to execute the steps that can be implemented in the above method embodiments.
[0155] In the above embodiments, the descriptions of the various embodiments have their own emphases. For parts not elaborated or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0156] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.
[0157] In the embodiments provided by the present invention, it should be understood that the disclosed device / computer equipment and method can be implemented in other ways. For example, the device / computer equipment embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.
[0158] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0159] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for estimating the discharge time of a workpiece, characterized in that, Including: Obtaining workpiece discharge characteristics and electrode discharge characteristics that are correlated with the discharge time of the workpiece to be processed; Based on the workpiece discharge characteristics and electrode discharge characteristics, and in combination with a workpiece discharge time prediction model used to characterize the relationship between the predicted discharge time and the workpiece discharge characteristics and electrode discharge characteristics, determining a predicted value of the discharge time of the workpiece to be processed.
2. The method for predicting the workpiece discharge time according to claim 1, wherein The steps for determining the workpiece discharge time prediction model include: Setting an initial workpiece discharge time prediction model used to characterize the relationship between the predicted discharge time and the workpiece discharge characteristics and electrode discharge characteristics, and setting weight coefficients in the initial workpiece discharge time prediction model used to characterize the influence degrees of the workpiece discharge characteristics and electrode discharge characteristics on the workpiece discharge time; Obtaining a workpiece discharge experimental feature data set during the historical workpiece processing, where the workpiece discharge experimental feature data set includes the same electrode material, workpiece material, and processing stage; setting an initial value of the weight coefficient for the weight coefficient; Substituting the workpiece discharge characteristics, electrode discharge characteristics, and the initial value of the weight coefficient in the workpiece discharge experimental feature data set into the initial workpiece discharge time prediction model to obtain a predicted value of the discharge time; Obtaining an actual value of the discharge time, and based on the actual value and the predicted value of the discharge time, obtaining a discharge time error function; Obtaining the gradients of the discharge time error function with respect to the weight coefficient and the tuning coefficient, and using the gradient descent method to iteratively update the weight coefficient to obtain an optimal weight coefficient when the value of the discharge time error function is minimized; Substituting the optimal weight coefficient into the initial workpiece discharge time prediction model to obtain the workpiece discharge time prediction model.
3. The method for predicting the workpiece discharge time according to claim 2, wherein The obtaining of the actual value of the discharge time includes: Inputting the workpiece discharge characteristics and electrode discharge characteristics in the workpiece discharge experimental feature data set into a pre-trained discharge time prediction neural network model, and outputting the actual value of the discharge time used to evaluate the prediction accuracy of the workpiece discharge time prediction model.
4. The method for predicting the workpiece discharge time according to claim 2 or 3, characterized in that The workpiece discharge characteristics include the volume of the workpiece to be processed, the surface area of the workpiece to be processed, and the volume of the workpiece removed by each discharge of the discharge electrode; the electrode discharge characteristics include the discharge depth of the discharge electrode, the gap between the discharge electrode and the workpiece to be processed, and the discharge area of the discharge electrode. Then, the relevant expression of the workpiece discharge time prediction model is: Wherein, T is the estimated discharge time, is the overall weight coefficient of the overall influencing factors reflecting the discharge characteristics of the workpiece and the electrode discharge characteristics, is the surface area of the machined workpiece, is the discharge area of the discharge electrode, is the discharge depth of the discharge electrode, is the gap between the discharge electrode and the machined workpiece, is the volume of the machined workpiece, is the volume of the machined workpiece removed by each discharge of the discharge electrode, is the weight coefficient corresponding to the surface area of the machined workpiece, is the weight coefficient corresponding to the discharge area of the discharge electrode, is the weight coefficient corresponding to the volume of the machined workpiece, is the weight coefficient corresponding to the volume of the machined workpiece removed by each discharge of the discharge electrode, is the weight coefficient corresponding to the discharge depth of the discharge electrode, is the weight coefficient corresponding to the gap between the discharge electrode and the machined workpiece.
5. The method for predicting the workpiece discharge time according to claim 2, characterized in that, The processing stage includes a rough machining stage, a semi-finishing machining stage, and a finishing machining stage. The prediction method further includes: Setting a corresponding rough machining ratio coefficient for the rough machining stage; Based on the product of the rough machining ratio coefficient and the predicted value of the discharge time output by the workpiece discharge time prediction model, obtaining a predicted adjustment value of the discharge time corresponding to the rough machining stage; Setting a corresponding semi-finishing machining ratio coefficient for the semi-finishing machining stage; Based on the product of the semi-finishing machining ratio coefficient and the predicted value of the discharge time output by the workpiece discharge time prediction model, obtaining a predicted adjustment value of the discharge time corresponding to the semi-finishing machining stage; Setting a corresponding finishing machining ratio coefficient for the finishing machining stage; Obtain the estimated adjustment value of the discharge time corresponding to the finish machining stage according to the product of the finish machining ratio coefficient and the predicted value of the discharge time output by the workpiece discharge time prediction model.
6. The method for predicting the workpiece discharge time according to claim 1, characterized in that The steps for obtaining the workpiece discharge characteristics and electrode discharge characteristics include: Obtain the workpiece discharge experimental data set during the historical workpiece machining process; the workpiece discharge experimental data set includes the parameters required for discharging during workpiece machining and the workpiece discharge time. Analyze the correlation between the parameters required for discharging during each workpiece machining and the workpiece discharge time to obtain the workpiece discharge time correlation coefficient. According to the workpiece discharge time correlation coefficient and a preset correlation threshold, obtain the workpiece discharge characteristics and electrode discharge characteristics that are correlated with the workpiece discharge time.
7. The method for predicting the workpiece discharge time according to claim 6, wherein The "according to the workpiece discharge time correlation coefficient and a preset correlation threshold" includes: Judge that when the absolute value of the workpiece discharge time correlation coefficient is greater than the preset correlation threshold, the parameters required for discharging during the current workpiece machining are correlated with the workpiece discharge time. When the absolute value of the workpiece discharge time correlation coefficient is not greater than the preset correlation threshold, the parameters required for discharging during the current workpiece machining are not correlated with the workpiece discharge time.
8. An apparatus for estimating the discharge time of a workpiece, characterized in that, It includes: An acquisition module for acquiring the workpiece discharge characteristics and electrode discharge characteristics that are correlated with the discharge time of the workpiece to be machined. A construction module for constructing a workpiece discharge time prediction model according to the workpiece discharge characteristics including the volume of the workpiece to be machined, the surface area of the workpiece to be machined, the volume of the workpiece removed by each discharge of the discharge electrode, and the electrode discharge characteristics including the discharge depth of the discharge electrode, the gap between the discharge electrode and the workpiece to be machined, and the discharge area of the discharge electrode. An estimation module for determining the predicted value of the discharge time of the workpiece to be machined according to the workpiece discharge characteristics and electrode discharge characteristics, in combination with the workpiece discharge time prediction model used to characterize the relationship between the estimated discharge time and the workpiece discharge characteristics and electrode discharge characteristics.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it realizes the method for estimating the workpiece discharge time according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it realizes the method for estimating the workpiece discharge time according to any one of claims 1 to 7.