A method and system for setting control signals of CNC lathe based on neural network
The CNC lathe control signal setting method established through neural network solves the problem of strong randomness in manual setting of control signals, improves the adaptability and accuracy of processed parts, and achieves a stable and efficient processing process.
Patent Information
- Application Number
- CN202211245293.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-12
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-10-12
AI Technical Summary
In the existing technology, the manual setting of CNC lathe control signals is highly random, which leads to a reduction in the adaptability of the lathe control signals to the processed parts, thereby reducing the processing accuracy.
A CNC lathe control signal setting method based on neural networks is used to obtain the processing part characteristics of the processed parts, and use convolution training to establish a signal setting model. The optimization algorithm adapts the lathe processing part settings to the processing part characteristics to achieve stable and efficient Control signal settings.
It improves the adaptability and processing accuracy of processed parts, simplifies the setting process of control signals, and takes into account control stability and efficiency.
Smart Images

Figure CN115453889B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CNC lathe control, and in particular to a CNC lathe control signal setting method and system based on neural network. Background Art
[0002] CNC lathe is one of the most widely used CNC machine tools. It is mainly used for cutting inner and outer cylindrical surfaces of shaft parts or disk parts, inner and outer conical surfaces of arbitrary cone angles, complex rotary inner and outer curved surfaces, and cylindrical and conical threads, and can also perform grooving, drilling, reaming, reaming and boring, etc.
[0003] CNC machine tools automatically process the parts according to the pre-programmed processing program. We compile the processing route, process parameters, tool motion trajectory, displacement, cutting parameters and auxiliary function control signals of the parts into a processing program sheet according to the instruction code and program format specified by the CNC machine tool, and then record the contents of this program sheet on the control medium, and then input it into the CNC device of the CNC machine tool, so as to command the machine tool to process the parts.
[0004] The prior art usually manually sets the lathe control signal to achieve the purpose of processing parts, but the manual setting is highly random, which reduces the compatibility of the lathe control signal with the processed parts, and ultimately leads to a reduction in the processing accuracy of the processed parts. Summary of the invention
[0005] The purpose of the present invention is to provide a method for setting control signals of a CNC lathe based on a neural network, so as to solve the technical problem in the prior art that the manual setting of control signals is highly random and reduces the compatibility of the lathe control signals with the processed parts.
[0006] In order to solve the above technical problems, the present invention specifically provides the following technical solutions:
[0007] A method for setting control signals of a CNC lathe based on a neural network comprises the following steps:
[0008] Step S1, obtaining the processing part characteristics of the lathe processing part, and setting the CNC lathe control signal adapted to the processing part characteristics for the lathe processing part by using an optimization algorithm with control stability and control efficiency as optimization targets;
[0009] Step S2, using a neural network to perform convolution training on the processing part features and the CNC lathe control signal to obtain a signal setting model for calculating the CNC lathe control signal according to the processing part features;
[0010] Step S3, inputting the processing part characteristics of the lathe part to be processed into the signal setting model to obtain the CNC lathe control signal of the lathe part to be processed, so as to realize stable and efficient processing of the processing part of the lathe part to be processed.
[0011] As a preferred solution of the present invention, the step of obtaining the processing part features of the lathe processing part includes:
[0012] Respectively obtaining the three-dimensional features of the processing part of the lathe processing part before processing and the expected three-dimensional features of the processing part of the lathe processing part after processing;
[0013] A similarity test is performed on each feature component in the three-dimensional feature before processing and each feature component in the expected three-dimensional feature after processing, and all feature components with similarities lower than a preset threshold are used as the processing part features.
[0014] As a preferred solution of the present invention, the calculation formula of the similarity is:
[0015]
[0016] Where P i is the similarity between the i-th feature component in the 3D feature before processing and the i-th feature component in the expected 3D feature after processing, X i is the i-th feature component of the three-dimensional feature before processing, Y i is the i-th characteristic component of the desired three-dimensional feature after processing, and i is a metrological constant.
[0017] As a preferred solution of the present invention, the optimization algorithm with control stability and control efficiency as optimization objectives sets a CNC lathe control signal adapted to the processing part characteristics for lathe processing parts, including:
[0018] An objective function with control stability as the optimization target is constructed. The function expression of the objective function with control stability as the optimization target is:
[0019]
[0020] Where H is the objective function value with control stability as the optimization goal, S j is the control signal of the CNC lathe for processing the jth processing position in the processing part, n is the total number of processing positions in the processing part, j is a measurement constant, and min is a minimization operator;
[0021] An objective function with control efficiency as the optimization target is constructed. The function expression of the objective function with control efficiency as the optimization target is:
[0022]
[0023] t j =T(S j );
[0024] Where F is the objective function value with control efficiency as the optimization goal, t j is the processing time spent at the jth processing position using the CNC lathe control signal of the jth processing position in the processing part, T(S j ) is t j The calculation function of
[0025] Construct constraints for solving the objective function, and the function expression of the constraints is:
[0026]
[0027] In the formula, Z j is the three-dimensional feature of the jth processing position in the processing part, D(S j ) is a conversion function between the control signal of the CNC lathe for processing the jth processing position in the processing part and the processing part feature of the jth processing position in the processing part, S min , S max They are the minimum and maximum control values of the control signal of the CNC lathe respectively;
[0028] Based on the constraint conditions, the objective function with control stability as the optimization target and the objective function with control efficiency as the optimization target are solved to obtain the CNC lathe control signal adapted to the characteristics of the processing part.
[0029] As a preferred solution of the present invention, the method for obtaining the signal setting model includes:
[0030] The processing part feature is used as an input item of a neural network, the CNC lathe control signal of each processing position in the processing part is used as an output item of the neural network, and the neural network is used to perform convolution training based on the input item and the output item to obtain the signal setting model;
[0031] The model expression of the signal setting model is:
[0032] [S j ] n =Model([Z j ] n );
[0033] In the formula, [S j ] n is the CNC lathe control signal of each processing position in the processing part, [Z j ] nIt is the processing part feature of each processing position in the processing part, and Model is a neural network.
[0034] As a preferred solution of the present invention, the processing part characteristics of the lathe parts to be processed are input into the signal setting model to obtain the CNC lathe control signal of the lathe parts to be processed, including:
[0035] The processing part features of the lathe parts to be processed are obtained, and the processing part features of the lathe parts to be processed at each processing position are input into the signal setting model to obtain the CNC lathe control signal of the lathe parts to be processed at each processing position.
[0036] As a preferred solution of the present invention, each characteristic component in the processing part characteristic is normalized to eliminate dimensional error.
[0037] As a preferred solution of the present invention, each characteristic component in the three-dimensional feature before processing corresponds to each characteristic component in the desired three-dimensional feature after processing.
[0038] As a preferred solution of the present invention, the CNC lathe control signal corresponds to the processing part characteristics according to the processing position.
[0039] As a preferred solution of the present invention, the present invention provides a setting system for implementing a control signal setting method for a CNC lathe based on a neural network, comprising:
[0040] A data processing unit is used to obtain the processing part characteristics of the lathe processing parts, and to set the CNC lathe control signal adapted to the processing part characteristics for the lathe processing parts by using the optimization algorithm with control stability and control efficiency as the optimization target;
[0041] A model building unit, used to use a neural network to perform convolution training on processing part features and CNC lathe control signals to obtain a signal setting model for calculating CNC lathe control signals according to the processing part features;
[0042] The model application unit is used to input the processing part characteristics of the lathe processing parts to be processed into the signal setting model to obtain the CNC lathe control signal of the lathe processing parts to be processed.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] The present invention uses a neural network to perform convolution training on processing part features and CNC lathe control signals to obtain a signal setting model for calculating CNC lathe control signals according to the processing part features, and uses the model to set control signals to achieve stable and efficient processing of the processing parts of the lathe parts to be processed, thereby improving the adaptability of the processed parts and ultimately improving the processing accuracy of the processed parts. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0046] Figure 1 A flow chart of a method for setting a control signal for a CNC lathe provided in an embodiment of the present invention;
[0047] Figure 2 A structural block diagram of a setting system provided in an embodiment of the present invention.
[0048] The numbers in the figure represent the following:
[0049] 1-Data processing unit; 2-Model building unit; 3-Model application unit. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.
[0051] like Figure 1 As shown, the present invention provides a method for setting a control signal of a CNC lathe based on a neural network, comprising the following steps:
[0052] Step S1, obtaining the processing part characteristics of the lathe processing part, and setting the CNC lathe control signal adapted to the processing part characteristics for the lathe processing part by using an optimization algorithm with control stability and control efficiency as optimization targets;
[0053] The step of obtaining the processing part features of the lathe processing parts comprises:
[0054] Respectively obtaining the three-dimensional features of the processing part of the lathe processing part before processing and the expected three-dimensional features of the processing part of the lathe processing part after processing;
[0055] A similarity test is performed on each feature component in the three-dimensional feature before processing and each feature component in the expected three-dimensional feature after processing, and all feature components with similarities lower than a preset threshold are used as the processing part features.
[0056] The calculation formula of the similarity is:
[0057]
[0058] Where P i is the similarity between the i-th feature component in the 3D feature before processing and the i-th feature component in the expected 3D feature after processing, X i is the i-th feature component of the three-dimensional feature before processing, Y i is the i-th characteristic component of the desired three-dimensional feature after processing, and i is a metrological constant.
[0059] Each characteristic component in the three-dimensional feature before processing corresponds to each characteristic component in the three-dimensional feature expected after processing.
[0060] The three-dimensional features include shape features, coordinate features, curvature features and other feature components in three dimensions at the processing position. The smaller the similarity between the i-th feature component in the three-dimensional features before processing and the i-th feature component in the expected three-dimensional features after processing, the greater the change of the i-th feature component before and after processing, that is, the i-th feature component is more important in processing analysis and formulating lathe control signals. Therefore, a series of feature components with large changes before and after processing are summarized to form the processing part features, ensuring that there are sufficient features when setting the CNC lathe control signal and realizing the dimensionality reduction screening of the processing features.
[0061] Step S2, using a neural network to perform convolution training on the processing part features and the CNC lathe control signal to obtain a signal setting model for calculating the CNC lathe control signal according to the processing part features;
[0062] The optimization algorithm with control stability and control efficiency as optimization goals sets a CNC lathe control signal adapted to the processing part characteristics for lathe processing parts, including:
[0063] An objective function with control stability as the optimization target is constructed. The function expression of the objective function with control stability as the optimization target is:
[0064]
[0065] Where H is the objective function value with control stability as the optimization goal, S j is the control signal of the CNC lathe for processing the jth processing position in the processing part, n is the total number of processing positions in the processing part, j is a measurement constant, and min is a minimization operator;
[0066] An objective function with control efficiency as the optimization target is constructed. The function expression of the objective function with control efficiency as the optimization target is:
[0067]
[0068] t j =T(S j );
[0069] Where F is the objective function value with control efficiency as the optimization goal, t j is the processing time spent at the jth processing position using the CNC lathe control signal of the jth processing position in the processing part, T(S j ) is t j The calculation function of
[0070] Construct constraints for solving the objective function, and the function expression of the constraints is:
[0071]
[0072] In the formula, Z j is the three-dimensional feature of the jth processing position in the processing part, D(S j ) is a conversion function between the control signal of the CNC lathe for processing the jth processing position in the processing part and the processing part feature of the jth processing position in the processing part, S min , S max They are the minimum and maximum control values of the control signal of the CNC lathe respectively;
[0073] Based on the constraint conditions, the objective function with control stability as the optimization target and the objective function with control efficiency as the optimization target are solved to obtain the CNC lathe control signal adapted to the characteristics of the processing part.
[0074] The control signals of CNC lathes include processing route, process parameters, tool motion trajectory, displacement, cutting parameters and auxiliary functions.
[0075] The method for obtaining the signal setting model includes:
[0076] The processing part feature is used as an input item of a neural network, the CNC lathe control signal of each processing position in the processing part is used as an output item of the neural network, and the neural network is used to perform convolution training based on the input item and the output item to obtain the signal setting model;
[0077] The model expression of the signal setting model is:
[0078] [S j ] n =Model([Z j ] n );
[0079] In the formula, [S j ] nis the CNC lathe control signal of each processing position in the processing part, [Z j ] n It is the processing part feature of each processing position in the processing part, and Model is a neural network.
[0080] Firstly, the control signal of the CNC lathe is solved by using an optimization algorithm with control stability and control efficiency as optimization objectives. The obtained control signal of the CNC lathe can enable the CNC machine tool to take into account both stability and efficiency during processing. Then, the control signal of the CNC machine tool obtained by the optimization algorithm is used as a training sample of the neural network. The neural network is then used to perform convolution training on the control signal of the CNC machine tool obtained by the optimization algorithm to learn the mapping relationship between the processing part characteristics and the control signal of the CNC machine tool. Subsequently, the signal setting model trained by the neural network can be directly used to measure the control signal of the CNC lathe. There is no need to calculate the optimization algorithm step by step, which simplifies the setting process of the data lathe control signal. Moreover, the samples trained by the neural network are obtained by the optimization algorithm. Therefore, the signal setting model is essentially an abstract summary of the optimization algorithm. The control signal of the data lathe obtained by the signal setting model also achieves the dual objectives of control stability and control efficiency.
[0081] Step S3, inputting the processing part characteristics of the lathe part to be processed into the signal setting model to obtain the CNC lathe control signal of the lathe part to be processed, so as to realize stable and efficient processing of the processing part of the lathe part to be processed.
[0082] Input the processing part characteristics of the lathe parts to be processed into the signal setting model to obtain the CNC lathe control signal of the lathe parts to be processed, including:
[0083] The processing part features of the lathe parts to be processed are obtained, and the processing part features of the lathe parts to be processed at each processing position are input into the signal setting model to obtain the CNC lathe control signal of the lathe parts to be processed at each processing position.
[0084] Each characteristic component in the processing part characteristics is normalized to eliminate dimensional errors.
[0085] The CNC lathe control signal and the processing part feature correspond to each other according to the processing position, that is, the CNC lathe control signal of the jth processing position can process and realize the processing part feature of the jth processing position.
[0086] Based on the above-mentioned CNC lathe control signal setting method, the present invention provides a setting system, including:
[0087] The data processing unit 1 is used to obtain the processing part characteristics of the lathe processing parts, and set the CNC lathe control signal adapted to the processing part characteristics for the lathe processing parts by using the optimization algorithm with control stability and control efficiency as the optimization target;
[0088] Model building unit 2, used for using a neural network to perform convolution training on processing part features and CNC lathe control signals to obtain a signal setting model for calculating CNC lathe control signals according to processing part features;
[0089] The model application unit 3 is used to input the processing part characteristics of the lathe processing part to be processed into the signal setting model to obtain the CNC lathe control signal of the lathe processing part to be processed.
[0090] The present invention uses a neural network to perform convolution training on processing part features and CNC lathe control signals to obtain a signal setting model for calculating CNC lathe control signals according to the processing part features, and uses the model to set control signals to achieve stable and efficient processing of the processing parts of the lathe parts to be processed, thereby improving the adaptability of the processed parts and ultimately improving the processing accuracy of the processed parts.
[0091] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A method for setting control signals of a CNC lathe based on a neural network, characterized in that: The following steps are involved: Step S1, obtaining the processing part characteristics of the lathe processing part, and setting the CNC lathe control signal adapted to the processing part characteristics for the lathe processing part by using an optimization algorithm with control stability and control efficiency as optimization targets; Step S2, using a neural network to perform convolution training on the processing part features and the CNC lathe control signal to obtain a signal setting model for calculating the CNC lathe control signal according to the processing part features; Step S3, inputting the processing part characteristics of the lathe part to be processed into the signal setting model to obtain the CNC lathe control signal of the lathe part to be processed, so as to realize stable and efficient processing of the processing part of the lathe part to be processed; The step of obtaining the processing part features of the lathe processing parts comprises: Respectively obtaining the three-dimensional features of the processing part of the lathe processing part before processing and the expected three-dimensional features of the processing part of the lathe processing part after processing; Performing similarity detection on each feature component in the three-dimensional feature before processing and each feature component in the desired three-dimensional feature after processing, and taking all feature components whose similarity is lower than a preset threshold as the processing part feature; The calculation formula of the similarity is: Where P i is the similarity between the i-th feature component in the 3D feature before processing and the i-th feature component in the expected 3D feature after processing, X i is the i-th feature component of the three-dimensional feature before processing, Y i is the i-th characteristic component of the desired three-dimensional feature after processing, i is the metrological constant; The optimization algorithm with control stability and control efficiency as optimization goals sets a CNC lathe control signal adapted to the processing part characteristics for lathe processing parts, including: An objective function with control stability as the optimization target is constructed. The function expression of the objective function with control stability as the optimization target is: In the formula, H is the objective function value with control stability as the optimization goal, S j is the control signal of the CNC lathe for processing the jth processing position in the processing part, n is the total number of processing positions in the processing part, j is a measurement constant, and min is a minimization operator; An objective function with control efficiency as the optimization target is constructed. The function expression of the objective function with control efficiency as the optimization target is: t j =T(S j ); Where F is the objective function value with control efficiency as the optimization goal, t j is the processing time spent at the jth processing position using the CNC lathe control signal of the jth processing position in the processing part, T(S j ) is t j The calculation function of Construct constraints for solving the objective function, and the function expression of the constraints is: In the formula, Z j is the three-dimensional feature of the jth processing position in the processing part, D(S j ) is a conversion function between the control signal of the CNC lathe for processing the jth processing position in the processing part and the processing part feature of the jth processing position in the processing part, S min , S max They are the minimum and maximum control values of the control signal of the CNC lathe respectively; Solving the objective function with control stability as the optimization target and the objective function with control efficiency as the optimization target based on the constraint conditions to obtain a CNC lathe control signal adapted to the processing part characteristics; The method for obtaining the signal setting model includes: The processing part feature is used as an input item of a neural network, the CNC lathe control signal of each processing position in the processing part is used as an output item of the neural network, and the neural network is used to perform convolution training based on the input item and the output item to obtain the signal setting model; The model expression of the signal setting model is: [S j ] n =Model([Z j ] n ); In the formula, [S j ] n is the CNC lathe control signal of each processing position in the processing part, [Z j ] n It is the processing part feature of each processing position in the processing part, and Model is a neural network.
2. The method for setting control signals of a CNC lathe based on a neural network according to claim 1, characterized in that: Input the processing part characteristics of the lathe parts to be processed into the signal setting model to obtain the CNC lathe control signal of the lathe parts to be processed, including: The processing part features of the lathe parts to be processed are obtained, and the processing part features of the lathe parts to be processed at each processing position are input into the signal setting model to obtain the CNC lathe control signal of the lathe parts to be processed at each processing position.
3. The method for setting control signals of a CNC lathe based on a neural network according to claim 2, characterized in that: Each characteristic component in the processing part characteristics is normalized to eliminate dimensional errors.
4. A method for setting control signals of a CNC lathe based on a neural network according to claim 3, characterized in that: Each characteristic component in the three-dimensional feature before processing corresponds to each characteristic component in the three-dimensional feature expected after processing.
5. A method for setting control signals of a CNC lathe based on a neural network according to claim 4, characterized in that: The control signal of the numerically controlled lathe corresponds to the feature of the processing part according to the processing position.
6. A setting system for implementing the neural network-based CNC lathe control signal setting method according to any one of claims 1 to 5, characterized in that: include: A data processing unit (1) is used to obtain the processing part characteristics of the lathe processing part, and set a CNC lathe control signal adapted to the processing part characteristics for the lathe processing part by using an optimization algorithm with control stability and control efficiency as optimization targets; A model building unit (2) is used to use a neural network to perform convolution training on processing part features and CNC lathe control signals to obtain a signal setting model for calculating CNC lathe control signals based on the processing part features; The model application unit (3) is used to input the processing part characteristics of the lathe processing part to be processed into the signal setting model to obtain the CNC lathe control signal of the lathe processing part to be processed.
Citation Information
Patent Citations
System and method for control of numerically controlled lathe based on neural network computing technology
CN107942929A
An intelligent identification and retrieval method for three-dimensional processing characteristics
CN109783887A
