JP2013205143A - Encoder device and method for detecting abnormality of position data - Google Patents

Encoder device and method for detecting abnormality of position data Download PDF

Info

Publication number
JP2013205143A
JP2013205143A JP2012072923A JP2012072923A JP2013205143A JP 2013205143 A JP2013205143 A JP 2013205143A JP 2012072923 A JP2012072923 A JP 2012072923A JP 2012072923 A JP2012072923 A JP 2012072923A JP 2013205143 A JP2013205143 A JP 2013205143A
Authority
JP
Japan
Prior art keywords
processing
difference value
position data
data
value data
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
JP2012072923A
Other languages
Japanese (ja)
Other versions
JP5943670B2 (en
Inventor
Hitoshi Joko
均 上甲
Keiji Osada
圭司 長田
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.)
Nidec Sankyo Corp
Original Assignee
Nidec Sankyo Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nidec Sankyo Corp filed Critical Nidec Sankyo Corp
Priority to JP2012072923A priority Critical patent/JP5943670B2/en
Publication of JP2013205143A publication Critical patent/JP2013205143A/en
Application granted granted Critical
Publication of JP5943670B2 publication Critical patent/JP5943670B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an encoder device capable of enhancing accuracy in abnormality detection of unprocessed position data outputted by an encoder.SOLUTION: An encoder device includes an encoder; and a position data processing part 4 which generates processed position data by processing unprocessed position data outputted by the encoder. The position data processing part 4 calculates unprocessed one-step difference value data which is a difference value of the unprocessed position data acquired for each predetermined sampling period and also calculates two-step difference value data which is a difference value of the unprocessed one-step difference value data for each sampling period. When the unprocessed one-step difference value data is within a predetermined first reference range and the two-step difference value data is within a predetermined second reference range, the unprocessed position data is determined to be normal. When the unprocessed one-step difference value data is out of the first reference range, and/or the two-step difference value data is out of the second reference range, the unprocessed position data is determined to be abnormal.

Description

本発明は、回転体の回転角度等を検出するためのエンコーダ装置に関する。また、本発明は、回転体の回転角度等を検出するためのエンコーダ装置における位置データの異常検出方法に関する。   The present invention relates to an encoder device for detecting a rotation angle or the like of a rotating body. The present invention also relates to an abnormality detection method for position data in an encoder device for detecting a rotation angle or the like of a rotating body.

従来、モータの回転角度を検出するためのエンコーダと、エンコーダで検出された位置データに基づいてモータを制御するACサーボドライバとが広く利用されている。エンコーダで検出された位置データは、エンコーダからACサーボドライバへ送られる際の電磁ノイズ等の影響で、ビット誤りが生じて、誤った位置データとなることがある。ACサーボドライバへ送られる位置データが誤った位置データであると、回転中のモータの挙動が不安定になり、モータの回転ムラや振動が発生するおそれがある。   Conventionally, an encoder for detecting the rotation angle of a motor and an AC servo driver for controlling the motor based on position data detected by the encoder are widely used. The position data detected by the encoder may become erroneous position data due to a bit error due to electromagnetic noise or the like when it is sent from the encoder to the AC servo driver. If the position data sent to the AC servo driver is incorrect position data, the behavior of the rotating motor becomes unstable, and there is a possibility that the rotation unevenness and vibration of the motor may occur.

そこで、従来、エンコーダからACサーボドライバへ送られる際の電磁ノイズ等の影響で、エンコーダで検出された位置データが誤った位置データになったことを検出して(すなわち、位置データの異常を検出して)、正しい位置データを推定することが可能となる検出位置データのビット誤り検出・推定方法が提案されている(たとえば、特許文献1参照)。   Therefore, conventionally, it is detected that the position data detected by the encoder has become incorrect position data due to the influence of electromagnetic noise or the like sent from the encoder to the AC servo driver (that is, the position data is detected to be abnormal). Thus, there has been proposed a bit error detection / estimation method for detected position data that makes it possible to estimate correct position data (see, for example, Patent Document 1).

特許文献1に記載のビット誤り検出・推定方法では、使用時におけるモータの最大回転数とエンコーダ分解能Nとからサンプリング周期hの間の最大位置変化量を算出するとともに、今回のサンプリング時の位置データpos#bと前回のサンプリング時の位置データpos#aとの変化量(差分)の絶対値であるpos#s1と、エンコーダの分解能Nとpos#s1との変化量の絶対値であるpos#s2とを算出している。そして、pos#s1およびpos#s2がサンプリング周期h間の最大位置変化量を超えている場合には、pos#bの中に大きなビット誤りがあると判定している。すなわち、pos#s1およびpos#s2がサンプリング周期h間の最大位置変化量を超えているか否かを判定することで、エンコーダからACサーボドライバへ送られる際の電磁ノイズ等の影響で、位置データに異常が生じたことを検出している。   In the bit error detection / estimation method described in Patent Document 1, the maximum position change amount during the sampling period h is calculated from the maximum rotational speed of the motor and the encoder resolution N at the time of use, and the position data at the time of this sampling is calculated. pos # s1, which is the absolute value of the change amount (difference) between pos # b and the position data pos # a at the previous sampling, and pos #, which is the absolute value of the change amount between the encoder resolution N and pos # s1. s2 is calculated. When pos # s1 and pos # s2 exceed the maximum position change amount during the sampling period h, it is determined that there is a large bit error in pos # b. That is, by determining whether pos # s1 and pos # s2 exceed the maximum position change amount during the sampling period h, the position data is influenced by the influence of electromagnetic noise or the like when sent from the encoder to the AC servo driver. It is detected that an abnormality has occurred.

また、このビット誤り検出・推定方法では、位置データに異常が生じたことが検出されると、前回のサンプリング時の位置データpos#aと、前回のサンプリング周期h間の速度Vbと、サンプリング周期hとを用いた下記の式に基づいて、正しい位置データpos#bsを推定している。
pos#bs=pos#a+Vb×h
また、ACサーボドライバは、推定された位置データpos#bsに基づいてモータを制御している。
Further, in this bit error detection / estimation method, when it is detected that an abnormality has occurred in the position data, the position data pos # a at the previous sampling, the speed Vb during the previous sampling period h, and the sampling period The correct position data pos # bs is estimated based on the following equation using h.
pos # bs = pos # a + Vb × h
The AC servo driver controls the motor based on the estimated position data pos # bs.

特開2004−37246号公報JP 2004-37246 A

しかしながら、特許文献1に記載のビット誤り検出・推定方法では、位置データの変化量であるpos#s1およびpos#s2のみに基づいて、位置データに異常が生じたことが検出されているため、位置データの異常検出精度が高いとはいえない。位置データの異常検出精度が低いと、位置データに異常が生じているにもかかわらず、その異常が検出されないため、正しい位置データを推定することができず、モータを滑らかに回転させることが困難になるおそれがある。   However, in the bit error detection / estimation method described in Patent Document 1, it is detected that an abnormality has occurred in the position data based only on pos # s1 and pos # s2, which are changes in position data. It cannot be said that the position data abnormality detection accuracy is high. If the position data abnormality detection accuracy is low, the position data cannot be detected even though there is an abnormality in the position data, so the correct position data cannot be estimated and it is difficult to rotate the motor smoothly. There is a risk of becoming.

そこで、本発明の課題は、エンコーダが出力する処理前の位置データ(処理前位置データ)の異常検出の精度を高めることが可能なエンコーダ装置を提供することにある。また、本発明の課題は、処理前位置データの異常検出の精度を高めることが可能となる位置データの異常検出方法を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide an encoder device that can improve the accuracy of abnormality detection of position data before processing (position data before processing) output from an encoder. Another object of the present invention is to provide a position data abnormality detection method capable of improving the accuracy of abnormality detection of pre-processing position data.

上記の課題を解決するため、本発明のエンコーダ装置は、エンコーダと、エンコーダが出力する処理前位置データを処理して処理後位置データを生成する位置データ処理部とを備え、位置データ処理部は、所定のサンプリング周期ごとに取得される処理前位置データの差分値である処理前1階差分値データを算出し、サンプリング周期ごとに処理前1階差分値データの差分値である2階差分値データを算出し、処理前1階差分値データが所定の第1基準範囲内にあり、かつ、2階差分値データが所定の第2基準範囲内にあるときに、処理前位置データは正常であると判定し、処理前1階差分値データが第1基準範囲から外れているとき、および/または、2階差分値データが第2基準範囲から外れているときに、処理前位置データが異常であると判定することを特徴とする。   In order to solve the above problems, an encoder apparatus according to the present invention includes an encoder, and a position data processing unit that processes post-processing position data output from the encoder and generates post-processing position data. The first floor difference value data before processing, which is the difference value of the position data before processing acquired every predetermined sampling cycle, is calculated, and the second floor difference value, which is the difference value of the first floor difference value data before processing, for each sampling cycle. When the first floor differential value data before processing is within the predetermined first reference range and the second floor differential value data is within the predetermined second reference range, the position data before processing is normal. The position data before processing is abnormal when it is determined that there is, and the first floor differential value data before processing is out of the first reference range and / or when the second floor differential value data is out of the second reference range. In And judging a.

本発明のエンコーダ装置では、位置データ処理部は、処理前1階差分値データと2階差分値データとを算出し、処理前1階差分値データが第1基準範囲から外れているとき、および/または、2階差分値データが第2基準範囲から外れているときに、処理前位置データが異常であると判定している。すなわち、本発明では、処理前位置データの差分値である処理前1階差分値データに加え、処理前1階差分値データの差分値である2階差分値データを用いて、処理前位置データの異常を検出している。そのため、本発明では、処理前1階差分値データのみを用いて処理前位置データの異常を検出する場合と比較して、処理前位置データの異常検出の精度を高めることが可能になる。   In the encoder device of the present invention, the position data processing unit calculates the first-order difference value data and the second-order difference value data before processing, and the first-order difference value data before processing is out of the first reference range; and / Or When the second-order difference value data is out of the second reference range, it is determined that the pre-processing position data is abnormal. That is, in the present invention, the pre-processing position data is used by using the second-order difference value data that is the difference value of the pre-processing first-order difference value data in addition to the pre-processing first-order difference value data that is the difference value of the pre-processing position data. An abnormality is detected. Therefore, in the present invention, it is possible to increase the accuracy of detecting the abnormality of the pre-processing position data as compared with the case of detecting the pre-processing position data abnormality using only the pre-processing first-order difference value data.

本発明において、位置データ処理部は、サンプリング周期において、前回、生成された処理後位置データと、今回、取得された処理前位置データとの差分値である処理前後1階差分値データを算出するとともに、処理前位置データが正常であると判定すると、サンプリング周期において、今回、算出された処理前後1階差分値データを用いて、今回の処理後位置データを生成し、処理前位置データが異常であると判定すると、サンプリング周期において、前回までに算出された所定個数の処理前後1階差分値データの平均値を、今回の処理前後1階差分値データと推定し、この平均値を用いて、今回の処理後位置データを生成することが好ましい。   In the present invention, the position data processing unit calculates first and second floor differential value data before and after processing, which is a difference value between the previously generated post-processing position data and the current pre-processing position data acquired this time in the sampling period. At the same time, if it is determined that the pre-processing position data is normal, the current post-processing position data is generated using the first-order differential value data before and after the processing calculated in the sampling period, and the pre-processing position data is abnormal. If it is determined that, in the sampling period, the average value of the first-order difference value data before and after the processing of the predetermined number calculated up to the previous time is estimated as the first-order difference value data before and after the current process, and this average value is used. It is preferable to generate the post-processing position data this time.

このように構成すると、処理前位置データが正常であれば、今回、取得された処理前位置データに基づいて、今回の処理後位置データが生成されるため、たとえば、エンコーダによってモータの回転角度が検出される場合には、モータの回転特性に悪影響が及ぶのを防止することが可能になる。また、このように構成すると、処理前位置データが異常であれば、前回までに算出された所定個数の処理前後1階差分値データの平均値に基づいて、今回の処理後位置データが生成されるため、たとえば、エンコーダによってモータの回転角度が検出される場合には、異常な処理前位置データに基づいて生成される処理後位置データに起因してモータの挙動が不安定になるといった現象(具体的には、モータの振れや振動等)の発生を防止することが可能になる。   With this configuration, if the pre-processing position data is normal, the current post-processing position data is generated based on the pre-processing position data acquired this time. When detected, it is possible to prevent adverse effects on the rotational characteristics of the motor. Also, with this configuration, if the pre-processing position data is abnormal, the current post-processing position data is generated based on the average value of the first-order differential value data before and after the predetermined number calculated up to the previous time. Therefore, for example, when the rotation angle of the motor is detected by an encoder, the phenomenon that the behavior of the motor becomes unstable due to post-processing position data generated based on abnormal pre-processing position data ( Specifically, it is possible to prevent the occurrence of motor vibration or vibration).

本発明において、位置データ処理部は、たとえば、処理前位置データが正常であると判定すると、サンプリング周期において、今回、算出された処理前後1階差分値データと、前回までに算出された処理前後1階値差分値データとの総和を算出して、今回の処理後位置データを生成し、処理前位置データが異常であると判定すると、サンプリング周期において、前回までに算出された所定個数の処理前後1階差分値データの平均値と、前回までに算出された処理前後1階値差分値データとの総和を算出して、今回の処理後位置データを生成する。   In the present invention, for example, when the position data processing unit determines that the pre-processing position data is normal, the first-order difference value data before and after the process calculated this time and the before and after the process calculated up to the previous time in the sampling period If the sum of the first-order difference value data is calculated, the current post-processing position data is generated, and it is determined that the pre-processing position data is abnormal, the predetermined number of processes calculated up to the previous time in the sampling period The sum of the average value of the previous and subsequent first-order difference value data and the previous and subsequent first-order difference value data calculated up to the previous time is calculated, and the current post-processing position data is generated.

本発明において、位置データ処理部は、サンプリング周期において、前回、生成された処理後位置データと、今回、取得された処理前位置データとの差分値である処理前後1階差分値データを算出するとともに、処理前後1階差分値データが所定の第3基準値以内であると、サンプリング周期において、今回、算出された処理前後1階差分値データを用いて、今回の処理後位置データを生成し、処理前後1階差分値データが第3基準値を超えていると、サンプリング周期において、前回までに算出された所定個数の処理前後1階差分値データの平均値を、今回の処理前後1階差分値データと推定し、この平均値を用いて、今回の処理後位置データを生成することが好ましい。   In the present invention, the position data processing unit calculates first and second floor differential value data before and after processing, which is a difference value between the previously generated post-processing position data and the current pre-processing position data acquired this time in the sampling period. At the same time, if the first and second floor difference value data before and after processing is within a predetermined third reference value, the current post-processing position data is generated using the first and second floor difference value data calculated before and after the sampling period in the sampling period. If the first and second floor difference value data before and after processing exceeds the third reference value, the average value of the predetermined number of first and second floor difference data calculated before and after the previous processing is calculated in the sampling period. It is preferable to estimate the difference value data and use this average value to generate the current post-processing position data.

今回算出された処理前後1階差分値データが第3基準値を超えている場合(すなわち、今回算出された処理前後1階差分値データが想定した値よりも大きくなっている場合)には、今回取得された処理前位置データが異常であることが想定されるとともに、前回生成された処理後位置データが所定個数の処理前後1階差分値データの平均値を用いて生成された推定値であると想定され、この推定された処理後位置データが正常な処理前位置データに対して大きくかけ離れた値となっていることが想定される。推定された前回のサンプリング時の処理後位置データが正常な処理前位置データに対して大きくかけ離れた値となっている場合に、推定された前回のサンプリング時の処理後位置データに基づいて算出される今回の処理前後1階差分値データに基づいて、今回の処理後位置データが生成されると、生成された今回の処理後位置データが正しい処理後位置データからさらに大きくかけ離れた値になるおそれがある。   If the first floor difference value data before and after the process calculated this time exceeds the third reference value (that is, if the first floor difference value data before and after the process calculated this time is larger than the assumed value), The pre-processing position data acquired this time is assumed to be abnormal, and the post-processing position data generated last time is an estimated value generated using the average value of the first-order difference data before and after the predetermined number of processes. It is assumed that the estimated post-processing position data is a value far from the normal pre-processing position data. Calculated based on the estimated post-processing position data at the previous sampling when the estimated post-processing position data at the previous sampling is significantly different from the normal pre-processing position data. If the current post-processing position data is generated based on the first-stage difference value data before and after the current processing, the generated current post-processing position data may become a value far from the correct post-processing position data. There is.

したがって、今回算出された処理前後1階差分値データが所定の基準値を超えている場合に、サンプリング周期において、前回までに算出された所定個数の処理前後1階差分値データの平均値を、今回の処理前後1階差分値データと推定し、この平均値を用いて、今回の処理後位置データを生成すれば、推定された今回の処理後位置データが正しい処理後位置データからさらに大きくかけ離れるのを防止することが可能になる。すなわち、推定された処理後位置データと正しい処理後位置データとの差異を抑制することが可能になる。したがって、推定された処理後位置データを正常な処理前位置データに追従させることが可能になり、推定された処理後位置データが正常な処理前位置データに対して大きくずれるのを抑制することが可能になる。その結果、たとえば、エンコーダによってモータの回転角度が検出される場合には、モータの挙動を安定させることが可能になる。   Therefore, when the first-stage difference value data before and after the processing calculated this time exceeds a predetermined reference value, the average value of the predetermined number of first-order difference value data before and after the process calculated up to the previous time in the sampling period, Estimating the first-order difference data before and after the current process, and using this average value to generate the current post-process position data, the estimated post-process position data is far from the correct post-process position data. Can be prevented. That is, the difference between the estimated post-processing position data and the correct post-processing position data can be suppressed. Accordingly, the estimated post-processing position data can be made to follow the normal pre-processing position data, and the estimated post-processing position data can be prevented from greatly deviating from the normal pre-processing position data. It becomes possible. As a result, for example, when the rotation angle of the motor is detected by the encoder, the behavior of the motor can be stabilized.

本発明において、位置データ処理部は、たとえば、処理前後1階差分値データが第3基準値以内であると、サンプリング周期において、今回、算出された処理前後1階差分値データと、前回までに算出された処理前後1階値差分値データとの総和を算出して、今回の処理後位置データを生成し、処理前後1階差分値データが第3基準値を超えていると、サンプリング周期において、前回までに算出された所定個数の処理前後1階差分値データの平均値と、前回までに算出された処理前後1階値差分値データとの総和を算出して、今回の処理後位置データを生成する。   In the present invention, for example, if the first-order difference data before and after the processing is within the third reference value, the position data processing unit may calculate the first-order difference value data before and after the current calculation in the sampling period and the previous time. Calculate the sum of the calculated first-order difference value data before and after processing to generate post-processing position data, and if the first-order difference value data before and after processing exceeds the third reference value, The current post-processing position data is calculated by calculating the sum of the average value of the first and second floor differential value data before and after the predetermined number calculated before and the previous and first floor difference data calculated before and after the previous process. Is generated.

また、上記の課題を解決するため、本発明の位置データの異常検出方法は、エンコーダと、エンコーダが出力する処理前位置データを処理して処理後位置データを生成する位置データ処理部とを備えるエンコーダ装置における位置データの異常検出方法であって、所定のサンプリング周期ごとに取得される処理前位置データの差分値である処理前1階差分値データを算出する1階差分値算出ステップと、サンプリング周期ごとに処理前1階差分値データの差分値である2階差分値データを算出する2階差分値算出ステップと、処理前1階差分値データが所定の第1基準範囲内にあるか否かを評価する第1評価ステップと、2階差分値データが所定の第2基準範囲内にあるか否かを評価する第2評価ステップとを備え、処理前1階差分値データが第1基準範囲から外れているとき、および/または、2階差分値データが第2基準範囲から外れているときに、処理前位置データが異常であることを検出することを特徴とする。   In order to solve the above problems, the position data abnormality detection method of the present invention includes an encoder and a position data processing unit that processes post-processing position data output by the encoder and generates post-processing position data. A first-order difference value calculating step for calculating pre-processing first-order difference value data, which is a difference value of pre-processing position data acquired every predetermined sampling period, in a position data abnormality detection method in an encoder device; and sampling A second-order difference value calculation step for calculating second-order difference value data that is a difference value of the first-order difference value data before processing for each cycle, and whether or not the first-order difference value data before processing is within a predetermined first reference range A first evaluation step for evaluating whether the second-order difference value data is within a predetermined second reference range, and a first-order difference value data before processing. When off the first reference range, and / or, when the second-order difference data is out of the second reference range, and detects the pre-processing position data is abnormal.

本発明の位置データの異常検出方法では、1階差分値算出ステップにおいて、処理前1階差分値データを算出するとともに、2階差分値算出ステップにおいて、2階差分値データを算出し、処理前1階差分値データが第1基準範囲から外れているとき、および/または、2階差分値データが第2基準範囲から外れているときに、処理前位置データが異常であると判定している。すなわち、本発明では、処理前位置データの差分値である処理前1階差分値データに加え、処理前1階差分値データの差分値である2階差分値データを用いて、処理前位置データの異常を検出している。そのため、本発明では、処理前1階差分値データのみを用いて処理前位置データの異常を検出する場合と比較して、処理前位置データの異常検出の精度を高めることが可能になる。   In the position data abnormality detection method of the present invention, pre-processing first-order difference value data is calculated in the first-floor difference value calculating step, and second-order difference value data is calculated in the second-floor difference value calculating step. When the first-order difference value data is out of the first reference range and / or when the second-order difference value data is out of the second reference range, it is determined that the pre-processing position data is abnormal. . That is, in the present invention, the pre-processing position data is used by using the second-order difference value data that is the difference value of the pre-processing first-order difference value data in addition to the pre-processing first-order difference value data that is the difference value of the pre-processing position data. An abnormality is detected. Therefore, in the present invention, it is possible to increase the accuracy of detecting the abnormality of the pre-processing position data as compared with the case of detecting the pre-processing position data abnormality using only the pre-processing first-order difference value data.

以上のように、本発明のエンコーダ装置では、エンコーダが出力する処理前位置データの異常検出の精度を高めることが可能になる。また、本発明の位置データの異常検出方法によれば、処理前位置データの異常検出の精度を高めることが可能になる。   As described above, in the encoder device of the present invention, it is possible to improve the accuracy of detecting abnormality in the pre-processing position data output from the encoder. Further, according to the position data abnormality detection method of the present invention, it is possible to improve the accuracy of the abnormality detection of the pre-processing position data.

本発明の実施の形態にかかるエンコーダ装置の概略構成を説明するためのブロック図である。It is a block diagram for demonstrating schematic structure of the encoder apparatus concerning embodiment of this invention. 図1に示すエンコーダの概略構成を説明するための図である。It is a figure for demonstrating schematic structure of the encoder shown in FIG. 図1に示す位置データ処理部の概略構成を説明するためのブロック図である。It is a block diagram for demonstrating schematic structure of the position data processing part shown in FIG. 図3に示す位置データ処理部における処理前位置データの異常検出方法を説明するためのフローチャートである。It is a flowchart for demonstrating the abnormality detection method of the position data before a process in the position data process part shown in FIG. 図3に示す位置データ処理部における処理後位置データの生成方法を説明するためのフローチャートである。It is a flowchart for demonstrating the production | generation method of the post-processing position data in the position data processing part shown in FIG.

以下、図面を参照しながら、本発明の実施の形態を説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(エンコーダ装置の構成)
図1は、本発明の実施の形態にかかるエンコーダ装置1の概略構成を説明するためのブロック図である。図2は、図1に示すエンコーダ3の概略構成を説明するための図である。図3は、図1に示す位置データ処理部4の概略構成を説明するためのブロック図である。
(Configuration of encoder device)
FIG. 1 is a block diagram for explaining a schematic configuration of an encoder apparatus 1 according to an embodiment of the present invention. FIG. 2 is a diagram for explaining a schematic configuration of the encoder 3 shown in FIG. FIG. 3 is a block diagram for explaining a schematic configuration of the position data processing unit 4 shown in FIG.

本形態のエンコーダ装置1は、回転体の回転角度(回転位置)を検出するための装置であり、具体的には、たとえば、サーボモータ2のロータの回転角度を検出するための装置である。このエンコーダ装置1は、図1に示すように、エンコーダ3と、位置データ処理部4とを備えている。位置データ処理部4は、エンコーダ3の出力側に接続されている。位置データ処理部4の出力側は、サーボモータ2を駆動制御するモータ制御部(モータドライバ)5に接続されている。   The encoder device 1 according to the present embodiment is a device for detecting the rotation angle (rotation position) of the rotating body, and specifically, for example, a device for detecting the rotation angle of the rotor of the servo motor 2. As shown in FIG. 1, the encoder device 1 includes an encoder 3 and a position data processing unit 4. The position data processing unit 4 is connected to the output side of the encoder 3. The output side of the position data processing unit 4 is connected to a motor control unit (motor driver) 5 that drives and controls the servo motor 2.

エンコーダ3は、アブソリュートエンコーダ(絶対値エンコーダ)である。また、本形態のエンコーダ3は、磁気式のロータリーエンコーダであり、図2に示すように、サーボモータ2のロータを構成する回転軸7等に固定されるセンサ磁石8と、センサ磁石8に対向配置される磁気抵抗素子9および2個のホール素子10とを備えている。   The encoder 3 is an absolute encoder (absolute value encoder). The encoder 3 according to the present embodiment is a magnetic rotary encoder. As shown in FIG. 2, the sensor magnet 8 fixed to the rotating shaft 7 or the like constituting the rotor of the servo motor 2 and the sensor magnet 8 are opposed to each other. A magnetoresistive element 9 and two Hall elements 10 are provided.

センサ磁石8は、円板状に形成された永久磁石である。センサ磁石8の、磁気抵抗素子9およびホール素子10との対向面には、その周方向において、N極とS極とが1極ずつ形成されている。磁気抵抗素子9は、回転軸7の軸方向から見たときにセンサ磁石8の中心と磁気抵抗素子9の中心とが略一致するように配置されている。磁気抵抗素子9には、互いに略直交する方向に配置される磁気抵抗パターンが形成されている。2個のホール素子10は、回転軸7の軸方向から見たときに、センサ磁石8の中心に対して互いに90°ずれた位置に配置されている。   The sensor magnet 8 is a permanent magnet formed in a disk shape. On the surface of the sensor magnet 8 facing the magnetoresistive element 9 and the Hall element 10, one N pole and one S pole are formed in the circumferential direction. The magnetoresistive element 9 is arranged so that the center of the sensor magnet 8 and the center of the magnetoresistive element 9 substantially coincide when viewed from the axial direction of the rotating shaft 7. The magnetoresistive element 9 is formed with a magnetoresistive pattern arranged in a direction substantially orthogonal to each other. The two Hall elements 10 are arranged at positions shifted from each other by 90 ° with respect to the center of the sensor magnet 8 when viewed from the axial direction of the rotating shaft 7.

エンコーダ3は、磁気抵抗素子9での検出結果に基づいて、回転体(ロータ)の1回転(360°)の範囲内の回転角度を示す位置データ(1回転データ)を生成して、この位置データを位置データ処理部4に向かって出力する。また、エンコーダ3は、ホール素子10での検出結果に基づいて、所定の原点位置から回転体が何回転しているのかを示す多回転データを生成して、この多回転データを位置データ処理部4に向かって出力する。さらに、エンコーダ3は、エンコーダ3のエラー状態を示すエラー状態データを位置データ処理部4に向かって出力する。たとえば、エンコーダ3から出力されるべき位置データ等が出力されないときに、エンコーダ3は、エラー状態データを出力する。また、エンコーダ3は、位置データ処理部4と一定のサンプリング周期で通信を行う。すなわち、位置データ処理部4は、一定のサンプリング周期で、位置データや多回転データ等を取得する。   Based on the detection result of the magnetoresistive element 9, the encoder 3 generates position data (one rotation data) indicating a rotation angle within a range of one rotation (360 °) of the rotating body (rotor). Data is output toward the position data processing unit 4. Further, the encoder 3 generates multi-rotation data indicating how many times the rotating body is rotating from a predetermined origin position based on the detection result of the Hall element 10, and the multi-rotation data is generated as a position data processing unit. Output toward 4. Furthermore, the encoder 3 outputs error state data indicating an error state of the encoder 3 toward the position data processing unit 4. For example, when position data or the like to be output from the encoder 3 is not output, the encoder 3 outputs error state data. The encoder 3 communicates with the position data processing unit 4 at a constant sampling cycle. That is, the position data processing unit 4 acquires position data, multi-rotation data, and the like at a constant sampling period.

位置データ処理部4は、マイクロプロセッサ(MPU)である。この位置データ処理部4は、エンコーダ3が出力する処理前の位置データ(1回転データ)に所定の処理を行って処理後の位置データ(機械角)を生成する。すなわち、位置データ処理部4は、エンコーダ3が出力する処理前位置データを処理して処理後位置データを生成する。この位置データ処理部4は、図3に示すように、処理前位置データが入力されるスケーリング部15を備えている。スケーリング部15は、処理前位置データをスケーリングする。   The position data processing unit 4 is a microprocessor (MPU). The position data processing unit 4 performs a predetermined process on the position data (one rotation data) before processing output from the encoder 3 to generate position data (mechanical angle) after processing. That is, the position data processing unit 4 processes the pre-processing position data output from the encoder 3 to generate post-processing position data. As shown in FIG. 3, the position data processing unit 4 includes a scaling unit 15 to which pre-processing position data is input. The scaling unit 15 scales the pre-processing position data.

スケーリング部15の出力側には、一定のサンプリング周期ごとに取得されるスケーリング後の処理前位置データの差分値である処理前1階差分値データを算出する1階差分値算出部16が接続されている。1階差分値算出部16は、サンプリング周期において、今回取得された処理前位置データと、前回取得された処理前位置データとの差分(すなわち、今回のサンプリング時の処理前位置データと、前回のサンプリング時の処理前位置データとの差分)を取る後退差分によって処理前1階差分値データを算出する。すなわち、1階差分値算出部16は、処理前1階差分値データを一定のサンプリング周期で算出する。処理前1階差分値データは、今回のサンプリング時の回転体の回転速度に相当するデータである。1階差分値算出部16の出力側には、処理前1階差分値データを値域変換する値域変換部17が接続されている。   Connected to the output side of the scaling unit 15 is a first-order difference value calculation unit 16 that calculates pre-processing first-order difference value data, which is the difference value of the pre-processing position data after scaling acquired at a certain sampling period. ing. The first-order difference value calculation unit 16 determines the difference between the pre-processing position data acquired this time and the pre-processing position data acquired last time (that is, the pre-processing position data at the time of the current sampling, Pre-process first-floor difference value data is calculated by a backward difference that takes a difference from the pre-process position data at the time of sampling. That is, the first floor difference value calculation unit 16 calculates the first floor difference value data before processing at a constant sampling period. The pre-processing first floor difference value data is data corresponding to the rotational speed of the rotating body at the time of the current sampling. Connected to the output side of the first-order difference value calculation unit 16 is a range conversion unit 17 that performs range conversion on the first-order difference value data before processing.

値域変換部17の出力側には、処理前1階差分値データが所定の基準範囲(第1基準範囲)内にあるか否かを評価するためのリミッタ部18が接続されている。リミッタ部18の出力側には、論理和回路19が接続されている。リミッタ部18は、処理前1階差分値データが第1基準範囲から外れている場合に、論理和回路19へ信号を出力し、処理前1階差分値データが第1基準範囲内である場合には、論理和回路19へ信号を出力しない。第1基準範囲の上限値は、サーボモータ2の最高回転速度(最高回転数)よりも高い値であり、経験的に設定される値である。また、第1基準範囲の上限値および下限値は、通常のサーボモータ2の回転時には生じえない値である。   On the output side of the range conversion unit 17, a limiter unit 18 is connected for evaluating whether or not the pre-processing first-order difference value data is within a predetermined reference range (first reference range). An OR circuit 19 is connected to the output side of the limiter unit 18. The limiter unit 18 outputs a signal to the OR circuit 19 when the pre-processing first-order difference value data is out of the first reference range, and the pre-processing first-order difference value data is within the first reference range. In this case, no signal is output to the OR circuit 19. The upper limit value of the first reference range is a value that is higher than the maximum rotation speed (maximum rotation speed) of the servo motor 2, and is a value that is set empirically. Further, the upper limit value and the lower limit value of the first reference range are values that cannot occur during normal rotation of the servo motor 2.

また、値域変換部17の出力側には、サンプリング周期ごとに処理前1階差分値データの差分値である2階差分値データを算出する2階差分値算出部20が接続されている。2階差分値算出部20は、サンプリング周期において、今回算出された処理前1階差分値データと、前回算出された処理前1階差分値データとの差分(すなわち、今回のサンプリング時の処理前1階差分値データと、前回のサンプリング時の処理前1階差分値データとの差分)を取る後退差分によって2階差分値データを算出する。すなわち、2階差分値算出部20は、2階差分値データを一定のサンプリング周期で算出する。2階差分値データは、今回のサンプリング時の回転体の加速度に相当するデータである。   In addition, a second-order difference value calculation unit 20 that calculates second-order difference value data that is a difference value of the first-order difference value data before processing is connected to the output side of the range conversion unit 17 for each sampling period. The second-order difference value calculation unit 20 calculates the difference between the pre-processing first-order difference value data calculated this time and the pre-processing first-order difference value data calculated last time (that is, before the processing at the time of the current sampling) in the sampling period. The second-order difference value data is calculated by a backward difference that takes the difference between the first-order difference value data and the first-step difference value data before processing at the time of the previous sampling. That is, the second-order difference value calculation unit 20 calculates second-order difference value data at a constant sampling period. The second-order difference value data is data corresponding to the acceleration of the rotating body during the current sampling.

2階差分値算出部20の出力側には、2階差分値データが所定の基準範囲(第2基準範囲)内にあるか否かを評価するためのリミッタ部21が接続されている。リミッタ部21の出力側には、論理和回路19が接続されている。リミッタ部21は、2階差分値データが第2基準範囲から外れている場合に、論理和回路19へ信号を出力し、2階差分値データが第2基準範囲内である場合には、論理和回路19へ信号を出力しない。第2基準範囲の上限値は、サーボモータ2の最大加速度よりも高い値であり、経験的に設定される値である。また、第2基準範囲の上限値および下限値は、通常のサーボモータ2の回転時には生じえない値である。   A limiter unit 21 for evaluating whether or not the second-order difference value data is within a predetermined reference range (second reference range) is connected to the output side of the second-order difference value calculation unit 20. An OR circuit 19 is connected to the output side of the limiter unit 21. The limiter unit 21 outputs a signal to the logical sum circuit 19 when the second-order difference value data is out of the second reference range, and when the second-order difference value data is within the second reference range, No signal is output to the sum circuit 19. The upper limit value of the second reference range is a value that is higher than the maximum acceleration of the servo motor 2 and is an empirically set value. Further, the upper limit value and the lower limit value of the second reference range are values that cannot occur during normal rotation of the servo motor 2.

論理和回路19の出力側には、論理和回路22が接続されている。論理和回路19は、リミッタ部18およびリミッタ部21の少なくともいずれか一方から信号が入力されると、論理和回路22に向かって信号を出力する。   A logical sum circuit 22 is connected to the output side of the logical sum circuit 19. The OR circuit 19 outputs a signal toward the OR circuit 22 when a signal is input from at least one of the limiter unit 18 and the limiter unit 21.

また、スケーリング部15の出力側には、サンプリング周期において、今回取得されたスケーリング後の処理前位置データと、前回生成された処理後位置データとの差分値(すなわち、今回のサンプリング時の処理前位置データと、前回のサンプリング時に生成された処理後位置データとの差分値)である処理前後1階差分値データを算出する1階差分値算出部25が接続されている。1階差分値算出部25は、処理前後1階差分値データを一定のサンプリング周期で算出する。1階差分値算出部25の出力側には、処理前後1階差分値データを値域変換する値域変換部26が接続されている。   Further, on the output side of the scaling unit 15, the difference value between the pre-processing position data after the scaling acquired this time and the post-processing position data generated the last time (that is, before the processing at the time of the current sampling) A first-order difference value calculation unit 25 that calculates first-order difference value data before and after processing, which is a difference value between position data and post-processing position data generated at the time of previous sampling, is connected. The first floor difference value calculation unit 25 calculates the first floor difference value data before and after processing at a constant sampling period. Connected to the output side of the first-order difference value calculation unit 25 is a range conversion unit 26 that performs range conversion on the first-order difference value data before and after processing.

値域変換部26の出力側には、値域変換後の処理前後1階差分値データが所定の基準値(第3基準値)を超えているか否かを評価するためのリミッタ部27が接続されている。また、値域変換部26の出力側には、データ切替部28が接続されている。   Connected to the output side of the range conversion unit 26 is a limiter unit 27 for evaluating whether or not the first-order difference value data before and after the range conversion exceeds a predetermined reference value (third reference value). Yes. A data switching unit 28 is connected to the output side of the range converter 26.

リミッタ部27の出力側には、論理和回路22が接続されている。リミッタ部27は、処理前後1階差分値データが第3基準値を超えている場合に、論理和回路22へ信号を出力し、処理前後1階差分値データが第3基準値以内である場合には、論理和回路22へ信号を出力しない。第3基準値は、サーボモータ2の最高回転速度(最高回転数)よりも高い値であり、経験的に設定される値である。また、第3基準値は、通常のサーボモータ2の回転時には生じえない値である。なお、本形態の第3基準値は、第1基準範囲の上限値と同じ値であるが、第3基準値は、第1基準範囲の上限値と異なっていても良い。   An OR circuit 22 is connected to the output side of the limiter unit 27. The limiter unit 27 outputs a signal to the OR circuit 22 when the first-order difference value data before and after processing exceeds the third reference value, and the first-order difference value data before and after processing is within the third reference value. In this case, no signal is output to the OR circuit 22. The third reference value is a value higher than the maximum rotation speed (maximum rotation speed) of the servo motor 2, and is a value set empirically. The third reference value is a value that cannot be generated when the servo motor 2 rotates normally. The third reference value of the present embodiment is the same value as the upper limit value of the first reference range, but the third reference value may be different from the upper limit value of the first reference range.

また、リミッタ部27の出力側には、データ切替部28およびローパスフィルタ29が接続されている。リミッタ部27は、処理前後1階差分値データが第3基準値を超えている場合に、第3基準値のデータを処理前後1階差分値データとして、データ切替部28およびローパスフィルタ29へ出力する。すなわち、リミッタ部27は、飽和処理を行って、飽和処理後の処理前後1階差分値データをデータ切替部28およびローパスフィルタ29へ出力する。また、リミッタ部27は、処理前後1階差分値データが第3基準値以内である場合には、データ切替部28およびローパスフィルタ29へ処理前後1階差分値データを出力しない。ローパスフィルタ29の出力側には、データ切替部28が接続されている。ローパスフィルタ29は、リミッタ部27から出力された飽和処理後の処理前後1階差分値データから高周波成分を除去し、高周波成分除去後の処理前後1階差分値データを出力する。   A data switching unit 28 and a low-pass filter 29 are connected to the output side of the limiter unit 27. The limiter unit 27 outputs the data of the third reference value as the first-order difference value data before and after processing to the data switching unit 28 and the low-pass filter 29 when the first-order difference value data before and after processing exceeds the third reference value. To do. That is, the limiter unit 27 performs a saturation process, and outputs the first-order difference value data before and after the saturation process to the data switching unit 28 and the low-pass filter 29. The limiter unit 27 does not output the first-order difference value data before and after processing to the data switching unit 28 and the low-pass filter 29 when the first-order difference value data before and after processing is within the third reference value. A data switching unit 28 is connected to the output side of the low-pass filter 29. The low-pass filter 29 removes high-frequency components from the first-order difference value data before and after the saturation process output from the limiter unit 27, and outputs first-order difference value data before and after the processing after removal of the high-frequency components.

データ切替部28の出力側には、データ切替部30が接続されている。データ切替部28は、値域変換部26から出力される処理前後1階差分値データ、リミッタ部27から出力される処理前後1階差分値データ、および、ローパスフィルタ29から出力される処理前後1階差分値データの中からいずれかの処理前後1階差分値データを、所定の条件に応じて選択して、データ切替部30へ出力する。   A data switching unit 30 is connected to the output side of the data switching unit 28. The data switching unit 28 is a first-order difference value data before and after processing output from the range conversion unit 26, a first-order difference value data before and after processing output from the limiter unit 27, and a first-order difference before and after processing output from the low-pass filter 29. One of the difference value data before and after the process is selected from the difference value data according to a predetermined condition, and is output to the data switching unit 30.

論理和回路22の出力側には、論理和回路31が接続されている。論理和回路22は、論理和回路19およびリミッタ部27の少なくともいずれか一方から信号が入力されると、論理和回路31に向かって信号を出力する。また、論理和回路19およびリミッタ部27の少なくともいずれか一方から論理和回路22に信号が入力されると、データ異常信号が位置データ処理部4から出力される。   A logical sum circuit 31 is connected to the output side of the logical sum circuit 22. The logical sum circuit 22 outputs a signal toward the logical sum circuit 31 when a signal is input from at least one of the logical sum circuit 19 and the limiter unit 27. Further, when a signal is input to the OR circuit 22 from at least one of the OR circuit 19 and the limiter unit 27, a data abnormality signal is output from the position data processing unit 4.

論理和回路31には、エンコーダ3が出力するエラー状態データが入力可能となっている。論理和回路31は、論理和回路22からの信号およびエンコーダ3からのエラー状態データの少なくともいずれか一方が入力されると、データ切替部30に向かって信号を出力する。   Error state data output from the encoder 3 can be input to the logical sum circuit 31. The OR circuit 31 outputs a signal toward the data switching unit 30 when at least one of the signal from the OR circuit 22 and the error state data from the encoder 3 is input.

データ切替部30は、論理和回路31から信号が入力されると、前回のサンプリング時までに算出された所定個数の処理前後1階差分値データの平均値(すなわち、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値)を今回の処理前後1階差分値データと推定し、この平均値を今回の処理前後1階差分値データとして出力する。すなわち、本形態では、処理前1階差分値データが第1基準範囲から外れている状況、2階差分値データが第2基準範囲から外れている状況、処理前後1階差分値データが第3基準値を超えている状況、および、エンコーダ3からエラー状態データが出力された状況の少なくともいずれか1つの状況が発生している場合に、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値がデータ切替部30から出力される今回の処理前後1階差分値データとなる。   When a signal is input from the OR circuit 31, the data switching unit 30 calculates the average value of the first-order differential value data before and after the predetermined number of processes calculated up to the previous sampling time (that is, calculated up to the previous sampling time). The moving average value of the first floor difference value data before and after the process) is estimated as the first floor difference value data before and after the current process, and this average value is output as the first floor difference value data before and after the current process. That is, in this embodiment, the situation in which the first floor differential value data before processing is out of the first reference range, the situation in which the second floor differential value data is out of the second reference range, and the first floor differential value data before and after processing are the third The difference between the first floor before and after processing calculated up to the previous sampling time when at least one of the situation exceeding the reference value and the situation where the error status data is output from the encoder 3 has occurred. The moving average value of the value data becomes the first-order difference value data before and after the current process output from the data switching unit 30.

また、データ切替部30は、論理和回路31から信号が入力されない場合には、データ切替部28から出力された処理前後1階差分値データを今回の処理前後1階差分値データとして出力する。ここで、処理前後1階差分値データが第3基準値以内である場合には、論理和回路31からデータ切替部30に信号は入力されない。また、リミッタ部27は、処理前後1階差分値データが第3基準値以内である場合には、データ切替部28およびローパスフィルタ29へ飽和処理後の処理前後1階差分値データを出力しない。そのため、論理和回路31からデータ切替部30に信号が入力されない場合には、データ切替部30は、値域変換部26から出力される処理前後1階差分値データを今回の処理前後1階差分値データとして出力する。すなわち、本形態では、論理和回路31からデータ切替部30に信号が入力されない場合、今回のサンプリング時に算出された処理前後1階差分値データがデータ切替部30から出力される今回の処理前後1階差分値データとなる。   In addition, when no signal is input from the OR circuit 31, the data switching unit 30 outputs the pre- and post-processing first-order difference value data output from the data switching unit 28 as the current pre- and post-processing first-order difference value data. Here, when the first-order difference data before and after processing is within the third reference value, no signal is input from the OR circuit 31 to the data switching unit 30. Further, the limiter unit 27 does not output the first-order difference value data before and after the saturation process to the data switching unit 28 and the low-pass filter 29 when the first-order difference value data before and after the process is within the third reference value. Therefore, when no signal is input from the logical sum circuit 31 to the data switching unit 30, the data switching unit 30 uses the first-order difference value data before and after the current process output from the range conversion unit 26 as the first-order difference value before and after the current process. Output as data. That is, in this embodiment, when no signal is input from the OR circuit 31 to the data switching unit 30, the first-stage difference value data before and after the process calculated at the time of the current sampling is output from the data switching unit 30 before and after the current process 1. It becomes floor difference value data.

データ切替部30から出力される今回の処理前後1階差分値データは、位置データ処理部4から機械角差分値データとして出力される。   The first-stage difference value data before and after the current process output from the data switching unit 30 is output from the position data processing unit 4 as mechanical angle difference value data.

データ切替部30の出力側には、累積加算部35が接続されている。累積加算部35は、データ切替部30から出力された今回の処理前後1階差分値データと、前回のサンプリング時までに算出された処理前後1階値差分値データとの総和を算出して総和値のデータを出力する。この総和値のデータは、位置データ処理部4から機械角積算値データとして出力される。   A cumulative addition unit 35 is connected to the output side of the data switching unit 30. The cumulative addition unit 35 calculates the sum of the first-order difference value data before and after the current process output from the data switching unit 30 and the first-order difference value data before and after the process calculated up to the previous sampling. Output value data. The total value data is output from the position data processing unit 4 as mechanical angle integrated value data.

また、データ切替部30の出力側には、累積加算部36が接続されている。累積加算部36の出力側には、値域変換部37が接続されている。累積加算部36は、データ切替部30から出力された今回の処理前後1階差分値データと、前回のサンプリング時までに算出された処理前後1階値差分値データとの総和を算出し、値域変換部37は、この総和を値域変換する。値域変換部37から出力されるデータは、位置データ処理部4によって生成される処理後位置データである。この処理後位置データは、位置データ処理部4から機械角データとして出力される。値域変換部37の出力側には、1階差分値算出部25が接続されており、値域変換部37で生成された処理後位置データは、1階差分値算出部25に入力される。   In addition, a cumulative addition unit 36 is connected to the output side of the data switching unit 30. A range converter 37 is connected to the output side of the cumulative adder 36. The cumulative addition unit 36 calculates the sum of the first-order difference value data before and after the current process output from the data switching unit 30 and the first-order difference value data before and after the process calculated up to the previous sampling, The conversion unit 37 performs range conversion on this sum. The data output from the range conversion unit 37 is post-processing position data generated by the position data processing unit 4. The post-processing position data is output from the position data processing unit 4 as mechanical angle data. A first-order difference value calculation unit 25 is connected to the output side of the range conversion unit 37, and post-processing position data generated by the range conversion unit 37 is input to the first-order difference value calculation unit 25.

また、データ切替部30の出力側には、処理前後1階差分値データの移動平均値を算出する移動平均値算出部38が接続されている。本形態の移動平均値算出部38は、単純移動平均によって、処理前後1階差分値データの移動平均値を算出する。移動平均値算出部38で算出された移動平均値は、データ切替部30に入力される。論理和回路31からデータ切替部30へ信号が入力されると、前回のサンプリング時に移動平均値算出部38で算出された移動平均値がデータ切替部30から今回の処理前後1階差分値データとして出力される。   In addition, a moving average value calculation unit 38 that calculates a moving average value of the first-order difference value data before and after processing is connected to the output side of the data switching unit 30. The moving average value calculation unit 38 according to the present embodiment calculates the moving average value of the first-order difference value data before and after the process by the simple moving average. The moving average value calculated by the moving average value calculation unit 38 is input to the data switching unit 30. When a signal is input from the logical sum circuit 31 to the data switching unit 30, the moving average value calculated by the moving average value calculating unit 38 at the previous sampling is converted from the data switching unit 30 as the first-order difference value data before and after the current process. Is output.

値域変換部37の出力側および移動平均値算出部38の出力側には、機械角を電気角へ変換する電気角変換部39が接続されている。電気角変換部39は、正規化された電気角データおよび電気角データを生成して出力する。電気角変換部39で生成されたこれらのデータは、位置データ処理部4から出力される。   An electrical angle conversion unit 39 that converts a mechanical angle into an electrical angle is connected to the output side of the range conversion unit 37 and the output side of the moving average value calculation unit 38. The electrical angle conversion unit 39 generates and outputs normalized electrical angle data and electrical angle data. These data generated by the electrical angle conversion unit 39 are output from the position data processing unit 4.

(処理前位置データの異常検出方法)
図4は、図3に示す位置データ処理部4における処理前位置データの異常検出方法を説明するためのフローチャートである。
(Pre-processing position data error detection method)
FIG. 4 is a flowchart for explaining a method for detecting an abnormality in position data before processing in the position data processing unit 4 shown in FIG.

位置データ処理部4に入力される処理前位置データは、エンコーダ3から位置データ処理部4へ送られる際の電磁ノイズ等の影響で、ビット誤りが生じて、誤った処理前位置データとなることがある。すなわち、エンコーダ3から位置データ処理部4へ送られる際の電磁ノイズ等の影響で、位置データ処理部4に入力される処理前位置データに異常が生じることがある。また、本形態のエンコーダ3は、磁気式のエンコーダであるため、電磁ノイズの影響を受けやすく、ノイズが重畳した誤った処理前位置データがエンコーダ3から出力されることがある。すなわち、エンコーダ3の内部で、位置データ処理部4に入力される処理前位置データに異常が生じることもある。   The pre-processing position data input to the position data processing unit 4 becomes erroneous pre-processing position data due to a bit error due to electromagnetic noise or the like when it is sent from the encoder 3 to the position data processing unit 4. There is. That is, the pre-processing position data input to the position data processing unit 4 may be abnormal due to the influence of electromagnetic noise or the like when being sent from the encoder 3 to the position data processing unit 4. Moreover, since the encoder 3 of this embodiment is a magnetic encoder, it is easily affected by electromagnetic noise, and erroneous pre-processing position data with superimposed noise may be output from the encoder 3. That is, an abnormality may occur in the pre-processing position data input to the position data processing unit 4 inside the encoder 3.

本形態の位置データ処理部4では、以下のように、位置データ処理部4に入力される処理前位置データの異常を検出している。すなわち、一定のサンプリング周期で、位置データ処理部4が処理前位置データを取得すると、1階差分値算出部16は、処理前1階差分値データを算出し(ステップS1)、2階差分値算出部20は、2階差分値データを算出する(ステップS2)。その後、位置データ処理部4は、リミッタ部18を用いて、処理前1階差分値データが第1基準範囲内にあるか否かを評価し(ステップS3)、リミッタ部21を用いて、2階差分値データが第2基準範囲内にあるか否かを評価する(ステップS4)。   The position data processing unit 4 of this embodiment detects an abnormality in the position data before processing input to the position data processing unit 4 as follows. That is, when the position data processing unit 4 acquires the pre-processing position data at a constant sampling period, the first-floor difference value calculation unit 16 calculates the pre-processing first-floor difference value data (step S1), and the second-floor difference value. The calculation unit 20 calculates second-order difference value data (step S2). Thereafter, the position data processing unit 4 uses the limiter unit 18 to evaluate whether or not the pre-processing first-order difference value data is within the first reference range (step S3), and uses the limiter unit 21 to It is evaluated whether or not the floor difference value data is within the second reference range (step S4).

処理前1階差分値データが第1基準範囲内にあり、かつ、2階差分値データが第2基準範囲内にある場合(ステップS3において“Yes”であり、かつ、ステップS4において“Yes”である場合)には、想定内の処理前位置データが今回のサンプリング時に取得されていると推定されるため、位置データ処理部4は、今回のサンプリング時の処理前位置データは正常であると判定する(ステップS5)。   When the first floor differential value data before processing is in the first reference range and the second floor differential value data is in the second reference range (“Yes” in step S3 and “Yes” in step S4) In this case, since it is estimated that the pre-processing position data within the assumption is acquired at the time of the current sampling, the position data processing unit 4 determines that the position data before the processing at the time of the current sampling is normal. Determine (step S5).

一方、処理前1階差分値データが第1基準範囲から外れている場合(ステップS3で“No”である場合)、または、2階差分値データが第2基準範囲から外れている場合(ステップS4で“No”である場合)には、想定外の処理前位置データが今回のサンプリング時に取得されていると推定されるため、位置データ処理部4は、今回のサンプリング時の処理前位置データは異常であると判定する(ステップS6)。すなわち、位置データ処理部4は、処理前1階差分値データが第1基準範囲から外れているとき、または、2階差分値データが第2基準範囲から外れているときに、今回のサンプリング時の処理前位置データが異常であることを検出する。   On the other hand, when the pre-processing first floor difference value data is out of the first reference range (if “No” in step S3), or when the second floor difference value data is out of the second reference range (step In the case of “No” in S4), since it is estimated that unexpected pre-processing position data is acquired at the time of the current sampling, the position data processing unit 4 performs the pre-processing position data at the time of the current sampling. Is determined to be abnormal (step S6). That is, the position data processing unit 4 performs the sampling at this time when the pre-processing first-order difference value data is out of the first reference range or when the second-order difference value data is out of the second reference range. It is detected that the pre-processing position data is abnormal.

本形態のステップS1は、所定のサンプリング周期ごとに取得される処理前位置データの差分値である処理前1階差分値データを算出する1階差分値算出ステップであり、ステップS2は、サンプリング周期ごとに処理前1階差分値データの差分値である2階差分値データを算出する2階差分値算出ステップである。また、ステップS3は、処理前1階差分値データが所定の第1基準範囲内にあるか否かを評価する第1評価ステップであり、ステップS4は、2階差分値データが所定の第2基準範囲内にあるか否かを評価する第2評価ステップである。   Step S1 of the present embodiment is a first-order difference value calculation step for calculating pre-processing first-order difference value data, which is a difference value of pre-processing position data acquired every predetermined sampling period, and step S2 is a sampling period. This is a second-order difference value calculation step for calculating second-order difference value data, which is the difference value of the first-order difference value data before processing. Step S3 is a first evaluation step for evaluating whether or not the first floor difference value data before processing is within a predetermined first reference range, and step S4 is a second step where the second floor difference value data is a predetermined second value. It is a 2nd evaluation step which evaluates whether it is in a standard range.

(処理後位置データの生成方法)
図5は、図3に示す位置データ処理部4における処理後位置データの生成方法を説明するためのフローチャートである。
(Method for generating post-processing position data)
FIG. 5 is a flowchart for explaining a method of generating post-processing position data in the position data processing unit 4 shown in FIG.

位置データ処理部4では、以下のように、処理後位置データを生成している。すなわち、一定のサンプリング周期で、位置データ処理部4が処理前位置データを取得すると、1階差分値算出部25は、処理前後1階差分値データを算出する(ステップS11)。その後、位置データ処理部4は、リミッタ部27を用いて、処理前後1階差分値データが第3基準値以内であるか否かを評価する(ステップS12)。   The position data processing unit 4 generates post-process position data as follows. That is, when the position data processing unit 4 acquires the pre-processing position data at a constant sampling cycle, the first-floor difference value calculation unit 25 calculates first-floor first-order difference value data before and after processing (step S11). Thereafter, the position data processing unit 4 uses the limiter unit 27 to evaluate whether or not the first-order difference data before and after processing is within the third reference value (step S12).

処理前後1階差分値データが第3基準値以内である場合(ステップS12で“Yes”である場合)には、位置データ処理部4は、上述の処理前位置データの異常検出処理で、今回のサンプリング時の処理前位置データが正常であると判定されたか否かを判定する(ステップS13)。処理前後1階差分値データが第3基準値以内であり、かつ、今回のサンプリング時の処理前位置データが正常であると判定される場合(ステップS13で“Yes”である場合)には、論理和回路31からデータ切替部30に信号が入力されないため、今回のサンプリング時に算出された処理前後1階差分値データが今回の処理前後1階差分値データとして、データ切替部30から出力される(ステップS14)。   If the difference data of the first floor before and after the processing is within the third reference value (if “Yes” in step S12), the position data processing unit 4 performs the above-described abnormality detection processing of the position data before processing. It is determined whether or not the pre-processing position data at the time of sampling is determined to be normal (step S13). When it is determined that the first floor difference value data before and after the processing is within the third reference value and the pre-processing position data at the time of this sampling is normal (in the case of “Yes” in step S13), Since no signal is input from the OR circuit 31 to the data switching unit 30, the first-order difference value data before and after processing calculated at the time of the current sampling is output from the data switching unit 30 as first-order difference value data before and after the current processing. (Step S14).

一方、処理前後1階差分値データが第3基準値を超える場合(ステップS12で“No”である場合)、あるいは、今回のサンプリング時の処理前位置データが異常であると判定される場合(ステップS13で“No”である場合)には、論理和回路31からデータ切替部30に信号が入力されるため、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値が今回の処理前後1階差分値データと推定され、この平均値が今回の処理前後1階差分値データとして、データ切替部30から出力される(ステップS15)。   On the other hand, when the difference data before and after the processing exceeds the third reference value (when “No” in step S12), or when it is determined that the pre-processing position data at the time of the current sampling is abnormal ( In the case of “No” in step S13), since a signal is input from the OR circuit 31 to the data switching unit 30, the moving average value of the first-order difference value data before and after processing calculated up to the previous sampling time Is estimated as first-order difference value data before and after the current process, and this average value is output from the data switching unit 30 as first-order difference value data before and after the current process (step S15).

その後、累積加算部36および値域変換部37は、累積加算等を行って、処理後位置データを生成する(ステップS16)。ステップS16では、今回のサンプリング時に算出された処理前後1階差分値データが今回の処理前後1階差分値データとしてデータ切替部30から出力される場合には、累積加算部36および値域変換部37は、今回のサンプリング時に算出された処理前後1階差分値データを用いて、今回の処理後位置データを生成する。具体的には、累積加算部36および値域変換部37は、今回のサンプリング時に算出された処理前後1階差分値データと、前回までに算出された処理前後1階値差分値データとの総和を算出して、今回の処理後位置データを生成する。この場合には、位置データ処理部4は、今回のサンプリング時にエンコーダ3から入力された実際の処理前位置データに基づく処理前後1階値差分値データに基づいて算出された処理後位置データをモータ制御部5へ出力し、モータ制御部5は、この処理後位置データに基づいてサーボモータ2を制御する。   Thereafter, the cumulative addition unit 36 and the range conversion unit 37 perform cumulative addition and the like to generate post-processing position data (step S16). In step S16, when the first-order difference value data before and after the process calculated at the time of the current sampling is output from the data switching unit 30 as the first-order difference value data before and after the current process, the cumulative addition unit 36 and the range conversion unit 37 are output. Generates the post-processing position data of this time using the first-order differential value data before and after processing calculated at the time of sampling. Specifically, the cumulative addition unit 36 and the range conversion unit 37 calculate the sum of the first-order difference value data before and after processing calculated during the current sampling and the first-order difference value data before and after processing calculated up to the previous time. The calculated post-processing position data is generated. In this case, the position data processing unit 4 uses the post-processing position data calculated based on the first-order difference value data before and after the processing based on the actual pre-processing position data input from the encoder 3 at the time of the current sampling. The motor control unit 5 controls the servo motor 2 based on the post-processing position data.

また、ステップS16では、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値が今回の処理前後1階差分値データとして、データ切替部30から出力される場合には、累積加算部36および値域変換部37は、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値を用いて、今回の処理後位置データを生成する。具体的には、累積加算部36および値域変換部37は、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値と、前回までに算出された処理前後1階値差分値データとの総和を算出して、今回の処理後位置データを生成する。この場合には、位置データ処理部4は、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値(すなわち、処理前後1階値差分値データの推定値)に基づいて算出された処理後位置データをモータ制御部5へ出力し、モータ制御部5は、この処理後位置データに基づいてサーボモータ2を制御する。   Further, in step S16, when the moving average value of the first floor difference value data before and after the process calculated up to the previous sampling is output from the data switching unit 30 as the first floor difference value data before and after the current process, The cumulative addition unit 36 and the range conversion unit 37 generate current post-processing position data using the moving average value of the first-order difference value data before and after processing calculated up to the previous sampling. Specifically, the cumulative addition unit 36 and the range conversion unit 37 calculate the moving average value of the first-order difference value data before and after processing calculated up to the time of the previous sampling and the first-order value difference before and after processing calculated up to the previous time. The sum total with the value data is calculated, and the current post-processing position data is generated. In this case, the position data processing unit 4 is based on the moving average value of the first-order difference value data before and after the process calculated by the previous sampling (that is, the estimated value of the first-order difference value data before and after the process). The calculated post-processing position data is output to the motor control unit 5, and the motor control unit 5 controls the servo motor 2 based on the post-processing position data.

(本形態の主な効果)
以上説明したように、本形態では、位置データ処理部4は、処理前1階差分値データと2階差分値データとを算出し、処理前1階差分値データが第1基準範囲から外れているとき、または、2階差分値データが第2基準範囲から外れているときに、処理前位置データが異常であると判定しており、処理前位置データの差分値である処理前1階差分値データに加え、処理前1階差分値データの差分値である2階差分値データを用いて、処理前位置データの異常を検出している。すなわち、本形態では、処理前位置データに基づいて算出される回転体の回転速度に急激な変化がある場合だけでなく、処理前位置データに基づいて算出される回転体の加速度に急激な変化がある場合にも、処理前位置データの異常を検出している。そのため、本形態では、処理前1階差分値データのみを用いて処理前位置データの異常を検出する場合と比較して、処理前位置データの異常検出の精度を高めることが可能になる。
(Main effects of this form)
As described above, in this embodiment, the position data processing unit 4 calculates the first floor difference value data and the second floor difference value data before processing, and the first floor difference value data before processing deviates from the first reference range. Or when the second-order difference value data is out of the second reference range, it is determined that the pre-processing position data is abnormal, and the pre-processing first-order difference that is the difference value of the pre-processing position data In addition to the value data, an abnormality in the pre-processing position data is detected by using the second-order difference value data that is the difference value of the pre-processing first-order difference value data. That is, in this embodiment, not only when there is a sudden change in the rotation speed of the rotating body calculated based on the pre-processing position data, but also a sudden change in the acceleration of the rotating body calculated based on the pre-processing position data. Even when there is, an abnormality in the position data before processing is detected. For this reason, in this embodiment, it is possible to improve the accuracy of detecting the abnormality of the pre-processing position data as compared with the case of detecting the pre-processing position data abnormality using only the pre-processing first-order difference value data.

本形態では、位置データ処理部4は、今回のサンプリング時の処理前位置データが正常であると判定すると、今回のサンプリング時に算出された処理前後1階差分値データを用いて、今回の処理後位置データを生成している。そのため、本形態では、正常な処理前位置データに基づいて生成された処理後位置データによってサーボモータ2を制御することが可能になり、サーボモータ2の回転特性に悪影響が及ぶのを防止することが可能になる。また、本形態では、位置データ処理部4は、今回のサンプリング時の処理前位置データが異常であると判定すると、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値を用いて、今回の処理後位置データを生成している。そのため、本形態では、異常な処理前位置データに基づいて生成される処理後位置データに起因してサーボモータ2の挙動が不安定になるといった現象の発生を防止することが可能になる。   In this embodiment, when the position data processing unit 4 determines that the pre-processing position data at the time of the current sampling is normal, the position data processing unit 4 uses the first-order difference value data before and after the processing calculated at the time of the current sampling, Position data is generated. Therefore, in this embodiment, the servo motor 2 can be controlled by the post-processing position data generated based on the normal pre-processing position data, and the rotation characteristics of the servo motor 2 can be prevented from being adversely affected. Is possible. Further, in this embodiment, when the position data processing unit 4 determines that the pre-processing position data at the time of the current sampling is abnormal, the moving average value of the first-order difference value data before and after the processing calculated up to the previous sampling time Is used to generate the post-processing position data. Therefore, in this embodiment, it is possible to prevent the occurrence of a phenomenon that the behavior of the servo motor 2 becomes unstable due to post-processing position data generated based on abnormal pre-processing position data.

本形態では、1階差分値算出部25で算出された処理前後1階差分値データが第3基準値を超えていると、位置データ処理部4は、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値を用いて、処理後位置データを生成している。1階差分値算出部25で算出された処理前後1階差分値データが第3基準値を超えている場合には、今回のサンプリング時に取得された処理前位置データが異常であることが想定されるとともに、前回生成された処理後位置データが処理前後1階差分値データの移動平均値を用いて生成された推定値であると想定され、この推定された処理後位置データが正常な処理前位置データに対して大きくかけ離れた値となっていることが想定される。推定された前回のサンプリング時の処理後位置データが正常な処理前位置データに対して大きくかけ離れた値となっている場合に、推定された前回のサンプリング時の処理後位置データに基づいて算出される今回の処理前後1階差分値データに基づいて、今回の処理後位置データが生成されると、生成された今回の処理後位置データが正しい処理後位置データからさらに大きくかけ離れた値になるおそれがある。   In the present embodiment, if the first and second floor difference value data calculated by the first floor difference value calculation unit 25 exceeds the third reference value, the position data processing unit 4 performs the process calculated up to the previous sampling time. The post-processing position data is generated using the moving average value of the front and back first-order difference value data. When the first and second floor difference value data before and after processing calculated by the first floor difference value calculation unit 25 exceeds the third reference value, it is assumed that the pre-processing position data acquired at the time of this sampling is abnormal. In addition, it is assumed that the post-processing position data generated last time is an estimated value generated using the moving average value of the first-order difference data before and after the processing. It is assumed that the value is far from the position data. Calculated based on the estimated post-processing position data at the previous sampling when the estimated post-processing position data at the previous sampling is significantly different from the normal pre-processing position data. If the current post-processing position data is generated based on the first-stage difference value data before and after the current processing, the generated current post-processing position data may become a value far from the correct post-processing position data. There is.

しかしながら、本形態では、1階差分値算出部25で算出された処理前後1階差分値データが第3基準値を超えている場合に、位置データ処理部4が、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値を用いて、処理後位置データを生成しているため、推定された今回の処理後位置データが正しい処理後位置データからさらに大きくかけ離れるのを防止することが可能になる。すなわち、本形態では、推定された今回の処理後位置データと正しい処理後位置データとの差異を抑制することが可能になる。したがって、推定された処理後位置データを正常な処理前位置データに追従させることが可能になり、推定された処理後位置データが正常な処理前位置データに対して大きくずれるのを抑制することが可能になる。その結果、本形態では、処理後位置データに基づいて制御されるサーボモータ2の挙動を安定させることが可能になる。   However, in this embodiment, when the first and second floor difference value data calculated by the first floor difference value calculation unit 25 exceeds the third reference value, the position data processing unit 4 calculates the previous sampling time. Since the post-processing position data is generated using the moving average value of the first-order difference data before and after the processing, the estimated post-processing position data is far from the correct post-processing position data. It becomes possible to prevent. That is, in this embodiment, it is possible to suppress the difference between the estimated post-processing position data this time and the correct post-processing position data. Accordingly, the estimated post-processing position data can be made to follow the normal pre-processing position data, and the estimated post-processing position data can be prevented from greatly deviating from the normal pre-processing position data. It becomes possible. As a result, in this embodiment, it is possible to stabilize the behavior of the servo motor 2 that is controlled based on the post-processing position data.

(他の実施の形態)
上述した形態は、本発明の好適な形態の一例ではあるが、これに限定されるものではなく本発明の要旨を変更しない範囲において種々変形実施が可能である。
(Other embodiments)
The above-described embodiment is an example of a preferred embodiment of the present invention, but is not limited to this, and various modifications can be made without departing from the scope of the present invention.

上述した形態では、処理前後1階差分値データが第3基準値を超える場合に、前回のサンプリング時までに算出された処理前後1階差分値データの移動平均値を今回の処理前後1階差分値データと推定して、この平均値をデータ切替部30から出力している。この他にもたとえば、処理前後1階差分値データが第3基準値を超える場合に、今回のサンプリング時に算出された処理前後1階差分値データを今回の処理前後1階差分値データとして、データ切替部30から出力しても良い。   In the above-described form, when the first floor difference value data before and after processing exceeds the third reference value, the moving average value of the first floor difference value data before and after processing calculated up to the previous sampling is used as the first floor difference before and after the current processing. It is estimated as value data, and this average value is output from the data switching unit 30. In addition to this, for example, when the first-order difference value data before and after the processing exceeds the third reference value, the first-order difference value data before and after the processing calculated at the time of the current sampling is used as the first-order difference value data before and after the current processing. You may output from the switch part 30. FIG.

上述した形態では、図4のフローチャートに示すように、位置データ処理部4は、処理前1階差分値データが第1基準範囲内にあるか否かを評価した後に、2階差分値データが第2基準範囲内にあるか否かを評価している。この他にもたとえば、位置データ処理部4は、2階差分値データが第2基準範囲内にあるか否かを評価した後に、処理前1階差分値データが第1基準範囲内にあるか否かを評価しても良いし、処理前1階差分値データが第1基準範囲内にあるか否かの評価と2階差分値データが第2基準範囲内にあるか否かの評価とを同時に行っても良い。   In the above-described form, as shown in the flowchart of FIG. 4, the position data processing unit 4 evaluates whether or not the pre-processing first-order difference value data is within the first reference range, and then the second-order difference value data is It is evaluated whether or not it is within the second reference range. In addition to this, for example, the position data processing unit 4 evaluates whether or not the second-order difference value data is within the second reference range, and then determines whether or not the first-order difference value data before processing is within the first reference range. Evaluation of whether or not the first-stage difference value data before processing is within the first reference range and evaluation of whether or not the second-order difference value data is within the second reference range May be performed simultaneously.

上述した形態では、位置データ処理部4は、処理前後1階差分値データが第3基準値以内であるか否かを評価した後に、今回のサンプリング時の処理前位置データが正常であると判定されたか否かを判定している。この他にもたとえば、位置データ処理部4は、今回のサンプリング時の処理前位置データが正常であると判定されたか否かを判定した後に、処理前後1階差分値データが第3基準値以内であるか否かを評価しても良いし、処理前後1階差分値データが第3基準値以内であるか否かの評価と、今回のサンプリング時の処理前位置データが正常であると判定されたか否かの判定とを同時に行っても良い。   In the above-described form, the position data processing unit 4 determines that the pre-processing position data at the time of this sampling is normal after evaluating whether or not the first-order difference data before and after the processing is within the third reference value. It is determined whether or not it has been done. In addition to this, for example, after the position data processing unit 4 determines whether or not the pre-processing position data at the time of the current sampling is determined to be normal, the first-order difference data before and after the processing is within the third reference value. It is possible to evaluate whether or not the first-order difference data before and after processing is within the third reference value, and determine that the pre-processing position data at the time of sampling is normal. The determination of whether or not it has been performed may be performed simultaneously.

上述した形態では、エンコーダ3は、アブソリュートエンコーダであるが、エンコーダ3は、インクリメンタルエンコーダであっても良い。また、上述した形態では、エンコーダ3は、磁気式のエンコーダであるが、エンコーダ3は、たとえば、発光素子および受光素子と、発光素子からの光を受光素子へ透過するスリットが形成されたスリット板とを備える光電式のエンコーダであっても良い。また、エンコーダ3は、磁気式または光電式以外の他の形式のエンコーダであっても良い。また、上述した形態では、エンコーダ3は、ロータリーエンコーダであるが、エンコーダ3は、リニアエンコーダであっても良い。   In the embodiment described above, the encoder 3 is an absolute encoder, but the encoder 3 may be an incremental encoder. In the embodiment described above, the encoder 3 is a magnetic encoder. The encoder 3 is, for example, a slit plate in which a light emitting element and a light receiving element and a slit that transmits light from the light emitting element to the light receiving element are formed. May be a photoelectric encoder. Further, the encoder 3 may be an encoder other than a magnetic type or a photoelectric type. Moreover, in the form mentioned above, although the encoder 3 is a rotary encoder, the encoder 3 may be a linear encoder.

1 エンコーダ装置
3 エンコーダ
4 位置データ処理部
S1 1階差分値算出ステップ
S2 2階差分値算出ステップ
S3 第1評価ステップ
S4 第2評価ステップ
DESCRIPTION OF SYMBOLS 1 Encoder apparatus 3 Encoder 4 Position data processing part S1 1st floor difference value calculation step S2 2nd floor difference value calculation step S3 1st evaluation step S4 2nd evaluation step

Claims (6)

エンコーダと、前記エンコーダが出力する処理前位置データを処理して処理後位置データを生成する位置データ処理部とを備え、
前記位置データ処理部は、
所定のサンプリング周期ごとに取得される前記処理前位置データの差分値である処理前1階差分値データを算出し、
前記サンプリング周期ごとに前記処理前1階差分値データの差分値である2階差分値データを算出し、
前記処理前1階差分値データが所定の第1基準範囲内にあり、かつ、前記2階差分値データが所定の第2基準範囲内にあるときに、前記処理前位置データは正常であると判定し、
前記処理前1階差分値データが前記第1基準範囲から外れているとき、および/または、前記2階差分値データが前記第2基準範囲から外れているときに、前記処理前位置データが異常であると判定することを特徴とするエンコーダ装置。
An encoder, and a position data processing unit that processes post-processing position data output by the encoder and generates post-processing position data;
The position data processing unit
Calculating pre-processing first-order difference value data that is a difference value of the pre-processing position data acquired at each predetermined sampling period;
Calculating second-order difference value data that is a difference value of the first-order difference value data before processing for each sampling period;
When the pre-processing first floor difference value data is within a predetermined first reference range and the second floor difference value data is within a predetermined second reference range, the pre-processing position data is normal. Judgment,
The position data before processing is abnormal when the first floor difference value data before processing is out of the first reference range and / or when the second floor difference value data is out of the second reference range. It is determined that the encoder device is.
前記位置データ処理部は、
前記サンプリング周期において、前回、生成された前記処理後位置データと、今回、取得された前記処理前位置データとの差分値である処理前後1階差分値データを算出するとともに、
前記処理前位置データが正常であると判定すると、前記サンプリング周期において、今回、算出された前記処理前後1階差分値データを用いて、今回の前記処理後位置データを生成し、
前記処理前位置データが異常であると判定すると、前記サンプリング周期において、前回までに算出された所定個数の前記処理前後1階差分値データの平均値を、今回の前記処理前後1階差分値データと推定し、前記平均値を用いて、今回の前記処理後位置データを生成することを特徴とする請求項1記載のエンコーダ装置。
The position data processing unit
In the sampling cycle, before and after the first position difference value data before and after processing, which is a difference value between the position data that was generated last time and the position data that was acquired this time before processing,
When it is determined that the pre-processing position data is normal, the post-processing position data of this time is generated using the first-order difference value data before and after the processing calculated this time in the sampling period,
If it is determined that the pre-processing position data is abnormal, the average value of the predetermined number of first- and second-stage difference value data calculated up to the previous time in the sampling period is calculated as the first-stage difference value data before and after the current process. The encoder apparatus according to claim 1, wherein the post-processing position data is generated using the average value.
前記位置データ処理部は、
前記処理前位置データが正常であると判定すると、前記サンプリング周期において、今回、算出された前記処理前後1階差分値データと、前回までに算出された前記処理前後1階値差分値データとの総和を算出して、今回の前記処理後位置データを生成し、
前記処理前位置データが異常であると判定すると、前記サンプリング周期において、前回までに算出された所定個数の前記処理前後1階差分値データの平均値と、前回までに算出された前記処理前後1階値差分値データとの総和を算出して、今回の前記処理後位置データを生成することを特徴とする請求項2記載のエンコーダ装置。
The position data processing unit
When it is determined that the pre-processing position data is normal, in the sampling period, the first-order difference value data before and after the processing calculated this time and the first-order difference value data before and after the processing calculated up to the previous time Calculate the sum, generate the post-processing position data for this time,
If it is determined that the pre-processing position data is abnormal, in the sampling period, the average value of the predetermined number of first- and post-processing first-order difference data calculated up to the previous time and the pre-processing and post-processing 1 calculated up to the previous time The encoder apparatus according to claim 2, wherein the post-processing position data of this time is generated by calculating a sum total of the floor difference value data.
前記位置データ処理部は、
前記サンプリング周期において、前回、生成された前記処理後位置データと、今回、取得された前記処理前位置データとの差分値である処理前後1階差分値データを算出するとともに、
前記処理前後1階差分値データが所定の第3基準値以内であると、前記サンプリング周期において、今回、算出された前記処理前後1階差分値データを用いて、今回の前記処理後位置データを生成し、
前記処理前後1階差分値データが前記第3基準値を超えていると、前記サンプリング周期において、前回までに算出された所定個数の前記処理前後1階差分値データの平均値を、今回の前記処理前後1階差分値データと推定し、前記平均値を用いて、今回の前記処理後位置データを生成することを特徴とする請求項1から3のいずれかに記載のエンコーダ装置。
The position data processing unit
In the sampling cycle, before and after the first position difference value data before and after processing, which is a difference value between the position data that was generated last time and the position data that was acquired this time before processing,
If the first-stage difference value data before and after the processing is within a predetermined third reference value, the current post-processing position data is calculated using the first-stage difference value data calculated before and after the processing in the sampling period. Generate
If the first-order difference value data before and after the processing exceeds the third reference value, the average value of the predetermined number of first-order difference data before and after the processing calculated up to the previous time is calculated in the sampling period. 4. The encoder apparatus according to claim 1, wherein the post-processing position data is estimated by using first-order differential value data before and after processing and using the average value. 5.
前記位置データ処理部は、
前記処理前後1階差分値データが前記第3基準値以内であると、前記サンプリング周期において、今回、算出された前記処理前後1階差分値データと、前回までに算出された前記処理前後1階値差分値データとの総和を算出して、今回の前記処理後位置データを生成し、
前記処理前後1階差分値データが前記第3基準値を超えていると、前記サンプリング周期において、前回までに算出された所定個数の前記処理前後1階差分値データの平均値と、前回までに算出された前記処理前後1階値差分値データとの総和を算出して、今回の前記処理後位置データを生成することを特徴とする請求項4記載のエンコーダ装置。
The position data processing unit
If the first floor difference value data before and after the processing is within the third reference value, the first floor difference value data before and after the processing calculated this time and the first floor before and after the processing calculated up to the previous time in the sampling period. Calculate the sum of the value difference value data and generate the post-processing position data this time,
If the first and second floor difference value data before and after the processing exceeds the third reference value, an average value of the predetermined number of the first and second floor difference value data calculated before and in the sampling period and the previous time The encoder apparatus according to claim 4, wherein the calculated post-processing position data is generated by calculating a sum of the calculated first-order difference value data before and after the processing.
エンコーダと、前記エンコーダが出力する処理前位置データを処理して処理後位置データを生成する位置データ処理部とを備えるエンコーダ装置における位置データの異常検出方法であって、
所定のサンプリング周期ごとに取得される前記処理前位置データの差分値である処理前1階差分値データを算出する1階差分値算出ステップと、
前記サンプリング周期ごとに前記処理前1階差分値データの差分値である2階差分値データを算出する2階差分値算出ステップと、
前記処理前1階差分値データが所定の第1基準範囲内にあるか否かを評価する第1評価ステップと、
前記2階差分値データが所定の第2基準範囲内にあるか否かを評価する第2評価ステップとを備え、
前記処理前1階差分値データが前記第1基準範囲から外れているとき、および/または、前記2階差分値データが前記第2基準範囲から外れているときに、前記処理前位置データが異常であることを検出することを特徴とする位置データの異常検出方法。
A position data abnormality detection method in an encoder device comprising an encoder and a position data processing unit that processes post-processing position data output by the encoder and generates post-processing position data,
A first-order difference value calculating step of calculating pre-processing first-order difference value data, which is a difference value of the pre-processing position data acquired every predetermined sampling period;
A second-order difference value calculating step of calculating second-order difference value data that is a difference value of the pre-processing first-order difference value data for each sampling period;
A first evaluation step for evaluating whether or not the pre-processing first floor difference value data is within a predetermined first reference range;
A second evaluation step for evaluating whether the second-order difference value data is within a predetermined second reference range;
The position data before processing is abnormal when the first floor difference value data before processing is out of the first reference range and / or when the second floor difference value data is out of the second reference range. A position data abnormality detection method characterized by detecting that
JP2012072923A 2012-03-28 2012-03-28 Encoder device and position data abnormality detection method Active JP5943670B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012072923A JP5943670B2 (en) 2012-03-28 2012-03-28 Encoder device and position data abnormality detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012072923A JP5943670B2 (en) 2012-03-28 2012-03-28 Encoder device and position data abnormality detection method

Publications (2)

Publication Number Publication Date
JP2013205143A true JP2013205143A (en) 2013-10-07
JP5943670B2 JP5943670B2 (en) 2016-07-05

Family

ID=49524378

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012072923A Active JP5943670B2 (en) 2012-03-28 2012-03-28 Encoder device and position data abnormality detection method

Country Status (1)

Country Link
JP (1) JP5943670B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08327396A (en) * 1995-05-31 1996-12-13 Sony Magnescale Inc Device for detecting amount of displacement
JPH09292264A (en) * 1996-04-30 1997-11-11 Sanyo Denki Co Ltd Absolute encoder
JP2005077111A (en) * 2003-08-29 2005-03-24 Tsukishima Techno Mente Service Kk Diagnostic support device for diagnosing condition of rotary equipment, program therefor, recording medium recorded with program, and condition diagnostic support method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08327396A (en) * 1995-05-31 1996-12-13 Sony Magnescale Inc Device for detecting amount of displacement
JPH09292264A (en) * 1996-04-30 1997-11-11 Sanyo Denki Co Ltd Absolute encoder
JP2005077111A (en) * 2003-08-29 2005-03-24 Tsukishima Techno Mente Service Kk Diagnostic support device for diagnosing condition of rotary equipment, program therefor, recording medium recorded with program, and condition diagnostic support method

Also Published As

Publication number Publication date
JP5943670B2 (en) 2016-07-05

Similar Documents

Publication Publication Date Title
JP5172998B2 (en) Control device for detecting whether or not irreversible demagnetization of permanent magnet of permanent magnet synchronous motor has occurred
JP5943671B2 (en) Encoder device and position data generation method
US10389288B2 (en) Motor controller
JP2014180119A (en) Control system for synchronous motor with abnormality detection and diagnosis function
JP2015055567A5 (en)
JP6479256B2 (en) Motor control device and motor device using the same
KR102158482B1 (en) Detecting extended current method for controlling three-phase motor in event of emergency brake
JP6006069B2 (en) Encoder and encoder error detection method
JP5832509B2 (en) Motor control device having function of detecting abnormality of power transmission unit between motor and main shaft
JP6139476B2 (en) Electric motor start discrimination device
JP5943670B2 (en) Encoder device and position data abnormality detection method
JP5584634B2 (en) Angular velocity detection device and angular velocity error detection method
JP2019115094A (en) Semiconductor device and rotational abnormality detection method therefor
JP3903478B2 (en) Control device for permanent magnet type synchronous motor
JP6112832B2 (en) Angle correction device and rotation angle sensor
JP6293972B2 (en) Method for measuring position and / or position change of hydraulic pump of automobile brake system and automobile brake system
US20180375450A1 (en) Operation of a rotating electric machine having two position sensors
US10101396B2 (en) Detection of current sensor malfunction
TW200401880A (en) Method of detecting/estimating bit error of encoder detection position data
JP2006300699A (en) Speed detector, and abnormal speed detecting method therefor
KR102502933B1 (en) Device for determining the rotor position and method thereof
JP2014135860A (en) Motor speed controller
JP5983636B2 (en) Electric motor control device
JP2018057061A (en) Motor controller
WO2014010063A1 (en) Motor controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150204

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160106

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160513

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160524

R150 Certificate of patent or registration of utility model

Ref document number: 5943670

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150