An initial angle calibration method, device, system and storage medium
Patent Information
- Application Number
- CN202210474801.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2042-04-29
AI Technical Summary
[0004]本发明要解决的是上述现有技术中在对初始角度标定过程中并未考虑电机的极对数与角度传感器的极对数不同情况,进而造成实际标定准确度低的技术问题
[0042] This application discloses an initial angle calibration method, which includes the following steps: using an angle sensor to detect angle values at multiple sampling points to obtain an angle value set; the angle sensor is mounted on the rotating shaft of a brushless motor; based on the difference between any two angle values in the angle value set, an angle difference set is obtained; for each angle difference in the angle difference set, if the angle difference satisfies a first preset threshold condition, the initial angle corresponding to the angle difference is determined based on the theoretical electrical angle value, pole pair information, and initial mechanical angle value corresponding to the angle difference; the pole pair information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor; based on the initial angles corresponding to each angle difference in the angle difference set, a target initial angle is determined. Since this application can determine multiple initial angles, and by processing the data of multiple initial angles, the target initial angle obtained has high accuracy, and the method requires obtaining pole pair information, the above steps for determining the initial angle can be used regardless of whether the pole pair number of the angle sensor and the pole pair number of the brushless motor are consistent, thereby improving the applicability of the method and avoiding the need for operators to use different calibration methods to calibrate brushless motors with different pole pair numbers, thus improving calibration efficiency.
Smart Images

Figure CN114726262B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of brushless DC motor technology, and in particular to an initial angle calibration method, apparatus, system and storage medium. Background Technology
[0002] Generally, an electric motor includes a stator, a rotor, and an angle sensor. The angle sensor is mounted on the central shaft of the motor to monitor the absolute rotation angle of the rotor. However, since the position of the angle sensor relative to the motor shaft is arbitrary during the production and assembly of each motor, the deviation between the installation position of the angle sensor and the motor shaft is an arbitrary and uncertain value that needs to be determined. This process is called the initial angle calibration process. Only after obtaining the above deviation value can the electric angle of the motor be determined in real time.
[0003] Each motor has a corresponding number of pole pairs, and the angle sensor also has a corresponding number of pole pairs. However, in the prior art, when calibrating the initial angle, the calibration case is usually only considered when the two pole pairs are the same, and the case where the number of pole pairs of the motor and the number of pole pairs of the angle sensor are inconsistent is not considered, which makes the calibration results inaccurate. Summary of the Invention
[0004] The present invention aims to solve the technical problem in the prior art that the difference between the number of pole pairs of the motor and the number of pole pairs of the angle sensor is not considered in the initial angle calibration process, resulting in low actual calibration accuracy.
[0005] To address the aforementioned technical problems, this application discloses an initial angle calibration method, comprising:
[0006] An angle sensor is used to detect the angle values of multiple sampling points to obtain an angle value set; the angle sensor is installed on the rotating shaft of the brushless motor.
[0007] Based on the difference between any two angle values in this set of angle values, an angle difference set is obtained;
[0008] For each angle difference in the set of angle differences, if the angle difference meets the first preset threshold condition, then the initial angle corresponding to the angle difference is determined based on the theoretical electrical angle value, pole pair number information and initial mechanical angle value corresponding to the angle difference; the pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor.
[0009] The initial angle of the target is determined based on the initial angle corresponding to each angle difference in the set of angle differences.
[0010] Optionally, the angle sensor is used to detect the angle values of multiple sampling points to obtain a set of angle values, including:
[0011] Determine the first sampling point;
[0012] The angle sensor is used to detect the angle value of the first sampling point;
[0013] After a preset time interval, determine the second sampling point;
[0014] The angle sensor is used to detect the angle value of the second sampling point;
[0015] Repeat the steps of determining the second sampling point and detecting the angle value of the second sampling point until the angle values of all sampling points are detected, and obtain the set of angle values.
[0016] Optionally, the first preset threshold condition includes:
[0017] The angle difference is greater than the first threshold and less than the second threshold; the first threshold and the second threshold are opposites of each other.
[0018] Optionally, the method for determining the first threshold and the second threshold includes:
[0019] Obtain the maximum speed of the brushless motor;
[0020] The first threshold and the second threshold are determined based on the limiting speed and the preset time.
[0021] Optionally, the initial angle corresponding to the angle difference is determined based on the theoretical electrical angle value, pole pair number information, and initial mechanical angle value corresponding to the angle difference; the pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor, including:
[0022] The target mechanical angle value is determined based on the angle difference, the initial mechanical angle value, and the number of pole pairs of the angle sensor;
[0023] If the target mechanical angle meets the second preset threshold condition, the initial electrical angle value is determined based on the target mechanical angle value and the number of pole pairs of the brushless motor.
[0024] If the initial electrical angle value meets the third preset threshold condition, then the initial electrical angle value is determined as the target electrical angle value;
[0025] The initial angle is determined based on the target electrical angle value and the theoretical electrical angle value.
[0026] Optionally, determining the target mechanical angle value based on the angle difference, the initial mechanical angle value, and the number of pole pairs of the angle sensor includes:
[0027] The mechanical angle difference is determined based on the angle difference and the number of pole pairs of the angle sensor;
[0028] The target mechanical angle value is determined based on the initial mechanical angle value and the mechanical angle difference.
[0029] On the other hand, this application also discloses an initial angle calibration device, which includes:
[0030] An angle value acquisition module is used to detect the angle values of multiple sampling points using an angle sensor to obtain an angle value set; the angle sensor is located on the rotating shaft of the brushless motor;
[0031] The angle difference determination module is used to obtain an angle difference set based on the difference between any two angle values in the angle value set;
[0032] The initial angle determination module is used to determine the initial angle corresponding to each angle difference in the set of angle differences if the angle difference meets the first preset threshold condition, based on the theoretical electrical angle value, pole pair number information and initial mechanical angle value corresponding to the angle difference; the pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor.
[0033] The target initial angle determination module is used to determine the target initial angle based on the initial angles corresponding to each angle difference in the set of angle differences.
[0034] On the other hand, this application also discloses an initial angle calibration system, which includes a brushless motor, an angle sensor and a controller;
[0035] The controller is connected to the brushless motor and the angle sensor;
[0036] The angle sensor is located on the rotating shaft of the brushless motor;
[0037] The angle sensor is used to detect the angle values of multiple sampling points to obtain an angle value set; and then sends the angle value set to the controller.
[0038] The controller receives the angle value set and obtains an angle difference set based on the difference between any two angle values in the angle value set. For each angle difference in the angle difference set, if the angle difference meets a first preset threshold condition, the controller determines the initial angle corresponding to the angle difference based on the theoretical electrical angle value, pole pair number information, and initial mechanical angle value corresponding to the angle difference. The pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor. The controller determines the target initial angle based on the initial angle corresponding to each angle difference in the angle difference set.
[0039] On the other hand, this application also discloses an electronic device including a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the above-described initial angle calibration method.
[0040] On the other hand, this application also discloses a computer storage medium, characterized in that the computer storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the above-described initial angle calibration method.
[0041] By adopting the above technical solution, the initial angle calibration method provided in this application has the following beneficial effects:
[0042] This application discloses an initial angle calibration method, which includes the following steps: using an angle sensor to detect angle values at multiple sampling points to obtain an angle value set; the angle sensor is mounted on the rotating shaft of a brushless motor; based on the difference between any two angle values in the angle value set, an angle difference set is obtained; for each angle difference in the angle difference set, if the angle difference satisfies a first preset threshold condition, the initial angle corresponding to the angle difference is determined based on the theoretical electrical angle value, pole pair information, and initial mechanical angle value corresponding to the angle difference; the pole pair information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor; based on the initial angles corresponding to each angle difference in the angle difference set, a target initial angle is determined. Since this application can determine multiple initial angles, and by processing the data of multiple initial angles, the target initial angle obtained has high accuracy, and the method requires obtaining pole pair information, the above steps for determining the initial angle can be used regardless of whether the pole pair number of the angle sensor and the pole pair number of the brushless motor are consistent, thereby improving the applicability of the method and avoiding the need for operators to use different calibration methods to calibrate brushless motors with different pole pair numbers, thus improving calibration efficiency. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is an optional initial angle calibration system for this application;
[0045] Figure 2 This is a flowchart illustrating the first optional initial angle calibration method of this application;
[0046] Figure 3 This is a flowchart illustrating the second optional initial angle calibration method of this application;
[0047] Figure 4 This is a flowchart illustrating the third optional initial angle calibration method of this application;
[0048] Figure 5 This is a schematic diagram of the angle value detected by an optional sensor in this application;
[0049] Figure 6 This is a schematic diagram of an optional initial angle calibration device according to this application.
[0050] The following is supplementary explanation of the attached figures:
[0051] 10 - Brushless motor; 20 - Angle sensor; 30 - Controller. Detailed Implementation
[0052] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0053] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0054] like Figure 1 As shown, Figure 1This application discloses an optional initial angle calibration system. The system includes a brushless motor 10, an angle sensor 20, and a controller 30. The controller 30 is connected to the brushless motor 10 and the angle sensor 20. The angle sensor 20 is mounted on the rotation axis of the brushless motor 10. The angle sensor 20 detects angle values at multiple sampling points to obtain an angle value set and sends this set to the controller 30. The controller 30 receives the angle value set and, based on the difference between any two angle values in the set, obtains an angle difference set. For each angle difference in the set, if the angle difference meets a first preset threshold condition, the initial angle corresponding to the angle difference is determined based on the theoretical electrical angle value, pole pair information, and initial mechanical angle value. The pole pair information includes the number of pole pairs of the angle sensor 20 and the number of pole pairs of the brushless motor 10. A target initial angle is determined based on the initial angles corresponding to each angle difference in the set.
[0055] Optionally, the controller can be configured in a server or terminal, or it can be configured independently of the server.
[0056] Optionally, the terminal can be a desktop computer, laptop computer, mobile phone, or tablet computer, etc.
[0057] Optionally, the brushless motor includes a stator and a rotor. The rotor is located inside or outside the stator, and the end of the rotor is connected to a rotating shaft, so that when the rotor rotates, it can drive the rotating shaft to rotate, thereby causing the driven component fixedly connected to the rotating shaft to rotate.
[0058] The following describes a specific embodiment of an initial angle calibration method according to this application. Figure 2 This is a flowchart illustrating the first optional initial angle calibration method of this application. This specification provides method operation steps as shown in the embodiments or flowcharts, but based on conventional or non-inventive methods, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual system or server product execution, the method can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown... Figure 2 As shown, the method may include:
[0059] S201: An angle sensor is used to detect the angle values of multiple sampling points to obtain an angle value set; the angle sensor is located on the rotating shaft of the brushless motor.
[0060] In one possible embodiment, see [reference] Figure 3 , Figure 3This is a flowchart illustrating the second optional initial angle calibration method of this application. Step S201 can be specifically represented as follows:
[0061] S2011: Determine the first sampling point.
[0062] In this embodiment, the current position where the motor rotor stops can be determined as the first sampling point, and for ease of calculation, the mechanical angle value corresponding to the first sampling point can be set to 0.
[0063] S2012: The angle sensor is used to detect the angle value of the first sampling point.
[0064] S2013: After a preset time interval, determine the second sampling point.
[0065] Optionally, the preset time can be a fixed value. In another optional embodiment, the preset time can also be a variable value as needed. Step S2013 can be specifically described as: determining the second sampling point based on the preset electrical angle value. That is, when the motor rotor rotates to the second sampling point, its corresponding electrical angle value is determined, which is the theoretical electrical angle value mentioned below. At this time, the time it takes for the motor rotor to rotate from the first sampling point to the second sampling point is the preset time.
[0066] In this embodiment, the second sampling point can be the position corresponding to the U-axis, and the theoretical electrical angle value of the second sampling point is 60 degrees.
[0067] S2014: Use the angle sensor to detect the angle value of the second sampling point.
[0068] S2015: Repeat the above steps of determining the second sampling point and detecting the angle value of the second sampling point until the angle values of all sampling points are detected, and the angle value set is obtained.
[0069] In this embodiment, it is also necessary to detect a third sampling point and a fourth sampling point. The third sampling point can be the position corresponding to the V-axis, and the fourth sampling point can be the position corresponding to the W-axis. Correspondingly, the theoretical electrical angle value of the third sampling point is 180 degrees, and the theoretical electrical angle value of the fourth sampling point is 300 degrees. That is, the angle value set includes the angle values of the first sampling point, the second sampling point, the third sampling point, and the fourth sampling point.
[0070] It should be noted that when the preset time is a fixed value, the theoretical electrical angles corresponding to the second, third, and fourth sampling points can also be determined. For example, the positions corresponding to known theoretical electrical angles can be used as sampling points. When the motor is powered on, a magnetic field environment is generated. Although the magnetic field environment generated each time the motor is powered on may be different, the three-dimensional positions of the U-axis, V-axis, and W-axis in the world coordinate system are not necessarily fixed, but their corresponding theoretical electrical angle values are fixed.
[0071] S202: Based on the difference between any two angle values in this set of angle values, obtain the set of angle difference values.
[0072] In a first optional implementation, the set of angle differences may include a first angle difference, a second angle difference, and a third angle difference; wherein the first angle difference is the difference between the angle values of the second sampling point and the first sampling point; the second angle difference is the difference between the angle values of the third sampling point and the second sampling point; and the third angle difference is the difference between the angle values of the fourth sampling point and the third sampling point.
[0073] In the second optional implementation, the second angle difference and the third angle difference are the differences between the angle values of the third sampling point, the fourth sampling point and the first sampling point, respectively. This avoids the need to perform secondary calculations on the theoretical electrical angles corresponding to the angle differences. The theoretical electrical angle values corresponding to the above sampling points can be directly used to determine the theoretical electrical angle values of the angle differences. Since each angle difference is determined based on the angle value of the first sampling point, the angle value of the first sampling point is relatively accurate. As can be seen from the content on determining the angle values of the second sampling point and the third sampling point described below, the angle values of these two sampling points are not necessarily accurate values. Therefore, this method of determining angle differences further improves the calibration accuracy.
[0074] S203: For each angle difference in the set of angle differences, if the angle difference meets the first preset threshold condition, then based on the theoretical electrical angle value, pole pair number information and initial mechanical angle value corresponding to the angle difference, determine the initial angle corresponding to the angle difference; the pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor.
[0075] In one feasible embodiment, the first preset threshold condition includes: the angle difference is greater than a first threshold and less than a second threshold; the first threshold and the second threshold are opposites of each other.
[0076] For example, if the first threshold is -a, then the second threshold is a.
[0077] In one feasible embodiment, the method for determining the first threshold and the second threshold includes: obtaining the maximum speed of the brushless motor; and determining the first threshold and the second threshold based on the maximum speed and the preset time.
[0078] In this embodiment, the first threshold a satisfies the following formula:
[0079] a = 360 - N max ×360÷60×T; where N max The maximum speed of the motor during its operating conditions is expressed in rpm, and T represents a single operating cycle in seconds.
[0080] In this embodiment, the angle sensor detects the angle value of the motor periodically. That is, at the same time interval, the angle sensor will detect the angle value of the brushless motor at the current time point. For example, if T is 2s, the controller can receive the angle value sent by the angle sensor every 2s.
[0081] In one feasible embodiment, if the preset time is equal to a single running cycle, the corresponding angle difference can be directly determined based on the first threshold condition. Another feasible embodiment where the preset time is not equal to a single running cycle is detailed below.
[0082] In one possible embodiment, see [reference] Figure 4 , Figure 4 This is a flowchart illustrating the third optional initial angle calibration method of this application. Step S203 can be specifically described as follows:
[0083] S2031: Determine the target mechanical angle value based on the angle difference, the initial mechanical angle value, and the number of pole pairs of the angle sensor.
[0084] In one feasible embodiment, step S2031 can be specifically described as: determining the mechanical angle difference based on the angle difference and the number of pole pairs of the angle sensor, and determining the target mechanical angle value based on the initial mechanical angle value and the mechanical angle difference.
[0085] In this embodiment, the mechanical angle difference = angle difference / N T The target mechanical angle value = initial mechanical angle value + mechanical angle difference. Of course, certain weights can be set on the above formula relationship as needed to compensate for system errors, etc.
[0086] It should be noted that in step S203, when the angle difference meets the aforementioned first threshold condition, it indicates that the angle values corresponding to the two sampling points of the angle difference belong to the same 0-360° period. Figure 5Sampling points A and B are used. If the angle difference does not meet the first threshold condition mentioned above, since the motor may rotate in reverse or forward but the two sampling points belong to different cycles, in order to avoid the inaccuracy of the determined angle difference caused by the reverse rotation, and thus the inaccuracy of the final determined initial angle, it is necessary to further judge the angle difference and perform corresponding cycle conversion on the angle difference. One case is that when the angle difference is less than the first threshold, the first updated angle difference is determined based on the angle difference and the cycle. Optionally, the first updated angle difference = angle difference + 360; that is, it indicates that the current motor operating condition is forward rotation, and the current angle value (e.g., the angle value corresponding to the second sampling point) and the angle value of the previous operating cycle (e.g., the angle value corresponding to the first sampling point) belong to different 0-360° cycles.
[0087] In another scenario, when the angle difference is greater than the second threshold, the second updated angle difference is determined based on the angle difference and the cycle. Optionally, the second updated angle difference = angle difference - 360, which indicates that the current motor operating condition is reverse, and the current angle value (e.g., the angle value corresponding to the second acquisition point) and the angle value of the previous operating cycle (e.g., the angle value corresponding to the first acquisition point) belong to different 0-360° cycles.
[0088] Subsequently, the target mechanical angle value can be determined based on the updated angle difference (either the first updated angle difference or the second updated angle difference).
[0089] S2032: If the target mechanical angle value meets the second preset threshold condition, then the initial electrical angle value is determined based on the target mechanical angle value and the number of pole pairs of the brushless motor.
[0090] In this embodiment, the initial electrical angle value = the target mechanical angle value × N M The N M N represents the number of pole pairs of the brushless motor. M It is an integer greater than or equal to 1.
[0091] Optionally, the second preset threshold condition includes: the target mechanical angle value is greater than a third threshold and less than a fourth threshold. Optionally, the third threshold is 0, and the fourth threshold is 360°.
[0092] Optional, see below Figure 5Since the mechanical angle value corresponding to the motor is also a periodic value, it needs to be periodically processed. When the target mechanical angle value meets the second preset threshold condition mentioned above, it indicates that the mechanical angles of the two corresponding sampling points belong to the same period, and no processing is required. Otherwise, the corresponding period conversion processing is required, specifically including the following two cases. One case is that after step S2032, it also includes: if the target mechanical angle value is less than the third threshold, then a first updated target mechanical angle value is determined based on the target mechanical angle value and the aforementioned period; an initial electrical angle value is determined based on the first updated target mechanical angle value and the number of pole pairs of the brushless motor. The other case is that after step S2032, it also includes: if the target mechanical angle value is greater than the fourth threshold, then a second updated target mechanical angle value is determined based on the target mechanical angle value and the aforementioned period; an initial electrical angle value is determined based on the second updated target mechanical angle value and the number of pole pairs of the brushless motor.
[0093] S2033: If the initial electrical angle value meets the third preset threshold condition, then the initial electrical angle value is determined as the target electrical angle value.
[0094] Optionally, the third preset threshold condition includes: the initial electrical angle value is greater than the third threshold and less than the fourth threshold.
[0095] Optional, see below Figure 5 Since the electrical angle value corresponding to the motor is also a periodic value, it also needs to be periodized. When the initial electrical angle value meets the third preset threshold condition mentioned above, it indicates that the electrical angles of the two corresponding sampling points belong to the same period, and no processing is required. Otherwise, the corresponding period conversion processing is required, specifically including the following two cases. One case is that after step S2033, it further includes: if the initial electrical angle value is less than the third threshold, then a first updated initial electrical angle value is determined based on the initial electrical angle value and the aforementioned period; a target electrical angle value is determined based on the first updated initial electrical angle value and the period. The other case is that after step S2033, it further includes: if the initial electrical angle value is greater than the fourth threshold, then a second updated initial electrical angle value is determined based on the initial electrical angle value and the aforementioned period; a target electrical angle value is determined based on the second updated initial electrical angle value and the period.
[0096] S2034: Determine the initial angle based on the target electrical angle value and the theoretical electrical angle value.
[0097] In this embodiment, the initial angle = target electrical angle value - theoretical electrical angle value.
[0098] Taking the second implementation method described above as an example, the solution is illustrated using the angle difference. For the first angle difference, the initial angle can be the one corresponding to the second sampling point, and the target electrical angle value can be the periodically processed electrical angle value detected by the angle sensor at the second sampling point; the theoretical motor angle value can be 60° corresponding to the second sampling point (U-axis). For the second angle difference, the target angle value can be the periodically processed electrical angle value detected by the angle sensor at the third sampling point; the theoretical motor angle value can be 180° corresponding to the second sampling point (V-axis). For the third angle difference, the target angle value can be the periodically processed electrical angle value detected by the angle sensor at the fourth sampling point; the theoretical motor angle value can be 300° corresponding to the second sampling point (W-axis).
[0099] The following explains the case where the preset time is not equal to a single running cycle T.
[0100] Optionally, steps S203-S204 can be specifically described as follows: For each angle difference in the set of angle differences, if the preset time corresponding to the angle difference does not meet the fourth preset threshold condition, then the sub-sampling points and angle values of the sub-sampling points included in the preset time are determined to obtain a set of sub-sampling points; the time interval between adjacent sub-sampling points in the set of sub-sampling points is equal, and the time interval is the aforementioned single operating cycle T; for each sub-sampling point, the sub-angle difference corresponding to the current sub-sampling point is determined based on the angle values of the current sub-sampling point and the corresponding historical sub-sampling points; the historical sub-sampling points and the current sub-sampling point are adjacent sampling points; if the sub-angle difference meets the first preset threshold condition, then the target electrical angle value corresponding to the sub-angle difference is determined based on the pole pair number information corresponding to the sub-angle difference and the initial mechanical angle value; the pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor. The target electrical angle values of each sub-sampling point in the sub-sampling point set are arranged in ascending order according to the detection time corresponding to the sub-sampling point. The target electrical angle value corresponding to the last sub-sampling point is determined as the target electrical angle value corresponding to the angle difference. Based on the target electrical angle value corresponding to the angle difference and the theoretical electrical angle value, the initial angle corresponding to the angle difference is determined.
[0101] For example, continuing the above example, T = 2s, assuming the preset time is 0.5s, the preset time is less than T, then the sub-sampling point set contains one sub-sampling point, namely the first sampling point mentioned above. For the first sampling point, based on the angle value collected by the angle sensor, the target electrical angle value corresponding to the first sampling point can be obtained according to the above steps S202 and S2031-S2033. Since the preset time is less than T, the angle sensor has not collected the angle value of the next operating cycle. Therefore, the target electrical angle value determined by the first sampling point is determined as the target electrical angle value of the second sampling point. It is known that the theoretical electrical angle value corresponding to the second sampling point is 60°, so the initial value of the second sampling point can be determined.
[0102] In this embodiment, the fourth preset threshold condition is that the preset time is equal to a single running cycle.
[0103] Optionally, the process of determining the target electrical angle value for each sub-sampling point is the same as the process of steps S2031-S2033 above, and will not be repeated here.
[0104] The method described above for determining the initial angle of the target does not require additional control software for the angle sensor; it can calibrate the initial angle solely using existing angle acquisition software, offering the advantage of low calibration cost. Of course, as mentioned above, to further simplify the calibration process, the preset time can also be set to be the same as a single operating cycle for calibration.
[0105] S204: Determine the target initial angle based on the initial angles corresponding to each angle difference in the set of angle differences.
[0106] Optionally, the target initial angle can be obtained by arithmetically averaging the initial angles corresponding to the differences in each angle. In another feasible embodiment, a straight line can be fitted based on the above multiple initial angles, and the initial electric angles with deviations greater than preset values can be removed. The target initial angle can then be obtained by arithmetically averaging the remaining initial angles.
[0107] It should be noted that since the target initial angle needs to be input to achieve control during the motor control process, the target initial angle can be defaulted to 0 during the calibration process.
[0108] Optionally, to further ensure the accuracy of the target initial angle calibrated by the above method, the method also includes a verification process: determining a preset electrical angle value; acquiring the angle value of the motor reaching the target position using an angle sensor; the target position is the position reached by the motor after completing the preset angle stroke; determining the target electrical angle value based on the target initial angle, angle value, pole pair information, and initial mechanical angle value; if the difference between the target electrical angle value and the preset electrical angle value is less than or equal to the preset value, then outputting verification qualification information; this verification qualification information indicates that the target initial angle meets the requirements; otherwise, repeating steps S201-S204 above until verification qualification information is output; if the number of verifications is greater than or equal to the preset number, then the calibration is stopped. This is because there may be a fault in the motor or circuit, making calibration impossible, requiring manual troubleshooting.
[0109] On the other hand, see Figure 6 , Figure 6 This is a schematic diagram of an optional initial angle calibration device according to this application. This application also discloses an initial angle calibration device, which includes:
[0110] Angle value acquisition module 601 is used to detect the angle values of multiple sampling points using an angle sensor to obtain an angle value set; the angle sensor is located on the rotating shaft of the brushless motor.
[0111] Angle difference determination module 602 is used to obtain an angle difference set based on the difference between any two angle values in the angle value set;
[0112] The initial angle determination module 603 is used to determine the initial angle corresponding to each angle difference in the set of angle differences if the angle difference meets the first preset threshold condition, based on the theoretical electrical angle value, pole pair number information and initial mechanical angle value corresponding to the angle difference; the pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor.
[0113] The target initial angle determination module 604 is used to determine the target initial angle based on the initial angles corresponding to each angle difference in the angle difference set.
[0114] In one feasible embodiment, the angle value acquisition module is used to determine a first sampling point; detect the angle value of the first sampling point using the angle sensor; after a preset time interval, determine a second sampling point; detect the angle value of the second sampling point using the angle sensor; repeat the above steps of determining the second sampling point and detecting the angle value of the second sampling point until the angle values of all sampling points are detected, and obtain the angle value set.
[0115] In one feasible embodiment, the first preset threshold condition includes: the angle difference is greater than a first threshold and less than a second threshold; the first threshold and the second threshold are opposites of each other.
[0116] In one feasible embodiment, the initial angle determination module is used to obtain the maximum speed of the brushless motor; and to determine the first threshold and the second threshold based on the maximum speed and the preset time.
[0117] In one feasible embodiment, the initial angle determination module is used to determine a target mechanical angle value based on the angle difference, the initial mechanical angle value, and the number of pole pairs of the angle sensor; if the target mechanical angle value meets a second preset threshold condition, then an initial electrical angle value is determined based on the target mechanical angle value and the number of pole pairs of the brushless motor; if the initial electrical angle value meets a third preset threshold condition, then the initial electrical angle value is determined as the target electrical angle value; and the initial angle is determined based on the target electrical angle value and the theoretical electrical angle value.
[0118] In one feasible embodiment, the initial angle determination module is used to determine the mechanical angle difference based on the angle difference and the number of pole pairs of the angle sensor; and to determine the target mechanical angle value based on the initial mechanical angle value and the mechanical angle difference.
[0119] Embodiments of this application also provide an electronic device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the initial angle calibration method as described above.
[0120] The embodiments of this application also provide a computer storage medium, which can be disposed in a server to store at least one instruction, at least one program, code set or instruction set related to implementing an initial angle calibration method in the method embodiments. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the above-mentioned initial angle calibration method.
[0121] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0122] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0123] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0124] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0125] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for initial angle calibration, characterized in that, include: An angle sensor is used to detect the angle values of multiple sampling points to obtain an angle value set; the angle sensor is installed on the rotating shaft of the brushless motor. Based on the difference between any two angle values in the angle value set, an angle difference set is obtained; For each angle difference in the set of angle differences, if the angle difference satisfies a first preset threshold condition, then based on the theoretical electrical angle value, pole pair number information, and initial mechanical angle value corresponding to the angle difference, the initial angle corresponding to the angle difference is determined; the pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor. The target initial angle is determined based on the initial angles corresponding to each angle difference in the set of angle differences. The initial angle corresponding to the angle difference is determined based on the theoretical electrical angle value, pole pair number information, and initial mechanical angle value corresponding to the angle difference. The pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor, including: The target mechanical angle value is determined based on the angle difference, the initial mechanical angle value, and the number of pole pairs of the angle sensor; If the target mechanical angle meets the second preset threshold condition, then the initial electrical angle value is determined based on the target mechanical angle value and the number of pole pairs of the brushless motor. If the initial electrical angle value meets the third preset threshold condition, then the initial electrical angle value is determined as the target electrical angle value; The initial angle is determined based on the target electrical angle value and the theoretical electrical angle value.
2. The initial angle calibration method according to claim 1, characterized in that, The method of using an angle sensor to detect the angle values of multiple sampling points to obtain an angle value set includes: Determine the first sampling point; The angle sensor is used to detect the angle value of the first sampling point; After a preset time interval, determine the second sampling point; The angle sensor is used to detect the angle value of the second sampling point; Repeat the steps of determining the second sampling point and detecting the angle value of the second sampling point until the angle values of all sampling points are detected, and obtain the set of angle values.
3. The initial angle calibration method according to claim 2, characterized in that, The first preset threshold condition includes: The angle difference is greater than a first threshold and less than a second threshold; the first threshold and the second threshold are opposites of each other.
4. The initial angle calibration method according to claim 3, characterized in that, The method for determining the first threshold and the second threshold includes: Obtain the maximum speed of the brushless motor; The first threshold and the second threshold are determined based on the maximum rotational speed and the preset time.
5. The initial angle calibration method according to claim 1, characterized in that, The determination of the target mechanical angle value based on the angle difference, the initial mechanical angle value, and the pole pair number of the angle sensor includes: The mechanical angle difference is determined based on the angle difference and the number of pole pairs of the angle sensor; The target mechanical angle value is determined based on the initial mechanical angle value and the mechanical angle difference.
6. An initial angle calibration device, characterized in that, include: An angle value acquisition module is used to detect the angle values of multiple sampling points using an angle sensor to obtain an angle value set; the angle sensor is installed on the rotating shaft of the brushless motor. An angle difference determination module is used to obtain an angle difference set based on the difference between any two angle values in the angle value set; An initial angle determination module is used to determine the initial angle corresponding to each angle difference in the set of angle differences if the angle difference meets a first preset threshold condition, based on the theoretical electrical angle value, pole pair number information, and initial mechanical angle value corresponding to the angle difference; the pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor. The target initial angle determination module is used to determine the target initial angle based on the initial angle corresponding to each angle difference in the angle difference set; The initial angle corresponding to the angle difference is determined based on the theoretical electrical angle value, pole pair number information, and initial mechanical angle value corresponding to the angle difference. The pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor, including: The target mechanical angle value is determined based on the angle difference, the initial mechanical angle value, and the number of pole pairs of the angle sensor; If the target mechanical angle meets the second preset threshold condition, then the initial electrical angle value is determined based on the target mechanical angle value and the number of pole pairs of the brushless motor. If the initial electrical angle value meets the third preset threshold condition, then the initial electrical angle value is determined as the target electrical angle value; The initial angle is determined based on the target electrical angle value and the theoretical electrical angle value.
7. An initial angle calibration system, characterized in that, This includes a brushless motor, an angle sensor, and a controller; The controller is connected to the brushless motor and the angle sensor; The angle sensor is mounted on the rotating shaft of the brushless motor; The angle sensor is used to detect the angle values of multiple sampling points to obtain an angle value set; and sends the angle value set to the controller. The controller is used to receive the angle value set, and obtain an angle difference set based on the difference between any two angle values in the angle value set; for each angle difference in the angle difference set, if the angle difference meets a first preset threshold condition, then based on the theoretical electrical angle value, pole pair information, and initial mechanical angle value corresponding to the angle difference, the initial angle corresponding to the angle difference is determined; the pole pair information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor; based on the initial angle corresponding to each angle difference in the angle difference set, a target initial angle is determined; The initial angle corresponding to the angle difference is determined based on the theoretical electrical angle value, pole pair number information, and initial mechanical angle value corresponding to the angle difference. The pole pair number information includes the pole pair number of the angle sensor and the pole pair number of the brushless motor, including: The target mechanical angle value is determined based on the angle difference, the initial mechanical angle value, and the number of pole pairs of the angle sensor; If the target mechanical angle meets the second preset threshold condition, then the initial electrical angle value is determined based on the target mechanical angle value and the number of pole pairs of the brushless motor. If the initial electrical angle value meets the third preset threshold condition, then the initial electrical angle value is determined as the target electrical angle value; The initial angle is determined based on the target electrical angle value and the theoretical electrical angle value.
8. An electronic device comprising a processor and a memory, the memory storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the initial angle calibration method as described in any one of claims 1-5.
9. A computer storage medium, characterized in that, The computer storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the initial angle calibration method as described in any one of claims 1-5.
Citation Information
Patent Citations
Angle compensation process for dual-motor redundancy control system
CN101256414A
Magnetic encoder, calibration method and calibration device thereof, motor and unmanned aerial vehicle
CN109870177A