Method, apparatus, and processor for correcting incremental encoder positioning

By calculating the remainder of the AB phase pulse signals of the incremental encoder and applying a target preset correction strategy, the number of corrected pulses is determined to determine the actual positioning position, thus solving the problem of inaccurate positioning of the incremental encoder and achieving precise positioning.

CN117213541BActive Publication Date: 2026-06-23HUNAN ZOOMLION CONSTR HOISTING MASCH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN ZOOMLION CONSTR HOISTING MASCH CO LTD
Filing Date
2023-07-25
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

The AB phase pulse signals of incremental encoders are easily lost, which leads to inaccurate pulse counting and consequently, inaccurate positioning.

Method used

By acquiring the actual change in the number of AB phase pulse signals compared to the previous Z-phase pulse signal triggering time and the current number of AB phase pulse signals when the current Z-phase pulse signal triggers, the residual quantity is calculated. Based on the target preset residual quantity range and the corresponding correction strategy, the pulse quantity is corrected to determine the actual positioning position of the incremental encoder.

Benefits of technology

The positioning accuracy of the incremental encoder has been improved, achieving precise positioning and solving the problem of inaccurate positioning caused by inaccurate counting of AB phase pulse signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117213541B_ABST
    Figure CN117213541B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a kind of method, device and processor for correcting incremental encoder positioning, belong to measurement field.The method comprises: obtaining the actual quantity variation of AB phase pulse signal when compared with the last Z phase pulse signal trigger time when current Z phase pulse signal trigger time and the current pulse quantity of AB phase pulse signal when current Z phase pulse signal trigger time;According to actual quantity variation and preset quantity variation, determine the residual quantity, wherein the residual quantity is the remainder obtained after actual quantity variation is divided by preset quantity variation;According to the target preset residual quantity interval where residual quantity is located and the target preset correction strategy corresponding to target preset residual quantity interval, the current pulse quantity is corrected to obtain current actual pulse quantity;According to current actual pulse quantity, determine the actual positioning position of incremental encoder when current Z phase pulse signal trigger time.The embodiment of the present application can improve the positioning accuracy of incremental encoder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of measurement, and more specifically to a method, apparatus, and processor for calibrating the positioning of an incremental encoder. Background Technology

[0002] Incremental encoders convert displacement into periodic electrical signals, then convert these signals into counting pulses, using the number of pulses to represent the magnitude of the displacement. However, in existing technologies, the AB phase pulse signals emitted by incremental encoders are easily lost, resulting in inaccurate pulse counting and positioning problems. Summary of the Invention

[0003] The purpose of this invention is to provide a method, apparatus, processor, and storage medium for correcting the positioning of an incremental encoder, so as to solve the problem of inaccurate positioning of incremental encoders in the prior art.

[0004] To achieve the above objectives, a first aspect of the present invention provides a method for correcting the positioning of an incremental encoder, comprising:

[0005] The change in the actual number of AB phase pulse signals when the current Z-phase pulse signal is triggered compared to the previous Z-phase pulse signal trigger, and the current number of AB phase pulse signals when the current Z-phase pulse signal is triggered, wherein the AB phase pulse signals and the Z-phase pulse signals are pulse signals emitted by the incremental encoder;

[0006] The remainder is determined based on the actual change in quantity and the preset change in quantity, where the remainder is the remainder obtained by dividing the actual change in quantity by the preset change in quantity.

[0007] Based on the target preset remainder interval where the remainder number is located and the target preset correction strategy corresponding to the target preset remainder interval, the current pulse number is corrected to obtain the current actual pulse number.

[0008] The actual positioning position of the incremental encoder when the current Z-phase pulse signal is triggered is determined based on the current actual number of pulses.

[0009] In this embodiment of the invention, the current pulse count is corrected according to the target preset remainder count interval and the target preset correction strategy corresponding to the target preset remainder count interval to obtain the current actual pulse count. This includes: when the target preset remainder count interval is 0 to a first preset threshold, determining the current actual pulse count as the difference between the current pulse count and the remainder count, wherein the first preset threshold is less than or equal to half of the preset count change; when the target preset remainder count interval is a second preset threshold to a preset count change, determining the current actual pulse count as the value obtained by subtracting the remainder count from the sum of the current pulse count and the preset count change, wherein the second preset threshold is the difference between the preset count change and the first preset threshold.

[0010] In this embodiment of the invention, the method further includes: issuing an alarm message indicating an abnormal AB phase pulse signal when the remaining quantity is within a non-target preset remaining quantity range, wherein the lower limit threshold of the non-target preset remaining quantity range is a first preset threshold, and the upper limit threshold of the non-target preset remaining quantity range is a second preset threshold.

[0011] In this embodiment of the invention, the method further includes: issuing an alarm message indicating an abnormal Z-phase pulse signal when the actual quantity change is greater than a third preset threshold, wherein the third preset threshold is greater than a preset multiple of the preset quantity change.

[0012] In this embodiment of the invention, the method further includes: upon power-on, obtaining the previously stored positioning position of the incremental encoder before the last power failure; and using the previous positioning position as the initial positioning position of the incremental encoder.

[0013] In this embodiment of the invention, the method further includes: obtaining a first sample value of the AB phase pulse signal corresponding to a preset fixed position; and correcting the first sample value to the calibration sample value if the first sample value is not equal to the calibration sample value of the AB phase pulse signal corresponding to the preset fixed position.

[0014] In this embodiment of the invention, determining the actual positioning position of the incremental encoder when the current Z-phase pulse signal is triggered based on the current actual number of pulses includes: obtaining the actual positioning position based on the current actual number of pulses using a preset position algorithm.

[0015] A second aspect of the present invention provides a processor configured to perform the method for correcting the positioning of an incremental encoder as described above.

[0016] A third aspect of the present invention provides an apparatus for correcting the positioning of an incremental encoder, comprising:

[0017] The pulse quantity acquisition module is used to acquire the actual change in the number of AB phase pulse signals when the current Z phase pulse signal is triggered compared to the previous Z phase pulse signal trigger, and the current number of AB phase pulse signals when the current Z phase pulse signal is triggered. The AB phase pulse signals and Z phase pulse signals are pulse signals emitted by the incremental encoder.

[0018] The pulse quantity correction module is used to determine the remainder quantity based on the actual quantity change and the preset quantity change, where the remainder quantity is the remainder obtained by dividing the actual quantity change by the preset quantity change; and to correct the current pulse quantity based on the target preset remainder quantity interval and the target preset correction strategy corresponding to the target preset remainder quantity interval to obtain the current actual pulse quantity.

[0019] The position determination module is used to determine the actual positioning position of the incremental encoder when the current Z-phase pulse signal is triggered, based on the current actual number of pulses.

[0020] A fourth aspect of the present invention provides a machine-readable storage medium storing a program or instructions that, when executed by a processor, implement the method described above for correcting the positioning of an incremental encoder.

[0021] The above technical solution obtains the actual change in the number of AB phase pulse signals compared to the previous Z-phase pulse signal triggering time, and the current number of AB phase pulse signals at the current Z-phase pulse signal triggering time. It then determines the remainder based on the actual change in number and the preset change in number, where the remainder is the remainder obtained by dividing the actual change in number by the preset change in number. Subsequently, based on the target preset remainder interval where the remainder is located and the target preset correction strategy corresponding to the target preset remainder interval, the current number of pulses is corrected to obtain the current actual number of pulses. Thus, the actual positioning position of the incremental encoder at the current Z-phase pulse signal triggering time is determined based on the current actual number of pulses. The above technical solution combines the Z-phase pulse signal to correct the number of AB-phase pulse signals. By determining the remainder based on the actual change in the number of AB-phase pulse signals and the preset change in the number, and then selecting the corresponding target preset correction strategy based on the remainder, the number of AB-phase pulse signals can be corrected according to the target preset correction strategy. The actual positioning position of the incremental encoder can then be determined based on the corrected number of AB-phase pulse signals. This solves the problem of inaccurate positioning of incremental encoders caused by inaccurate counting of AB-phase pulse signals, improves the positioning accuracy of incremental encoders, and enables precise positioning through incremental encoders.

[0022] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0023] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:

[0024] Figure 1 The schematic diagram illustrates a flowchart of a method for correcting the positioning of an incremental encoder according to an embodiment of the present invention;

[0025] Figure 2 This schematically illustrates a flowchart of a method for correcting the positioning of an incremental encoder according to another embodiment of the present invention.

[0026] Figure 3 The diagram illustrates a structural schematic of a device for calibrating the positioning of an incremental encoder according to an embodiment of the present invention. Detailed Implementation

[0027] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.

[0028] It should be noted that if the embodiments of the present invention involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.

[0029] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0030] Figure 1 The illustration schematically shows a flowchart of a method for correcting the positioning of an incremental encoder according to an embodiment of the present invention. Figure 1 As shown in the embodiment of the present invention, a method for correcting the positioning of an incremental encoder is provided. Taking the application of this method to a processor as an example, the method may include the following steps:

[0031] Step S102: Obtain the actual change in the number of AB phase pulse signals when the current Z phase pulse signal is triggered compared to the previous Z phase pulse signal trigger, and the current number of AB phase pulse signals when the current Z phase pulse signal is triggered. Here, the AB phase pulse signals and the Z phase pulse signals are pulse signals emitted by the incremental encoder.

[0032] Step S104: Determine the remainder quantity based on the actual quantity change and the preset quantity change, where the remainder quantity is the remainder obtained by dividing the actual quantity change by the preset quantity change.

[0033] Step S106: Based on the target preset remainder interval where the remainder quantity is located and the target preset correction strategy corresponding to the target preset remainder interval, the current pulse quantity is corrected to obtain the current actual pulse quantity.

[0034] Step S108: Determine the actual positioning position of the incremental encoder when the current Z-phase pulse signal is triggered based on the current actual number of pulses.

[0035] It can be understood that AB phase pulse signals refer to the A-phase pulse signals and B-phase pulse signals output by the incremental encoder. The actual change in the quantity of AB phase pulse signals is the difference between the cumulative quantity of AB phase pulse signals when the current Z-phase pulse signal is triggered and the cumulative quantity of AB phase pulse signals when the previous Z-phase pulse signal was triggered. In other words, the cumulative quantity of AB phase pulse signals when the current Z-phase pulse signal is triggered is the quantity of AB phase pulse signals obtained by adding the cumulative quantity of AB phase pulse signals when the previous Z-phase pulse signal was triggered. The current pulse quantity of AB phase pulse signals is the cumulative quantity of AB phase pulse signals when the current Z-phase pulse signal is triggered. During the interval between the previous Z-phase pulse signal trigger and the current Z-phase pulse signal trigger, there are usually multiple AB phase pulse signal outputs periodically. The preset quantity change is the expected quantity of AB phase pulse signals appearing during the trigger interval of adjacent Z-phase pulse signals; that is, after the output of AB phase pulse signals with the preset quantity change, one Z pulse output is triggered. The preset quantity change is, for example, 1024. The target preset remainder range is the preset remainder range within which the remainder is located. There are multiple preset remainder ranges. The target preset correction strategy is the preset correction strategy corresponding to the target preset remainder range. The preset correction strategy is a preset correction strategy for the current pulse count of the AB phase pulse signal. There are multiple preset correction strategies, with different preset remainder ranges corresponding to different preset correction strategies. The current actual pulse count is the actual cumulative number of AB phase pulse signals when the current Z phase pulse signal is triggered after correction. The actual positioning position is the actual positioning position of the incremental encoder.

[0036] Specifically, the processor can obtain the actual change in the number of AB phase pulse signals compared to the previous Z-phase pulse signal triggering time, and the current number of AB phase pulse signals when the current Z-phase pulse signal triggers. Based on the actual change in number and the preset change in number, the processor determines the remainder, i.e., calculates the remainder obtained by dividing the actual change in number by the preset change in number, and then determines the target preset remainder interval. The processor then selects the target preset correction strategy corresponding to the target preset remainder interval and corrects the current number of AB phase pulse signals based on this strategy to obtain the current actual number of AB phase pulse signals. Thus, the processor can determine the actual positioning position of the incremental encoder when the current Z-phase pulse signal triggers based on the current actual number of AB phase pulse signals. For example, it can calculate the actual positioning position of the incremental encoder when the current Z-phase pulse signal triggers based on a pre-determined functional relationship between the number and position of AB phase pulse signals.

[0037] The above-described method for correcting the positioning of an incremental encoder obtains the actual change in the number of AB phase pulse signals compared to the previous Z-phase pulse signal triggering time, and the current number of AB phase pulse signals at the current Z-phase pulse signal triggering time. It then determines the remainder based on the actual change in number and the preset change in number, where the remainder is the remainder obtained by dividing the actual change in number by the preset change in number. Finally, based on the target preset remainder interval and the target preset correction strategy corresponding to the target preset remainder interval, the current number of pulses is corrected to obtain the current actual number of pulses. Based on the current actual number of pulses, the actual positioning position of the incremental encoder at the current Z-phase pulse signal triggering time is determined. The above technical solution combines the Z-phase pulse signal to correct the number of AB-phase pulse signals. By determining the remainder based on the actual change in the number of AB-phase pulse signals and the preset change in the number, and then selecting the corresponding target preset correction strategy based on the remainder, the number of AB-phase pulse signals can be corrected according to the target preset correction strategy. The actual positioning position of the incremental encoder can then be determined based on the corrected number of AB-phase pulse signals. This solves the problem of inaccurate positioning of incremental encoders caused by inaccurate counting of AB-phase pulse signals, improves the positioning accuracy of incremental encoders, and enables precise positioning through incremental encoders.

[0038] In one embodiment, the current pulse count is corrected according to the target preset remainder count interval and the target preset correction strategy corresponding to the target preset remainder count interval to obtain the current actual pulse count. This includes: when the target preset remainder count interval is 0 to a first preset threshold, determining the current actual pulse count as the difference between the current pulse count and the remainder count, wherein the first preset threshold is less than or equal to half of the preset count change; when the target preset remainder count interval is a second preset threshold to a preset count change, determining the current actual pulse count as the value obtained by subtracting the remainder count from the sum of the current pulse count and the preset count change, wherein the second preset threshold is the difference between the preset count change and the first preset threshold.

[0039] It can be understood that the first preset threshold is a pre-set threshold whose value is less than or equal to half of the preset quantity change. The second preset threshold is a pre-set threshold whose value is the difference between the preset quantity change and the first preset threshold; therefore, the value of the second preset threshold is greater than or equal to the value of the first preset threshold.

[0040] Specifically, when the target preset remainder range is 0 to the first preset threshold, the processor can determine the current actual pulse count as the difference between the current pulse count and the remainder count. For example, when the preset change in count N = 1024 and the actual change in count n = 1025, the remainder count m = 1025%1024 = 1, that is, the target preset remainder range of m is 0 to the first preset threshold (less than or equal to 512). At this time, the current actual pulse count CaliPos = the current pulse count NowPos - the remainder count m. When the target preset remainder quantity range is from the second preset threshold to the preset quantity change, the processor can determine that the current actual pulse quantity is the value obtained by subtracting the remainder quantity from the sum of the current pulse quantity and the preset quantity change. For example, when the preset quantity change N = 1024 and the actual quantity change n = 1023, the remainder quantity m = 1023%1024 = 1023. That is, the target preset remainder quantity range where m is located is from the second preset threshold (greater than or equal to 512 and less than 1024) to the preset quantity change. At this time, the current actual pulse quantity CaliPos = the current pulse quantity NowPos + the preset quantity change N - the remainder quantity m. In general, when the actual quantity change exceeds the preset quantity change by a certain appropriate range, the number of AB phase pulse signals exceeding the preset quantity change is removed from the current pulse number. When the actual quantity change is less than the preset quantity change by a certain appropriate range, the number of AB phase pulse signals that are insufficient is added to the current pulse number. That is, following the idea of ​​"removing the excess and supplementing the deficiency". Understandably, in actual situations, if there is interference, it is possible that the actual quantity change will exceed the preset quantity change. Usually, the actual quantity change will be less than the preset quantity change more often, that is, the AB phase pulse signals will be lost more often.

[0041] In this embodiment, different correction strategies are set for two cases: the actual quantity change is slightly more than the preset quantity change and the actual quantity change is slightly less than the preset quantity change, in order to correct the quantity of AB phase pulse signals and thus improve the positioning accuracy of the incremental encoder.

[0042] In one embodiment, the method further includes: issuing an alarm message indicating an abnormal AB phase pulse signal when the remaining quantity is within a non-target preset remaining quantity range, wherein the lower limit threshold of the non-target preset remaining quantity range is a first preset threshold, and the upper limit threshold of the non-target preset remaining quantity range is a second preset threshold.

[0043] It can be understood that the non-target preset remainder range is the range of values ​​outside the target preset remainder range, that is, the range of values ​​between the first preset threshold and the second preset threshold.

[0044] Specifically, when the remaining quantity is within a range other than the target preset remaining quantity range, that is, when the remaining quantity is within the range between the first preset threshold and the second preset threshold, the processor can issue an alarm message indicating an abnormal AB phase pulse signal. Understandably, this means that the actual quantity change is either too much or too little than the preset quantity change, indicating an abnormality in the AB phase pulse signal between the two Z phase pulse signals. Furthermore, the alarm message can be displayed in ways including, but not limited to, light, sound, and text alarms.

[0045] In this embodiment, an alarm is triggered for abnormal AB phase pulse signals, which can improve the safety of incremental encoders and extend their service life.

[0046] In one embodiment, the method for correcting the positioning of an incremental encoder further includes: issuing an alarm message for an abnormal Z-phase pulse signal when the actual quantity change is greater than a third preset threshold, wherein the third preset threshold is greater than a preset multiple of the preset quantity change.

[0047] It is understandable that the third preset threshold is a value that is pre-set to be greater than a preset multiple of the preset quantity change. The preset multiple is a preset multiple, which is usually greater than or equal to 2, that is, the third preset threshold is greater than 2 times or more of the preset quantity change.

[0048] Specifically, when the actual change in the quantity of the AB phase pulse signals exceeds a third preset threshold, the processor can issue an alarm message indicating an abnormality in the Z phase pulse signal. Understandably, this means the actual change in quantity far exceeds the preset change in quantity, i.e., the actual change in quantity is more than twice the preset change in quantity, indicating an abnormality in the Z phase pulse signal. Furthermore, the alarm message can be displayed in ways including, but not limited to, light, sound, and text alarms.

[0049] In this embodiment, an alarm is triggered for abnormal Z-phase pulse signals, which can improve the safety of incremental encoders and extend their service life.

[0050] In one embodiment, the method for correcting the positioning of an incremental encoder further includes: upon power-on, obtaining the previously stored positioning position of the incremental encoder before the last power failure; and using the previous positioning position as the initial positioning position of the incremental encoder.

[0051] Specifically, when the incremental encoder is powered on again, the processor can read the previous positioning position of the incremental encoder that was stored in real time before the last power failure, that is, the positioning position information of the incremental encoder before the last power failure. Since the incremental encoder does not have the power failure storage function, the count of A, B, and Z phase pulses starts from 0 after each power failure and power-on. Therefore, the processor needs to read the positioning position at the time of the last power failure and use it as the initial positioning position of the incremental encoder when it is powered on again.

[0052] In one embodiment, the method for correcting the positioning of an incremental encoder further includes: obtaining a first sample value of an AB phase pulse signal corresponding to a preset fixed position; and correcting the first sample value to the calibration sample value if the first sample value is not equal to the calibration sample value of the AB phase pulse signal corresponding to the preset fixed position.

[0053] It can be understood that the preset fixed position is a predetermined fixed position. The calibration sampling value is the theoretical number of AB phase pulse signals corresponding to the preset fixed position sampled in advance. The first sampling value is the actual number of AB phase pulse signals corresponding to the preset fixed position sampled.

[0054] Specifically, the processor can obtain the first sample value of the AB phase pulse signal corresponding to the preset fixed position, and compare the first sample value with the calibration sample value of the AB phase pulse signal corresponding to the preset fixed position. When the first sample value is not equal to the calibration sample value, the processor can correct the first sample value to the calibration sample value.

[0055] In this embodiment of the application, by combining the calibration sampling value information of the AB phase pulse signal corresponding to the preset fixed position, the incremental encoder can also be sampled and corrected to achieve the positioning correction of the incremental encoder.

[0056] In one embodiment, determining the actual positioning position of the incremental encoder when the current Z-phase pulse signal is triggered based on the current actual number of pulses includes: obtaining the actual positioning position based on the current actual number of pulses using a preset position algorithm.

[0057] It can be understood that the preset position algorithm is a functional relationship between the number of AB phase pulse signals and the positioning position of the incremental encoder. It can be a linear function, such as y = kx + b, where y is the positioning position, x is the number of AB phase pulse signals, and k and b are relevant parameters in the position algorithm, which can be determined in advance.

[0058] Specifically, the processor can determine the actual positioning position of the incremental encoder based on a preset position algorithm and the current actual number of pulses.

[0059] In the prior art, in the actual operation process of an incremental encoder, there is a working condition where pulses are lost in the AB-phase pulses. Therefore, an incremental encoder is usually not used for positioning. Taking a tower crane as an example, currently, an incremental encoder has been installed in the closed-loop control system of the tower crane mechanism, and the running positions of the three major mechanisms of the tower crane are positioned based on an additional absolute encoder.

[0060] An embodiment of the present invention proposes a method for correcting the positioning of an incremental encoder. In this solution, an additional Z-phase pulse output is added to the existing incremental encoder with AB-phase pulse output. The Z-phase pulse is the fixed position of the incremental encoder. Each time it rotates through this position, a Z-phase pulse is output to correct the situation of pulse loss, so as to achieve precise positioning. The specific flow schematic diagram can be as Figure 2 shown.

[0061] The key steps are described as follows:

[0062] 1. Read the information of the last power-off position when powering on. Since the incremental encoder does not have the function of power-off storage, the ABZ-phase pulse count starts from 0 each time power is on. Therefore, it is necessary to read the absolute physical position CaliPos at the last power-off as the initial value InitPos for this power-on. It can be understood that the physical position in the embodiment of the present invention refers to the number of pulses, and the following addition and subtraction operations are also the addition and subtraction of the number of pulses.

[0063] 2. Real-time collect and record the AB-phase pulse count, convert the absolute physical position according to the count value, and add InitPos to obtain the real-time absolute physical position NowPos;

[0064] 3. Real-time collect the Z-phase pulse, and correct the AB-phase pulse according to the Z pulse. Taking N AB-phase pulses as one revolution (N AB-phase pulses trigger one Z-phase pulse) as an example.

[0065] When the Z-phase pulse is triggered, if the change amount of the AB-phase pulse compared with the last time the Z-phase pulse was triggered is n, then m = n % N:

[0066] If 0 < m < threshold t1 (t1 <= N / 2), then the corrected position CaliPos = NowPos - m;

[0067] If (N - threshold t1 (t < = N / 2)) <= m < N, then the corrected position CaliPos = NowPos + N - m.

[0068] 4. Alarm warning function: The working condition environment of the tower crane is complex. To eliminate the interference of the external environment on the signal, it is necessary to give an alarm reminder for the AB-phase pulse signal and the Z-phase pulse signal:

[0069] 1) AB phase pulse abnormality alarm: When the threshold t1 (t1<=N / 2)<=m<(N-threshold t1 (t1<=N / 2)), an AB phase pulse abnormality alarm will be triggered between two O phase pulses;

[0070] 2) Z-phase pulse abnormality alarm: When the change in AB-phase pulse n between two Z-phase pulses is greater than the threshold t2, and the threshold t2 is at least twice N, a Z-phase pulse abnormality alarm is reported.

[0071] 5. Mechanical limit point correction: When the mechanism moves to the mechanical limit point, the incremental encoder performs position correction based on the position information of the fixed limit point.

[0072] 6. In the event of a power failure, store the corrected absolute physical location CaliPos.

[0073] In some embodiments, the incremental encoder triggers a Z pulse once for every revolution, which can be replaced by a multi-revolution trigger. In this solution, mechanical limit point correction: when the mechanism runs to the mechanical limit point, the incremental encoder performs position correction based on the position information of the fixed limit point, which can be replaced by non-mechanical limit point correction, by adding a mechanical contact at a fixed position to trigger the correction.

[0074] The advantages of this solution compared to existing technologies are:

[0075] 1. This solution addresses the issue of AB phase pulse loss during incremental encoder operation by proposing a method for mutual calibration and correction of AB and Z phase pulses to correct the pulse loss. Furthermore, when the mechanism reaches the mechanical limit point, the incremental encoder performs position correction by combining the position information of the fixed limit point, thereby achieving precise positioning.

[0076] 2. Compared with the current solution of adding an absolute encoder to achieve tower crane mechanism positioning, this solution utilizes the incremental encoder of the tower crane's existing closed-loop control, eliminating the need to add an absolute encoder and achieving tower crane mechanism positioning at a lower cost.

[0077] This invention provides a processor configured to perform a method for correcting incremental encoder positioning according to the above embodiments.

[0078] In one embodiment, such as Figure 3 As shown, this embodiment of the invention provides a device 300 for correcting the positioning of an incremental encoder, comprising:

[0079] The pulse quantity acquisition module 310 is used to acquire the actual change in the number of AB phase pulse signals when the current Z phase pulse signal is triggered compared to the previous Z phase pulse signal trigger, and the current number of AB phase pulse signals when the current Z phase pulse signal is triggered. The AB phase pulse signals and Z phase pulse signals are pulse signals emitted by the incremental encoder.

[0080] The pulse quantity correction module 320 is used to determine the remainder quantity based on the actual quantity change and the preset quantity change, wherein the remainder quantity is the remainder obtained by dividing the actual quantity change by the preset quantity change; and to correct the current pulse quantity based on the target preset remainder quantity interval in which the remainder quantity is located and the target preset correction strategy corresponding to the target preset remainder quantity interval, so as to obtain the current actual pulse quantity.

[0081] The position determination module 330 is used to determine the actual positioning position of the incremental encoder when the current Z-phase pulse signal is triggered, based on the current actual number of pulses.

[0082] The aforementioned device 300 for calibrating the positioning of an incremental encoder obtains the actual change in the number of AB phase pulse signals compared to the previous Z-phase pulse signal triggering time, and the current number of AB phase pulse signals at the current Z-phase pulse signal triggering time. It then determines the remainder based on the actual change in number and the preset change in number, where the remainder is the remainder obtained by dividing the actual change in number by the preset change in number. Subsequently, it calibrates the current number of pulses according to the target preset remainder interval and the target preset calibration strategy corresponding to the target preset remainder interval, so as to obtain the current actual number of pulses. Thus, it determines the actual positioning position of the incremental encoder at the current Z-phase pulse signal triggering time based on the current actual number of pulses. The above technical solution combines the Z-phase pulse signal to correct the number of AB-phase pulse signals. By determining the remainder based on the actual change in the number of AB-phase pulse signals and the preset change in the number, and then selecting the corresponding target preset correction strategy based on the remainder, the number of AB-phase pulse signals can be corrected according to the target preset correction strategy. The actual positioning position of the incremental encoder can then be determined based on the corrected number of AB-phase pulse signals. This solves the problem of inaccurate positioning of incremental encoders caused by inaccurate counting of AB-phase pulse signals, improves the positioning accuracy of incremental encoders, and enables precise positioning through incremental encoders.

[0083] In one embodiment, the pulse quantity correction module 320 is further configured to: determine the current actual pulse quantity as the difference between the current pulse quantity and the remainder quantity when the target preset remainder quantity range is 0 to a first preset threshold, wherein the first preset threshold is less than or equal to half of the preset quantity change; and determine the current actual pulse quantity as the value obtained by subtracting the remainder quantity from the sum of the current pulse quantity and the preset quantity change when the target preset remainder quantity range is a second preset threshold to a preset quantity change, wherein the second preset threshold is the difference between the preset quantity change and the first preset threshold.

[0084] In one embodiment, the device 300 for correcting the positioning of the incremental encoder further includes an alarm module for issuing an alarm message indicating an abnormal AB phase pulse signal when the remaining quantity is within a non-target preset remaining quantity range, wherein the lower limit threshold of the non-target preset remaining quantity range is a first preset threshold, and the upper limit threshold of the non-target preset remaining quantity range is a second preset threshold.

[0085] In one embodiment, the device 300 for correcting the positioning of the incremental encoder further includes an alarm module for issuing an alarm message indicating an abnormal Z-phase pulse signal when the actual quantity change is greater than a third preset threshold, wherein the third preset threshold is greater than a preset multiple of the preset quantity change.

[0086] In one embodiment, the device 300 for calibrating the positioning of the incremental encoder further includes a power-off storage module for obtaining the previous positioning position of the incremental encoder before the last power-off when the power is restored; and using the previous positioning position as the initial positioning position of the incremental encoder.

[0087] In one embodiment, the pulse quantity correction module 320 is further configured to: obtain a first sample value of the AB phase pulse signal corresponding to a preset fixed position; and correct the first sample value to the calibration sample value if the first sample value is not equal to the calibration sample value of the AB phase pulse signal corresponding to the preset fixed position.

[0088] In one embodiment, the position determination module 330 is further configured to: obtain the actual positioning position based on a preset position algorithm and the current actual number of pulses.

[0089] This invention provides a machine-readable storage medium storing a program or instructions that, when executed by a processor, implement the method for calibrating incremental encoder positioning according to the above embodiments.

[0090] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0091] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0092] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0093] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0094] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0095] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0096] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0097] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0098] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for calibrating the positioning of an incremental encoder, characterized in that, include: The change in the actual number of AB phase pulse signals when the current Z-phase pulse signal is triggered compared to the previous Z-phase pulse signal trigger, and the current number of AB phase pulse signals when the current Z-phase pulse signal is triggered, wherein the AB phase pulse signals and the Z-phase pulse signals are pulse signals emitted by the incremental encoder; The remainder quantity is determined based on the actual quantity change and the preset quantity change, wherein the remainder quantity is the remainder obtained by dividing the actual quantity change by the preset quantity change. Based on the target preset remainder interval where the remainder quantity is located and the target preset correction strategy corresponding to the target preset remainder interval, the current pulse quantity is corrected to obtain the current actual pulse quantity; The actual positioning position of the incremental encoder when the current Z-phase pulse signal is triggered is determined based on the current actual number of pulses. When the remaining quantity is within the range of the non-target preset remaining quantity, an alarm message indicating an abnormal AB phase pulse signal is issued, wherein the lower threshold of the non-target preset remaining quantity range is a first preset threshold, and the upper threshold of the non-target preset remaining quantity range is a second preset threshold. If the actual quantity change is greater than a third preset threshold, an alarm message indicating an abnormal Z-phase pulse signal is issued, wherein the third preset threshold is greater than a preset multiple of the preset quantity change. The step of correcting the current pulse count based on the target preset remainder count interval where the remainder count is located and the target preset correction strategy corresponding to the target preset remainder count interval to obtain the current actual pulse count includes: When the target preset remainder quantity range is 0 to a first preset threshold, the current actual pulse quantity is determined to be the difference between the current pulse quantity and the remainder quantity, wherein the first preset threshold is less than or equal to half of the preset quantity change. When the target preset remainder quantity range is from the second preset threshold to the preset quantity change, the current actual pulse quantity is determined to be the value obtained by subtracting the remainder quantity from the sum of the current pulse quantity and the preset quantity change, wherein the second preset threshold is the difference between the preset quantity change and the first preset threshold.

2. The method according to claim 1, characterized in that, The method further includes: Upon power-up, retrieve the previously stored positioning position of the incremental encoder prior to the last power outage; The previous positioning position is used as the initial positioning position of the incremental encoder.

3. The method according to claim 1, characterized in that, The method further includes: Obtain the first sampled value of the AB phase pulse signal corresponding to a preset fixed position; If the first sampled value is not equal to the calibration sampled value of the AB phase pulse signal corresponding to the preset fixed position, the first sampled value is corrected to the calibration sampled value.

4. The method according to claim 1, characterized in that, Determining the actual positioning position of the incremental encoder at the time of triggering of the current Z-phase pulse signal based on the current actual pulse count includes: The actual positioning position is obtained based on the preset positioning algorithm and the current actual number of pulses.

5. A processor, characterized in that, It is configured to perform the method for correcting the positioning of an incremental encoder as described in any one of claims 1 to 4.

6. A machine-readable storage medium on which a program or instructions are stored, characterized in that, When the program or the instructions are executed by the processor, they implement the method for correcting the positioning of an incremental encoder according to any one of claims 1 to 4.