JP5097012B2 - Encoder signal processing circuit - Google Patents

Encoder signal processing circuit Download PDF

Info

Publication number
JP5097012B2
JP5097012B2 JP2008139932A JP2008139932A JP5097012B2 JP 5097012 B2 JP5097012 B2 JP 5097012B2 JP 2008139932 A JP2008139932 A JP 2008139932A JP 2008139932 A JP2008139932 A JP 2008139932A JP 5097012 B2 JP5097012 B2 JP 5097012B2
Authority
JP
Japan
Prior art keywords
output
encoder
signal
processing circuit
conversion
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
Application number
JP2008139932A
Other languages
Japanese (ja)
Other versions
JP2009288020A (en
Inventor
浩正 藤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus 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 Olympus Corp filed Critical Olympus Corp
Priority to JP2008139932A priority Critical patent/JP5097012B2/en
Publication of JP2009288020A publication Critical patent/JP2009288020A/en
Application granted granted Critical
Publication of JP5097012B2 publication Critical patent/JP5097012B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Description

本発明は、エンコーダからの信号を処理するためのエンコーダ用信号処理回路に関する。   The present invention relates to an encoder signal processing circuit for processing a signal from an encoder.

エンコーダは、移動体の変位に伴って、互いに位相の異なる少なくとも2相の周期状アナログ信号を発生するようにしたものである。エンコーダから出力される少なくとも2相の周期状アナログ信号はエンコーダ用信号処理回路に入力される。このエンコーダ用信号処理回路において、各周期状アナログ信号は、後段のカウンタにおいて移動体の変位をカウントできるようにデジタル信号に変換されたり、変位の分解能を向上させたりするための処理がなされる。これらの処理が施された後、エンコーダ用信号処理回路からの出力をカウンタでカウントすることによって、移動体の進行方向、位置、変位、変位速度等を測定することができる(例えば、特許文献1参照)。   The encoder generates at least two-phase periodic analog signals having different phases from each other in accordance with the displacement of the moving body. At least two-phase periodic analog signals output from the encoder are input to the encoder signal processing circuit. In this encoder signal processing circuit, each periodic analog signal is converted into a digital signal so that the displacement of the moving body can be counted by a subsequent counter, and processing for improving the resolution of the displacement is performed. After these processes are performed, the traveling direction, position, displacement, displacement speed, etc. of the moving body can be measured by counting the output from the encoder signal processing circuit with a counter (for example, Patent Document 1). reference).

ここで、特許文献1において提案されるエンコーダについて図8を参照して簡単に説明する。図8は、特許文献1のエンコーダ(回転センサ)の一部の構成を示した図である。図8において、エンコーダとしての回転センサAは、励磁波生成部101と、励磁波生成部101によって生成される励磁波で励磁されるレゾルバ102と、レゾルバ102からの出力である励磁波成分が載っている正弦波信号112と余弦波信号113とを増幅処理するための出力回路103と、出力回路103から得られる出力を処理するマイクロコンピュータ(マイコン)104とを有している。   Here, the encoder proposed in Patent Document 1 will be briefly described with reference to FIG. FIG. 8 is a diagram illustrating a partial configuration of the encoder (rotation sensor) of Patent Document 1. In FIG. In FIG. 8, the rotation sensor A as an encoder includes an excitation wave generation unit 101, a resolver 102 excited by an excitation wave generated by the excitation wave generation unit 101, and an excitation wave component that is an output from the resolver 102. The output circuit 103 for amplifying the sine wave signal 112 and the cosine wave signal 113, and the microcomputer 104 for processing the output obtained from the output circuit 103 are provided.

このような構成において、出力回路103からの出力は、マイコン104の内部のA/Dコンバータ118によってA/D変換される。このA/Dコンバータ118によるA/D変換によって得られる情報に基づき、計算部117において回転角度が計算される。この回転角度の計算においては、まず、回転角度の象限が判定された後、この判定された象限をさらに2等分に分割したときに回転角度がどちらの側にあるかが判定される。この判定結果に応じて回転角度を計算することが可能である。
特開2006−349591号公報
In such a configuration, the output from the output circuit 103 is A / D converted by the A / D converter 118 inside the microcomputer 104. Based on the information obtained by the A / D conversion by the A / D converter 118, the calculation unit 117 calculates the rotation angle. In the calculation of the rotation angle, first, after determining the quadrant of the rotation angle, it is determined which side the rotation angle is on when the determined quadrant is further divided into two equal parts. The rotation angle can be calculated according to this determination result.
JP 2006-349591 A

ここで、特許文献1の技術では、レゾルバ102(出力回路103)が出力した少なくとも2相の信号をマイコン104で処理する際に、まずA/Dコンバータ118にてA/D変換を行い、その後に回転角度の計算を行い、続いて出力処理を行うといった直列処理を行っている。また、回転角度の計算を行う場合も、正弦波対角度と余弦波対角度との何れのテーブルを用いるかを回転角度が対応している領域の位置から判定している。さらには、正弦波及び余弦波から得られた値が角度であるために、この角度をさらにカウント用の信号に変換する必要が生じることになる。   Here, in the technique of Patent Document 1, when the microcomputer 104 processes at least two-phase signals output from the resolver 102 (output circuit 103), the A / D converter 118 first performs A / D conversion, and then The rotation angle is calculated, and then the output process is performed in series. Also, when calculating the rotation angle, it is determined from the position of the region corresponding to the rotation angle which table of the sine wave pair angle or the cosine wave pair angle is used. Furthermore, since the value obtained from the sine wave and cosine wave is an angle, it is necessary to convert this angle into a signal for counting.

以上のような構成は、レゾルバといったモータが1回転する毎に正弦波及び余弦波が1周期分出力され、且つ車両のドア等の、移動速度が遅くて周期状アナログ信号の周波数が比較的低周波数の場合に適用可能で、高分解能のエンコーダに対応させる場合や周期状アナログ信号が高周波になった場合には適用が困難である。   In the configuration as described above, every time a motor such as a resolver rotates, a sine wave and a cosine wave are output for one cycle, and the moving speed of the periodic door of the vehicle is slow and the frequency of the periodic analog signal is relatively low. It can be applied in the case of frequency, and it is difficult to apply when it corresponds to a high-resolution encoder or when the periodic analog signal becomes a high frequency.

本発明は、上記の事情に鑑みてなされたものであり、高分解のエンコーダ及び高周波数の周期状アナログ信号まで適用可能で、小面積、信号調整なし、低コストで構成できるエンコーダ用信号処理回路を提供することが課題である。   The present invention has been made in view of the above circumstances, and is applicable to a high-resolution encoder and a high-frequency periodic analog signal, and has a small area, no signal adjustment, and can be configured at low cost. It is a problem to provide.

上記の課題を解決するために、本発明の第1の態様のエンコーダ用信号処理回路は、エンコーダスケールとエンコーダヘッドとの相対変位に従って周期的に変化する少なくとも2相の周期状アナログ信号を処理するエンコーダ用信号処理回路において、前記少なくとも2相の周期状アナログ信号をデジタル信号に変換する命令に基づいて、前記少なくとも2相の周期状アナログ信号における同時点の信号をホールドし、該ホールドした信号をデジタル信号に変換するA/D変換部と、前記A/D変換部に対して前記少なくとも2相の周期状アナログ信号をデジタル信号に変換する命令をするとともに、前記A/D変換部の出力を所定の工程にて時系列的に処理する制御部と、前記制御部において処理された結果を出力する出力部とを具備することを特徴とする。   To solve the above problems, the encoder signal processing circuit according to the first aspect of the present invention processes at least two-phase periodic analog signals that periodically change according to the relative displacement between the encoder scale and the encoder head. In the encoder signal processing circuit, based on a command to convert the at least two-phase periodic analog signals into digital signals, the signals at the same point in the at least two-phase periodic analog signals are held, and the held signals are An A / D converter for converting to a digital signal, and a command for converting the at least two-phase periodic analog signal to a digital signal to the A / D converter, and an output of the A / D converter A control unit that performs time-series processing in a predetermined process; and an output unit that outputs a result processed in the control unit. And wherein the door.

本発明によれば、高分解のエンコーダ及び高周波数の周期状アナログ信号まで適用可能で、小面積、信号調整なし、低コストで構成できるエンコーダ用信号処理回路を提供することができる。   According to the present invention, it is possible to provide an encoder signal processing circuit that can be applied to a high-resolution encoder and a high-frequency periodic analog signal and can be configured with a small area, no signal adjustment, and low cost.

以下、図面を参照して本発明の実施形態を説明する。
[第1の実施形態]
まず、本発明の第1の実施形態について説明する。図1は、本発明の第1の実施形態に係るエンコーダ用信号処理回路の構成を示す図である。図1において、エンコーダ用信号処理回路20は、エンコーダ10から出力される少なくとも2相の略正弦波状の周期状アナログ信号を処理するための回路である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[First Embodiment]
First, a first embodiment of the present invention will be described. FIG. 1 is a diagram showing a configuration of an encoder signal processing circuit according to a first embodiment of the present invention. In FIG. 1, an encoder signal processing circuit 20 is a circuit for processing at least two-phase, substantially sinusoidal periodic analog signals output from the encoder 10.

エンコーダ10は、所定周期のパターン(光学的パターン、磁気的パターン、静電的パターン等)が形成されたエンコーダスケールと、このエンコーダスケールに対して相対変位可能に設けられたエンコーダヘッドとを有している。エンコーダヘッドは、エンコーダスケールとの間の相対変位に従って、図2(a)に示す2相の正弦波状の周期状アナログ信号A、Bを出力する。なお、図2(a)の横軸tは時間であり、縦軸はエンコーダ10が出力する周期状アナログ信号の電圧値を示している。   The encoder 10 includes an encoder scale on which a pattern (an optical pattern, a magnetic pattern, an electrostatic pattern, etc.) having a predetermined period is formed, and an encoder head provided so as to be relatively displaceable with respect to the encoder scale. ing. The encoder head outputs two-phase sinusoidal periodic analog signals A and B shown in FIG. 2A in accordance with the relative displacement between the encoder head and the encoder scale. In FIG. 2A, the horizontal axis t represents time, and the vertical axis represents the voltage value of the periodic analog signal output from the encoder 10.

ここで、図2(a)ではエンコーダヘッドが、互いに位相が90度異なる2相の周期状アナログ信号を出力する例を示している。しかしながら、エンコーダヘッドから3相以上の多相の周期状アナログ信号を出力させるようにしても良い。例えば、互いに位相が120度異なる3相の周期状アナログ信号を出力させるようにしても良い。また、エンコーダヘッドから出力させる周期状アナログ信号の波形は正弦波でなくとも構わない。   Here, FIG. 2A shows an example in which the encoder head outputs two-phase periodic analog signals whose phases are different from each other by 90 degrees. However, a polyphase periodic analog signal having three or more phases may be output from the encoder head. For example, three-phase periodic analog signals whose phases are 120 degrees different from each other may be output. The waveform of the periodic analog signal output from the encoder head may not be a sine wave.

図1に示すように、エンコーダヘッドから出力されるA相信号11、B相信号12は、エンコーダ用信号処理回路20に入力される。このエンコーダ用信号処理回路20は、A/D変換部21と、制御部22と、出力部23とを有し、これらA/D変換部21と、制御部22と、出力部23とが電気部材24に混載されて構成されている。なお、電気部材24を含むエンコーダ用信号処理回路20は、1チップマイクロコンピュータ(以下、マイコンと記す)を利用して構成することができる。エンコーダ用信号処理回路20をマイコンにより構成することで、エンコーダ用信号処理回路20の占有面積を小面積とすることが可能となる。勿論、カスタムICとして構成しても良い。   As shown in FIG. 1, the A-phase signal 11 and the B-phase signal 12 output from the encoder head are input to the encoder signal processing circuit 20. The encoder signal processing circuit 20 includes an A / D conversion unit 21, a control unit 22, and an output unit 23. The A / D conversion unit 21, the control unit 22, and the output unit 23 are electrically connected. It is configured to be mixed with the member 24. The encoder signal processing circuit 20 including the electric member 24 can be configured using a one-chip microcomputer (hereinafter referred to as a microcomputer). By configuring the encoder signal processing circuit 20 with a microcomputer, the area occupied by the encoder signal processing circuit 20 can be reduced. Of course, it may be configured as a custom IC.

A/D変換部21は、制御部22からの命令に従って、エンコーダ10のエンコーダヘッドから入力されるA相信号11とB相信号12とにおける同時点の周期状アナログ信号をデジタル信号へ変換する。   The A / D converter 21 converts a periodic analog signal at the same time point in the A-phase signal 11 and the B-phase signal 12 input from the encoder head of the encoder 10 into a digital signal in accordance with a command from the controller 22.

制御部22は、A/D変換部21に対してA/D変換を開始するように命令するとともに、A/D変換部21の出力を所定の工程にて時系列的に処理する。この所定工程としては、例えば、図2(a)に示すようにしてA相信号及びB相信号の1周期をN等分(図では20等分)した場合に、現在のA/D変換部21の出力がそれぞれ周期状アナログ信号のどの周期領域に対応しているかを判定する処理、現在のA/D変換部21の出力が対応している領域と1回前のA/D変換部21の出力が対応している領域との間の変位量を算出する処理等が含まれる。なお、A相信号、B相信号の分割数Nは2以上の整数であれば特に限定されない。   The control unit 22 instructs the A / D conversion unit 21 to start A / D conversion, and processes the output of the A / D conversion unit 21 in a predetermined process in a time series. As this predetermined process, for example, when one cycle of the A-phase signal and the B-phase signal is divided into N equal parts (20 equal parts in the figure) as shown in FIG. The process of determining which periodic area of the periodic analog signal each output of 21 corresponds to, the area corresponding to the output of the current A / D converter 21 and the previous A / D converter 21 The process etc. which calculate the displacement amount between the area | regions which output corresponds to are included. The division number N of the A phase signal and the B phase signal is not particularly limited as long as it is an integer of 2 or more.

図2(b)は、A相信号11のA/D変換出力値DA(例えば8ビットのA/D変換の場合0〜255(FF)の値をとる)を横軸にとり、B相信号12のA/D変換出力値DBを縦軸にとった場合に表されるリサージュ図形を示した図である。図2(a)の各領域を図2(b)のリサージュ図形上で図示すると、リサージュ図形の1周分を20分割した領域として表される。図2(b)の状態を2次元の配列として制御部22の図示しない記憶部に記憶させておくことで、A相信号のA/D変換出力値DAとB相信号のA/D変換出力値DBとを配列読み出しに利用して、A相信号11及びB相信号12をA/D変換部21において取り込んだ時点の各A/D変換出力が対応する領域を求めることが可能である。   FIG. 2B shows an A / D conversion output value DA of the A phase signal 11 (for example, a value of 0 to 255 (FF) in the case of 8-bit A / D conversion) on the horizontal axis, and the B phase signal 12 It is the figure which showed the Lissajous figure represented when taking A / D conversion output value DB of the vertical axis | shaft. If each area | region of Fig.2 (a) is illustrated on the Lissajous figure of FIG.2 (b), it will represent as an area | region which divided | segmented 20 times of 1 round of a Lissajous figure. The state of FIG. 2B is stored in a storage unit (not shown) of the control unit 22 as a two-dimensional array, so that the A / D conversion output value DA of the A phase signal and the A / D conversion output of the B phase signal are stored. By using the value DB for array reading, it is possible to obtain a region corresponding to each A / D conversion output at the time when the A-phase signal 11 and the B-phase signal 12 are captured by the A / D conversion unit 21.

出力部23は、制御部22で出力される変位量を電気部材24に設けられた出力端子を介してカウンタ30に出力する。   The output unit 23 outputs the displacement amount output from the control unit 22 to the counter 30 via an output terminal provided in the electric member 24.

カウンタ30は、出力部23からの出力をカウントする。このカウント結果により、エンコーダ10のエンコーダスケール又はエンコーダヘッドが取り付けられた移動体の進行方向、位置、変位、変位速度等を測定することができる。なお、図1ではカウンタを示しているが、カウンタ以外のものであっても良い。   The counter 30 counts the output from the output unit 23. Based on the count result, it is possible to measure the traveling direction, position, displacement, displacement speed, etc. of the moving body to which the encoder scale or encoder head of the encoder 10 is attached. In addition, although the counter is shown in FIG. 1, it may be other than the counter.

以下、図1に示すエンコーダ用信号処理回路の動作について説明する。本実施形態においては、A/D変換部21と制御部22とを並列的に動作させる。また、A/D変換部21は、制御部22のA/D変換命令を受けたときのみA/D変換を行うようにし、さらに、制御部22は、A/D変換部21におけるA/D変換が完了した場合に次のA/D変換命令を行うようにする。   The operation of the encoder signal processing circuit shown in FIG. 1 will be described below. In the present embodiment, the A / D converter 21 and the controller 22 are operated in parallel. The A / D conversion unit 21 performs A / D conversion only when receiving an A / D conversion command from the control unit 22, and the control unit 22 further performs the A / D conversion in the A / D conversion unit 21. When the conversion is completed, the next A / D conversion instruction is executed.

図3(a)はA/D変換部21の動作を示すフローチャートであり、図3(b)は制御部22の動作を示すフローチャートである。   FIG. 3A is a flowchart showing the operation of the A / D conversion unit 21, and FIG. 3B is a flowchart showing the operation of the control unit 22.

制御部22は、まずA/D変換部21に対してA/D変換命令を行う(ステップS31)。A/D変換部21はA/D変換命令を受けたか否かを判定しつつ(ステップS41)、A/D変換命令を受けるまで待機している。A/D変換命令を受けた場合に、A/D変換部21は、A相信号11とB相信号12とおける同時点の信号をサンプル及びホールドする(ステップS42)。A相信号11とB相信号12とおける同時点の信号をホールドした後、A/D変換部21は、各ホールドしたA相信号11とB相信号12をA/D変換する(ステップS43)。A/D変換の終了後、A/D変換部21は、A/D変換が完了した旨を制御部22に通知する(ステップS44)。その後、ステップS41に戻り、次のA/D変換命令がなされるまで待機する。   First, the control unit 22 issues an A / D conversion command to the A / D conversion unit 21 (step S31). The A / D converter 21 determines whether or not an A / D conversion command has been received (step S41), and waits until an A / D conversion command is received. When receiving the A / D conversion command, the A / D conversion unit 21 samples and holds the signal at the same point in the A-phase signal 11 and the B-phase signal 12 (step S42). After holding the signals at the same point in the A phase signal 11 and the B phase signal 12, the A / D converter 21 performs A / D conversion on the held A phase signal 11 and B phase signal 12 (step S43). . After the end of the A / D conversion, the A / D conversion unit 21 notifies the control unit 22 that the A / D conversion is completed (step S44). Thereafter, the process returns to step S41 and waits until the next A / D conversion command is issued.

一方、A/D変換部21に対してA/D変換命令を行った制御部22は、A/D変換部21が処理を行っている間に、前回A/D変換部21が出力した値を処理するための出力値変換処理を行う(ステップS32)。この出力値変換処理について例示する。上述したように、A/D変換部21から出力されたA相信号11、B相信号12のA/D変換出力DA、DBは、図2(b)で示したようなリサージュ図形上で図示することができる。したがって、図2(b)の状態を2次元の配列として持たせておくことにより、DA、DBの組み合わせと図2(b)に示す各領域とを対応させることができる。このようにしてA相信号11及びB相信号12をA/D変換部21において取り込んだ時点において各周期状アナログ信号が対応する領域を求めることが可能である。この後、制御部21に入力されたA/D変換部21の出力が対応している領域と1回前のA/D変換部21の出力が対応している領域との間の変位量が算出される。   On the other hand, the control unit 22 that has issued an A / D conversion command to the A / D conversion unit 21 is a value output by the previous A / D conversion unit 21 while the A / D conversion unit 21 is processing. An output value conversion process for processing is performed (step S32). This output value conversion process will be exemplified. As described above, the A / D conversion outputs DA and DB of the A phase signal 11 and the B phase signal 12 output from the A / D conversion unit 21 are illustrated on the Lissajous figure as shown in FIG. can do. Therefore, by providing the state of FIG. 2 (b) as a two-dimensional array, the combination of DA and DB can be associated with each area shown in FIG. 2 (b). In this way, it is possible to obtain a region corresponding to each periodic analog signal when the A-phase signal 11 and the B-phase signal 12 are taken in the A / D converter 21. Thereafter, the amount of displacement between the region corresponding to the output of the A / D conversion unit 21 input to the control unit 21 and the region corresponding to the output of the previous A / D conversion unit 21 is Calculated.

このような出力値変換処理では、時間の掛かる処理である乗・除算を行う必要がない。なお、若干時間が掛かるが、周期状アナログ信号の1周期分の配列を持たせるのではなく、一部の周期部分のみを配列として持たせるようにしても構わない。ただし、例えば、第1象限のみの配列とした場合には、象限の判定、配列読み出し時に代入するA相のA/D変換出力値とB相のA/D変換出力値の和減算による変換、及び読みだした配列に1周期分の配列と同じ値となるような補正値の足し算等の処理を追加する必要がある。   In such an output value conversion process, it is not necessary to perform multiplication / division, which is a time-consuming process. Although it takes some time, instead of providing an array for one period of the periodic analog signal, only a part of the periodic parts may be provided as an array. However, for example, in the case of an array of only the first quadrant, quadrant determination, conversion by sum subtraction of A phase A / D conversion output value and B phase A / D conversion output value to be substituted at the time of array reading, In addition, it is necessary to add processing such as addition of correction values so that the read array has the same value as the array for one period.

出力値変換処理の後、制御部22は、出力部23において出力制御処理を実行させる(ステップS33)。ここでの出力制御処理は制御部22から出力される変位量を出力端子から出力させる処理である。出力制御処理の後、制御部22は、A/D変換部21の処理が完了したか、即ちA/D変換部21からのA/D変換完了の通知を受けたか否かを判定する(ステップS34)。ステップS34の判定において、A/D変換部21の処理が完了していない場合に、制御部22は、ステップS34の判定を継続しつつ、待機する。一方、ステップS34の判定において、A/D変換部21の処理が完了した場合に、制御部22は、A/D変換部21に対して次のA/D変換命令を行う。   After the output value conversion process, the control unit 22 causes the output unit 23 to execute the output control process (step S33). The output control process here is a process for outputting the displacement amount output from the control unit 22 from the output terminal. After the output control process, the control unit 22 determines whether or not the process of the A / D conversion unit 21 is completed, that is, whether or not the A / D conversion completion notification has been received from the A / D conversion unit 21 (step). S34). When the process of the A / D conversion unit 21 is not completed in the determination in step S34, the control unit 22 stands by while continuing the determination in step S34. On the other hand, when the processing of the A / D conversion unit 21 is completed in the determination in step S <b> 34, the control unit 22 issues the next A / D conversion command to the A / D conversion unit 21.

図4は、図3の処理の具体例を示す図である。ここで、図4は、エンコーダ10から出力されるA相信号11、B相信号12に基づき、出力部23から、カウンタ30が計数することを目的とした形式のデジタル信号を出力させる場合について示している。   FIG. 4 is a diagram illustrating a specific example of the processing of FIG. Here, FIG. 4 shows a case where the output unit 23 outputs a digital signal in a format intended for counting by the counter 30 based on the A-phase signal 11 and the B-phase signal 12 output from the encoder 10. ing.

上述したように、エンコーダ10からは、図4(a)に示すようなA相信号11、B相信号12がエンコーダ用信号処理回路20に入力される。各周期状アナログ信号の周波数帯域が低速の帯域である場合、2相のA/D変換出力DA、DBは、図4(b)に示す波形となる。この場合、カウンタ30は、変位量をおよそ等間隔でカウントすることが可能である。一方、各周期状アナログ信号の周波数帯域が高速の帯域となった場合の2相のA/D変換出力DA、DBは、図4(c)に示す波形となる。つまり、図4(c)の期間T1の開始時に、制御部22は、A/D変換命令を行い、その後に1回前のA/D変換出力を用いて出力値変換処理を行う。そして、図4(c)の期間T2で出力部23において出力制御処理を実行させてカウンタ30においてカウントされる変位量を出力する。また、期間T1の開始時に行われるA/D変換命令に従って、A/D変換部21はA/D変換を行う。   As described above, the A-phase signal 11 and the B-phase signal 12 as shown in FIG. 4A are input from the encoder 10 to the encoder signal processing circuit 20. When the frequency band of each periodic analog signal is a low-speed band, the two-phase A / D conversion outputs DA and DB have waveforms shown in FIG. In this case, the counter 30 can count the displacement amount at approximately equal intervals. On the other hand, the two-phase A / D conversion outputs DA and DB when the frequency band of each periodic analog signal is a high-speed band have the waveforms shown in FIG. That is, at the start of the period T1 in FIG. 4C, the control unit 22 performs an A / D conversion command, and then performs output value conversion processing using the previous A / D conversion output. Then, in the period T <b> 2 of FIG. 4C, the output control process is executed in the output unit 23, and the displacement amount counted in the counter 30 is output. In addition, the A / D conversion unit 21 performs A / D conversion in accordance with an A / D conversion command performed at the start of the period T1.

例えば、図4(a)に示す領域1の時点の信号については、時刻AにおいてなされるA/D変換命令に従ってA/D変換される。ここでA/D変換された値は、時刻BのA/D変換命令に続く出力値変換処理において処理される。そして、この出力値変換処理に続く出力制御処理で出力される。また、時刻BのA/D変換命令を受けて領域7についてのA/D変換が行われる。ここでA/D変換された値は、時刻CのA/D変換命令に続く出力値変換処理において処理される。領域8以後のA/D変換出力についても領域1,7と同様に、A/D変換が行われた次のタイミングにおける出力値変換処理において処理され、その後の出力制御処理において出力される。   For example, the signal at the time of region 1 shown in FIG. 4A is A / D converted in accordance with an A / D conversion command made at time A. The A / D converted value is processed in an output value conversion process following the A / D conversion instruction at time B. Then, it is output in an output control process following the output value conversion process. In response to the A / D conversion command at time B, A / D conversion is performed for the region 7. The A / D converted value is processed in an output value conversion process following the A / D conversion instruction at time C. Similarly to the areas 1 and 7, the A / D conversion outputs after the area 8 are processed in the output value conversion process at the next timing after the A / D conversion, and are output in the subsequent output control process.

ここで、エンコーダ10が出力したA相信号11、B相信号12は、信号基準が略正弦波状信号の中心電圧となっていないことが多い。そこで、信号基準の略正弦波状信号の中心電圧からのずれをエンコーダ10やエンコーダ用信号処理回路20の電源を入れたときなどに検出する等してA相、B相の各相に応じた基準値として記憶しておき、この基準値に基づきA/D変換部21からのA/D変換出力値をシフトする構成とすることが望ましい。   Here, the A-phase signal 11 and the B-phase signal 12 output from the encoder 10 often have a signal reference that is not the center voltage of a substantially sinusoidal signal. Therefore, a reference corresponding to each phase of the A phase and the B phase is detected by detecting a deviation of the signal reference from the center voltage of the substantially sinusoidal signal when the encoder 10 or the encoder signal processing circuit 20 is turned on. It is desirable to store the value as a value and shift the A / D conversion output value from the A / D conversion unit 21 based on the reference value.

以下、本実施形態の効果について説明する。エンコーダ用信号処理回路20をマイコンで構成する場合、A/D変換の速度が比較的遅いことや、処理をプログラムでシリアルに行う必要があるため、エンコーダ10からの周期状アナログ信号を処理して出力するまでに時間が掛かる。本実施形態では、並列可能な系は並列で動作させ、且つA/D変換も最低限の回数だけ、即ち制御部22において処理が可能な分だけ実行させるようにしている。これにより、エンコーダ10からの周期状アナログ信号の周波数帯域が高速となったときでも、今回と前回との間の変位量を効率良く求めることができる。   Hereinafter, the effect of this embodiment will be described. When the encoder signal processing circuit 20 is configured by a microcomputer, the A / D conversion speed is relatively slow and the processing needs to be performed serially by a program. Therefore, the periodic analog signal from the encoder 10 is processed. It takes time to output. In the present embodiment, parallel systems are operated in parallel, and A / D conversion is performed a minimum number of times, that is, as much as processing is possible in the control unit 22. Thereby, even when the frequency band of the periodic analog signal from the encoder 10 becomes high speed, the displacement amount between the current time and the previous time can be obtained efficiently.

また、本実施形態では、エンコーダ信号のオフセット電圧調整、振幅調整(オフセット電圧調整ができているため、調整しなくてもエンコーダ信号の処理が可能)等がいらないため、部品点数を減らすことが可能である。これにより、費用をかけて開発する必要のある専用のエンコーダ信号処理回路とほぼ同等の小型を実現できる。また、調整の手間が要らず、また汎用部品を利用できるため低価格で構成することができる。さらに、エンコーダ用の周期状アナログ信号の出力をカウンタ用のデジタル信号とした場合にも、抵抗分割方式のエンコーダ用信号処理回路を用いた場合に発生し得る2相間のデジタル信号のエッジの重なりがないため、信頼性も高い。   In addition, in this embodiment, the offset voltage adjustment and amplitude adjustment of the encoder signal (the offset voltage adjustment is possible, so the encoder signal can be processed without adjustment), etc., and the number of parts can be reduced. It is. As a result, it is possible to realize a small size almost equivalent to that of a dedicated encoder signal processing circuit that needs to be developed at a high cost. Further, adjustment is not required, and a general-purpose part can be used, so that it can be configured at a low price. Further, even when the output of the periodic analog signal for the encoder is a digital signal for the counter, the edge of the digital signal between the two phases that may occur when the resistance signal processing circuit for the encoder is used is overlapped. Because it is not reliable.

ここで、図1の例において、出力部23は、制御部22の処理結果を単に出力端子からカウンタ30に出力する構成について説明している。これに対し、図5に示すように、エンコーダ用信号処理回路20内に記憶部25を設けるようにしても良い。このような構成において、出力部23は、制御部22の出力した変位量を加減算し、この加減算値を記憶部25に逐次記憶させていく。この場合、エンコーダ信号の利用側(カウンタ30等)が記憶部25に記憶させた加減算値を読み出して利用することで、図1の構成よりもさらに高帯域の周期状アナログ信号に対しても追従可能となる。   Here, in the example of FIG. 1, the output unit 23 describes a configuration in which the processing result of the control unit 22 is simply output from the output terminal to the counter 30. On the other hand, as shown in FIG. 5, a storage unit 25 may be provided in the encoder signal processing circuit 20. In such a configuration, the output unit 23 adds and subtracts the displacement amount output from the control unit 22, and sequentially stores the addition and subtraction values in the storage unit 25. In this case, the addition side of the encoder signal (counter 30 or the like) reads out and uses the addition / subtraction value stored in the storage unit 25, so that it follows a periodic analog signal having a higher bandwidth than the configuration of FIG. It becomes possible.

また、制御部22の処理とA/D変換部21との処理を並列処理とするだけでなく、制御部22の一部の処理や出力部23の一部の処理、若しくは全ての処理を並列処理する構成とすれば、さらに高帯域な周期状アナログ信号にも対応可能となる。   In addition, the processing of the control unit 22 and the processing of the A / D conversion unit 21 are not only parallel processing, but also part of the processing of the control unit 22, part of the processing of the output unit 23, or all processing are performed in parallel. If it is configured to process, it is possible to cope with a periodic analog signal having a higher bandwidth.

さらに、図2(b)のリサージュ図形上でエンコーダヘッドとエンコーダスケールとの変位が変位量に対して均等でない場合であっても、配列上のデータを均等になるように配置することにより、エンコーダヘッドとエンコーダスケールとの変位とエンコーダ用信号処理回路の出力信号の変位とを一致させることが可能である。   Further, even if the displacement between the encoder head and the encoder scale on the Lissajous figure of FIG. 2B is not equal to the displacement, the data on the array is arranged so as to be equal, It is possible to make the displacement between the head and the encoder scale coincide with the displacement of the output signal of the encoder signal processing circuit.

[第2の実施形態]
次に、本発明の第2の実施形態について説明する。図6は、第2の実施形態のエンコーダ用信号処理回路の構成を示す図である。図6に示すエンコーダ用信号処理回路20は、制御部22にエラー検出部22aを設けた点以外は第1の実施形態と同様である。したがって、図6において、図1、図5と同様の構成については図1、図5と同様の参照符号を付すことで説明を省略する。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. FIG. 6 is a diagram illustrating a configuration of an encoder signal processing circuit according to the second embodiment. The encoder signal processing circuit 20 shown in FIG. 6 is the same as that of the first embodiment except that an error detection unit 22a is provided in the control unit 22. Therefore, in FIG. 6, the same components as those in FIGS. 1 and 5 are denoted by the same reference numerals as those in FIGS. 1 and 5, and the description thereof is omitted.

以下、エラー検出部22aの動作について説明する。図7に示すように、前回の出力値変換処理によって得られたA/D変換出力値DA、DBが対応している領域が領域1であり、今回の出力値変換処理によって得られたA/D変換出力値DA、DBが対応している領域が領域11であった場合には、変位量を求める際に、前回から今回までで右回りに−10変位したのか、左回りに+10変位したのかが不明となる。このような場合、正しい変位方向を求めることができなくなる。エラー検出部22aは、制御部22における出力値変換処理において得られた前回と今回との間の変位量の絶対値が所定以上の場合、エラーを検出したとしてエラー信号を発生させる。ここで、所定以上の値とは、最低限、分割数Nの半分近辺を含むように設定する。   Hereinafter, the operation of the error detection unit 22a will be described. As shown in FIG. 7, the area corresponding to the A / D conversion output values DA and DB obtained by the previous output value conversion process is the area 1, and the A / D obtained by the current output value conversion process is When the region corresponding to the D-converted output values DA and DB is the region 11, when obtaining the displacement amount, the displacement from the previous time to the current time is −10 or clockwise is shifted by +10. It becomes unknown. In such a case, the correct displacement direction cannot be obtained. If the absolute value of the displacement amount between the previous time and the current time obtained in the output value conversion process in the control unit 22 is greater than or equal to a predetermined value, the error detection unit 22a generates an error signal as detecting an error. Here, the value greater than or equal to a predetermined value is set so as to include at least half of the division number N.

なお、エラーの発生を複数段階とし、変位量の絶対値が小さいときは警告信号のみを発生させるようにし、大きいときはエラー信号を発生させるようにしても良い。   It should be noted that error generation may be performed in a plurality of stages so that only a warning signal is generated when the absolute value of the displacement is small, and an error signal is generated when the absolute value is large.

以上の第2の実施形態によれば、エンコーダスケールとエンコーダヘッドとの変位方向が変わった場合に、エンコーダ用信号処理回路が追従できる帯域のぎりぎりのところまで利用していても、帯域を越えた場合にはエラー信号が発生される。このため、エンコーダ用信号処理回路の出力に対する信頼性を向上させることが可能となる。   According to the second embodiment described above, when the displacement direction of the encoder scale and the encoder head changes, the band is exceeded even if it is used to the limit of the band that the encoder signal processing circuit can follow. In some cases, an error signal is generated. For this reason, it becomes possible to improve the reliability with respect to the output of the encoder signal processing circuit.

以上実施形態に基づいて本発明を説明したが、本発明は上述した実施形態に限定されるものではなく、本発明の要旨の範囲内で種々の変形や応用が可能なことは勿論である。   Although the present invention has been described above based on the embodiments, the present invention is not limited to the above-described embodiments, and various modifications and applications are naturally possible within the scope of the gist of the present invention.

さらに、上記した実施形態には種々の段階の発明が含まれており、開示される複数の構成要件の適当な組合せにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件からいくつかの構成要件が削除されても、上述したような課題を解決でき、上述したような効果が得られる場合には、この構成要件が削除された構成も発明として抽出され得る。   Further, the above-described embodiments include various stages of the invention, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if some configuration requirements are deleted from all the configuration requirements shown in the embodiment, the above-described problem can be solved, and this configuration requirement is deleted when the above-described effects can be obtained. The configuration can also be extracted as an invention.

本発明の第1の実施形態に係るエンコーダ用信号処理回路の構成を示す図である。It is a figure which shows the structure of the signal processing circuit for encoders concerning the 1st Embodiment of this invention. 図2(a)はエンコーダヘッドから出力される2相の周期状アナログ信号を示す図であり、図2(b)はリサージュ図形を示す図である。FIG. 2A is a diagram showing a two-phase periodic analog signal output from the encoder head, and FIG. 2B is a diagram showing a Lissajous figure. 図3(a)はA/D変換部の動作を示すフローチャートであり、図3(b)は制御部の動作を示すフローチャートである。FIG. 3A is a flowchart showing the operation of the A / D conversion unit, and FIG. 3B is a flowchart showing the operation of the control unit. 図3の処理の具体例を示す図である。It is a figure which shows the specific example of the process of FIG. 本発明の第1の実施形態の変形例について示す図である。It is a figure shown about the modification of the 1st Embodiment of this invention. 本発明の第2の実施形態に係るエンコーダ用信号処理回路の構成を示す図である。It is a figure which shows the structure of the signal processing circuit for encoders concerning the 2nd Embodiment of this invention. 変位量が求められなくなる場合の例について示す図である。It is a figure shown about the example when a displacement amount cannot be calculated | required. 従来のエンコーダ用信号処理回路について示す図である。It is a figure shown about the conventional signal processing circuit for encoders.

符号の説明Explanation of symbols

10…エンコーダ、20…エンコーダ用信号処理回路、21…A/D変換部、22…制御部、22a…エラー検出部、23…出力部、23…制御部、24…電気部材、25…記憶部、30…カウンタ   DESCRIPTION OF SYMBOLS 10 ... Encoder, 20 ... Signal processing circuit for encoder, 21 ... A / D conversion part, 22 ... Control part, 22a ... Error detection part, 23 ... Output part, 23 ... Control part, 24 ... Electric member, 25 ... Memory | storage part 30 ... Counter

Claims (7)

エンコーダスケールとエンコーダヘッドとの相対変位に従って周期的に変化する少なくとも2相の周期状アナログ信号を処理するエンコーダ用信号処理回路において、
前記少なくとも2相の周期状アナログ信号をデジタル信号に変換する命令に基づいて、前記少なくとも2相の周期状アナログ信号における同時点の信号をホールドし、該ホールドした信号をデジタル信号に変換するA/D変換部と、
前記A/D変換部に対して前記少なくとも2相の周期状アナログ信号をデジタル信号に変換する命令をするとともに、前記A/D変換部の出力を所定の工程にて時系列的に処理する制御部と、
前記制御部において処理された結果を出力する出力部と、
を具備することを特徴とするエンコーダ用信号処理回路。
In an encoder signal processing circuit that processes at least two-phase periodic analog signals that periodically change according to the relative displacement between the encoder scale and the encoder head,
Based on the command for converting the at least two-phase periodic analog signal into a digital signal, the signal at the same point in the at least two-phase periodic analog signal is held, and the held signal is converted into a digital signal. A D conversion unit;
Instructing the A / D converter to convert the at least two-phase periodic analog signal into a digital signal, and controlling the output of the A / D converter in a predetermined process in time series And
An output unit for outputting a result processed in the control unit;
An encoder signal processing circuit comprising:
前記所定の工程は、前記周期状アナログ信号の1周期分をN(Nは2以上の整数)個の領域に等分したときに前記A/D変換部の出力が対応している領域を求め、該求めた前記A/D変換部の出力が現在対応している領域と1回前の前記A/D変換部の出力が対応していた領域との間の変位量を求める工程を含むことを特徴とする請求項1に記載のエンコーダ用信号処理回路。   The predetermined step is to obtain a region to which the output of the A / D converter corresponds when one cycle of the periodic analog signal is equally divided into N (N is an integer of 2 or more) regions. And a step of obtaining a displacement amount between a region where the obtained output of the A / D conversion unit currently corresponds and a region where the output of the previous A / D conversion unit corresponded. The signal processing circuit for an encoder according to claim 1. 前記所定の工程は、前記A/D変換部の出力が対応している領域を求める際に、前記A/D変換部が出力した結果から、各相の周期状アナログ信号に応じた値を基準値とする工程を含むことを特徴とする請求項2に記載のエンコーダ用信号処理回路。   The predetermined step is based on a value corresponding to a periodic analog signal of each phase based on a result output from the A / D converter when obtaining a region corresponding to the output of the A / D converter. The encoder signal processing circuit according to claim 2, further comprising a step of setting the value. 前記所定の工程は、前記A/D変換部の出力が現在対応している領域と1回前の前記A/D変換部の出力が対応していた領域との間の変位量が所定以上の場合に、エラー信号を発生する工程を含むことを特徴とする請求項2又は3に記載のエンコーダ用信号処理回路。   In the predetermined step, a displacement amount between a region where the output of the A / D conversion unit currently corresponds and a region where the output of the previous A / D conversion unit corresponded is greater than or equal to a predetermined amount. 4. The encoder signal processing circuit according to claim 2, further comprising a step of generating an error signal. 前記所定以上は、少なくともN/2を含むことを特徴とする請求項4に記載のエンコーダ用信号処理回路。   The encoder signal processing circuit according to claim 4, wherein the predetermined value includes at least N / 2. 前記出力部は、前記制御部において処理された出力を出力端子から出力する、及び/又は前記制御部において処理された出力を記憶部に格納することを特徴とする請求項1乃至5の何れか1項に記載のエンコーダ用信号処理回路。   6. The output unit according to claim 1, wherein the output unit outputs the output processed by the control unit from an output terminal and / or stores the output processed by the control unit in a storage unit. The signal processing circuit for an encoder according to item 1. 前記A/D変換部と、前記制御部と、前記出力部とは同一のIC基板上に搭載される又は同一のICパッケージ内に搭載されることを特徴とする請求項1乃至6の何れか1項に記載のエンコーダ用信号処理回路。   The A / D conversion unit, the control unit, and the output unit are mounted on the same IC board or mounted in the same IC package. The signal processing circuit for an encoder according to item 1.
JP2008139932A 2008-05-28 2008-05-28 Encoder signal processing circuit Active JP5097012B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008139932A JP5097012B2 (en) 2008-05-28 2008-05-28 Encoder signal processing circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008139932A JP5097012B2 (en) 2008-05-28 2008-05-28 Encoder signal processing circuit

Publications (2)

Publication Number Publication Date
JP2009288020A JP2009288020A (en) 2009-12-10
JP5097012B2 true JP5097012B2 (en) 2012-12-12

Family

ID=41457384

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008139932A Active JP5097012B2 (en) 2008-05-28 2008-05-28 Encoder signal processing circuit

Country Status (1)

Country Link
JP (1) JP5097012B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62237316A (en) * 1986-04-09 1987-10-17 Hitachi Ltd Detection error correcting device for position detector
JPH02189416A (en) * 1989-01-17 1990-07-25 Yaskawa Electric Mfg Co Ltd Displacement measuring apparatus
JP3349575B2 (en) * 1993-12-15 2002-11-25 ヤマハ発動機株式会社 Displacement speed detection method and device
JP2649486B2 (en) * 1994-03-15 1997-09-03 株式会社マコメ研究所 Interpolation circuit
JP4337428B2 (en) * 2003-06-30 2009-09-30 株式会社ニコン Encoder
JP2006349591A (en) * 2005-06-17 2006-12-28 Hi-Lex Corporation Rotary sensor and mobile body system for vehicle using it
JP4746427B2 (en) * 2005-12-27 2011-08-10 オリンパス株式会社 Encoder interpolation device

Also Published As

Publication number Publication date
JP2009288020A (en) 2009-12-10

Similar Documents

Publication Publication Date Title
US9255817B2 (en) Rotation-angle detection device, image processing apparatus, and rotation-angle detection method
JP6484008B2 (en) Encoder and rotation angle position calculation method
JP4453758B2 (en) Encoder signal phase correction circuit
JP4301913B2 (en) Motor control device
US9182251B2 (en) Angle detector and motor drive controller
JP4923730B2 (en) Compensation method and angle detection apparatus using the same in resolver angle detection
CN107860404B (en) Rotary encoder and absolute angle position detection method for rotary encoder
JP5088313B2 (en) Linear encoder signal processing apparatus and signal processing method
JP5115419B2 (en) Optical encoder
JPWO2007055092A1 (en) Encoder signal processing device
JP5842334B2 (en) Encoder device and drive device
JP6205683B2 (en) Rotation angle detection device, image processing device, and rotation angle detection method
JP4782434B2 (en) Rotation detection device signal processing device
JP5097012B2 (en) Encoder signal processing circuit
JP2004333156A (en) Encoder signal interpolation divider
JP5092847B2 (en) Deviation detection device, deviation detection method, and method of manufacturing electric motor with position detection sensor
JP5865059B2 (en) Waveform measuring instrument
JP4581953B2 (en) Encoder output signal correction circuit
JP5162739B2 (en) Encoder signal processing method, encoder device, and servo motor
KR101018713B1 (en) Method for processing output signal of encoder
JP2009053067A (en) Correction value control method of encoder
JP6119389B2 (en) Rotation angle detection device, image processing device, and rotation angle detection method
JP2003130686A (en) Device for detecting position
JP5593731B2 (en) Magnetic encoder
JP2009244022A (en) Phase detection circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110325

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120803

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: 20120911

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120921

R151 Written notification of patent or utility model registration

Ref document number: 5097012

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150928

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250