Intelligent shaping machining control method and system based on LSTM model
By using LSTM models for workpiece shape measurement and data analysis, the problem of relying on expert experience bases in the shaping system is solved, achieving efficient and adaptive machining control and improving the accuracy and efficiency of shaping processes.
Patent Information
- Application Number
- CN202311159849.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-08
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2043-09-08
AI Technical Summary
Existing shaping systems rely on expert experience databases, making the processing susceptible to noise interference and material elastic deformation. They lack self-adaptability, and manual adjustment is inefficient and cannot adapt to material changes over a long period.
An intelligent shaping and machining control method based on an LSTM model is adopted. By scanning the workpiece edge, the data analysis and prediction are performed using a deep learning LSTM model, the machining amount is automatically calculated, and the model is updated by combining the adaptive capabilities of machine learning.
It improves the accuracy and efficiency of the processing, reduces labor costs, enhances the system's adaptability, effectively handles elastic deformation and material changes, and is suitable for long-term production needs.
Smart Images

Figure CN117102288B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent shaping processing of workpieces, and particularly relates to an intelligent shaping processing control method and system based on an LSTM model. BACKGROUND
[0002] Material shaping is an important part of material processing. Shaping is a process of obtaining the shape of a product by using metal plasticity, saving time, labor and material. In the current shaping system, for the original square material, a mechanical arm pressure head is used to press and shape the front, left and right three edges according to a specific stroke amount, so that the height values of the three edges are within the standard range.
[0003] At present, the acquisition of traditional processing amount is mainly through the prediction of processing value by a traditional experience model.
[0004] The so-called experience model refers to the experience knowledge accumulated in the long-term engineering practice of processing production line, and a prediction model of processing precision is established according to the summary and analysis. The model starts from the existing data, forms a corresponding table according to the experience, and establishes an expert experience library. The content of the expert experience library mainly includes the initial measurement height values of the front, left and right three edges of the past processing material, and the processing amount corresponding to each edge. The processing values of the first shaping and the second shaping are obtained by looking up the table. These values are obtained by manual trial. When new materials are put into processing each time, the computer lookup program will search in the manual experience library, find the information consistent with the material data, and find the corresponding processing value for processing. Such processing method needs to manually try shaping in advance for each type of workpiece, and the appropriate processing amount for workpieces of different shapes, sizes and materials needs to be mastered. In addition, a special engineer needs to be on duty around the production line equipment to adjust in time, which undoubtedly wastes a lot of human resources and reduces the material shaping efficiency.
[0005] In actual production practice, shaping based on the traditional shaping processing prediction model (such as the attached Figure 1 ) has the following shortcomings:
[0006] 1) Since the previous processing method is based on the expert experience library, it is easy to be affected by noise interference, material elastic deformation and unknown hidden variables, and the decision and processing process usually deviates greatly from the expectation;
[0007] 2) The method of obtaining experience value by sampling and manual adjustment needs to measure all situations, which is difficult to sample and depends on the number of samples;
[0008] 3) The parameter updating process of the expert library has a time limit, and more depends on the adjustment in the recent period of time, which makes the expert experience library suitable for short-term shaping processing and cannot be used for a long time;
[0009] 4) Lack of adaptive ability, each step of expert library parameter update is a linear adjustment. It is equivalent to fitting the nonlinear constraint of workpiece deformation and indenter stroke by piecewise linear. When the deformation is large, more fine-grained piecewise fitting is needed, which requires more manpower and material resources. SUMMARY
[0010] The purpose of the present application is to provide an intelligent shaping machining control method and system based on an LSTM model, which uses an LSTM model based on deep learning to analyze and process shape measurement parameters of a workpiece, and uses the memory function of the LSTM model to improve the accuracy of prediction.
[0011] To achieve the above purpose, in one aspect, the present application discloses an intelligent shaping machining control method based on an LSTM model, comprising the following steps:
[0012] S1, establishing an LSTM model for predicting the machining value of a workpiece to be shaped;
[0013] S2, placing the workpiece into a shaper and fixing it on a shaping platform, scanning the point positions of the front, left and right three edges of the workpiece by a scanner, obtaining the height values of all point positions, and inputting the height values of all point positions into an industrial computer;
[0014] S3, the industrial computer judges whether the height values of all point positions measured by the workpiece are in the qualified interval, and if yes, the workpiece is taken out from the shaper, and if not, step S4 is performed;
[0015] S4, the industrial computer performs standardization processing on the input height value data of all point positions;
[0016] S5, the industrial computer acquires material attribute data input by a user on a front-end interface, the material attribute data including the specification interval and material type of the workpiece, and inputs the material attribute data into the LSTM model;
[0017] S6, after the data is input into the LSTM model, the corresponding machining amount is predicted by three-layer LSTM model calculation and submitted to the industrial computer;
[0018] S7, after the industrial computer receives the predicted value, it feeds back the predicted value to the controller, and then controls the mechanical arm to perform a pressing operation to complete the first shaping machining;
[0019] S8, after the first machining is completed, the scanner measures the material again, scans the height values of all point positions, and judges whether it meets the specification interval, and if yes, the shaping is completed, and if not, the second shaping machining is entered;
[0020] S9, the second time shaping processing connects the first time shaping result, the LSTM model outputs the predicted value of the second time processing of the workpiece, and the second time processing is completed through the controller and the mechanical arm;
[0021] S10, after the second time processing is completed, the scanner measures the material related point again, judges whether it meets the standard, if it meets, takes out the material and puts it into the qualified area, otherwise, puts it into the unqualified area and waits for processing.
[0022] As a further description of the above technical solution:
[0023] In step S1, the establishment of the LSTM model includes the following steps:
[0024] S11, the introduction of the model is realized by Tensorflow.keras, and the multi-layer structure is stacked based on the Sequential model to complete the construction of the model;
[0025] S12, the original processing data for training the LSTM model is obtained, the original processing data includes the production information of the workpiece, the point value and straightness before and after each time processing and the target specification interval information of the product, the original processing data is classified and processed when processing, and six groups of data are obtained by classifying and extracting according to the edge and the processing times, which are the twice processing data of the front, left and right three edges;
[0026] S13, the input parameters of the LSTM model are defined, the dimension of the input model is set to 232 dimensions, the output dimension of the middle hidden layer is set to 80, and the final output data h is the processing value of each edge, and the input parameters include:
[0027]
[0028] The input parameters are defined as follows:
[0029] [Raw]: material type
[0030] [FR]: whether it has been processed
[0031] [Results]: judge the processing result of the data
[0032] [Status]: used to distinguish whether the material is in the first time processing or the second time processing
[0033] [Times]: the processing times of the three edges
[0034] [SPC_before]: represents the straightness value before processing of the three edges
[0035] [SPC]: represents the straightness value after processing of the three edges
[0036] [SPC_res]: represents the difference of straightness before and after the three edges of the same processing (= SPC_before-SPC)
[0037] [C i _before]: represents the height value of each point before the same processing
[0038] [C i ]: represents the height value of each point after the same processing
[0039] represents the difference between the height values of each point before and after processing
[0040] S14, the original six groups of data sets are allocated as test set and training set by 2:8, and the model is trained by the training set;
[0041] S15, the LSTM model is evaluated by using MAE index, and the norm between the predicted value and the true value is used to define the error, and the MAE calculation formula is as follows:
[0042]
[0043] Wherein, n is the total number of data sets in the test set; y i is the corresponding target value in the test set; is the predicted value of the corresponding performance in the test set.
[0044] As a further description of the above technical scheme:
[0045] In step S4, when the industrial computer processes the height value data of all input points, the data of different orders of magnitude is converted into a unified dimension by z-score standardization.
[0046] As a further description of the above technical scheme:
[0047] In step S9, the secondary shaping process includes the following steps:
[0048] S91, the height value of each point of the workpiece measured for the second time and the material attribute data of the workpiece are put into the model;
[0049] S92, during the second processing, each layer of the LSTM model receives the output value of the corresponding layer during the first processing, thereby establishing a connection with the first processing,
[0050] S93, after the processing and prediction of the three-layer model, 80-dimensional point values and processing times are obtained, and then the predicted value of the second processing of the workpiece is obtained, and the second processing is completed by the controller and the mechanical arm.
[0051] In another aspect, the present application also discloses an intelligent shaping processing control system based on an LSTM model, comprising:
[0052] an industrial computer for running a shaping control program and a machine learning algorithm, the shaping control program comprising instructions for executing any of the above methods;
[0053] a scanner for measuring the height values of the points to be measured on each edge of the workpiece, and then transmitting the height values of the points into the industrial computer to implement the machine learning algorithm and the shaping control;
[0054] a shaping platform for placing the product to be processed;
[0055] a mechanical arm pressure head for deforming and holding the product to be processed for a period of time;
[0056] a controller for signal conversion after receiving the signal in the industrial computer and transmitting to the mechanical arm to realize the control of the mechanical arm pressure head.
[0057] As described above, due to the adoption of the above technical solutions, the present application has the following advantages:
[0058] 1. In the present application, the machine learning method, especially the LSTM model based on deep learning, is used to analyze and process the shape measurement parameters of the processed workpiece, and the travel amount of each shaping processing is automatically calculated, so that the processing data and method of the target deformation are automatically obtained.
[0059] 2. In the present application, the processing process is more intelligent, the processing efficiency is improved, and the labor cost is reduced. At the same time, the data processing and machine learning method is used for processing value prediction, which can effectively reduce the influence of abnormal data, the effect is better from the result, and the adaptability is stronger.
[0060] 3. In the present application, a part of the production data of a certain material is put into the model for training, and then the corresponding model is obtained. Compared with artificial experience, the amount of data required is reduced. The LSTM model is a long short-term memory model, which has memory function for long-term data and can effectively utilize long-term data.
[0061] 4、In the present application, the system builds a machine model using an LSTM model, which takes into account both the first and second machining quantities when predicting the machining quantity. Some materials still need to be machined twice to meet the target specification range, so there is a corresponding relationship between the two machining quantities. The LSTM recurrent neural network model can associate this corresponding relationship with the final machining quantity by using its memory function, and can effectively solve the gradient explosion or disappearance problem of simple recurrent neural networks. By using the memory function of the LSTM model, when training the LSTM for N workpieces, the residual error of the previous N-1 workpieces is expected to contribute to the machining of the current workpiece to improve accuracy. In actual machining, if the first machining is unsuccessful, the predicted machining value in the second machining will be related to the value of the first machining, thereby further improving the accuracy of the prediction.
[0062] 5、In the present application, the model is periodically learned, and has self-adaptive characteristics. The machining prediction in the traditional scheme depends on the artificial experience library, and changing the material type or specification requires manual re-measurement. The self-adaptive scheme based on machine learning can set a time point to automatically update the model, as shown in Figure 7 The updating process is shown in the figure. For newly added materials, the relevant actual production data will be put into the database, and the model can be retrained and updated according to the existing new data, so that the model can successfully predict new materials under the original properties. BRIEF DESCRIPTION OF DRAWINGS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.
[0064] LEGEND
[0065] Figure 1 The figure is a shaping machining workflow diagram based on a traditional experience model in the prior art.
[0066] Figure 2 The figure is a general flowchart of a shaping scheme based on machine learning in an intelligent shaping machining control method based on an LSTM model.
[0067] Figure 3 The figure is a schematic diagram of a workpiece before and after shaping in an intelligent shaping machining control method based on machine learning.
[0068] Figure 4 The figure is a first machining process schematic diagram in an intelligent shaping machining control method based on an LSTM model.
[0069] Figure 5 Figure 2 is a schematic diagram of a second machining process in an intelligent shaping machining control method based on an LSTM model.
[0070] Figure 6 Figure 3 is a schematic diagram of the structure of an LSTM model in an intelligent shaping machining control method based on an LSTM model.
[0071] Figure 7 Figure 4 is a schematic diagram of an adaptive scheme of an LSTM model in an intelligent shaping machining control method based on an LSTM model. DETAILED DESCRIPTION
[0072] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0073] Therefore, the detailed description of the embodiments of the present application provided below in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art without making creative efforts based on the embodiments in the present application all belong to the scope of protection of the present application.
[0074] System composition:
[0075] The entire system mainly includes three parts of a device layer, a data layer and an algorithm layer. The device layer is mainly responsible for collecting sampling point data of shaping materials (workpieces), specific material machining and implementing control of the entire shaping system. The data layer is mainly to construct a rectangular coordinate system through an image mode using data provided by the device layer, and to judge whether the material meets the required standard. The algorithm layer is mainly to provide a corresponding machining control signal to the device layer according to a high-robustness model constructed based on information provided by the data layer.
[0076] 1. Device layer: this layer includes
[0077] ① Scanner: to perform statistics of material-related parameters, and then to transmit the related parameters into an industrial computer to implement related algorithms and control. A high-precision laser measurement subsystem is provided along the edge of the workpiece to measure each sampling point through a discrete sampling method.
[0078] ② Shaping platform: used for placing materials, which is an important scene of shaping machining.
[0079] ③ Controller: After receiving the signal in the industrial computer, the controller converts the signal and transmits it to the mechanical arm pressure head to control the mechanical arm.
[0080] ④ Mechanical arm pressure head: a rubber block with a specific curved shape at the top of the mechanical arm. During shaping processing, the shaping pressure head is driven by the mechanical arm and acts on the shaped workpiece, compressing the workpiece and keeping it for a period of time, thereby achieving the shaping effect.
[0081] ⑤ Industrial computer: a computer running shaping control programs and machine learning algorithms, connected to the scanner and mechanical arm through data lines to control the entire shaping system.
[0082] 2. Data layer:
[0083] ① After obtaining data from the laser scanner, the relevant height data needs to be displayed in the form of an image. Therefore, 60 points are set in the system, of which 30 points correspond to the front edge, 20 points correspond to the left edge, and the remaining 20 points correspond to the right edge. Then a rectangular coordinate system is constructed on the cross section of a certain edge of the material, with the initial horizontal plane as the x-axis and the vertical height as the y-axis. Then the processing of a certain edge is displayed. As shown in the figure, the upper curve is after shaping, the lower curve is before shaping, the horizontal coordinate C11-C31 represents the left edge of the material, and the vertical coordinate represents the height relative to the initial horizontal plane. Combined with the data of the scanner, the before and after shaping of the left edge can be displayed. Figure 3
[0084] ② Straightness: after scanning, the absolute value of the maximum point value of the three middle points is taken as the straightness value. The three points with the highest height in the middle are taken as the straightness of the curve. Straightness is an important parameter for subsequent processing and is also a standard for judging whether the material meets the requirements.
[0085] ③ To facilitate model training and prediction, the relevant attributes of the material need to be set, including two-dimensional code, material type, etc.
[0086] 3. Algorithm layer:
[0087] ① After obtaining the relevant data, the processing amount is predicted and the specification is judged through the LSTM model. The model is implemented through Tensorflow.keras. The main model is the Sequential model, which stacks multiple layers of structures to complete the model building;
[0088] ②In order to make the data with only one processing and the data with two processes in the provided data adapt to the model, the data is aligned, and the data with two times of shaping is not adjusted, and the data with one time of shaping is expanded to two. The second shaping data is the same before and after shaping, the point position information after the first shaping is kept, and the second shaping stroke is 0.
[0089] ③In addition, through the research on the data, it is found that in the case that the stroke of one side is 0, if the stroke of other sides changes, the position of the left monitoring point will also change, that is, the complete data of the left, right and front three sides is input into the model.
[0090] Hardware and software platform:
[0091] Industrial computer 61045H, CPU: i7-9700, memory: 16G, hard disk: solid state disk 256G, mechanical hard disk 1T, laser range finder scanner: Keyence (Japan) CL-P015, camera: Keyence (Japan) CA-H200MX / CA-H200CX.
[0092] In the system, Python is used for development, combined with the TensorFlow deep learning framework, and can run in Windows and Linux. The model development platform includes a training server and an inference end computing platform, which is an end device, and the shaping machine provides computing resource guarantee. By using machine learning method, especially the LSTM (Long Short Time Memory) model based on deep learning, the shape measurement parameters of the processed workpiece are analyzed and processed, and the stroke of each shaping process is automatically calculated, so that the processing data and method of the target deformation are automatically obtained.
[0093] Please refer to Figures 1-7 On the one hand, the application discloses an intelligent shaping processing control method based on an LSTM model, which comprises the following steps:
[0094] S1, establishing an LSTM model for predicting the processing value of the workpiece to be shaped;
[0095] S2, placing the workpiece into the shaping machine and fixing it on the shaping platform, scanning the point positions of the front, left and right three sides of the workpiece through the scanner, obtaining the height values of all the point positions, and inputting the height values of all the point positions into the industrial computer;
[0096] S3, the industrial computer judges whether the height values of all the point positions measured by the workpiece are in the qualified interval, and if yes, the workpiece is taken out from the shaping machine, and if not, step S4 is performed;
[0097] S4, the industrial computer standardizes the height value data of all input points;
[0098] S5, the industrial computer obtains the material attribute data input by the user on the front-end interface, the material attribute data including the specification interval and material type of the workpiece, and puts the material attribute data into the LSTM model;
[0099] S6, after the data is put into the LSTM model, the processing process is as shown in Figure 4 , the dimension of the input data is 232, after three-layer LSTM model calculation, the corresponding processing amount is predicted and submitted to the industrial computer;
[0100] S7, after the industrial computer receives the predicted value, it feeds back to the controller, and then controls the mechanical arm to perform the pressing operation, completing the first shaping processing;
[0101] S8, after the first processing is completed, the scanner measures the height value of each point of the material again, judges whether it meets the specification interval, if yes, the shaping is completed, if not, the second shaping processing is entered;
[0102] S9, the second shaping processing connects the shaping result of the first time, the LSTM model outputs the predicted value of the second processing of the workpiece, and the controller and the mechanical arm complete the second processing;
[0103] S10, after the second processing is completed, the scanner measures the related points of the material again, judges whether it meets the standard, if yes, the material is taken out and put into the qualified area, otherwise, it is put into the unqualified area and waits for processing.
[0104] In step S9, the input value corresponding relationship of the two shaping processes is shown in the following table.
[0105] Table 1: Corresponding relationship of input values of two processes
[0106]
[0107] Note: For attribute details, see the LSTM model matrix.
[0108] The system first judges the scanned data, if the height values of each side of the workpiece are in the qualified interval, it is considered as a qualified product and does not need to be shaped. Otherwise, the measured data is put into the model trained in advance, and then the processing value is predicted, and the related value is fed back to the shaping machine pressure head to shape the material. After processing, the data is measured again to judge. Since the workpiece cost is high, if the first processing is unqualified, the second prediction and processing are performed. If both the first and second processing are unqualified, the workpiece is taken out and put into the unqualified area.
[0109] In step S1, the establishment of the LSTM model includes the following steps:
[0110] S11, the introduction of the model is realized by Tensorflow.keras, and the multi-layer structure is stacked based on the Sequential model to complete the building of the model;
[0111] S12, the original processing data for training the LSTM model is obtained, the original processing data includes the production information of the workpiece, the point value and straightness before and after each processing, and the target specification interval information of the product, and the original processing data is classified and processed during processing, and is classified and extracted according to the edge and the number of processing, six groups of data are obtained, which are twice processing data of front, left and right three edges;
[0112] S13, the structure of the LSTM model is shown in the following table: Figure 6 The input parameters of the LSTM model are defined, the dimension of the input model is set to 232 dimensions, the output dimension of the intermediate hidden layer is set to 80, and the final output data h is the processing value of each edge, and the input parameters include:
[0113]
[0114] The input parameters are defined as follows:
[0115] [Raw]: material type
[0116] [FR]: whether it has been processed
[0117] [Results]: judge the processing result of the data
[0118] [status]: used to distinguish whether the material is in the first processing or the second processing process
[0119] [Times]: the number of processing of three edges
[0120] [SPC_before]: represents the straightness value before processing of three edges
[0121] [SPC]: represents the straightness value after processing of three edges
[0122] [SPC_res]: represents the difference of straightness before and after processing of three edges (=SPC_before-SPC)
[0123] [C i _before]: represents the height value before processing of each point
[0124] [C i ]: represents the height value after processing of each point
[0125] The difference between the height values before and after processing of each point
[0126] The parameter dimensions are described as follows:
[0127] ① Raw (material type): 1 dimension
[0128] Note: There can be multiple material types, such as A, B, and C. Therefore, digitization is required. If the material is type A, the Raw value is 0, if type B, the Raw value is 1, and if type C, the Raw value is 2.
[0129] ② FR (whether processed before): 1 dimension
[0130] Note: There are two attributes, new and old. If it is new, FR is set to 1, and if it is old, FR is set to 2.
[0131] ③ Results (whether it meets the specifications): 1 dimension
[0132] Note: There are two attributes, OK and NG, used to determine the processing result of this data. If it is OK, set Results to 1, and if it is NG, set Results to 0.
[0133] ④ Status (material state): 1 dimension
[0134] Note: There are two attributes, RS-1 and post, used to distinguish whether the material is in the first processing or the second processing. If it is RS-1, set Status to 0, and if it is post, set Status to 1.
[0135] ⑤ Times attribute: 3 dimensions
[0136] Note: The LSTM model predicts the three edges as a whole, including LeftTimes, FrontTimes, and RightTimes, which are the "processing times of the three edges", used to distinguish between one-time processing and two-time processing.
[0137] ⑥ SPC_before attribute: 3 dimensions
[0138] Note: In order to measure straightness, include SPC_before_Left, SPC_before_Front, and SPC_before_Right, which represent the straightness values before processing of the three edges.
[0139] ⑦ SPC: 3 dimensions
[0140] Note: Include SPC_Left, SPC_Front, and SPC_Right, which represent the straightness values after processing of the three edges.
[0141] SPC_res: 3 dimensions
[0142] Note: Including SPC_res_Left, SPC_res_Front, SPC_res_Right, indicating the difference of straightness before and after processing of three edges (SPC_res = SPC_before-SPC).
[0143] Ci_before: 72 dimensions
[0144] Note: Indicates the height value before processing of each point.
[0145] Ci: 72 dimensions
[0146] Note: Indicates the height value after processing of each point.
[0147] Ci_res: 72 dimensions
[0148] Note: Indicates the difference of height values before and after processing of each point (Ci_res = Ci_before-Ci).
[0149] The content of the output model mainly includes:
[0150] [PressDepth]
[0151] PressDepth vector: 3 dimensions
[0152] Note: PressDepth_L, PressDepth_R, PressDepth_F respectively, i.e. the processing values of three edges, the value of processing amount directly affects the result, so it is a necessary parameter item. Mainly placed in the output part.
[0153] S14, the original six groups of data sets are allocated as test set and training set in the ratio of 2:8, and the model is trained with the training set. S15, the LSTM model is evaluated using the MAE index, and the MAE adopts the norm between the predicted value and the true value to define the error, and the MAE calculation formula is as follows:
[0154]
[0155] Where, n is the total number of data sets in the test set; y i is the corresponding target value in the test set; The predicted value corresponding to the performance of the test set. The MAE uses the norm between the predicted value and the true value to define the error, which has high tolerance for outliers and better robustness to error. After the final model is obtained, the product shaping amount prediction process can be performed. During training, to prevent overfitting, a ReLU function is used to activate each layer, 25% dropout is performed on each layer in the model, and the output of the last layer is processed and calculated to obtain the processing amount of three edges. The MAE function is used for back propagation correction. Finally, the trained model is evaluated using the test set, and the data set is adjusted. When the training set and the test set are fitted and the MAE loss functions of the two are less than 0.2, the training is completed.
[0156] In step S4, when the industrial computer processes the height value data of all point positions input, the data of different magnitudes is converted into a unified dimension through z-score standardization. For the data transmitted to the industrial computer, the unnecessary "two-dimensional code", "time" and the like are removed and standardized to be put into the model for use. The main method is to convert the data of different magnitudes into a unified dimension through z-score standardization, which is convenient to use.
[0157] In step S9, the secondary shaping process includes the following steps:
[0158] S91, the height value of each point position of the workpiece measured for the second time and the material attribute data of the workpiece are put into the model, that is, Xt+k in the figure;
[0159] S92, during the secondary processing, each LSTM model layer receives the output value of the corresponding layer during the first processing, thereby establishing a connection with the first processing,
[0160] S93, after the processing and prediction of the three-layer model, 80-dimensional point position values and processing times are obtained, and then the predicted value of the second processing of the workpiece is obtained, and the second processing is completed by the controller and the mechanical arm. The specific process can be referred to in the attached Figure 5 ;
[0161] On the other hand, the application also discloses an intelligent shaping processing control system based on an LSTM model, comprising:
[0162] An industrial computer for running a shaping control program and a machine learning algorithm, the shaping control program comprising instructions for executing any of the above methods;
[0163] A scanner for measuring the height values of the point positions of each edge of the workpiece, and then transmitting the height values of the point positions to the industrial computer to realize the machine learning algorithm and the shaping control;
[0164] A shaping platform for placing the product to be processed;
[0165] A mechanical arm pressure head for deforming and holding the product to be processed for a period of time;
[0166] A controller for signal conversion and transmission to the mechanical arm after the controller receives the signal in the industrial computer, realizing the control of the mechanical arm pressure head.
[0167] The industrial computer connects the scanner and the mechanical arm through the data line to realize the control of the whole shaping system. The mechanical arm pressure head is a rubber block installed at the top of the mechanical arm and has a specific curved surface shape. During shaping processing, the shaping pressure head is driven by the mechanical arm and acts on the shaped workpiece to deform and hold the workpiece for a period of time, thereby achieving the shaping effect. The scanner is a laser scanner that performs material-related parameter statistics and then transmits the related parameters into the industrial computer to realize related algorithms and control. The scanner has a high-precision laser measurement subsystem that walks along the edge of the workpiece and measures each sampling point through discrete sampling method.
[0168] Working principle
[0169] Based on this system, the shaping machine can automatically read the related numbers of the material, analyze and dynamically update through the machine learning model, and give the processing prediction. This system has strong adaptive ability and can effectively reduce the influence of factors such as elastic deformation, with small error. When used in actual production and processing, it can improve processing efficiency, improve accuracy, and reduce labor costs. This technology can be used in material processing, material shaping, etc.
[0170] Using machine learning method, especially LSTM (Long Short Time Memory) model based on deep learning, data analysis and processing of shape measurement parameters of processed workpiece are performed, and the travel amount of each shaping processing is automatically calculated, thereby automatically obtaining the processing data and method of target deformation. Based on this system, the shaping machine can automatically read the related numbers of the material, analyze and dynamically update through the machine learning model, and give the processing prediction. This system has strong adaptive ability and can effectively reduce the influence of factors such as elastic deformation, with small error. When used in actual production and processing, it can improve processing efficiency, improve accuracy, and reduce labor costs. This technology can be used in material processing, material shaping, etc.
[0171] The system uses an LSTM model to build the machine model, taking into account both processing times when predicting the processing volume. Some materials require secondary processing after the first processing to meet the target specification range, thus establishing a correlation between the two processing volumes. The LSTM recurrent neural network model can utilize its data memory function to associate this correlation with the final processing volume, effectively solving the gradient explosion or vanishing problem common to simple recurrent neural networks. Leveraging the LSTM model's memory function, when training the LSTM on N workpieces, it is expected that the residuals of the previous N-1 workpieces will also contribute to the processing of the current workpiece to improve accuracy. During actual processing, if the first processing attempt fails, the predicted processing value in the second processing attempt will be correlated with the value from the first attempt, further improving the prediction accuracy.
[0172] In this invention, the number of measurement points involved in the calculation has increased from three to multiple points. Traditional shaping schemes determine straightness specifications based on three key points of each edge, without performing any related operations or calculations on the remaining points. This patent's machine learning-based scheme considers all points and aims to process all points to their "optimal value." The height values of all points and the midpoint of the specification interval are included in the model, allowing the predicted processing amount to better take into account the relationship between all points and the midpoint of the interval.
[0173] The model learns periodically and exhibits adaptive properties. Traditional processing predictions rely on a human experience database; changes in material type or specifications require manual remeasurement. Machine learning-based adaptive solutions, such as… Figure 7 As shown, the model can be automatically updated by setting time points. The update process is illustrated in the figure. For newly added materials, the relevant actual production data is added to the database. The model can then be retrained and updated based on the existing new data, enabling it to successfully predict new materials while retaining its original properties.
[0174] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An intelligent finishing machining control method based on an LSTM model, characterized in that, The method comprises the following steps: S1, establishing an LSTM model for predicting the machining value of a workpiece to be shaped; S2, placing the workpiece into a shaper and fixing it on a shaping platform, scanning the point positions of the front, left and right three edges of the workpiece by a scanner, obtaining the height values of all the point positions, and inputting the height values of all the point positions into an industrial computer; S3, the industrial computer judges whether the height values of all the point positions measured by the workpiece are in a qualified interval, and if yes, the workpiece is taken out from the shaper, and if not, step S4 is performed; S4, the industrial computer performs standardization processing on the input height value data of all the point positions; S5, the industrial computer obtains the material attribute data input by a user on a front-end interface, the material attribute data including the specification interval and material type of the workpiece, and inputs the material attribute data into the LSTM model; S6, after the data is input into the LSTM model, the corresponding machining amount is predicted through three-layer LSTM model calculation and submitted to the industrial computer; S7, after receiving the predicted value, the industrial computer feeds it back to the controller, and then controls the mechanical arm to perform a pressing operation to complete the first shaping machining; S8, after the first machining is completed, the scanner measures the material again, scans the height values of the point positions, and judges whether they meet the specification interval, and if yes, the shaping is completed, and if not, the second shaping machining is performed; S9, the second shaping machining is connected with the shaping result of the first time, the LSTM model outputs the predicted value of the second machining of the workpiece, and the second machining is completed through the controller and the mechanical arm; S10, after the second machining is completed, the scanner measures the related point positions of the material again, judges whether they meet the standard, and if yes, the material is taken out and placed in a qualified area, and if not, it is placed in an unqualified area and waits for processing; In the step S1, the establishment of the LSTM model comprises the following steps: S11, the model is introduced by Tensorflow.keras, and the multi-layer structure is stacked based on the Sequential model to complete the construction of the model; S12, the original machining data for training the LSTM model is obtained, the original machining data including the production information of the workpiece, the point position values and straightness before and after each machining, and the target specification interval information of the product, the original machining data is classified and processed during processing, and six groups of data are obtained by classification and extraction according to the edges and the number of machining, which are twice machining data of the front, left and right three edges; S13, the input parameters of the LSTM model are defined, the dimension of the input model is set to 232 dimensions, the output dimension of the intermediate hidden layer is set to 80, and the final output data h is the machining value of each edge, and the input parameters include: The input parameters are defined as follows: S14, the original six groups of data sets are allocated as a test set and a training set in a ratio of 2:8, and the training set is used to train the model; S15, the LSTM model is evaluated by using the MAE index, the MAE adopts the norm between the predicted value and the true value to define the error, and the MAE calculation formula is as follows: wherein, is the total number of data sets in the test set; is the corresponding target value in the test set; is the predicted value of the corresponding performance in the test set. 2.The intelligent shaping process control method based on LSTM model according to claim 1, wherein, In the step S4, the industrial computer processes the height value data of all the input points, and converts the data of different magnitudes into a unified measure through z-score standardization. 3.The intelligent shaping process control method based on LSTM model according to claim 1, characterized in that, In the step S9, the secondary shaping process includes the following steps: S91, the height value of each point of the second measurement of the workpiece and the material attribute data of the workpiece are put into the model; S92, during the secondary processing, each layer of the LSTM model receives the output value of the corresponding layer during the first processing, thereby establishing a connection with the first processing, S93, after the processing and prediction of the three-layer model, 80-dimensional point values and processing times are obtained, and then the predicted value of the second processing of the workpiece is obtained, and the second processing is completed by the controller and the mechanical arm.
4. An intelligent shaping machining control system based on an LSTM model, characterized in that, It includes: an industrial computer for running a shaping control program and a machine learning algorithm, the shaping control program including the intelligent shaping processing control method according to any one of claims 1 to 3; a scanner for measuring the height value of each edge of the workpiece, and then transmitting the height value of the point to the industrial computer to realize the machine learning algorithm and the shaping control; a shaping platform for placing the product to be processed; a mechanical arm pressure head for deforming and holding the product to be processed for a period of time; a controller for signal conversion after receiving the signal in the industrial computer, and transmitting to the mechanical arm to realize the control of the mechanical arm pressure head.
Citation Information
Patent Citations
Numerical control machine tool cooperative control method, device and equipment and computer storage medium
CN116339239A
Intelligent shaping processing control method and system based on machine learning
CN117032081A