CN116007667A - Encoder data correction method - Google Patents
Encoder data correction method Download PDFInfo
- Publication number
- CN116007667A CN116007667A CN202211658386.6A CN202211658386A CN116007667A CN 116007667 A CN116007667 A CN 116007667A CN 202211658386 A CN202211658386 A CN 202211658386A CN 116007667 A CN116007667 A CN 116007667A
- Authority
- CN
- China
- Prior art keywords
- data
- gear
- encoder
- circuits
- groups
- 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
Links
Images
Abstract
An encoder data correction method, characterized in that: on a mechanical gear encoder, two groups of independent detection circuits are adopted, the two groups of circuits exchange data through a serial interface, each group of circuits transmits the position data and the time stamp of the encoder to the other group of circuits, and each group of circuits judges the correctness of the data according to the following method; reading the position data of the main gear and the position data of the first slave gear of the first path detection circuit, judging that the data of the detection circuit is wrong if the deviation of the two groups of data is larger than a threshold value, and otherwise, taking the data as the position data output by the first path detection circuit; and if the difference value of the position data output by the two groups of detection circuits is within the threshold range, judging that the encoder data are correct. Compared with the prior art, the invention has the advantages that: two groups of independent detection circuits are adopted, each data is checked through comparison, error data transmission is avoided, and the safety of the interfaces is improved by adopting independent external interfaces.
Description
Technical Field
The invention relates to the field of absolute value encoders, in particular to an encoder data correction method.
Background
Currently, encoders can be divided into single-turn encoders and multi-turn encoders according to their functions. The single-turn encoder can only carry out absolute value encoding on the rotation angle, and the multi-turn encoder realizes the measurement of the number of rotation turns on the basis of keeping the angle measuring function of the single-turn encoder. The single-turn encoder can be classified into photoelectric type, magnetic type, inductive type, etc. according to its detection principle. The implementation of the multi-turn encoder has three forms, battery-held multi-turn, wiegand multi-turn, and gear multi-turn. Encoders of different principles have large differences in circuit topology, but all use a single processor to perform absolute value encoding of data and use a field bus to transmit the detected data. Such a circuit configuration would cause the encoder to lose its full function when detecting a circuit error or detecting a data error, thereby causing the encoder to fail.
Disclosure of Invention
The invention aims at solving the problems of the encoder scheme, adopts two redundant completely independent circuits through innovative circuit design and algorithm, and transmits detection information acquired by each circuit to the other processor through a processor on the respective circuit in the form of bus communication. Each processor detects own, opposite side and past data, judges whether the data detected by the processor work normally, corrects error data and performs data interaction through two processes.
The gear type magnetic multi-turn encoder is adopted, the absolute angle of each gear is detected through two independent detection circuits, two independent single multi-turn data are formed by utilizing the principle of gear transformation ratio, and the self, opposite side and past data are detected through interaction among processors to form reliable position data, so that the condition that the encoder is completely invalid due to any group of circuit errors and data errors is avoided.
The invention provides a data correction method of an encoder, which is characterized by comprising the following steps of: on a mechanical gear encoder, two groups of independent detection circuits are adopted, the two groups of circuits exchange data through a serial interface, each group of circuits transmits the position data and the time stamp of the encoder to the other group of circuits, and each group of circuits judges the correctness of the data according to the following method;
reading the position data of the main gear and the position data of the first slave gear of the first path detection circuit, judging that the data of the detection circuit is wrong if the deviation of the two groups of data is larger than a threshold value, and otherwise, taking the data as the position data output by the first path detection circuit;
the difference value of the position data output by the two groups of detection circuits is within a threshold range, and the encoder data is judged to be correct;
storing the value and time stamp of the correct encoder data;
calculating and storing the instantaneous speed obtained by the correct data;
adjusting a position threshold range and a speed threshold range according to the instantaneous speed;
calculating the instantaneous speed of each position data and the latest correct position data when the difference value of the two groups of data is larger than a threshold range;
calculating the difference value between the two groups of instantaneous speeds and the latest correct instantaneous speed, and judging that the difference value is small and the data in the speed threshold range is correct;
each set of circuits independently uses an external interface to send the correct data over the interface.
The mechanical gear encoder comprises: the main body is provided with a main shaft hole, and two bearing chambers are used for accommodating bearings; the gear frame is provided with a plurality of holes for fixing the gear shaft; the main shaft penetrates through the main shaft hole and is fixed on the main body through a bearing to form a main body shafting; the main gear is sleeved at one end of the main shaft and is provided with a first magnet installation position; a main gear magnet fixed at the first magnet mounting position; a plurality of gear shafts, wherein the gear shafts are arranged on the gear frame; the gears are correspondingly sleeved on the gear shafts; the gear shaft is provided with a magnet installation position, and all gears are sequentially meshed and matched; the slave gear magnet is arranged at the magnet installation position of the slave gear, and a magnetic absolute value sensor is arranged right above the rotation center of the magnet.
The magnetic absolute value sensor is provided with two independent detection circuits, and the two independent detection circuits belong to the detection circuits respectively; the detection circuit is composed of a master magnetic absolute value sensor and 3 slave magnetic absolute value sensors.
The two detection circuits are respectively connected with the two processing devices, and a communication interface between the detection circuits and the processing devices is an SPI interface; the two detection circuits are respectively connected with the two processing devices, and a communication interface between the detection circuits and the processing devices is an SPI interface; the circuit board that adopts includes: the voltage conversion unit is used for converting the power supply voltage of an external power supply into the working voltage required by the internal chip of the circuit board; the device comprises a main gear detection unit, three slave gear detection units, two processing device units and two external interface units, wherein the main gear detection unit is used for detecting the rotation angle of a main gear, and the three slave gear detection units are used for detecting the angles of three slave gears.
The processing device comprises a processing device and a serial interface, wherein a communication interface is arranged between the processing device and one group of processing devices. Signal wires are arranged between the processing devices, and the signal wires are two unidirectional signal wires.
The processing devices are provided with independent external interfaces.
The two groups of detection circuits, the processing device and the external interface are respectively provided with a group of independent voltage conversion units for supplying power.
Wherein the two processing devices are internally provided with a storage device.
Compared with the prior art, the invention has the advantages that:
the encoder data correction method adopts two groups of independent detection circuits, and each data is subjected to comparison and verification. Erroneous data is avoided from being transmitted. And the independent external interfaces are adopted, so that the safety of the interfaces is improved.
Drawings
The invention will be described in further detail with reference to the accompanying drawings and embodiments:
FIG. 1 is a flow chart of a method of encoder data correction.
Detailed Description
The invention will be further explained below with reference to specific embodiments.
The invention provides a data correction method of an encoder, which is characterized by comprising the following steps of: on a mechanical gear encoder, two groups of independent detection circuits are adopted, the two groups of circuits exchange data through a serial interface, each group of circuits transmits the position data and the time stamp of the encoder to the other group of circuits, and each group of circuits judges the correctness of the data according to the following method;
and reading the position data of the master gear and the position data of the first slave gear of the first path detection circuit, judging that the data of the detection circuit is wrong if the deviation of the two groups of data is larger than a threshold value, and otherwise, taking the data as the position data output by the first path detection circuit.
And if the difference value of the position data output by the two groups of detection circuits is within the threshold range, judging that the encoder data are correct.
The correct encoder data values and time stamps are stored.
The instantaneous speed of the correct data is calculated and stored.
The position threshold range and the speed threshold range are adjusted based on the instantaneous speed.
When the difference value of the two sets of data is larger than the threshold value range, calculating the instantaneous speed of the respective position data and the latest correct position data.
Calculating the difference value between the two groups of instantaneous speeds and the latest correct instantaneous speed, and judging that the difference value is small and the data in the speed threshold range is correct;
each set of circuits independently uses an external interface to send the correct data over the interface.
The mechanical gear encoder comprises: the main body is provided with a main shaft hole, and two bearing chambers are used for accommodating bearings; the gear frame is provided with a plurality of holes for fixing the gear shaft; the main shaft penetrates through the main shaft hole and is fixed on the main body through a bearing to form a main body shafting; the main gear is sleeved at one end of the main shaft and is provided with a first magnet installation position; a main gear magnet fixed at the first magnet mounting position; a plurality of gear shafts, wherein the gear shafts are arranged on the gear frame; the gears are correspondingly sleeved on the gear shafts; the gear shaft is provided with a magnet installation position, and all gears are sequentially meshed and matched; the slave gear magnet is arranged at the magnet installation position of the slave gear, and a magnetic absolute value sensor is arranged right above the rotation center of the magnet.
The magnetic absolute value sensor is provided with two independent detection circuits, and the two independent detection circuits belong to the detection circuits respectively; the detection circuit is composed of a master magnetic absolute value sensor and 3 slave magnetic absolute value sensors.
The two detection circuits are respectively connected with the two processing devices, and a communication interface between the detection circuits and the processing devices is an SPI interface; the two detection circuits are respectively connected with the two processing devices, and a communication interface between the detection circuits and the processing devices is an SPI interface; the circuit board that adopts includes: the voltage conversion unit is used for converting the power supply voltage of an external power supply into the working voltage required by the internal chip of the circuit board; the device comprises a main gear detection unit, three slave gear detection units, two processing device units and two external interface units, wherein the main gear detection unit is used for detecting the rotation angle of a main gear, and the three slave gear detection units are used for detecting the angles of three slave gears.
The processing device comprises a processing device and a serial interface, wherein a communication interface is arranged between the processing device and one group of processing devices. Signal wires are arranged between the processing devices, and the signal wires are two unidirectional signal wires.
The processing devices are provided with independent external interfaces.
The two groups of detection circuits, the processing device and the external interface are respectively provided with a group of independent voltage conversion units for supplying power.
Wherein the two processing devices are internally provided with a storage device.
The invention is not a matter of the known technology.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (8)
1. An encoder data correction method, characterized in that: on a mechanical gear encoder, two groups of independent detection circuits are adopted, the two groups of circuits exchange data through a serial interface, each group of circuits transmits the position data and the time stamp of the encoder to the other group of circuits, and each group of circuits judges the correctness of the data according to the following method;
reading the position data of the main gear and the position data of the first slave gear of the first path detection circuit, judging that the data of the detection circuit is wrong if the deviation of the two groups of data is larger than a threshold value, and otherwise, taking the data as the position data output by the first path detection circuit;
the difference value of the position data output by the two groups of detection circuits is within a threshold range, and the encoder data is judged to be correct;
storing the value and time stamp of the correct encoder data;
calculating and storing the instantaneous speed obtained by the correct data;
adjusting a position threshold range and a speed threshold range according to the instantaneous speed;
calculating the instantaneous speed of each position data and the latest correct position data when the difference value of the two groups of data is larger than a threshold range;
calculating the difference value between the two groups of instantaneous speeds and the latest correct instantaneous speed, and judging that the difference value is small and the data in the speed threshold range is correct;
each set of circuits independently uses an external interface to send the correct data over the interface.
2. The encoder data correction method according to claim 1, characterized in that: the mechanical gear encoder comprises: the main body is provided with a main shaft hole, and two bearing chambers are used for accommodating bearings; the gear frame is provided with a plurality of holes for fixing the gear shaft; the main shaft penetrates through the main shaft hole and is fixed on the main body through a bearing to form a main body shafting; the main gear is sleeved at one end of the main shaft and is provided with a first magnet installation position; a main gear magnet fixed at the first magnet mounting position; a plurality of gear shafts, wherein the gear shafts are arranged on the gear frame; the gears are correspondingly sleeved on the gear shafts; the gear shaft is provided with a magnet installation position, and all gears are sequentially meshed and matched; the slave gear magnet is arranged at the magnet installation position of the slave gear, and a magnetic absolute value sensor is arranged right above the rotation center of the magnet.
3. The encoder data correction method according to claim 2, characterized in that: the magnetic absolute value sensor is provided with two independent detection circuits, and the two independent detection circuits belong to the detection circuits respectively; the detection circuit is composed of a master magnetic absolute value sensor and 3 slave magnetic absolute value sensors.
4. A method of encoder data correction according to claim 3, characterized in that:
the two detection circuits are respectively connected with the two processing devices, and a communication interface between the detection circuits and the processing devices is an SPI interface; the circuit board that adopts includes: the voltage conversion unit is used for converting the power supply voltage of an external power supply into the working voltage required by the internal chip of the circuit board; the device comprises a main gear detection unit, three slave gear detection units, two processing device units and two external interface units, wherein the main gear detection unit is used for detecting the rotation angle of a main gear, and the three slave gear detection units are used for detecting the angles of three slave gears.
5. The encoder data correction method according to claim 4, wherein:
a communication interface is arranged between the two processing devices, and the communication interface is a serial interface; signal wires are arranged between the processing devices, and the signal wires are two unidirectional signal wires.
6. The encoder data correction method according to claim 4, wherein: the processing devices are provided with independent external interfaces.
7. The encoder data correction method according to claim 4, wherein: the two groups of detection circuits, the processing device and the external interface are respectively provided with a group of independent voltage conversion units for supplying power.
8. The encoder data correction method according to claim 4, wherein: wherein the two processing devices are internally provided with a storage device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211658386.6A CN116007667A (en) | 2022-12-22 | 2022-12-22 | Encoder data correction method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211658386.6A CN116007667A (en) | 2022-12-22 | 2022-12-22 | Encoder data correction method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116007667A true CN116007667A (en) | 2023-04-25 |
Family
ID=86018631
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211658386.6A Pending CN116007667A (en) | 2022-12-22 | 2022-12-22 | Encoder data correction method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116007667A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116892970A (en) * | 2023-09-11 | 2023-10-17 | 泉州昆泰芯微电子科技有限公司 | Method for judging stability of magnetic encoder based on timestamp register and motor |
-
2022
- 2022-12-22 CN CN202211658386.6A patent/CN116007667A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116892970A (en) * | 2023-09-11 | 2023-10-17 | 泉州昆泰芯微电子科技有限公司 | Method for judging stability of magnetic encoder based on timestamp register and motor |
CN116892970B (en) * | 2023-09-11 | 2023-11-14 | 泉州昆泰芯微电子科技有限公司 | Method for judging stability of magnetic encoder based on timestamp register and motor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU763795B2 (en) | Device and method for detecting the relative position of a rotatable body | |
US8924083B2 (en) | Power steering apparatus, and controller for power steering apparatus | |
US9020774B2 (en) | Encoder system, signal processing method, and transmission signal generation and output device | |
CN116007667A (en) | Encoder data correction method | |
US20110153277A1 (en) | Sensor | |
CN111398628B (en) | Motor rotating speed direction measuring device and measuring calculation method thereof | |
ITRM20080138A1 (en) | ABSOLUTE CODE DETECTION DEVICE FOR ABSOLUTE CODING OF THE ROTATING TYPE. | |
CN111693073B (en) | Bidirectional redundant magnetoelectric encoder and redundancy detection method thereof | |
US9878736B2 (en) | Communication system | |
CN110307860B (en) | Differential Hall multi-ring position absolute position sensor and detection method thereof | |
CN100390505C (en) | Absolute multi-coil magnetic encoder | |
US9310227B2 (en) | Multi-channel rotary encoder | |
CN111446821B (en) | Magnetic coding multi-Hall redundancy device | |
JP2022068860A (en) | Position sensor system | |
CN112936246B (en) | Motor deceleration system and robot | |
CN200941053Y (en) | Device for converting mechanical reads of meter into digital electrical signals | |
JP2017102019A (en) | Torque sensor unit | |
CN200944052Y (en) | Device for transforming the mechanical reading of instrument to digital electric signal | |
CN110906959B (en) | Implementation method of magnetoelectric absolute encoder with one-main-gear-multi-auxiliary-gear structure | |
CN210014751U (en) | Measuring device for detecting rotation angle of shaft | |
CN202837318U (en) | Engine rotating speed measuring device based on magnetic encoder | |
CN209562325U (en) | A kind of helm gear | |
CN115248055A (en) | Steering wheel steering angle measuring method based on double encoders | |
CN104482946B (en) | A kind of sensor acquisition processing method | |
CN107389104B (en) | Multi-ring magnetic absolute angle sensor |
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 |