Motor control device and motor control method
Patent Information
- Application Number
- JP2021161476
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2041-09-30
AI Technical Summary
【0010】 本開示に係るモータ制御装置は、少ない計算負荷で精度が高い摩擦補償を調整することができるという効果を奏する。
Smart Images

Figure 0007634458000016 
Figure 0007634458000017 
Figure 0007634458000018
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a motor control device and a motor control method that perform trajectory control of a control target. [Background technology]
[0002] In motor control devices that drive machines such as machine tools and robots, trajectory control is performed to drive the machine according to commands. When trajectory control is performed, a challenge is how to compensate for trajectory errors caused by the influence of frictional forces acting on the machine. Conventionally, a compensation method is known that reduces the influence of frictional forces by calculating a torque that offsets the frictional forces using a friction model that simulates the frictional forces acting on the machine and applying the calculated torque to a torque command.
[0003] The higher the accuracy of the friction model, the more accurate the trajectory control with reduced influence of friction force becomes. The simplest friction model is a linear friction model in which the motor speed and friction are proportional to each other, but this friction model may have difficulty in simulating the friction force with high accuracy. In an actual machine, the machine and the motor are connected via machine components such as a ball screw or a reducer. The influence of the bearings and lubricating oil of the machine components appears as a nonlinear component in friction with respect to the motor speed. Conventionally, a technology is known in which friction with nonlinearity is modeled and the obtained friction model is used to perform friction compensation.
[0004] Patent Document 1 discloses a motor control device having a speed feedforward control section. The speed feedforward control section has a speed-side acceleration input section that outputs an input upper command acceleration as a speed-side acceleration output, a speed-side speed input section that outputs an input upper command speed as a speed-side speed output, a plurality of speed-side boundary speed input sections that are prepared corresponding to a plurality of boundary speeds that are boundaries of a plurality of speed ranges obtained by dividing a limited speed range and output a speed-side boundary speed output from a position corresponding to the upper command speed, a speed-side first weight learning section that changes a plurality of speed-side first learning weights corresponding to each of the speed-side first outputs that are outputs from each input section according to a speed deviation, and a speed-side output section that adds a plurality of speed-side first multiplied values obtained by multiplying the speed-side first output and the speed-side first learning weight, and outputs the result as a second tentative command current. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] JP 2017-127176 A Summary of the Invention [Problem to be solved by the invention]
[0006] The technology disclosed in Patent Document 1 uses a neural network learning model to express a friction model. This technology enables the expression of a nonlinear friction model by finely discretizing the input values of the neural network, but the more finely the input values are discretized, the greater the number of weighting coefficients becomes, and so the amount of data and calculation required for learning increases. In other words, this technology has the problem that the calculation load becomes large when attempting to perform highly accurate adjustments.
[0007] As described above, the technique disclosed in Patent Document 1 has a problem in that it is not possible to provide a motor control device that can adjust friction compensation with high accuracy with a small calculation load.
[0008] The present disclosure has been made in consideration of the above, and has an object to provide a motor control device that can adjust friction compensation with high accuracy with a small calculation load. [Means for solving the problem]
[0009] In order to solve the above-mentioned problems and achieve the object, the motor control device according to the present disclosure is a motor control device that performs trajectory control to drive a motor based on a position command and control the trajectory of a control object mechanically connected to the motor, and has a feedback control unit that performs feedback control to calculate a first torque command, which is a command for the torque of the motor, based on the position command and the position of the motor, and a data storage unit that stores trajectory control data, which is data related to the operating state of the motor or the control object. The motor control device according to the present disclosure stores the trajectory control data , classified based on motor speed and motor acceleration Split into multiple datasets 、 For each of the multiple data sets , using only the data of the corresponding data set of the trajectory control data Learning Model of raw accomplish The motor drive system further includes a learning unit that calculates a friction compensation torque, which is a torque of the motor that compensates for friction, based on a plurality of learning models, an adder that calculates a second torque command by adding the first torque command and the friction compensation torque, and a current control unit that controls the current to the motor to follow the second torque command to drive the motor. Effect of the Invention
[0010] The motor control device according to the present disclosure advantageously provides the advantage of being able to adjust friction compensation with high accuracy and with a small calculation load. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 is a block diagram showing a configuration of a motor control device according to a first embodiment. [Diagram 2] FIG. 1 is a perspective view showing a schematic example of a motor controlled by a motor control device according to a first embodiment and a target machine that is a drive target; [Diagram 3]FIG. 13 is a diagram showing an example of setting a threshold value for trajectory control data according to the first embodiment; [Figure 4] FIG. 1 is a diagram showing an example of a plurality of learning models generated from divided trajectory control data according to the first embodiment; [Diagram 5] FIG. 1 is a diagram showing an example of a friction model expressed by Gaussian process regression according to the first embodiment; [Figure 6] FIG. 13 is a diagram showing an example of a friction model represented by a decision tree according to the second embodiment; [Figure 7] FIG. 11 is a diagram showing a comparison between a single learning model configured with a decision tree according to the second embodiment and multiple learning models constructed for each input space. [Figure 8] FIG. 13 is a diagram showing an example of a friction model expressed by a neural network according to the third embodiment; [Figure 9] FIG. 11 is a diagram showing a comparison between a single learning model configured with a neural network model according to the third embodiment and multiple learning models constructed for each input space. [Figure 10] FIG. 13 is a diagram showing an example of a learning model that employs a Coulomb friction model in a specific input space according to the fourth embodiment. [Figure 11] FIG. 13 is a diagram showing division of trajectory control data into a plurality of sets by clustering according to the fifth embodiment. [Figure 12] FIG. 1 is a diagram showing a processor in the case where at least some of a model speed calculation unit, a feedback control unit, a friction compensation torque calculation unit, an adder, a current control unit, a data holding unit, and a learning unit included in the motor control device according to the first embodiment are realized by a processor. [Figure 13] FIG. 1 is a diagram showing a processing circuit in the case where at least a part of a model speed calculation unit, a feedback control unit, a friction compensation torque calculation unit, an adder, a current control unit, a data holding unit, and a learning unit included in a motor control device according to a first embodiment is realized by the processing circuit. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A motor control device and a motor control method according to embodiments will be described in detail below with reference to the drawings.
[0013] Embodiment 1 FIG. 1 is a block diagram showing a configuration of a motor control device 10 according to a first embodiment. The motor control device 10 is a device that executes trajectory control by driving a motor 20 based on a position command and controlling a trajectory along which a control target mechanically connected to the motor 20 moves. The motor control device 10 is connected to a motor 20 that drives a target machine 30, which is a machine to be controlled, and controls the motor 20. The motor 20 and the target machine 30 are also shown in FIG. 1. The motor 20 is mechanically connected to the target machine 30. The target machine 30 operates as a result of the motor control device 10 controlling the motor 20.
[0014] 2 is a perspective view showing a schematic example of a motor 20 controlled by the motor control device 10 according to the first embodiment and a target machine 30 that is to be driven. Fig. 2 shows a case where the target machine 30 is a ball screw device. The ball screw device has a ball screw 31, a table 32, and a coupling 33.
[0015] The motor 20 is connected to a ball screw 31 via a coupling 33. The ball screw 31 converts the rotational motion of the motor 20 into linear motion. A table 32 is attached to the ball screw 31, and the table 32 performs linear motion. The motor 20 can switch its rotation direction between a first direction and a second direction opposite to the first direction. The motor 20 has a position detector 21. The position detector 21 detects the position of the motor 20 and outputs the position of the motor 20 to the motor control device 10. Hereinafter, the position of the motor 20 will be referred to as the motor position.
[0016] In the first embodiment, the target machine 30 is a ball screw device, but the target machine 30 is not limited to a ball screw device. The motor control device 10 is widely applied to the target machine 30 driven by the motor 20, in addition to machine component parts such as a guide mechanism. Examples of the target machine 30 include a vertical articulated robot, an NC (Numerical Control) machine tool, or a mounting machine, in addition to a ball screw device.
[0017] Returning to FIG. 1, motor control device 10 has a model speed calculation unit 1, a feedback control unit 2, a friction compensation torque calculation unit 3, an adder 4, a current control unit 5, a data holding unit 6, and a learning unit .
[0018] The model speed calculation unit 1 receives a position command as an input and outputs a model speed. The position command is input to the model speed calculation unit 1 from a command value generating device such as a controller or an NC device. The model speed is obtained by time-differentiating the position command and applying a filter as a value indicating the target speed of the motor 20. Differential processing related to time differentiation is replaced by difference processing in a discrete time system, and a value obtained by dividing the difference between the current motor command and the motor command one sample before by the control processing cycle is used as an approximate differential value. The position command is a target value for the rotational position of the motor 20, but the target value for the translational position of the table 32 may be used as the position command by performing unit conversion.
[0019] The feedback control unit 2 executes feedback control to calculate a first torque command, which is a command for the torque of the motor 20, based on the position command and the motor position. That is, the feedback control unit 2 calculates a first torque command, which is a command for the torque of the motor 20, by feedback control based on the position command and the motor position. The feedback control unit 2 receives the position command and the motor position, and outputs a first torque command. The motor position is input to the feedback control unit 2 from a position detector 21 of the motor 20. The feedback control unit 2 performs a position control process of proportional control or integral control so as to reduce a position deviation, which is a deviation between the position command and the motor position, and outputs a first torque command that reduces the position deviation. The motor position may be a value obtained by reading the position of the table 32 by a sensor such as a linear scale. The feedback control unit 2 may be any type as long as it causes the motor position to follow the position command. For example, the feedback control unit 2 may perform two-degree-of-freedom control.
[0020] The friction compensation torque calculation unit 3 receives the model speed from the model speed calculation unit 1 and outputs the friction compensation torque. The friction compensation torque calculation unit 3 calculates the friction compensation torque based on a friction model configured using a plurality of learning models. As described later, each learning model is learned based on different trajectory control data. The friction model outputs the friction compensation torque based on the model speed and the model acceleration which is a differential value of the model speed. The friction compensation torque which is the output of the friction model is added to the torque command of the motor 20 so as to reduce the influence of friction disturbance which causes a trajectory error. In the above description, the friction model takes the model speed and the model acceleration as inputs, but any data related to the position, speed or acceleration of the motor 20, including the speed of the motor 20 obtained from the motor position, can be used. Hereinafter, the speed of the motor 20 is described as the motor speed.
[0021] The adder 4 calculates the second torque command by adding the first torque command and the friction compensation torque. That is, the adder 4 calculates the sum of the first torque command and the friction compensation torque, and outputs the calculation result as the second torque command.
[0022] The current control unit 5 controls the current to the motor 20 so that the current follows the second torque command, thereby driving the motor 20. That is, the current control unit 5 supplies a current to the motor 20 so that the torque of the motor 20 follows the second torque command.
[0023] The data storage unit 6 stores trajectory control data which is data related to the operation state of the motor 20 or the controlled object. The data storage unit 6 stores trajectory control data which is data related to the operation state of the motor 20 or the controlled object during execution of trajectory control using friction compensation torque.
[0024] The data holding unit 6 receives the motor position detected by the position detector 21 of the motor 20 and a current value, which is a value of a current supplied to the motor 20, and outputs trajectory control data. The trajectory control data is a data set including a motor speed obtained by differentiating the motor position, a motor acceleration obtained by differentiating the motor speed, and a current value, which is torque information. The data holding unit 6 samples and holds the trajectory control data for the motor position and the current value acquired every control period. The data holding unit 6 samples the trajectory control data so that the trajectory control data is included before and after the positive / negative sign of the motor speed is switched. That is, the data holding unit 6 samples and holds the trajectory control data before and after the rotation direction is switched between the first direction and the second direction. For example, a part of the data holding unit 6 is realized by a semiconductor memory.
[0025] The learning unit 7 divides the trajectory control data into a plurality of data sets, and performs learning based on the data set for each of the plurality of data sets and generates a learning model corresponding to the data set. That is, the learning unit 7 divides the trajectory control data into a plurality of data sets, and generates a learning model corresponding to each of the plurality of data sets by learning based on each of the plurality of data sets. For example, the learning unit 7 learns a learning model in which the number of parameters is variable. The friction compensation torque calculation unit 3 calculates a friction compensation torque, which is the torque of the motor 20 that compensates for friction, based on a plurality of learning models. The learning unit 7 divides the input trajectory control data into a plurality of groups. The learning unit 7 divides the trajectory control data into a plurality of groups based on the motor speed value and the motor acceleration value contained in the trajectory control data. The learning unit 7 learns each learning model corresponding to the trajectory control data of each group. The learning unit 7 has a data boundary that defines a boundary for dividing the trajectory control data set in advance, and the learning unit 7 divides the trajectory control data based on the data boundary.
[0026] The learning unit 7 learns the relationship between the motor speed and the friction compensation torque corresponding to the motor acceleration by learning the learning model. The friction compensation torque is calculated by subtracting the inertia torque expressed as the product of the moment of inertia of the load connected to the motor 20 and the motor acceleration from the actual torque obtained by converting the current value of the motor 20 into a unit value based on the trajectory control data. Each learning model is learned by supervised learning using the corresponding trajectory control data.
[0027] When learning the learning model, the learning unit 7 learns the relationship between the motor speed and motor acceleration and the friction compensation torque corresponding to the motor speed and motor acceleration, and when in use, the learning model receives the model speed and model acceleration as inputs and outputs the friction compensation torque.
[0028] The processing of the learning unit 7 will be described below. The processing of the learning unit 7 will be described using an example in which the trajectory control data is divided into eight groups. It is assumed that thresholds related to the trajectory control data are set. First, V1, V2, and V3 are set as three thresholds for the motor speed. The first threshold V1 is a negative value, the second threshold V2 is a value of 0, and the third threshold V3 is a positive value. That is, the learning unit 7 divides the trajectory control data into four cases corresponding to the motor speed: when the motor speed is less than the threshold V1, when the motor speed is equal to or greater than the threshold V1 and less than the threshold V2, when the motor speed is equal to or greater than the threshold V2 and less than the threshold V3, and when the motor speed is equal to or greater than the threshold V3. A1 is set as a threshold for the motor acceleration, and the value of the threshold A1 is set to 0. That is, the learning unit 7 divides the trajectory control data into two in accordance with the sign of the motor acceleration.
[0029] The trajectory control data is divided into eight groups, from the first group to the eighth group, by the above-mentioned threshold value. The regions of the trajectory control data corresponding to the eight groups are as shown in FIG. 3. FIG. 3 is a diagram showing an example of setting threshold values for the trajectory control data according to the first embodiment. For the sake of explanation, the i-th group of trajectory control data divided into eight groups will be called the i-th group of trajectory control data. i is an integer from 1 to 8. A learning model that corresponds to the i-th group of trajectory control data and is learned using the i-th group of trajectory control data will be called the i-th learning model. FIG. 4 is a diagram showing an example of a plurality of learning models generated from the divided trajectory control data according to the first embodiment. FIG. 4 shows the relationship between speed and friction when each learning model from the first learning model to the fourth learning model is generated in a region where the acceleration is positive.
[0030] Only the i-th set of trajectory control data is used to train the i-th learning model. Therefore, the amount of data in the data set used to train one learning model is smaller than when all the trajectory control data is used to train one learning model.
[0031] The learning unit 7 constructs a friction model using the above-mentioned multiple learning models. Specifically, the learning unit 7 constructs a friction model that outputs the sum of the outputs of the eight learning models as a friction compensation torque, as shown in the following formula (1).
[0032]
number
[0033] In equation (1), T is the friction compensation torque, and F i is the friction torque output of the ith learning model, and w i is the coefficient multiplied to the output of the i-th learning model.
[0034] The friction model constructed by the learning unit 7 is calculated using the model velocity and model acceleration as inputs. iRegarding how to determine w corresponding to the i-th set of trajectory control data including the input model velocity and model acceleration, i To make the only part larger, i For example, when a model velocity and a model acceleration within the range of the first set of trajectory control data are input, w1 is set to 1 and w2 to w8 are set to 0, so that w i may be determined.
[0035] Next, learning of the ith learning model based on the ith group trajectory control data will be described. Supervised learning is performed. Since the input of the ith learning model is the motor speed and motor acceleration included in the ith group trajectory control data, and the output of the ith learning model is friction torque, in supervised learning, learning is performed using a data set including the motor speed, motor acceleration, and friction torque. With regard to the data set, data included in the ith group trajectory control data is used for the motor speed and motor acceleration. The friction torque is calculated by subtracting the inertia torque represented by the product of the moment of inertia of the load connected to the motor 20 and the motor acceleration from the actual torque obtained by converting the current value of the motor 20 into a unit value based on the ith group trajectory control data.
[0036] An example of the learning model is a learning model expressed by Gaussian process regression. Since the learning model expressed by Gaussian process regression has the same number of parameters as the number of data, the number of data is the number of parameters. The learning model expressed by Gaussian process regression outputs a friction torque corresponding to the distance between each data and the input motor speed.
[0037] At this time, the predicted distribution of the friction torque is also calculated at the same time as the variance of the Gaussian distribution. However, the distance used in calculating the predicted distribution of the friction torque is calculated by the kernel function k, specifically, x n and x n’ The distance between two points is generally expressed using the Gaussian kernel shown in the following equation (2). n and x n’ is a vector. n is an integer greater than or equal to 1.
[0038]
number
[0039] In formula (2), θ1 and θ2 are hyperparameters set in the learning unit 7. However, the kernel function is not limited to the Gaussian kernel, and may be a linear kernel, an exponential kernel, a periodic kernel, or a Matern kernel, or may be a kernel function formed by a combination of the sum or product of these. At the same time, it is considered that the observed current value and the calculated friction torque contain observation noise, and the average of the observation noise is 0 and the variance is σ 2 Assuming that the observation noise follows a Gaussian distribution as shown in the following equation (3), a kernel function k may be used with a noise term added, as shown in the following equation (4).
[0040]
number
[0041]
number
[0042] In equation (4), the delta function δ(x n ,x n’ ) is a function that returns 1 when n=n' in which distance calculation is performed between the same trajectory control data, and returns 0 when n=n' is not performed. Fig. 5 is a diagram showing an example of a friction model expressed by Gaussian process regression according to the first embodiment. Fig. 5 shows a learning model expressed by Gaussian process regression.
[0043] The learning unit 7 estimates hyperparameters in the kernel function of the Gaussian process regression and outputs a learning model after identifying the hyperparameters. The hyperparameters are X consisting of the trajectory control data and θ = (θ1, θ2, σ 2) is estimated so that the likelihood function p(y|X,θ) of the friction torque y with respect to x, y, θ is maximized. As a method for identifying the hyperparameter θ that maximizes the likelihood function, a search method using a grid search in the θ space or an MCMC (Markov Chain Monte Carlo) method, or a gradient method such as the steepest descent method, the conjugate gradient method, or the quasi-Newton method can be used. Note that θ, which is a combination of X, y, and the hyperparameters, is a vector.
[0044] By using a learning model expressed by Gaussian process regression, when the learning model outputs a friction torque, the learning unit 7 can simultaneously calculate the variance of the friction torque. Therefore, the accuracy of the friction torque output by the learning model can be evaluated. For example, if the accuracy is low, the learning unit 7 can increase the trajectory control data or reacquire the trajectory control data to improve the accuracy.
[0045] However, when the number of data used for learning in Gaussian process regression is N, the amount of calculation required is proportional to the cube of N, as shown in the following formula (5), where N is a natural number.
[0046]
number
[0047] In other words, the increase in the amount of calculations associated with the increase in the number of data is very large, which makes it difficult to perform efficient adjustment. In the first embodiment, the trajectory control data is divided into eight pieces. For the sake of simplicity, if the data is divided equally, the amount of calculations is expressed by the following formula (6).
[0048]
number
[0049] In other words, compared to the amount of calculation before dividing the data, the amount of calculation can be reduced to 1 / 64, enabling efficient adjustment. In the above example, the trajectory control data is divided equally, but the division does not necessarily have to be equal.
[0050] In the first embodiment, Gaussian process regression is used as the learning model, but other learning methods may be used as long as the learning model can be constructed from the trajectory control data. In other learning methods, the trajectory control data is divided, and multiple learning models corresponding to each of the multiple data groups obtained by the division are trained, thereby achieving efficient adjustment.
[0051] As described above, according to the first embodiment, it is possible to provide a motor control device 10 that is capable of adjusting friction compensation with high accuracy and with a small calculation load.
[0052] Embodiment 2 Next, a motor control device according to embodiment 2 will be described. In embodiment 1, the motor control device 10 is described in which the learning model in the learning unit 7 is expressed by Gaussian process regression and feedforward correction of friction disturbance is performed. The motor control device according to embodiment 2 expresses the friction model by a decision tree. Since the components other than the friction compensation torque calculation unit 3 and the learning unit 7 are the same as those in embodiment 1, the description will be omitted.
[0053] 6 is a diagram showing an example of a friction model represented by a decision tree according to embodiment 2. In learning of the decision tree, node division is performed so as to maximize an objective function IG expressed by the following formula (7).
[0054]
number
[0055] In equation (7), D p is the parent dataset or parent node, f is the number of features, and D left is the left child node of the parent node, and D rightis the right child node of the parent node, and N p is the parent node D p is the number of data included in N left is the left child node D left is the number of data included in N right is the right child node D right is the number of data included in, and I is an impurity index. Regarding the impurity index I, since a regression problem for friction torque is dealt with in the second embodiment, the mean square error shown in the following formula (8) is used.
[0056]
number
[0057] In equation (8), y i is node D t is the value of each sample in y t is the average value of each sample. N t is node D t is the number of samples in y i corresponds to the output of the trajectory control data, and the branch is generated so that the objective function IG, which is the sum of the variances of the two child nodes minus the variance of the parent node, is maximized. t Regarding the selection of branch candidates in the output y i Multiple trajectory control data inputs x i are arranged in ascending order with respect to the motor speed or motor acceleration axis, and the midpoint of adjacent trajectory control data is set as a branch candidate point, and equation (6) is evaluated for each of the multiple branch candidates.
[0058] As in the first embodiment, the reduction in the amount of calculation when using multiple learning models in a decision tree will be described using an example in which trajectory control data is divided into eight groups. The method of setting the thresholds V1, V2, V3, and A1 for the trajectory control data, and the correspondence between the i-th group of trajectory control data and the i-th learning model are the same as those in the first embodiment. When the number of trajectory control data used for learning is N, and a friction model of the same size as the single learning model shown in FIG. 6 is learned, it is necessary to perform evaluation of formula (6) a maximum of (N-1) times in each layer. When the number of layers is sufficiently smaller than N, as shown in the following formula (9), a calculation amount proportional to the cube of N is required.
[0059]
number
[0060] In other words, the increase in the amount of calculations associated with an increase in the amount of data is extremely large, which makes efficient adjustment difficult.
[0061] In the second embodiment, the trajectory control data and the learning model are divided into eight. Since the thresholds V1, V2, V3, and A1 are set in advance as known values, it is not necessary to perform the calculations of the formulas (7) and (8). It is only necessary to determine which learning model each trajectory control data corresponds to. As shown in the following formula (10), the amount of calculation is proportional to N.
[0062]
number
[0063] In other words, compared to the amount of calculation before dividing the data, the amount of calculation can be reduced to one squared of N, enabling efficient adjustment. Fig. 7 is a diagram showing a comparison between a single learning model formed of a decision tree according to the second embodiment and multiple learning models constructed for each input space. Fig. 7 shows the learning models after division into each group.
[0064] Decision trees have a tendency to be overlearned when the data given is biased or when a single deep tree is constructed. For this reason, it is known that the generalization performance of a learning model can be improved by setting a known physical property of the target as a threshold in advance, dividing the target into multiple shallow trees, and performing separate learning for each of the multiple shallow trees.
[0065] Therefore, according to the second embodiment, it is possible to provide a motor control device that is capable of adjusting friction compensation with high accuracy and with a small calculation load.
[0066] The friction model may use an ensemble method such as a random forest or gradient boosting decision tree that includes multiple decision trees as described above, and may apply one or both of pre-pruning, which stops the generation of the tree early during the construction process, and post-pruning, which removes nodes with little information after the tree is constructed.
[0067] Embodiment 3 Next, a motor control device according to a third embodiment will be described. In the first embodiment, the learning model in the learning unit 7 is expressed by Gaussian process regression, and in the second embodiment, the learning model in the learning unit 7 is expressed by a decision tree, and a motor control device that performs feedforward correction of friction disturbance has been described. In the motor control device according to the third embodiment, the friction model is expressed by a neural network. As the components other than the friction compensation torque calculation unit 3 and the learning unit 7 are similar to those in the first and second embodiments, their description will be omitted.
[0068] FIG. 8 is a diagram showing an example of a friction model expressed by a neural network according to the third embodiment. Each layer of the neural network is represented by X i Let's say layer X. i The input and output are expressed by the following recurrence formula (11).
[0069]
number
[0070] In equation (11), W i is a matrix, and X i and B. i is a vertical vector, W is called a weight matrix, and B is called a bias vector. Therefore, the computational complexity of a neural network is determined by the number of nodes C per layer, which is equal to the number of rows of W and B, and the number of layers L included in the entire neural network. By increasing the number of layers and nodes of a neural network, the learning model becomes a more complex learning model of a higher order, so there is generally a trade-off between the estimation accuracy and the computational complexity of a neural network.
[0071] As in the first and second embodiments, the third embodiment also shows an example in which the trajectory control data is divided into eight groups. As shown in FIG. s , number of nodes C s When training using a single learning model, the number of layers is L s and the number of nodes C s must be relatively large in order to simultaneously express a complex curve near zero speed and a smooth curve above a certain speed. The amount of calculation required is as shown in the following equation (12): s ×C s It is expressed as:
[0072]
number
[0073] In other words, the increase in the amount of calculations involved in using only a single learning model is extremely large, which makes efficient adjustment difficult.
[0074] In the third embodiment, the trajectory control data and the learning model are divided into eight parts. However, the thresholds V1, V2, V3, and A1 are known. For the curve between the thresholds V1 and V3 near zero speed, which changes in a complex manner, L of the learning model corresponding to this region is set to L. m And, let C of the learning model be C m Then, the computational complexity of each model is L m×C m It is expressed as: L m ×C m can be obtained without the need to learn the friction changes over the entire speed range, so as shown in the following equation (13), L s ×C s The value is small compared to m. m is an integer of 1 or greater.
[0075]
number
[0076] Furthermore, let L of the learning model corresponding to the area below threshold V1 and above threshold V3 be L h and let C of the learning model corresponding to the domain be C h Then, the computational complexity is L h ×C h It is known that the curve in this region is monotonous without any abrupt changes compared to the curve from threshold V1 to threshold V3 near zero speed, so as shown in the following equation (14), L h ×C h L s ×C s It is a small value compared to.
[0077]
number
[0078] In other words, the amount of calculation after dividing the data can be reduced compared to the amount of calculation before dividing the data, and efficient adjustment is possible. Fig. 9 is a diagram showing a comparison between a single learning model configured with a neural network model according to the third embodiment and multiple learning models constructed for each input space. Fig. 9 shows the learning models after division into each group.
[0079] As with the decision tree described in the second embodiment, the neural network has a tendency to be overlearned when the data given is biased or large in size. Therefore, when it is known that the output characteristics of the trajectory control data change significantly in a specific region of the input space, by dividing the neural network model for each region and learning them individually, it is possible to change each learning model to an appropriate size according to the complexity of the output, and generalization performance can be improved.
[0080] Therefore, according to the third embodiment, it is possible to provide a motor control device that is capable of adjusting friction compensation with relatively high accuracy and with a relatively small calculation load.
[0081] Regarding the neural network, a so-called recurrent type neural network, such as an RNN (Recurrent Neural Network), an LSTM (Long Short Term Memory), or a GRU (Gated Recurrent Unit), which has a recursive structure in the input / output relationship of the intermediate layer, or a convolution type neural network, such as a CNN (Convolutional Neural Network), an FCN (Fully Convolutional Network), or a TCN (Temporal Convolutional Network), may be used.
[0082] Embodiment 4 Next, a motor control device according to embodiment 4 will be described. In embodiments 1 to 3, the learning model in the learning unit 7 is constructed for each input region using the same machine learning algorithm. The motor control device according to embodiment 4 expresses a friction model by using a different machine learning algorithm or function form for each region. Since the components other than the friction compensation torque calculation unit 3 and the learning unit 7 are the same as those in embodiments 1 and 2, their description will be omitted.
[0083] In the fourth embodiment, as in the first to third embodiments, an example is used in which the trajectory control data is divided into eight sets. As described in the third embodiment, it is known that in the regions below the threshold V1 and above the threshold V3, the curve has a monotonous shape without any abrupt changes compared to the curve from the threshold V1 to the threshold V3 near zero speed, so that the friction acting on a ball screw device, which is an example of the target machine 30, is generally accurately represented by the Coulomb friction that balances with the driving force below a certain threshold at the motor speed of zero speed shown in the following formula (15), and the viscous friction that is expressed in a proportional relationship with the motor speed.
[0084]
number
[0085] In equation (15), f is the friction force, v is the viscous friction coefficient, w is the motor speed, and c is the Coulomb friction term.
[0086] It is known that nonlinear friction that depends on load conditions other than the motor speed, such as stick-slip phenomenon, occurs before and after the motor speed switches between positive and negative signs, that is, in the region from threshold value V1 to threshold value V3. This friction is a cause of trajectory errors that appear as quadrant projections when the motion direction of the axis of the target machine 30 is reversed.
[0087] In the fourth embodiment, a learning model is constructed using the machine learning algorithm described in the first to third embodiments only for the region from threshold V1 to threshold V3 near zero speed, and inference is performed using the Coulomb friction model shown in equation (15) for the region below threshold V1 and above threshold V3. This allows the motor control device according to the fourth embodiment to reduce the amount of calculation without degrading the accuracy of the friction model. FIG. 10 is a diagram showing an example of a learning model that employs the Coulomb friction model in a specific input space according to the fourth embodiment. FIG. 10 shows an example of a learning model that employs the Coulomb friction model in the region below threshold V1 and above threshold V3.
[0088] For the friction model used in the region below the threshold V1 and above the threshold V3, a friction model such as the LuGre model, the Seven parameter model, or the State variable model may be used instead of the Coulomb friction model.
[0089] The machine learning algorithm and learning model listed in the first to third embodiments may be switched between the region below threshold V1 and above threshold V3 and the region between threshold V1 and threshold V3. By using Gaussian process regression with the number of data N set small in the region below threshold V1 and above threshold V3, and using a neural network in the region between threshold V1 and threshold V3, it is possible to configure a learning model with a smaller amount of calculation compared to the case where a single friction model is used. The machine learning algorithm used is not limited to the methods listed in the first to third embodiments, and any algorithm capable of learning a regression model may be used.
[0090] Therefore, according to the fourth embodiment, it is possible to provide a motor control device that is capable of adjusting friction compensation with high accuracy and with a small calculation load.
[0091] Embodiment 5. Next, a motor control device according to embodiment 5 will be described. In the first to fourth embodiments, the motor control device has been described in which the trajectory control data is divided into a plurality of groups by the operation of the learning unit 7, and each learning model corresponding to the trajectory control data of each group is learned. In the first to fourth embodiments, the trajectory control data is divided based on a preset threshold value.
[0092] In the fifth embodiment, a threshold value for dividing the trajectory control data is not set in advance. In the fifth embodiment, a motor control device having a learning unit that divides the trajectory control data into a plurality of groups using a clustering technique and learns each learning model corresponding to the trajectory control data of each group will be described. The learning unit in the fifth embodiment is referred to as a learning unit 7e. The components other than the learning unit 7e are the same as those in the first embodiment, so the description will be omitted.
[0093] As described above, the motor control device according to the fifth embodiment includes a learning unit 7e. The learning unit 7e divides the input trajectory control data into a plurality of groups. The learning unit 7e divides the trajectory control data by clustering based on the trajectory control data. The learning unit 7e divides the trajectory control data into a plurality of groups by k-means based on the motor speed value and acceleration value contained in the trajectory control data. The learning unit 7e learns each learning model corresponding to each group of trajectory control data. The input of the learning model is the motor speed and the motor acceleration, and the output of the learning model is the friction torque. Each learning model is learned by supervised learning using the corresponding trajectory control data.
[0094] The process of dividing the trajectory control data into a plurality of groups performed by the learning unit 7e will be described below. Assuming an example in which the learning unit 7e divides the trajectory control data into eight groups, the k-means method process used will be described.
[0095] The trajectory control data used for learning is n points, and the data including the i-th motor speed value and the i-th acceleration value among them are collectively expressed as x i Here, i is an integer ranging from 1 to n, and n is an integer equal to or greater than 1. In order to divide the trajectory control data into eight sets, the learning unit 7e first randomly allocates n points of data to the eight sets.
[0096] Next, for each of the eight pairs, the learning unit 7e j where j is an integer from 1 to 8. The learning unit 7e calculates the center M j is calculated so that it is the arithmetic mean of the data contained in the set.
[0097] Next, the learning unit 7e learns the i-th data x i and the center M of the eight sets j The learning unit 7e calculates the distance between each of the n points and the set with the smallest distance among the eight distances, and assigns the i-th data to the set with the smallest distance. The learning unit 7e performs this operation on all of the n points of data.
[0098] As a result, the data belonging to each group is replaced, and the center of the group moves. j Recalculate so that x is the arithmetic mean of the data for that set.
[0099] The learning unit 7e executes the calculation of the center of each group, the calculation of the distance between each data and the center of each group, and the allocation of each data to each group until the allocation of each data converges or a predetermined number of repetitions are completed. Fig. 11 is a diagram showing the division of trajectory control data into a plurality of groups by clustering according to the fifth embodiment. Fig. 11 shows the correspondence between each data and the center of each group.
[0100] Through the above procedure, eight groups are formed by clustering based on the trajectory control data without determining a threshold value in advance. In the above description, an example in which the k-means method is used as the clustering method is shown, but the clustering method in the fifth embodiment is not limited to the k-means method, and other clustering methods such as the single-link method or the group average method may be used.
[0101] The learning unit 7e divides the trajectory control data into eight groups, group 1 to group 8. The i-th group of the trajectory control data divided into the eight groups is referred to as the i-th group of trajectory control data. A learning model that corresponds to the i-th group of trajectory control data and is learned using the i-th group of trajectory control data is referred to as the i-th learning model.
[0102] For the training of the i-th learning model, only the i-th set of trajectory control data is used, so the amount of data set used for training is smaller than when all the trajectory control data are used.
[0103] The learning unit 7e constructs a friction model using a plurality of learning models. The method of constructing the friction model is the same as the method described in the first embodiment.
[0104] According to the motor control device of the fifth embodiment, the trajectory control data is divided into a plurality of groups by clustering based on the trajectory control data executed by the learning unit 7e. Therefore, it is not necessary to set a threshold value for dividing the trajectory control data in advance. Data with similar magnitudes of the speed and acceleration values, which are inputs to the learning model, are used as learning data for the same learning model, so that efficient and highly accurate learning is possible with a relatively small amount of learning data. By using a plurality of highly accurate learning models, it is possible to construct a highly accurate friction model.
[0105] By using a highly accurate friction model, it is possible to realize friction compensation for improving the accuracy of trajectory control.
[0106] According to the fifth embodiment, it is possible to provide a motor control device that is capable of adjusting friction compensation with high accuracy and with a small calculation load.
[0107] Fig. 12 is a diagram showing a processor 91 in the case where at least some of the model speed calculation unit 1, feedback control unit 2, friction compensation torque calculation unit 3, adder 4, current control unit 5, data holding unit 6, and learning unit 7 of the motor control device 10 according to the first embodiment are realized by the processor 91. In other words, at least some of the functions of the model speed calculation unit 1, feedback control unit 2, friction compensation torque calculation unit 3, adder 4, current control unit 5, data holding unit 6, and learning unit 7 may be realized by the processor 91 that executes a program stored in a memory 92. The processor 91 is a CPU (Central Processing Unit), a processing system, an arithmetic system, a microprocessor, or a DSP (Digital Signal Processor). The memory 92 is also shown in Fig. 12.
[0108] When at least some of the functions of the model speed calculation unit 1, the feedback control unit 2, the friction compensation torque calculation unit 3, the adder 4, the current control unit 5, the data holding unit 6, and the learning unit 7 are realized by the processor 91, the functions are realized by the processor 91 and software, firmware, or a combination of software and firmware. The software or firmware is written as a program and stored in the memory 92. The processor 91 realizes at least some of the functions of the model speed calculation unit 1, the feedback control unit 2, the friction compensation torque calculation unit 3, the adder 4, the current control unit 5, the data holding unit 6, and the learning unit 7 by reading and executing the program stored in the memory 92.
[0109] When at least some of the functions of the model speed calculation unit 1, feedback control unit 2, friction compensation torque calculation unit 3, adder 4, current control unit 5, data retention unit 6, and learning unit 7 are realized by processor 91, motor control device 10 has memory 92 for storing a program that results in execution of at least some of the steps executed by model speed calculation unit 1, feedback control unit 2, friction compensation torque calculation unit 3, adder 4, current control unit 5, data retention unit 6, and learning unit 7. It can also be said that the program stored in memory 92 causes a computer to execute at least some of the procedures or methods executed by model speed calculation unit 1, feedback control unit 2, friction compensation torque calculation unit 3, adder 4, current control unit 5, data retention unit 6, and learning unit 7.
[0110] The memory 92 may be, for example, a non-volatile or volatile semiconductor memory such as a RAM (Random Access Memory), a ROM (Read Only Memory), a flash memory, an EPROM (Erasable Programmable Read Only Memory), an EEPROM (registered trademark) (Electrically Erasable Programmable Read-Only Memory), a magnetic disk, a flexible disk, an optical disk, a compact disk, a mini disk, or a DVD (Digital Versatile Disk).
[0111] 13 is a diagram showing a processing circuit 93 in a case where at least a portion of the model speed calculation unit 1, feedback control unit 2, friction compensation torque calculation unit 3, adder 4, current control unit 5, data retention unit 6, and learning unit 7 included in the motor control device 10 according to the first embodiment is realized by the processing circuit 93. In other words, at least a portion of the model speed calculation unit 1, feedback control unit 2, friction compensation torque calculation unit 3, adder 4, current control unit 5, data retention unit 6, and learning unit 7 may be realized by the processing circuit 93.
[0112] The processing circuit 93 is dedicated hardware, and may be, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a combination thereof.
[0113] The model speed calculation unit 1, the feedback control unit 2, the friction compensation torque calculation unit 3, the adder 4, the current control unit 5, the data holding unit 6 and a part of the learning unit 7 may be realized by dedicated hardware separate from the remaining units.
[0114] With regard to the multiple functions of the model speed calculation unit 1, the feedback control unit 2, the friction compensation torque calculation unit 3, the adder 4, the current control unit 5, the data holding unit 6, and the learning unit 7, some of the multiple functions may be realized by software or firmware, and the remaining multiple functions may be realized by dedicated hardware. In this way, the multiple functions of the model speed calculation unit 1, the feedback control unit 2, the friction compensation torque calculation unit 3, the adder 4, the current control unit 5, the data holding unit 6, and the learning unit 7 can be realized by hardware, software, firmware, or a combination of these.
[0115] Each of the friction compensation torque calculation units 3 in the second to fifth embodiments may be realized by a processor that executes a program stored in a memory. The memory is the same as the memory 92. The processor is the same as the processor 91. Each of the friction compensation torque calculation units 3 in the second to fifth embodiments may be realized by a processing circuit. The processing circuit is the same as the processing circuit 93.
[0116] Each of the learning units 7 in the second to fourth embodiments and the learning unit 7e in the fifth embodiment may be realized by a processor that executes a program stored in a memory. The memory is a memory similar to the memory 92. The processor is a processor similar to the processor 91. Each of the learning units 7 in the second to fourth embodiments and the learning unit 7e in the fifth embodiment may be realized by a processing circuit. The processing circuit is a processing circuit similar to the processing circuit 93.
[0117] The configurations shown in the above embodiments are merely examples, and may be combined with other known technologies, or the embodiments may be combined with each other. Also, parts of the configurations may be omitted or modified without departing from the spirit of the invention. [Explanation of symbols]
[0118] 1 model speed calculation unit, 2 feedback control unit, 3 friction compensation torque calculation unit, 4 adder, 5 current control unit, 6 data holding unit, 7, 7e learning unit, 10 motor control device, 20 motor, 21 position detector, 30 target machine, 31 ball screw, 32 table, 33 coupling, 91 processor, 92 memory, 93 processing circuit.
Claims
1. A motor control device that performs trajectory control to drive a motor based on a position command and control a trajectory of a control target mechanically connected to the motor, a feedback control unit that executes feedback control to calculate a first torque command, which is a command for a torque of the motor, based on the position command and a position of the motor; a data storage unit that stores trajectory control data that is data related to an operation state of the motor or the controlled object; a learning unit that divides the trajectory control data into a plurality of data sets classified based on a speed of the motor and an acceleration of the motor, and generates a learning model for each of the plurality of data sets using only data of a corresponding data set among the trajectory control data; a friction compensation torque calculation unit that calculates a friction compensation torque, which is a torque of the motor that compensates for friction, based on a plurality of the learning models; an adder that calculates a second torque command by adding the first torque command and the friction compensation torque; a current control unit that controls a current to the motor so as to follow the second torque command, thereby driving the motor; A motor control device comprising:
2. The learning unit learns a learning model in which the number of parameters is variable.
2. The motor control device according to claim 1 .
3. The data storage unit stores trajectory control data which is data related to a state of an operation of the motor or the controlled object during execution of the trajectory control using the friction compensation torque.
2. The motor control device according to claim 1 .
4. A data boundary that defines a boundary for dividing the trajectory control data is set in advance in the learning unit, and the learning unit divides the trajectory control data based on the data boundary.
2. The motor control device according to claim 1 .
5. The learning unit divides the trajectory control data by clustering based on the trajectory control data.
2. The motor control device according to claim 1 .
6. A motor control method for performing trajectory control in which a motor is driven based on a position command and a trajectory of a control target mechanically connected to the motor is controlled, the method comprising the steps of: calculating a first torque command, which is a command for torque of the motor, by feedback control based on the position command and a position of the motor; storing trajectory control data relating to a state of an operation of the motor or the controlled object during execution of the trajectory control; Dividing the trajectory control data into a plurality of data sets classified based on a speed of the motor and an acceleration of the motor, and generating a learning model for each of the plurality of data sets using only data of a corresponding data set among the trajectory control data; calculating a friction compensation torque, which is a torque of the motor that compensates for friction, based on a plurality of the learning models; calculating a second torque command by adding the first torque command and the friction compensation torque; driving the motor by controlling a current to the motor so as to follow the second torque command; 13. A motor control method comprising:
Citation Information
Patent Citations
Motor controller
JP2017127176A
Controller and control method
JP2019185742A
Control system, update method, estimation method, and computer program
JP2020087343A
Device designed to compensate for non-linearity of machine shafts
US5804940A
Servo control device
WO2014122822A1