Motor control method, system and device
By determining the operating state based on the motor acceleration and adopting corresponding filtering methods, the problem of low mechanical parameter identification accuracy in traditional technology is solved, and the stability and operating efficiency of motor control are improved.
Patent Information
- Application Number
- CN202411373746.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
In motor control systems, the traditional mechanical parameter identification method has a high signal noise when the acceleration is small, resulting in a decrease in mechanical parameter identification accuracy, which in turn affects the stable operation of the motor.
By determining its operating state based on the motor acceleration, the corresponding filtering method is used to filter the operating data, thereby improving the accuracy of mechanical parameter identification, and adjusting the motor control parameters according to the identification results to improve stability.
It effectively reduces noise in the operating data, improves the accuracy of mechanical parameter identification and the stability of motor control, optimizes the motor's operating strategy, reduces energy consumption and extends the service life of the equipment.
Smart Images

Figure CN119276178A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control, and in particular to a motor control method, system and device. Background Art
[0002] In the motor control system, the moment of inertia, load torque, viscous friction coefficient and Coulomb friction are all important mechanical parameters. If the mechanical parameters that do not match the current system are set, the motor may vibrate or respond slowly, which will affect the positioning time and positioning accuracy, cause speed fluctuations, and have a great impact on the production site. Therefore, in the installation of new equipment, variable mechanical inertia, variable load torque, frequent forward and reverse rotation of speed, etc., real-time mechanical parameter identification is required.
[0003] In traditional technology, the recursive least square method is usually used to collect the operating data of the system in real time, and then the operating data is sent to the recursive least square method identifier for mechanical parameter identification.
[0004] However, when using traditional technology for mechanical parameter identification, when the operating data is small, such as small acceleration, the accompanying signal noise will be relatively larger, and the sampling process will further reduce the signal-to-noise ratio of the operating data, thereby reducing the accuracy of mechanical parameter identification. If the motor is controlled based on the mechanical parameter identification results generated by this process, it will aggravate the unstable operation of the motor. Summary of the invention
[0005] The purpose of the present invention is to provide a motor control method, system and device, which determine the different operating states of the motor based on acceleration, and filter the data using a filtering method corresponding to the operating state. The noise in the operating data obtained under different accelerations of the motor can be filtered out, thereby ensuring the accuracy of the mechanical parameter identification process and improving the stability of the motor control.
[0006] In order to solve the above technical problems, the present invention provides a motor control method, comprising:
[0007] Acquire current operation data of the motor in a current control cycle, wherein the current operation data includes motor acceleration;
[0008] Based on the motor acceleration, determining the current operating state of the motor from a plurality of operating states of the motor; each operating state of the motor corresponds to a filtering mode;
[0009] Filtering the current operation data according to a filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result;
[0010] Performing mechanical parameter identification based on the data to be identified to obtain a mechanical parameter identification result;
[0011] The control parameters of the motor are adjusted based on the mechanical parameter identification result, so as to control the operation of the motor according to the adjusted control parameters.
[0012] Preferably, the motor operating state includes a first operating state; and determining the current operating state of the motor from a plurality of operating states of the motor based on the motor acceleration includes:
[0013] When the motor acceleration is greater than a first acceleration threshold and less than a second acceleration threshold, determining the acceleration change rate corresponding to the current control cycle;
[0014] When the acceleration change rate is not greater than the acceleration change rate threshold, determining that the current operating state of the motor is the first operating state;
[0015] The filtering the current operation data according to the filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result, includes:
[0016] Acquire historical operation data corresponding to each of a first preset number of historical control cycles; the historical control cycle is a control cycle before the current control cycle;
[0017] Performing mean calculation based on each of the historical operation data and the current operation data to obtain a target data pair corresponding to the current control period;
[0018] The data to be identified is determined based on the target data pair.
[0019] Preferably, the motor operating state includes a second operating state; after determining the acceleration change rate corresponding to the current control cycle, the method further includes:
[0020] When the acceleration change rate is greater than the acceleration change rate threshold, determining that the current operating state of the motor is the second operating state;
[0021] The filtering the current operation data according to the filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result, includes:
[0022] Acquire historical operation data corresponding to each of a second preset number of historical control cycles; the second preset number is less than the first preset number;
[0023] Perform mean calculation based on the historical operation data and the current operation data to obtain a target data pair corresponding to the current control period;
[0024] The data to be identified is determined based on the target data pair.
[0025] Preferably, the motor operating state includes a third operating state; and determining the current operating state of the motor from the plurality of operating states of the motor based on the motor acceleration comprises:
[0026] When the motor acceleration is greater than the second acceleration threshold, determining that the current operating state is the third operating state;
[0027] The filtering the current operation data according to the filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result, includes:
[0028] Determining the current operating data as a target data pair corresponding to the current control period;
[0029] The data to be identified is determined based on the target data pair.
[0030] Preferably, determining the data to be identified based on the target data pair comprises:
[0031] storing the target data pair corresponding to the current control cycle into a target storage space; the target storage space comprises a third preset number of storage units, each of which is used to store one of the target data pairs;
[0032] In the case that each of the storage units stores a data pair, the target data pair stored in each of the storage units is determined as the data to be identified.
[0033] Preferably, the motor operating state includes a fourth operating state; and determining the current operating state of the motor from the plurality of operating states of the motor based on the motor acceleration comprises:
[0034] When the motor acceleration is less than the first acceleration threshold, determining that the current operating state is the fourth operating state;
[0035] The filtering the current operation data according to the filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result, includes:
[0036] Discard the current running data.
[0037] Preferably, obtaining current operation data of the motor in the current control cycle, wherein the current operation data includes the motor acceleration, includes:
[0038] When the motor rotates forward, obtaining current forward running data of the motor in the current control cycle, wherein the current forward running data includes the forward acceleration of the motor;
[0039] When the motor is reversed, obtaining current reverse operation data of the motor in the current control cycle, wherein the current reverse operation data includes reverse acceleration of the motor;
[0040] Performing mechanical parameter identification based on the data to be identified to obtain mechanical parameter identification results includes:
[0041] Calculating a forward mechanical parameter identification value based on the data to be identified corresponding to each forward running data, and calculating a reverse mechanical parameter identification value based on the data to be identified corresponding to each reverse running data;
[0042] The mechanical parameter identification result is calculated based on the forward mechanical parameter identification value and the reverse mechanical parameter identification value.
[0043] Preferably, adjusting the control parameters of the motor based on the mechanical parameter identification result includes:
[0044] Determining a parameter change rate between the mechanical parameter identification result and a preset mechanical parameter of the motor;
[0045] When the parameter change rate is greater than a preset change rate threshold, the control parameter of the motor is adjusted based on the preset mechanical parameter.
[0046] In order to solve the above technical problems, the present invention provides a motor control system, comprising:
[0047] An operation data acquisition unit, used to acquire current operation data of the motor in a current control cycle, wherein the current operation data includes motor acceleration;
[0048] An operating state determining unit, configured to determine a current operating state of the motor from a plurality of operating states of the motor based on the motor acceleration; each operating state of the motor corresponds to a filtering mode;
[0049] a filtering mode determining unit, configured to filter the current operation data according to a filtering mode corresponding to the current operation state, and determine the data to be identified based on the filtering result;
[0050] A mechanical parameter identification unit, used to perform mechanical parameter identification based on the data to be identified to obtain a mechanical parameter identification result;
[0051] A control parameter adjustment unit is used to adjust the control parameters of the motor based on the mechanical parameter identification result, so as to control the operation of the motor according to the adjusted control parameters.
[0052] In order to solve the above technical problems, the present invention provides a motor control device, comprising:
[0053] Memory for storing computer programs;
[0054] The processor is used to implement the steps of the motor control method as described above when executing a computer program.
[0055] The present invention provides a motor control method, system and device, which obtains the current operating data of the motor in the current control cycle, including the motor acceleration, and then determines the current operating state of the motor from multiple operating states of the motor based on the motor acceleration. Each operating state of the motor corresponds to a filtering method. The current operating data is filtered according to the filtering method corresponding to the current operating state, and the data to be identified is determined based on the filtering result, so as to perform mechanical parameter identification based on the data to be identified, obtain the mechanical parameter identification result, and adjust the control parameters of the motor based on the mechanical parameter identification result to control the operation of the motor. Different operating states of the motor are determined based on the acceleration, so as to filter using the filtering method corresponding to the operating state. The noise in the operating data obtained under different accelerations of the motor can be filtered out, so as to ensure the accuracy in the mechanical parameter identification process and improve the stability of the motor control. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. 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.
[0057] Figure 1 A schematic flow chart of a motor control method provided by the present invention;
[0058] Figure 2 A timing diagram of the speed of a motor changing with time when it rotates forward provided by the present invention;
[0059] Figure 3 A timing diagram of the speed change over time when the motor is reversed provided by the present invention;
[0060] Figure 4 A timing diagram of the acceleration of a motor changing with time when it rotates forward provided by the present invention;
[0061] Figure 5 A timing diagram of the acceleration changing with time when the motor is reversed provided by the present invention;
[0062] Figure 6 A block diagram of a mechanical parameter identification system provided by the present invention;
[0063] Figure 7 A schematic diagram of the structure of a motor control system provided by the present invention;
[0064] Figure 8 A schematic structural diagram of a motor control device provided by the present invention. DETAILED DESCRIPTION
[0065] The core of the present invention is to provide a motor control method, system and device, which determine the different operating states of the motor based on acceleration, and then use the filtering method corresponding to the operating state for filtering. The noise in the operating data obtained under different accelerations of the motor can be filtered out, thereby ensuring the accuracy of the mechanical parameter identification process and improving the stability of the motor control.
[0066] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] Please refer to Figure 1 , Figure 1 A flow chart of a motor control method provided by the present invention, the method comprising:
[0068] S11: Acquire current operation data of the motor in the current control cycle, where the current operation data includes motor acceleration;
[0069] S12: determining a current operating state of the motor from a plurality of operating states of the motor based on the motor acceleration;
[0070] When controlling a motor, it is usually necessary to adjust the control parameters to ensure that the motor runs stably in the desired state. Specifically, the control system of the motor is realized through a three-closed-loop control method. The position loop can ensure the position following performance of the motor servo control system, the speed loop can improve the anti-interference performance of the motor system to mechanical load changes, maintain speed following, and the current loop can improve the response performance of the motor system and suppress current disturbances. Among them, the control parameter setting of the current loop and the position loop is relatively simple, while for the speed loop, if the rotational inertia associated with it does not match the control parameters of the controller or the rotational inertia of the motor system changes, the control parameters of the speed loop PI controller will be mismatched, resulting in an increase or decrease in the damping of the motor system, which will affect the responsiveness of the motor system at the least and cause instability of the motor system at the worst. In addition, the friction torque and load torque of the motor system will also affect the performance of the motor system. Therefore, the mechanical parameters of the system are identified online in real time, and the control parameters of the speed loop PI controller are dynamically adjusted to compensate for the disturbance torque in real time, so as to ensure that the system is in a good operating state.
[0071] In the prior art, the recursive least square method is usually used to identify the operation data of the motor. The speed and torque of the motor are collected in real time, the acceleration is calculated according to the speed, and the speed, torque and acceleration are sent to the recursive least square method identifier for identification. Finally, the rotational inertia obtained by identification is configured in the controller, so as to update and adjust the control parameters. However, in the prior art, when sampling speed and torque, digital system sampling is usually used, and digital system sampling has quantization errors. When the acceleration of the motor is small, the noise of the signal is amplified by the digital system sampling process, resulting in a reduced signal-to-noise ratio, which reduces the accuracy of mechanical parameter identification and even causes the identification result to fail to converge, making it impossible to stably control the motor.
[0072] In order to solve the above technical problems, in the present application, the operating data of the motor is acquired in real time in each control cycle during the operation of the motor, that is, the motor acceleration is acquired. Specifically, the real-time speed and torque of the motor can be sampled, and the real-time acceleration of the motor can be calculated based on the speed, so that the current operating state of the motor can be determined based on the motor acceleration. Therefore, different operating states of the motor reflect different acceleration sizes of the motor during operation.
[0073] Understanding the operating status of the motor under different accelerations helps optimize the motor's control strategy. Adjusting the controller's parameters and control algorithms according to the motor's actual acceleration characteristics can improve the motor's control accuracy and response speed, allowing the motor to maintain the best operating status under different operating conditions. This can not only improve production efficiency, but also reduce energy consumption and extend the motor's service life.
[0074] Of course, in the present application, when sampling the torque and speed of the motor, preliminary filtering is also required, and the filtering at this time refers to filtering through a low-pass filter or a sliding average filter.
[0075] S13: filtering the current operation data according to a filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result;
[0076] After determining the current operating state of the motor in the current control cycle, the filtering method corresponding to the current operating state can be determined. Since the filtering method and the operating state correspond one-to-one in the present application, the filtering methods selected in different operating states are different. Therefore, the operating data of the motor can be filtered in different operating states, that is, when it is in different motor accelerations, so as to reduce the interference of the operating data before mechanical parameter identification and improve the signal-to-noise ratio.
[0077] S14: performing mechanical parameter identification based on the data to be identified to obtain a mechanical parameter identification result;
[0078] S15: adjusting the control parameters of the motor based on the mechanical parameter identification result, so as to control the operation of the motor according to the adjusted control parameters.
[0079] Performing mechanical parameter identification based on the data to be identified can improve the accuracy of mechanical parameter identification, thereby facilitating subsequent adjustment of the motor control parameters according to the mechanical parameter identification results to ensure the stability of the motor operation.
[0080] The higher the mechanical parameter identification accuracy, the more accurately the mechanical parameter identification results can reflect the actual operating conditions of the motor, allowing the control system to more accurately adjust the motor's operating status, thereby improving the performance and stability of the entire system, and optimizing the motor's operating strategy, improving the motor's operating efficiency, and further saving energy and costs. Precise motor control can also reduce the ineffective operation and overload of the motor, thereby reducing the motor's operating wear and tear and extending the service life of the equipment.
[0081] It should be noted that before adjusting the control parameters of the motor based on the mechanical parameter identification results, the mechanical parameter identification results may also be filtered by, but not limited to, a low-pass filter or a sliding average filter.
[0082] In summary, the different operating states of the motor are determined based on the acceleration, and filtering is performed using a filtering method corresponding to the operating state. The noise in the operating data obtained under different accelerations of the motor can be filtered out, ensuring the accuracy of the mechanical parameter identification process and improving the stability of the motor control.
[0083] Based on the above embodiments:
[0084] In some embodiments, the motor operating state includes a first operating state; and based on the motor acceleration, determining the current operating state of the motor from a plurality of operating states of the motor includes:
[0085] When the motor acceleration is greater than the first acceleration threshold and less than the second acceleration threshold, determining the acceleration change rate corresponding to the current control cycle;
[0086] When the acceleration change rate is not greater than the acceleration change rate threshold, determining that the current operating state of the motor is a first operating state;
[0087] Filter the current operation data according to the filtering method corresponding to the current operation state, and determine the data to be identified based on the filtering result, including:
[0088] Acquire historical operation data corresponding to each of a first preset number of historical control periods; the historical control period is the control period before the current control period;
[0089] Based on the mean value calculation of each historical operation data and the current operation data, the target data pair corresponding to the current control cycle is obtained;
[0090] The data to be identified is determined based on the target data pair.
[0091] In this embodiment, when determining the current operating state of the motor, it is specifically determined based on the acceleration of the motor. If the acceleration of the motor is within the range between the first acceleration threshold and the second acceleration threshold, the acceleration of the motor is small. At this time, it can be determined that the motor is currently operating in a small acceleration operating state. When the motor acceleration is small, the motor operating state can be further determined as a small acceleration continuous operating state, that is, when the acceleration change rate is not greater than the acceleration change rate threshold, the motor operating state is determined to be the first operating state. At this time, the change in motor acceleration is small and the acceleration is relatively stable.
[0092] After determining that the current operating state is the first operating state, when filtering the current operating data, specifically, if the motor acceleration in the current control cycle is small, then the historical operating data corresponding to each of the first preset number of historical control cycles are obtained, and the historical control cycle mentioned here is the historical control cycle before the current control cycle. By performing mean calculation on the first preset number of historical operating data and the current operating data, the target data pair corresponding to the current control cycle is obtained, and the filtering of the current operating data is realized. Specifically, the rotation speed corresponding to the first preset number of historical operating data and the rotation speed corresponding to the current operating data can be averaged to obtain the average value of the rotation speed, the torque corresponding to the first preset number of historical operating data and the torque corresponding to the current operating data can be averaged to obtain the average value of the torque, the motor acceleration corresponding to the first preset number of historical operating data and the motor acceleration corresponding to the current operating data can be averaged to obtain the average value of the motor acceleration, and the average value of the rotation speed, the average value of the torque and the average value of the motor acceleration are used as the target data pair of the current control cycle after filtering.
[0093] Based on this, by performing mean processing on multiple operating data, the impact of errors caused by abnormal motor fluctuations on the mechanical identification accuracy can be reduced, and the signal-to-noise ratio of the operating data can be improved.
[0094] It should be noted that when setting the acceleration threshold, multi-level settings can be performed, such as setting the acceleration thresholds to a1, a2, a3, and a4, where a1 is the first acceleration threshold and a4 is the second acceleration threshold, and the first acceleration threshold and the second acceleration threshold are further graded to more clearly determine the operating state of the motor.
[0095] Of course, the classification of acceleration thresholds is not limited to the four levels mentioned above. In actual operation, the acceleration can be divided into more levels or multiple operating states can be distinguished according to actual conditions. This application does not limit this.
[0096] In some embodiments, the motor operating state includes a second operating state; after determining the acceleration change rate corresponding to the current control cycle, the method further includes:
[0097] When the acceleration change rate is greater than the acceleration change rate threshold, determining that the current operating state of the motor is a second operating state;
[0098] Filter the current operation data according to the filtering method corresponding to the current operation state, and determine the data to be identified based on the filtering result, including:
[0099] Acquire historical operation data corresponding to each of the second preset number of historical control cycles; the second preset number is greater than the first preset number;
[0100] Based on the mean value calculation of each historical operation data and the current operation data, the target data pair corresponding to the current control cycle is obtained;
[0101] The data to be identified is determined based on the target data pair.
[0102] If the acceleration change rate is large, that is, greater than the acceleration change rate threshold, it can be determined as a small acceleration transition operating state, that is, the second operating state, at which the motor acceleration changes faster.
[0103] After determining that the current operating state is the second operating state, when filtering the current operating data, specifically, the historical operating data corresponding to each of the second preset number of historical control cycles is obtained, and the target data pair corresponding to the current control cycle is obtained by averaging the second preset number of historical operating data and the current operating data, so as to achieve filtering of the current operating data. Specifically, the rotation speed corresponding to the second preset number of historical operating data and the rotation speed corresponding to the current operating data can be averaged to obtain the average value of the rotation speed, the torque corresponding to the second preset number of historical operating data and the torque corresponding to the current operating data can be averaged to obtain the average value of the torque, the motor acceleration corresponding to the second preset number of historical operating data and the motor acceleration corresponding to the current operating data can be averaged to obtain the average value of the motor acceleration, and the average value of the rotation speed, the average value of the torque and the average value of the motor acceleration are used as the target data pair of the current control cycle after filtering. It should be noted that when the second preset number is less than the first preset number, when the motor is in the first operating state, more operating data are averaged to improve the stability of the target data pair.
[0104] Among them, when determining the acceleration change rate, it can be calculated based on the motor acceleration of the current control cycle and the motor acceleration of the previous cycle based on the current control cycle, or it can be calculated based on the motor acceleration of multiple control cycles, which is not limited in this application.
[0105] It can be seen that when the running state of the motor is different, selecting different filtering methods can filter out the noise with greater influence in the signal within the entire acceleration range of the motor, especially the signal noise when the acceleration is small, thereby improving the accuracy of mechanical parameter identification.
[0106] In some embodiments, the motor operating state includes a third operating state; based on the motor acceleration, determining the current operating state of the motor from the plurality of operating states of the motor includes:
[0107] When the motor acceleration is greater than the second acceleration threshold, determining that the current operating state is a third operating state;
[0108] Filter the current operation data according to the filtering method corresponding to the current operation state, and determine the data to be identified based on the filtering result, including:
[0109] Determine the current operating data as the target data pair corresponding to the current control cycle;
[0110] The data to be identified is determined based on the target data pair.
[0111] If the motor acceleration in the current control cycle is large, that is, greater than the second acceleration threshold, the motor is in a high acceleration operation state. At this time, the signal noise is small and has little impact on the accuracy of operation data recognition. At this time, the operation data does not need to be filtered, but directly stored to reduce the amount of calculation.
[0112] In some embodiments, determining the data to be identified based on the target data pair includes:
[0113] storing the target data pair corresponding to the current control cycle into the target storage space; the target storage space comprises a third preset number of storage units, each storage unit being used to store a target data pair;
[0114] In the case that each storage unit stores a data pair, the target data pair stored in each storage unit is determined as the data to be identified.
[0115] The target data pairs all include the rotation speed, torque and motor acceleration, and the target data pairs determined in each control cycle are sequentially cached in a target storage space with a length of the third preset number in a "first in, first out" manner of a sliding window. When the target storage space is full, that is, the third preset number of storage units have all stored the target data pairs, mechanical parameter identification can be performed. At this time, all the target data pairs stored in the target storage unit are determined as data to be identified, so as to facilitate the subsequent mechanical parameter identification of the data to be identified.
[0116] In some embodiments, the motor operating state includes a fourth operating state; based on the motor acceleration, determining the current operating state of the motor from the plurality of operating states of the motor includes:
[0117] When the motor acceleration is less than the first acceleration threshold, determining that the current operating state is a fourth operating state;
[0118] Filter the current operation data according to the filtering method corresponding to the current operation state, and determine the data to be identified based on the filtering result, including:
[0119] Discard the current running data.
[0120] In this embodiment, the motor operation state also includes a fourth operation state, which is specifically determined based on the magnitude of the motor acceleration. If the motor acceleration is close to zero, that is, less than the preset first acceleration threshold, it can be determined that the motor is currently operating in the fourth operation state, that is, the uniform speed operation state. At this time, the current operation data can be discarded, or the data to be identified determined in the previous control cycle of the current control cycle can be determined as the data to be identified corresponding to the current control cycle, and this application does not limit this.
[0121] In some embodiments, current operation data of the motor in the current control cycle is obtained, and the current operation data includes the motor acceleration, including:
[0122] When the motor rotates forward, the current forward running data of the motor in the current control cycle is obtained, and the current forward running data includes the forward acceleration of the motor;
[0123] When the motor reverses, the current reverse running data of the motor in the current control cycle is obtained, and the current reverse running data includes the reverse acceleration of the motor;
[0124] The mechanical parameters are identified based on the data to be identified, and the mechanical parameter identification results are obtained, including:
[0125] Calculating the forward mechanical parameter identification value based on the data to be identified corresponding to each forward running data, and calculating the reverse mechanical parameter identification value based on the data to be identified corresponding to each reverse running data;
[0126] The mechanical parameter identification result is calculated based on the forward mechanical parameter identification value and the reverse mechanical parameter identification value.
[0127] Taking into account that the motor is divided into forward rotation and reverse rotation during actual operation, the operating data of the motor obtained when the motor rotates forward is forward operating data, and the operating data of the motor obtained when the motor reverses is reverse operating data. Accordingly, the operating state of the motor can also be divided into a forward first operating state, a reverse first operating state, a forward second operating state, a reverse second operating state, a forward third operating state, a reverse third operating state and a fourth operating state, wherein the forward first operating state and the reverse first operating state are forward small acceleration continuous operating state and reverse small acceleration continuous operating state, the forward second operating state and the reverse second operating state are forward small acceleration transition operating state and reverse small acceleration transition operating state, the forward third operating state and the reverse third operating state are forward large acceleration operating state and reverse large acceleration operating state, and the fourth operating state is a uniform speed operating state, which can be specifically determined according to the positive and negative directions of the operating data.
[0128] As for the above-mentioned setting of the acceleration threshold, if the acceleration thresholds are set to a1, a2, a3, and a4, respectively, where a1 is the first acceleration threshold and a4 is the second acceleration threshold, when the motor rotates forward, the motor's operating state can be divided into forward level 1 small acceleration operating state, forward level 2 small acceleration operating state, forward level 3 small acceleration operating state, and forward large acceleration operating state according to the four-level acceleration thresholds; when the motor reverses, the motor's operating state can be divided into reverse level 1 small acceleration operating state, reverse level 2 small acceleration operating state, reverse level 3 small acceleration operating state, and reverse large acceleration operating state according to the four-level acceleration thresholds. Figure 2 , Figure 3 , Figure 4 and Figure 5 As shown, Figure 2 A timing diagram of the change of the speed of a motor with time during forward rotation provided by the present invention, Figure 3 A timing diagram of the speed of a motor changing with time when it is reversed provided by the present invention, Figure 4 A timing diagram of the acceleration of a motor changing with time when it rotates forward provided by the present invention, Figure 5 The present invention provides a timing diagram of the acceleration changing with time when the motor is reversed. Figure 4 and Figure 5The horizontal axis in is time, the vertical axis is acceleration, CST represents the uniform speed running state, PST1, PST2 and PST3 are all forward small acceleration running states, PST4 is forward large acceleration running state, NST1, NST2 and NST3 are all reverse small acceleration running states, NST4 is reverse large acceleration running state, TRANS is small acceleration transition state, PERS is small acceleration continuous state. It can be seen that no matter the motor is rotating forward or reverse, there is a situation where the acceleration is less than zero, therefore, the first acceleration threshold and the second acceleration threshold mentioned in this application are both positive values, and the motor acceleration in the determined operation data is compared with the first acceleration threshold and the second acceleration threshold, and the absolute value of the motor acceleration is compared.
[0129] Of course, regardless of whether the operating data is obtained when the motor is rotating forward or reverse, the corresponding filtering methods in the forward small acceleration continuous operating state and the reverse small acceleration continuous operating state are the same, the corresponding filtering methods in the forward small acceleration transition operating state and the reverse small acceleration transition operating state are the same, the corresponding filtering methods in the forward large acceleration operating state and the reverse large acceleration operating state are the same, that is, the corresponding filtering methods in the forward first operating state and the reverse first operating state are the same, the corresponding filtering methods in the forward second operating state and the reverse second operating state are the same, and the corresponding filtering methods in the forward third operating state and the reverse third operating state are the same.
[0130] In some embodiments, the forward mechanical parameter identification value is calculated based on the to-be-identified data corresponding to each forward operation data, including:
[0131] Based on the data to be identified corresponding to each forward running data, the forward mechanical parameter identification value is calculated using the first quantitative relationship, and the first quantitative relationship is:
[0132] ;
[0133] in, , , , , , , , , i is the current moment, , and are the acceleration, speed and torque of the data pairs to be identified at the current moment i, respectively; m is the preset identification number; a is the sum of the accelerations of the m data pairs to be identified; b is the sum of the torques of the m data pairs to be identified; c is the sum of the speeds of the m data pairs to be identified; d is the sum of the acceleration and torque products of each data pair to be identified in the m data pairs to be identified; e is the sum of the acceleration and speed products of each data pair to be identified in the m data pairs to be identified; f is the sum of the speed and torque products of each data pair to be identified in the m data pairs to be identified; g is the sum of the squares of the accelerations of each data pair to be identified in the m data pairs to be identified; h is the sum of the squares of the speeds of each data pair to be identified in the m data pairs to be identified; T p is the positive disturbance torque, J p is the positive moment of inertia, B P is the positive viscous friction coefficient. The positive mechanical parameter identification value includes the positive disturbance torque, the positive moment of inertia and the positive viscous friction coefficient.
[0134] The present embodiment provides a method for calculating the forward mechanical parameter identification value of the data to be identified corresponding to the forward running data. By calculating the torque, rotational speed and motor acceleration, the forward disturbance torque, the forward moment of inertia and the forward viscous friction coefficient can be determined. Correspondingly, the reverse disturbance torque, the reverse moment of inertia and the reverse viscous friction coefficient can be determined. The method for calculating the reverse mechanical parameter identification value of the data to be identified corresponding to the reverse running data is the same as that for the forward direction, except that the data to be identified corresponding to the forward running data in the first quantitative relationship is replaced by the data to be identified corresponding to the reverse running data.
[0135] It should be noted that, due to the first quantitative relationship, T p is the positive disturbance torque, J p is the positive moment of inertia, B P is the positive viscous friction coefficient. Therefore, the corresponding a, b, c, d, e, f, g and h are all calculated by the torque, speed and acceleration obtained when the motor rotates forward. When calculating the reverse disturbance torque, reverse moment of inertia and reverse viscous friction coefficient, the corresponding a, b, c, d, e, f, g and h are all calculated by the torque, speed and acceleration obtained when the motor rotates reversely. Specifically, the quantitative relationship can be:
[0136] ;
[0137] T n is the reverse disturbance torque, J n is the reverse moment of inertia, B n is the reverse viscous friction coefficient.
[0138] In some embodiments, calculating the mechanical parameter identification result based on the forward mechanical parameter identification value and the reverse mechanical parameter identification value includes:
[0139] Based on the positive mechanical parameter identification value and the reverse mechanical parameter identification value, the mechanical parameter identification result is calculated using the second quantitative relationship, and the second quantitative relationship is:
[0140] ;
[0141] Where, J is the identification value of the moment of inertia, B is the identification value of the viscous friction coefficient, TL is the identification value of the load torque, Tc is the identification value of the Coulomb friction force, and T n is the reverse disturbance torque, J n is the reverse moment of inertia, B n is the reverse viscous friction coefficient, the reverse mechanical parameter identification value includes the reverse disturbance torque, the reverse moment of inertia and the reverse viscous friction coefficient, and the mechanical parameter identification result includes the moment of inertia identification value, the viscous friction coefficient identification value, the load torque identification value and the Coulomb friction force identification value.
[0142] When calculating the mechanical parameter identification results, it is necessary to consider both the forward mechanical parameter identification value and the reverse mechanical parameter identification value, that is, to take the average value of the two to reduce the fluctuation during forward and reverse operation and ensure the stable operation of the motor. When updating the control parameters, the moment of inertia identification value, the viscous friction coefficient identification value, the load torque identification value and the Coulomb friction force identification value all have an impact on the control parameters, and the most important of them is the moment of inertia identification value. Therefore, the present invention can be used in various application sites where asynchronous motors, synchronous motors, DC motors and other motors are used as power and the moment of inertia is required as a control parameter. The present invention can realize online or offline identification of operating data in application scenarios.
[0143] In some embodiments, adjusting the control parameters of the motor based on the mechanical parameter identification result includes:
[0144] Determining a parameter change rate between a mechanical parameter identification result and a preset mechanical parameter of the motor;
[0145] When the parameter change rate is greater than a preset change rate threshold, the control parameters of the motor are adjusted based on the preset mechanical parameters.
[0146] In this embodiment, it is taken into consideration that during the mechanical parameter identification process, abnormal values may appear in a certain control cycle of the motor, or the mechanical parameter identification results of two control cycles may vary greatly. At this time, if the mechanical parameter identification results are directly configured in real time to the control system, the updated control parameters in the control system will differ greatly from the original control parameters, which is equivalent to artificially introducing disturbances. This may cause the motor system to enter a dynamic adjustment process, and in severe cases, oscillation or system instability may occur.
[0147] To this end, a preset change rate threshold of the mechanical parameter identification result is also set in the present application. If the parameter change rate of the mechanical parameter identification result is not greater than the preset change rate threshold, the control parameters of the motor can be directly updated based on the mechanical parameter identification result. If the change rate of the mechanical parameter identification result is greater than the preset change rate threshold, in order to avoid a jump in the control parameters, the motor control parameters are updated based on the preset mechanical parameters to ensure linear control of the motor.
[0148] In some embodiments, determining a parameter change rate between a mechanical parameter identification result and a preset mechanical parameter of the motor includes:
[0149] Based on the mechanical parameter identification result of the current control cycle and the preset mechanical parameter identification result, the change rate of the mechanical parameter identification result of the current control cycle is determined using a third quantitative relationship, and the third quantitative relationship is:
[0150] ;
[0151] Among them, J ratio is the rate of change of mechanical parameter identification results, J est is the mechanical parameter identification result of the current control cycle, J old It is the preset mechanical parameter identification result.
[0152] This embodiment provides a method for calculating the rate of change of a mechanical parameter identification result. Of course, this application does not limit this.
[0153] It should be noted that the preset mechanical parameter identification results are pre-set in the control system to avoid jumps in the motor system control parameters.
[0154] J ratiomax is the preset change rate threshold, J ratio With J ratiomax Compare, if J ratio No greater than J ratiomax , then based on J est Update the control parameters of the motor. If J ratio Greater than J ratiomax , then use J ratiomax The corresponding preset mechanical parameter identification results update the control parameters of the motor.
[0155] The preset mechanical parameter identification results include the preset moment of inertia identification value, the preset viscous friction coefficient identification value, the preset load torque identification value and the preset Coulomb friction force identification value, that is, the original moment of inertia identification value, viscous friction coefficient identification value, load torque identification value and Coulomb friction force identification value. Please refer to Figure 6 , Figure 6A block diagram of a mechanical parameter identification system provided by the present invention.
[0156] The mechanical parameter identification result includes the moment of inertia identification value; the control parameters of the motor are adjusted based on the mechanical parameter identification result, including:
[0157] Determining a rate of change of the moment of inertia between the identified moment of inertia value and a preset moment of inertia;
[0158] When the rate of change of the moment of inertia is less than or equal to a preset threshold, the control parameters of the motor are updated based on the mechanical parameter identification result.
[0159] Specifically, in the present application, the motor is always in a running state, the torque and speed of the motor are sampled in each control cycle of the motor, and the motor acceleration is calculated based on the speed sampled in each control cycle. Therefore, a set of data pairs consisting of speed, torque and acceleration can be determined in each control cycle of the motor. In each control cycle of the motor, the operating state of the motor is determined in real time according to the magnitude of the motor acceleration. If the motor is in a continuous operation state with small acceleration (a first operation state), the operating parameters of the first preset number of control cycles before the current control cycle and the current operating parameters of the current control cycle are averaged, and a set of averaged speeds, torques and motor accelerations are stored as a set of target data pairs; if the motor is in a transitional operation state with small acceleration (a second operation state), the operating parameters of the second preset number of control cycles before the current control cycle and the current operating parameters of the current control cycle are averaged, and a set of averaged speeds, torques and motor accelerations are stored as a set of target data pairs; if the motor is in a large acceleration operation state (a third operation state), the speed, torque and motor acceleration collected and calculated in the current control cycle are directly stored as a set of target data pairs; and if the motor is in a uniform speed operation state (a fourth operation state), the speed, torque and motor acceleration collected and calculated in the current control cycle are directly discarded and not stored. Therefore, except for the control period in which the motor is in a uniform speed running state, a set of target data pairs are stored in other control periods. When the number of stored target data pairs reaches the third preset number, the mechanical parameter identification can be triggered, that is, the third preset number of target data pairs are used as the data to be identified for mechanical parameter identification. The specific identification process refers to the first quantitative relationship and the second quantitative relationship, and the corresponding quantitative relationship when reversed. After the identification is completed, the parameter change rate of the mechanical parameter identification result must be determined, that is, the control parameters can only be updated based on the mechanical parameter identification result when the parameter change rate of the mechanical parameter identification result is not greater than the preset change rate threshold. Otherwise, the control parameters of the motor are updated based on the preset mechanical parameters to avoid the problem of motor failure caused by a sudden change in the motor running state due to the update of the control parameters when an abnormality occurs in the control period.
[0160] like Figure 7 As shown, Figure 7 A schematic diagram of the structure of a motor control system provided by the present invention, the system comprises:
[0161] An operation data acquisition unit 71 is used to acquire current operation data of the motor in a current control cycle, where the current operation data includes motor acceleration;
[0162] An operating state determining unit 72, for determining the current operating state of the motor from a plurality of operating states of the motor based on the motor acceleration; each operating state of the motor corresponds to a filtering mode;
[0163] A filtering mode determination unit 73, configured to filter the current operation data according to a filtering mode corresponding to the current operation state, and determine the data to be identified based on the filtering result;
[0164] A mechanical parameter identification unit 74, used to perform mechanical parameter identification based on the data to be identified, and obtain a mechanical parameter identification result;
[0165] The control parameter adjustment unit 75 is used to adjust the control parameters of the motor based on the mechanical parameter identification result, so as to control the operation of the motor according to the adjusted control parameters.
[0166] For an introduction to the motor control system provided by the present invention, please refer to the above method embodiment, and the present invention will not be described in detail here.
[0167] like Figure 8 As shown, Figure 8 A schematic diagram of the structure of a motor control device provided by the present invention, the device comprises:
[0168] A memory 81, used for storing computer programs;
[0169] The processor 82 is used to implement the steps of the motor control method as described above when executing the computer program.
[0170] For an introduction to the motor control device provided by the present invention, please refer to the above method embodiment, and the present invention will not be described in detail here.
[0171] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0172] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A motor control method, characterized in that: include: Acquire current operation data of the motor in a current control cycle, wherein the current operation data includes motor acceleration; determining a current operating state of the motor from a plurality of operating states of the motor based on the motor acceleration; Each operating state of the motor corresponds to a filtering mode; Filtering the current operation data according to a filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result; Performing mechanical parameter identification based on the data to be identified to obtain a mechanical parameter identification result; The control parameters of the motor are adjusted based on the mechanical parameter identification result, so as to control the operation of the motor according to the adjusted control parameters.
2. The motor control method according to claim 1, characterized in that: The motor operating state includes a first operating state; and determining the current operating state of the motor from a plurality of operating states of the motor based on the motor acceleration includes: When the motor acceleration is greater than a first acceleration threshold and less than a second acceleration threshold, determining the acceleration change rate corresponding to the current control cycle; When the acceleration change rate is not greater than the acceleration change rate threshold, determining that the current operating state of the motor is the first operating state; The filtering the current operation data according to the filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result, includes: Acquire historical operation data corresponding to each of a first preset number of historical control cycles; the historical control cycle is a control cycle before the current control cycle; Performing mean calculation based on each of the historical operation data and the current operation data to obtain a target data pair corresponding to the current control period; The data to be identified is determined based on the target data pair.
3. The motor control method according to claim 2, characterized in that: The motor operation state includes a second operation state; after determining the acceleration change rate corresponding to the current control cycle, the method further includes: When the acceleration change rate is greater than the acceleration change rate threshold, determining that the current operating state of the motor is the second operating state; The filtering the current operation data according to the filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result, includes: Acquire historical operation data corresponding to each of a second preset number of historical control cycles; the second preset number is less than the first preset number; Perform mean calculation based on the historical operation data and the current operation data to obtain a target data pair corresponding to the current control period; The data to be identified is determined based on the target data pair.
4. The motor control method according to claim 2, characterized in that: The motor operating state includes a third operating state; and determining the current operating state of the motor from a plurality of operating states of the motor based on the motor acceleration includes: When the motor acceleration is greater than the second acceleration threshold, determining that the current operating state is the third operating state; The filtering the current operation data according to the filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result, includes: Determining the current operating data as a target data pair corresponding to the current control period; The data to be identified is determined based on the target data pair.
5. The motor control method according to any one of claims 2 to 4, characterized in that: The determining the data to be identified based on the target data pair includes: storing the target data pair corresponding to the current control cycle into a target storage space; the target storage space comprises a third preset number of storage units, each of which is used to store one target data pair; In the case that each of the storage units stores a data pair, the target data pair stored in each of the storage units is determined as the data to be identified.
6. The motor control method according to claim 2, characterized in that: The motor operating state includes a fourth operating state; and determining the current operating state of the motor from a plurality of operating states of the motor based on the motor acceleration includes: When the motor acceleration is less than the first acceleration threshold, determining that the current operating state is the fourth operating state; The filtering the current operation data according to the filtering method corresponding to the current operation state, and determining the data to be identified based on the filtering result, includes: Discard the current running data.
7. The motor control method according to claim 1, characterized in that: Acquire the current operation data of the motor in the current control cycle, wherein the current operation data includes the motor acceleration, including: When the motor rotates forward, obtaining current forward running data of the motor in the current control cycle, wherein the current forward running data includes the forward acceleration of the motor; When the motor is reversed, obtaining current reverse operation data of the motor in the current control cycle, wherein the current reverse operation data includes reverse acceleration of the motor; Performing mechanical parameter identification based on the data to be identified to obtain mechanical parameter identification results includes: Calculating a forward mechanical parameter identification value based on the data to be identified corresponding to each forward running data, and calculating a reverse mechanical parameter identification value based on the data to be identified corresponding to each reverse running data; The mechanical parameter identification result is calculated based on the forward mechanical parameter identification value and the reverse mechanical parameter identification value.
8. The motor control method according to claim 1, characterized in that: The adjusting the control parameters of the motor based on the mechanical parameter identification result includes: Determining a parameter change rate between the mechanical parameter identification result and a preset mechanical parameter of the motor; When the parameter change rate is greater than a preset change rate threshold, the control parameter of the motor is adjusted based on the preset mechanical parameter.
9. A motor control system, characterized in that: include: An operation data acquisition unit, used to acquire current operation data of the motor in a current control cycle, wherein the current operation data includes motor acceleration; An operating state determining unit, configured to determine a current operating state of the motor from a plurality of operating states of the motor based on the motor acceleration; each operating state of the motor corresponds to a filtering mode; a filtering mode determining unit, configured to filter the current operation data according to a filtering mode corresponding to the current operation state, and determine the data to be identified based on the filtering result; A mechanical parameter identification unit, used to perform mechanical parameter identification based on the data to be identified to obtain a mechanical parameter identification result; A control parameter adjustment unit is used to adjust the control parameters of the motor based on the mechanical parameter identification result, so as to control the operation of the motor according to the adjusted control parameters.
10. A motor control device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the motor control method as described in any one of claims 1 to 8 when executing a computer program.