JP2020190499A - Encoder device - Google Patents

Encoder device Download PDF

Info

Publication number
JP2020190499A
JP2020190499A JP2019096460A JP2019096460A JP2020190499A JP 2020190499 A JP2020190499 A JP 2020190499A JP 2019096460 A JP2019096460 A JP 2019096460A JP 2019096460 A JP2019096460 A JP 2019096460A JP 2020190499 A JP2020190499 A JP 2020190499A
Authority
JP
Japan
Prior art keywords
pulse signal
encoder
count value
angle
maximum count
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.)
Withdrawn
Application number
JP2019096460A
Other languages
Japanese (ja)
Inventor
美宏 奥松
Yoshihiro Okumatsu
美宏 奥松
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2019096460A priority Critical patent/JP2020190499A/en
Publication of JP2020190499A publication Critical patent/JP2020190499A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

To provide an encoder device capable of calculating an angle accurately even in a case where a pulse drop occurs in a pulse signal output from an encoder.SOLUTION: An encoder 10 comprises: an acquisition unit 11 that acquires a maximum count value of the number of pulses of a pulse signal each time a Z-phase pulse signal is input, and holds a plurality of maximum count values; a smoothing processing unit 12 that performs smoothing processing using the plurality of maximum count values; and an angle calculation unit 13 that calculates an angle using a smoothed correction maximum count value.SELECTED DRAWING: Figure 2

Description

本発明は、エンコーダ装置に関する。 The present invention relates to an encoder device.

一般に、ロボットの関節の駆動には、ブラシレスDCサーボモータ等の回転モータであるサーボモータが用いられる。ロボットの関節の角度制御は、サーボモータの出力軸に直結されたエンコーダで、サーボモータの出力軸の回転角度を検出して行われる。 Generally, a servomotor, which is a rotary motor such as a brushless DC servomotor, is used to drive the joints of the robot. The angle control of the joints of the robot is performed by detecting the rotation angle of the output shaft of the servomotor with an encoder directly connected to the output shaft of the servomotor.

このようなモータの回転角度を検出する技術として、例えば、特許文献1に記載された技術がある。特許文献1では、検出対象の角度情報を検出する多極光学式エンコーダと、多極光学式エンコーダからのアナログの電気角情報を予め設定した分解能のデジタルの電気角情報に変換する逓倍回路とを含む角度検出装置が開示されている。角度検出装置は、更に、逓倍回路からのデジタルの電気角情報(θed)に基づき、該電気角情報(θed)に含まれる誤差成分を補正すると共に、検出対象のデジタル機械角情報(θmd)を演算する。 As a technique for detecting the rotation angle of such a motor, for example, there is a technique described in Patent Document 1. In Patent Document 1, a multi-pole optical encoder that detects angle information to be detected and a multiplication circuit that converts analog electric angle information from the multi-pole optical encoder into digital electric angle information with a preset resolution are provided. Including angle detectors are disclosed. The angle detection device further corrects the error component included in the electric angle information (θed) based on the digital electric angle information (θed) from the multiplication circuit, and obtains the digital mechanical angle information (θmd) to be detected. Calculate.

特開2016−38309号公報Japanese Unexamined Patent Publication No. 2016-38309

HSR(Human Support Robot)などのサービスロボットでは、家庭内で人と協調して作業をするために、静粛性が求められる。そのため、モータは正弦波駆動が必要であり、モータには1回転あたり1000パルス以上のパルス数のパルス信号を出力するエンコーダが取り付けられる。 Service robots such as HSR (Human Support Robot) are required to be quiet in order to work in cooperation with people at home. Therefore, the motor needs to be driven by a sine wave, and the motor is equipped with an encoder that outputs a pulse signal having a pulse number of 1000 pulses or more per rotation.

一方、多関節構造とサーボモータによって動作するマニピュレータを備えるロボットは関節の数(軸数)が多いため、安価なモータが求められる。そのため、安価で高出力パルス数のエンコーダが必要となる。しかしながら、この場合、エンコーダから出力されるパルス信号にノイズが乗りやすくなる。このような高ノイズ環境下では、しばしばエンコーダからのパルス信号のパルス抜けが発生する。 On the other hand, a robot equipped with an articulated structure and a manipulator operated by a servomotor has a large number of joints (number of axes), so an inexpensive motor is required. Therefore, an inexpensive encoder with a high output pulse number is required. However, in this case, noise is likely to be added to the pulse signal output from the encoder. In such a high noise environment, pulse loss of the pulse signal from the encoder often occurs.

特許文献1では、エンコーダにおいて検出された電気角情報を逓倍し、逓倍した電気角情報に含まれる誤差成分を補正している。しかし、上記のように、エンコーダからのパルス信号にパルス抜けが発生した場合、誤差の補正精度が悪化し、正確な角度情報を得ることができない。 In Patent Document 1, the electric angle information detected by the encoder is multiplied, and an error component included in the multiplied electric angle information is corrected. However, as described above, when pulse omission occurs in the pulse signal from the encoder, the error correction accuracy deteriorates and accurate angle information cannot be obtained.

本発明は、このような問題に鑑みてなされたものであり、本発明の目的は、エンコーダから出力されるパルス信号にパルス抜けが発生した場合でも、精度よく角度計算を行うことが可能なエンコーダ装置を提供することである。 The present invention has been made in view of such a problem, and an object of the present invention is an encoder capable of accurately calculating an angle even when a pulse drop occurs in a pulse signal output from the encoder. To provide a device.

本発明の一態様に係るエンコーダ装置は、Z相パルス信号が入力される毎に、パルス信号のパルス数の最大カウント値を取得して、複数の最大カウント値を保持する取得部と、複数の前記最大カウント値を用いて平滑化処理を行う平滑化処理部と、平滑化された補正最大カウント値を用いて角度計算を行う角度計算部とを備えるものである。 The encoder device according to one aspect of the present invention includes an acquisition unit that acquires the maximum count value of the number of pulses of the pulse signal each time a Z-phase pulse signal is input and holds a plurality of maximum count values, and a plurality of acquisition units. It includes a smoothing processing unit that performs smoothing processing using the maximum count value, and an angle calculation unit that performs angle calculation using the smoothed correction maximum count value.

本発明によれば、エンコーダから出力されるパルス信号にパルス抜けが発生した場合でも、精度よく角度計算を行うことが可能なエンコーダ装置を提供することができる。 According to the present invention, it is possible to provide an encoder device capable of accurately calculating an angle even when a pulse drop occurs in a pulse signal output from an encoder.

実施の形態に係るエンコーダとBLDCモータとアンプとが接続されている状態を示すブロック図である。It is a block diagram which shows the state which the encoder, the BLDC motor, and the amplifier which concerns on embodiment are connected. 実施の形態に係るエンコーダの構成を示すブロック図である。It is a block diagram which shows the structure of the encoder which concerns on embodiment. 実施の形態の最大カウント値補正処理の一例を示すフロー図である。It is a flow figure which shows an example of the maximum count value correction processing of embodiment. 実施の形態の角度計算処理を示すフロー図である。It is a flow chart which shows the angle calculation process of embodiment. 実施の形態の最大カウント値補正処理の他の例を示すフロー図である。It is a flow figure which shows another example of the maximum count value correction processing of embodiment. エンコーダから出力される正常なパルス信号の波形を示す図である。It is a figure which shows the waveform of the normal pulse signal output from an encoder. エンコーダから出力されるパルス信号にノイズがのった場合の波形を示す図である。It is a figure which shows the waveform when noise is added to the pulse signal output from an encoder. エンコーダのパルス信号のカウント値と、3相モータ電流の関係を示す図である。It is a figure which shows the relationship between the count value of the pulse signal of an encoder, and the three-phase motor current.

以下、図面を参照して本発明の実施形態について説明する。各図における同等の構成要素には同一の符号を付し、重複する説明を省略する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. Equivalent components in each figure are designated by the same reference numerals, and duplicate description will be omitted.

実施の形態は、例えば、ロボットの関節を駆動するブラシレスDCサーボモータ等のモータ制御に必要なロータ角度を検出するエンコーダ装置に関する。図1は、実施の形態に係るエンコーダ10とBLDCモータとアンプとの接続状態を示すブロック図である。ここでは、モータの一例として、ブラシレスDCサーボモータ(以下、BLDCモータ)20が用いられる。BLDCモータ20は、例えば、三相ブラシレスDCサーボモータである。 An embodiment relates to an encoder device that detects a rotor angle required for motor control, such as a brushless DC servomotor that drives a robot joint. FIG. 1 is a block diagram showing a connection state of the encoder 10, the BLDC motor, and the amplifier according to the embodiment. Here, as an example of the motor, a brushless DC servo motor (hereinafter, BLDC motor) 20 is used. The BLDC motor 20 is, for example, a three-phase brushless DC servo motor.

BLDCモータ20は、ロータ、ステータ等を備える一般的な構成のものを用いることができる。BLDCモータ20においては、永久磁石タイプのロータが回転軸と一体に形成される。これらは、ブラシレスDCサーボモータのハウジングに設けられた軸受により、回転自在に保持される。BLDCモータ20の3相(U相、V相、W相)の各ステータコイルには、駆動トルクや速度指令等に応じて電流の制御された電力が供給される。各ステータコイルに供給される電流の位相を制御することで、ロータが回転する。BLDCモータ20の駆動電流の波形には正弦波が用いられる。周波数、振幅、位相を制御することによりBLDCモータ20が効率よく駆動される。 As the BLDC motor 20, a motor having a general configuration including a rotor, a stator, and the like can be used. In the BLDC motor 20, a permanent magnet type rotor is formed integrally with the rotating shaft. These are rotatably held by bearings provided in the housing of the brushless DC servomotor. A current-controlled electric power is supplied to each of the three-phase (U-phase, V-phase, and W-phase) stator coils of the BLDC motor 20 according to a drive torque, a speed command, or the like. The rotor rotates by controlling the phase of the current supplied to each stator coil. A sine wave is used for the waveform of the drive current of the BLDC motor 20. The BLDC motor 20 is efficiently driven by controlling the frequency, amplitude, and phase.

BLDCモータ20の出力軸の一端には、エンコーダ10が接続される。エンコーダ10は、出力軸の回転に伴うインクリメンタルな信号(A相パルス信号、B相パルス信号)を出力するロータリーエンコーダである。エンコーダ10は、例えば、BLDCモータ20に連結された回転軸にスリットを有する回転板が取り付けられた、周知の光学式のインクリメンタル形ロータリーエンコーダとして構成され得る。 An encoder 10 is connected to one end of the output shaft of the BLDC motor 20. The encoder 10 is a rotary encoder that outputs incremental signals (A-phase pulse signal, B-phase pulse signal) accompanying the rotation of the output shaft. The encoder 10 can be configured as, for example, a well-known optical incremental rotary encoder in which a rotating plate having a slit is attached to a rotating shaft connected to the BLDC motor 20.

エンコーダ10は、位相が90度ずれたA相パルス信号、B相パルス信号をロータの回転に同期して出力する。A相パルス信号とB相パルス信号の位相関係によって、BLDCモータ20が正転か逆転かを知ることができる。A相パルス信号、B相パルス信号は回転角度に応じた数のパルスを含む。エンコーダ10は、A相パルス信号、B相パルス信号のパルス数をカウントしたカウント値を生成する。また、エンコーダ10は、ロータが規定の基準位置に到達した際にZ相パルス信号を出力する。Z相パルス信号は、BLDCモータ20のロータが1回転する毎に1回出力されるインデックスパルスである。 The encoder 10 outputs an A-phase pulse signal and a B-phase pulse signal that are 90 degrees out of phase in synchronization with the rotation of the rotor. From the phase relationship between the A-phase pulse signal and the B-phase pulse signal, it is possible to know whether the BLDC motor 20 rotates forward or reverse. The A-phase pulse signal and the B-phase pulse signal include a number of pulses according to the rotation angle. The encoder 10 generates a count value that counts the number of pulses of the A-phase pulse signal and the B-phase pulse signal. Further, the encoder 10 outputs a Z-phase pulse signal when the rotor reaches a specified reference position. The Z-phase pulse signal is an index pulse that is output once for each rotation of the rotor of the BLDC motor 20.

エンコーダ10は、A相パルス信号及びB相パルス信号に基づいて基準角度からの回転量を、Z相信号に基づいてロータの絶対位置を計算する。より具体的に説明すると、エンコーダ10は、A相パルス信号及びB相パルス信号のエッジをカウントし、そのカウント値に基づいて、基準角度からの回転量、ひいては、現在の回転角度を算出する。また、エンコーダ10は、Z相パルス信号を受信したとき、A相パルス信号及びB相パルス信号のカウント値をリセットし、回転角度も基準角度にリセットする。ここでは、パルス信号の予め設定される設定最大カウント値は、一例として、1000であるものとする。 The encoder 10 calculates the amount of rotation from the reference angle based on the A-phase pulse signal and the B-phase pulse signal, and calculates the absolute position of the rotor based on the Z-phase signal. More specifically, the encoder 10 counts the edges of the A-phase pulse signal and the B-phase pulse signal, and calculates the amount of rotation from the reference angle, and thus the current rotation angle, based on the count values. Further, when the encoder 10 receives the Z-phase pulse signal, the encoder 10 resets the count values of the A-phase pulse signal and the B-phase pulse signal, and also resets the rotation angle to the reference angle. Here, it is assumed that the preset maximum count value of the pulse signal is 1000 as an example.

エンコーダ10、BLDCモータ20には、バッテリー(不図示)とアンプ30が接続される。アンプ30は、エンコーダ10により算出されるBLDCモータ20のロータ角度及び角速度に基づいて、BLDCモータ20を制御する。すなわち、アンプ30は、エンコーダ10により算出される角度に応じて予め規定された処理を行う。 A battery (not shown) and an amplifier 30 are connected to the encoder 10 and the BLDC motor 20. The amplifier 30 controls the BLDC motor 20 based on the rotor angle and angular velocity of the BLDC motor 20 calculated by the encoder 10. That is, the amplifier 30 performs a predetermined process according to the angle calculated by the encoder 10.

ここで、図6〜8を参照して、実施の形態において解決すべき問題点について説明する。図6は、エンコーダから出力される正常なパルス信号の波形を示す図であり、図7は、パルス信号にノイズがのった場合の波形を示す図である。図6、図7において、上側から順に、A相パルス信号、B相パルス信号、Z相パルス信号の波形が示されている。なお、図6、図7に示す例は、同一のモータを用いて、同一の制御を行ったものであるが、異なるエンコーダを用いている。図7に示す例で用いたエンコーダが、図6に示す例で用いたものよりも、出力パルス数が多いものである。 Here, problems to be solved in the embodiment will be described with reference to FIGS. 6 to 8. FIG. 6 is a diagram showing a waveform of a normal pulse signal output from the encoder, and FIG. 7 is a diagram showing a waveform when noise is added to the pulse signal. In FIGS. 6 and 7, the waveforms of the A-phase pulse signal, the B-phase pulse signal, and the Z-phase pulse signal are shown in order from the upper side. In the examples shown in FIGS. 6 and 7, the same motor is used and the same control is performed, but different encoders are used. The encoder used in the example shown in FIG. 7 has a larger number of output pulses than the encoder used in the example shown in FIG.

BLDCモータ20のロータ角度は、通常、パルス信号をカウントしたカウント値を設定最大カウント値(1000)で除算し、2πを乗算することで得られる。これにより、BLDCモータ20のロータが0〜2πのいずれの位置にあるのかがわかる。図6に示すように、正常な状態では、A相パルス信号とB相パルス信号のH、Lが交互になっている。この場合、Z相パルス信号の受信によってカウント値がリセットされた後、A相、B相パルス信号のカウント値が順次インクリメントされる。そのため、パルス信号が正常に入力された場合、カウント値が0のときロータの位置は「0」であり、カウント値が最大値である1000のときロータの位置は「2π」である。 The rotor angle of the BLDC motor 20 is usually obtained by dividing the count value obtained by counting the pulse signal by the set maximum count value (1000) and multiplying by 2π. From this, it is possible to know which position of 0 to 2π the rotor of the BLDC motor 20 is located. As shown in FIG. 6, in a normal state, H and L of the A-phase pulse signal and the B-phase pulse signal alternate. In this case, after the count value is reset by receiving the Z-phase pulse signal, the count values of the A-phase and B-phase pulse signals are sequentially incremented. Therefore, when the pulse signal is normally input, the rotor position is "0" when the count value is 0, and the rotor position is "2π" when the count value is 1000, which is the maximum value.

これに対し、図7に示すように、ノイズの影響により、A相パルス信号、B相パルス信号が正確に受信されず、パルス抜けが発生したとする。この場合、パルス信号のエッジのカウントが行われない。この場合、カウント値が設定最大カウント値(1000)になる前にZ相パルス信号が入力され、カウント値が0にリセットされる。 On the other hand, as shown in FIG. 7, it is assumed that the A-phase pulse signal and the B-phase pulse signal are not accurately received due to the influence of noise, and pulse omission occurs. In this case, the edge of the pulse signal is not counted. In this case, the Z-phase pulse signal is input before the count value reaches the set maximum count value (1000), and the count value is reset to 0.

パルス抜けが発生している間は、エンコーダ10において、角度の更新が行なわれない。その結果、実際のロータの角度は変化しているにも関わらず、エンコーダ10から出力される角度は一定値を保ったままとなる。パルス抜けが解消されて、A相、B相パルス信号が正確に受信できるようになると、再度、エンコーダ10において角度の更新が行なわれるが、パルス抜けの間に生じた実際の角度と算出された角度との誤差は、そのまま残存する。 While the pulse drop occurs, the angle is not updated in the encoder 10. As a result, the angle output from the encoder 10 remains constant even though the actual rotor angle has changed. When the pulse loss is eliminated and the A-phase and B-phase pulse signals can be received accurately, the angle is updated again in the encoder 10, but it is calculated as the actual angle generated during the pulse loss. The error with the angle remains as it is.

図8は、エンコーダ10のパルス信号のカウント値と、3相モータ電流の関係を示す。図8において、上側から順に、エンコーダ10におけるパルス信号のカウント値、該カウント値をBLDCモータ20の誘起電圧の位相に合わせてオフセットしたオフセットカウント値が示されている。なお、ここでは、オフセットカウント値は、U相のステータコイルの誘起電圧のゼロクロスを0度に合わせたものである。また、図8の最下部には、BLDCモータ20の3相(U相、V相、W相)の電流の波形が示されている。 FIG. 8 shows the relationship between the count value of the pulse signal of the encoder 10 and the three-phase motor current. In FIG. 8, in order from the upper side, the count value of the pulse signal in the encoder 10 and the offset count value obtained by offsetting the count value according to the phase of the induced voltage of the BLDC motor 20 are shown. Here, the offset count value is the value obtained by adjusting the zero cross of the induced voltage of the U-phase stator coil to 0 degrees. Further, at the bottom of FIG. 8, the waveforms of the currents of the three phases (U phase, V phase, W phase) of the BLDC motor 20 are shown.

図8中矢印で示すように、パルス抜けが発生した分だけカウント値が連続的に増加しない部分が発生すると、3相電流波形に大きな乱れが発生してしまう。また、パルス抜けが発生したカウント値と設定最大カウント値を用いて算出されるロータ角度と実際のロータ角度との間に誤差が発生する。そこで、本発明者は、このような問題点を解決すべく、以下の構成を考案した。 As shown by the arrow in FIG. 8, if a portion where the count value does not continuously increase by the amount of pulse omission occurs, a large disturbance occurs in the three-phase current waveform. In addition, an error occurs between the count value at which the pulse is lost, the rotor angle calculated using the set maximum count value, and the actual rotor angle. Therefore, the present inventor has devised the following configuration in order to solve such a problem.

図2は、実施の形態に係るエンコーダ10の構成を示すブロック図である。実施の形態に係るエンコーダ10は、Z相パルス信号が入力される毎に、パルス信号のパルス数の最大カウント値を取得して、複数の最大カウント値を保持する取得部11と、複数の最大カウント値を用いて平滑化処理を行う平滑化処理部12と、平滑化された補正最大カウント値を用いて角度計算を行う角度計算部13とを備えるものである。このように、設定最大カウント値の代わりに、複数の最大カウント値を平滑化した補正最大カウント値を用いて角度計算を行うことで、エンコーダから出力されるパルス信号にパルス抜けが発生した場合でも、精度よく角度計算を行うことが可能となる。 FIG. 2 is a block diagram showing a configuration of the encoder 10 according to the embodiment. The encoder 10 according to the embodiment has an acquisition unit 11 that acquires a maximum count value of the number of pulses of the pulse signal each time a Z-phase pulse signal is input and holds a plurality of maximum count values, and a plurality of maximum count values. It includes a smoothing processing unit 12 that performs smoothing processing using the count value, and an angle calculation unit 13 that performs angle calculation using the smoothed maximum correction count value. In this way, by performing angle calculation using the corrected maximum count value obtained by smoothing a plurality of maximum count values instead of the set maximum count value, even if a pulse drop occurs in the pulse signal output from the encoder. , It is possible to calculate the angle with high accuracy.

図3は、実施の形態の最大カウント値補正処理の一例を示すフロー図である。図3に示すように、まず、Z相パルス信号が入力されたか否かが判断される(ステップS11)。Z相パルス信号が入力されていない場合(ステップS11、NO)、処理は終了する。この場合、上述したように、設定最大カウント値を用いてロータ角度の計算が行われる。 FIG. 3 is a flow chart showing an example of the maximum count value correction process of the embodiment. As shown in FIG. 3, first, it is determined whether or not a Z-phase pulse signal has been input (step S11). When the Z-phase pulse signal is not input (step S11, NO), the process ends. In this case, as described above, the rotor angle is calculated using the set maximum count value.

一方、Z相パルス信号が入力された場合(ステップS11、YES)、A相、B相パルス信号のパルス数の最大カウント値が取得される(ステップS12)。取得部11では、Z相パルス信号が入力される毎に、最大カウント値が取得され、複数の最大カウント値が保持される。 On the other hand, when the Z-phase pulse signal is input (step S11, YES), the maximum count value of the number of pulses of the A-phase and B-phase pulse signals is acquired (step S12). The acquisition unit 11 acquires a maximum count value each time a Z-phase pulse signal is input, and holds a plurality of maximum count values.

なお、Z相パルス信号入力時の最大カウント値が設定大カウント値と等しい場合、パルス抜けは0である。この最大カウント値が設定最大カウント値より小さい場合、パルス抜けが発生したことを示している。例えば、ここでは、5つの最大カウント値が保持されるものとする。設定最大カウント値を1000としたときにおいて、各最大カウント値が以下の値であったときのパルス抜けの回数は、以下の通りである。
(1)995 パルス抜け5回
(2)1000 パルス抜け0回
(3)998 パルス抜け2回
(4)997 パルス抜け3回
(5)1000 パルス抜け0回
When the maximum count value at the time of inputting the Z-phase pulse signal is equal to the set large count value, the pulse omission is 0. When this maximum count value is smaller than the set maximum count value, it indicates that pulse omission has occurred. For example, here, it is assumed that five maximum count values are held. When the set maximum count value is 1000, the number of pulse omissions when each maximum count value is the following value is as follows.
(1) 995 pulse omission 5 times (2) 1000 pulse omission 0 times (3) 998 pulse omission 2 times (4) 997 pulse omission 3 times (5) 1000 pulse omission 0 times

次に、取得部11において保持される複数の最大カウント値を用いて平滑化処理を行う(ステップS13)。ここでは、平滑化処理の一例として、単純平均処理を行うものとする。上記の(1)〜(5)の平均値は、998となる。なお、平滑化処理としては、単純平均処理に限定されず、移動平均処理やローパスフィルタ処理を行ってもよい。そして、平滑化された最大カウント値を補正最大カウント値として更新する(ステップS14)。 Next, the smoothing process is performed using the plurality of maximum count values held by the acquisition unit 11 (step S13). Here, as an example of the smoothing process, a simple averaging process is performed. The average value of the above (1) to (5) is 998. The smoothing process is not limited to the simple averaging process, and a moving average process or a low-pass filter process may be performed. Then, the smoothed maximum count value is updated as the corrected maximum count value (step S14).

次に、最大カウント値補正処理を行った後の、ロータ角度の計算処理について説明する。図4は、実施の形態の角度計算処理を示すフロー図である。図4に示すように、まず、パルス信号のカウント値が入力される(ステップS21)。そして、入力されたカウント値を図3のフローで得られた補正最大カウント値(998)で除算する(ステップS22)。この値に2πを乗算する(ステップS23)ことで、ロータ角度が得られる。 Next, the calculation process of the rotor angle after the maximum count value correction process will be described. FIG. 4 is a flow chart showing the angle calculation process of the embodiment. As shown in FIG. 4, first, the count value of the pulse signal is input (step S21). Then, the input count value is divided by the corrected maximum count value (998) obtained in the flow of FIG. 3 (step S22). The rotor angle is obtained by multiplying this value by 2π (step S23).

このように、ロータ角度の計算に、複数の最大カウント値を平均した補正最大カウント値を用いることで、角度の急変を最小化することができる。なお、次にZ相パルス信号が入力されるまでは、補正最大カウント値の更新は行われず、当該補正最大カウント値を用いて、ロータ角度の計算が行われる。 In this way, the sudden change in the angle can be minimized by using the corrected maximum count value obtained by averaging a plurality of maximum count values in the calculation of the rotor angle. The correction maximum count value is not updated until the next Z-phase pulse signal is input, and the rotor angle is calculated using the correction maximum count value.

図5は、実施の形態の最大カウント値補正処理の他の例を示すフロー図である。図5において、図3と同一の処理には同一の符号を付している。図5に示す例では、図3に示す例のステップS14の後に、補正最大カウント値を不揮発性メモリに保存する処理(ステップS15)が追加されている。 FIG. 5 is a flow chart showing another example of the maximum count value correction process of the embodiment. In FIG. 5, the same processes as those in FIG. 3 are designated by the same reference numerals. In the example shown in FIG. 5, a process of saving the correction maximum count value in the non-volatile memory (step S15) is added after step S14 of the example shown in FIG.

図3に示す例では、電源を再投入した場合、ロータ角度の計算には予め設定された設定最大カウント値が用いられる。これに対し、図5に示す例では、補正最大アカウント値の更新が行われた後に(ステップS14)、該補正最大カウント値が不揮発性メモリに保持される(ステップS15)。これにより、次回の電源投入時には、不揮発性メモリに保持された、複数の最大アカウント値を平滑化した補正最大アカウント値を用いて、ロータ角度の計算を行うことができる。 In the example shown in FIG. 3, when the power is turned on again, a preset maximum count value is used for calculating the rotor angle. On the other hand, in the example shown in FIG. 5, after the correction maximum account value is updated (step S14), the correction maximum count value is held in the non-volatile memory (step S15). As a result, when the power is turned on next time, the rotor angle can be calculated using the corrected maximum account value obtained by smoothing the plurality of maximum account values held in the non-volatile memory.

以上説明したように、本発明によれば、エンコーダから出力されるパルス信号にパルス抜けが発生した場合でも、パルス抜けに合わせて角度計算を行うことができる。このように、精度よく角度計算を行うことで、モータを搭載したロボットに振動などが発生しないようにできる。 As described above, according to the present invention, even when a pulse drop occurs in the pulse signal output from the encoder, the angle can be calculated according to the pulse drop. By calculating the angle with high accuracy in this way, it is possible to prevent the robot equipped with the motor from vibrating or the like.

なお、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。実施の形態は、電気自動車やハイブリッド自動車における駆動用モータのロータ角度検出に用いることも可能である。 The present invention is not limited to the above embodiment, and can be appropriately modified without departing from the spirit. The embodiment can also be used for detecting the rotor angle of a drive motor in an electric vehicle or a hybrid vehicle.

10 エンコーダ
11 取得部
12 平滑化処理部
13 角度計算部
20 BLDCモータ
30 アンプ
10 Encoder 11 Acquisition unit 12 Smoothing processing unit 13 Angle calculation unit 20 BLDC motor 30 Amplifier

Claims (1)

Z相パルス信号が入力される毎に、パルス信号のパルス数の最大カウント値を取得して、複数の最大カウント値を保持する取得部と、
複数の前記最大カウント値を用いて平滑化処理を行う平滑化処理部と、
平滑化された補正最大カウント値を用いて角度計算を行う角度計算部と、
を備える、
エンコーダ装置。
Each time a Z-phase pulse signal is input, an acquisition unit that acquires the maximum count value of the number of pulses of the pulse signal and holds a plurality of maximum count values, and
A smoothing processing unit that performs smoothing processing using a plurality of the maximum count values,
An angle calculation unit that calculates an angle using the smoothed maximum correction count value,
To prepare
Encoder device.
JP2019096460A 2019-05-23 2019-05-23 Encoder device Withdrawn JP2020190499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019096460A JP2020190499A (en) 2019-05-23 2019-05-23 Encoder device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019096460A JP2020190499A (en) 2019-05-23 2019-05-23 Encoder device

Publications (1)

Publication Number Publication Date
JP2020190499A true JP2020190499A (en) 2020-11-26

Family

ID=73453673

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019096460A Withdrawn JP2020190499A (en) 2019-05-23 2019-05-23 Encoder device

Country Status (1)

Country Link
JP (1) JP2020190499A (en)

Similar Documents

Publication Publication Date Title
US8471506B2 (en) Motor control apparatus
JP5494662B2 (en) Rotation angle detector
JP4483009B2 (en) Motor control device
JP5172998B2 (en) Control device for detecting whether or not irreversible demagnetization of permanent magnet of permanent magnet synchronous motor has occurred
WO2012008107A1 (en) Phase-shift detection device, motor drive device, brushless motor, and phase-shift detection method
US6121744A (en) Control apparatus for position control motor
JP6344151B2 (en) POSITION ESTIMATION DEVICE, MOTOR DRIVE CONTROL DEVICE, POSITION ESTIMATION METHOD, AND PROGRAM
US7696712B2 (en) Motor controller providing position feedback correction
CN109863683B (en) Motor drive device and control method for motor drive device
EP1821401B1 (en) Improved method and apparatus for movable element position detection in an electrically commutated machine
CN110661469B (en) Motor control device
JP6844617B2 (en) Motor modules, motor step motion control systems, and motor controls
JP3690338B2 (en) Motor control device
KR101655297B1 (en) Apparatus for correcting position of linear hole sensor and control method of thereof
JP6780855B2 (en) Servo actuator
JP2020190499A (en) Encoder device
JP2017073942A (en) Motor controller
JP2021025960A (en) Encoder device
JP2941790B1 (en) Pulse counter
JPH0854205A (en) Rotational position detector for electric rotating
JP6340899B2 (en) Phase detection device, motor drive control device, and motor device
JP3288822B2 (en) Control method of brushless motor
KR100630991B1 (en) Compensation apparatus for initial electric angle of permanent magnet type synchronous motor
JP2005137080A (en) Motor controller
JP2007166687A (en) Motor unit and motor drive control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211224

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20220829