A method for monitoring tool wear condition based on a power sensor
By deploying power sensors on machine tools to collect and process voltage and current signals, and optimizing the BP neural network using wavelet packet decomposition and the Grey Wolf Particle Swarm Optimization algorithm, the problems of accuracy and efficiency in tool wear condition identification in complex environments are solved, and efficient tool wear condition monitoring is achieved.
Patent Information
- Application Number
- CN202411818020.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-12-11
AI Technical Summary
Existing technologies struggle to accurately determine tool wear in complex machining environments, exhibiting low identification efficiency and weak anti-interference capabilities, requiring a large amount of data samples and human experience.
By deploying power sensors to collect machine tool spindle voltage and current data, performing power signal processing, extracting features using fast Fourier transform and wavelet packet decomposition, optimizing the BP neural network using the Grey Wolf Particle Swarm Optimization algorithm, establishing a tool wear state identification model, and using the Pearson correlation coefficient method to filter features, achieving dimensionality reduction and identification.
It improves the accuracy and efficiency of tool wear condition identification, enabling accurate identification of tool wear conditions in complex environments and reducing reliance on human experience.
Smart Images

Figure CN119457986B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of tool condition detection and sensor data acquisition technology in the mechanical field, and in particular relates to a tool wear condition monitoring method based on a power sensor. Background Technology
[0002] As one of the main processing methods in manufacturing, machining has a significant impact on improving manufacturing levels and efficiency. Tooling, as an indispensable part of machining, makes monitoring its condition, specifically tool wear, an essential step in the production process. Therefore, monitoring the cutting process in automated CNC machine tool production lines is increasingly crucial. However, given the complex and ever-changing actual machining environment, tool condition monitoring is often only possible indirectly through methods such as collecting sensor signals. Current methods for monitoring tool wear conditions suffer from the following main problems: First, their effectiveness in complex machining environments is low; manual monitoring requires extensive experience, placing high demands on workers. Second, they require a large data sample to ensure accuracy, resulting in low recognition efficiency and weak anti-interference capabilities. Summary of the Invention
[0003] To address the above technical problems, this invention provides a method for monitoring tool wear status based on a power sensor.
[0004] The technical solution adopted by this invention to solve its technical problem is:
[0005] A method for monitoring tool wear condition based on a power sensor, the method comprising the following steps:
[0006] S100: A power sensor is placed at the input end of the machine tool's frequency converter. The sensor collects sample data of the spindle voltage and current values in real time during the machining process and converts them into power signals. At the same time, it records the tool wear status corresponding to each sample data.
[0007] S200: Preprocess the power signal, calculate the time-domain and frequency-domain features of the preprocessed power signal, extract the energy features of the frequency band corresponding to tool wear through fast Fourier transform and wavelet packet decomposition, and form a feature sample set together. Encode the feature sample set and its corresponding tool state type to form a sample set.
[0008] S300: Using feature parameters as input and tool wear state as output, a tool wear state identification model based on BP neural network is established by combining sample set with gray wolf particle swarm algorithm to optimize BP neural network.
[0009] S400: The Pearson correlation coefficient method is used to select features with correlation coefficients greater than a preset threshold from the feature sample set, thereby reducing the dimensionality of the feature sample set. The selected feature parameters are used as input variables of the tool wear state identification model, and the tool wear state is used as the output variable. The mapping relationship between input and output is determined, and the tool wear state is judged based on the selected feature parameters.
[0010] Preferably, S100 includes:
[0011] S110: Pre-set the tool running trajectory and machining parameters, collect the spindle current and voltage signals at fixed intervals, observe the tool wear condition with a microscope, measure the tool wear amount, and calibrate the tool wear condition at this time;
[0012] S120: Repeat the experiment in this way to obtain sample data of current and voltage values of multiple spindles, convert them into power signals, and record the tool wear status corresponding to each sample data.
[0013] Preferably, the time-domain features in S200 include mean, root mean square, standard deviation, and peak-to-peak value; the frequency-domain features include frequency mean, frequency centroid, and frequency standard deviation. Specifically, S200 calculates the time-domain and frequency-domain features of the preprocessed power signal as follows:
[0014] The mean is as follows:
[0015]
[0016] The root mean square is specifically:
[0017]
[0018] The standard deviation is as follows:
[0019]
[0020] Where X(i) is the measured value of the power signal at time i, N is the total number of points of the power signal, and x is the average value of the power signal;
[0021] The peak-to-peak value is as follows:
[0022] PP = max(x(i)) - min(x(i))
[0023] Where max(x(i)) is the maximum value of the power signal data, and min(x(i)) is the minimum value of the power signal;
[0024] The frequency mean is as follows:
[0025]
[0026] The frequency centroid is specifically:
[0027]
[0028] The frequency standard deviation is as follows:
[0029]
[0030] Where k is the total number of spectral lines, f(k) is the frequency value of the k-th spectral line, and |X(k)| is the absolute value of the power spectral value corresponding to the k-th spectral line.
[0031] Preferably, in S200, the energy features of the corresponding frequency band of tool wear are extracted through Fast Fourier Transform and Wavelet Packet Decomposition, which together form a feature sample set, specifically:
[0032] S210: Performs a fast Fourier transform on the denoised power signal to convert the time-domain signal into a frequency-domain signal;
[0033] S220: Wavelet packet decomposition is performed on the denoised power signal using wavelet basis functions to decompose the signal into various frequency bands. The proportion of energy in each frequency band to the total energy is calculated, and the frequency bands with an energy proportion exceeding a preset threshold are selected as effective frequency bands. By analyzing the changing trends of energy in each effective frequency band under different tool wear conditions, the energy in the frequency bands that are highly correlated with the tool wear condition are selected as sample features.
[0034] Preferably, the specific steps of wavelet packet decomposition in S220 are as follows:
[0035] S221: The denoised power signal is decomposed into multiple layers using wavelet basis functions to construct a wavelet packet tree; each layer of decomposition includes high-frequency and low-frequency filtering of the denoised power signal, and then downsampling of the filtered signal.
[0036] S222: The noise-reduced power signal x(t) is passed through a low-pass filter h(t) and a high-pass filter g(t) to obtain approximate coefficients and detail coefficients, respectively. The approximate coefficients and detail coefficients are then subjected to low-pass and high-pass filtering to obtain the coefficients of the next layer. This process is repeated until the predetermined number of decomposition layers is reached.
[0037] S223: Calculate the sum of squares of the approximation coefficients and detail coefficients for each frequency band to obtain the energy value of each frequency band, calculate the proportion of energy of each frequency band to the total energy, and select the frequency bands whose energy proportion exceeds the preset threshold as effective frequency bands.
[0038] Preferably, the approximation coefficients in S222 are as follows:
[0039]
[0040] The detail factor is as follows:
[0041]
[0042] The approximation coefficients and detail coefficients of each layer are further decomposed:
[0043]
[0044] Among them, a j [n] are the approximation coefficients of the j-th layer, dj[n] are the detail coefficients of the j-th layer; h[k] are the low-pass filter coefficients, and g[k] are the high-pass filter coefficients; It is the coefficient of the nth node in the j-th layer.
[0045] Preferably, the formula for calculating the intermediate frequency band energy of S223 is as follows:
[0046]
[0047] The formula for calculating the energy percentage is:
[0048]
[0049] Among them, E(f) k f is the energy of the k-th frequency band. k1 and f k2 These are the start and end frequencies of the k-th frequency band, respectively, where K is the total number of frequency bands.
[0050] Preferably, S300 includes:
[0051] S310: Input the sample set and randomly initialize the weights and biases of the BP neural network, while also initializing the positions and velocities of the particle swarm and the gray wolf pack, and initializing the training parameters; among which, the training parameters include the population size, inertia coefficient, individual learning factor, social learning factor, and total number of iterations;
[0052] S320: Calculate the fitness value of each individual according to the fitness function and sort them from high to low. Select the top 3 individuals with the best fitness values and record their position vectors.
[0053] S330: Update the position and velocity of each particle using the Grey Wolf optimization algorithm;
[0054] S340: Calculate the fitness value of each individual after the update and compare it with the value of the previous iteration. Select the top 3 individuals with the best positions. The position vectors of these 3 optimal solution individuals represent the optimal weights and biases in the current iteration.
[0055] S350: Train the BP neural network using the current optimal weights and biases, calculate the training error, and continuously adjust the weights and biases until the termination condition is met, thus completing the optimization of the BP neural network.
[0056] Preferably, S330 specifically comprises:
[0057] The position update formula for each particle is:
[0058] X(t+1)=X(t)+V(t+1)
[0059] The speed update formula is:
[0060] V(t+1)=ωV(t)+c1r1[P b -X(t)]+w α c2r 2α [P α -X(t)]+
[0061] w β c2r 2β [P β -X(t)]+w δ c2r 2δ [P δ -X(t)]
[0062] Among them, c1r1[P b [-X(t)] represents the relationship between the increment of the current velocity and the best position in the particle's history; P α P β P δ Let c1 be the position vector of the individual in the optimal solution of Seg, ω be the individual learning factor, c2 be the inertia coefficient, and r1 and r2 be random numbers between [0, 1]. 2α r 2β r 2δ These are the social learning factors, r, corresponding to the three-headed wolf. 2α r 2β r 2δ A random number between [0, 1]; w α w β and w δ The weights for the three wolves are set to 0.45, 0.3, and 0.25 respectively.
[0063] Preferably, in S500, the Pearson correlation coefficient method is used to select features from the feature sample set whose correlation coefficient is greater than a preset threshold, including:
[0064] S510: Calculate the Pearson correlation coefficient between each feature in the sample feature set and the tool wear state using the Pearson correlation coefficient method. Specifically:
[0065]
[0066] The Pearson correlation coefficient r measures the linear correlation between two variables, and its value ranges from [-k, 1]. i and Y i These are the i-th sample values of the feature variable X and the tool wear state Y, respectively. and These are the means of X and Y, respectively;
[0067] S520: Select features whose absolute value is greater than a preset threshold and use them as input variables for the subsequent tool wear condition identification model.
[0068] The aforementioned tool wear condition monitoring method based on a power sensor first performs multi-domain analysis on the power signal, enabling more accurate capture and understanding of the signal's essence. Simultaneously, addressing the issues of BP neural networks being prone to local optima and sensitivity to initial weights, the Grey Wolf Particle Swarm Optimization algorithm is used to optimize the weights and biases of the BP neural network, improving network performance and prediction accuracy. Finally, a tool wear condition identification model based on a BP neural network is established to accurately identify tool wear conditions, effectively improving the identification efficiency and accuracy of tool wear conditions. Attached Figure Description
[0069] Figure 1 This is a flowchart of a tool wear condition monitoring method based on a power sensor according to an embodiment of the present invention;
[0070] Figure 2 This is a diagram of a BP neural network structure provided in one embodiment of the present invention;
[0071] Figure 3 This is a flowchart illustrating the optimization of a BP neural network using the gray wolf particle swarm algorithm provided in one embodiment of the present invention.
[0072] Figure 4 This is a Pearson correlation coefficient diagram of some characteristic parameters of the power signal after processing, provided in one embodiment of the present invention. Detailed Implementation
[0073] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0074] In one embodiment, such as Figure 1 As shown, a method for monitoring tool wear condition based on a power sensor includes the following steps:
[0075] S100: A power sensor is placed at the input end of the machine tool's frequency converter. The sensor collects sample data of the spindle voltage and current values in real time during the machining process and converts them into power signals. At the same time, it records the tool wear status corresponding to each sample data.
[0076] S200: Preprocess the power signal, calculate the time-domain features and frequency-domain features of the preprocessed power signal, extract the energy features of the corresponding frequency bands of tool wear through fast Fourier transform and wavelet packet decomposition, jointly form a feature sample set, encode the feature sample set and the corresponding tool state types to form a sample set; further, divide the sample set into a training set and a test set according to a preset ratio.
[0077] S300: With the feature parameters as the input and the tool wear state as the output, use the sample set to optimize the BP neural network by combining the grey wolf particle swarm algorithm, and establish a tool wear state identification model based on the BP neural network.
[0078] S400: Use the Pearson correlation coefficient method to screen out the features with a correlation coefficient greater than a preset threshold from the feature sample set, complete the dimensionality reduction of the feature sample set, and use the screened feature parameters as the input variables of the tool wear state identification model, and the tool wear state as the output variable, determine the mapping relationship between the input and output, and judge the tool wear state according to the screened feature parameters.
[0079] In one embodiment, S100 includes:
[0080] S110: Preset the tool running trajectory and machining parameters in advance, collect the current and voltage signals of the spindle every fixed time, and use a microscope to observe the tool wear state, measure the tool wear amount, and calibrate the tool wear state at this time.
[0081] S120: Repeat the experiment in this way to obtain the sample data of the current and voltage values of multiple spindles, convert them into power signals, and record the tool wear state corresponding to each sample data.
[0082] Specifically, the milling experiment conditions are shown in the following table:
[0083]
[0084] The experiment repeats the full-life cycle wear experiment under the above cutting conditions. Under the set cutting parameters, measure the tool wear amount on the premise of machining a fixed distance until the tool wears out. According to the flank wear amount VB of the tool, the tool wear state is divided into initial wear (VB≤0.12mm), normal wear (0.12mm<VB≤0.3mm), and severe wear (VB>0.3mm). And organize the tool state types obtained from the experiment and their corresponding power signals into samples.
[0085] In one embodiment, the preprocessing of the power signal in S200 includes:
[0086] Wavelet threshold denoising was used to denoise the power signal acquired in the experiment, thereby improving the signal-to-noise ratio.
[0087] In one embodiment, the time-domain features in S200 include mean, root mean square, standard deviation, and peak-to-peak value; the frequency-domain features include frequency mean, frequency centroid, and frequency standard deviation. Specifically, S200 calculates the time-domain and frequency-domain features of the preprocessed power signal as follows:
[0088] The mean is as follows:
[0089]
[0090] The root mean square is specifically:
[0091]
[0092] The standard deviation is as follows:
[0093]
[0094] Where X(i) is the measured value of the power signal at time i, N is the total number of points of the power signal, and x is the average value of the power signal;
[0095] The peak-to-peak value is as follows:
[0096] PP = max(x(i)) - min(x(i))
[0097] Where max(x(i)) is the maximum value of the power signal data, and min(x(i)) is the minimum value of the power signal;
[0098] The frequency mean is as follows:
[0099]
[0100] The frequency centroid is specifically:
[0101]
[0102] The frequency standard deviation is as follows:
[0103]
[0104] Where k is the total number of spectral lines, f(k) is the frequency value of the k-th spectral line, and |X(k)| is the absolute value of the power spectral value corresponding to the k-th spectral line.
[0105] Furthermore, the mean represents the average value of the signal, the root mean square represents the average energy of the signal, the standard deviation represents the fluctuation of the signal, the peak-to-peak value represents the range of signal variation, the frequency mean represents the average amplitude of different frequency components of the signal in the frequency domain, the frequency centroid represents the frequency corresponding to the peak value of the larger component in the spectrum, and the frequency standard deviation represents the degree of dispersion or concentration of the signal spectrum.
[0106] In one embodiment, in step S200, the energy features of the corresponding frequency band of tool wear are extracted through Fast Fourier Transform and Wavelet Packet Decomposition, which together form a feature sample set, specifically:
[0107] S210: Performs a fast Fourier transform on the denoised power signal to convert the time-domain signal into a frequency-domain signal;
[0108] S220: Wavelet packet decomposition is performed on the denoised power signal using wavelet basis functions to decompose the signal into various frequency bands. The proportion of energy in each frequency band to the total energy is calculated, and the frequency bands with an energy proportion exceeding a preset threshold (3%) are selected as effective frequency bands. By analyzing the changing trend of energy in each effective frequency band under different tool wear conditions, the energy of frequency bands that are highly correlated with the tool wear condition are selected as sample features.
[0109] The specific steps of wavelet packet decomposition in S220 are as follows:
[0110] S221: The denoised power signal is decomposed into multiple layers using wavelet basis functions to construct a wavelet packet tree; each layer of decomposition includes high-frequency and low-frequency filtering of the denoised power signal, and then downsampling of the filtered signal.
[0111] S222: The noise-reduced power signal x(t) is passed through a low-pass filter h(t) and a high-pass filter g(t) to obtain approximate coefficients and detail coefficients, respectively. The approximate coefficients and detail coefficients are then subjected to low-pass and high-pass filtering to obtain the coefficients of the next layer. This process is repeated until the predetermined number of decomposition layers is reached.
[0112] S223: Calculate the sum of squares of the approximation coefficients and detail coefficients for each frequency band to obtain the energy value of each frequency band, calculate the proportion of energy of each frequency band to the total energy, and select the frequency bands whose energy proportion exceeds the preset threshold as effective frequency bands.
[0113] In one embodiment, the approximation coefficients in S222 are specifically:
[0114]
[0115] The detail factor is as follows:
[0116]
[0117] The approximation coefficients and detail coefficients of each layer are further decomposed:
[0118]
[0119] Among them, a j [n] are the approximation coefficients of the j-th layer, dj[n] are the detail coefficients of the j-th layer; h[k] are the low-pass filter coefficients, and g[k] are the high-pass filter coefficients; It is the coefficient of the nth node in the j-th layer.
[0120] In one embodiment, the formula for calculating the intermediate frequency band energy in S223 is:
[0121]
[0122] The formula for calculating the energy percentage is:
[0123]
[0124] Among them, E(f) k X(f) is the energy of the k-th frequency band, and X(f) is the amplitude at frequency f. k1 and f k2 These are the start and end frequencies of the k-th frequency band, respectively, where K is the total number of frequency bands.
[0125] Specifically, based on the power signal data collected in this experiment, the db4 wavelet function was selected as the fundamental frequency, and the signal was decomposed into six levels to construct a wavelet packet tree. Each level of decomposition included high-frequency and low-frequency filtering of the signal, followed by downsampling of the filtered signal. The energy proportion of each frequency band was calculated, resulting in 20 effective frequency bands. The changing trends of energy in each effective frequency band under different tool wear conditions were analyzed, and the Pearson correlation coefficient method was used to select seven frequency bands highly correlated with tool wear conditions as sample features.
[0126] The features obtained from the time domain, frequency domain, and wavelet packet analysis are encoded with their corresponding tool state types to form a sample set. The tool state sample set is further divided into a training set and a test set. 48 groups are selected from the sample set as the training set and 37 groups as the test set.
[0127] Furthermore, the structure of a BP neural network is as follows: Figure 2 As shown, the training process of a BP neural network is as follows:
[0128] Initialize network weights and thresholds: Randomly initialize the weights and biases of the BP neural network; Input samples and expected output: Input training data (input samples and expected output) into the neural network; Calculate actual output and calculate error: Calculate the actual output of the neural network through forward propagation and calculate the output error; Adjust weights and thresholds through error backpropagation: Adjust the weights and biases of the network using the error backpropagation algorithm; Meet accuracy requirements or reach the maximum number of iterations: Check whether the preset accuracy requirements are met or the maximum number of iterations is reached; End: If the conditions are met, end the training process.
[0129] Then, combine the gray wolf particle swarm optimization algorithm to optimize the BP neural network, such as Figure 3 As shown, in one embodiment, S300 includes:
[0130] S310: Input the training data in the input sample set and randomly initialize the weights and biases of the BP neural network. At the same time, initialize the position and velocity of the particle swarm and the gray wolf pack, and initialize the training parameters. Among them, the training parameters include the population size, inertia coefficient, individual learning factor, social learning factor, and total number of iterations.
[0131] S320: Calculate the fitness value of each individual according to the fitness function and sort them from high to low. Select the top 3 individuals with the best fitness values and record their position vectors.
[0132] S330: Update the position and velocity of each particle using the Grey Wolf optimization algorithm;
[0133] S340: Calculate the fitness value of each individual after the update and compare it with the value of the previous iteration. Select the top 3 individuals with the best positions. The position vectors of these 3 optimal solution individuals represent the optimal weights and biases in the current iteration.
[0134] S350: Train the BP neural network using the current optimal weights and biases, calculate the training error, and continuously adjust the weights and biases until the termination condition is met, thus completing the optimization of the BP neural network. Further, the termination condition is reaching the maximum number of iterations or meeting the error requirements.
[0135] In one embodiment, S330 specifically refers to:
[0136] The position update formula for each particle is:
[0137] X(t+1)=X(t)+V(t+1)
[0138] The speed update formula is:
[0139] V(t+1)=ωV(t)+c1r1[P b -X(t)]+w α c2r2α [P α -X(t)]+
[0140] w β c2r 2β [P β -X(t)]+w δ c2r 2δ [P δ -X(t)]
[0141] Among them, c1r1[P b [-X(t)] represents the relationship between the increment of the current velocity and the best position in the particle's history; P α P β P δ Let c1 be the position vector of the individual in the optimal solution of Seg, ω be the inertia coefficient, c2 be the social learning factor, and r1 and r2 be random numbers between [0,1]. 2α r 2β r 2δ These are the social learning factors, r, corresponding to the three-headed wolf. 2α r 2β r 2δ A random number between [0,1]; w α w β and w δ The weights for the three wolves are set to 0.45, 0.3, and 0.25 respectively.
[0142] Finally, the Pearson correlation coefficient method was used to screen out highly correlated features, thus completing the dimensionality reduction of the high-dimensional features, such as... Figure 4 Using feature parameters highly correlated with tool wear state as input to a BP network and tool wear state category as output, a tool state recognition model based on a power sensor is trained, and the model is used for tool state recognition.
[0143] Specifically, by inputting 37 sets of test data into the trained tool condition recognition model, a tool condition recognition accuracy of 95% was achieved. This model can effectively identify the wear state of tools, providing reliable support for actual machining processes.
[0144] In one embodiment, the Pearson correlation coefficient method is used in S500 to select features from the feature sample set whose correlation coefficient is greater than a preset threshold, including:
[0145] S510: Calculate the Pearson correlation coefficient between each feature in the sample feature set and the tool wear state using the Pearson correlation coefficient method. Specifically:
[0146]
[0147] Among them, the Pearson correlation coefficient r is used to measure the linear correlation between two variables, and its value ranges from [-1, 1]. i and Y i These are the i-th sample values of the feature variable X and the tool wear state Y, respectively. and These are the means of X and Y, respectively;
[0148] S520: Select features whose absolute value is greater than a preset threshold and use them as input variables for the subsequent tool wear condition identification model.
[0149] Specifically, a correlation threshold is set according to actual needs (the threshold is set to 0.7), that is, a correlation coefficient with an absolute value greater than 0.7 indicates a strong correlation.
[0150] In one embodiment, a tool wear condition monitoring system based on a power sensor includes a sample data acquisition module, a sample set construction module, a tool wear condition identification model establishment module based on a BP neural network, and a tool wear condition judgment module.
[0151] The sample data acquisition module is used to place power sensors at the input end of the machine tool's frequency converter. The sensors collect sample data of the spindle voltage and current values in real time during the machining process and convert them into power signals. At the same time, the module records the tool wear status corresponding to each sample data.
[0152] The sample set construction module is used to preprocess the power signal, calculate the time domain and frequency domain features of the preprocessed power signal, extract the energy features of the frequency band corresponding to tool wear through fast Fourier transform and wavelet packet decomposition, and form a feature sample set. The feature sample set and its corresponding tool state type are encoded to form a sample set, and divided into training set and test set according to a preset ratio.
[0153] The tool wear state identification model based on BP neural network is used to establish a tool wear state identification model based on BP neural network by taking feature parameters as input, tool wear state as output, using training set and test set, and combining gray wolf particle swarm algorithm to optimize BP neural network.
[0154] The tool wear condition judgment module uses the Pearson correlation coefficient method to filter features with correlation coefficients greater than a preset threshold from the feature sample set, completes the dimensionality reduction of the feature sample set, and uses the filtered feature parameters as input variables of the tool wear condition identification model, and the tool wear condition as output variable, determines the mapping relationship between input and output, and judges the tool wear condition based on the filtered feature parameters.
[0155] For specific limitations regarding a tool wear condition monitoring system based on a power sensor, please refer to the limitations of a tool wear condition monitoring method based on a power sensor mentioned above, which will not be repeated here. Each module in the aforementioned tool wear condition monitoring system based on a power sensor can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0156] Taking the milling process as an example, this invention uses a power sensor to collect power signals during cutting; it employs time-domain analysis, frequency-domain analysis, and wavelet packet analysis to extract signal features and frequency band energy of the tool cutting state as sample features to form a sample set; and it uses the gray wolf particle swarm optimization algorithm to optimize the BP neural network and then construct a tool state recognition model to achieve the purpose of automatically identifying the tool wear state.
[0157] The above provides a detailed description of a tool wear condition monitoring method based on a power sensor provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the core ideas of the invention. It should be noted that those skilled in the art can make various improvements and modifications to the invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for monitoring tool wear condition based on a power sensor, characterized in that, The method includes the following steps: S100: A power sensor is placed at the input end of the machine tool's frequency converter. The sensor collects sample data of the spindle voltage and current values in real time during the machining process and converts them into power signals. At the same time, it records the tool wear status corresponding to each sample data. S200: Preprocesses the power signal, calculates its time-domain and frequency-domain features, and extracts the energy features corresponding to tool wear in the frequency band using Fast Fourier Transform and wavelet packet decomposition, forming a feature sample set. The feature sample set and its corresponding tool state type are then encoded to form a sample set. Specifically, in S200, the energy features corresponding to tool wear in the frequency band are extracted using Fast Fourier Transform and wavelet packet decomposition, forming the feature sample set. S210: Performs a fast Fourier transform on the denoised power signal to convert the time-domain signal into a frequency-domain signal; S220: Wavelet packet decomposition is performed on the denoised power signal using wavelet basis functions to decompose the signal into various frequency bands. The proportion of energy in each frequency band to the total energy is calculated, and the frequency bands with an energy proportion exceeding a preset threshold are selected as effective frequency bands. By analyzing the changing trends of energy in each effective frequency band under different tool wear conditions, the energy of frequency bands that are highly correlated with the tool wear condition are selected as sample features. The specific steps of wavelet packet decomposition in S220 are as follows: S221: The denoised power signal is decomposed into multiple layers using wavelet basis functions to construct a wavelet packet tree; each layer of decomposition includes high-frequency and low-frequency filtering of the denoised power signal, and then downsampling of the filtered signal. S222: The noise-reduced power signal x(t) is passed through a low-pass filter h(t) and a high-pass filter g(t) to obtain approximate coefficients and detail coefficients, respectively. The approximate coefficients and detail coefficients are then subjected to low-pass and high-pass filtering to obtain the coefficients of the next layer. This process is repeated until the predetermined number of decomposition layers is reached. S223: Calculate the sum of squares of the approximation coefficients and detail coefficients for each frequency band to obtain the energy value of each frequency band, calculate the proportion of energy of each frequency band to the total energy, and select the frequency bands whose energy proportion exceeds the preset threshold as effective frequency bands; The approximation coefficients in S222 are as follows: The detail factor is as follows: The approximation coefficients and detail coefficients of each layer are further decomposed: Among them, a j [n] are the approximation coefficients of the j-th layer, dj[n] are the detail coefficients of the j-th layer; h[k] are the low-pass filter coefficients, and g[k] are the high-pass filter coefficients; It is the coefficient of the nth node in the j-th layer; S300: Using feature parameters as input and tool wear state as output, a tool wear state identification model based on BP neural network is established by combining sample set with gray wolf particle swarm algorithm to optimize BP neural network. S400: The Pearson correlation coefficient method is used to select features with correlation coefficients greater than a preset threshold from the feature sample set, thereby reducing the dimensionality of the feature sample set. The selected feature parameters are used as input variables of the tool wear state identification model, and the tool wear state is used as the output variable. The mapping relationship between input and output is determined, and the tool wear state is judged based on the selected feature parameters.
2. The method according to claim 1, characterized in that, S100 includes: S110: Pre-set the tool running trajectory and machining parameters, collect the spindle current and voltage signals at fixed intervals, observe the tool wear condition with a microscope, measure the tool wear amount, and calibrate the tool wear condition at this time; S120: Repeat the experiment in this way to obtain sample data of current and voltage values of multiple spindles, convert them into power signals, and record the tool wear status corresponding to each sample data.
3. The method according to claim 2, characterized in that, In S200, time-domain features include mean, root mean square, standard deviation, and peak-to-peak value; frequency-domain features include frequency mean, frequency centroid, and frequency standard deviation. Specifically, S200 calculates the time-domain and frequency-domain features of the preprocessed power signal as follows: The mean is as follows: The root mean square is specifically: The standard deviation is as follows: Where X(i) is the measured value of the power signal at time i, N is the total number of points of the power signal, and x is the average value of the power signal; The peak-to-peak value is as follows: PP = max(x(i)) - min(x(i)) Where max(x(i)) is the maximum value of the power signal data, and min(x(i)) is the minimum value of the power signal; The frequency mean is as follows: The frequency centroid is specifically: The frequency standard deviation is as follows: Where k is the total number of spectral lines, f(k) is the frequency value of the k-th spectral line, and |X(k)| is the absolute value of the power spectral value corresponding to the k-th spectral line.
4. The method according to claim 3, characterized in that, The formula for calculating the intermediate frequency band energy of S223 is: The formula for calculating the energy percentage is: Among them, E(f) k f is the energy of the k-th frequency band. k1 and f k2 These are the start and end frequencies of the k-th frequency band, respectively, where K is the total number of frequency bands.
5. The method according to claim 4, characterized in that, The S300 includes: S310: Input the sample set and randomly initialize the weights and biases of the BP neural network, while also initializing the positions and velocities of the particle swarm and the gray wolf pack, and initializing the training parameters; among which, the training parameters include the population size, inertia coefficient, individual learning factor, social learning factor, and total number of iterations; S320: Calculate the fitness value of each individual according to the fitness function and sort them from high to low. Select the top 3 individuals with the best fitness values and record their position vectors. S330: Update the position and velocity of each particle using the Grey Wolf optimization algorithm; S340: Calculate the fitness value of each individual after the update and compare it with the value of the previous iteration. Select the top 3 individuals with the best positions. The position vectors of these 3 optimal solution individuals represent the optimal weights and biases in the current iteration. S350: Train the BP neural network using the current optimal weights and biases, calculate the training error, and continuously adjust the weights and biases until the termination condition is met, thus completing the optimization of the BP neural network.
6. The method according to claim 5, characterized in that, The S330 is specifically: The position update formula for each particle is: X(t+1)=X(t)+V(t+1) The speed update formula is: V(t+1)=ωV(t)+c1r1[P b -X(t)]+w α c2r 2α [P α -X(t)]+w β c2r 2β [P β -X(t)]+w δ c2r 2δ [P δ -X(t)] Among them, c1r1[P b [-X(t)] represents the relationship between the increment of the current velocity and the best position in the particle's history; P α P β P δ Let c1 be the position vector of the individual in the optimal solution of Seg, ω be the inertia coefficient, c2 be the social learning factor, and r1 and r2 be random numbers between [0,1]. 2α r 2β r 2δ These are the social learning factors, r, corresponding to the three-headed wolf. 2α r 2β r 2δ A random number between [0,1]; w α w β and w δ The weights for the three wolves are set to 0.45, 0.3, and 0.25 respectively.
7. The method according to claim 6, characterized in that, In S400, the Pearson correlation coefficient method is used to select features from the feature sample set whose correlation coefficients are greater than a preset threshold. These features include: S410: Calculate the Pearson correlation coefficient between each feature in the sample feature set and the tool wear state using the Pearson correlation coefficient method. Specifically: Among them, the Pearson correlation coefficient r is used to measure the linear correlation between two variables, and its value ranges from [-1, 1]. i and Y i These are the i-th sample values of the feature variable X and the tool wear state Y, respectively. and These are the means of X and Y, respectively; S420: Select features whose absolute value is greater than a preset threshold and use them as input variables for the subsequent tool wear condition identification model.
Citation Information
Patent Citations
Numerical control machine tool wear monitoring method
CN102091972A
Cutter wear condition monitoring method based on machine learning
CN109571141A