CN109163751A - A kind of control device and method and encoder of encoder - Google Patents

A kind of control device and method and encoder of encoder Download PDF

Info

Publication number
CN109163751A
CN109163751A CN201810981674.2A CN201810981674A CN109163751A CN 109163751 A CN109163751 A CN 109163751A CN 201810981674 A CN201810981674 A CN 201810981674A CN 109163751 A CN109163751 A CN 109163751A
Authority
CN
China
Prior art keywords
signal
phase
compensation
speed
input signal
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.)
Granted
Application number
CN201810981674.2A
Other languages
Chinese (zh)
Other versions
CN109163751B (en
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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Kaibang Motor Manufacture Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Kaibang Motor Manufacture Co Ltd
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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Kaibang Motor Manufacture Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201810981674.2A priority Critical patent/CN109163751B/en
Publication of CN109163751A publication Critical patent/CN109163751A/en
Application granted granted Critical
Publication of CN109163751B publication Critical patent/CN109163751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D18/00Testing or calibrating apparatus or arrangements provided for in groups G01D1/00 - G01D15/00
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D3/00Indicating or recording apparatus with provision for the special purposes referred to in the subgroups

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

The invention discloses a kind of control device and method of encoder and encoder, which includes: acquiring unit, for obtaining the input signal of the encoder;Detection unit for obtaining the present speed of motor belonging to the encoder by the input signal detection, and the present speed is compared with preset threshold speed;Compensating unit, for carrying out first phase compensation to the input signal using the intersection value phase compensation method of setting, obtaining the first thermal compensation signal in the case where the present speed is less than or equal to the threshold speed;Or in the case where the present speed is higher than the threshold speed, second phase compensation first phase compensation is carried out to the input signal using the counting phase penalty method of setting, obtains the second thermal compensation signal.The solution of the present invention can solve the problem of poor reliability is compensated in subdivision's signal is corrected or is compensated, and achieve the effect that promote compensation reliability.

Description

A kind of control device and method and encoder of encoder
Technical field
The invention belongs to technical field of motors, and in particular to a kind of control device and method and encoder of encoder, especially It is related to a kind of absolute encoder subdivision's signal phase-detection and compensation system, the absolute encoder with the device and should Absolute encoder subdivision's signal phase-detection and compensation method.
Background technique
In order to improve the subdivision accuracy of photoelectric encoder, it is desirable that subdivision's signal has preferable sine;And in practical application In, due to grating space, grating black and white than, factors such as assembly precision, code-disc bias influence so that subdivision's signal is not ideal Sine wave, it is therefore necessary to subdivision's signal is corrected or is compensated.
Studies have shown that the influence of the phase deviation between subdivision's signal is most in influencing encoder subdivision accuracy factors It is significant;Therefore the phase deviation for how obtaining subdivision's signal becomes phase compensation and improves the key of subdivision accuracy.
Conventional solution has intersection value phase compensation method and counting phase penalty method at present.Intersection value phase compensation method It is the intersection value by detecting subdivision's signal, to obtain phase difference;In the patent document for being 101213423 B of CN such as notification number It proposes a kind of phase error detector, is realized by this kind of method, but this method makes because being limited to the sample rate of AD Testing result under the high revolving speed of motor deteriorates, and not can guarantee phase compensation precision when the high revolving speed of motor.And counting phase compensates Method when detecting phase difference without AD converter, but to sine and cosine relatively after pulse signal count, pass through phase Count difference between adjacent pulse realizes the phase difference detection of subdivision's signal.The advantage of this method is without by AD converter, drop Low demand of the hardware for AD converter, while compensation precision when can guarantee the high revolving speed of motor.But in the slow-speed of revolution In the case of, the requirement to processor is excessively high.
Summary of the invention
It is an object of the present invention in view of the foregoing drawbacks, the control device and method and encoder of a kind of encoder are provided, To solve in the prior art in subdivision's signal is corrected or is compensated, intersection value phase compensation method not can guarantee motor height and turn Phase compensation precision when fast and counting phase penalty method is excessively high to the requirement of processor in the case where the slow-speed of revolution, exist The problem of compensating poor reliability achievees the effect that promote compensation reliability.
The present invention provides a kind of control device of encoder, comprising: the acquiring unit, for obtaining the encoder Input signal;The detection unit, for obtaining the current of motor belonging to the encoder by the input signal detection Speed, and the present speed is compared with preset threshold speed;The compensating unit, in the present speed In the case where less than or equal to the threshold speed, the is carried out to the input signal using the intersection value phase compensation method of setting One phase compensation obtains the first thermal compensation signal;Or in the case where the present speed is higher than the threshold speed, using setting Counting phase penalty method to the input signal carry out second phase compensation first phase compensation, obtain the second thermal compensation signal.
Optionally, the acquiring unit, comprising: sine and cosine comparison module;The sine and cosine comparison module, for receiving Input signal is stated, and the input signal is converted into pulse digital signal by analog signal.
Optionally, the detection unit, comprising: velocity measuring module;The velocity measuring module, for passing through the arteries and veins It rushes digital signal detection and obtains the current rotating speed of the motor;And the present speed and preset threshold speed are compared Compared with to control the compensating unit by the intersection value in the case where the present speed is less than or equal to the threshold speed Phase compensation method carries out first phase compensation or controls the benefit in the case where the present speed is higher than the threshold speed It repays unit and carries out second phase compensation by the counting phase penalty method.
Optionally, the compensating unit, comprising: pulse counter module, AD sampling module and phase difference compensation module;Its In, the pulse counter module is counted for the adjacent pulse edge to the pulse digital signal, and according to adjacent arteries and veins The phase deviation of the pulse digital signal is calculated in count difference of the trimming between;The AD sampling module is used for institute It states input signal and the first digital signal is converted to by analog signal;The phase difference compensation module, for inclined according to the phase Difference carries out first phase compensation to first digital signal or second phase compensates, and the second digital signal is obtained, as required The first thermal compensation signal or the second thermal compensation signal.
Optionally, the compensating unit, further includes: position segmentation module;The position segmentation module, for described the Two digital signal carries out position segmentation, obtains required subdivision's signal.
Optionally, wherein the input signal, comprising: the cosine and sine signal of simulation;The cosine and sine signal of the simulation Formula are as follows: Sin0=A*Sin θ;Cos0=A*Cos (θ+δ);Wherein, sin0, cos0 are the cosine and sine signal of simulation, and A is positive remaining The amplitude of string signal, θ are angle, and δ is phase deviation;And/or the pulse digital signal, comprising: the sine and cosine of pulse digit Signal;In the cosine and sine signal of the pulse digit, the porch of the first signal changes n*360 ° and n* of corresponding Sin0 360 °+180 °, the porch of second signal changes n*360 °+90 ° and n*360 °+270 ° of corresponding Cos0, and n is integer.
Match with above-mentioned apparatus, further aspect of the present invention provides a kind of encoder, comprising: above-described encoder Control device.
Match with above-mentioned encoder, further aspect of the present invention provides a kind of control method of encoder, comprising: obtain institute State the input signal of encoder;The present speed of motor belonging to the encoder is obtained by the input signal detection, and The present speed is compared with preset threshold speed;In the present speed less than or equal to the threshold speed In the case of, first phase compensation is carried out to the input signal using the intersection value phase compensation method of setting, obtains the first compensation Signal;Or in the case where the present speed is higher than the threshold speed, using the counting phase penalty method of setting to described Input signal carries out second phase compensation first phase compensation, obtains the second thermal compensation signal.
Optionally, the input signal of the encoder is obtained, comprising: receive the input signal, and the input is believed Number pulse digital signal is converted to by analog signal.
Optionally, the present speed of motor belonging to the encoder is obtained by the input signal detection, comprising: logical The pulse digital signal is crossed to detect to obtain the current rotating speed of the motor;
Optionally, first phase compensation is carried out to the input signal using the intersection value phase compensation method of setting or adopted Second phase compensation first phase compensation is carried out to the input signal with the counting phase penalty method of setting, comprising: to described The adjacent pulse edge of pulse digital signal is counted, and is calculated according to the count difference between adjacent pulse edge described The phase deviation of pulse digital signal;The input signal is converted into the first digital signal by analog signal;According to the phase Position deviation carries out first phase compensation to first digital signal or second phase compensates, and obtains the second digital signal, as Required the first thermal compensation signal or the second thermal compensation signal.
Optionally, first phase compensation is carried out to the input signal using the intersection value phase compensation method of setting or adopted Second phase compensation first phase compensation is carried out to the input signal with the counting phase penalty method of setting, further includes: to institute It states the second digital signal and carries out position segmentation, obtain required subdivision's signal.
The solution of the present invention uses intersection value phase by combining two kinds of phase compensating methods when the motor slow-speed of revolution is low Position penalty method, when motor high revolving speed, are combined using counting phase penalty method, be can solve phase compensation precision and are limited to motor The problem of revolving speed, improves compensation reliability.
Further, the solution of the present invention, by combining two kinds of phase compensating methods, using friendship when the motor slow-speed of revolution is low Point value phase compensation method, when motor high revolving speed, are combined using counting phase penalty method, be can solve compensation effect and are limited to AD The problem of sample rate, reduces requirement and production cost of the hardware for AD sample rate, processor, promotes compensation precision, expands suitable Use range.
Further, the solution of the present invention, by combining two kinds of phase compensating methods, using friendship when the motor slow-speed of revolution is low Point value phase compensation method, when motor high revolving speed, are combined using counting phase penalty method, and the high-frequency phase for improving subdivision's signal is mended Effect is repaid, achievees the purpose that enhanced encoder resolution ratio and subdivision accuracy, and it is high to compensate high reliablity, compensation precision.
The solution of the present invention as a result, is combined two kinds of phase compensating methods by velocity measuring module, the motor slow-speed of revolution Use intersection value phase compensation method when low, when motor high revolving speed uses counting phase penalty method, solves in the prior art to thin During sub-signal is corrected or compensates, phase compensation precision when intersection value phase compensation method not can guarantee motor high revolving speed and Counting phase penalty method is excessively high to the requirement of processor in the case where the slow-speed of revolution, there are problems that compensating poor reliability, from And overcome and compensate poor reliability, the control defect that precision is low and the scope of application is small in the prior art, realization compensation good reliability, Control the good and applied widely beneficial effect of precision.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.
Below by drawings and examples, technical scheme of the present invention will be described in further detail.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of an embodiment of the control device of encoder of the invention;
Fig. 2 is the principle signal of the subdivision's signal phase-detection and compensation system of an embodiment of encoder of the invention Figure;
Fig. 3 is sine and cosine Li Sarutu before the phase compensation of an embodiment of encoder of the invention;
Fig. 4 is the phase compensation front signal of an embodiment of encoder of the invention;
Fig. 5 is the flow diagram of an embodiment of the control method of encoder of the invention;
Fig. 6 is the flow diagram for carrying out an embodiment of phase compensation in method of the invention to present speed.
In conjunction with attached drawing, appended drawing reference is as follows in the embodiment of the present invention:
1- sine and cosine comparison module;2- velocity measuring module;3- pulse counter module;4-AD sampling module;5- phase difference Compensating module;6- position segmentation module.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with the specific embodiment of the invention and Technical solution of the present invention is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the present invention one Section Example, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
According to an embodiment of the invention, providing a kind of control device of encoder.The device of the invention shown in Figure 1 An embodiment structural schematic diagram.The control device of the encoder may include: that acquiring unit, detection unit and compensation are single Member.
In an optional example, the acquiring unit can be used for obtaining the input signal of the encoder.
Specifically, the input signal may include: the cosine and sine signal of simulation.The cosine and sine signal of the simulation Formula are as follows: Sin0=A*Sin θ;Cos0=A*Cos (θ+δ).
Wherein, sin0, cos0 are the cosine and sine signal of simulation, and A is the amplitude of cosine and sine signal, and θ is angle, and δ is phase Deviation.
Such as: as shown in figure 4, Sin0 and Cos0 be system input signal, since actual production capacity is limited, Sin0 with There are certain phase deviation δ between Cos0, and as shown in the Li Sarutu of Fig. 3, Sin0 and Cos0 can be indicated with formula (1):
Sin0=A*Sin θ
Cos0=A*Cos (θ+δ) formula (1).
In formula (1), sin0, cos0 are the cosine and sine signal of simulation, and A is the amplitude of cosine and sine signal, and θ is angle, δ For phase deviation.
It is good to be inputted as input signal by using the cosine and sine signal of simulation for high reliablity, accuracy as a result,.
Optionally, the acquiring unit may include: sine and cosine comparison module 1.
Wherein, the sine and cosine comparison module 1, can be used for receiving the input signal, and by the input signal by Analog signal (such as analog signal sin0, cos0) is converted to pulse digital signal (such as digital pulse signal sin1, cos1).
Such as: as shown in figure 4, the effect of sine and cosine comparison module 1 is that analog signal sin0, cos0 is converted to digital arteries and veins Rush signal sin1, cos1.
Such as: sine and cosine comparison module 1 by the analog signal Sin0 and Cos0 of input be converted into pulse signal Sin1 and Cos1, as shown in Figure 4;And the porch of Sin1 changes n*360 ° and n*360 °+180 ° of corresponding Sin0, the edge of pulse of Cos1 Along n*360 °+90 ° and n*360 °+270 ° of the corresponding Cos0 of variation, n is integer.
As a result, by receiving input signal, and the input signal is converted into pulse digital signal by analog signal, so as to In the present speed based on pulse digital signal detection motor, and then facilitate subsequent phase compensation, and acquisition modes simplicity, It is good to obtain result accuracy.
In an optional example, the detection unit can be used for obtaining the volume by the input signal detection The present speed of motor belonging to code device, and the present speed is compared with preset threshold speed.
Optionally, the detection unit may include: velocity measuring module 2.
Wherein, the velocity measuring module 2 can be used for detecting by the pulse digital signal obtaining the motor Current rotating speed;And be compared the present speed with preset threshold speed, to be less than or equal in the present speed Controlled in the case where the threshold speed compensating unit by the intersection value phase compensation method carry out first phase compensation or The present speed be higher than the threshold speed in the case where control the compensating unit by the counting phase penalty method into The compensation of row second phase.
Such as: the effect of velocity measuring module 2 is to detect that current motor turns by digital pulse signal sin1, cos1 Speed.It increases speed detection module 2, when low speed uses intersection value phase compensation method, and when high speed uses counting phase penalty method, by two Kind method is learnt from other's strong points to offset one's weaknesses, and solves the problems, such as that phase compensation precision is limited to motor speed.
Such as: velocity measuring module 2 calculates the current velocity amplitude of motor by pulse signal Sin1 and Cos1, will be current Velocity amplitude be compared with threshold speed value (being obtained by test of many times), current speed value be less than or equal to threshold speed value When, system uses intersection value phase compensation method, and phase compensation precision when this method low speed is ideal, while when low speed hardware for The requirement of AD sample rate is lower;When current speed value is higher than threshold speed value, system uses counting phase penalty method, this method energy Enough phase compensation precision guaranteed under high speed, at the same when high speed hardware for the of less demanding of processor.
Such as: by velocity measuring module 2, dexterously two kinds of phase compensating methods are combined together, has reached and has taken length Mend short effect.No matter the height of motor speed, it is ideal which can guarantee phase compensation precision, at the same reduce hardware for AD sample rate, the requirement of processor and production cost.
As a result, by detecting to obtain the current rotating speed of motor based on the pulse digital signal being converted to by input signal, And then judge that the present speed is compensated with the size relation of preset threshold speed using corresponding phase compensating method, it mends It is high, at low cost to repay high reliablity, precision.
Wherein, the pulse digital signal may include: the cosine and sine signal of pulse digit.
In the cosine and sine signal of the pulse digit, the porch of the first signal (such as Sin1) changes corresponding Sin0 N*360 ° and n*360 °+180 °, the porch of second signal (such as Cos1) changes n*360 °+90 ° and n* of corresponding Cos0 360 °+270 °, n is integer.
Pulse digital signal is used as by using the cosine and sine signal of pulse digit as a result, convenient for detection, and detect Accuracy and the available guarantee of reliability.
In an optional example, the compensating unit can be used in the present speed less than or equal to the speed In the case where spending threshold value, first phase compensation is carried out to the input signal using the intersection value phase compensation method of setting, is obtained First thermal compensation signal;Or in the case where the present speed is higher than the threshold speed, compensated using the counting phase of setting Method carries out second phase compensation first phase compensation to the input signal, obtains the second thermal compensation signal.
Such as: two kinds of phase compensating methods are combined by velocity measuring module, intersection point is used when the motor slow-speed of revolution is low It is worth phase compensation method, when motor high revolving speed is combined using counting phase penalty method, and two methods are learnt from other's strong points to offset one's weaknesses, phase is solved Compensation precision is limited to the problem of motor speed.The phase difference detection method can reduce hardware for AD sample rate, processor Requirement and production cost, solve the problems, such as that compensation effect is limited to AD sample rate, improve subdivision's signal high-frequency phase compensation Effect achievees the purpose that enhanced encoder resolution ratio and subdivision accuracy.
Such as: according to different revolving speeds, the method for determining phase compensation, to the cosine and sine signal (i.e. subdivision's signal) of input Carry out phase compensation.
Wherein, it in the case that speed is equal to the threshold speed set in this prior, needs using intersection value phase compensation method Phase compensation is carried out to cosine and sine signal (i.e. subdivision's signal).That is, the present speed is equal to or less than the speed When threshold value, phase compensation is carried out to cosine and sine signal (subdivision's signal) using intersection value penalty method.
As a result, by obtaining the input signal of encoder, and then electricity belonging to encoder is obtained by the input signal detection The present speed of machine, and in this prior in the case where threshold speed of the speed less than or equal to setting, by intersection value phase compensation Method carries out phase compensation to present speed, or speed is mended in the case where being higher than the threshold speed set by counting phase in this prior Method progress phase compensation, the high reliablity of compensation are repaid, and accuracy is high, at low cost.
Optionally, the compensating unit may include: pulse counter module 3, AD sampling module 4 and phase difference compensation mould Block 5.
In an optional specific example, the pulse counter module 3 can be used for the phase to the pulse digital signal Adjacent porch is counted, and the phase of the pulse digital signal is calculated according to the count difference between adjacent pulse edge Position deviation.
Such as: the effect of pulse counter module 3 is counted to the adjacent pulse edge of digital pulse signal sin1, cos1 Number, and phase deviation is calculated according to the count difference between adjacent pulse.
In an optional specific example, the AD sampling module 4 can be used for the input signal by analog signal (such as analog signal sin0, cos0) is converted to the first digital signal (such as digital signal sin2, cos2).
Such as: the effect of AD sampling module 4 is that analog signal sin0, cos0 is converted to digital signal sin2, cos2.
In an optional specific example, the phase difference compensation module 5 can be used for according to the phase deviation to institute State the first digital signal carry out first phase compensation or second phase compensation, obtain the second digital signal (such as digital signal sin3, Cos3), as required the first thermal compensation signal or the second thermal compensation signal.
Such as: the effect of phase difference compensation module 5 is to be carried out according to the phase difference detected to digital signal sin2, cos2 Phase compensation obtains digital signal sin3, cos3.
It is counted as a result, by the adjacent pulse edge of number of pulses word signal, and according between adjacent pulse edge Count difference be calculated pulse digital signal phase be deteriorated;Input signal is also converted to the first number by analog signal to believe Number, corresponding phase compensation then is carried out to the first digital signal further according to the phase deviation, obtains required compensation speed, is mended It is reliable to repay mode;And can be compensated respectively according to different rotating speeds, it is applied widely.
Still optionally further, the compensating unit can also include: position segmentation module 6.
Wherein, the position segmentation module 6 can be used for carrying out position segmentation to second digital signal, obtain institute The subdivision's signal needed.
Such as: the effect of position segmentation module 6 is thin to digital signal sin3, the cos3 progress position after phase compensation Point.
As a result, by carrying out position segmentation, available required subdivision's signal, and reliability to the second digital signal Height, accuracy are good.
Through a large amount of verification experimental verification, using technical solution of the present invention, by the way that two kinds of phase compensating methods are combined, electricity Use intersection value phase compensation method when the machine slow-speed of revolution is low, when motor high revolving speed is combined using counting phase penalty method, can be solved The problem of certainly phase compensation precision is limited to motor speed improves compensation reliability.
According to an embodiment of the invention, additionally providing a kind of encoder of the control device corresponding to encoder.The coding Device may include: the control device of above-described encoder.
Of the existing technology in order to solve the problems, such as in an optional embodiment, the present invention proposes a kind of absolutely volume Code device subdivision's signal phase-detection and compensation system can solve absolute encoder phase compensation effect in the high revolving speed of motor and dislike It is excessively high to solve the problems, such as that absolute encoder phase compensation requires AD sample rate for change problem, solves absolute encoder phase compensation The problem excessively high to processor requirement, and solve the problems, such as that absolute encoder resolution ratio and subdivision accuracy are insufficient.
In an optional example, the present invention is combined two kinds of phase compensating methods by velocity measuring module, motor Use intersection value phase compensation method when the slow-speed of revolution is low, when motor high revolving speed is combined using counting phase penalty method, by two kinds of sides Method is learnt from other's strong points to offset one's weaknesses, and solves the problems, such as that phase compensation precision is limited to motor speed.The phase difference detection method can reduce hardware Requirement and production cost for AD sample rate, processor solve the problems, such as that compensation effect is limited to AD sample rate, improve subdivision The high-frequency phase compensation effect of signal, achievees the purpose that enhanced encoder resolution ratio and subdivision accuracy.
It, can be in conjunction with Fig. 2 to example shown in Fig. 4, to the solution of the present invention in an optional specific embodiment Specific implementation process illustrates.
As shown in Fig. 2, a kind of absolute encoder subdivision's signal phase-detection proposed by the present invention and compensation system, can wrap It includes: sine and cosine comparison module 1, velocity measuring module 2, pulse counter module 3, AD sampling module 4,5 and of phase difference compensation module Position segmentation module 6.
Specifically, as shown in figure 4, the effect of sine and cosine comparison module 1 is that analog signal sin0, cos0 is converted to number Pulse signal sin1, cos1.The effect of velocity measuring module 2 is to detect current electricity by digital pulse signal sin1, cos1 Machine revolving speed.The effect of pulse counter module 3 be the adjacent pulse edge of digital pulse signal sin1, cos1 are counted, and Phase deviation is calculated according to the count difference between adjacent pulse.The effect of AD sampling module 4 is by analog signal sin0, cos0 Be converted to digital signal sin2, cos2.The effect of phase difference compensation module 5 is according to the phase difference detected to digital signal Sin2, cos2 carry out phase compensation and obtain digital signal sin3, cos3.The effect of position segmentation module 6 is to after phase compensation Digital signal sin3, cos3 carry out position segmentation.
Wherein, it increases speed detection module 2, when low speed uses intersection value phase compensation method, and when high speed uses counting phase Penalty method learns from other's strong points to offset one's weaknesses two methods, solves the problems, such as that phase compensation precision is limited to motor speed.
In an optional specific example, absolute encoder subdivision's signal phase-detection and compensation system in the present invention can As shown in Fig. 2, mainly by sine and cosine comparison module 1, velocity measuring module 2, pulse counter module 3, AD sampling module 4, phase Displacement error compensation module 5 and position segmentation module 6 form.
As shown in figure 4, Sin0 and Cos0 is the input signal of system, and since actual production capacity is limited, Sin0 and Cos0 Between there are certain phase deviation δ, as shown in the Li Sarutu of Fig. 3, Sin0 and Cos0 can be indicated with formula (1):
Sin0=A*Sin θ
Cos0=A*Cos (θ+δ) formula (1).
In formula (1), sin0, cos0 are the cosine and sine signal of simulation, and A is the amplitude of cosine and sine signal, and θ is angle, δ For phase deviation.
Wherein, sine and cosine comparison module 1 by the analog signal Sin0 and Cos0 of input be converted into pulse signal Sin1 and Cos1, as shown in Figure 4;And the porch of Sin1 changes n*360 ° and n*360 °+180 ° of corresponding Sin0, the edge of pulse of Cos1 Along n*360 °+90 ° and n*360 °+270 ° of the corresponding Cos0 of variation, n is integer.
Wherein, velocity measuring module 2 calculates the current velocity amplitude of motor by pulse signal Sin1 and Cos1, will be current Velocity amplitude be compared with threshold speed value (being obtained by test of many times), current speed value be less than or equal to threshold speed value When, system uses intersection value phase compensation method, and phase compensation precision when this method low speed is ideal, while when low speed hardware for The requirement of AD sample rate is lower;When current speed value is higher than threshold speed value, system uses counting phase penalty method, this method energy Enough phase compensation precision guaranteed under high speed, at the same when high speed hardware for the of less demanding of processor.
Two kinds of phase compensating methods are dexterously incorporated in by the phase-detection and compensation system by velocity measuring module 2 Together, achieved the effect that learn from other's strong points to offset one's weaknesses.No matter the height of motor speed, which can guarantee that phase compensation precision is ideal, Requirement and production cost of the hardware for AD sample rate, processor are reduced simultaneously.
The processing and function realized by the encoder of the present embodiment essentially correspond to the reality of aforementioned device shown in FIG. 1 Example, principle and example are applied, therefore not detailed place in the description of the present embodiment, it may refer to the related description in previous embodiment, This will not be repeated here.
Through a large amount of verification experimental verification, using technical solution of the present invention, by the way that two kinds of phase compensating methods are combined, electricity Use intersection value phase compensation method when the machine slow-speed of revolution is low, when motor high revolving speed is combined using counting phase penalty method, can be solved Certainly compensation effect is limited to the problem of AD sample rate, reduces requirement and production cost of the hardware for AD sample rate, processor, mentions Compensation precision is risen, the scope of application is expanded.
According to an embodiment of the invention, a kind of control method of encoder corresponding to encoder is additionally provided, such as Fig. 5 institute Show the flow diagram of an embodiment of method of the invention.The control method of the encoder may include: that step S110 is extremely walked Rapid S130.
At step S110, the input signal of the encoder is obtained.
Optionally, the input signal that the encoder is obtained in step S110 may include: to receive the input signal, And the input signal is converted into pulse digital signal (such as digit pulse by analog signal (such as analog signal sin0, cos0) Signal sin1, cos1).
Such as: as shown in figure 4, the effect of sine and cosine comparison module 1 is that analog signal sin0, cos0 is converted to digital arteries and veins Rush signal sin1, cos1.
Such as: sine and cosine comparison module 1 by the analog signal Sin0 and Cos0 of input be converted into pulse signal Sin1 and Cos1, as shown in Figure 4;And the porch of Sin1 changes n*360 ° and n*360 °+180 ° of corresponding Sin0, the edge of pulse of Cos1 Along n*360 °+90 ° and n*360 °+270 ° of the corresponding Cos0 of variation, n is integer.
As a result, by receiving input signal, and the input signal is converted into pulse digital signal by analog signal, so as to In the present speed based on pulse digital signal detection motor, and then facilitate subsequent phase compensation, and acquisition modes simplicity, It is good to obtain result accuracy.
At step S120, the present speed of motor belonging to the encoder is obtained by the input signal detection, And the present speed is compared with preset threshold speed.
Optionally, the current speed of motor belonging to the encoder is obtained by the input signal detection in step S120 Degree, may include: to detect to obtain the current rotating speed of the motor by the pulse digital signal, by the present speed with Preset threshold speed is compared, and in the case where the present speed is less than or equal to the threshold speed described in control Compensating unit carries out first phase compensation by the intersection value phase compensation method or is higher than the speed threshold in the present speed The compensating unit is controlled in the case where value carries out second phase compensation by the counting phase penalty method.
Such as: the effect of velocity measuring module 2 is to detect that current motor turns by digital pulse signal sin1, cos1 Speed.It increases speed detection module 2, when low speed uses intersection value phase compensation method, and when high speed uses counting phase penalty method, by two Kind method is learnt from other's strong points to offset one's weaknesses, and solves the problems, such as that phase compensation precision is limited to motor speed.
Such as: velocity measuring module 2 calculates the current velocity amplitude of motor by pulse signal Sin1 and Cos1, will be current Velocity amplitude be compared with threshold speed value (being obtained by test of many times), current speed value be less than or equal to threshold speed value When, system uses intersection value phase compensation method, and phase compensation precision when this method low speed is ideal, while when low speed hardware for The requirement of AD sample rate is lower;When current speed value is higher than threshold speed value, system uses counting phase penalty method, this method energy Enough phase compensation precision guaranteed under high speed, at the same when high speed hardware for the of less demanding of processor.
Such as: by velocity measuring module 2, dexterously two kinds of phase compensating methods are combined together, has reached and has taken length Mend short effect.No matter the height of motor speed, it is ideal which can guarantee phase compensation precision, at the same reduce hardware for AD sample rate, the requirement of processor and production cost.
As a result, by detecting to obtain the current rotating speed of motor based on the pulse digital signal being converted to by input signal, And then judge that the present speed is compensated with the size relation of preset threshold speed using corresponding phase compensating method, it mends It is high, at low cost to repay high reliablity, precision.
At step S130, in the case where the present speed is less than or equal to the threshold speed, using setting Intersection value phase compensation method carries out first phase compensation to the input signal, obtains the first thermal compensation signal;Or described current In the case that speed is higher than the threshold speed, the second phase is carried out to the input signal using the counting phase penalty method of setting Position compensation first phase compensation, obtains the second thermal compensation signal.
Such as: two kinds of phase compensating methods are combined by velocity measuring module, intersection point is used when the motor slow-speed of revolution is low It is worth phase compensation method, when motor high revolving speed is combined using counting phase penalty method, and two methods are learnt from other's strong points to offset one's weaknesses, phase is solved Compensation precision is limited to the problem of motor speed.The phase difference detection method can reduce hardware for AD sample rate, processor Requirement and production cost, solve the problems, such as that compensation effect is limited to AD sample rate, improve subdivision's signal high-frequency phase compensation Effect achievees the purpose that enhanced encoder resolution ratio and subdivision accuracy.
Wherein, it in the case that speed is equal to the threshold speed set in this prior, does not need to carry out phase compensation.
As a result, by obtaining the input signal of encoder, and then electricity belonging to encoder is obtained by the input signal detection The present speed of machine, and in this prior in the case where threshold speed of the speed less than or equal to setting, by intersection value phase compensation Method carries out phase compensation to present speed, or speed is mended in the case where being higher than the threshold speed set by counting phase in this prior Method progress phase compensation, the high reliablity of compensation are repaid, and accuracy is high, at low cost.
It is alternatively possible to carry out an embodiment of phase compensation in method of the invention to present speed as shown in connection with fig. 6 Flow diagram further illustrates in step S130 and carries out the to the input signal using the intersection value phase compensation method of setting One phase compensation carries out second phase compensation first phase benefit to the input signal using the counting phase penalty method of setting The detailed process repaid may include: step S210 to step S230.
Step S210 counts the adjacent pulse edge of the pulse digital signal, and according to adjacent pulse edge Between count difference the phase deviation of the pulse digital signal is calculated.
Such as: the effect of pulse counter module 3 is counted to the adjacent pulse edge of digital pulse signal sin1, cos1 Number, and phase deviation is calculated according to the count difference between adjacent pulse.
The input signal is converted to the first number by analog signal (such as analog signal sin0, cos0) by step S220 Signal (such as digital signal sin2, cos2).
Such as: the effect of AD sampling module 4 is that analog signal sin0, cos0 is converted to digital signal sin2, cos2.
Step S230 carries out first phase compensation or second phase to first digital signal according to the phase deviation Compensation, obtains the second digital signal (such as digital signal sin3, cos3), as the first required thermal compensation signal or the second compensation letter Number.
Such as: the effect of phase difference compensation module 5 is to be carried out according to the phase difference detected to digital signal sin2, cos2 Phase compensation obtains digital signal sin3, cos3.
It is counted as a result, by the adjacent pulse edge of number of pulses word signal, and according between adjacent pulse edge Count difference be calculated pulse digital signal phase be deteriorated;Input signal is also converted to the first number by analog signal to believe Number, corresponding phase compensation then is carried out to the first digital signal further according to the phase deviation, obtains required compensation speed, is mended It is reliable to repay mode;And can be compensated respectively according to different rotating speeds, it is applied widely.
Still optionally further, the is carried out to the input signal using the intersection value phase compensation method of setting in step S130 One phase compensation carries out second phase compensation first phase benefit to the input signal using the counting phase penalty method of setting It repays, can also include: that position segmentation is carried out to second digital signal, obtain required subdivision's signal.
Such as: the effect of position segmentation module 6 is thin to digital signal sin3, the cos3 progress position after phase compensation Point.
As a result, by carrying out position segmentation, available required subdivision's signal, and reliability to the second digital signal Height, accuracy are good.
The processing and function realized by the method for the present embodiment essentially correspond to earlier figures 2 to coding shown in Fig. 4 Embodiment, principle and the example of device, therefore not detailed place in the description of the present embodiment, may refer to the correlation in previous embodiment Illustrate, this will not be repeated here.
Through a large amount of verification experimental verification, using the technical solution of the present embodiment, by the way that two kinds of phase compensating methods are combined, Use intersection value phase compensation method when the motor slow-speed of revolution is low, when motor high revolving speed is combined using counting phase penalty method, is improved The high-frequency phase compensation effect of subdivision's signal achievees the purpose that enhanced encoder resolution ratio and subdivision accuracy, and compensates reliability High, compensation precision height.
To sum up, it will be readily appreciated by those skilled in the art that under the premise of not conflicting, above-mentioned each advantageous manner can be certainly It combined, be superimposed by ground.
The above description is only an embodiment of the present invention, is not intended to restrict the invention, for those skilled in the art For member, the invention may be variously modified and varied.All within the spirits and principles of the present invention, it is made it is any modification, Equivalent replacement, improvement etc., should be included within scope of the presently claimed invention.

Claims (12)

1. a kind of control device of encoder characterized by comprising acquiring unit, detection unit and compensating unit;Wherein,
The acquiring unit, for obtaining the input signal of the encoder;
The detection unit, for obtaining the present speed of motor belonging to the encoder by the input signal detection, And the present speed is compared with preset threshold speed;
The compensating unit is used in the case where the present speed is less than or equal to the threshold speed, using setting Intersection value phase compensation method carries out first phase compensation to the input signal, obtains the first thermal compensation signal;Or described current In the case that speed is higher than the threshold speed, the second phase is carried out to the input signal using the counting phase penalty method of setting Position compensation, obtains the second thermal compensation signal.
2. the apparatus according to claim 1, which is characterized in that the acquiring unit, comprising: sine and cosine comparison module (1);
The sine and cosine comparison module (1) is converted for receiving the input signal, and by the input signal by analog signal For pulse digital signal.
3. the apparatus of claim 2, which is characterized in that the detection unit, comprising: velocity measuring module (2);
The velocity measuring module (2) obtains the current rotating speed of the motor for detecting by the pulse digital signal;And The present speed is compared with preset threshold speed, to be less than or equal to the threshold speed in the present speed In the case where control the compensating unit and carry out first phase compensation or in the current speed by the intersection value phase compensation method Degree controls the compensating unit and carries out second phase benefit by the counting phase penalty method in the case where being higher than the threshold speed It repays.
4. device according to claim 2 or 3, which is characterized in that the compensating unit, comprising: pulse counter module (3), AD sampling module (4) and phase difference compensation module (5);Wherein,
The pulse counter module (3), counts for the adjacent pulse edge to the pulse digital signal, and according to phase The phase deviation of the pulse digital signal is calculated in count difference between adjacent porch;
The AD sampling module (4), for the input signal to be converted to the first digital signal by analog signal;
The phase difference compensation module (5), for carrying out first phase to first digital signal according to the phase deviation Compensation or second phase compensation, obtain the second digital signal, as required the first thermal compensation signal or the second thermal compensation signal.
5. device according to claim 4, which is characterized in that the compensating unit, further includes: position segmentation module (6);
The position segmentation module (6) obtains required subdivision letter for carrying out position segmentation to second digital signal Number.
6. the device according to one of claim 2-5, which is characterized in that wherein,
The input signal, comprising: the cosine and sine signal of simulation;The formula of the cosine and sine signal of the simulation are as follows:
Sin0=A*Sin θ;
Cos0=A*Cos (θ+δ);
Wherein, sin0, cos0 are the cosine and sine signal of simulation, and A is the amplitude of cosine and sine signal, and θ is angle, and δ is phase deviation;
And/or
The pulse digital signal, comprising: the cosine and sine signal of pulse digit;
In the cosine and sine signal of the pulse digit, the porch of the first signal changes n*360 ° and n* of corresponding Sin0 360 °+180 °, the porch of second signal changes n*360 °+90 ° and n*360 °+270 ° of corresponding Cos0, and n is integer.
7. a kind of encoder characterized by comprising the control device of the encoder as described in claim 1-6 is any.
8. a kind of control method of encoder as claimed in claim 7 characterized by comprising
Obtain the input signal of the encoder;
Obtain the present speed of motor belonging to the encoder by the input signal detection, and by the present speed with Preset threshold speed is compared;
In the case where the present speed is less than or equal to the threshold speed, using the intersection value phase compensation method pair of setting The input signal carries out first phase compensation, obtains the first thermal compensation signal;Or it is higher than the speed threshold in the present speed In the case where value, second phase compensation first phase is carried out to the input signal using the counting phase penalty method of setting and is mended It repays, obtains the second thermal compensation signal.
9. according to the method described in claim 8, it is characterized in that, obtaining the input signal of the encoder, comprising:
The input signal is received, and the input signal is converted into pulse digital signal by analog signal.
10. according to the method described in claim 9, it is characterized in that, obtaining the encoder by the input signal detection The present speed of affiliated motor, comprising:
It detects to obtain the current rotating speed of the motor by the pulse digital signal.
11. method according to claim 9 or 10, which is characterized in that using the intersection value phase compensation method of setting to institute Input signal is stated to carry out first phase compensation or carry out the second phase to the input signal using the counting phase penalty method of setting Position compensation first phase compensation, comprising:
The adjacent pulse edge of the pulse digital signal is counted, and according to the count difference meter between adjacent pulse edge Calculation obtains the phase deviation of the pulse digital signal;
The input signal is converted into the first digital signal by analog signal;
First phase compensation is carried out to first digital signal according to the phase deviation or second phase compensates, obtains second Digital signal, as required the first thermal compensation signal or the second thermal compensation signal.
12. according to the method for claim 11, which is characterized in that using the intersection value phase compensation method of setting to described defeated Enter signal to carry out first phase compensation or carry out second phase benefit to the input signal using the counting phase penalty method of setting Repay first phase compensation, further includes:
Position segmentation is carried out to second digital signal, obtains required subdivision's signal.
CN201810981674.2A 2018-08-27 2018-08-27 Control device and method of encoder and encoder Active CN109163751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810981674.2A CN109163751B (en) 2018-08-27 2018-08-27 Control device and method of encoder and encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810981674.2A CN109163751B (en) 2018-08-27 2018-08-27 Control device and method of encoder and encoder

Publications (2)

Publication Number Publication Date
CN109163751A true CN109163751A (en) 2019-01-08
CN109163751B CN109163751B (en) 2020-07-28

Family

ID=64896763

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810981674.2A Active CN109163751B (en) 2018-08-27 2018-08-27 Control device and method of encoder and encoder

Country Status (1)

Country Link
CN (1) CN109163751B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07229757A (en) * 1994-02-18 1995-08-29 Canon Inc Signal processing device, position detecting device and driving device
JP2007198805A (en) * 2006-01-24 2007-08-09 Ricoh Co Ltd Position detector, position detection method, and image forming device
CN101131329A (en) * 2006-08-22 2008-02-27 松下电器产业株式会社 Correction circuit for coder signal
CN101140170A (en) * 2006-09-04 2008-03-12 松下电器产业株式会社 Correction circuit for encoder signal
CN101213423A (en) * 2006-06-19 2008-07-02 松下电器产业株式会社 Phase correction circuit of encoder signal
JP2011064459A (en) * 2009-09-15 2011-03-31 Panasonic Corp Correction circuit of encoder signal
CN108204830A (en) * 2017-11-28 2018-06-26 珠海格力节能环保制冷技术研究中心有限公司 The compensation method of phase deviation and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07229757A (en) * 1994-02-18 1995-08-29 Canon Inc Signal processing device, position detecting device and driving device
JP2007198805A (en) * 2006-01-24 2007-08-09 Ricoh Co Ltd Position detector, position detection method, and image forming device
CN101213423A (en) * 2006-06-19 2008-07-02 松下电器产业株式会社 Phase correction circuit of encoder signal
CN101131329A (en) * 2006-08-22 2008-02-27 松下电器产业株式会社 Correction circuit for coder signal
CN101140170A (en) * 2006-09-04 2008-03-12 松下电器产业株式会社 Correction circuit for encoder signal
JP2011064459A (en) * 2009-09-15 2011-03-31 Panasonic Corp Correction circuit of encoder signal
CN108204830A (en) * 2017-11-28 2018-06-26 珠海格力节能环保制冷技术研究中心有限公司 The compensation method of phase deviation and device

Also Published As

Publication number Publication date
CN109163751B (en) 2020-07-28

Similar Documents

Publication Publication Date Title
EP2526429B1 (en) Method for detecting the rotation and direction of rotation of a rotor
CN105424073A (en) Incremental photoelectric encoder precision detection system
CN105958889A (en) Single-resistor current sampling method and system
CN103023399A (en) Zero angle calibrating system of rotary transformer rotor
CN102270961A (en) Signal subdividing method and subdividing device for sine-cosine encoder, and motor control device
CN109854093B (en) Detection method and device for position of lock cylinder of intelligent lock
EP3029427A1 (en) Device and algorithm for radial mechanically absolute angle determination for a shaft
US6515471B1 (en) Absolute position hall string sensor
DE102007060727A1 (en) A method of detecting a rotational position by using a Hall element and a Hall element resolver
CN105783970A (en) Digitalization identification method of motormeter pointer
CN101478285B (en) Motor speed detection method
CN103017688B (en) Method for using photoelectric device to determine complete rotation arrival and rotating angle of turntable in north seeker
CN109163751A (en) A kind of control device and method and encoder of encoder
CN202940767U (en) System for calibrating zero position angle of resolver rotor
CN105974256A (en) Sine-cosine encoder wire breakage detecting system, sine-cosine encoder wire breakage detecting method and differential amplifying circuit
CN205607423U (en) Automatic identification equipment of automobile instrument pointer indicated value
CN102300116B (en) Rapid detection method of video resolution and apparatus thereof
CN103196915B (en) Object detection system
CN109855668B (en) Self-calibration method and device of magnetic angle sensor, magnetic angle sensor and system
CN104536001A (en) Cylindrical pier quality detection method based on data slices
CN110212818A (en) A kind of magneto angle detecting method
CN110133316A (en) A kind of photoelectric encoder precision velocity-measuring system and method
CN106685605A (en) Method for detecting weak signal frequency value in background of strong noise by chaotic synchronization
CN106353616A (en) System for measuring magnetic field interference from train to trackside axle counter
CN105868750B (en) Hand of dial recognition methods based on prior information

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
GR01 Patent grant
GR01 Patent grant