Motor control method and device, equipment and medium
By setting the appropriate speed measurement duration according to the speed range of the permanent magnet synchronous motor, the speed calculation error problem of the permanent magnet synchronous motor at low and high speeds is solved, and the accuracy and stability of the closed-loop speed control are improved.
Patent Information
- Application Number
- CN202410763616.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-24
AI Technical Summary
There are large errors in the speed calculation of permanent magnet synchronous motors at low and high speeds, which affects the motor control accuracy and dynamic response. Especially in the high speed section, the speed measurement duration of the low speed section is used, which results in untimely speed update and affects closed-loop control. accuracy and stability.
By obtaining the preliminary speed of the motor to be controlled, the speed range to which it belongs is determined, and the appropriate speed measurement duration is set based on the correspondence between the speed range and the measurement duration. Different speed measurements are used for different speed conditions (low speed, medium speed, high speed). The measurement time is reduced, the rotation speed calculation error is reduced, and the rotation speed calculation accuracy is improved.
It effectively reduces the speed calculation error of high-speed permanent magnet synchronous motors, improves the speed calculation accuracy at low and high speeds, and thereby improves the accuracy and stability of speed closed-loop control.
Smart Images

Figure CN118694249A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control technology, and in particular to a motor control method, device, equipment and medium. Background Art
[0002] The permanent magnet synchronous motor calculates the speed based on the change in the motor rotor rotation angle per unit time. If the speed measurement time is kept constant, the change in the motor rotor rotation angle during the speed measurement time is proportional to the speed of the permanent magnet synchronous motor. The higher the speed of the permanent magnet synchronous motor, the greater the change in the rotor angle during the speed measurement time; the lower the speed of the permanent magnet synchronous motor, the smaller the change in the rotor angle during the speed measurement time. If the speed measurement time is short and the speed of the permanent magnet synchronous motor is low, the change in the rotor angle detected during the speed detection time is small, resulting in a large error in the calculated speed of the permanent magnet synchronous motor, thereby affecting the speed closed-loop control accuracy of the permanent magnet synchronous motor. If the permanent magnet synchronous motor still uses the speed measurement time of the low speed section in the high speed section, the speed of the permanent magnet synchronous motor will not be updated in time, thereby affecting the dynamic response of the permanent magnet synchronous motor, as well as the accuracy and stability of the speed closed-loop control. Summary of the invention
[0003] Based on this, it is necessary to propose a motor control method, device, equipment and medium to address the technical problem that the current motor speed calculation in the prior art is inaccurate, which affects the motor control accuracy.
[0004] In a first aspect, a motor control method is provided, the method comprising:
[0005] Obtaining a preliminary speed of the motor to be controlled, and determining a speed range to which the preliminary speed belongs;
[0006] Determine the speed measurement time of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement time, wherein the corresponding relationship between the speed interval and the measurement time is that the greater the speed of the speed interval, the shorter the measurement time;
[0007] The speed measurement and calculation are performed according to the speed measurement duration to determine the actual speed of the motor to be controlled, and the motor is controlled according to the actual speed.
[0008] It should be understood that the preset number of speed ranges together constitute the adjustable speed range of the motor to be controlled. The adjustable speed range is not only the rated speed range of the motor to be controlled, but can also be a speed range set by the user. For example, for new energy vehicles equipped with high-speed motors, the speed range of the high-speed motors is limited for safety reasons. The speed range after the limit is the adjustable speed range of the high-speed motor.
[0009] It should be understood that the preset number theoretically needs to be as large as possible, that is, the size of the preset number is proportional to the accuracy of the rotational speed calculation, that is, the larger the preset number, the higher the accuracy of the rotational speed calculation.
[0010] It should be understood that when the motor is controlled according to the actual speed, the motor speed is controlled by a closed-loop control method, and the current motor speed is measured according to the speed measurement duration with a concentrated order of 1 among the target speed measurement durations. After the current motor speed drops to / rises to the boundary of the current speed range, the speed hysteresis method is used as the speed gear switching method for the motor to be controlled, and the current motor speed will continue to be measured according to the speed measurement duration with a concentrated order of 2 among the target speed measurement durations.
[0011] In a second aspect, a motor control device is provided, the device comprising:
[0012] A speed acquisition unit, used to acquire a preliminary speed of the motor to be controlled, and determine a speed range to which the preliminary speed belongs;
[0013] A measurement duration determining unit, used to determine the speed measurement duration of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement time, wherein the corresponding relationship between the speed interval and the measurement time is that the greater the speed of the speed interval, the shorter the measurement duration;
[0014] The control unit is used to measure and calculate the rotational speed according to the rotational speed measurement duration, determine the actual rotational speed of the motor to be controlled, and control the motor according to the actual rotational speed.
[0015] According to a third aspect, a motor control device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned motor control method when executing the computer program.
[0016] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned motor control method are implemented.
[0017] The present application obtains the preliminary speed of the motor to be controlled, determines the speed interval to which the preliminary speed belongs; determines the speed measurement duration of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement duration, and the corresponding relationship between the speed interval and the measurement time is that the larger the speed of the speed interval, the shorter the measurement duration; performs speed measurement and calculation according to the speed measurement duration, determines the actual speed of the motor to be controlled, and performs motor control according to the actual speed. The speed measurement duration is adjusted in real time according to the speed of the permanent magnet synchronous motor, and different speed measurement durations are used for different speed conditions (low speed, medium speed, high speed), so as to reduce the speed calculation error of the high speed permanent magnet synchronous motor, improve the speed calculation accuracy of the permanent magnet synchronous motor at low speed and high speed, and thus improve the accuracy and stability of the speed closed-loop control. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] in:
[0020] Figure 1 A diagram showing an application environment of a motor control method in an embodiment;
[0021] Figure 2 is a flow chart of a motor control method in one embodiment;
[0022] Figure 3 A schematic diagram of switching the speed measurement duration of a motor control method in one embodiment;
[0023] Figure 4 is a flow chart of a motor control method in another embodiment;
[0024] Figure 5 A schematic diagram of speed gear switching of a motor control method in one embodiment;
[0025] Figure 6 is a flow chart of a motor control method in another embodiment;
[0026] Figure 7 is a structural block diagram of a motor control device in one embodiment;
[0027] Figure 8 is a structural block diagram of a computer device in one embodiment;
[0028] Fig. 9It is a structural block diagram of a computer device in another embodiment. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0030] The motor control method provided by the embodiment of the present invention can be applied in Figure 1 In an application environment, the client 110 communicates with the server 120 through a network, and the server 120 controls the motor to be controlled 130. The corresponding relationship between the server 120 and the motor to be controlled 130 can be one-to-one, that is, one server 120 controls one motor to be controlled 130. For example, when the motor to be controlled 130 is used in a new energy vehicle, one server 120 (control module) controls one motor to be controlled 130 (engine). It can also be one-to-many, that is, one server 120 controls multiple motors to be controlled 130. For example, in scenarios such as factories and assembly lines, different motors to be controlled 130 are often controlled by one server 120 (control host).
[0031] The server 120 can receive the start instruction through the client 110, and the server 120 sends the speed instruction generated based on the start instruction to the motor controller, so that the motor controller controls the motor 130 to be controlled. The motor controller is used to: obtain the preliminary speed of the motor 130 to be controlled according to the speed instruction, and determine the speed interval to which the preliminary speed belongs; determine the speed measurement duration of the motor 130 to be controlled according to the corresponding relationship between the speed interval and the measurement duration, and the corresponding relationship between the speed interval and the measurement time is that the larger the speed of the speed interval, the shorter the measurement duration; perform speed measurement and calculation according to the speed measurement duration, determine the actual speed of the motor 130 to be controlled, and control the motor according to the actual speed. The speed measurement duration is adjusted in real time according to the speed of the permanent magnet synchronous motor, and different speed measurement durations are used for different speed conditions (low speed, medium speed, high speed), so as to reduce the speed calculation error of the high speed permanent magnet synchronous motor, and improve the speed calculation accuracy of the permanent magnet synchronous motor at low speed and high speed, thereby improving the accuracy and stability of the speed closed-loop control.
[0032] The client 110 may be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices. The server 120 may be implemented by an independent server or a server cluster consisting of multiple servers.
[0033] In the prior art, a speed measuring device can be used to measure the speed of a motor. The speed measuring device can be a photoelectric encoding, Hall or other sensor. The specific measurement process is: by setting measurement points on the rotating shaft, such as setting one or two measurement points on a circle of the rotating shaft, when the measurement point rotates to the sensor detection position, it is proved that the rotating shaft has rotated the angle corresponding to the measurement point. For example, when a detection point is set on the rotating shaft, if the rotating shaft rotates to 1 degree and 359 degrees, the difference between the two cannot be detected; at the same time, at other angles outside the measurement point, the accurate rotation angle cannot be directly detected by the sensor.
[0034] For example, when the speed range of the high-speed permanent magnet synchronous motor is 0-10000rpm, the initial speed of the permanent magnet synchronous motor is 0rpm, and the given speed is set to 6000rpm. At this time, the difference between the given speed and the actual speed is 6000, that is, the input value of the speed closed-loop control algorithm is 6000rpm, and the speed closed-loop control algorithm will control the permanent magnet synchronous motor to quickly respond to the given speed of the permanent magnet synchronous motor. If the given speed of the permanent magnet motor is 5rpm, it starts to accelerate from the initial speed of 0rpm. At this time, the difference between the given speed and the actual speed of the permanent magnet synchronous motor is 5; when the adjustment coefficient of the speed closed-loop control algorithm remains unchanged, since the response speed of the permanent magnet synchronous motor is proportional to the difference between the given speed and the actual speed of the permanent magnet synchronous motor, the response speed of the high-speed permanent magnet synchronous motor at low speed is lower than the response speed at high speed. The traditional speed calculation method has a speed resolution of 1rpm. If the high-speed permanent magnet synchronous motor runs at 6000rpm, when there is an error or fluctuation of 1rpm in the speed, the speed error or fluctuation rate is 0.016%. The permanent magnet synchronous motor has a lower error and fluctuation rate at high speed; if the permanent magnet synchronous motor runs at 5rpm, when there is an error or fluctuation of 1rpm in the speed, the error rate or fluctuation rate of the permanent magnet synchronous motor is 20%. This method cannot meet the requirements in situations where there are high requirements for speed error. In addition, the speed resolution is only 1rpm, and the permanent magnet synchronous motor can only be controlled at a speed with a speed accuracy of 1rpm, and it is impossible to achieve fine control of the permanent magnet synchronous motor.
[0035] The present invention is described in detail below through specific embodiments.
[0036] See also Figure 2 As shown, Figure 2 A flow chart of a motor control method provided by an embodiment of the present invention includes the following steps:
[0037] S101, obtaining a preliminary rotation speed of a motor to be controlled, and determining a rotation speed range to which the preliminary rotation speed belongs;
[0038] For example, when obtaining the actual speed data of the motor to be controlled, the speed can be calculated by the change in the motor rotor rotation angle per unit time, where the unit time is the speed measurement duration. The actual speed data of the motor to be controlled can also be estimated by a speed measurement device.
[0039] Exemplarily, the motor is a permanent magnet synchronous motor, and the given speed data is specific speed data that the permanent magnet synchronous motor needs to achieve according to user requirements / work requirements.
[0040] Exemplarily, the speed range is used to distinguish different speed conditions. For example, the speed range of 0-525 (rpm) is used as a low speed range, the speed range of 525-5025 (rpm) is used as a medium speed range, and the speed range of 5025-10000 (rpm) is used as a high speed range.
[0041] The exemplary preset number of speed intervals together constitute the adjustable speed interval of the motor to be controlled. The adjustable speed interval is not just the rated speed interval of the motor to be controlled. The rated speed can be understood as the motor speed of the motor to be controlled under full load, that is, the rated speed interval is a speed interval from 0 to the rated speed, and can also be a speed interval set by the user. For example, the adjustable speed interval of the motor to be controlled in a new energy vehicle is 0-10000rpm. The preset rule can be an equal division rule, for example, the adjustable speed interval is evenly divided into a preset number of speed intervals. The preset number theoretically needs to be as large as possible, that is, the size of the preset number is proportional to the accuracy of the speed calculation, that is, the larger the preset number, the higher the accuracy of the speed calculation, but in practical applications, the convenience of actual division needs to be considered.
[0042] S102, determining the speed measurement time of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement time, wherein the corresponding relationship between the speed interval and the measurement time is that the greater the speed of the speed interval, the shorter the measurement time;
[0043] Exemplarily, the correspondence between the speed intervals and the measurement durations includes different speed intervals and the speed measurement durations corresponding to the speed intervals.
[0044] In a possible implementation, the corresponding relationship may include: when the permanent magnet synchronous motor speed is in the range of 0-500rpm, the speed measurement time is the first level, and the corresponding speed measurement time is 10ms; when the permanent magnet synchronous motor speed is in the range of 501-2000rpm, the speed measurement time is the second level, and the corresponding speed measurement time is 5ms; when the permanent magnet synchronous motor speed is in the range of 2001-5000rpm, the speed measurement time is the third level, and the corresponding speed measurement time is 3ms; when the permanent magnet synchronous motor speed is above 5001rpm, the speed measurement time is the fourth level, and the corresponding speed measurement time is 1ms.
[0045] Exemplarily, by setting different speed measurement durations for different speed conditions (low speed, medium speed, high speed), for example, when the speed of the permanent magnet synchronous motor is in the range of 0-500rpm (low speed), the speed measurement duration is set to 10ms, when the speed of the permanent magnet synchronous motor is in the range of 501-2000rpm (medium speed), the speed measurement duration is set to 5ms, and when the speed of the permanent magnet synchronous motor is above 5001rpm (high speed), the speed measurement duration is set to 1ms, thereby reducing the speed calculation error of the high-speed permanent magnet synchronous motor, improving the speed calculation accuracy of the permanent magnet synchronous motor at low and high speeds, and thereby improving the accuracy and stability of the speed closed-loop control.
[0046] S103 , measuring and calculating the rotational speed according to the rotational speed measurement duration, determining the actual rotational speed of the motor to be controlled, and controlling the motor according to the actual rotational speed.
[0047] Exemplarily, the speed measurement duration represents the actual speed of the motor to be controlled by the angular change of the rotating shaft of the motor to be controlled within the speed measurement duration. Since the existing speed calculation methods mostly use the same speed measurement duration for different speeds, the actual speed of the motor to be controlled does not match the calculated speed. Therefore, when the calculated speed is equal to the given speed, the actual speed may not be equal to the given speed. Therefore, the calculated speed is corrected by the speed measurement duration, that is, the error between the actual speed and the calculated speed is reduced. When the corrected calculated speed is equal to the given speed, it can be considered that the actual speed is also equal to the given speed.
[0048] Exemplarily, different speed measurement durations are set for different speed conditions (low speed, medium speed, high speed), and the speed is measured and calculated according to the speed measurement duration to determine the actual speed of the motor to be controlled. For example, at low speed, due to the low speed, the rate of change of the shaft angle is slow. If the speed measurement duration at this time is too short, it is easy for the speed measurement process based on the speed measurement duration to be completed, but the shaft has not yet rotated to the measurement position, resulting in the inability to calculate the speed. Therefore, by setting a longer speed measurement duration (10ms) for low speed, it is ensured that the speed based on the speed measurement duration is During the measurement process, the shaft can rotate to the measurement position at least once; at high speed, due to the high speed, the rate of change of the shaft angle is fast. If the speed measurement time is too long at this time, it is easy for the shaft to rotate to the angle corresponding to the measurement position. For example, when the angle of the measurement position is 1°, the angle corresponding to the measurement position is 359°. Although the position where the shaft rotates 1° is consistent with the position where the shaft rotates 359°, the change in the shaft angle is different. Therefore, by setting a shorter speed measurement time (3ms), the shaft is prevented from rotating to the angle corresponding to the measurement position, thereby improving the measurement accuracy.
[0049] Exemplarily, a closed-loop control method is used to control the motor according to the actual speed. The closed-loop control method is a control relationship in which the controlled output is returned to the input end as the control in a certain way, and a control influence is exerted on the input end, that is, a system control method with feedback information. In this example, the feedback information can be understood as the speed calculated according to the speed measurement duration. Specifically, when the actual speed A is at a low speed, the speed B of the motor to be controlled is calculated by the speed measurement duration (10ms) corresponding to the low speed, and the speed B is used as the feedback information, that is, the speed range of the speed B is obtained, and then the speed measurement duration of the speed B is obtained, and then the speed C of the motor to be controlled is calculated according to the speed measurement duration of the speed B. If the speed C is equal to the given speed, the control process for the motor to be controlled is completed. If the speed C is not equal to the given speed, the speed C is used as the feedback information, and the speed of the motor to be controlled is continued to be calculated according to the speed measurement duration of the speed C until the calculated speed of the motor to be controlled is equal to the given speed.
[0050] Exemplarily, when controlling the motor to be controlled, it is often necessary to significantly change the speed of the motor to be controlled. For example, when controlling the motor to be controlled of a new energy vehicle, during the parking process of the new energy vehicle, it is necessary to reduce the speed of the motor to be controlled from a high speed (10000rpm) to a low speed (300rpm). At this time, in order to ensure the accuracy of the control of the motor to be controlled, it is necessary to accurately calculate the speed data under different speeds, that is, control the motor to be controlled according to the speed measurement time under different speeds.
[0051] By obtaining the preliminary speed of the motor to be controlled, the speed interval to which the preliminary speed belongs is determined; according to the corresponding relationship between the speed interval and the measurement time, the speed measurement time of the motor to be controlled is determined, and the corresponding relationship between the speed interval and the measurement time is that the larger the speed of the speed interval, the shorter the measurement time; the speed measurement and calculation are performed according to the speed measurement time to determine the actual speed of the motor to be controlled, and the motor is controlled according to the actual speed. The speed measurement time is adjusted in real time according to the speed of the permanent magnet synchronous motor, and different speed measurement times are used for different speed conditions (low speed, medium speed, high speed), so as to reduce the speed calculation error of the high speed permanent magnet synchronous motor, improve the speed calculation accuracy of the permanent magnet synchronous motor at low speed and high speed, and thus improve the accuracy and stability of the speed closed-loop control.
[0052] Exemplarily, when obtaining the given speed data of the motor to be controlled, the given speed data of the motor to be controlled can be obtained by obtaining user request information, that is, obtaining the user request information, and parsing the user request information to obtain the given speed data. However, with the development of intelligence, users often do not directly input the given speed data, but instruct the motor to be controlled to perform a certain work. For example, when the user request information is used to instruct the motor to be controlled of a new energy vehicle to work, the speed data of the motor to be controlled of the new energy vehicle is often not directly input. Therefore, it is necessary to judge the given speed data of the motor to be controlled according to the working requirements of the motor to be controlled of the new energy vehicle.
[0053] In a possible implementation manner, determining the speed measurement duration of the motor to be controlled according to the correspondence between the speed interval and the measurement duration includes:
[0054] determining a boundary value according to the speed interval and the first hysteresis interval;
[0055] The speed measurement duration is determined according to the speed change direction of the motor to be controlled, the speed interval to which the preliminary speed belongs, and the boundary value.
[0056] Exemplarily, the speed change direction of the motor to be controlled can be understood as an increase in speed / decrease in speed of the motor to be controlled, that is, when the given speed is greater than the preliminary speed, the speed change direction of the motor to be controlled is determined to be an increase in speed of the motor to be controlled.
[0057] Exemplarily, a hysteresis interval is set to prevent the permanent magnet synchronous motor from changing its speed near the dividing point of the speed measurement level during operation, causing the speed measurement duration level to change repeatedly, thereby affecting the measurement of the permanent magnet synchronous motor speed.
[0058] For example, Figure 3As shown, the speed hysteresis method is used to switch the speed measurement duration. The shaded area in the figure is used to represent the first hysteresis interval, and the first hysteresis interval is 50rpm. When the permanent magnet synchronous motor is in a speed increasing state (speed change direction), when the preliminary speed is 190rpm, the speed range to which the preliminary speed belongs is the range of 0-500rpm. Considering the hysteresis interval, the boundary value is 525rpm, and the speed measurement duration is at the first level; when the preliminary speed is 560rpm, the speed range to which the preliminary speed belongs is the range of 500-2000rpm. Considering the hysteresis interval, the boundary value is 2025rpm, and the speed measurement duration is at the second level; when the preliminary speed is 2060rpm, the speed range to which the preliminary speed belongs is the range of 2000-5000rpm. Considering the hysteresis interval, the boundary value is 5025rpm, and the speed measurement duration is at the third level; when the preliminary speed is 5060rpm, the speed range to which the preliminary speed belongs is the range of 5000-10000rpm. Considering the hysteresis interval, the boundary value is 10000rpm, and the speed measurement duration is at the fourth level.
[0059] On the contrary, when the permanent magnet synchronous motor is in a decreasing speed state (speed change direction), when the preliminary speed is 9600rpm, the speed range to which the preliminary speed belongs is the range of 5000-10000rpm. Considering the hysteresis interval, the boundary value is 4975rpm, and the speed measurement duration is at the fourth level; when the preliminary speed is 4960rpm, the speed range to which the preliminary speed belongs is the range of 2000-5000rpm. Considering the hysteresis interval, the boundary value is 1975rpm, and the speed measurement duration is at the third level; when the preliminary speed is 1960rpm, the speed range to which the preliminary speed belongs is the range of 500-2000rpm. Considering the hysteresis interval, the boundary value is 475rpm, and the speed measurement duration is at the second level; when the preliminary speed is 460rpm, the speed range to which the preliminary speed belongs is the range of 0-500rpm. Considering the hysteresis interval, the boundary value is 475rpm, and the speed measurement duration is at the first level.
[0060] The first level rotation speed measurement duration is greater than the second level rotation speed measurement duration. The third level rotation speed measurement duration is greater than the fourth level rotation speed measurement duration.
[0061] In a possible implementation manner, the speed interval includes a first speed interval and a second speed interval, the first speed interval corresponds to a first measurement duration, the second speed interval corresponds to a second measurement duration, a first hysteresis interval is provided adjacent to the first speed interval and the second speed interval, the first hysteresis interval includes a first boundary value and a second boundary value, and the first boundary value is less than the second boundary value;
[0062] Determining the speed measurement duration according to the speed change direction of the motor to be controlled, the speed interval to which the preliminary speed belongs, and the boundary value includes:
[0063] When the preliminary speed of the motor to be controlled increases from the first speed interval to the second speed interval, if the preliminary speed is greater than the second boundary value, determining the speed measurement duration of the motor to be controlled to be the second measurement duration;
[0064] When the speed interval to which the preliminary speed of the motor to be controlled belongs decreases from the second speed interval to the first speed interval, if the speed to which the preliminary speed belongs is less than the first boundary value, the speed measurement duration of the motor to be controlled is determined to be the first measurement duration.
[0065] Exemplarily, when the preliminary speed of the motor to be controlled increases from the first speed range to the second speed range, that is, the speed change direction of the motor to be controlled is the increase of the speed of the motor to be controlled, if the preliminary speed increases to be greater than the second boundary value, then the speed measurement duration of the motor to be controlled is determined to be the second measurement duration, that is, by setting different measurement durations for different speed ranges, the accuracy of the speed measurement is ensured.
[0066] Similarly, when the speed interval to which the preliminary speed of the motor to be controlled belongs drops from the second speed interval to the first speed interval, that is, the speed change direction of the motor to be controlled is a decrease in the speed of the motor to be controlled. If the speed to which the preliminary speed belongs drops to less than the first boundary value, the speed measurement duration of the motor to be controlled is determined to be the first measurement duration. By flexibly adjusting different measurement durations according to different speeds, it is ensured that the measurements of the motor to be controlled at different speeds are accurate.
[0067] For example, Figure 4As shown, the speed hysteresis method is used to switch the speed measurement duration, and the hysteresis interval is 50rpm. Initially, the speed of the permanent magnet synchronous motor is 0rpm (preliminary speed), and the permanent magnet synchronous motor is in a speed increasing state (speed change direction). Initially, the speed measurement duration of the permanent magnet synchronous motor is the first level. When the speed of the permanent magnet synchronous motor is greater than 525rpm (the boundary value), the speed measurement duration of the permanent magnet synchronous motor will be switched from the first level to the second level (the speed measurement duration is the duration corresponding to the second level). Similarly, the speed measurement duration of the permanent magnet synchronous motor is at the second level. When the speed of the permanent magnet synchronous motor is greater than 2025rpm, the speed measurement duration of the permanent magnet synchronous motor will be switched from the second level to the third level. The speed measurement duration of the permanent magnet synchronous motor is at the third level. When the speed of the permanent magnet synchronous motor is greater than 5025rpm, the speed measurement duration of the permanent magnet synchronous motor will be switched from the third level to the fourth level.
[0068] On the contrary, when the permanent magnet synchronous motor speed is 10000rpm (preliminary speed), the speed measurement duration is the fourth level. At this time, the speed of the permanent magnet synchronous motor is in a downward decreasing state (speed change direction). When the speed of the permanent magnet synchronous motor is less than 4975rpm (the boundary value), the speed measurement duration of the permanent magnet synchronous motor will be switched from the fourth level to the third level. The speed measurement duration of the permanent magnet synchronous motor is at the third level. When the speed of the permanent magnet synchronous motor is less than 1975rmp, the speed measurement duration of the permanent magnet synchronous motor will be switched from the third level to the second level. The speed measurement duration of the permanent magnet synchronous motor is at the second level. When the speed of the permanent magnet synchronous motor is less than 475rmp, the speed measurement duration of the permanent magnet synchronous motor will be switched from the second level to the first level.
[0069] In a possible implementation, controlling the motor according to the actual rotational speed includes:
[0070] determining a speed range to which the actual speed belongs;
[0071] According to the corresponding relationship between the speed range and the normalized digital range, the normalized digital range corresponding to the actual speed is determined, and the actual speed and the given speed are respectively normalized according to the normalized digital range, and the maximum value of the normalized data range is greater than the maximum value of the speed range;
[0072] The motor is controlled according to the normalized actual speed and the normalized given speed.
[0073] Exemplarily, through normalization, for example, 0-500rpm is set as the first preset gear, and the first preset gear is normalized and digitally processed to 0-32000. It can be understood that 0-500rpm is refined to 0-32000, which improves the fineness of control, improves the dynamic response of the high-speed permanent magnet synchronous motor, and can perform fine speed control and ultra-low speed control on the permanent magnet synchronous motor.
[0074] In a possible implementation manner, normalizing the actual speed and the given speed respectively according to the normalized digital range includes:
[0075] Determining a speed conversion value according to a ratio of a maximum value of the normalized digital range to a maximum value of the speed range;
[0076] The normalized actual speed is determined according to the product of the actual speed and the speed conversion value, and the normalized given speed is determined according to the product of the given speed and the speed conversion value.
[0077] For example, the speed range of 0-10000rpm is divided into 3 gears, 0-500rpm is set as the first preset gear, and the normalized digital quantity is processed to 0-32000, and the corresponding speed resolution is 0.015625rpm, so that ultra-low speed control and high-precision control of the permanent magnet synchronous motor can be achieved. 0-5000rpm is set as the second preset gear, and the normalized digital quantity is processed to 0-32000, and the corresponding speed resolution is 0.15625rpm. 0-10000rpm is set as the third preset gear, and its normalized digital quantity is processed as 0-32000, and the corresponding speed resolution is 0.3125rpm, that is, the speed resolution is used as the speed conversion value. When the actual speed is in the second preset gear, the speed conversion value is determined to be (1 / 0.15625)rpm. Then, the normalized actual speed is determined according to the product of the actual speed and the speed conversion value (1 / 0.15625rpm), and the normalized given speed is determined according to the product of the given speed and the speed conversion value (1 / 0.15625rpm).
[0078] In a possible implementation manner, determining the normalized data range corresponding to the actual speed according to the correspondence between the speed range and the normalized data range includes:
[0079] determining a boundary value according to the speed range and the second hysteresis interval;
[0080] A normalized data range corresponding to the actual speed is determined according to a change direction of the actual speed, a speed range to which the actual speed belongs, and the boundary value.
[0081] Exemplarily, the speed of the permanent magnet synchronous motor is prevented from changing near the dividing point of the speed gear when the permanent magnet synchronous motor is running, resulting in frequent switching of the speed gear of the permanent magnet synchronous motor; for this, the speed hysteresis method is used to switch the speed gear of the permanent magnet synchronous motor (such as the hysteresis interval is 50rpm). Initially, the speed of the permanent magnet synchronous motor is 0rpm, and the permanent magnet synchronous motor is in a speed increasing state. At this time, the speed gear of the permanent magnet synchronous motor is the first gear. When the speed of the permanent magnet synchronous motor is greater than 450rpm, the speed gear of the permanent magnet synchronous motor will be switched from the first gear to the second gear. The speed gear of the permanent magnet synchronous motor is the second gear. When the speed of the permanent magnet synchronous motor is greater than 4950rpm, the speed gear of the permanent magnet synchronous motor will be switched from the second gear to the third gear. When the speed of the permanent magnet synchronous motor is 10000rpm, the speed gear of the permanent magnet synchronous motor corresponding to the speed is the third gear. At this time, the speed of the permanent magnet synchronous motor decreases downward. When the speed of the permanent magnet synchronous motor is less than 4900rpm, the speed gear of the permanent magnet synchronous motor will be switched from the third gear to the second gear. The speed gear of the permanent magnet synchronous motor is the second gear. When the speed of the permanent magnet synchronous motor is less than 400rpm, the speed gear of the permanent magnet synchronous motor will be switched from the second gear to the first gear.
[0082] For example, Figure 5 As shown, the speed hysteresis method is adopted to switch the speed gear of the permanent magnet synchronous motor. The shaded area in the figure is used to represent the second hysteresis interval. The second hysteresis interval is 50rpm. When the permanent magnet synchronous motor is in a speed increasing state (speed change direction), when the preliminary speed is 190rpm, the speed interval to which the preliminary speed belongs is the interval of 0-500rpm. Considering the hysteresis interval, the boundary value is 450rpm, and the speed gear of the permanent magnet synchronous motor is the first gear; when the preliminary speed is 560rpm, the speed interval to which the preliminary speed belongs is the interval of 500-5000rpm. Considering the hysteresis interval, the boundary value is 4950rpm, and the speed gear of the permanent magnet synchronous motor is the second gear; when the preliminary speed is 5060rpm, the speed interval to which the preliminary speed belongs is the interval of 5000-10000rpm. Considering the hysteresis interval, the boundary value is 4950rpm, and the speed gear of the permanent magnet synchronous motor is the third gear.
[0083] On the contrary, when the permanent magnet synchronous motor is in a decreasing speed state (speed change direction), when the preliminary speed is 9600rpm, the speed range to which the preliminary speed belongs is the range of 5000-10000rpm. Considering the hysteresis interval, the boundary value is 4900, and the speed gear of the permanent magnet synchronous motor is the third gear; when the preliminary speed is 4860rpm, the speed range to which the preliminary speed belongs is the range of 500-5000rpm. Considering the hysteresis interval, the boundary value is 400rpm, and the speed gear of the permanent magnet synchronous motor is the second gear; when the preliminary speed is 360rpm, the speed range to which the preliminary speed belongs is the range of 500-5000rpm. Considering the hysteresis interval, the boundary value is 400rpm, and the speed gear of the permanent magnet synchronous motor is the first gear.
[0084] In a possible implementation manner, the speed range includes a first speed range and a second speed range, the first speed range corresponds to a first normalized digital range, the second speed range corresponds to a second normalized digital range, a second hysteresis interval is provided adjacent to the first speed range and the second speed range, the second hysteresis interval includes a third boundary value and a fourth boundary value, and the third boundary value is less than the fourth boundary value;
[0085] Determining a normalized digital range corresponding to the actual speed according to a change direction of the actual speed, a speed range to which the actual speed belongs, and the boundary value includes:
[0086] When the actual speed of the motor to be controlled increases from the first speed range to the second speed range, if the actual speed is greater than the fourth boundary value, determining that the actual speed corresponds to the second normalized digital range;
[0087] When the actual speed of the motor to be controlled decreases from the second speed range to the first speed range, if the actual speed is less than the third boundary value, it is determined that the actual speed belongs to the first normalized digital range.
[0088] For example, if the current speed of the motor is 300rpm (the motor speed gear is the first gear), it will be 19200 after normalization. At this time, the given speed of the motor is 3000rpm, and the given speed will be normalized according to the first gear. Since the maximum speed of the first gear is 500rpm, the given speed is greater than 500rpm, so the given speed is temporarily limited to 500rpm, and the corresponding normalized value is 32000. 19200 is less than 32000, that is, the motor speed is less than the given speed, and the motor will accelerate at this time. When the motor speed is greater than 450rpm, the motor speed will enter the second gear. The maximum speed of the second gear is 5000rpm, and the initial given speed of the motor is less than the maximum speed of the second gear, 5000rpm. At this time, the actual speed and given speed of the motor will be normalized according to the second gear. The normalized value corresponding to the given speed of 3000rpm is 19200. At this time, if the actual speed of the motor is less than 3000rpm, the normalized speed value of the actual speed will be less than 19200, otherwise it will be greater than 19200. Then, according to the speed control algorithm, the motor will eventually run at 3000rpm, thereby realizing speed regulation.
[0089] See also Figure 6As shown, in one embodiment, a motor control method is provided, the speed range of the permanent magnet synchronous motor in this example is 0-10000rpm, and the given speed value and the actual speed value of the permanent magnet synchronous motor are both processed by normalized digital quantity to obtain given speed data and actual speed data, that is, 0-32000 is used to represent the speed range of 0-10000rpm. The speed resolution of the permanent magnet synchronous motor reaches 0.3125rpm. When the permanent magnet synchronous motor runs at 5rpm, if there is a speed fluctuation of 0.3125rpm, its fluctuation rate is 6.25%, which is significantly reduced compared with the previous fluctuation rate of 20%. In order to further improve the dynamic response performance and speed control accuracy of the permanent magnet synchronous motor, the speed of the permanent magnet synchronous motor is divided into grades, which is equivalent to dividing the adjustable speed interval into a preset number of sub-intervals according to a preset rule. The more the speed gear is divided, the higher the precision of the speed control of the permanent magnet synchronous motor is, and the speed range (speed interval) after the grade is processed by normalized digital quantity. For example, the speed range of 0-10000rpm is divided into 3 gears, 0-500rpm is set as the first gear, and 0-500rpm is processed as 0-32000 by normalized digital quantity, and the corresponding speed resolution is 0.015625rpm, so that the ultra-low speed control and high-precision control of the permanent magnet synchronous motor can be achieved. 0-5000rpm is set as the second gear, and 0-5000rpm is processed as 0-32000 by normalized digital quantity, and the corresponding speed resolution is 0.15625rpm. 0-10000rpm is set as the third gear, and 0-10000rpm is processed as 0-32000 by normalized digital quantity, and the corresponding speed resolution is 0.3125rpm. The normalization process improves the dynamic response of the permanent magnet synchronous motor and the refined speed control, especially at low speeds, to achieve high-precision control of the low speed of the permanent magnet synchronous motor. In order to prevent the speed of the permanent magnet synchronous motor from changing near the dividing point of the speed gear when it is running, resulting in frequent switching of the speed gear of the permanent magnet synchronous motor, the speed hysteresis method is used to switch the speed gear of the permanent magnet synchronous motor (such as the hysteresis interval is 50rpm). Initially, the speed of the permanent magnet synchronous motor is 0rpm, and the permanent magnet synchronous motor is in a speed increasing state (speed acceleration state). At this time, the speed gear of the permanent magnet synchronous motor is the first gear. When the speed of the permanent magnet synchronous motor is greater than 525rpm, the speed gear of the permanent magnet synchronous motor will be switched from the first gear to the second gear. The speed gear of the permanent magnet synchronous motor is the second gear. When the speed of the permanent magnet synchronous motor is greater than 5025rpm, the speed gear of the permanent magnet synchronous motor will be switched from the second gear to the third gear. When the speed of the permanent magnet synchronous motor is 10000rpm, the speed gear of the permanent magnet synchronous motor corresponding to this speed is the third gear. At this time, the speed of the permanent magnet synchronous motor decreases downward. When the speed of the permanent magnet synchronous motor is less than 4975rpm, the speed gear of the permanent magnet synchronous motor will be switched from the third gear to the second gear.The speed gear of the permanent magnet synchronous motor is the second gear. When the speed of the permanent magnet synchronous motor is less than 475rpm, the speed gear of the permanent magnet synchronous motor will switch from the second gear to the first gear.
[0090] See also Figure 7 As shown, in one embodiment, a motor control device is provided, the device comprising:
[0091] The speed acquisition unit 201 is used to acquire the preliminary speed of the motor to be controlled and determine the speed range to which the preliminary speed belongs;
[0092] The measurement duration determining unit 202 is used to determine the speed measurement duration of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement time, wherein the corresponding relationship between the speed interval and the measurement time is that the greater the speed of the speed interval, the shorter the measurement duration;
[0093] The control unit 203 is used to measure and calculate the speed according to the speed measurement duration, determine the actual speed of the motor to be controlled, and control the motor according to the actual speed.
[0094] In a possible implementation manner, the measurement duration determining unit 202 is configured to:
[0095] determining a boundary value according to the speed interval and the first hysteresis interval;
[0096] The speed measurement duration is determined according to the speed change direction of the motor to be controlled, the speed interval to which the preliminary speed belongs, and the boundary value.
[0097] In a possible implementation manner, the speed interval includes a first speed interval and a second speed interval, the first speed interval corresponds to a first measurement duration, the second speed interval corresponds to a second measurement duration, a first hysteresis interval is provided adjacent to the first speed interval and the second speed interval, the first hysteresis interval includes a first boundary value and a second boundary value, the first boundary value is less than the second boundary value, and the measurement duration determination unit 202 is used to:
[0098] When the preliminary speed of the motor to be controlled increases from the first speed interval to the second speed interval, if the preliminary speed is greater than the second boundary value, determining the speed measurement duration of the motor to be controlled to be the second measurement duration;
[0099] When the speed interval to which the preliminary speed of the motor to be controlled belongs decreases from the second speed interval to the first speed interval, if the speed to which the preliminary speed belongs is less than the first boundary value, the speed measurement duration of the motor to be controlled is determined to be the first measurement duration.
[0100] In a possible implementation manner, the control unit 203 is configured to:
[0101] determining a speed range to which the actual speed belongs;
[0102] According to the corresponding relationship between the speed range and the normalized digital range, the normalized digital range corresponding to the actual speed is determined, and the actual speed and the given speed are respectively normalized according to the normalized digital range, and the maximum value of the normalized data range is greater than the maximum value of the speed range;
[0103] The motor is controlled according to the normalized actual speed and the normalized given speed.
[0104] In a possible implementation manner, the control unit 203 is configured to:
[0105] Determining a speed conversion value according to a ratio of a maximum value of the normalized digital range to a maximum value of the speed range;
[0106] The normalized actual speed is determined according to the product of the actual speed and the speed conversion value, and the normalized given speed is determined according to the product of the given speed and the speed conversion value.
[0107] In a possible implementation manner, the control unit 203 is configured to:
[0108] determining a boundary value according to the speed range and the second hysteresis interval;
[0109] A normalized data range corresponding to the actual speed is determined according to a change direction of the actual speed, a speed range to which the actual speed belongs, and the boundary value.
[0110] In a possible implementation, the speed range includes a first speed range and a second speed range, the first speed range corresponds to a first normalized digital range, the second speed range corresponds to a second normalized digital range, a second hysteresis interval is provided adjacent to the first speed range and the second speed range, the second hysteresis interval includes a third boundary value and a fourth boundary value, the third boundary value is less than the fourth boundary value, and the control unit 203 is used to:
[0111] When the actual speed of the motor to be controlled increases from the first speed range to the second speed range, if the actual speed is greater than the fourth boundary value, determining that the actual speed corresponds to the second normalized digital range;
[0112] When the actual speed of the motor to be controlled decreases from the second speed range to the first speed range, if the actual speed is less than the third boundary value, it is determined that the actual speed belongs to the first normalized digital range.
[0113] This embodiment obtains the preliminary speed of the motor to be controlled, determines the speed interval to which the preliminary speed belongs; determines the speed measurement duration of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement duration, and the corresponding relationship between the speed interval and the measurement time is that the larger the speed of the speed interval, the shorter the measurement duration; performs speed measurement and calculation according to the speed measurement duration, determines the actual speed of the motor to be controlled, and controls the motor according to the actual speed. The speed measurement duration is adjusted in real time according to the speed of the permanent magnet synchronous motor, and different speed measurement durations are used for different speed conditions (low speed, medium speed, high speed), so as to reduce the speed calculation error of the high speed permanent magnet synchronous motor, improve the speed calculation accuracy of the permanent magnet synchronous motor at low speed and high speed, and thus improve the accuracy and stability of the speed closed-loop control.
[0114] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the service side of a motor control method.
[0115] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of a motor control method.
[0116] In one embodiment, a motor control device is proposed, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: obtaining a preliminary rotational speed of a motor to be controlled, and determining a rotational speed interval to which the preliminary rotational speed belongs; determining a rotational speed measurement duration of the motor to be controlled according to a correspondence between the rotational speed interval and the measurement duration, wherein the correspondence between the rotational speed interval and the measurement time is that the greater the rotational speed in the rotational speed interval, the shorter the measurement duration; performing rotational speed measurement and calculation according to the rotational speed measurement duration, determining an actual rotational speed of the motor to be controlled, and controlling the motor according to the actual rotational speed.
[0117] This embodiment obtains the preliminary speed of the motor to be controlled, determines the speed interval to which the preliminary speed belongs; determines the speed measurement duration of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement duration, and the corresponding relationship between the speed interval and the measurement time is that the larger the speed of the speed interval, the shorter the measurement duration; performs speed measurement and calculation according to the speed measurement duration, determines the actual speed of the motor to be controlled, and controls the motor according to the actual speed. The speed measurement duration is adjusted in real time according to the speed of the permanent magnet synchronous motor, and different speed measurement durations are used for different speed conditions (low speed, medium speed, high speed), so as to reduce the speed calculation error of the high speed permanent magnet synchronous motor, improve the speed calculation accuracy of the permanent magnet synchronous motor at low speed and high speed, and thus improve the accuracy and stability of the speed closed-loop control.
[0118] In one embodiment, a computer-readable storage medium is proposed, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented: obtaining a preliminary speed of a motor to be controlled, and determining a speed interval to which the preliminary speed belongs; determining a speed measurement duration of the motor to be controlled based on a correspondence between the speed interval and the measurement duration, wherein the correspondence between the speed interval and the measurement time is that the greater the speed of the speed interval, the shorter the measurement duration; performing speed measurement and calculation based on the speed measurement duration, determining an actual speed of the motor to be controlled, and controlling the motor based on the actual speed.
[0119] This embodiment obtains the preliminary speed of the motor to be controlled, determines the speed interval to which the preliminary speed belongs; determines the speed measurement duration of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement duration, and the corresponding relationship between the speed interval and the measurement time is that the larger the speed of the speed interval, the shorter the measurement duration; performs speed measurement and calculation according to the speed measurement duration, determines the actual speed of the motor to be controlled, and controls the motor according to the actual speed. The speed measurement duration is adjusted in real time according to the speed of the permanent magnet synchronous motor, and different speed measurement durations are used for different speed conditions (low speed, medium speed, high speed), so as to reduce the speed calculation error of the high speed permanent magnet synchronous motor, improve the speed calculation accuracy of the permanent magnet synchronous motor at low speed and high speed, and thus improve the accuracy and stability of the speed closed-loop control.
[0120] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0121] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0122] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0123] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A motor control method, characterized in that: The method comprises: Obtaining a preliminary speed of the motor to be controlled, and determining a speed range to which the preliminary speed belongs; Determine the speed measurement time of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement time, wherein the corresponding relationship between the speed interval and the measurement time is that the greater the speed of the speed interval, the shorter the measurement time; The speed measurement and calculation are performed according to the speed measurement duration to determine the actual speed of the motor to be controlled, and the motor is controlled according to the actual speed.
2. The method according to claim 1, characterized in that Determining the speed measurement duration of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement duration includes: Determining a boundary value according to the speed range and the first hysteresis range; The speed measurement duration is determined according to the speed change direction of the motor to be controlled, the speed interval to which the preliminary speed belongs, and the boundary value.
3. The method according to claim 2, characterized in that The speed interval includes a first speed interval and a second speed interval, the first speed interval corresponds to a first measurement duration, the second speed interval corresponds to a second measurement duration, a first hysteresis interval is provided adjacent to the first speed interval and the second speed interval, the first hysteresis interval includes a first boundary value and a second boundary value, the first boundary value is less than the second boundary value; Determining the speed measurement duration according to the speed change direction of the motor to be controlled, the speed interval to which the preliminary speed belongs, and the boundary value includes: When the preliminary speed of the motor to be controlled increases from the first speed interval to the second speed interval, if the preliminary speed is greater than the second boundary value, determining the speed measurement duration of the motor to be controlled to be the second measurement duration; When the speed interval to which the preliminary speed of the motor to be controlled belongs decreases from the second speed interval to the first speed interval, if the speed to which the preliminary speed belongs is less than the first boundary value, the speed measurement duration of the motor to be controlled is determined to be the first measurement duration.
4. The method according to claim 1, characterized in that: The motor is controlled according to the actual speed, including: Determining a speed range to which the actual speed belongs; According to the corresponding relationship between the speed range and the normalized digital range, the normalized digital range corresponding to the actual speed is determined, and the actual speed and the given speed are respectively normalized according to the normalized digital range, and the maximum value of the normalized data range is greater than the maximum value of the speed range; The motor is controlled according to the normalized actual speed and the normalized given speed.
5. The method according to claim 4, characterized in that Normalizing the actual speed and the given speed respectively according to the normalized digital range, including: Determining a speed conversion value according to a ratio of a maximum value of the normalized digital range to a maximum value of the speed range; The normalized actual speed is determined according to the product of the actual speed and the speed conversion value, and the normalized given speed is determined according to the product of the given speed and the speed conversion value.
6. The method according to claim 4, characterized in that Determining the normalized data range corresponding to the actual speed according to the corresponding relationship between the speed range and the normalized data range includes: determining a boundary value according to the speed range and the second hysteresis interval; A normalized data range corresponding to the actual speed is determined according to a change direction of the actual speed, a speed range to which the actual speed belongs, and the boundary value.
7. The method according to claim 6, characterized in that The speed range includes a first speed range and a second speed range, the first speed range corresponds to a first normalized digital range, the second speed range corresponds to a second normalized digital range, a second hysteresis interval is provided adjacent to the first speed range and the second speed range, the second hysteresis interval includes a third boundary value and a fourth boundary value, the third boundary value is less than the fourth boundary value; Determining a normalized digital range corresponding to the actual speed according to a change direction of the actual speed, a speed range to which the actual speed belongs, and the boundary value includes: When the actual speed of the motor to be controlled increases from the first speed range to the second speed range, if the actual speed is greater than the fourth boundary value, determining that the actual speed corresponds to the second normalized digital range; When the actual speed of the motor to be controlled decreases from the second speed range to the first speed range, if the actual speed is less than the third boundary value, it is determined that the actual speed belongs to the first normalized digital range.
8. A motor control device, characterized in that: The device comprises: A speed acquisition unit, used to acquire a preliminary speed of the motor to be controlled, and determine a speed range to which the preliminary speed belongs; A measurement duration determining unit, used to determine the speed measurement duration of the motor to be controlled according to the corresponding relationship between the speed interval and the measurement time, wherein the corresponding relationship between the speed interval and the measurement time is that the greater the speed of the speed interval, the shorter the measurement duration; The control unit is used to measure and calculate the rotational speed according to the rotational speed measurement duration, determine the actual rotational speed of the motor to be controlled, and control the motor according to the actual rotational speed.
9. An electric machine, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
