Rotor angle calibration method and device based on linear Hall sensor

文档序号:651762 发布日期:2021-04-23 浏览:28次 中文

阅读说明:本技术 基于线性霍尔传感器的转子角度校准方法和装置 (Rotor angle calibration method and device based on linear Hall sensor ) 是由 郜潇宁 于江涛 于 2020-12-22 设计创作,主要内容包括:本发明公开了一种基于线性霍尔传感器的转子角度校准方法和装置。其中,该方法包括:获取线性霍尔传感器在电机转子的每个电角度周期内所对应的电压中值;在电机转子位于每个电角度周期内的预设电角度处时,获取线性霍尔传感器所检测到的电压值;根据电压中值以及电压值,得到每个电角度周期对应的校准角度;基于校准角度对待校准的转子角度进行校准。本发明解决了现有技术在对线性霍尔传感器的转子角度进行校准时存在校准误差大的技术问题。(The invention discloses a rotor angle calibration method and device based on a linear Hall sensor. Wherein, the method comprises the following steps: acquiring a voltage median value corresponding to the linear Hall sensor in each electrical angle period of the motor rotor; when the motor rotor is positioned at a preset electrical angle in each electrical angle period, acquiring a voltage value detected by a linear Hall sensor; obtaining a calibration angle corresponding to each electrical angle period according to the voltage median and the voltage value; and calibrating the rotor angle to be calibrated based on the calibration angle. The invention solves the technical problem of large calibration error when the rotor angle of the linear Hall sensor is calibrated in the prior art.)

1. A rotor angle calibration method based on a linear Hall sensor is characterized by comprising the following steps:

acquiring a voltage median value corresponding to the linear Hall sensor in each electrical angle period of the motor rotor;

when the motor rotor is positioned at a preset electrical angle in each electrical angle period, acquiring a voltage value detected by the linear Hall sensor;

and obtaining a calibration angle corresponding to each electrical angle period according to the voltage median and the voltage value.

2. The method of claim 1, wherein obtaining a median voltage value corresponding to the linear hall sensor for each electrical angle cycle of the rotor of the electric machine comprises:

acquiring a voltage amplitude range corresponding to each electrical angle period of the linear Hall sensor in a first rotation period of the motor rotor, wherein the first rotation period comprises a plurality of electrical angle periods;

and determining a corresponding voltage median value in each electrical angle period according to the voltage amplitude range corresponding to each electrical angle period.

3. The method of claim 1, wherein before obtaining the voltage value detected by the linear hall sensor while the motor rotor is at a preset electrical angle within the each electrical angle period, the method further comprises:

and in a second rotation period of the motor rotor, controlling the motor rotor to stay at a preset electrical angle position of each electrical angle period for a preset time length.

4. The method of claim 1, wherein the linear hall sensor comprises a first sensor and a second sensor, and wherein obtaining the calibration angle for each electrical angle period according to the voltage median and the voltage value comprises:

in a second rotation period of the motor rotor, calculating a difference value between a first voltage median value corresponding to the first sensor in each electrical angle period and a first voltage value detected by the first sensor at a preset electrical angle in each electrical angle period to obtain a first difference value;

calculating a difference value between a second voltage median value corresponding to the second sensor in each electrical angle period and a second voltage value detected by the second sensor at a preset electrical angle in each electrical angle period to obtain a second difference value;

and obtaining a calibration angle corresponding to each electrical angle period according to the first difference and the second difference.

5. The method of claim 4, wherein obtaining the calibration angle for each electrical angle period based on the first difference and the second difference comprises:

acquiring a first voltage amplitude corresponding to the first sensor in each electrical angle period;

normalizing the first difference value according to the first voltage amplitude to obtain a third difference value;

acquiring a second voltage amplitude corresponding to the second sensor in each electrical angle period;

normalizing the second difference value according to the second voltage amplitude value to obtain a fourth difference value;

and obtaining a calibration angle corresponding to each electrical angle period according to the third difference and the fourth difference.

6. The method of claim 4, further comprising:

acquiring a rotor angle to be calibrated;

determining a target electrical angle period corresponding to the rotor angle to be calibrated;

acquiring a target calibration angle corresponding to the target electrical angle period;

and calculating the difference value between the rotor angle to be calibrated and the target calibration angle to obtain a target rotor angle.

7. The method of claim 6, wherein obtaining the rotor angle to be calibrated comprises:

calculating a difference value between a third voltage median value corresponding to the first sensor in the target electrical angle period and a third voltage value detected by the first sensor at a preset electrical angle in the target electrical angle period to obtain a fifth difference value;

calculating a difference value between a fourth voltage median value corresponding to the second sensor in the target electrical angle period and a fourth voltage value detected by the second sensor at a preset electrical angle in the target electrical angle period to obtain a sixth difference value;

carrying out normalization processing on the fifth difference value to obtain a first processing result;

carrying out normalization processing on the sixth difference value to obtain a second processing result;

and obtaining the angle of the rotor to be calibrated according to the first processing result and the second processing result.

8. The method of claim 4, wherein obtaining the calibration angle for each electrical angle period based on the first difference and the second difference comprises:

determining a first calibration angle corresponding to each electrical angle period in a second rotation period of the motor rotor according to the first difference and the second difference;

in a third rotation period of the motor rotor, calculating a difference value between a first voltage median value corresponding to the first sensor in each electrical angle period and a first voltage value detected by the first sensor at a preset electrical angle in each electrical angle period to obtain a seventh difference value, wherein a rotation direction of the motor rotor in the second rotation period is opposite to a rotation direction of the motor rotor in the third rotation period;

calculating a difference value between a second voltage median value corresponding to the second sensor in each electrical angle period and a second voltage value detected by the second sensor at a preset electrical angle in each electrical angle period to obtain an eighth difference value;

according to the seventh difference value and the eighth difference value, a second calibration angle corresponding to each electrical angle period in a third rotation period of the motor rotor is obtained;

and calculating the average value of the first calibration angle and the second calibration angle to obtain the calibration angle corresponding to each electrical angle period.

9. The method according to claim 1, wherein after obtaining the calibration angle corresponding to each electrical angle cycle according to the voltage median and the voltage value, the method further comprises:

acquiring the current rotor angle of the linear Hall sensor in the process of controlling the linear Hall sensor to operate by adopting magnetic field guidance;

and obtaining an actual rotor angle based on the current rotor angle and the calibration angle.

10. A rotor angle calibrating device based on a linear Hall sensor is characterized by comprising:

the first acquisition module is used for acquiring a voltage median value corresponding to the linear Hall sensor in each electrical angle period of the motor rotor;

the second acquisition module is used for acquiring the voltage value detected by the linear Hall sensor when the motor rotor is positioned at a preset electrical angle in each electrical angle period;

and the processing module is used for obtaining the calibration angle corresponding to each electrical angle period according to the voltage median and the voltage value.

11. A non-volatile storage medium, wherein a computer program is stored in the non-volatile storage medium, wherein the computer program is arranged to perform the linear hall sensor based rotor angle calibration method of any one of claims 1 to 9 when run.

12. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to perform the linear hall sensor based rotor angle calibration method of any one of claims 1 to 9 when running.

Technical Field

The invention relates to the field of motor control, in particular to a rotor angle calibration method and device based on a linear Hall sensor.

Background

The linear hall sensor is a common sensor for resolving the angle of the motor rotor, and in practical application, two linear hall sensors are usually arranged vertically by 90 degrees. The voltage signals detected by the two linear hall sensors change in a sine-shaped waveform as the magnetic field of the motor changes. Wherein, the angle of the motor rotor can be obtained by calculating the arc tangent of the voltage values detected by the two linear Hall sensors.

In the prior art, in the process of calculating the angle of the motor rotor by using the linear hall sensor, the angle of the motor rotor is generally calculated by using the linear hall median of the fixed same alpha axis and beta axis. When the angle of the motor rotor is calibrated, the fixed linear Hall median is used for angle calculation, and an angle calibration value is obtained through calculation. And finally, in a normal motor control flow, integrating the angle calibration value to carry out angle correction to obtain the real angle of the motor rotor.

However, in the prior art, when a fixed linear hall median is used for angle calculation, a large difference between the amplitude and the variation range of the linear hall sensor is ignored, so that the calculated calibration angle is inaccurate. In addition, in the process of integrating angle calibration after angle calculation by using a fixed linear hall median, because an error exists in a calibration angle obtained by calculating by using the fixed linear hall median, the error is larger because the true angle of the motor rotor is calculated by using the calibration angle with the error.

In view of the above problems, no effective solution has been proposed.

Disclosure of Invention

The embodiment of the invention provides a rotor angle calibration method and device based on a linear Hall sensor, which at least solve the technical problem of large calibration error when the rotor angle of the linear Hall sensor is calibrated in the prior art.

According to an aspect of an embodiment of the present invention, there is provided a rotor angle calibration method based on a linear hall sensor, including: acquiring a voltage median value corresponding to the linear Hall sensor in each electrical angle period of the motor rotor; when the motor rotor is positioned at a preset electrical angle in each electrical angle period, acquiring a voltage value detected by a linear Hall sensor; and obtaining a calibration angle corresponding to each electrical angle period according to the voltage median and the voltage value.

Further, the rotor angle calibration method based on the linear hall sensor further comprises the following steps: acquiring a voltage amplitude range corresponding to each electrical angle period of the linear Hall sensor in a first rotation period of the motor rotor, wherein the first rotation period comprises a plurality of electrical angle periods; and determining a corresponding voltage median value in each electrical angle period according to the voltage amplitude range corresponding to each electrical angle period.

Further, the rotor angle calibration method based on the linear hall sensor further comprises the following steps: and when the motor rotor is positioned at the preset electrical angle position in each electrical angle period, controlling the motor rotor to stay at the preset electrical angle position in each electrical angle period for a preset time length in a second rotation period of the motor rotor before acquiring the voltage value detected by the linear Hall sensor.

Further, the linear hall sensor comprises a first sensor and a second sensor, and the rotor angle calibration method based on the linear hall sensor further comprises: in a second rotation period of the motor rotor, calculating a difference value between a first voltage median value corresponding to the first sensor in each electrical angle period and a first voltage value detected by the first sensor at a preset electrical angle in each electrical angle period to obtain a first difference value; calculating a difference value between a second voltage median value corresponding to the second sensor in each electrical angle period and a second voltage value detected by the second sensor at a preset electrical angle in each electrical angle period to obtain a second difference value; and obtaining a calibration angle corresponding to each electrical angle period according to the first difference and the second difference.

Further, the rotor angle calibration method based on the linear hall sensor further comprises the following steps: acquiring a first voltage amplitude corresponding to the first sensor in each electrical angle period; normalizing the first difference value according to the first voltage amplitude value to obtain a third difference value; acquiring a second voltage amplitude corresponding to the second sensor in each electrical angle period; normalizing the second difference value according to the second voltage amplitude value to obtain a fourth difference value; and obtaining a calibration angle corresponding to each electrical angle period according to the third difference and the fourth difference.

Further, the rotor angle calibration method based on the linear hall sensor further comprises the following steps: acquiring a rotor angle to be calibrated; determining a target electrical angle period corresponding to the rotor angle to be calibrated; acquiring a target calibration angle corresponding to a target electrical angle period; and calculating the difference value between the rotor angle to be calibrated and the target calibration angle to obtain the target rotor angle.

Further, the rotor angle calibration method based on the linear hall sensor further comprises the following steps: calculating a difference value between a third voltage median value corresponding to the first sensor in the target electrical angle period and a third voltage value detected by the first sensor at a preset electrical angle in the target electrical angle period to obtain a fifth difference value; calculating a difference value between a fourth voltage median value corresponding to the second sensor in the target electrical angle period and a fourth voltage value detected by the second sensor at a preset electrical angle in the target electrical angle period to obtain a sixth difference value; carrying out normalization processing on the fifth difference value to obtain a first processing result; carrying out normalization processing on the sixth difference value to obtain a second processing result; and obtaining the angle of the rotor to be calibrated according to the first processing result and the second processing result.

Further, the rotor angle calibration method based on the linear hall sensor further comprises the following steps: determining a first calibration angle corresponding to each electrical angle period in a second rotation period of the motor rotor according to the first difference and the second difference; in a third rotation period of the motor rotor, calculating a difference value between a first voltage median value corresponding to the first sensor in each electrical angle period and a first voltage value detected by the first sensor at a preset electrical angle in each electrical angle period to obtain a seventh difference value, wherein the rotation direction of the motor rotor in the second rotation period is opposite to the rotation direction of the motor rotor in the third rotation period; calculating a difference value between a second voltage median value corresponding to the second sensor in each electrical angle period and a second voltage value detected by the second sensor at a preset electrical angle in each electrical angle period to obtain an eighth difference value; according to the seventh difference value and the eighth difference value, a second calibration angle corresponding to each electrical angle period in a third rotation period of the motor rotor is obtained; and calculating the average value of the first calibration angle and the second calibration angle to obtain the calibration angle corresponding to each electrical angle period.

Further, the rotor angle calibration method based on the linear hall sensor further comprises the following steps: after a calibration angle corresponding to each electrical angle period is obtained according to the voltage median and the voltage value, acquiring the current rotor angle of the linear Hall sensor in the process of controlling the linear Hall sensor to operate by adopting magnetic field guidance; and obtaining an actual rotor angle based on the current rotor angle and the calibration angle.

According to another aspect of the embodiments of the present invention, there is also provided a rotor angle calibration apparatus based on a linear hall sensor, including: the first acquisition module is used for acquiring a voltage median value corresponding to the linear Hall sensor in each electrical angle period of the motor rotor; the second acquisition module is used for acquiring the voltage value detected by the linear Hall sensor when the motor rotor is positioned at a preset electrical angle in each electrical angle period; and the processing module is used for obtaining the calibration angle corresponding to each electrical angle period according to the voltage median and the voltage value.

According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-mentioned linear hall sensor-based rotor angle calibration method when running.

According to another aspect of the embodiments of the present invention, there is also provided a processor for running a program, wherein the program is configured to execute the above-mentioned linear hall sensor-based rotor angle calibration method when running.

In the embodiment of the invention, a mode of determining the calibration angle according to the voltage median value in each electrical angle period is adopted, and after the voltage median value corresponding to the linear hall sensor in each electrical angle period of the motor rotor and the voltage value detected by the linear hall sensor are obtained when the motor rotor is positioned at the preset electrical angle in each electrical angle period, the calibration angle corresponding to each electrical angle period is obtained according to the voltage median value and the voltage value.

In the above process, since the magnetic field in each electrical angle period is different, the voltage amplitude and the voltage range detected by the linear hall sensor are different in different electrical angle periods, so that the voltage median values corresponding to different electrical angle periods are different, that is, in the present application, the changed voltage median value is used to calculate the calibration angle. Compared with the scheme of calculating the calibration angle by using the fixed linear Hall median value in the prior art, the method and the device can obtain more accurate calibration angle. Furthermore, because this application can calculate and obtain accurate calibration angle, consequently, the rotor angle that obtains based on calibration angle calculation again is also accurate.

Therefore, the purpose of calibrating the rotor angle to be calibrated is achieved by the scheme provided by the application, the technical effect of improving the calibration precision of the rotor angle to be calibrated is achieved, and the technical problem that the calibration error is large when the rotor angle of the linear Hall sensor is calibrated in the prior art is solved.

Drawings

The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:

FIG. 1 is a flow chart of a rotor angle calibration method based on a linear Hall sensor according to an embodiment of the present invention;

fig. 2 is a schematic diagram of a rotor angle calibration device based on a linear hall sensor according to an embodiment of the present invention.

Detailed Description

In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

Example 1

In accordance with an embodiment of the present invention, there is provided an embodiment of a method for rotor angle calibration based on linear hall sensors, it is noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.

Fig. 1 is a flowchart of a rotor angle calibration method based on a linear hall sensor according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:

and S102, acquiring a voltage median value corresponding to the linear Hall sensor in each electrical angle period of the motor rotor.

In step S102, the linear hall sensor includes a first sensor and a second sensor, wherein the first sensor and the second sensor are installed at 90 ° perpendicular mechanical angles, which are an α axis and a β axis, respectively.

In addition, during the process of rotating the motor rotor for one mechanical angle period, a plurality of electrical angle periods pass, namely, one mechanical angle period comprises a plurality of electrical angle periods.

In addition, it should be noted that, during the rotation of the motor rotor, the motor rotor passes through a plurality of electrical angle periods, and the magnetic field in each electrical angle period is different, so that the range of the voltage amplitude detected by the linear hall sensor in each electrical angle period is different, and the corresponding voltage median value is also different. In order to improve the calibration accuracy of the motor rotor, the method and the device are not suitable for a fixed voltage median value, but calibrate the rotor angle of the motor based on the voltage median value corresponding to each electrical angle period, so that the calibration accuracy of the motor rotor is improved.

And step S104, when the motor rotor is positioned at the preset electrical angle in each electrical angle period, acquiring the voltage value detected by the linear Hall sensor.

Optionally, in step S104, when the motor rotor is located at a preset electrical angle in each electrical angle period, for example, when the initial electrical angle of the motor rotor is 0 °, the first sensor and the second sensor respectively collect voltage values on the α axis and the β axis.

It should be noted that, in the process of calibrating the rotor angle, the initial electrical angle of the rotor of the motor and the initial current need to be forced to drag the rotor. Since the d-axis of the motor rotor is coincident with the rotor angle in a mathematical relationship, calculation is convenient, and therefore, in the application, when the initial electrical angle and the initial current are forcibly given, the initial current needs to be given to the d-axis of the motor rotor.

It should be noted that if the initial electrical angle is forced to be too large, it may cause the voltage value detected by the linear hall sensor to be inaccurate, and therefore, when the initial electrical angle is forced to be given, it is necessary to control the initial electrical angle increment given each time to be smaller than a preset value, where the preset value may be, but is not limited to, 1 °.

And step S106, obtaining a calibration angle corresponding to each electrical angle period according to the voltage median and the voltage value.

Since the voltage median value and the voltage value are both for the electrical angle period, the calibration angle obtained based on the voltage median value and the voltage value may be different for each electrical angle period, that is, the calibration angle corresponding to different electrical angle periods may be different.

Based on the solutions defined in steps S102 to S106, it can be known that, in the embodiment of the present invention, a manner of determining a calibration angle for a voltage median value in each electrical angle period is adopted, and after acquiring a voltage median value corresponding to the linear hall sensor in each electrical angle period of the motor rotor and acquiring a voltage value detected by the linear hall sensor when the motor rotor is located at a preset electrical angle in each electrical angle period, the calibration angle corresponding to each electrical angle period is obtained according to the voltage median value and the voltage value.

It is easy to note that in the above process, since the magnetic field in each electrical angle period is different, the voltage amplitude and the voltage range detected by the linear hall sensor are different in different electrical angle periods, so that the voltage median values corresponding to different electrical angle periods are different, that is, in this application, the changed voltage median values are used to calculate the calibration angle. Compared with the scheme of calculating the calibration angle by using the fixed linear Hall median value in the prior art, the method and the device can obtain more accurate calibration angle. Furthermore, because this application can calculate and obtain accurate calibration angle, consequently, the rotor angle that obtains based on calibration angle calculation again is also accurate.

Therefore, the purpose of calibrating the rotor angle to be calibrated is achieved by the scheme provided by the application, the technical effect of improving the calibration precision of the rotor angle to be calibrated is achieved, and the technical problem that the calibration error is large when the rotor angle of the linear Hall sensor is calibrated in the prior art is solved.

In an alternative embodiment, before calibrating the rotor angle to be calibrated, a voltage median value corresponding to the linear hall sensor in each electrical angle cycle of the motor rotor needs to be obtained first. Specifically, firstly, a voltage amplitude range corresponding to each electrical angle period of the linear hall sensor in a first rotation period of the motor rotor is obtained, and then a voltage median value corresponding to each electrical angle period is determined according to the voltage amplitude range corresponding to each electrical angle period. Wherein the first rotation period comprises a plurality of electrical angle periods.

In the above process, the first rotation period is a mechanical angle period of one rotation of the motor rotor, and optionally, in the case that the number of the electrical angle periods is N, the mechanical angle period includes N electrical angle periods.

Optionally, in a first rotation period of the motor rotor, the motor rotor passes through N electrical angle periods, at this time, the first sensor and the second sensor respectively record voltage amplitude ranges of the N electrical angle periods, after the first rotation period is ended, a voltage median value of the α axis and the β axis is obtained according to the recorded voltage amplitude ranges of the electrical angle periods, and a voltage amplitude value and a voltage median value corresponding to each electrical angle period are respectively recorded.

Alternatively, the voltage median may be determined by calculating an average of the voltage amplitudes in each electrical angle period, or the voltage amplitudes in each electrical angle period are sorted in descending order, and the voltage amplitude in the middle is taken as the voltage median, or the average of the two voltage amplitudes in the middle is taken as the voltage median. The above manner of determining the voltage median is only an optional manner, and in practical applications, the manner is not limited to the above manner.

In order to ensure the accuracy of the voltage amplitude value and the voltage median value corresponding to each electrical angle period obtained after the first rotation period, when the first mechanical period is dragged by force, the rotating speed of the first rotation period is controlled within a proper range, so that the recorded amplitude range of the linear hall of the N electrical angle periods is more accurate. Specifically, a certain voltage is applied to a d axis, namely Vd, in a first rotation period of strong dragging, the voltage value needs to be moderate, the motor can not be dragged if the voltage is too small, and the motor can be damaged if the voltage is too large; in addition, a certain angle increment is required to be given to drag the motor to rotate, the increment is too large each time, so that the data quantity is small, the precision is influenced, and the increment is too small each time, so that the motor is seriously heated and damaged; namely, the voltage and the angle increment are given to a proper range, and the voltage and the angle increment are both too large and too small, so that the defects can be caused, and the specific range is obtained according to actual measurement experiments of the type of the motor and the type of the load.

In an alternative embodiment, the motor rotor is controlled to stay at the preset electrical angle of each electrical angle period for a preset time period in the second rotation period of the motor rotor before the voltage value detected by the linear hall sensor at the preset electrical angle of each electrical angle period of the motor rotor is obtained.

In the above process, the second rotation period is a mechanical angle period of one rotation of the motor rotor, and optionally, in the case that the number of the electrical angle periods is N, the second rotation period includes N electrical angle periods.

It should be noted that, in the second rotation period of the motor rotor, the motor rotor passes through N electrical angle periods. During the second rotation period, the motor rotor is controlled to dwell at a certain fixed electrical angle (e.g., 0 °) for a period of time (i.e., a preset period of time) in order to ensure that the motor rotor has reached the designated position.

In an alternative embodiment, after acquiring a voltage median value corresponding to the linear hall sensor in each electrical angle period of the motor rotor, a calibration angle corresponding to each electrical angle period is calculated according to the voltage median value and a voltage value detected by the linear hall sensor at a preset electrical angle. Specifically, firstly, a difference value between a first voltage median value corresponding to the first sensor in each electrical angle period and a first voltage value detected by the first sensor at a preset electrical angle in each electrical angle period is calculated to obtain a first difference value; then, calculating a difference value between a second voltage median value corresponding to the second sensor in each electrical angle period and a second voltage value detected by the second sensor at a preset electrical angle in each electrical angle period to obtain a second difference value; and finally, obtaining a calibration angle corresponding to each electrical angle period according to the first difference and the second difference.

It should be noted that, since the amplitude ranges of the α axis and the β axis may be different, for example, the amplitude range of the α axis and the amplitude range of the β axis are significantly different, the amplitude of the α axis and the amplitude of the β axis need to be normalized in the process of calculating the calibration angle.

Specifically, a first voltage amplitude corresponding to each electrical angle period of the first sensor is obtained, and normalization processing is performed on the first difference value according to the first voltage amplitude to obtain a third difference value. And then, acquiring a second voltage amplitude corresponding to the second sensor in each electrical angle period, normalizing the second difference according to the second voltage amplitude to obtain a fourth difference, and finally, acquiring a calibration angle corresponding to each electrical angle period according to the third difference and the fourth difference.

That is, in the process of calculating the calibration angle, it is necessary to first read the voltage value acquired by the linear hall sensor (including the first sensor and the second sensor) at this time, record the electrical angle period corresponding to the initial electrical angle of the motor rotor at this time, normalize after subtracting the voltage median value corresponding to the electrical angle period, and then obtain the arc tangent angle, so as to obtain the calibration angle, where the calibration angle may satisfy the following formula:

in the above equation, the β -axis voltage amplitude corresponding to the electrical angle period is the second voltage amplitude, and the axis voltage amplitude corresponding to the electrical angle period is the first voltage amplitude.

It should be noted that, the above process is repeated N times, then a calibration angle calculated by N preset angles is obtained, and an electrical angle period corresponding to the calibration angle is recorded. In the subsequent normal FOC (Field-Oriented Control) operation process, a calibration angle settlement formula is used for solving the rotor angle, and the rotor angle is fused with the calibration angle to obtain the real rotor angle.

In addition, it should be further noted that the first voltage amplitude and the second voltage amplitude may be an average value of voltage amplitudes in corresponding electrical angle periods, that is, the first voltage amplitude may be an average value of voltage amplitudes acquired by the first sensor in corresponding electrical angle periods, and the second voltage amplitude may be an average value of voltage amplitudes acquired by the second sensor in corresponding electrical angle periods.

In addition, the first difference value may be normalized by calculating a ratio of the first difference value to the first voltage amplitude, and similarly, the second difference value may be normalized by calculating a ratio of the second difference value to the second voltage amplitude.

In another optional embodiment, in order to avoid the problem that the detection result is inaccurate due to the virtual position of the reduction gearbox, a third rotation period is added in the embodiment, the calibration angle corresponding to the motor rotor in the third rotation period is calculated, and then the final calibration angle is obtained according to the calibration angle corresponding to the third rotation period and the calibration angle corresponding to the second rotation period.

Specifically, first, a first calibration angle corresponding to each electrical angle period in a second rotation period of the motor rotor is determined according to a first difference value and a second difference value, then, in a third rotation period of the motor rotor, a difference value between a first voltage median value corresponding to the first sensor in each electrical angle period and a first voltage value detected by the first sensor at a preset electrical angle in each electrical angle period is calculated to obtain a seventh difference value, a difference value between a second voltage median value corresponding to the second sensor in each electrical angle period and a second voltage value detected by the second sensor at a preset electrical angle in each electrical angle period is calculated to obtain an eighth difference value, then, according to the seventh difference value and the eighth difference value, a second calibration angle corresponding to each electrical angle period in a third rotation period of the motor rotor is obtained, and finally, and calculating the average value of the first calibration angle and the second calibration angle to obtain the calibration angle corresponding to each electrical angle period.

It should be noted that the rotation direction of the motor rotor in the second rotation period is opposite to the rotation direction of the motor rotor in the third rotation period, where the calculation method of the second calibration angle corresponding to the third rotation period is the same as the calculation method of the first calibration angle corresponding to the second rotation period, which has been described above, and is not described herein again. In addition, after the first calibration angle and the second calibration angle are obtained, the average value of the first calibration angle and the second calibration angle is used as a final calibration angle to realize the calibration of the rotor angle to be calibrated.

In an alternative embodiment, after the calibration angle is obtained, in the process of controlling the operation of the linear hall sensor by using the magnetic field guidance, the current rotor angle of the linear hall sensor is obtained, and the actual rotor angle is obtained based on the current rotor angle and the calibration angle.

Specifically, the method includes the steps of firstly obtaining a rotor angle to be calibrated, determining a target electrical angle period corresponding to the rotor angle to be calibrated, then obtaining a target calibration angle corresponding to the target electrical angle period, and finally calculating a difference value between the rotor angle to be calibrated and the target calibration angle to obtain the target rotor angle.

The method for obtaining the rotor angle to be calibrated is similar to the method for obtaining the calibration angle, namely, a difference value between a third voltage median value corresponding to the first sensor in a target electrical angle period and a third voltage value detected by the first sensor at a preset electrical angle in the target electrical angle period is calculated to obtain a fifth difference value, a difference value between a fourth voltage median value corresponding to the second sensor in the target electrical angle period and a fourth voltage value detected by the second sensor at the preset electrical angle in the target electrical angle period is calculated to obtain a sixth difference value, then the fifth difference value is normalized to obtain a first processing result, the sixth difference value is normalized to obtain a second processing result, and finally the rotor angle to be calibrated is obtained according to the first processing result and the second processing result.

Optionally, the target rotor angle satisfies the following equation:

the method comprises the steps of subtracting a voltage median value of a beta axis corresponding to an electric angle period from a voltage value of the beta axis, carrying out normalization processing according to a voltage amplitude value of the beta axis corresponding to the electric angle period, dividing the normalized value by subtracting the voltage median value of the alpha axis corresponding to the electric angle period from the voltage value of the alpha axis, carrying out normalization processing according to the voltage amplitude value of the alpha axis corresponding to the electric angle period, and subtracting a calibration angle corresponding to the electric angle period to obtain a rotor angle.

According to the scheme, the angle calculation deviation of the linear Hall sensor caused by the difference between the mechanical installation and the sensor can be better avoided, the calculation accuracy of the motor rotor angle is improved, and the motor can be accurately controlled.

Example 2

According to an embodiment of the present invention, there is also provided an embodiment of a rotor angle calibration apparatus based on a linear hall sensor, where fig. 2 is a schematic diagram of the rotor angle calibration apparatus based on the linear hall sensor according to the embodiment of the present invention, and as shown in fig. 2, the apparatus includes: a first acquisition module 201, a second acquisition module 203, and a processing module 205.

The first obtaining module 201 is configured to obtain a voltage median value corresponding to the linear hall sensor in each electrical angle period of the motor rotor; the second obtaining module 203 is configured to obtain a voltage value detected by the linear hall sensor when the motor rotor is located at a preset electrical angle in each electrical angle period; and the processing module 205 is configured to obtain a calibration angle corresponding to each electrical angle period according to the voltage median and the voltage value.

It should be noted that the first acquiring module 201, the second acquiring module 203 and the processing module 205 correspond to steps S102 to S106 in the above embodiment, and the three modules are the same as the corresponding steps in the implementation example and application scenarios, but are not limited to the disclosure in embodiment 1.

Optionally, the first obtaining module includes: the device comprises a third acquisition module and a first determination module. The third acquisition module is used for acquiring a voltage amplitude range corresponding to each electrical angle period of the linear Hall sensor in a first rotation period of the motor rotor, wherein the first rotation period comprises a plurality of electrical angle periods; and the first determining module is used for determining a corresponding voltage median value in each electrical angle period according to the voltage amplitude range corresponding to each electrical angle period.

Optionally, the rotor angle calibration apparatus based on the linear hall sensor further includes: and the first control module is used for controlling the motor rotor to stay at the preset electrical angle position of each electrical angle period for a preset time length in the second rotation period of the motor rotor before the voltage value detected by the linear Hall sensor is acquired when the motor rotor is positioned at the preset electrical angle position of each electrical angle period.

Optionally, the linear hall sensor includes a first sensor and a second sensor, wherein the processing module includes: the device comprises a first calculation module, a second calculation module and a first processing module. The first calculation module is used for calculating a difference value between a first voltage median value corresponding to the first sensor in each electrical angle period and a first voltage value detected by the first sensor at a preset electrical angle in each electrical angle period to obtain a first difference value; the second calculation module is used for calculating a difference value between a second voltage median value corresponding to the second sensor in each electrical angle period and a second voltage value detected by the second sensor at a preset electrical angle in each electrical angle period to obtain a second difference value; and the first processing module is used for obtaining the calibration angle corresponding to each electrical angle period according to the first difference value and the second difference value.

Optionally, the first processing module includes: the device comprises a fourth acquisition module, a second processing module, a fifth acquisition module, a third processing module and a fourth processing module. The fourth obtaining module is used for obtaining a corresponding first voltage amplitude of the first sensor in each electrical angle period; the second processing module is used for carrying out normalization processing on the first difference value according to the first voltage amplitude value to obtain a third difference value; the fifth acquisition module is used for acquiring a second voltage amplitude corresponding to the second sensor in each electrical angle period; the third processing module is used for carrying out normalization processing on the second difference value according to the second voltage amplitude value to obtain a fourth difference value; and the fourth processing module is used for obtaining the calibration angle corresponding to each electrical angle period according to the third difference value and the fourth difference value.

Optionally, the rotor angle calibration apparatus based on the linear hall sensor further includes: the device comprises a sixth acquisition module, a second determination module, a seventh acquisition module and a third calculation module. The sixth acquisition module is used for acquiring the angle of the rotor to be calibrated; the second determining module is used for determining a target electrical angle period corresponding to the rotor angle to be calibrated; the seventh acquisition module is used for acquiring a target calibration angle corresponding to the target electrical angle period; and the third calculation module is used for calculating the difference value between the rotor angle to be calibrated and the target calibration angle to obtain the target rotor angle.

Optionally, the sixth obtaining module includes: the device comprises a fourth calculation module, a fifth processing module, a sixth processing module and a seventh processing module. The fourth calculating module is configured to calculate a difference between a third voltage median value corresponding to the first sensor in the target electrical angle period and a third voltage value detected by the first sensor at a preset electrical angle in the target electrical angle period, so as to obtain a fifth difference; the fifth calculation module is used for calculating a difference value between a fourth voltage median value corresponding to the second sensor in the target electrical angle period and a fourth voltage value detected by the second sensor at a preset electrical angle in the target electrical angle period to obtain a sixth difference value; the fifth processing module is used for carrying out normalization processing on the fifth difference value to obtain a first processing result; the sixth processing module is used for carrying out normalization processing on the sixth difference value to obtain a second processing result; and the seventh processing module is used for obtaining the angle of the rotor to be calibrated according to the first processing result and the second processing result.

Optionally, the first processing module includes: the device comprises an eighth processing module, a sixth calculating module, a seventh calculating module, a ninth processing module and an eighth calculating module. The eighth processing module is used for determining a first calibration angle corresponding to each electrical angle period in a second rotation period of the motor rotor according to the first difference and the second difference; the sixth calculating module is used for calculating a difference value between a first voltage median value corresponding to the first sensor in each electrical angle period and a first voltage value detected by the first sensor at a preset electrical angle in each electrical angle period in a third rotation period of the motor rotor to obtain a seventh difference value, wherein the rotation direction of the motor rotor in the second rotation period is opposite to the rotation direction of the motor rotor in the third rotation period; the seventh calculating module is configured to calculate a difference between a second voltage median value corresponding to the second sensor in each electrical angle period and a second voltage value detected by the second sensor at a preset electrical angle in each electrical angle period, so as to obtain an eighth difference; the ninth processing module is used for obtaining a second calibration angle corresponding to each electrical angle period in a third rotation period of the motor rotor according to the seventh difference value and the eighth difference value; and the eighth calculation module is used for calculating the average value of the first calibration angle and the second calibration angle to obtain the calibration angle corresponding to each electrical angle period.

Optionally, the rotor angle calibration apparatus based on the linear hall sensor further includes: a seventh obtaining module and a tenth processing module. The seventh obtaining module is used for obtaining the current rotor angle of the linear hall sensor in the process of controlling the operation of the linear hall sensor by adopting magnetic field guidance after obtaining the calibration angle corresponding to each electrical angle period according to the voltage median and the voltage value; and the tenth processing module is used for obtaining the actual rotor angle based on the current rotor angle and the calibration angle.

Example 3

According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to execute the linear hall sensor based rotor angle calibration method in embodiment 1 described above when running.

Example 4

According to another aspect of the embodiments of the present invention, there is also provided a processor for running a program, wherein the program is configured to execute the linear hall sensor based rotor angle calibration method in embodiment 1 described above when running.

The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.

In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.

The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:单绕组无轴承磁通切换电机缺相邻两相转子悬浮控制方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!