Multi-axis motor adjustment and optimization method based on machine learning

Through the multi-axis motor adjustment and optimization method based on machine learning, the problem of low adaptability and robustness of PID controllers in multi-axis motor systems is solved, and higher stability and operating accuracy are achieved.

CN118826569BActive Publication Date: 2025-05-02SHENZHEN XPENARRAY BIOTECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410787828.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2025-05-02
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

Due to the uncertainty of the model in the multi-axis motor system, the PID controller has low adaptability and robustness, making it difficult to effectively control the nonlinear operating state of the multi-axis motor.

Method used

The multi-axis motor adjustment and optimization method based on machine learning is adopted to obtain the historical operation data of the multi-axis motor, calculate the state coefficient, perform clustering, determine the coordinated loss, and adjust the control parameters based on the real-time operation data to improve the control accuracy.

Benefits of technology

It improves the stability and operating accuracy of the multi-axis motor system, enhances the adaptability and robustness of the controller, and can better adapt to the nonlinear operating state of the multi-axis motor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118826569B_ABST
    Figure CN118826569B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of control and regulation technology, and in particular to a multi-axis motor regulation and optimization method based on machine learning, including: obtaining historical operation data of each axis of the multi-axis motor in multiple sample delivery records; determining the state coefficient of the multi-axis motor in each sample delivery record based on the historical operation data of each axis; clustering the multiple sample delivery records based on the state coefficient of the multi-axis motor in each sample delivery record; determining the synergy loss between the input and output of the multi-axis motor in each cluster of multiple clusters; in response to obtaining the real-time operation data of each axis in the current sample delivery process, determining a target cluster matching the real-time operation data in multiple clusters; and adjusting the control parameters of the multi-axis motor based on the synergy loss corresponding to the target cluster. The method adjusts the control parameters of the multi-axis motor so that the adjusted controller is more adapted to the control requirements of the multi-axis motor under the nonlinear operation state, and improves the stability and operation accuracy of the needle feeding device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of control and regulation technology, and in particular to a multi-axis motor regulation and optimization method based on machine learning in the field of control and regulation technology. Background Art

[0002] High-speed double-needle puncture sample delivery device is a precision medical device, which is often used in biomedical research, clinical diagnosis or other applications that require precise control of sample collection. This device may require precise control of the position, speed and puncture depth of the two needles to ensure the accuracy and safety of sample collection. The use of a multi-axis motor system can independently control the movement of each axis, achieve precise synchronous or asynchronous control of the double needles, and ensure the accuracy of the puncture process.

[0003] Multi-axis motor systems usually require precise control during operation to achieve the accuracy, speed and synchronization of their movements. Installing a programmable logic controller (PLC) in the sample delivery device can accurately control the operation of multi-axis motors through programming logic and integrated proportional integral differential (PID) algorithm. However, PID controllers are usually designed based on the linear model of the system, while actual systems often have nonlinearity, time variation and uncertainty; thus, due to the uncertainty of these models, the adaptability and robustness of PID controllers in actual systems are low. Summary of the invention

[0004] In order to solve the technical problem that the adaptability and robustness of the PID controller in the actual system are low, the purpose of the present invention is to provide a multi-axis motor adjustment and optimization method based on machine learning. The technical solution adopted is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a multi-axis motor adjustment and optimization method based on machine learning, the method comprising:

[0006] Obtain the historical operation data of each axis of the multi-axis motor in multiple sample delivery records;

[0007] Determine the state coefficient of the multi-axis motor in each sample delivery record based on the historical operation data of each axis;

[0008] Based on the state coefficient of the multi-axis motor in each sample delivery record, clustering the multiple sample delivery records to obtain multiple clusters;

[0009] determining, in each of the plurality of clusters, a synergy loss between an input and an output of the multi-axis motor;

[0010] In response to acquiring the real-time operation data of each axis in the current sample delivery process, determining a target cluster matching the real-time operation data from among the multiple clusters;

[0011] Based on the synergy loss corresponding to the target cluster, the control parameters of the multi-axis motor are adjusted.

[0012] In combination with the first aspect above, in some possible implementations, obtaining historical operation data of each axis of the multi-axis motor in multiple sample delivery records includes:

[0013] Acquire the historical power data and historical needle feeding speed data of each axis of the multi-axis motor in the multiple sample feeding records; wherein the historical operation data includes: the historical power data and the historical needle feeding speed data;

[0014] The determining of the state coefficient of the multi-axis motor in each sample delivery record based on the historical operation data of each axis includes:

[0015] Performing short-time Fourier transform on the historical needle feeding speed data of the multi-axis motor in each sample delivery record to obtain a phase spectrum of the historical needle feeding speed data of each axis of the multi-axis motor in each short-time window;

[0016] Determining a local synergy factor within each short-time window based on the phase spectrum;

[0017] Based on the local coordination factor in each short-time window, the state coefficient of the multi-axis motor in each sample delivery record is determined.

[0018] In the above scheme, by calculating the state coefficient of the multi-axis motor in each sample delivery record, the complexity of the instructions executed by the multi-axis motor can be accurately analyzed.

[0019] In combination with the first aspect, in some possible implementations, determining the local synergy factor in each short-time window based on the phase spectrum includes:

[0020] Determining the maximum phase and the minimum phase of the phase spectrum corresponding to each axis of the multi-axis motor within each short-time window;

[0021] Determine the phase difference between the maximum phases of different axes among the axes of the multi-axis motor, and the phase ratio between the maximum phase and the minimum phase of the same axis;

[0022] The phase difference and the phase ratio are fused to obtain the local synergy factor in each short-time window.

[0023] In the above scheme, for each short-time window, the phase difference and phase ratio are calculated respectively through the maximum phase and minimum phase of the phase spectrum corresponding to each axis, so as to accurately analyze the difference in the rate of change of the needle feeding speed of different axes in the short-time window and the time difference between the movements of different axes.

[0024] In combination with the first aspect, in some possible implementations, fusing the phase difference and the phase ratio to obtain the local synergy factor in each short-time window includes:

[0025] Based on the phase ratios corresponding to different axes in the multi-axis motor, determining the difference in the rate of change of the needle feeding speed data of the different axes within each short-time window;

[0026] Fusing the change rate difference and the phase difference to obtain a fusion result;

[0027] The fusion result is normalized to obtain the local synergy factor in each short-time window.

[0028] In the above scheme, for each short-time window, by combining the time difference between the movements of different axes and the difference in the rate of change of the needle feeding speed, the local coordination factor within the short-time window can be accurately obtained, thereby accurately describing the coordinated movement process of different axes.

[0029] In combination with the first aspect, in some possible implementations, determining the state coefficient of the multi-axis motor in each sample delivery record based on the local synergy factor in each short-time window includes:

[0030] Determine the number of short-term windows and the number of classes of local synergy factors of the historical needle feeding speed data in each sample feeding record;

[0031] Determining the coordination of the multi-axis motor in each sample delivery record based on the number of short-time windows and the local coordination factor in each short-time window;

[0032] Determining the consistency of the local synergy factors within a plurality of short-time windows based on the number of classes of the local synergy factors and the local synergy factors of each class;

[0033] The coordination of the multi-axis motor in each sample delivery record and the consistency of the local coordination factors in the multiple short-time windows are integrated to obtain the state coefficient of the multi-axis motor in each sample delivery record.

[0034] In the above scheme, by analyzing the coordination of the multi-axis motor in each sample record and the consistency of the local coordination factors in multiple short-time windows of the sample record, the state coefficient of the multi-axis motor in the sample record is determined, so that the complexity of the instructions executed by the multi-axis motor can be accurately analyzed through the state coefficient.

[0035] In combination with the first aspect, in some possible implementations, determining the synergy of the multi-axis motor in each sample delivery record based on the number of short-time windows and the local synergy factor in each short-time window includes:

[0036] For each sample delivery record, based on the number of short-time windows and the local coordination factors in each short-time window, determine the average value of the local coordination factors in each short-time window in each sample delivery record;

[0037] Based on the local synergy factor mean, the synergy of the multi-axis motor in each sample delivery record is obtained.

[0038] In the above scheme, by calculating the average of the local coordination factors in all short-time windows in the sample delivery record, the coordination of the multi-axis motor in each sample delivery record can be accurately evaluated.

[0039] In combination with the first aspect, in some possible implementations, determining the consistency of the local synergy factors in multiple short-time windows based on the number of classes of the local synergy factors and the local synergy factors of each class includes:

[0040] Determining the probability of each type of local synergy factor in each sample delivery record;

[0041] Determine the information entropy of each type of local synergy factor in each sample delivery record based on the number of types of the local synergy factor and the probability;

[0042] Based on the information entropy, the consistency of the local synergy factors within the multiple short-time windows is determined.

[0043] In the above scheme, for each sample delivery record, the information entropy of all types of local cooperative factors in the sample delivery record can be accurately analyzed through the probabilities of various local system factors in the sample delivery record, so that the consistency of local cooperative factors in all short-time windows can be determined more accurately.

[0044] In combination with the first aspect, in some possible implementations, clustering the multiple sample delivery records based on the state coefficient of the multi-axis motor in each sample delivery record to obtain multiple clusters includes:

[0045] Determine the difference between the state coefficients of the multi-axis motor in any two sample delivery records;

[0046] Based on the state coefficient of the multi-axis motor in each sample delivery record and the difference, the multiple sample delivery records are clustered to obtain multiple clusters of the multiple sample delivery records.

[0047] In the above scheme, the difference between the state coefficients of the multi-axis motor is used as the clustering distance metric, and the state coefficient is used as a feature to cluster multiple sample delivery records, so that multiple clusters can be accurately obtained.

[0048] In combination with the first aspect, in some possible implementations, determining the synergy loss between the input and output of the multi-axis motor in each of the plurality of clusters includes:

[0049] Determine the historical power data of the multi-axis motor as an input end, and the historical needle feeding speed data of the multi-axis motor as an output end;

[0050] Preprocessing the historical power data and the historical needle feeding speed data to obtain processed power data and processed needle feeding speed data;

[0051] In each sample delivery record, respectively determine the power ratio and needle feeding speed ratio of different axes in the multi-axis motor at each moment to obtain a power ratio set and a needle feeding speed ratio set;

[0052] Determine, based on the power ratio set and the needle feeding speed ratio set, the synergy loss corresponding to the multiple sample feeding records to which each cluster in the multiple clusters belongs;

[0053] The synergy loss between the power of the multi-axis motor and the needle feeding speed in each cluster is determined based on the average of the synergy losses corresponding to the multiple sample feeding records to which each cluster belongs.

[0054] In the above scheme, by first determining the collaborative losses corresponding to the multiple sampling records belonging to each cluster, and then analyzing the mean of the collaborative losses corresponding to the multiple sampling records belonging to each cluster, the correlation between the input and output of the multi-axis motor in the sampling records can be accurately obtained, thereby improving the accuracy of the collaborative loss.

[0055] In combination with the first aspect, in some possible implementations, adjusting the control parameters of the multi-axis motor based on the synergy loss corresponding to the target cluster includes:

[0056] Acquire the initial proportional gain coefficient of the multi-axis motor; wherein the control parameter includes: the initial proportional gain coefficient;

[0057] The initial proportional gain coefficient of the multi-axis motor is adjusted using the synergy loss corresponding to the target cluster.

[0058] In the above scheme, for the complex nonlinear operating state of the multi-axis motor, the adjusted PID controller can better adapt to the control requirements of the multi-axis motor and improve the stability and operating accuracy of the needle feeding device.

[0059] In a second aspect, a multi-axis motor adjustment and optimization device based on machine learning is provided, the device comprising:

[0060] An acquisition module is used to acquire historical operation data of each axis of a multi-axis motor in multiple sample delivery records;

[0061] A first determination module, configured to determine a state coefficient of the multi-axis motor in each sample delivery record based on historical operation data of each axis;

[0062] A clustering module, used for clustering the multiple sample delivery records based on the state coefficient of the multi-axis motor in each sample delivery record to obtain multiple clusters;

[0063] A second determination module, configured to determine a synergy loss between an input and an output of the multi-axis motor in each of the plurality of clusters;

[0064] A third determination module is configured to, in response to acquiring the real-time operation data of each axis in the current sample delivery process, determine a target cluster matching the real-time operation data from among the multiple clusters;

[0065] The adjustment module is used to adjust the control parameters of the multi-axis motor based on the coordination loss corresponding to the target cluster.

[0066] In a third aspect, a server is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the device executes the method in the first aspect or any possible implementation of the first aspect.

[0067] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.

[0068] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.

[0069] The present invention has the following beneficial effects: for multiple sample delivery records of a multi-axis motor, by obtaining the historical operation data of each axis of the multi-axis motor, the state coefficient of the multi-axis motor in each sample delivery record is calculated; in this way, the state coefficient can characterize the complexity of the instructions executed by the multi-axis motor in each complete sample delivery process. Afterwards, the multiple sample delivery records are clustered according to the state coefficient of the multi-axis motor in each sample delivery record, and the synergy loss between the input and output of the multi-axis motor in each cluster is calculated; finally, when the real-time operation data of each axis in the current sample delivery process is obtained, the real-time operation data is clustered to analyze the target cluster matching the real-time operation data, so as to adjust the control parameters of the multi-axis motor by using the synergy loss corresponding to the target cluster; in this way, the adjusted PID controller can better adapt to the control requirements under the nonlinear operation state of the multi-axis motor, so as to improve the stability and operation accuracy of the needle feeding device. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0071] Figure 1 It is a schematic diagram of the implementation process of the multi-axis motor adjustment and optimization method based on machine learning provided by an embodiment of the present invention;

[0072] Figure 2 is another implementation flow diagram of the multi-axis motor adjustment and optimization method based on machine learning provided by an embodiment of the present invention;

[0073] Figure 3 It is another implementation flow diagram of the multi-axis motor adjustment and optimization method based on machine learning provided in an embodiment of the present invention;

[0074] Figure 4 is another implementation flow diagram of the multi-axis motor adjustment and optimization method based on machine learning provided in an embodiment of the present invention;

[0075] Figure 5 is another implementation flow diagram of the multi-axis motor adjustment and optimization method based on machine learning provided by an embodiment of the present invention;

[0076] Figure 6 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0077] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a multi-axis motor adjustment and optimization method based on machine learning proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0078] Among them, in the description of the embodiments of the present invention, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present invention, "multiple" refers to two or more than two.

[0079] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0080] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0081] The specific scheme of the multi-axis motor adjustment and optimization method based on machine learning provided by the present invention is described in detail below with reference to the accompanying drawings.

[0082] See also Figure 1 , which shows a flow chart of a multi-axis motor adjustment and optimization method based on machine learning provided by an embodiment of the present invention, the method comprising:

[0083] 101, obtaining historical operation data of each axis of the multi-axis motor in multiple sample delivery records.

[0084] Here, the multi-axis motor may include at least two axes, for example, the multi-axis motor is a dual-axis motor. The multiple sample delivery records are multiple sample delivery processes of the multi-axis motor in the historical time, and each sample delivery record includes a complete sample delivery process. The historical operation data includes the power data and needle delivery speed data of the multi-axis motor.

[0085] In some possible implementations, an integrated sensor is installed in the sample delivery device to collect operation monitoring data of the multi-axis motor during the sample delivery process, including power data of each axis in the multi-axis motor and needle delivery speed data of each axis. The power data of each axis during the operation of the multi-axis motor and the needle delivery speed data of each axis can be obtained from several historical sample delivery records. The actions performed by the multi-axis motor during the sample delivery process are different for different samples. Therefore, after obtaining the historical operation data, the PLC programming text in each sample delivery record is obtained.

[0086] 102. Determine a state coefficient of the multi-axis motor in each sample delivery record based on the historical operation data of each axis.

[0087] Here, the two motor axes of the needle feeding device may move synchronously or move to different degrees. In the collaborative process, the PLC may need to process complex task logic, which will be affected by multiple factors such as PLC memory, cycle, programming complexity, dynamic response, communication delay, etc. The more complex the collaborative process is, the more uncertain factors may be generated. Therefore, the state coefficient of the multi-axis motor is calculated by extracting the local synergy factor. After obtaining the power data and needle feeding speed data of each axis of the multi-axis motor, the needle feeding speed data of multiple motor axes in each sample delivery record are subjected to short-time Fourier transform to extract the local synergy factor in each short-time window. The state coefficient of the multi-axis motor is calculated by the local synergy factor in each short-time window. The state coefficient is used to characterize the complexity of the instructions executed by the multi-axis motor in each complete sample delivery process, that is, the larger the state coefficient, the more complex the instructions executed by the multi-axis motor in each complete sample delivery process. The smaller the state coefficient, the simpler the instructions executed by the multi-axis motor in each complete sample delivery process.

[0088] 103 . Cluster the multiple sample delivery records based on the state coefficient of the multi-axis motor in each sample delivery record to obtain multiple clusters.

[0089] Here, the state coefficient of the multi-axis motor in each sample record is used as a feature, and the absolute value of the difference between the state coefficients of the multi-axis motor in any two sample records is used as a cluster distance metric. K-means clustering is performed on all sample records to obtain several clusters of the sample records, that is, multiple clusters are obtained.

[0090] In some possible implementations, after obtaining the state coefficient of the multi-axis motor in each sample delivery record, clustering can be achieved through the following process:

[0091] First, the difference between the state coefficients of the multi-axis motor in any two sample delivery records is determined.

[0092] Here, for any two sample delivery records among the multiple sample delivery records, the state coefficients in the two sample delivery records are subtracted and their absolute values ​​are calculated, and the absolute value of the difference obtained is used as the cluster distance metric.

[0093] Secondly, based on the state coefficient of the multi-axis motor in each sample delivery record and the difference, the multiple sample delivery records are clustered to obtain multiple clusters of the multiple sample delivery records.

[0094] Here, the state coefficient of the multi-axis motor in each sample delivery record is used as a feature, and the absolute value of the difference between the state coefficients in any two sample delivery records is used as a clustering distance metric to cluster the multiple sample delivery records, thereby dividing the multiple sample delivery records into multiple categories and obtaining multiple clusters of the multiple sample delivery records. In this way, the difference between the state coefficients of the multi-axis motor is used as a clustering distance metric, and the multiple sample delivery records are clustered with the state coefficient as a feature, so that multiple clusters can be accurately obtained.

[0095] 104 , determining a synergy loss between an input and an output of the multi-axis motor in each of the plurality of clusters.

[0096] Here, the power data of the multi-axis motor is used as the input of the multi-axis motor, and the needle feeding speed data is used as the output of the multi-axis motor, and the coordination loss between the input and output of the multi-axis motor in each cluster is calculated.

[0097] In some possible implementations, when the PLC sends a control instruction to the multi-axis motor, the power data of each motor shaft changes, thereby affecting the needle feeding speed of the motor shaft; under control instructions with different state coefficients, the transmission error of the motor shaft power data to the needle feeding speed is different. Therefore, the power of the motor shaft is used as the input end and the needle feeding speed is used as the output end, and the coordinated loss of the input and output ends of the multi-axis motor in each cluster is calculated separately. The coordinated loss of the input and output ends of the sample delivery records in different clusters represents that the multi-axis motor will produce different error amounts under different instruction complexities.

[0098] 105 . In response to acquiring the real-time operation data of each axis in the current sample delivery process, determining a target cluster matching the real-time operation data from among the multiple clusters.

[0099] Here, firstly, a decision tree for classification is obtained; wherein, the decision tree is obtained by training based on the multiple clusters and multiple weak classifiers; then, in response to obtaining the real-time power data and real-time needle feeding speed data of each axis in the current sample delivery process, the decision tree is used to cluster the real-time power data of each axis, the real-time needle feeding speed data and the programming text of the current sample delivery process to obtain the target cluster; wherein, the real-time operation data includes: the real-time power data and the real-time needle feeding speed data. After obtaining multiple clusters, all clusters are combined in pairs to obtain C combinations. Each combination is trained with a weak classifier, and there are C weak classifiers in total. A number of sample delivery record data are set as training sets and validation sets, and trained using the gradient descent method; the trained weak classifier can effectively distinguish which cluster each sample delivery record belongs to; then, a decision tree is generated using the combination of C trained weak classifiers. The decision tree is a combination of multiple weak classifiers, which can also be regarded as a regression model, and the performance of the decision tree is more perfect. In the real-time sample delivery process, the multi-axis motor is first preheated, that is, after running for a certain period of time, the preheating data of the multi-axis motor is obtained. The preheating data is the real-time operation data of the multi-axis motor within the prediction time. The real-time operation data and the PLC programming text of this sample delivery process are input into the trained decision tree. Through the decision tree, this sample delivery process can be matched to its corresponding cluster, that is, the target cluster is obtained. Then, the synergy loss of the input and output ends of the multi-axis motor in the target cluster is obtained, and the synergy loss is used as the predicted value of the synergy loss of this real-time sample delivery process.

[0100] 106. Adjust control parameters of the multi-axis motor based on the synergy loss corresponding to the target cluster.

[0101] Here, the control parameters of the multi-axis motor include: proportional gain coefficient. The initial proportional gain coefficient of the multi-axis motor is adjusted by the synergy loss corresponding to the target cluster. Since the greater the synergy loss, the greater the error generated during the synergy movement of the multi-axis motor, it is necessary to adjust the proportional gain coefficient P of the PID so that the output control amount can be stably output in the nonlinear operating state of the PID.

[0102] In some possible implementations, the initial proportional gain coefficient is adjusted by the synergy loss corresponding to the target cluster to improve the accuracy of the needle feeding device, that is, the above step 106 can be implemented by steps 161 and 162 (not shown in the figure):

[0103] 161, obtaining an initial proportional gain coefficient of the multi-axis motor.

[0104] Here, the control parameters include: initial proportional gain coefficient. The initial proportional gain coefficient is obtained by using the Ziegler-Nichols method. .

[0105] 162. Using the synergy loss corresponding to the target cluster, adjust the initial proportional gain coefficient of the multi-axis motor.

[0106] Here, the proportional gain coefficient adjusted by the predicted value of the coordinated loss of the real-time sample delivery process is used. , as shown in formula (1):

[0107] (1);

[0108] Among them, y represents the real-time sample delivery process, Represents the synergy loss of the real-time sample delivery process; the greater the synergy loss, the more uncertain factors may be generated, the greater the error, and the larger the proportional gain coefficient needs to be. In this way, for the complex nonlinear operating state of the multi-axis motor, the adjusted PID controller can better adapt to the control requirements of the multi-axis motor and improve the stability and operating accuracy of the needle delivery device.

[0109] In an embodiment of the present invention, since each axis of the multi-axis motor can work independently or collaboratively, each motor axis will have a dedicated motor controller, and the controller of each motor axis is regarded as a sub-controller; the PLC is responsible for coordinating the movement of each axis, and the control unit receives high-level instructions and decomposes the high-level instructions into control commands for a single motor axis; since the instructions generated by the control system must have losses and errors when reaching the output end, the PLC can output accurate control values ​​and compensate for errors through integrated PID, but this process is not a linear transmission relationship. Additional influencing factors may be derived under different operating states of the motor, thereby generating different errors. Therefore, the parameters of PID cannot stably output the control value under such nonlinear operating state. Based on this, in an embodiment of the present invention, the control parameters of the multi-axis motor are adjusted by machine learning. Ensemble learning is a branch of machine learning, and the basic idea of ​​ensemble learning is to combine multiple weak classifiers into an integrated classifier. Machine learning is used to classify and decide the operating state of the multi-axis motor, and the PID parameters are adjusted to adaptively generate power compensation according to different operating states of the motor, so that the needle feeding speed at the output end can obtain a more accurate control effect.

[0110] In the above steps 101 to 106, the state coefficient of the multi-axis motor in each sample delivery record is calculated by obtaining the historical operation data of each axis of the multi-axis motor; in this way, the state coefficient can characterize the complexity of the instructions executed by the multi-axis motor in each complete sample delivery process. Afterwards, multiple sample delivery records are clustered according to the state coefficient of the multi-axis motor in each sample delivery record, and the synergy loss between the input and output of the multi-axis motor in each cluster is calculated; finally, when the real-time operation data of each axis in the current sample delivery process is obtained, the real-time operation data is clustered to analyze the target cluster matching the real-time operation data, so as to adjust the control parameters of the multi-axis motor by using the synergy loss corresponding to the target cluster; in this way, the adjusted PID controller can better adapt to the control requirements under the nonlinear operation state of the multi-axis motor, so as to improve the stability and operation accuracy of the needle feeding device.

[0111] In some embodiments, for each sample delivery record in the multiple sample delivery records, the state coefficient of the multi-axis motor is calculated by extracting the local synergy factor in each short-time window, that is, the above step 102 can be performed by Figure 2 The steps shown achieve:

[0112] 201 , obtaining historical power data and historical needle feeding speed data of each axis of the multi-axis motor in the multiple sample feeding records.

[0113] Wherein, the historical operation data includes: the historical power data and the historical needle feeding speed data.

[0114] 202 , performing short-time Fourier transform on the historical needle feeding speed data of the multi-axis motor in each sample feeding record to obtain a phase spectrum of the historical needle feeding speed data of each axis of the multi-axis motor in each short-time window.

[0115] Here, the coordinated instruction of multiple motor axes is generally realized by adjusting the phase of the motion data of multiple motor axes, so the needle feeding speed data of multiple motor axes in each sample delivery record is subjected to short-time Fourier transform. The short-time Fourier transform has timing information, and the length of the short-time window can be set to L to obtain the phase spectrum of each short-time window of the historical needle feeding speed data of each motor axis in each sample delivery record.

[0116] 203. Determine a local synergy factor in each short-time window based on the phase spectrum.

[0117] Here, the maximum phase and minimum phase of each motor axis are determined by converting the phase spectrum into a calculable value, and the local synergy factor in each short-time window is calculated by the maximum phase and the minimum phase. The local synergy factor is used to describe the position difference information of the motion posture of the multi-axis motor and the difference in the change rate of the needle feeding speed.

[0118] In some embodiments, for any short-time window during short-time Fourier transform, the local synergy factor in the short-time window is analyzed by the maximum phase and the minimum phase of the phase spectrum corresponding to each axis, that is, the above step 203 can be performed by Figure 3 The steps shown achieve:

[0119] 301 , determining the maximum phase and the minimum phase of the phase spectrum corresponding to each axis of the multi-axis motor within each short-time window.

[0120] Here, for each short-time window in each sample delivery record, the maximum phase and the minimum phase of each axis of the multi-axis motor in each short-time window are determined respectively.

[0121] 302 , determine a phase difference between maximum phases of different axes among the axes, and a phase ratio between a maximum phase and a minimum phase of the same axis.

[0122] Here, within a short time window, the maximum phases of different axes of the multi-axis motor are subtracted to obtain the phase difference, and the maximum phase of the same axis is divided by the minimum phase to obtain the phase ratio. In this way, the phase difference can represent the time difference between the movements of different axes, and describe the position difference information of the motion posture of the multi-axis motor. The phase ratio can represent the rate of change of the needle feeding speed of an axis within a short time window.

[0123] 303 , fusing the phase difference and the phase ratio to obtain a local synergy factor in each short-time window.

[0124] Here, after obtaining the phase ratio of each axis, the phase ratios of different axes are subtracted, the subtraction result is multiplied by the phase difference, and the multiplication result is normalized to obtain the local synergy factor within the short-time window. In this way, for each short-time window, the phase difference and the phase ratio are calculated respectively through the maximum phase and minimum phase of the phase spectrum corresponding to each axis, so that the difference in the rate of change of the needle feeding speed of different axes within the short-time window and the time difference of the movement of different axes can be accurately analyzed.

[0125] In some possible implementations, by analyzing the difference in the change rate and phase difference of the needle feeding speed, the local synergy factor in each short-time window is obtained, that is, the above step 303 can be implemented by the following steps 331 to 333 (not shown in the figure):

[0126] 331. Based on the phase ratios corresponding to different axes in the multi-axis motor, determine the difference in the rate of change of the needle feeding speed data of the different axes within each short-time window.

[0127] Here, the phase ratios of different axes are subtracted, and the difference obtained is the difference in the change rates of the needle feeding speed data of different axes, so as to represent the difference in the change rates of the needle feeding speed data of different axes within the short-time window.

[0128] 332, fuse the change rate difference and the phase difference to obtain a fusion result.

[0129] Here, the change rate difference and the phase difference are multiplied to obtain the fusion result. In this way, the change rate difference and the phase difference of the needle feeding speed data of different axes in a short time window are comprehensively considered in the fusion result.

[0130] 333, normalize the fusion result to obtain the local synergy factor in each short-time window.

[0131] Here, the deviation normalization function is used to normalize the fusion result, and the normalized result is subtracted from the constant 1. The difference is the local synergy factor in each short-time window. In this way, for each short-time window, by combining the time difference of the movement of different axes and the difference in the rate of change of the needle feeding speed, the local synergy factor in the short-time window can be accurately obtained, thereby accurately describing the coordinated movement process of different axes.

[0132] In some possible implementations, taking the multiple axes of a multi-axis motor as dual motor axes as an example, since the coordinated instructions of the dual motor axes are realized by adjusting the phase of the motion data of the two motor axes, the needle feeding speed data of the two motor axes in each sample delivery record are short-time Fourier transformed, and the short-time window is L, to obtain the phase spectrum of each short-time window of the needle feeding speed data of each motor axis in each sample delivery record.

[0133] To convert the phase value into a calculable value, the trigonometric function after translation can be used , convert each phase value to between 0 and 2.

[0134] The difference between the local phase spectra of the needle feeding speed data of the two motor axes can accurately describe the coordinated motion process of the two axes; the local synergy factor in the s-th short-time window , as shown in formula (2):

[0135] (2);

[0136] Among them, a and b represent two motor axes respectively, and s represents any short-term window in the needle feeding speed data of one of the motor axes in any sample feeding record. Represents the maximum phase in the sth short-time window of the needle feeding speed data of the ath motor axis of any sample feeding record, Represents the minimum phase in the sth short-time window of the needle feeding speed data of the ath motor axis of any sample feeding record; Represents the maximum phase in the sth short-time window of the needle feeding speed data of the bth motor axis of any sample feeding record; represents the minimum phase in the sth short-time window of the needle feeding speed data of the bth motor axis of any sample feeding record; norm() represents the deviation normalization function; Represents the local synergy factor within the s-th short-time window.

[0137] Represents the phase difference between the maximum phase values ​​of the a and b motors in the s-th short-time window in any sample record. The larger the phase value, the earlier the motor shaft moves, that is, the earlier it is in the timing sequence; therefore, the maximum phase value difference between the a and b motors in the s-th short-time window represents the time difference between the a and b motor shafts moving successively; that is, it describes the position difference information of the dual-axis motor motion posture.

[0138] Represents the ratio of the minimum phase to the maximum phase in the sth short-time window of the needle feeding speed data of the ath motor axis of any sample delivery record. This ratio represents the change rate of the needle feeding speed of the ath motor axis in the sth short-time window in the timing. The smaller the ratio, the faster the change of the needle feeding speed. Similarly, It represents the rate of change of the needle feeding speed of the bth motor axis in the sth short-time window in the timing. It represents the difference in the rate of change of the needle feeding speed of the two motor axes a and b in the sth short-time window in the timing, that is, it describes the variation information of the motion posture of the dual-axis motor.

[0139] The absolute value of the product of the position difference information and the variation information of the dual-axis motor is normalized and then differed from the constant 1, which represents the local coordination of the dual-axis motor in the s-th short-time window in the time series, called the local coordination factor in the s-th short-time window. .

[0140] 204 , determining a state coefficient of the multi-axis motor in each sample delivery record based on the local coordination factor in each short-time window.

[0141] Here, after obtaining the local coordination factor of each short-time window in multiple short-time windows, for a sample delivery record, the state coefficient of the multi-axis motor in the sample delivery record is calculated by the local coordination factor in each short-time window. The state coefficient can describe the complexity of the instructions executed by the multi-axis motor. In this way, by calculating the state coefficient of the multi-axis motor in each sample delivery record, the complexity of the instructions executed by the multi-axis motor can be accurately analyzed.

[0142] In some embodiments, by analyzing the coordination of the multi-axis motor in each sample delivery record and the consistency of the local coordination factors in multiple short-time windows of the sample delivery record, the state coefficient of the multi-axis motor in the sample delivery record is determined, so that the complexity of the instructions executed by the multi-axis motor can be accurately analyzed through the state coefficient. That is, the above step 204 can be performed by Figure 4 The steps shown achieve:

[0143] 401, determining the number of short-term windows of the historical needle feeding speed data and the number of classes of the local coordination factor in each sample feeding record.

[0144] Here, multiple local synergy factors are classified according to their numerical values, thereby obtaining the number of classes of local synergy factors.

[0145] 402 : Determine the coordination of the multi-axis motor in each sample delivery record based on the number of short-time windows and the local coordination factor in each short-time window.

[0146] In some possible implementations, for each sample delivery record, first, based on the number of short-time windows and the local synergy factors in each short-time window, the average value of the local synergy factors in each short-time window in each sample delivery record is determined.

[0147] Here, in one sample delivery record, the sum of the local coordination factors in each short-time window is calculated, and combined with the number of short-time windows, the mean value of the local coordination factors of each short-time window in the sample delivery record is determined.

[0148] Then, based on the local synergy factor mean, the synergy of the multi-axis motor in each sample delivery record is obtained.

[0149] Here, the synergy of the multi-axis motor in the sample record is described by the mean of the local synergy factor in the sample record. In this way, by calculating the mean of the local synergy factor in all short-time windows in the sample record, the synergy of the multi-axis motor in each sample record can be accurately evaluated.

[0150] 403 : Determine the consistency of the local synergy factors in multiple short-time windows based on the number of categories of the local synergy factors and each category of local synergy factors.

[0151] Here, the information entropy of each type of local synergy factor in a sample delivery record is calculated by the probability of each type of local synergy factor in the sample delivery record, and the consistency of the local synergy factors in multiple short-time windows is represented by the information entropy.

[0152] In some possible implementations, first, the probability of each type of local synergy factor in each sample delivery record is determined.

[0153] Here, after a plurality of local synergy factors in a sample delivery record are classified, the probability of each type of local synergy factor in the sample delivery record is determined respectively.

[0154] Secondly, based on the number of classes of the local synergy factors and the probabilities, the information entropy of each type of local synergy factors in each sample delivery record is determined.

[0155] Here, by combining the probabilities of multiple types of local synergy factors, the information entropy of all types of local synergy factors in the sample delivery record is obtained. The information entropy can be used to represent the consistency of local synergy factors in multiple short-time windows in a sample delivery record.

[0156] Finally, based on the information entropy, the consistency of the local synergy factors in the multiple short-time windows is determined. In this way, for each sample delivery record, the information entropy of all types of local synergy factors in the sample delivery record can be accurately analyzed through the probability of various types of local system factors in the sample delivery record, so that the consistency of the local synergy factors in all short-time windows can be determined more accurately.

[0157] In some possible implementations, taking the multi-axis motor as a dual-axis motor as an example, during the needle feeding process of the sample feeding device, the dual-axis motor may perform simple synchronous coordinated actions, or may perform non-coordinated actions separately, or even perform multiple non-coordinated actions separately. When the needle feeding process is simpler, the dual-axis motor is almost synchronously coordinated throughout the entire process, and the local coordination factors of all its short-time windows should be consistent; on the contrary, when the needle feeding process is more complex, the dual-axis motor exhibits different local coordination factors at different short-time window positions, so the state coefficient of the multi-axis motor is calculated based on the local coordination factor.

[0158] The local coordination factors of all short-time windows in the needle speed data of each sample delivery record are divided into several categories according to the values; the state coefficient of the dual-axis motor in the nth sample delivery record , as shown in formula (3):

[0159] (3);

[0160] Among them, n represents the nth sample delivery record, s represents the sth short-time window, and N represents the number of all short-time windows in the needle delivery speed data of the nth sample delivery record. represents the local synergy factor of the s-th short-time window in the n-th sample delivery record; v represents the v-th type of local synergy factor, Q represents the number of classes of all local synergy factors in the needle delivery speed data of the n-th sample delivery record, represents the vth type of local synergy factor in the nth sample delivery record, represents the probability of the vth type of local synergy factor in the nth sample delivery record; th() represents the hyperbolic tangent function;

[0161] Represents the average value of the local synergy factor of all short-time windows in the nth sample delivery record. The larger the value, the higher the synergy of the dual-axis motor in the sample delivery process; Represents the information entropy of all types of local cooperative factors in the nth sample delivery record. The smaller the entropy value, the closer the local cooperative factors in all short-time windows are to each other, that is, the simpler the motion state of the dual-axis motor in the needle delivery process. On the contrary, the larger the entropy value, the more differences there are in the local cooperative factors in all short-time windows, which means that the dual-axis motor has multiple non-cooperative movements in this sample delivery record, and the more complex the needle delivery process. The product of the two is used as the state coefficient of the dual-axis motor in the nth sample delivery record. The state coefficient is used to characterize the complexity of the instructions executed by the multi-axis motor in each complete sample delivery process. The larger the product, the larger the state coefficient, that is, the higher the complexity of the instructions executed by the dual-axis motor.

[0162] 404 , the coordination of the multi-axis motor in each sample delivery record and the consistency of the local coordination factors in the multiple short-time windows are integrated to obtain the state coefficient of the multi-axis motor in each sample delivery record.

[0163] Here, by combining the coordination of the multi-axis motors in each sample delivery record and consistency of local synergy factors in multiple short time windows The product obtained by multiplying is the state coefficient of the multi-axis motor described in each sample delivery record.

[0164] In some embodiments, by first determining the synergy loss corresponding to the multiple sample delivery records to each cluster, and then analyzing the mean of the synergy loss corresponding to the multiple sample delivery records to each cluster, the correlation between the input and output of the multi-axis motor in the sample delivery record can be accurately obtained, thereby improving the accuracy of the synergy loss. That is, the above step 104 can be performed by Figure 5 The steps shown achieve:

[0165] 501, determining the historical power data of the multi-axis motor as an input end and the historical needle feeding speed data of the multi-axis motor as an output end.

[0166] Here, when the PLC sends a control command to the multi-axis motor, the power data of each motor shaft changes, which in turn affects the needle feeding speed of the motor shaft; under control commands with different state coefficients, the transmission error caused by the motor shaft power data to the needle feeding speed is different. Therefore, the motor shaft power is used as the input end and the needle feeding speed is used as the output end, and the synergy loss of the input and output ends of the multi-axis motor in each cluster is calculated separately.

[0167] 502, pre-processing the historical power data and the historical needle feeding speed data to obtain processed power data and processed needle feeding speed data.

[0168] Here, the historical power data and historical needle feeding speed data of multiple motor shafts of each sample feeding record in each cluster are respectively standardized to eliminate the unit dimension, and the processed power data and the processed needle feeding speed data are obtained.

[0169] 503, in each sample delivery record, respectively determine the power ratio and needle delivery speed ratio of different axes in the multi-axis motor at each moment, and obtain a power ratio set and a needle delivery speed ratio set.

[0170] 504 : Determine, based on the power ratio set and the needle feeding speed ratio set, the coordination loss corresponding to the multiple sample feeding records belonging to each cluster in the multiple clusters.

[0171] 505 , determining the synergy loss between the power of the multi-axis motor and the needle feeding speed in each cluster based on the average of the synergy losses corresponding to the multiple sample feeding records to which each cluster belongs.

[0172] In the above steps 503 to 505, taking the multi-axis motor as a dual-axis motor as an example, in each sample delivery record, the power ratio of the two motor axes at each moment is obtained, and then the set of power ratios in each sample delivery record is obtained, that is, the power ratio set, recorded as G; and the needle delivery speed ratio at each moment, and then the set of needle delivery speed ratios in each sample delivery record is obtained, that is, the needle delivery speed ratio set, recorded as H; the coordinated loss of the input and output ends of the multi-axis motor in the mth cluster As shown in formula (4):

[0173] (4);

[0174] Among them, m represents the mth cluster, x represents the xth sample delivery record, Represents the number of sample data in the mth cluster, represents the set of dual motor shaft power ratios of the xth sample record in the mth cluster, Represents the set of dual motor shaft needle feeding speed ratios of the xth sample feeding record in the mth cluster; represents the Pearson correlation coefficient;

[0175] Represents the set of dual motor shaft power ratios of the xth sample record in the mth cluster A collection of ratios to needle feed speed The absolute value of the Pearson correlation coefficient, which can describe the correlation between two sets, is a constant 1 and its phase difference correction logic, that is, the larger the difference, the smaller the correlation between the input and output ends of the multi-axis motor in the x-th sample delivery record, that is, the greater the synergy loss;

[0176] The synergy loss of all sample records in the mth cluster is averaged to obtain the synergy loss of the input and output ends of the multi-axis motor in the mth cluster. .

[0177] The embodiment of the present invention utilizes machine learning technology to extract the local coordination factor of the multi-axis motor for the historical sample delivery record, which describes the position difference information and variation information of the motion posture of the dual-axis motor; then obtains the state coefficient of the multi-axis motor in each historical sample delivery record, which is used to characterize the complexity of the instructions executed by the multi-axis motor in each complete sample delivery process; then clusters all sample delivery records according to the sample delivery records with different state coefficients, and uses each cluster cluster to describe the multi-axis motor operating environment under different instruction complexities. Then, calculate the coordination loss of the input and output ends of the multi-axis motor in each cluster; and use the weak classifier of machine learning to train a decision tree with classification of all sample delivery record data, and use the decision tree to obtain the predicted value of the coordination loss of the real-time sample delivery process, and then adjust the control parameters of the dual-axis motor. The adjusted PID controller can better adapt to the control requirements under the nonlinear operating state of the multi-axis motor, and improve the stability and operation accuracy of the needle feeding device.

[0178] An embodiment of the present invention provides a multi-axis motor adjustment and optimization device based on machine learning, the device comprising:

[0179] An acquisition module is used to acquire historical operation data of each axis of a multi-axis motor in multiple sample delivery records;

[0180] A first determination module, configured to determine a state coefficient of the multi-axis motor in each sample delivery record based on historical operation data of each axis;

[0181] A clustering module, used for clustering the multiple sample delivery records based on the state coefficient of the multi-axis motor in each sample delivery record to obtain multiple clusters;

[0182] A second determination module, configured to determine a synergy loss between an input and an output of the multi-axis motor in each of the plurality of clusters;

[0183] A third determination module is configured to, in response to acquiring the real-time operation data of each axis in the current sample delivery process, determine a target cluster matching the real-time operation data from among the multiple clusters;

[0184] The adjustment module is used to adjust the control parameters of the multi-axis motor based on the coordination loss corresponding to the target cluster.

[0185] In the above device, the acquisition module is further used to acquire the historical power data and historical needle feeding speed data of each axis of the multi-axis motor in the multiple sample feeding records; wherein the historical operation data includes: the historical power data and the historical needle feeding speed data; the clustering module is further used to perform short-time Fourier transform on the historical needle feeding speed data of the multi-axis motor in each sample feeding record to obtain the phase spectrum of the historical needle feeding speed data of each axis of the multi-axis motor in each short-time window;

[0186] Based on the phase spectrum, a local coordination factor in each short-time window is determined; based on the local coordination factor in each short-time window, a state coefficient of the multi-axis motor in each sample delivery record is determined.

[0187] In the above-mentioned device, the clustering module is also used to determine the maximum phase and minimum phase of the phase spectrum corresponding to each axis of the multi-axis motor within each short-time window; determine the phase difference between the maximum phases of different axes among the axes, and the phase ratio between the maximum phase and the minimum phase of the same axis; and fuse the phase difference and the phase ratio to obtain the local synergy factor within each short-time window.

[0188] In the above-mentioned device, the clustering module is also used to determine the difference in the change rates of the needle feeding speed data of the different axes in the multi-axis motor within each short-time window based on the phase ratio values ​​corresponding to the different axes in the multi-axis motor; fuse the change rate difference and the phase difference to obtain a fusion result; normalize the fusion result to obtain the local synergy factor within each short-time window.

[0189] In the above-mentioned device, the clustering module is also used to determine the number of short-time windows of the historical needle feeding speed data and the number of classes of local coordination factors in each sample delivery record; based on the number of short-time windows and the local coordination factors in each short-time window, determine the coordination of the multi-axis motor in each sample delivery record; based on the number of classes of local coordination factors and various types of local coordination factors, determine the consistency of local coordination factors in multiple short-time windows; merge the coordination of the multi-axis motor in each sample delivery record and the consistency of the local coordination factors in the multiple short-time windows to obtain the state coefficient of the multi-axis motor in each sample delivery record.

[0190] In the above-mentioned device, the clustering module is also used to determine, for each sample delivery record, the mean of the local synergy factors within each short-time window in the sample delivery record based on the number of short-time windows and the local synergy factors within each short-time window; and obtain the synergy of the multi-axis motor in each sample delivery record based on the mean of the local synergy factors.

[0191] In the above-mentioned device, the clustering module is also used to determine the probability of each type of local synergy factor in each sample delivery record; based on the number of categories of the local synergy factors and the probability, determine the information entropy of each type of local synergy factor in each sample delivery record; based on the information entropy, determine the consistency of the local synergy factors within the multiple short-time windows.

[0192] In the above device, the clustering module is also used to determine the difference between the state coefficients of the multi-axis motor in any two sample delivery records; based on the state coefficient of the multi-axis motor in each sample delivery record and the difference, the multiple sample delivery records are clustered to obtain multiple clusters of the multiple sample delivery records.

[0193] In the above-mentioned device, the second determination module is used to: determine the historical power data of the multi-axis motor as the input end, and the historical needle feeding speed data of the multi-axis motor as the output end; pre-process the historical power data and the historical needle feeding speed data to obtain processed power data and processed needle feeding speed data; in each sample feeding record, respectively determine the power ratio and needle feeding speed ratio of different axes in the multi-axis motor at each moment to obtain a power ratio set and a needle feeding speed ratio set; based on the power ratio set and the needle feeding speed ratio set, determine the synergy loss corresponding to multiple sample feeding records belonging to each cluster in the multiple clusters; based on the mean of the synergy losses corresponding to the multiple sample feeding records belonging to each cluster, determine the synergy loss between the power and the needle feeding speed of the multi-axis motor in each cluster.

[0194] In the above-mentioned device, the adjustment module is also used to obtain the initial proportional gain coefficient of the multi-axis motor; wherein the control parameters include: the initial proportional gain coefficient; and adjusting the initial proportional gain coefficient of the multi-axis motor by using the synergy loss corresponding to the target cluster.

[0195] Optionally, the transmission medium can be a wired link (such as but not limited to coaxial cable, optical fiber and digital subscriber line (DSL)) or a wireless link (such as but not limited to wireless Fidelity (WIFI), Bluetooth and mobile device network).

[0196] It should be noted that: the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the shopping guide device provided in the above embodiment and the image extension method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0197] Figure 6 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Figure 6 As shown, the computer device 600 includes: a memory 601, a processor 602, and a computer program 603 stored in the memory 601 and running on the processor 602, wherein when the processor 602 executes the computer program 603, the computer device can execute any of the multi-axis motor adjustment and optimization methods based on machine learning introduced above.

[0198] In addition, an embodiment of the present invention also protects a device, which may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to execute the multi-axis motor adjustment and optimization method based on machine learning provided by an embodiment of the present invention.

[0199] In this embodiment, the functional modules of the device can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0200] In the case of dividing each module according to each function, the device may also include a signal uploading module, a determining module, an adjusting module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0201] It should be understood that the device provided in this embodiment is used to execute the above-mentioned multi-axis motor adjustment and optimization method based on machine learning, and thus can achieve the same effect as the above-mentioned implementation method.

[0202] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a device, the processing module may be used to control and manage the actions of the device. The storage module may be used to support the device to execute mutual program codes, etc. The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor may also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0203] In addition, the device provided by the embodiments of the present invention may specifically be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute the multi-axis motor adjustment and optimization method based on machine learning provided in the above embodiments.

[0204] This embodiment also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is run on a computer, the computer executes the above-mentioned related method steps to implement the multi-axis motor adjustment and optimization method based on machine learning provided in the above embodiment.

[0205] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer executes the above-mentioned related steps to implement the multi-axis motor adjustment and optimization method based on machine learning provided in the above embodiment. Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here. Through the description of the above implementation mode, the technicians in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In practical applications, the above-mentioned function allocation can be completed by different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In the embodiments provided by the present invention, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiment described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, which may be electrical, mechanical or other forms.

[0206] It should be noted that the sequence of the above embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0207] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0208] The above contents are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A multi-axis motor adjustment and optimization method based on machine learning, characterized in that: The method comprises: Obtain the historical operation data of each axis of the multi-axis motor in multiple sample delivery records; Determining the state coefficient of the multi-axis motor in each sample delivery record based on the historical operation data of each axis, including: performing a short-time Fourier transform on the historical needle feeding speed data of the multi-axis motor in each sample delivery record to obtain a phase spectrum of the historical needle feeding speed data of each axis of the multi-axis motor in each short-time window; For each short-time window in each sample delivery record, respectively determine the maximum phase and the minimum phase of each axis of the multi-axis motor in each short-time window; Determine the phase difference between the maximum phases of different axes among the axes of the multi-axis motor, and the phase ratio between the maximum phase and the minimum phase of the same axis; The phase difference and the phase ratio are merged to obtain a local coordination factor in each short-time window, and a state coefficient of the multi-axis motor in each sample delivery record is determined based on the local coordination factor in each short-time window; Based on the state coefficient of the multi-axis motor in each sample delivery record, clustering the multiple sample delivery records to obtain multiple clusters; determining, in each of the plurality of clusters, a synergy loss between an input and an output of the multi-axis motor; In response to acquiring the real-time operation data of each axis in the current sample delivery process, determining a target cluster matching the real-time operation data from among the multiple clusters; Based on the synergy loss corresponding to the target cluster, the control parameters of the multi-axis motor are adjusted.

2. The multi-axis motor adjustment and optimization method based on machine learning according to claim 1 is characterized in that: The obtaining of historical operation data of each axis of the multi-axis motor in multiple sample delivery records includes: Acquire the historical power data and historical needle feeding speed data of each axis of the multi-axis motor in the multiple sample feeding records; wherein the historical operation data includes: the historical power data and the historical needle feeding speed data; The determining of the state coefficient of the multi-axis motor in each sample delivery record based on the historical operation data of each axis includes: Determining a local synergy factor within each short-time window based on the phase spectrum; Based on the local coordination factor in each short-time window, the state coefficient of the multi-axis motor in each sample delivery record is determined.

3. The multi-axis motor adjustment and optimization method based on machine learning according to claim 1 is characterized in that: The fusing of the phase difference and the phase ratio to obtain the local synergy factor in each short-time window includes: Based on the phase ratios corresponding to different axes in the multi-axis motor, determining the difference in the rate of change of the needle feeding speed data of the different axes within each short-time window; Fusing the change rate difference and the phase difference to obtain a fusion result; The fusion result is normalized to obtain the local synergy factor in each short-time window.

4. The multi-axis motor adjustment and optimization method based on machine learning according to claim 2 is characterized in that: The determining, based on the local coordination factor in each short-time window, the state coefficient of the multi-axis motor in each sample delivery record comprises: Determine the number of short-term windows and the number of classes of local synergy factors of the historical needle feeding speed data in each sample feeding record; Determining the coordination of the multi-axis motor in each sample delivery record based on the number of short-time windows and the local coordination factor in each short-time window; Determining the consistency of the local synergy factors within a plurality of short-time windows based on the number of classes of the local synergy factors and the local synergy factors of each class; The coordination of the multi-axis motor in each sample delivery record and the consistency of the local coordination factors in the multiple short-time windows are integrated to obtain the state coefficient of the multi-axis motor in each sample delivery record.

5. The multi-axis motor adjustment and optimization method based on machine learning according to claim 4 is characterized in that: The determining, based on the number of short-time windows and the local coordination factor in each short-time window, the coordination of the multi-axis motor in each sample delivery record comprises: For each sample delivery record, based on the number of short-time windows and the local coordination factors in each short-time window, determine the average value of the local coordination factors in each short-time window in each sample delivery record; Based on the local synergy factor mean, the synergy of the multi-axis motor in each sample delivery record is obtained.

6. The multi-axis motor adjustment and optimization method based on machine learning according to claim 4 is characterized in that: The determining of the consistency of the local synergy factors in multiple short-time windows based on the number of classes of the local synergy factors and the various types of local synergy factors includes: Determining the probability of each type of local synergy factor in each sample delivery record; Determine the information entropy of each type of local synergy factor in each sample delivery record based on the number of types of the local synergy factor and the probability; Based on the information entropy, the consistency of the local synergy factors within the multiple short-time windows is determined.

7. The multi-axis motor adjustment and optimization method based on machine learning according to claim 1 is characterized in that: The clustering of the multiple sample delivery records based on the state coefficient of the multi-axis motor in each sample delivery record to obtain multiple clusters includes: Determine the difference between the state coefficients of the multi-axis motor in any two sample delivery records; Based on the state coefficient of the multi-axis motor in each sample delivery record and the difference, the multiple sample delivery records are clustered to obtain multiple clusters of the multiple sample delivery records.

8. The multi-axis motor adjustment and optimization method based on machine learning according to claim 1 is characterized in that: The determining of the synergy loss between the input and the output of the multi-axis motor in each of the plurality of clusters comprises: Determine the historical power data of the multi-axis motor as an input end, and the historical needle feeding speed data of the multi-axis motor as an output end; Preprocessing the historical power data and the historical needle feeding speed data to obtain processed power data and processed needle feeding speed data; In each sample delivery record, respectively determine the power ratio and needle feeding speed ratio of different axes in the multi-axis motor at each moment to obtain a power ratio set and a needle feeding speed ratio set; Determine, based on the power ratio set and the needle feeding speed ratio set, the synergy loss corresponding to the multiple sample feeding records to which each cluster in the multiple clusters belongs; The synergy loss between the power of the multi-axis motor and the needle feeding speed in each cluster is determined based on the average of the synergy losses corresponding to the multiple sample feeding records to which each cluster belongs.

9. The multi-axis motor adjustment and optimization method based on machine learning according to claim 1 is characterized in that: The adjusting the control parameters of the multi-axis motor based on the synergy loss corresponding to the target cluster includes: Acquire the initial proportional gain coefficient of the multi-axis motor; wherein the control parameter includes: the initial proportional gain coefficient; The initial proportional gain coefficient of the multi-axis motor is adjusted using the synergy loss corresponding to the target cluster.

Citation Information

Patent Citations

  • Adjustment device and adjustment device for servo parameter

    JP2022086719A

  • Energy efficient machine learning models

    US20210158145A1