A fast amplitude prediction method based on electrical signals
Through the fast amplitude prediction method based on electrical signals, the convolutional neural network and adaptive optimizer are used to solve the problem of insufficient amplitude control of ultrasonic vibration equipment, and the rapid and accurate control of ultrasonic amplitude is achieved, which significantly improves ultrasonic processing Product quality.
Patent Information
- Application Number
- CN202011171426.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-28
- Publication Date
- 2024-11-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The amplitude control of existing ultrasonic vibration equipment has problems such as slow perceived speed, low accuracy, and difficulty in adjusting at all times, resulting in insufficient control timeliness and affecting the quality of processed products.
Using a fast amplitude prediction method based on electrical signals, the rapid prediction and control of ultrasonic amplitude changes through electrical signal acquisition, fitting, parameter classification, convolutional neural network learning and prediction are achieved, and the neural network construction and optimizer adaptive adjustment are used. Learning rate, reduce errors, and improve prediction accuracy.
It realizes rapid and accurate control of ultrasonic amplitude, improves control timeliness, significantly improves the quality of ultrasonic processing products, and improves the accuracy and speed of amplitude control.
Smart Images

Figure QLYQS_1 
Figure QLYQS_2 
Figure QLYQS_3
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of amplitude control of ultrasonic vibration equipment and relates to a fast amplitude prediction algorithm based on electrical signals. Background Art
[0002] The amplitude of the ultrasonic vibration equipment has a significant impact on the performance of ultrasonic machining. If the control adjustment is performed after obtaining the relevant real-time parameters of the amplitude, there will be shortcomings such as delayed control effect and insufficient control timeliness. Therefore, if it is possible to predict the change of ultrasonic amplitude and change the electrical signal in advance accordingly, the amplitude control can be achieved quickly and accurately. This is of great significance for improving the timeliness of ultrasonic amplitude control and improving the quality of ultrasonic machining products.
[0003] The Chinese invention patent with publication number CN110188876A discloses a soft measurement prediction method for the amplitude of ultrasonic vibration equipment based on BP neural network. The method has the following steps: Step 1: Measure various parameters of the ultrasonic vibration equipment through a measuring device, and the measured data include voltage, current, frequency, and amplitude; Step 2: Normalize the measured data. Normalization is to convert the value of the measured data into the interval [0, 1]. The normalization function used is: x is the input data, max is the maximum value in the input data, and min is the minimum value in the input data; Step 3: Establish a BP neural network model, which includes an input layer, a hidden layer, and an output layer; Step 4: Training of the BP neural network According to the design principles and experiments of the BP neural network, the activation function of the hidden layer neurons in the training is a hyperbolic tangent S-shaped function: the hyperbolic tangent S-shaped function realizes the spatial segmentation of different samples; Step 5: According to the trained neural network, the voltage, current, and frequency measured from the ultrasonic vibration equipment are input into the input layer of the neural network. After being processed by the neural network, the amplitude output of the ultrasonic vibration equipment can be obtained. The neural network is applied to the amplitude prediction of ultrasonic vibration equipment, and the amplitude of ultrasonic vibration equipment is predicted using the established neural network.
[0004] The existing technology first obtains the sampling points of one or more cycles of the input electrical signal through an amplitude measuring instrument, then calculates the corresponding amplitude and period information, and then transmits the information to the amplitude control system to realize amplitude control. It has the disadvantages of slow perception speed, low accuracy, and difficulty in timely amplitude control. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention provides a rapid amplitude prediction method based on electrical signals with fast perception speed and high accuracy. DETAILED DESCRIPTION
[0006] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0007] The first embodiment of the present invention provides a fast amplitude prediction method based on an electrical signal, comprising:
[0008] S100. Use an electrical signal acquisition device to continuously acquire electrical signals from an ultrasonic vibration generating device within multiple sampling cycles, and obtain a sampling database of sample points (t, Y) of the recorded time electrical signals established with a step distance △t. The electrical signal is a current value or a voltage value. The step distance △t is the minimum time difference for the electrical signal acquisition device to acquire the electrical signal, and t represents time. The unit of the current value is ampere, the unit of the voltage value is voltage, and the unit of the minimum time difference is S.
[0009] S200, obtaining a sampling database, dividing the sample points collected in each sampling period into a segment of sample points, the number of sample points in each segment is d, fitting each segment of sample points based on the function Y(t)=asin(bt+c), and obtaining a parameter matrix A=[abc] corresponding to each segment of sample points after fitting the function Y(t), where a, b, and c are parameters of the amplitude, period, and phase of the input electrical signal function curve, respectively;
[0010] If we want to fit the function Y(t) using the sample points of each segment, such as (t 1,Y 1), (t 2,Y 2), ..., (td,Y d), we need to make:
[0011]
[0012] To minimize S, it should satisfy: Right now:
[0013]
[0014] Because a cannot be zero, we need to solve the following nonlinear equations:
[0015]
[0016] Thus, multiple parameter matrices A=[abc] corresponding to the fitting of the function Y(t) to each segment of sample points can be obtained.
[0017] S300, classifying the parameter matrices A=[abc] with similar periods, phases and amplitudes among the multiple parameter matrices A=[abc] as parameters of the same category, taking the mean of the parameters of the same category to obtain the mean parameters of each category, and using the mean parameters to construct a category parameter matrix C;
[0018] The parameter matrix is divided into multiple categories l according to the different parameter sizes, so that the prediction function Y(t)=asin(bt+c) function is closer to the actual electrical signal change, and the prediction result is accurate. The average processing of parameters of the same category reduces the error impact to a certain extent.
[0019] The parameter matrix A = [abc] of the same category l should satisfy that the sum of the differences between the parameters of each sampling point and its mean is less than the deviation value ε. For example, when i parameter matrices A1 = [a1 b1 c1], A2 = [a2 b2 c2], A3 = [a3 b3 c3], A i =[a i b i c i ]Meet the following conditions
[0020] (where ε∈[0,0.05], the specific value can be determined according to the control accuracy requirements):
[0021]
[0022] The two parameter matrices A = [abc] can be considered to belong to the same category, otherwise they belong to different categories. Based on this, all sample points are divided into l categories (the common ultrasonic equipment electrical signal curve categories are about 10-20 categories), and m segments of sample points are extracted from each category of sample points and stored in the category database.
[0023] The parameters of the same category are averaged, and the component category parameter matrix C is obtained; the parameter mean matrix obtained by fitting the m-segment sample points in each category is obtained by using the data in the category database:
[0024]
[0025] In the formula, A j The mean matrix of the fitting parameters representing the j-th type of samples is also the mean parameter;
[0026] After that, construct an l×1 category parameter matrix C:
[0027]
[0028] S400, calling the parameters in the category parameter matrix C, taking the step distance to gradually calculate the third-order derivative value corresponding to each sample point in each segment of the known category, the slope k value, the second-order derivative k', the third-order derivative k", and finally obtaining m·l (d-4)×3 third-order derivative sample matrices, the slope value at the time point t3 representing the first segment of sample points in the matrix:
[0029] B=[1,1,1,1,...,2,2,2,2,2,2,...,l,l,l,l]:
[0030]
[0031] For example, if we first select five adjacent points, such as (t1, Y1), (t2, Y2), (t3, Y3), (t4, Y4), (t5, Y5), we can use formula (6) to calculate the slope value corresponding to point t3: Second Derivative Third-order derivative
[0032]
[0033] The step distance is taken to gradually and progressively solve the derivative values of each point, and finally m·l (d-4)×3 sample matrices can be obtained.
[0034] S500, each row in the third-level derivative sample matrix is regarded as the coordinates of a three-dimensional point, each third-level derivative sample matrix is regarded as a three-dimensional point cloud, and a neural network is built to learn the third-level derivative sample matrix.
[0035] S501, parameter setting, the activation function of the convolution layer in the convolutional neural network adopts the PReLU function:
[0036]
[0037] The parameter ai takes a value of 0.1, and the activation function of the fully connected layer uses the ReLU function:
[0038]
[0039] Avoid the phenomenon that parameters are not updated when the input value is less than 0;
[0040] The Adam optimizer is used to implement adaptive adjustment of the learning rate using its own adaptive optimization algorithm, and the dropout function is used; neurons are temporarily discarded from the network with a probability of 0.7, the probability is set to 0.7, the mini-batch training method is used, and the batch_size is selected as 32;
[0041] Compared with the Sigmoid function, the PReLU function and the ReLU function are more in line with the sparse activation of biological neurons, which can reduce the gradient vanishing phenomenon in the process of training the network, and have the advantage of fast convergence speed. The Adam optimizer can converge quickly and accurately. The learning rate in the early stage of training is relatively large, and the model runs faster. In the later stage of training, the learning rate begins to gradually decrease and stably falls into the local optimal solution, thereby ensuring the accuracy while accelerating the convergence rate. Dropout function; neurons are temporarily discarded from the network with a probability of 0.7. Setting this probability to 0.7 can prevent overly complex models, that is, models with too many neurons will cause overfitting. The dropout function is to temporarily discard neurons from the network with a certain probability when the neural network back-propagates the error to update the weights. Using the mini-batch training method and selecting batch_size as 32 can reduce the calculation time and improve the training efficiency.
[0042] S502, construct a two-layer multilayer perceptron, perform preliminary feature three-level derivative numerical extraction on the sample data, take the three-level derivative sample matrix as input, and output a convolved (d-4)×64 first MLP sample matrix:
[0043] Table 1: Parameters of each layer in the first MLP
[0044]
[0045] S503, obtain the third-order derivative value of the third-order derivative sample feature, and then construct a three-layer MLP, input the first MLP sample matrix obtained in the previous step, and output a (d-4)×1024 second MLP sample matrix:
[0046] Table 2: Parameters of each layer in the second MLP
[0047]
[0048] At this time, each third-order derivative value is converted from 3-dimensional to 1024-dimensional representation, and the point cloud described by (d-4) points needs to be fused to obtain the global feature.
[0049] S504, adding a two-dimensional pooling layer, using the maximum pooling method to merge the second MLP sample matrix into a 1×1024 global feature matrix, using the obtained global feature matrix to perform learning classification, constructing a 3-layer MLP, performing dimensionality reduction processing on the global feature matrix, and outputting a 1×1 prediction classification matrix;
[0050] The first two MLP layers use convolutional layers to expand and extract image features. After obtaining enough features, the third MLP is constructed. Each layer uses a fully connected layer to compress and summarize the features obtained by the first two MLPs.
[0051] Table 3: Parameters of each layer in the third MLP
[0052]
[0053]
[0054] S505, use the softmax classifier to output the classification probability and complete the neural network construction;
[0055] The following is the functional expression of the softmax classifier:
[0056]
[0057] In the formula, i is the index of the category, l is the total number of categories, V i is the corresponding value in the prediction classification matrix obtained above. i It is the ratio of the index of a single category output to the sum of the index of all category outputs.
[0058] S506: After the neural network is built, 60% of the three-level derivative data of the historical samples obtained previously are randomly selected as the training set (60% of the sample set in each category is randomly selected), and the remaining 40% is used as the test set. The training set is imported into the built neural network for training
[0059] Preferably, S507, using the test set to test the trained model;
[0060] Observe its classification accuracy.
[0061] S600, using the newly acquired sample points within a sampling period, calculate the test sample third-order derivative matrix required by the neural network through formula (4), substitute it into the trained neural network, calculate the probability of each category to which it belongs, and select the category with the highest probability and a probability greater than 0.7 as the prediction category;
[0062] If the classification probability of a certain sampling data is lower than 0.3, observe whether it belongs to an existing category. If so, call the mean parameters a, b, c corresponding to the predicted category in the category parameter matrix C to establish a predicted electrical signal curve function; if not, add it as a new category to the sampling database. In order to reduce the number of neural network training times, when the number of new categories increases by 10, repeat steps S100-S500 to retrain the neural network and update the neural network.
[0063] S700. If the output value of the neural network is a prediction category that meets the conditions, the mean parameters a, b, c corresponding to the prediction category in the category parameter matrix C are called to establish the prediction electric signal curve function Y(t)=asin(bt+c). If the electric signal sampler does not collect enough points for a sampling cycle, or the output value of the neural network is judged to be a new category, the ultrasonic electric signal information acquisition device is used to collect electric signals at three adjacent moments, that is, points (t1, Y1), (t2, Y2), (t3, Y3) are obtained, and the slope k and the second-order derivative k' at the time point t2 are calculated using the following formula:
[0064]
[0065] After that, the following set of equations can be established, where Y 2' and Y 2" represent the corresponding slope value and second-order derivative value at time point t 2, respectively:
[0066]
[0067] Solve the above equations to determine the parameters a, b, c and establish the predicted electrical signal curve function Y(t)=a sin(bt+c).
[0068] S800, using the predicted electric signal curve function Y(t)=asin(bt+c) to predict that the electric signal will be at the time:
[0069]
[0070] The maximum value of the input electrical signal can be reached.
[0071] Since the amplitude change trend of the commonly used ultrasonic machining device is consistent with the change trend of the electrical signal in the resonant state, that is, the relationship between them can be described as a linear relationship. Let the data points collected by the amplitude monitoring device be: (t1, Z1), (t2, Z2), (t3, Z3)... and the signal points collected by the electrical signal acquisition device be: (t1, Y1), (t2, Y2), (t3, Y3)..., then:
[0072] Z=eY+f (14)
[0073] The parameters e and f in the formula can be obtained by fitting the amplitude sampling points and the electrical signal sampling points based on formula (14). Based on this, it can be predicted that the ultrasonic amplitude also reaches the maximum value at the time calculated by formula (13), thereby realizing rapid amplitude prediction.
[0074] As a preferred S900, the maximum value of the electrical signal is transmitted to the amplitude controller, and the phase of the input electrical signal is adjusted according to the processing requirements, so as to accelerate or delay the arrival of the maximum ultrasonic amplitude, adjust the size of the input electrical signal, and then adjust the value of the maximum amplitude to achieve amplitude control.
[0075] As a preferred S901, an ultrasonic amplitude detection device is placed at the location where the ultrasonic amplitude is generated, and ultrasonic amplitude data is collected in real time. The collection frequency is adjusted to be consistent with the electrical signal collection frequency, and it is verified whether the prediction result is correct.
[0076] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A fast amplitude prediction method based on electrical signals, characterized in that: include S100, using an electric signal acquisition device to continuously acquire electric signals from an ultrasonic vibration generating device within multiple sampling periods, and obtaining a sampling database of sample points (t, Y) of the electric signals recorded at a step distance △t, where the electric signals are current values or voltage values, where the units of the current values are amperes, and the units of the voltage values are volts; the minimum time difference for the electric signal acquisition device to acquire electric signals at a step distance △t, where t represents time, and the unit is s; S200, obtaining a sampling database, dividing the sample points collected in each sampling period into a section of sample points, fitting each section of sample points based on the function Y(t)=asin(bt+c), and obtaining a parameter matrix A=[abc] corresponding to each section of sample points after fitting the function Y(t), where a, b, and c are parameters of the amplitude, period, and phase of the input electrical signal function curve, respectively; S300, classifying the parameter matrices A=[abc] with similar periods, phases and amplitudes among the multiple parameter matrices A=[abc] as parameters of the same category, taking the mean of the parameters of the same category to obtain the mean parameters of each category, and using the mean parameters to construct a category parameter matrix C; S400, calling the parameters in the category parameter matrix C, taking the step distance to gradually calculate the third-order derivative value, slope k value, second-order derivative k', third-order derivative k' corresponding to each sample point in each segment of the known category, and establishing the third-order derivative sample matrix B: S500, considering each row in the third-level derivative sample matrix as the coordinates of a three-dimensional point, considering each third-level derivative sample matrix as a three-dimensional point cloud, and building a neural network to learn the third-level derivative sample matrix; S600, using the newly acquired sample points within a sampling period, calculate the three-level derivative matrix of the test sample required by the neural network, substitute it into the trained neural network, calculate the probability of each category to which it belongs, select the category with the highest probability and the probability exceeding the set probability as the prediction category, and if the probability of each category is higher than the set probability, mark it as a new category; S700. If the output value of the neural network is a prediction category that meets the conditions, the mean parameters a, b, c corresponding to the prediction category in the category parameter matrix C are called to establish the prediction electric signal curve function Y(t)=asin(bt+c). If the electric signal sampler does not collect enough points for a sampling cycle, or the output value of the neural network is judged to be a new category, the ultrasonic electric signal information acquisition device is used to collect electric signals at three adjacent moments, that is, points (t1, Y1), (t2, Y2), (t3, Y3) are obtained, and the slope k and the second-order derivative k' at the time point t2 are calculated using the following formula: After that, the following set of equations can be established, where Y'2 and Y"2 represent the corresponding slope value and second-order derivative value at time point t2, respectively: Solve the above equations to determine the parameters a, b, c to establish the predicted electrical signal curve function Y(t)=asin(bt+c); S800, using the predicted electric signal curve function Y(t)=asin(bt+c) to predict that the electric signal will be at the time: The maximum value of the input electrical signal can be reached.
2. The rapid amplitude prediction method based on electrical signals according to claim 1, characterized in that: After step S800, the following steps are further included: S900, transmit the maximum value of the electrical signal to the amplitude controller; the amplitude controller can adjust the phase of the input electrical signal according to the processing requirements, thereby accelerating or delaying the arrival of the maximum ultrasonic amplitude, adjusting the size of the input electrical signal, and then adjusting the value of the maximum amplitude to achieve amplitude control.
3. The rapid amplitude prediction method based on electrical signals according to claim 1, characterized in that: The fast amplitude prediction algorithm also includes placing an ultrasonic amplitude detection device at the location where the ultrasonic amplitude is generated, collecting ultrasonic amplitude data in real time, adjusting the collection frequency to be consistent with the electrical signal collection frequency, and verifying whether the prediction result is correct.
4. The rapid amplitude prediction method based on electrical signals according to claim 1, characterized in that: S501, parameter setting; S502, construct a two-layer multilayer perceptron, perform preliminary feature three-level derivative numerical extraction on the sample data, take the three-level derivative sample matrix as input, and output a convolved (d-4)×64 first MLP sample matrix: S503, obtain the third-order derivative value of the third-order derivative sample feature, and then construct a three-layer MLP, input the first MLP sample matrix obtained in the previous step, and output a (d-4)×1024 second MLP sample matrix: S504, adding a two-dimensional pooling layer, using the maximum pooling method to merge the second MLP sample matrix into a 1×1024 global feature matrix, using the obtained global feature matrix to perform learning classification, constructing a 3-layer MLP, performing dimensionality reduction processing on the global feature matrix, and outputting a 1×1 prediction classification matrix; S505, use the softmax classifier to output the classification probability and complete the neural network construction; The following is the functional expression of the softmax classifier: In the formula, i is the index of the category, l is the total number of categories, V i is the corresponding value in the prediction classification matrix obtained above, S i It is the ratio of the index of a single category output to the sum of the index of all category outputs.
5. The method for rapid amplitude prediction based on electrical signals according to claim 4, characterized in that: After step S505, the following steps are further included: S506, after the neural network is built, 60% of the third-order derivative data of the historical samples obtained previously are randomly selected as a training set, and the remaining 40% are used as a test set, and the training set is imported into the built neural network for training; S507: Use the test set to test the trained model.
6. The method for rapid amplitude prediction based on electrical signals according to claim 4, characterized in that: The step 501 includes: the activation function of the convolutional layer in the convolutional neural network adopts the PReLU function: The parameter ai is set to 0.1, and the activation function of the fully connected layer uses the ReLU function: The Adam optimizer is used with its own adaptive optimization algorithm to achieve adaptive adjustment of the learning rate, and the dropout function is used; neurons are temporarily discarded from the network with a probability of 0.7, the probability is set to 0.7, the mini-batch training method is used, and the batch_size is selected as 32.
