CN117885136A - Steering engine position calibration method and device and rotatable equipment - Google Patents

Steering engine position calibration method and device and rotatable equipment Download PDF

Info

Publication number
CN117885136A
CN117885136A CN202311851623.5A CN202311851623A CN117885136A CN 117885136 A CN117885136 A CN 117885136A CN 202311851623 A CN202311851623 A CN 202311851623A CN 117885136 A CN117885136 A CN 117885136A
Authority
CN
China
Prior art keywords
angle
steering engine
theoretical
error
rotation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311851623.5A
Other languages
Chinese (zh)
Inventor
海宏宇
周博
王浩
许昌平
杜旭超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ubtech Robotics Corp
Original Assignee
Ubtech Robotics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ubtech Robotics Corp filed Critical Ubtech Robotics Corp
Priority to CN202311851623.5A priority Critical patent/CN117885136A/en
Publication of CN117885136A publication Critical patent/CN117885136A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measurement Of Length, Angles, Or The Like Using Electric Or Magnetic Means (AREA)

Abstract

The application is applicable to the technical field of position calibration, and provides a position calibration method and device of a steering engine and rotatable equipment, wherein the method comprises the following steps: acquiring a target angle of a first steering engine, wherein the target angle is an angle which the first steering engine theoretically will reach; determining an error value corresponding to a target angle of the first steering engine according to a preset error table, wherein the preset error table is used for recording mapping relations between different theoretical angles and error values, and the error value is used for representing the difference between the theoretical angle reached by theoretical rotation of the first steering engine and the actual angle reached by actual rotation; calculating an actual angle corresponding to the target angle according to the target angle and the error value; and controlling the first steering engine to rotate according to the actual angle. The method can calibrate the position of the first steering engine.

Description

Steering engine position calibration method and device and rotatable equipment
Technical Field
The application belongs to the technical field of position calibration, and particularly relates to a position calibration method and device of a steering engine, rotatable equipment and a computer readable storage medium.
Background
Currently, people are able to service them with more and more rotatable devices. For example, robotic arms with mechanical jaws, with which one can grasp cargo; and the humanoid robot with the humanoid structure can be used for performing dance. In the rotating process of the rotatable equipment, the rotatable equipment is usually realized by relying on the rotation of a steering engine in the rotatable equipment, namely, the rotation of a part related to the steering engine to a designated position is controlled by controlling the rotation angle of the steering engine.
In the existing method, the angle (or the position) of the steering engine is usually detected through a linear Hall sensor, but when the method is adopted to determine the position of the steering engine, the steering engine is difficult to ensure to rotate to an accurate position, and further, the consistency of the position of the same steering engine in each rotatable device of mass production is difficult to ensure.
Disclosure of Invention
The embodiment of the application provides a method and a device for calibrating the position of a steering engine, rotatable equipment and a computer readable storage medium, which can solve the problem of lower accuracy of the actual rotating position of the steering engine.
In a first aspect, an embodiment of the present application provides a method for calibrating a position of a steering engine, including:
Acquiring a target angle of a first steering engine, wherein the target angle is an angle which the first steering engine theoretically will reach;
determining an error value corresponding to a target angle of the first steering engine according to a preset error table, wherein the preset error table is used for recording mapping relations between different theoretical angles and error values, and the error value is used for representing the difference between the theoretical angle reached by theoretical rotation of the first steering engine and the actual angle reached by actual rotation;
calculating an actual angle corresponding to the target angle according to the target angle and the error value;
and controlling the first steering engine to rotate according to the actual angle.
In a second aspect, an embodiment of the present application provides a position calibration device for a steering engine, including:
The target angle acquisition module is used for acquiring a target angle of the first steering engine, wherein the target angle is an angle which the first steering engine theoretically will reach;
The error value determining module is used for determining an error value corresponding to the target angle of the first steering engine according to a preset error table, wherein the preset error table is used for recording mapping relations between different theoretical angles and error values, and the error value is used for representing the difference between the theoretical angle reached by theoretical rotation of the first steering engine and the actual angle reached by actual rotation;
the actual angle calculation module is used for calculating an actual angle corresponding to the target angle according to the target angle and the error value;
And the rotation control module is used for controlling the first steering engine to rotate according to the actual angle.
In a third aspect, an embodiment of the present application provides a rotatable device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing a method according to the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements a method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product for causing a rotatable device to carry out the method of the first aspect described above when the computer program product is run on the rotatable device.
Compared with the prior art, the embodiment of the application has the beneficial effects that:
In the embodiment of the application, after the target angle of the first steering engine is obtained, the error value corresponding to the target angle of the first steering engine is determined according to the preset error table, and then the actual angle corresponding to the target angle is calculated according to the target angle and the error value. And after the position calibration is carried out on each steering engine in the same batch, the actual arriving positions of the steering engines can be met when the steering engines execute the same task, and the inconsistent phenomenon of the steering engines in batch production is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a schematic diagram of the relative positions of 2 linear Hall sensors and a magnetic ring according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a method for calibrating the position of a steering engine according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a position calibration device for a steering engine according to an embodiment of the present application;
fig. 4 is a schematic structural view of a rotatable device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise.
In order to realize the rotatable function of the equipment, a steering engine is usually arranged on the equipment so as to drive the steering engine to rotate through a motor of the equipment to complete certain actions of the equipment.
When the steering engine is controlled to rotate, the current position of the steering engine (namely the current angle of the steering engine) needs to be identified, and the current angle of the steering engine is calculated as the current position of the steering engine through data acquired by a linear Hall sensor. Referring to fig. 1, the position of the steering engine is determined by two linear hall sensors and a magnetic ring, which are 90 ° apart. The magnetic ring is placed at the center of a circle where the two linear Hall sensors are located. Since in actual production the printed circuit board assembly (Printed Circuit Board Assembly, PCBA) may be uneven and the placed magnetic ring may also be uneven, these irregularities may result in that the voltage values collected by the two linear hall sensors are not equal, whereas the voltage values collected by the linear hall sensors are used for the calculation of the current position of the steering engine, when the voltage values collected by the linear sensors in the different rotatable devices of the mass production are not equal (e.g. there is a difference other than a phase difference), the positions of the steering engines calculated by the different rotatable devices according to the different voltage values will also not be equal, thus causing an inconsistent situation in the steering engines of the rotatable devices of the mass production.
In order to improve the accuracy of the rotating position of the rotatable equipment and the consistency of steering engines of the rotatable equipment in mass production, the embodiment of the application provides a method for calibrating the position of the steering engines. In the method, after the angle of the steering engine which needs to rotate is determined, an error value corresponding to the angle is searched from a predetermined error table, the angle of the steering engine which needs to rotate is calibrated according to the searched error value, and finally the steering engine is controlled to rotate according to the calibrated angle.
Because the angle that the steering engine needs to rotate is calibrated, the angle (or the position that the steering engine actually arrives) of the steering engine can meet the requirements. That is, after the mass-produced steering engines are all calibrated during rotation, the actual reaching positions of the steering engines can be effectively guaranteed to meet the requirements when the steering engines execute the same task, and inconsistent phenomenon of the mass-produced steering engines is reduced.
The method for calibrating the position of the steering engine provided by the embodiment of the application is described below with reference to the accompanying drawings.
Fig. 2 shows a flow chart of a method for calibrating the position of a steering engine according to an embodiment of the present application, which is described in detail below:
s21, acquiring a target angle of the first steering engine, wherein the target angle is the angle which the first steering engine theoretically will reach.
The first steering engine is a steering engine to be subjected to position calibration, and is named as the first steering engine in order to distinguish the steering engine from the steering engine.
In the embodiment of the application, at least two linear Hall sensors with identical models are arranged on the first steering engine, and if no objective problem exists (such as that the placed magnetic ring is flat, the magnetic field intensity on the magnetic ring is identical, etc.), the Hall curves corresponding to the voltage values detected by the linear Hall sensors at different positions only have the difference in phase in the process of rotating the magnetic ring. For example, two linear hall sensors (such as the two linear hall sensors shown in fig. 1) with the installation positions of 90 degrees are two sine and cosine curves with the phase difference of 90 degrees, and arc tangent calculation is performed on two voltage values acquired by the two linear hall sensors at the same moment, so that the angle corresponding to the moment of the steering engine is obtained.
In the embodiment of the application, after the first steering engine receives the rotation instruction, the angle which the first steering engine theoretically rotates to reach is analyzed from the rotation instruction, and the target angle is obtained. For example, assuming that the rotation instruction received by the first steering engine includes an angle of 15 °, the 15 ° is the target angle of the first steering engine, that is, the first steering engine needs to rotate to 15 ° theoretically.
S22, determining an error value corresponding to the target angle of the first steering engine according to a preset error table, wherein the preset error table is used for recording mapping relations between different theoretical angles and error values, and the error value is used for representing the difference between the theoretical angle reached by theoretical rotation of the first steering engine and the actual angle reached by actual rotation.
Because the magnetic field strength of the magnetic ring of the first steering engine may be different at different positions, the hall curves corresponding to the voltage values collected by the different linear hall sensors on the first steering engine generally have other differences besides the differences in phase, for example, besides the differences in phase, the hall curves also have differences in amplitude and center point which are unequal. Since these differences affect the accuracy of the position of the first steering engine calculated according to the voltage values, in order to reduce the effect of these differences on the calculation of the position of the first steering engine, the embodiment of the application determines error values of the theoretical angle and the actual angle in the first steering engine in advance, and generates an error table according to these error values. The actual angle is calculated according to the voltage value acquired by the linear Hall sensor of the first steering engine, and the theoretical angle is the theoretical arrival angle of the first steering engine. For example, assume that the set of actual angles obtained is: 0 °, 0.48 °, 0.99 °, corresponding theoretical angles are: 0 °, 0.5 °,1 °, then the error values of these 3 pairs of angles are respectively: the theoretical angle of 0 °, -0.02 °, -0.01 °, i.e. "0.5", is the corresponding error value of-0.02 °.
S23, calculating an actual angle corresponding to the target angle according to the target angle and the error value.
Specifically, the sum of the target angle and the error value is added as the actual angle corresponding to the target angle. For example, assuming that the target angle is 0.5 °, the error value corresponding to "0.5" is "-0.02 °", and the sum obtained by adding them is "0.48 °", that is, the actual angle corresponding to "0.5" is 0.48 °.
S24, controlling the first steering engine to rotate according to the actual angle.
Specifically, the first steering engine is controlled to rotate until the angle calculated according to the voltage value acquired by the linear Hall sensor of the first steering engine is 0.48 degrees.
In the embodiment of the application, after the target angle of the first steering engine is obtained, the error value corresponding to the target angle of the first steering engine is determined according to the preset error table, and then the actual angle corresponding to the target angle is calculated according to the target angle and the error value. And after the position calibration is carried out on each steering engine in the same batch, the actual arriving positions of the steering engines can be met when the steering engines execute the same task, and the inconsistent phenomenon of the steering engines in batch production is reduced.
As can be seen from the above description, the error value corresponding to the target angle is found according to the preset error table, so that the error table needs to be determined before the error value is found, that is, in some embodiments, before S22, the method further includes:
a1, acquiring a voltage value acquired by a linear Hall sensor of the first steering engine in the process that the first steering engine rotates at a closed loop constant speed.
The closed-loop constant-speed rotation means that the first steering engine is controlled to rotate at a constant speed through software. For example, when the rotation speed of the first steering engine is detected to be increased by software, the rotation speed of the first steering engine is reduced, and if the rotation speed of the first steering engine is detected to be reduced, the rotation speed of the first steering engine is increased, so that the first steering engine is ensured to rotate at a constant speed.
Specifically, in the process of rotating the first steering engine, a plurality of voltage values acquired by the linear Hall sensor on the first steering engine are acquired, namely, the voltage values corresponding to different rotating angles of the first steering engine are acquired. Optionally, when the first steering engine includes a plurality of linear hall sensors, a plurality of voltage values acquired by the respective linear hall sensors are acquired respectively.
A2, calculating the rotating angle of the first steering engine according to the voltage value to obtain a first rotating angle.
Specifically, the first rotation angle described above may be obtained by performing an arctangent calculation on the voltage value.
Alternatively, considering that the angle obtained by performing arctangent calculation according to the voltage value of one linear hall sensor is not unique, the arctangent calculation is performed by using the voltage values of more than one linear hall sensor (such as the voltage values of two linear hall sensors) or the amplified voltage values of more than one linear hall sensor in the embodiment of the present application. Wherein the function for performing the arctangent calculation is arctan2, and arctan2 is a function for limiting the inverse trigonometric function to a single value.
Optionally, since the hall curves corresponding to different linear hall sensors may have different magnitudes and center points, in order to ensure the accuracy of calculation, it is necessary to perform per unit processing on the voltage value involved in calculation when calculating the first rotation angle, and then perform calculation of the initial position by using the voltage value after per unit processing.
Wherein per unit means: the actual value of the physical quantity is divided by a selected co-unit value, which is called a reference value. The amplitude values and the center points of the two per-unit Hall curves are equal.
A3, calculating an error value corresponding to the theoretical angle according to the first rotation angle and the theoretical angle at the same moment.
Here, the theoretical angle may be a predetermined plurality of angles, for example, a plurality of angles between 0 ° and 360 ° are determined as the theoretical angle. Further, in order to ensure the comprehensiveness of the error values in the error table, the number of theoretical angles in the embodiment of the present application is greater than 360, for example, 720, and for example, the theoretical angles in the embodiment of the present application may be respectively taken as 0 °, 0.5 °,1 ° … 359.5.5 °, 360 °. In order to ensure that each theoretical angle corresponds to one first rotation angle, a time point corresponding to each theoretical angle can be determined first, and then corresponding voltage values are obtained according to the time points, so that the corresponding first rotation angles are calculated according to the voltage values.
Alternatively, in practical situations, the theoretical angle may also be determined according to the corresponding angular velocity (which may be a specified angular velocity) of the first steering engine when the first steering engine rotates at the closed-loop constant speed: because the first steering engine rotates at a constant speed when the closed loop rotates at a constant speed, the rotating angle of the first steering engine can be calculated according to the angular speed and the rotating time of the first steering engine, and the theoretical angle corresponding to the first steering engine can be calculated according to the rotating angle and the angle before the first steering engine rotates. And then, obtaining corresponding voltage values according to the time points of determining the theoretical angles, and calculating corresponding first rotation angles according to the voltage values.
In the embodiment of the application, the calculated first rotation angles and the calculated theoretical angles are subtracted, so that error values corresponding to different theoretical angles are obtained. For example, if the first rotation angle calculated at time 1 is 0.99 °, and the theoretical angle corresponding to time 1 is 1 °, the error value corresponding to the theoretical angle "1 °" is-0.01 °.
Optionally, after obtaining the error values corresponding to different theoretical angles, it may be first determined whether the error values meet the preset precision requirement, if not, the steps A1 and A2 are performed back, after obtaining the first rotation angle calculated this time, the first rotation angle calculated this time is calibrated according to the error value obtained by the previous calculation, finally, a new error value is calculated according to the calibrated first rotation angle and the corresponding theoretical angle, if the error value obtained by this calculation meets the preset precision requirement, the subsequent step A4 is performed, otherwise, the steps are performed continuously back until the new error value meets the preset precision requirement.
A4, generating the error table according to a plurality of error values and a plurality of theoretical angles corresponding to the error values.
In the embodiment of the application, the first steering engine is controlled to rotate at a closed loop and constant speed, namely, the rotation speed of the first steering engine can be adjusted in a software control mode under the condition that the rotation speed of the first steering engine changes (namely, is not constant speed), so that the precision of the voltage value obtained in the closed loop and constant speed rotation mode is higher, the precision of the error value determined according to the voltage value is higher, and the precision of the generated error table is further ensured.
In some embodiments, considering that there is a sequence in performing position calibration in the same batch of steering engines, the difference between the actual rotation angle (i.e. the actual angle) of the steering engines in the same batch and the theoretical rotation angle (i.e. the theoretical angle) is generally small, therefore, the error value of the actual angle and the theoretical angle in the first steering engine may be calculated after compensating the actual angle of the first steering engine according to the error table of the steering engines that have been subjected to position calibration, where the above A3 includes:
a31, calculating the rotation angle after the first rotation angle compensation according to a preset first compensation table and the first rotation angle to obtain a second rotation angle, wherein the preset first compensation table is as follows: and the error table corresponds to a second steering engine, and the second steering engine is the steering engine with the same model as the first steering engine.
In the embodiment of the application, the position of the second steering engine is calibrated in advance to obtain an error table (namely a first compensation table) of the second steering engine, and the first compensation table is used for recording the error value corresponding to the actual angle and the theoretical angle of the second steering engine and the mapping relation of the corresponding theoretical angle. Because the model of the second steering engine is the same as that of the first steering engine, and the difference of error values corresponding to the same model is usually smaller, the error table (namely the first compensation table) of the second steering engine is adopted to calibrate the first rotation angle of the first steering engine, so that the speed of calibrating the first steering engine can be accelerated.
In the embodiment of the application, according to the theoretical angle corresponding to the first rotation angle, an error value corresponding to the theoretical angle is searched in the first compensation table, and the sum of the searched error value and the first rotation angle is calculated to obtain the second rotation angle.
A32, calculating an error value corresponding to the theoretical angle according to the second rotation angle and the theoretical angle at the same time.
Specifically, the difference between the second rotation angle and the theoretical angle at the same time is calculated, and an error value corresponding to the theoretical angle is obtained.
In the embodiment of the application, the error value of the actual angle and the theoretical angle in the first steering engine is calculated after the actual angle of the first steering engine is compensated according to the error table of the steering engine subjected to position calibration, so that compared with the error value calculated without compensating the first rotating angle, the error value with smaller value can be obtained more quickly by the method, namely, the error table with high precision can be obtained quickly by the method.
The foregoing describes that, after compensating the first rotation angle of the first steering engine according to the error table of the second steering engine, the error value corresponding to the first steering engine is calculated, in practical situations, the initial error value corresponding to the first steering engine may be calculated first, and after compensating the first rotation angle according to the initial error value, the final error value corresponding to the first steering engine is calculated, that is, in some embodiments, the foregoing A3 includes:
A31', calculating the rotation angle after the first rotation angle compensation according to a preset second compensation table and the first rotation angle to obtain a third rotation angle, wherein the preset second compensation table is as follows: and an error table determined according to the theoretical angle and the angle of rotation of the first steering engine detected in the process of carrying out open loop rotation of the first steering engine.
Wherein, open loop rotation means: and inputting a constant voltage to the first steering engine so that the first steering engine rotates in a mode of rotating at a nearly uniform speed. Here, the near uniform speed means that the rotational speed of the first steering engine may be non-uniform due to the influence of the rotational inertia of the first steering engine, and the actual rotation of the first steering engine may be non-uniform after the constant voltage is input. It should be noted that the rotation of the open loop does not force the rotation speed of the first steering engine to be uniform through software.
In the embodiment of the application, the voltage value acquired by the linear Hall sensor is acquired in the open-loop rotation, the rotation angle of the first steering engine is calculated according to the voltage value, the corresponding error value is obtained by comparing the difference between the rotation angle (namely the actual angle) of the first steering engine and the corresponding theoretical angle at the same time, and the second compensation table is generated according to the error values and the corresponding theoretical angles.
A32', calculating an error value corresponding to the theoretical angle according to the third rotation angle and the theoretical angle at the same time.
In the embodiment of the application, the second compensation table is an error table determined according to the theoretical angle and the angle of rotation of the first steering engine detected in the process of performing open-loop rotation of the first steering engine, so that the second compensation table can more accurately reflect the error value of the actual angle and the theoretical angle of the first steering engine in the process of performing open-loop rotation, and after the first rotation is compensated according to the second compensation table, the third rotation angle obtained after the compensation can be more accurate, thereby being beneficial to improving the accuracy of the error value determined according to the third rotation angle and the corresponding theoretical angle.
In some embodiments, the second compensation table may be generated by:
B1, determining the angular speed of the first steering engine.
The angular speed is also the angular speed of the motor of the first steering engine.
Optionally, the above B1 includes:
and B11, determining the angular speed of the first steering engine through a velocimeter.
Or alternatively
And B12, calculating the average value of the angular speeds of the steering gears in the same batch of the first steering gears, wherein the average value is used as the angular speed of the first steering gears.
In the embodiment of the application, a velocimeter can be arranged on the first steering engine, and the angular velocity of the first steering engine can be detected by the velocimeter. In addition, since the difference in the angular velocities of the steering engines of the same batch is generally small, the average value of the angular velocities of the steering engines of the same batch as the first steering engine can be regarded as the angular velocity of the first steering engine. For example, assuming that the number of the steering gears in the same batch as the first steering gear is 10000, velocimeters may be respectively disposed on 8000 steering gears to detect the angular speeds of the steering gears through the velocimeters, and finally, an average value of all the detected angular speeds is calculated, and assuming that the first steering gear is a steering gear which is not detected by the velocimeters, the calculated average value is used as the angular speed of the first steering gear.
B2, determining the interval time according to the angular speed and the resolution of the preset angle.
Specifically, the number of voltage values to be acquired is determined according to the preset angular resolution, and then the interval time is calculated according to the number of the voltage values and the angular speed of the first steering engine. For example, assuming that the resolution of the preset angle is 0.5 °, since the first steering engine can usually rotate 360 °, the number of voltage values to be acquired is: 360/0.5=720. The interval time t is calculated according to the following formula: t=v/720, where v is the angular velocity.
And B3, acquiring the voltage value acquired by the linear Hall sensor of the first steering engine according to the interval time.
Specifically, a plurality of voltage values acquired by the linear hall sensor are acquired according to the interval time, for example, 720 voltage values are acquired when the resolution of the angle is 0.5 °.
And B4, respectively calculating the rotating angles of the first steering engine corresponding to the voltage values to obtain a plurality of fourth rotating angles.
And respectively carrying out arctangent calculation on each voltage value to obtain an angle corresponding to the voltage value, namely the fourth rotation angle.
B5, determining each theoretical angle according to the resolution of the angle.
For example, assuming that the number of fourth rotation angles is 720, the respective theoretical angles are 0 °, 0.5 °,1 °, … °, 359.5 °,360 °, respectively.
Since the number of the theoretical angles is the same as the number of the fourth rotation angles, it is ensured that each theoretical angle corresponds to one fourth rotation angle.
And B6, calculating an error value corresponding to the theoretical angle according to the theoretical angle and the fourth rotation angle corresponding to the theoretical angle.
Specifically, a fourth rotation angle corresponding to each theoretical angle is determined, and the difference between the theoretical angle and the fourth rotation angle is calculated to obtain an error value corresponding to the theoretical angle.
And B7, generating the second compensation table according to a plurality of error values and a plurality of theoretical angles corresponding to the error values.
Because the voltage value used for calculating the fourth rotation angle is obtained according to the angular speed of the first steering engine and the interval time determined by the resolution of the preset angle, and each theoretical angle is determined according to the resolution of the angle, the number of the theoretical angles can be ensured to be the same as that of the fourth rotation angles, namely, each theoretical angle can be ensured to correspond to one fourth rotation angle, and therefore, the second compensation table corresponding to the resolution of the preset angle can be ensured to be obtained.
In some embodiments, considering that there may not be a theoretical angle identical to the target angle in the error table, in order to determine an error value corresponding to each target angle, S22 includes:
And C1, determining an error value corresponding to the existing theoretical angle as an error value corresponding to the target angle of the first steering engine when the theoretical angle which is identical to the target angle of the first steering engine exists in the preset error table.
And C2, under the condition that the theoretical angle which is identical to the target angle of the first steering engine does not exist in the preset error table, respectively calculating absolute values of differences between the target angle and all the theoretical angles in the error table, and determining an error value corresponding to the theoretical angle corresponding to the minimum absolute value, wherein the determined error value is used as the error value corresponding to the target angle of the first steering engine.
Specifically, when it is determined that the theoretical angle identical to the target angle does not exist in the error table (for example, when the target angle is an angle arbitrarily specified by the user, the target angle may not be equal to each theoretical angle in the pre-stored error table), absolute values of differences between the target angle and each theoretical angle in the error table are calculated, the minimum absolute value is counted, the theoretical angle corresponding to the minimum absolute value is determined, the error value corresponding to the determined theoretical angle is searched in the error table, and the searched error value is used as the error value of the target angle.
In the embodiment of the application, because the error value corresponding to the target angle can be determined when the error table has the theoretical angle which is completely the same as the target angle, the corresponding angle calibration can be carried out on each target angle, thereby ensuring the accuracy of the rotation position of the subsequent steering engine.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Corresponding to the method for calibrating the position of the steering engine described in the above embodiments, fig. 3 shows a block diagram of a device for calibrating the position of the steering engine according to an embodiment of the present application, and for convenience of explanation, only the parts related to the embodiment of the present application are shown.
Referring to fig. 3, the position calibration device 3 of the steering engine can be applied to a rotatable device, such as a robot, and the position calibration device 3 of the steering engine includes: a target angle acquisition module 31, an error value determination module 32, an actual angle calculation module 33, and a rotation control module 34. Wherein:
The target angle obtaining module 31 is configured to obtain a target angle of the first steering engine, where the target angle is an angle that the first steering engine theoretically will reach.
The error value determining module 32 is configured to determine an error value corresponding to the target angle of the first steering engine according to a preset error table, where the preset error table is used to record mapping relationships between different theoretical angles and error values, and the error value is used to represent a difference between a theoretical angle reached by theoretical rotation of the first steering engine and an actual angle reached by actual rotation.
And an actual angle calculation module 33, configured to calculate an actual angle corresponding to the target angle according to the target angle and the error value.
And the rotation control module 34 is used for controlling the first steering engine to rotate according to the actual angle.
In the embodiment of the application, after the target angle of the first steering engine is obtained, the error value corresponding to the target angle of the first steering engine is determined according to the preset error table, and then the actual angle corresponding to the target angle is calculated according to the target angle and the error value. And after the position calibration is carried out on each steering engine in the same batch, the actual arriving positions of the steering engines can be met when the steering engines execute the same task, and the inconsistent phenomenon of the steering engines in batch production is reduced.
In some embodiments, the position calibration device 3 for a steering engine provided in the embodiments of the present application further includes:
The voltage value acquisition module is used for acquiring the voltage value acquired by the linear Hall sensor of the first steering engine in the process that the first steering engine rotates at a closed loop constant speed before determining the error value corresponding to the target angle of the first steering engine according to the preset error table.
And the first rotation angle calculation module is used for calculating the rotation angle of the first steering engine according to the voltage value to obtain a first rotation angle.
And the error value calculation module is used for calculating an error value corresponding to the theoretical angle according to the first rotation angle and the theoretical angle at the same moment.
And the error table generation module is used for generating the error table according to a plurality of error values and a plurality of theoretical angles corresponding to the error values.
In some embodiments, the error value calculating module includes:
The second rotation angle determining unit is configured to calculate a rotation angle after the first rotation angle is compensated according to a preset first compensation table and the first rotation angle, so as to obtain a second rotation angle, where the preset first compensation table is an error table corresponding to a second steering engine, and the second steering engine is a steering engine with the same model as the first steering engine.
And the error value calculation unit is used for calculating the error value corresponding to the theoretical angle according to the second rotation angle and the theoretical angle at the same moment.
In some embodiments, the error value calculating module includes:
The third rotation angle determining unit is configured to calculate a rotation angle after the first rotation angle is compensated according to a preset second compensation table and the first rotation angle, so as to obtain a third rotation angle, where the preset second compensation table is: and an error table determined according to the theoretical angle and the angle of rotation of the first steering engine detected in the process of carrying out open loop rotation of the first steering engine.
And the error value calculation unit is used for calculating the error value corresponding to the theoretical angle according to the third rotation angle and the theoretical angle at the same moment.
In some embodiments, the position calibration device 3 provided in the embodiments of the present application further includes:
The angular velocity determining module of the first steering engine is configured to determine an angular velocity of the first steering engine before calculating the compensated rotation angle according to the preset second compensation table and the first rotation angle.
And the interval time determining module is used for determining interval time according to the angular speed and the preset angular resolution.
And the interval voltage value acquisition module is used for acquiring the voltage value acquired by the linear Hall sensor of the first steering engine according to the interval time.
And the fourth rotation angle calculation module is used for calculating the rotation angle of the first steering engine corresponding to each voltage value respectively to obtain a plurality of fourth rotation angles.
And the theoretical angle value calculation module is used for determining each theoretical angle according to the resolution of the angle.
And the error value calculation module is used for calculating the error value corresponding to the theoretical angle according to the theoretical angle and the fourth rotation angle corresponding to the theoretical angle for each theoretical angle.
And the second compensation table generation module is used for generating the second compensation table according to a plurality of error values and a plurality of theoretical angles corresponding to the error values.
In some embodiments, the angular velocity determining module of the first steering engine is specifically configured to:
and determining the angular speed of the first steering engine through a velocimeter.
Or alternatively
And calculating the average value of the angular speeds of the steering gears in the same batch of the first steering gears, wherein the average value is used as the angular speed of the first steering gears.
In some embodiments, the error value determining module 32 is specifically configured to:
And under the condition that the preset error table has the theoretical angle which is completely the same as the target angle of the first steering engine, determining the error value corresponding to the existing theoretical angle as the error value corresponding to the target angle of the first steering engine.
And under the condition that the preset error table does not have the theoretical angle which is identical to the target angle of the first steering engine, respectively calculating absolute values of differences between the target angle and each theoretical angle in the error table, and determining an error value corresponding to the theoretical angle corresponding to the minimum absolute value, wherein the determined error value is used as the error value corresponding to the target angle of the first steering engine.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
Fig. 4 is a schematic structural diagram of a rotatable device according to an embodiment of the present application. As shown in fig. 4, the rotatable device 4 of this embodiment includes: at least one processor 40 (only one processor is shown in fig. 4), a memory 41 and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, the processor 40 implementing the steps in any of the various method embodiments described above when executing the computer program 42.
The rotatable device 4 may be a humanoid robot, a robotic arm or the like having joints. The rotatable device may include, but is not limited to, a processor 40, a memory 41. It will be appreciated by those skilled in the art that fig. 4 is merely an example of the rotatable device 4 and is not limiting of the rotatable device 4, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor 40 may be a central processing unit (Central Processing Unit, CPU), the processor 40 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-programmable gate array (field-programmable GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may in some embodiments be an internal storage unit of the rotatable device 4, such as a hard disk or a memory of the rotatable device 4. The memory 41 may in other embodiments also be an external storage device of the rotatable device 4, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the rotatable device 4. Further, the memory 41 may also comprise both an internal memory unit and an external memory device of the rotatable device 4. The memory 41 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory 41 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a network device, which comprises: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, which when executed by the processor performs the steps of any of the various method embodiments described above.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, performs the steps of the respective method embodiments described above.
Embodiments of the present application provide a computer program product enabling a rotatable device to carry out the steps of the method embodiments described above when the computer program product is run on the rotatable device.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a camera device/rotatable apparatus, recording medium, computer memory, read-only memory (ROM), random access memory (RAM, random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. The method for calibrating the position of the steering engine is characterized by comprising the following steps of:
Acquiring a target angle of a first steering engine, wherein the target angle is an angle which the first steering engine theoretically will reach;
determining an error value corresponding to a target angle of the first steering engine according to a preset error table, wherein the preset error table is used for recording mapping relations between different theoretical angles and error values, and the error value is used for representing the difference between the theoretical angle reached by theoretical rotation of the first steering engine and the actual angle reached by actual rotation;
calculating an actual angle corresponding to the target angle according to the target angle and the error value;
and controlling the first steering engine to rotate according to the actual angle.
2. The method for calibrating the position of the steering engine according to claim 1, further comprising, before the determining, according to a preset error table, an error value corresponding to the target angle of the first steering engine:
Acquiring a voltage value acquired by a linear Hall sensor of the first steering engine in the process of rotating the first steering engine at a closed loop constant speed;
Calculating the rotating angle of the first steering engine according to the voltage value to obtain a first rotating angle;
according to the first rotation angle and the theoretical angle at the same moment, calculating an error value corresponding to the theoretical angle;
and generating the error table according to a plurality of error values and a plurality of theoretical angles corresponding to the error values.
3. The method for calibrating the position of the steering engine according to claim 2, wherein calculating the error value corresponding to the theoretical angle according to the first rotation angle and the theoretical angle at the same time comprises:
calculating the rotation angle after the first rotation angle compensation according to a preset first compensation table and the first rotation angle to obtain a second rotation angle, wherein the preset first compensation table is an error table corresponding to a second steering engine, and the second steering engine is the steering engine with the same model as the first steering engine;
And calculating an error value corresponding to the theoretical angle according to the second rotation angle and the theoretical angle at the same moment.
4. The method for calibrating the position of the steering engine according to claim 2, wherein calculating the error value corresponding to the theoretical angle according to the first rotation angle and the theoretical angle at the same time comprises:
According to a preset second compensation table and the first rotation angle, calculating the rotation angle after the first rotation angle compensation to obtain a third rotation angle, wherein the preset second compensation table is as follows: an error table determined according to the theoretical angle and the angle of rotation of the first steering engine detected in the process of performing open-loop rotation of the first steering engine;
and calculating an error value corresponding to the theoretical angle according to the third rotation angle and the theoretical angle at the same moment.
5. The method for calibrating the position of a steering engine according to claim 4, further comprising, before calculating the first rotation angle compensated according to a preset second compensation table and the first rotation angle:
Determining the angular speed of the first steering engine;
determining interval time according to the angular speed and the resolution of a preset angle;
Acquiring a voltage value acquired by a linear Hall sensor of the first steering engine according to the interval time;
respectively calculating the rotating angles of the first steering engine corresponding to each voltage value to obtain a plurality of fourth rotating angles;
determining each of the theoretical angles according to the resolution of the angle;
For each theoretical angle, calculating an error value corresponding to the theoretical angle according to the theoretical angle and the fourth rotation angle corresponding to the theoretical angle;
and generating the second compensation table according to a plurality of error values and a plurality of theoretical angles corresponding to the error values.
6. The method of calibrating the position of the steering engine of claim 5, wherein the determining the angular velocity of the first steering engine comprises:
determining the angular speed of the first steering engine through a velocimeter;
Or alternatively
And calculating the average value of the angular speeds of the steering gears in the same batch of the first steering gears, wherein the average value is used as the angular speed of the first steering gears.
7. The method for calibrating the position of the steering engine according to any one of claims 1 to 6, wherein determining an error value corresponding to the target angle of the first steering engine according to a preset error table includes:
under the condition that a theoretical angle which is identical to the target angle of the first steering engine exists in the preset error table, determining an error value corresponding to the existing theoretical angle as an error value corresponding to the target angle of the first steering engine;
and under the condition that the preset error table does not have the theoretical angle which is identical to the target angle of the first steering engine, respectively calculating absolute values of differences between the target angle and all the theoretical angles in the error table, and determining an error value corresponding to the theoretical angle corresponding to the minimum absolute value, wherein the determined error value is used as the error value corresponding to the target angle of the first steering engine.
8. A position calibration device for a steering engine, comprising:
The target angle acquisition module is used for acquiring a target angle of the first steering engine, wherein the target angle is an angle which the first steering engine theoretically will reach;
The error value determining module is used for determining an error value corresponding to the target angle of the first steering engine according to a preset error table, wherein the preset error table is used for recording mapping relations between different theoretical angles and error values, and the error value is used for representing the difference between the theoretical angle reached by theoretical rotation of the first steering engine and the actual angle reached by actual rotation;
the actual angle calculation module is used for calculating an actual angle corresponding to the target angle according to the target angle and the error value;
And the rotation control module is used for controlling the first steering engine to rotate according to the actual angle.
9. A rotatable device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 7.
CN202311851623.5A 2023-12-28 2023-12-28 Steering engine position calibration method and device and rotatable equipment Pending CN117885136A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311851623.5A CN117885136A (en) 2023-12-28 2023-12-28 Steering engine position calibration method and device and rotatable equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311851623.5A CN117885136A (en) 2023-12-28 2023-12-28 Steering engine position calibration method and device and rotatable equipment

Publications (1)

Publication Number Publication Date
CN117885136A true CN117885136A (en) 2024-04-16

Family

ID=90650108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311851623.5A Pending CN117885136A (en) 2023-12-28 2023-12-28 Steering engine position calibration method and device and rotatable equipment

Country Status (1)

Country Link
CN (1) CN117885136A (en)

Similar Documents

Publication Publication Date Title
CN110793430B (en) Absolute electrical angle detection method, system and computer readable storage medium
EP1341311B1 (en) Signal processing apparatus for encoder
EP0874223A1 (en) Interpolation circuit of encoder
CN109959400B (en) Method and device for calculating absolute encoder parameters and terminal equipment
CN110405749B (en) Joint limit detection method and device, robot and computer readable storage medium
CN109696187B (en) Eccentric correcting device of rotary encoder
JP6352540B2 (en) Detection device, rotation angle detection device, detection method, and program
CN116182924A (en) Phase compensation method, device and magnetic encoder
WO2024113450A1 (en) Magnetic encoder correction method and apparatus, and magnetic encoder
CN111380499B (en) Method and device for detecting rotation angle
CN109696120B (en) Steering engine, angle detection method and device thereof, and computer readable storage medium
EP2669701B1 (en) Calibration to improve weather radar positioning determination
JP4515120B2 (en) Resolver digital angle conversion apparatus and method, and program
Dalboni et al. Absolute two-tracked optical rotary encoders based on vernier method
CN111800040B (en) Stepping motor, resetting method and device thereof and computer readable storage medium
JP6947524B2 (en) Equipment and methods for measuring angles
CN117885136A (en) Steering engine position calibration method and device and rotatable equipment
US8289013B2 (en) Speed detector and servomotor
CN111089610B (en) Signal processing method and device of encoder and related components
CN109015646B (en) Position information self-calibration method, device, equipment and storage medium
JPH0496130A (en) Signal calibrating device
CN111628682B (en) Stepping motor synchronous driving method, stepping motor synchronous driving device, terminal and storage medium
CN112104292B (en) Motor control method, device, terminal equipment and storage medium
CN210863035U (en) Eccentric correcting device of double-feedback rotary encoder
CN117754576A (en) Steering engine position determining method and device and rotatable equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination