CN100582676C - Correction circuit for encoder signal - Google Patents
Correction circuit for encoder signal Download PDFInfo
- Publication number
- CN100582676C CN100582676C CN200710147204A CN200710147204A CN100582676C CN 100582676 C CN100582676 C CN 100582676C CN 200710147204 A CN200710147204 A CN 200710147204A CN 200710147204 A CN200710147204 A CN 200710147204A CN 100582676 C CN100582676 C CN 100582676C
- Authority
- CN
- China
- Prior art keywords
- signal
- phase
- speed
- correction
- circuit
- 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.)
- Active
Links
Images
Landscapes
- Transmission And Conversion Of Sensor Element Output (AREA)
Abstract
Description
技术领域 technical field
本发明涉及在对正交的2相的正弦信号进行内插处理来得到高分辨率的编码器中,校正2相的正弦信号的偏移和振幅、相位的电路。The present invention relates to a circuit for correcting offset, amplitude, and phase of two-phase sinusoidal signals in an encoder for obtaining high resolution by interpolating two-phase sinusoidal signals in quadrature.
背景技术 Background technique
一般由发光元件和受光元件以及在它们之间形成了格子状的缝(slit)的旋转体(或者移动体)形成旋转型(或者线型)的编码器的位置检测,分辨率由格子状的缝间隔而被决定。因此,为了提高分辨率而减小了缝间隔,但因为加工精度或光的衍射现象,用这个方法提高分辨率存在限制。Generally, the position detection of a rotary (or linear) encoder is formed by a light-emitting element, a light-receiving element, and a rotating body (or moving body) that forms a grid-like slit between them, and the resolution is determined by the grid-like The seam interval is determined. Therefore, the slit interval is reduced in order to improve the resolution, but there is a limit to the improvement of the resolution by this method because of the machining accuracy or the diffraction phenomenon of light.
于是,近年来一般进行以下方法:生成与旋转体(或者移动体)的缝间的信号同步的具有90度的相位差的A、B相的正弦模拟信号,将对该模拟信号进行内插处理后的信号和通过上述的缝而得到的信号进行合成,从而提高分辨率。Therefore, in recent years, the following method has been generally carried out: generating sinusoidal analog signals of A and B phases with a phase difference of 90 degrees synchronized with the signal between the slots of the rotating body (or moving body), and performing interpolation processing on the analog signals The final signal and the signal obtained through the above-mentioned slit are combined to improve the resolution.
为了进一步提高编码器的分辨率,需要提高内插处理的分辨率,即通过提高将模拟信号变换为数字信号的AD变换器的分辨率,从而可以提高整体的分辨率。该AD变换器可以内置于微型机(micro computer)或LSI,但被内置的AD变换器的分辨率再高也是10bit,此外,一般精度差,为了进一步提高分辨率,需要使用单体的AD变换器IC。In order to further increase the resolution of the encoder, it is necessary to increase the resolution of the interpolation process, that is, by increasing the resolution of an AD converter that converts an analog signal into a digital signal, the overall resolution can be increased. This AD converter can be built in a microcomputer (micro computer) or LSI, but the resolution of the built-in AD converter is 10bit, and the accuracy is generally poor. In order to further improve the resolution, a single AD converter is required. device IC.
AD变换器IC和微型机或LSI的接口有并行方式和串行方式,但是在小型化或成本的方面考虑,串行方式较有效。但是,串行方式存在发送数据的采样周期变长的课题。例如,在AD变换器的采样周期较长的情况下,在2相的正弦信号的频率变高时,每一周期的检测数减少,很难高精度地进行为了提高内插处理的精度所需的偏移、振幅、相位的校正。There are parallel and serial methods for the interface between the AD converter IC and the microcomputer or LSI, but the serial method is more effective in terms of miniaturization and cost. However, the serial method has a problem that the sampling cycle of transmission data becomes longer. For example, when the sampling cycle of the AD converter is long, when the frequency of the two-phase sinusoidal signal increases, the number of detections per cycle decreases, and it is difficult to accurately perform the interpolation processing required to improve the accuracy of the interpolation process. Correction of offset, amplitude, and phase.
作为解决这些问题的方式,例如在日本专利申请特开平7-218288公报中,采取这种方法:将频率变高时的2相的正弦信号的振幅的衰减系数预先存储在存储器中,改变振幅校正量以补偿衰减量。但是,该方法虽然可以对2相的正弦信号的衰减量进行校正,但若采样周期变长、2相的正弦信号的频率变高时,不能正确地检测最大值或最小值,校正值产生误差。As a way to solve these problems, for example, in Japanese Patent Application Laid-Open No. 7-218288, a method is adopted in which the attenuation coefficient of the amplitude of the two-phase sinusoidal signal when the frequency becomes higher is stored in memory in advance, and the amplitude correction factor is changed. amount to compensate for attenuation. However, although this method can correct the attenuation of the 2-phase sinusoidal signal, if the sampling period becomes longer and the frequency of the 2-phase sinusoidal signal becomes higher, the maximum or minimum value cannot be detected correctly, and an error occurs in the correction value. .
图10是表示在2相的正弦信号的频率高时的最大值和最小值的检测波形的图,图11是表示为了检测相位的误差量而检测2相的正弦信号的交点的波形的图。当频率较高时,因显现出AD变换器2的变换采样周期较长的影响,变换的正弦信号成为如图10以及图11的阶梯状,所以很难正确地检测最大值/最小值和相位误差。10 is a diagram showing detection waveforms of maximum and minimum values when the frequency of two-phase sinusoidal signals is high, and FIG. 11 is a diagram showing waveforms of intersections of two-phase sinusoidal signals detected for detecting phase error amounts. When the frequency is high, the transformed sinusoidal signal becomes stepped as shown in Fig. 10 and Fig. 11 due to the influence of the long conversion sampling period of the
在包括最大值/最小值和相位误差的状态下,对2相的正弦信号进行校正的波形成为如图12所示的失真的波形。在这样的高的频率的情况下,产生如下的课题:即使进行了振幅衰减系数的校正,也在偏移、振幅、相位的校正值中产生误差,内插处理的精度恶化。In a state including the maximum value/minimum value and a phase error, the waveform corrected for the two-phase sinusoidal signal becomes a distorted waveform as shown in FIG. 12 . In the case of such a high frequency, even if the amplitude attenuation coefficient is corrected, errors occur in correction values of offset, amplitude, and phase, and the accuracy of interpolation processing deteriorates.
发明内容 Contents of the invention
本发明的编码器信号的校正电路,用于编码器信号处理电路,具有以下结构。该编码器信号处理电路包括,AD变换器,将正交的A相和B相的正弦信号变换为数字数据,生成A1信号和B1信号;峰值检测器,检测A1信号和B1信号的最大值和最小值;偏移/振幅校正电路,使用由峰值检测器所检测的最大值和最小值,求出偏移以及振幅的校正值,校正偏移和振幅,生成A2信号和B2信号;相位误差检测器,检测A2信号和B2信号的相位误差量;相位校正电路,根据相位误差量,求出相位的校正值,生成相位差成为90度的A3信号和B3信号;位置数据变换电路,从A3信号和B3信号变换为位置数据,该编码器信号的校正电路包括:速度检测器,根据A相和B相的频率或位置数据,检测速度;校正判定电路,将偏移和振幅的校正值、和相位的校正值的更新设为有效或无效。The encoder signal correction circuit of the present invention is used in an encoder signal processing circuit and has the following structure. The encoder signal processing circuit includes an AD converter, which converts the quadrature A-phase and B-phase sinusoidal signals into digital data, and generates A1 signals and B1 signals; a peak detector, which detects the maximum value and sum of the A1 signals and B1 signals Minimum value; offset/amplitude correction circuit, using the maximum value and minimum value detected by the peak detector, calculate the correction value of offset and amplitude, correct the offset and amplitude, generate A2 signal and B2 signal; phase error detection The device detects the phase error amount of the A2 signal and the B2 signal; the phase correction circuit calculates the phase correction value according to the phase error amount, and generates the A3 signal and the B3 signal whose phase difference becomes 90 degrees; the position data conversion circuit obtains the A3 signal from the A3 signal and B3 signals are converted into position data, and the correction circuit of the encoder signal includes: a speed detector, which detects the speed according to the frequency or position data of the A phase and the B phase; The update of the phase correction value is enabled or disabled.
速度检测器中,根据A相和B相的检测频率或者位置数据的差分,检测速度,校正判定电路中,在速度在一次或者连续多次成为设定速度以上时,判定为高速,在速度在连续多次且比被判断为高速的次数多的次数为设定速度以下时,判定为低速,而且,在被判定为高速的速度上,将偏移和振幅的校正值、和相位的校正值的更新设为无效;在被判定为低速的速度上,将偏移和振幅的校正值、和相位的校正值的更新设为有效。In the speed detector, the speed is detected according to the difference between the detection frequency or position data of phase A and phase B. In the correction judgment circuit, when the speed exceeds the set speed once or several times in a row, it is judged to be high speed. When the number of consecutive times and more than the number of times judged as high speed is below the set speed, it is judged as low speed, and at the speed judged as high speed, the correction value of offset and amplitude, and the correction value of phase The update of the correction value of the offset and the amplitude and the correction value of the phase are made valid at the speed judged to be low.
根据本发明的编码器信号的校正电路,可以得到即使由于时效变化而2相的正弦信号的偏移或振幅、相位变动,也可以高精度地校正这些偏移量,并且在2相的正弦信号的频率较高的情况下,也不会因为采样周期的稀疏而受到影响的编码器信号的校正电路。According to the encoder signal correction circuit of the present invention, even if the offset, amplitude, and phase of the two-phase sinusoidal signal fluctuate due to aging changes, these offsets can be corrected with high precision, and the two-phase sinusoidal signal In the case of high frequency, the correction circuit of the encoder signal will not be affected by the sparse sampling period.
附图说明 Description of drawings
图1是在本发明的第一实施方式中的编码器电路的方框图。Fig. 1 is a block diagram of an encoder circuit in a first embodiment of the present invention.
图2是第一实施方式中的峰值检测器的动作波形的说明图。FIG. 2 is an explanatory diagram of an operation waveform of the peak detector in the first embodiment.
图3是第一实施方式中的相位误差检测器的动作波形的说明图。3 is an explanatory diagram of an operation waveform of the phase error detector in the first embodiment.
图4是在正弦信号的一个周期内的采样数为14的情况下,对不使用校正判定电路时正弦信号进行内插处理的结果的说明图。FIG. 4 is an explanatory diagram of a result of interpolation processing of a sinusoidal signal when the correction determination circuit is not used when the number of samples in one cycle of the sinusoidal signal is 14. FIG.
图5是第一实施方式中,在正弦信号的一个周期内的采样数为14的情况下,对正弦信号进行内插处理的结果的说明图。FIG. 5 is an explanatory diagram of a result of interpolation processing on a sinusoidal signal when the number of samples in one cycle of the sinusoidal signal is 14 in the first embodiment.
图6是第二实施方式中的编码器电路的方框图。Fig. 6 is a block diagram of an encoder circuit in the second embodiment.
图7是第二实施方式的速度检测器切换检测方法的方法的说明图。FIG. 7 is an explanatory diagram of a method of the speed detector switching detection method of the second embodiment.
图8是第二实施方式的检测方法1中的更新周期设定方法的说明图。FIG. 8 is an explanatory diagram of an update cycle setting method in
图9是第三实施方式中的编码器电路的方框图。Fig. 9 is a block diagram of an encoder circuit in a third embodiment.
图10是在以往例子中的检测高频率时的最大值/最小值的说明图。FIG. 10 is an explanatory diagram of maximum/minimum values when detecting a high frequency in a conventional example.
图11是在以往例子中的检测高频率时的相位误差的说明图。FIG. 11 is an explanatory diagram of a phase error when detecting a high frequency in a conventional example.
图12是在以往例子中的包括误差的状态下校正的正弦信号波形的说明图。FIG. 12 is an explanatory diagram of a sinusoidal signal waveform corrected in a state including errors in a conventional example.
具体实施方式 Detailed ways
(第一实施方式)(first embodiment)
使用图1至图5,说明本发明的编码器信号的相位校正电路。图1是表示包括偏移/振幅校正、相位校正的编码器信号处理电路的方框图,图2是表示峰值检测器的动作波形,图3是表示相位误差检测器的动作波形。The encoder signal phase correction circuit of the present invention will be described using FIGS. 1 to 5 . 1 is a block diagram showing an encoder signal processing circuit including offset/amplitude correction and phase correction, FIG. 2 shows an operation waveform of a peak detector, and FIG. 3 shows an operation waveform of a phase error detector.
在图1中,从编码器输出的原信号中模拟的A0信号和B0信号是具有90度的相位差的A相和B相的正弦信号。一般是由发光元件和受光元件和缝板构成。In FIG. 1 , the simulated A0 signal and B0 signal among the original signals output from the encoder are A-phase and B-phase sinusoidal signals having a phase difference of 90 degrees. Generally, it is composed of a light-emitting element, a light-receiving element and a slit plate.
发光元件使用LED或激光,受光元件使用光电二极管或光电晶体管。缝板是由透过光的玻璃或树脂材料做成,在缝板上设置截止光的格子状的掩模。被配置为,受光元件接受来自发光元件的光经由缝板所透过的光,因缝板被设置在编码器的旋转体上,所以被形成缝板的格子状的形状,使得在旋转时从受光元件输出正弦波形。LEDs or lasers are used as light-emitting elements, and photodiodes or phototransistors are used as light-receiving elements. The slit plate is made of glass or resin material that transmits light, and a grid-shaped mask that cuts off light is placed on the slit plate. The light-receiving element is configured so that the light from the light-emitting element passes through the slit plate. Since the slit plate is provided on the rotary body of the encoder, it is formed into a grid-like shape of the slit plate, so that when it is rotated from The light-receiving element outputs a sinusoidal waveform.
AD变换器2将从编码器输出的模拟信号A0信号、B0信号变换为数字信号。因从编码器输出的模拟信号的振幅为几百mV,所以使用放大器等放大十几倍,变换为符合AD变换器2的输入范围(range)的电压后利用,则可以提高数字信号的精度。The
峰值检测器15检测AD变换器2的输出信号即A1信号、B1信号的最大值/最小值。图2表示峰值检测器15的动作波形,使用该图说明最大值/最小值的检测方法。The
在图2中,|A1|信号和|B1|信号是分别将A1信号和B1信号绝对值变换的信号。检测|A1|信号和|B1|信号的交点,生成交点信号18a、18b、18c、18d。如图2所示地,该交点信号将一个周期分割为区域I~区域IV,在区域I是设为检测A1信号的最大值的区域,在区域II是设为检测B1信号的最小值的区域,在区域III是设为检测A1信号的最小值的区域,在区域IV是设为检测B1信号的最大值的区域。In FIG. 2 , the |A1| signal and the |B1| signal are signals obtained by converting the absolute values of the A1 signal and the B1 signal, respectively. Intersection points of the |A1| signal and the |B1| signal are detected to generate
说明区域I的动作,首先,当检测交点信号18a时,比较A1信号的上次值和本次值,在本次值大时,更新锁存数据16a(max),在本次值小时,不更新锁存数据16a(max)。在区域I的区间重复该动作,在检测到交点信号18b时,确定锁存数据16a(max)作为A1信号的最大值。因区域II、区域III、区域IV的动作与区域I相同,所以省略。这样,可以检测A1信号、B1信号的最大值/最小值。The operation of the area I is described. First, when the
偏移/振幅校正电路4使用由峰值检测器15所检测的最大值/最小值信号16,对A1信号和B1信号进行除去偏移和振幅的归一化。The offset/
使用最大值/最小值信号16,根据式1可求出A1信号和B1信号的偏移(OS_DETa、OS_DETb)。此外,如果将校正的偏移值设为OS_LEVEL、除去偏移后的信号设为A1d信号和B1d信号,则可根据式2除去偏移。Using the maximum/
使用最大值/最小值信号16,根据式3还可求出A1信号和B1信号的振幅值(PP_DETa、PP_DETb)。此外,如果将振幅的归一化大小设为K时,可根据式4,求出校正了偏移和振幅的误差的A2信号和B2信号。Using the maximum/
相位校正模块9是由相位校正电路6和相位误差检测器7构成,进行以下作用:由相位误差检测器7检测被校正了偏移/振幅的A2信号、B2信号的相位误差,根据由相位误差检测器7所检测的误差量,由相位校正电路6使用对A2信号、B2信号的相位误差进行校正的A校正信号、B校正信号,输出具有90度的相位差的A3信号、B3信号。The
使用图3说明这个动作的细节。图3是以A2信号为基准,仅B2信号的相位成为超前了α孤度的B2d信号的例子。振幅由偏移/振幅校正电路4归一化为K大小,所以A2信号、B2d信号的振幅成为K。The details of this operation are described using FIG. 3 . FIG. 3 is an example of a B2d signal in which the phase of only the B2 signal is advanced by α radians based on the A2 signal. The amplitude is normalized to K by the offset/
相位误差检测器7检测在检测到交点信号18a、18b、18c、18d时的A2信号、B2d信号的交点的大小,根据该交点值运算处理并导出相位校正量。A2信号、B2d信号可以如式5那样表示。此时的A2信号、B2d信号的交点在(π/4-α/2)孤度、(5π/4-α/2)孤度相交,其交点的大小成为Ksin(π/4-α/2)、Ksin(5π/4-α/2)。The
因相互的大小相等,所以在设为C45=Ksin(π/4-α/2)、C225=Ksin(5π/4-α/2)时,可根据式6求出相位误差α/2。此外,因式6是以A2信号为基准而求出B校正信号,所以根据sin-1的式子计算,但明显也可以以B2d信号为基准,根据cos-1的式子而求出。Since they are equal in magnitude, the phase error α/2 can be obtained from
此外,相位校正电路6可根据式7、式8来校正相位误差。其中,Kp1、Kp2是用于得到A校正信号、B校正信号的相位校正增益,设定相位校正增益,以使A3信号和B3信号的相位差成为90度。In addition, the
A3=A2+Kp1·B2d=Ksinθ+Kp1·Kcos(θ+α) ......(式7)A3=A2+Kp1·B2d=Ksinθ+Kp1·Kcos(θ+α) ......(Formula 7)
B3=B2d+Kp2·A2=Kcos(θ+α)+Kp2·Ksinθ ......(式8)B3=B2d+Kp2·A2=Kcos(θ+α)+Kp2·Ksinθ ......(Formula 8)
接着,说明Kp1以及Kp2的求出方法。在式7中,因在θ=-α/2时,只要使A3信号成为0即可,所以Kp1可根据式9求出。Next, a method of calculating Kp1 and Kp2 will be described. In
此外,同样在式8中,因在θ=π/2-α/2时,只要使B3成为0即可,所以Kp2可根据式10求出。In addition, in Equation 8 as well, when θ=π/2−α/2, it is only necessary to set B3 to 0, so Kp2 can be obtained from
因根据式9和式10所求出的Kp1和Kp2可以由相同式表示,所以计算处理的负担减半。A2信号、B2信号(B2d信号)根据式6求出α/2,根据式9或式10求出相位校正增益,通过使用式7和式8可以得到校正了相位的偏移量的A3信号、B3信号。Since Kp1 and Kp2 obtained from
接着,说明校正了相位的A3信号、B3信号的大小。式7和式8的振幅的最大值分别为θ=π/2-α/2、θ=-α/2的点,所以把这些带入式7和式8,则A3信号、B3信号成为式11和式12,可以以如图3所示的相同的大小来进行校正。在2相信号的一个周期内存在两个交点,所以也可以对在各个的交点所求出的Kp进行平均处理来使用。Next, the magnitudes of the phase-corrected A3 signal and B3 signal will be described. The maximum values of the amplitudes of
接着,说明位置数据变换电路10。使用具有90度的相位差的A3信号、B3信号,使用式13,则可以容易地变换为位置数据(内插的角度数据)θIP(14)。Next, the position
θIP=tan-1(A3/B3)......(式13)θIP=tan -1 (A3/B3)...(Formula 13)
接着,说明本发明的校正值更新电路23。校正值更新电路23由速度检测器21和校正判定电路22构成。速度检测器21根据2相的正弦信号的频率输出检测速度19。将输入的正弦信号A0信号或B0信号与各自的中心值进行比较并变换为矩形波,由计数器对矩形波的边缘间隔的时间进行测定,从而检测周期,可根据检测值运算频率。而且,可根据被运算的频率来运算并输出速度。Next, the correction
作为其他的方法,在一定周期内对位置数据14进行采样,通过在每个周期内取得与上次更新时的数据的差分,可以检测速度。校正判定电路22首先接受从速度检测器21输出的检测速度19,在检测速度与某个设定速度相比连续2次以上超过时,判定为高速;在检测速度与设定速度相比连续4次以上未超过时,判定为低速。As another method, the
其中,将判定为高速的次数A和判定为低速的次数B设为不同次数,将次数A设定为1次以上,次数B设定为大于次数A的次数。这样,可以成为防止了在设定频率附近的高速/低速的频繁切换的稳定的判定动作。Here, the number of times A determined to be high speed and the number B of times determined to be low speed are set to be different times, and the number of times A is set to 1 or more times, and the number of times B is set to be higher than the number of times A. In this way, it is possible to achieve a stable determination operation that prevents frequent switching between high speed and low speed near the set frequency.
此外,也可以使这里设定的速度具有磁滞特性,与从低速切换为高速的速度相比,将从高速切换为低速的速度设定得低,这样可以成为稳定的判定动作。In addition, the speed set here may have a hysteresis characteristic, and the speed for switching from high speed to low speed may be set lower than the speed for switching from low speed to high speed, so that a stable determination operation can be achieved.
接着,为了在将速度19判定为高速的情况下,不进行偏移和振幅和相位的校正值的更新,将校正值更新信号20(例如,在将校正值的更新设为无效的情况下为L信号)输出到峰值检测器15和相位误差检测器7。Next, in order not to update the correction values of the offset, amplitude, and phase when the
此外,为了在判定为低速的情况下,进行偏移和振幅和相位的校正值的更新,将校正值更新信号20(例如,在将校正值的更新设为有效的情况下为H信号)输出到峰值检测器15和相位误差检测器7。切换校正值更新信号的速度(判定速度为高速/低速的速度)设定为能够正确地检测校正值的值。In addition, in order to update the correction values of the offset, amplitude, and phase when it is determined that the speed is low, a correction value update signal 20 (for example, an H signal when the update of the correction value is enabled) is output. to peak
设定的基准是,将速度设定为在2相的正弦信号的一个周期期间能够检测72分割(每5度采样)以上,则可以将校正值的误差抑制得较小。在2相的正弦信号由于温度或电源电压、噪声的影响而容易变动的情况下,虽然编码器的位置检测精度会恶化,但可以将分割数设定(例如,每10度采样)得较小。The standard of setting is that if the speed is set so that 72 divisions (sampling every 5 degrees) or more can be detected during one cycle of the two-phase sinusoidal signal, the error of the correction value can be suppressed to be small. When the 2-phase sinusoidal signal is likely to fluctuate due to the influence of temperature, power supply voltage, or noise, the position detection accuracy of the encoder will deteriorate, but the number of divisions (for example, sampling every 10 degrees) can be set smaller .
图4以及图5是表示在正弦信号的一个周期内的采样数为14次的情况下,对2相的正弦信号进行内插处理的结果,都是在高频动作状态下,在正弦波的一个周期内,AD变换器2的采样为14次的情况。Figures 4 and 5 show the results of interpolation processing on 2-phase sinusoidal signals when the number of samples in one cycle of the sinusoidal signal is 14. In one cycle, the sampling of the
图4是在以往方法中没有校正判定电路的情况,图5是设置了本发明的校正判定电路,将校正值的更新设为无效的情况下的波形。在以往方法中校正值的检测不能正常地进行,所以采样间的差存在离散,但在本发明的方法中可为大致一定。FIG. 4 shows the case where there is no correction judgment circuit in the conventional method, and FIG. 5 shows waveforms when the correction judgment circuit of the present invention is provided and update of the correction value is disabled. In the conventional method, detection of the correction value cannot be performed normally, so the difference between samples varies, but it can be substantially constant in the method of the present invention.
如上所述,通过第一实施方式的电路结构和运算处理,可以得到即使由于时效变化而2相的正弦信号的偏移或振幅、相位变动,也可以高精度地校正这些偏差,并且在2相的正弦信号的频率较高的情况下,也不会因为采样周期的稀疏而受到影响的高分辨率的编码器。As described above, with the circuit configuration and arithmetic processing of the first embodiment, even if the offset, amplitude, and phase of the two-phase sinusoidal signal fluctuate due to aging changes, these deviations can be corrected with high precision, and the two-phase When the frequency of the sinusoidal signal is high, it is a high-resolution encoder that will not be affected by the sparse sampling period.
(第二实施方式)(second embodiment)
使用图6至图8,说明本发明的第二实施方式。与第一实施方式不同的是在低速时和高速时切换速度的检测方法,对此进行详细说明。A second embodiment of the present invention will be described using FIGS. 6 to 8 . The difference from the first embodiment is that the speed detection method is switched between low speed and high speed, which will be described in detail.
图6是第二实施方式的结构图,校正值判定电路22通过速度判定将表示高速(例如,高电平信号)/低速(例如,低电平信号)的状态的速度判定信号30输出到速度检测器21。6 is a block diagram of the second embodiment, and the correction
图7是表示由速度检测器切换检测方法的方法的图,速度判定信号30在检测速度在连续2次以上速度更新周期成为设定速度Vc以上时,判定为高电平(高速),在连续4次成为Vc以下时,判定为低电平(低速)。7 is a diagram showing a method for switching the detection method by the speed detector. The
速度检测器在速度判定信号为低电平的期间是使用以一定周期对位置数据14进行采样,根据采样间的差分检测速度的检测方法1;在高电平的期间是使用根据由A0信号和B0信号和各自的中心值所生成的矩形波的边缘间隔的时间检测速度的检测方法2。The speed detector uses the
这是因为,检测方法2是通过检测A0信号和B0信号的边缘间隔的时间来检测速度,所以根据频率速度的更新周期改变,随着速度减小而更新周期变长,速度判定信号的响应性变差,但在检测方法1中,可以任意地决定更新周期,更新周期不依赖于速度而成为一定的周期,所以通过在低速时使用检测方法1,从而可以不会损失低速时的速度判定信号的响应性,得到稳定的输出。This is because the
而且,设定检测方法1的更新周期,以使检测方法1和检测方法2的更新周期相同的速度成为设定速度Vc,从而从低速切换为高速时的响应性和从高速切换为低速时的响应性相同,可以得到更稳定的速度判定信号的输出。Also, set the update cycle of
使用图8说明检测方法1的更新周期的设定方法。图8的曲线A-Ad是检测方法2的更新周期为Tu2[s],将速度设为V[r/min]、一次旋转中的A0信号和B0信号的边缘数设为P时,可根据式14来求出。The setting method of the update period of
Tu2=1/(V/60×P) ......(式14)Tu2=1/(V/60×P) ......(Formula 14)
直线B-Bd是检测方法1的更新周期,且更新周期为Tu1[s]。根据式15设定Tu1,以使曲线A-Ad和直线B-Bd的交点C的速度成为设定速度Vc,从而Vc上的检测方法1和检测方法2的更新周期成为相同的周期。The straight line B-Bd is the update period of
Tu1=1/(Vc/60×P) ......(式15)Tu1=1/(Vc/60×P) ......(Formula 15)
如上所述,通过将第二实施方式的速度检测器21的速度检测方法在低速时和高速时进行切换,可以得到稳定的速度判定信号,可以更正确地切换稳定的校正值的有效或无效,因此可以得到抗时效变化,并且在2相的正弦信号的频率较高的情况下,也不会因为采样周期的稀疏而受到影响的高分辨率的编码器。As described above, by switching the speed detection method of the
(第三实施方式)(third embodiment)
使用图9,说明本发明的第三实施方式。与第二实施方式不同的是,在校正判定电路22具有2种用于判定的设定速度,对这个进行详细说明。A third embodiment of the present invention will be described using FIG. 9 . The difference from the second embodiment is that the
校正判定电路22可以分别单独地设定使偏移和振幅的校正值、和相位的校正值的更新为有效或无效的信号。当速度变高时,2相的正弦信号A0信号和B0信号的频率变高,AD变换器2的采样周期长,所以检测间隔稀疏。The
对于在峰值检测器15检测的2相的正弦信号的A1信号、B1信号,因峰值周围的值的大小的变化较小,所以很难受到采样周期的稀疏所产生的影响。因此,可以在校正判定电路22中,较高地设定用于决定偏移和振幅的校正值的更新的第1设定速度。Since the A1 signal and the B1 signal of the two-phase sinusoidal signal detected by the
例如,即使产生±8度的偏移量,峰值也才衰减1%。在可允许1%的变动的系统中,将2相的正弦信号的每一周期的采样数可以允许到成为22.5(360/16)的频率为止。相位的校正值检测2相的正弦信号的A2信号和B2信号的交点,在该交点值变动1%时,角度的范围成为±0.6度。因此,在校正判定电路22中与第1设定频率相比,较低地设定用于决定相位的校正值的更新的第2设定速度。For example, even with an offset of ±8 degrees, the peak is only attenuated by 1%. In a system where a 1% variation is allowable, the number of samples per cycle of the two-phase sinusoidal signal can be allowed up to a frequency of 22.5 (360/16). The phase correction value detects the intersection point of the A2 signal and the B2 signal of the two-phase sinusoidal signals, and when the value of the intersection point varies by 1%, the range of the angle becomes ±0.6 degrees. Therefore, in the
如上所述,通过采用将在第三实施方式的校正判定电路22中的设定速度单独地设定为偏移和振幅校正用和相位校正用的2种结构,可以减小2相的正弦信号A0信号、B0信号的振幅变动,所以可以得到抗时效变化,并且在2相的正弦信号的频率高的情况下,不会因为采样周期的稀疏而受到影响的高分辨率的编码器。As described above, by adopting two configurations in which the set speed in the
(第四实施方式)(fourth embodiment)
说明本发明的第四实施方式。与第一至第三实施方式不同的是,校正判定电路22构成为,判定将偏移和振幅的校正值或者相位的校正值的哪一个校正值的更新设为有效或者无效,对其详细进行说明。A fourth embodiment of the present invention will be described. The difference from the first to third embodiments is that the
在2相的正弦信号的A0信号和B0信号的频率较低的系统中,如前所述,可以忽略振幅的变动,所以将偏移和振幅的校正值的更新始终设为有效也没有问题。此时,仅检测相位校正的校正值的更新设为有效还是无效。In a system in which the frequencies of the A0 signal and the B0 signal of the two-phase sinusoidal signals are low, as described above, amplitude fluctuations can be ignored, so there is no problem in always enabling the update of the offset and amplitude correction values. At this time, only whether the update of the correction value of the phase correction is enabled or disabled is detected.
此外,在直线标度元件(linear scale)等中,存在相位的偏移量由格子状的缝板的精度决定的情况,此时,相位校正电路6不进行相位校正处理,仅进行偏移和振幅校正即可。校正判定电路22判定偏移和振幅的校正值的更新为有效和无效即可。In addition, in a linear scale or the like, there may be cases where the amount of phase shift is determined by the accuracy of the grid-shaped slit plate. In this case, the
如上所述,可以得到校正判定电路22也可以构成为判定偏移和振幅的校正值的更新为有效或无效、相位校正值的更新为有效或无效中的哪一个的更新为有效或无效,因为可以使电路规模抑制得较小,所以可减少成本,抗时效变化,并且在2相的正弦信号的频率高的情况下,不会因为采样周期的稀疏而受到影响的高分辨率的编码器。As described above, it can be obtained that the
另外,从第一实施方式到第四实施方式,将2相信号作为正弦波来说明,但也可以用相同的结构对在波形存在失真的伪正弦波、三角波进行相位的校正。In addition, in the first to fourth embodiments, the two-phase signal is described as a sine wave, but the phase of a pseudo sine wave or a triangular wave having distortion in the waveform can be corrected with the same configuration.
Claims (4)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006238484A JP4240090B2 (en) | 2006-09-04 | 2006-09-04 | Encoder signal correction circuit |
JP238484/06 | 2006-09-04 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101140170A CN101140170A (en) | 2008-03-12 |
CN100582676C true CN100582676C (en) | 2010-01-20 |
Family
ID=39192218
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200710147204A Active CN100582676C (en) | 2006-09-04 | 2007-08-30 | Correction circuit for encoder signal |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP4240090B2 (en) |
CN (1) | CN100582676C (en) |
Families Citing this family (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101709983B (en) * | 2009-10-30 | 2012-04-25 | 大连光洋科技工程有限公司 | On-line actual error compensation system of sine and cosine encoder |
JP5936479B2 (en) * | 2012-08-03 | 2016-06-22 | キヤノン株式会社 | Measuring apparatus, lithography apparatus, and article manufacturing method |
JP5936478B2 (en) * | 2012-08-03 | 2016-06-22 | キヤノン株式会社 | Measuring apparatus, lithography apparatus, and article manufacturing method |
KR101335162B1 (en) | 2012-11-19 | 2013-12-02 | 한밭대학교 산학협력단 | Position aberration correction device and method for resolver |
CN106352824B (en) * | 2016-08-31 | 2019-01-25 | 沈阳东软医疗系统有限公司 | A kind of means for correcting of Suspenoing apparatus movement position and bearing calibration |
WO2019142875A1 (en) * | 2018-01-19 | 2019-07-25 | 日本精工株式会社 | Electric power steering device and rotation angle detection method |
US10642243B2 (en) | 2018-03-01 | 2020-05-05 | Semiconductor Components Industries, Llc | Methods and apparatus for an encoder |
CN109163751B (en) * | 2018-08-27 | 2020-07-28 | 珠海格力电器股份有限公司 | Control device and method of encoder and encoder |
CN112033451A (en) * | 2020-08-03 | 2020-12-04 | 珠海格力电器股份有限公司 | Measuring device and method of encoder and encoder |
JP7646372B2 (en) | 2021-01-20 | 2025-03-17 | キヤノン株式会社 | Method, program, information processing device, and system for calculating position or angle of test object |
JP2023009590A (en) * | 2021-07-07 | 2023-01-20 | 日本精工株式会社 | Rotation angle detection device, motor control device, electric actuator product, electric power steering device, and rotation angle detection method |
-
2006
- 2006-09-04 JP JP2006238484A patent/JP4240090B2/en active Active
-
2007
- 2007-08-30 CN CN200710147204A patent/CN100582676C/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN101140170A (en) | 2008-03-12 |
JP4240090B2 (en) | 2009-03-18 |
JP2008058252A (en) | 2008-03-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100582676C (en) | Correction circuit for encoder signal | |
CN101131329B (en) | Processing circuit for coder signal | |
TWI413780B (en) | The phase correction circuit of the encoder signal | |
EP3401644B1 (en) | Encoder output signal correction apparatus and method | |
US9255817B2 (en) | Rotation-angle detection device, image processing apparatus, and rotation-angle detection method | |
CN110940371B (en) | Calibration method, device and equipment of rotary magnetoelectric encoder | |
JP2008107235A (en) | Rotation angle detector | |
JP2014025871A (en) | Encoder output signal correction apparatus | |
US9200928B2 (en) | Position detector | |
JP2008002904A (en) | Device and program for calculating amplitude of output signal of encoder | |
Ye et al. | Development of a digital interpolation module for high-resolution sinusoidal encoders | |
JP2008304249A (en) | Encoder signal processing device and its signal processing method | |
US10024688B2 (en) | Angle detection device and angle detection method | |
US7099790B2 (en) | Sensor signal processor | |
JP5115419B2 (en) | Optical encoder | |
JP2011064459A (en) | Correction circuit of encoder signal | |
JP4780038B2 (en) | Encoder signal processing circuit | |
JP4224677B2 (en) | Optical encoder position detection method | |
WO2011070391A1 (en) | Method for estimating the angular position, measuring device and sensor bearing | |
JP5162739B2 (en) | Encoder signal processing method, encoder device, and servo motor | |
JP2006090741A (en) | Output signal correction apparatus and method of encoder | |
CN110785633B (en) | Encoder | |
JP5212452B2 (en) | Rotation sensor | |
JP2017142167A (en) | Position detection device and position detection method | |
JP2004317262A (en) | Measuring device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |