JP2019047722A - Motor drive device and motor drive method - Google Patents

Motor drive device and motor drive method Download PDF

Info

Publication number
JP2019047722A
JP2019047722A JP2018164624A JP2018164624A JP2019047722A JP 2019047722 A JP2019047722 A JP 2019047722A JP 2018164624 A JP2018164624 A JP 2018164624A JP 2018164624 A JP2018164624 A JP 2018164624A JP 2019047722 A JP2019047722 A JP 2019047722A
Authority
JP
Japan
Prior art keywords
phase
rotational position
motor
difference
setting
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
JP2018164624A
Other languages
Japanese (ja)
Other versions
JP7171321B2 (en
Inventor
信行 堀江
Nobuyuki Horie
信行 堀江
佳弘 水尾
Yoshihiro Mizuo
佳弘 水尾
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Publication of JP2019047722A publication Critical patent/JP2019047722A/en
Application granted granted Critical
Publication of JP7171321B2 publication Critical patent/JP7171321B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To hinder reverse rotation movement of a motor in a case where vibration occurs due disturbance and so on, by allowing generation of a drive waveform less in terms of reaction delay, in a motor drive device that forms an efficient drive waveform on the basis of a rotation detecting position.SOLUTION: A motor drive device detects a rotating position of a rotor and an Apos generating section 301 and a Bpos generating section 302 perform a position encoding process. A drive waveform phase determining section 303 determines a drive-waveform phase to a motor. According to a signal generated by a PWM generator 112, a rotating-position phase and the drive-waveform phase are synchronously controlled. During the synchronization, a phase-difference setting process is performed for holding a predetermined phase difference between the rotating-position phase and the drive-waveform phase. In a case where the direction in which the detected rotating direction changes and a set rotating direction do not match, control for hindering reverse rotation to the set rotation is exerted according to setting by a rotating-direction fixing function setting section 307.SELECTED DRAWING: Figure 3

Description

本発明は、ロータの回転検出位置に対して効率的な駆動波形を与えるモータ駆動技術に関するものである。   The present invention relates to a motor drive technique for providing an efficient drive waveform to a rotation detection position of a rotor.

位置検出機構部によってロータの回転位置を検出し、モータに駆動波形を印加することで効率的な回転駆動を実現する技術がある。特許文献1に開示の装置は、磁石をロータ(回転子)側に配置し、コイル巻線をステータ(固定子)側に配置したモータ構成において、低分解能の矩形波位置検出センサから効率的な位相の正弦波駆動信号を生成する。また特許文献2には、位置検出器の矩形波変化分解能を向上させる技術が開示されている。これは、ロータ検出位相と駆動波形位相との関係が目標の位相関係からずれていた場合、ずれ量を補償することで回転駆動を効率化する技術である。   There is a technology for realizing efficient rotational drive by detecting the rotational position of the rotor by the position detection mechanism unit and applying a drive waveform to the motor. In the motor configuration disclosed in Patent Document 1, a magnet is disposed on the rotor (rotor) side and a coil winding is disposed on the stator (stator) side, the low resolution rectangular wave position detection sensor is effective. Generate a sinusoidal drive signal in phase. Further, Patent Document 2 discloses a technique for improving the resolution of rectangular wave change of a position detector. This is a technique for improving the efficiency of rotational driving by compensating the amount of deviation when the relationship between the rotor detection phase and the drive waveform phase deviates from the target phase relationship.

特開2014−45646号公報Unexamined-Japanese-Patent No. 2014-45646 特開2016−154422号公報JP, 2016-154422, A

従来の技術は、理想とするロータ回転位相と駆動波形位相との位相関係に基づき、位相関係が理想値から差分を持っていることが検出された後に補償処理を行う技術である。そのため、差分の検出時点から補償処理が完了する時点までの反応に遅延が生じる。遅延時間が長いと、加減速時や外乱発生時に機構部が持っている反応のポテンシャルを出し切ることができない可能性がある。   The conventional technique is a technique for performing compensation processing after it is detected that the phase relationship has a difference from the ideal value based on the ideal phase relationship between the rotor rotational phase and the drive waveform phase. Therefore, a delay occurs in the reaction from the detection of the difference to the completion of the compensation process. If the delay time is long, there is a possibility that the potential of the reaction possessed by the mechanism unit can not be fully exhausted at the time of acceleration / deceleration or disturbance.

位置検出機構部を高精度化する方法として、矩形波信号の分解能を高める方法がある。この方法では信号の周波数特性により、高速回転時に十分な矩形信号変化の検出結果が得られないと、位置検出ができなくなる可能性がある。またロータ回転位相と駆動波形位相との位相関係の指令値が変更されたときに、駆動波形の連続性が損なわれて不連続な波形となり、モータの振動や騒音が発生する可能性がある。
本発明の目的は、回転検出位置に基づいて効率的な駆動波形を生成するモータ駆動装置において、反応遅れの少ない駆動波形生成を可能とし、外乱等による振動時にモータの逆転動作を抑制することである。
As a method of improving the accuracy of the position detection mechanism, there is a method of enhancing the resolution of the rectangular wave signal. In this method, position detection can not be performed unless sufficient rectangular signal change detection results can be obtained during high-speed rotation due to the frequency characteristics of the signal. In addition, when the command value of the phase relationship between the rotor rotational phase and the drive waveform phase is changed, the continuity of the drive waveform is lost to form a discontinuous waveform, which may cause vibration or noise of the motor.
An object of the present invention is to enable generation of a drive waveform with a small reaction delay in a motor drive device that generates an efficient drive waveform based on a rotation detection position, and to suppress reverse operation of the motor when vibrating due to disturbance or the like. is there.

本発明の一実施形態に係るモータ駆動装置は、ロータの回転方向を設定する設定手段と、前記ロータの回転位置を検出する検出手段と、モータへの駆動波形を生成する生成手段と、前記回転位置の位相と前記駆動波形の位相とを同期させる同期制御を行う制御手段と、前記回転位置の位相と前記駆動波形の位相とが同期した状態で、前記回転位置と前記駆動波形との間に位相差を設定する位相差設定手段と、を備える。前記制御手段は、前記検出手段により検出される回転位置の変化に対応する方向と、前記設定手段によって設定された回転方向とが異なる場合、前記設定された回転方向とは逆の方向である逆回転を抑制する制御を行う。   A motor drive device according to an embodiment of the present invention comprises: setting means for setting a rotational direction of a rotor; detection means for detecting a rotational position of the rotor; generation means for generating a drive waveform to a motor; Control means for performing synchronous control to synchronize the phase of the position and the phase of the drive waveform, and the phase between the rotational position and the phase of the drive waveform in a synchronized state, between the rotational position and the drive waveform And phase difference setting means for setting the phase difference. When the direction corresponding to the change of the rotational position detected by the detection means is different from the rotational direction set by the setting means, the control means is reverse to the set rotational direction, which is the opposite direction. Control to suppress the rotation.

本発明によれば、回転検出位置に基づいて効率的な駆動波形を生成するモータ駆動装置において、反応遅れの少ない駆動波形生成を可能とし、外乱等による振動時にモータの逆転動作を抑制することができる。   According to the present invention, in a motor drive device that generates an efficient drive waveform based on a rotation detection position, it is possible to generate a drive waveform with a small reaction delay, and to suppress reverse operation of the motor when vibrating due to disturbance or the like. it can.

本発明の実施形態のシステム概要を示すブロック図である。FIG. 1 is a block diagram illustrating a system overview of an embodiment of the present invention. 本発明の実施形態のモータにおける位置検出構造を示す模式図である。It is a schematic diagram which shows the position detection structure in the motor of embodiment of this invention. 位置ENC回路と駆動波形生成回路による処理を説明する図である。It is a figure explaining the process by a position ENC circuit and a drive waveform generation circuit. 位置検出信号と検出位置カウントとの関係を示す図である。It is a figure which shows the relationship between a position detection signal and a detection position count. モータの駆動波形と位相カウントとの関係を示す図である。It is a figure which shows the relationship between the drive waveform of a motor, and phase count. 本発明の第1実施形態の処理を説明するフローチャートである。It is a flowchart explaining the process of 1st Embodiment of this invention. 図6に続く処理を説明するフローチャートである。It is a flowchart explaining the process following FIG. ロータ磁石位相と駆動波形位相とが安定停止関係にある状態を示す図である。It is a figure which shows the state which has a stable stop relationship between a rotor magnet phase and a drive waveform phase. モータに正転トルクが発生する状態を示す図である。It is a figure which shows the state which a normal rotation torque generate | occur | produces to a motor. モータの加速時の挙動を示す図である。It is a figure which shows the behavior at the time of acceleration of a motor. 電流位相補償処理時のロータ磁石位相と駆動波形位相を示す図である。It is a figure which shows the rotor magnet phase at the time of electric current phase compensation processing, and a drive waveform phase. モータの定常速度時と減速停止時の挙動を示す図である。It is a figure which shows the behavior at the time of steady speed of a motor, and the deceleration stop. 意図しない逆転トルクの発生時のロータ磁石位相と駆動波形位相を示す図である。It is a figure which shows the rotor magnet phase and drive waveform phase at the time of generation | occurrence | production of unintended reverse torque. 意図しない逆転動作を抑制するための処理を説明する図である。It is a figure explaining the processing for controlling unintended reversal operation. 減速トルクの発生時のロータ磁石位相と駆動波形位相を示す図である。It is a figure which shows the rotor magnet phase and drive waveform phase at the time of generation | occurrence | production of deceleration torque. 本発明の第2実施形態の処理を説明するフローチャートである。It is a flowchart explaining the process of 2nd Embodiment of this invention. 図16に続く処理を説明するフローチャートである。It is a flowchart explaining the process following FIG. 第2実施形態における意図しない逆転動作を抑制するための処理を説明する図である。It is a figure explaining processing for controlling unintended reversal operation in a 2nd embodiment. 第2実施形態におけるメカ部材の移動時の処理を説明する図である。It is a figure explaining the process at the time of the movement of the mechanical member in 2nd Embodiment. 第2実施形態におけるメカ部材の固定時の処理を説明する図である。It is a figure explaining the process at the time of fixation of the mechanical member in 2nd Embodiment.

以下に、本発明の好ましい実施形態を、添付図面に基づいて詳細に説明する。本実施形態のモータ駆動装置は、撮像装置や光学ディスク装置、プリンタやプロジェクタ等の各種機器に適用可能である。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the attached drawings. The motor drive device of the present embodiment is applicable to various devices such as an imaging device, an optical disk device, a printer, a projector and the like.

[第1実施形態]
図1は本実施形態のシステムの概要を説明するブロック図であり、駆動用の電気回路を含めたモータ駆動装置の構成例を示す。ステッピングモータ101は、ロータ軸102にENC(エンコード用)磁石103を備える。ENC磁石103は、回転軸を中心とする円周上に発生する磁場が回転位置に応じて正弦波状の磁場を発生するように着磁されている。またステッピングモータ101はリセット機構121を備える。リセット機構121は、ロータ軸102の回転に応じて、特定の1箇所において変化する信号を出力する構成となっている。この信号は、モータの回転位置に係る絶対位置の基準を与えるための信号である。リセット機構121としては、具体的には、ロータ軸102がスクリュー軸となっており、スクリュー軸の回転に応じて並進移動する移動体にスリットが形成されている。スリットがフォトインタラプタを遮光することで、その出力信号が変化する。
First Embodiment
FIG. 1 is a block diagram for explaining an outline of a system according to the present embodiment, and shows an example of the configuration of a motor drive apparatus including an electric circuit for drive. The stepping motor 101 is provided with an ENC (for encoding) magnet 103 on a rotor shaft 102. The ENC magnet 103 is magnetized so that the magnetic field generated on the circumference around the rotation axis generates a sinusoidal magnetic field according to the rotational position. The stepping motor 101 also includes a reset mechanism 121. The reset mechanism 121 is configured to output a signal that changes at one specific position according to the rotation of the rotor shaft 102. This signal is a signal for providing a reference of the absolute position related to the rotational position of the motor. Specifically, as the reset mechanism 121, the rotor shaft 102 is a screw shaft, and a slit is formed in a moving body that translates according to the rotation of the screw shaft. When the slit shields the photo interrupter, its output signal changes.

Hall素子パッケージ104は、ENC磁石103の磁気検出部であり、複数のホール素子を備える。例えば、Hall素子105および106はそれぞれの位置にて、ENC磁石103の回転による磁場の変化を検出し、検出信号をアンプ107へ出力する。図2を参照して具体例を説明する。   The Hall element package 104 is a magnetic detection unit of the ENC magnet 103, and includes a plurality of Hall elements. For example, the Hall elements 105 and 106 detect the change of the magnetic field due to the rotation of the ENC magnet 103 at each position, and output a detection signal to the amplifier 107. A specific example will be described with reference to FIG.

図2(A)はステッピングモータ101の外観例を示す斜視図である。ステッピングモータ101のロータ軸102には、短い円筒状のENC磁石103が設置されている。ENC磁石103の発生する磁場を検知可能な位置に、Hall素子パッケージ104が配置されている。ステッピングモータ101から配線部材201が外部に引き出されており、配線部材201は後述のモータドライバ113に接続される。   FIG. 2A is a perspective view showing an example of the appearance of the stepping motor 101. FIG. A short cylindrical ENC magnet 103 is installed on the rotor shaft 102 of the stepping motor 101. The Hall element package 104 is disposed at a position where the magnetic field generated by the ENC magnet 103 can be detected. The wiring member 201 is drawn out from the stepping motor 101, and the wiring member 201 is connected to a motor driver 113 described later.

図2(B)はENC磁石103とHall素子105,106との位置関係を示す模式図である。ENC磁石103は対極数5(10極)の磁石であり、36度ごとの領域が着磁されている。Hall素子105,106はENC磁石103の中心位置から見た場合、中心位置から等距離に配置されている。中心位置に対するHall素子105,106の角度、つまり、2つのHall素子が中心位置に対して成す物理的な角度(物理角)が18度となる配置である。2つのHall素子で検出される信号位相としては、90度の位相差となる。   FIG. 2B is a schematic view showing the positional relationship between the ENC magnet 103 and the Hall elements 105 and 106. As shown in FIG. The ENC magnet 103 is a magnet with five poles (10 poles), and an area of 36 degrees is magnetized. When viewed from the center position of the ENC magnet 103, the Hall elements 105 and 106 are disposed equidistant from the center position. The arrangement is such that the angles of the Hall elements 105 and 106 with respect to the central position, that is, the physical angle (physical angle) formed by the two Hall elements with respect to the central position is 18 degrees. The signal phase detected by the two Hall elements has a phase difference of 90 degrees.

図1のアンプ107は、Hall素子105,106からそれぞれ入力される微弱な信号を増幅し、後段のAD変換回路108へ出力する。AD変換回路108はアンプ107から入力されたアナログ電圧信号をデジタル変換して数値化し、変換結果をデジタル数値信号として位置ENC回路109に出力する。   The amplifier 107 in FIG. 1 amplifies weak signals input from the Hall elements 105 and 106 and outputs the amplified signals to the AD conversion circuit 108 in the subsequent stage. The AD conversion circuit 108 converts the analog voltage signal input from the amplifier 107 into a digital value and digitizes it, and outputs the conversion result to the position ENC circuit 109 as a digital numerical signal.

位置ENC回路109はAD変換回路108から入力される信号のエンコード処理を行う。位置ENC回路109は、入力された2つの信号のオフセット調整およびゲイン調整を行う処理部を備える。位置ENC回路109は、調整後に2つの信号からTAN値(正接値)を算出した後でArcTAN演算(逆正接演算)を行い、回転角度情報を生成する。この回転角度情報を積分することで回転位置情報が生成される。生成された回転位置情報は駆動波形生成回路110に送られる。   The position ENC circuit 109 encodes the signal input from the AD conversion circuit 108. The position ENC circuit 109 includes a processing unit that performs offset adjustment and gain adjustment of the two input signals. The position ENC circuit 109 calculates the TAN value (tangent value) from the two signals after adjustment and then performs ArcTAN operation (inverse tangent operation) to generate rotation angle information. By integrating this rotational angle information, rotational position information is generated. The generated rotational position information is sent to the drive waveform generation circuit 110.

駆動波形生成回路110はモータに対する駆動用波形を生成する。駆動波形生成回路110は、OPEN駆動とCLOSE駆動の切り替えを行う。OPEN駆動は予め設定された周波数で駆動用の位相の異なる正弦波信号を出力する駆動である。CLOSE駆動は位置ENC回路109と連動させた駆動波形を出力する駆動である。OPEN駆動とCLOSE駆動の切り替えはCPU(中央演算処理装置)111の指令にしたがって行われる。   The drive waveform generation circuit 110 generates a drive waveform for the motor. The drive waveform generation circuit 110 switches between OPEN drive and CLOSE drive. The OPEN drive is a drive that outputs sine wave signals having different driving phases at a preset frequency. The CLOSE drive is a drive that outputs a drive waveform interlocked with the position ENC circuit 109. Switching between OPEN drive and CLOSE drive is performed in accordance with a command from the CPU (central processing unit) 111.

CPU111は駆動波形生成回路110に対して、OPEN駆動とCLOSE駆動の切り替えの指令を行い、OPEN駆動時の出力正弦波信号の周波数と振幅ゲイン値を設定する。またCPU111は、位置ENC回路109に対して位置カウント値の初期化設定等を行う。位置ENC回路109および駆動波形生成回路110による処理については、図3から図5を用いて後述する。   The CPU 111 instructs the drive waveform generation circuit 110 to switch between OPEN drive and CLOSE drive, and sets the frequency and amplitude gain value of the output sine wave signal at OPEN drive. The CPU 111 also performs initialization setting of the position count value and the like for the position ENC circuit 109. The processing by the position ENC circuit 109 and the drive waveform generation circuit 110 will be described later with reference to FIGS. 3 to 5.

PWM(パルス幅変調)発生器112は駆動波形生成回路110から出力されるPWM指令値に応じて、モータドライバ113に対してPWM信号を出力する。PWM信号については図5を用いて後述する。   A PWM (pulse width modulation) generator 112 outputs a PWM signal to the motor driver 113 in accordance with the PWM command value output from the drive waveform generation circuit 110. The PWM signal will be described later with reference to FIG.

モータドライバ113は、PWM発生器112より出力されるPWM信号に応じた増幅を行い、ステッピングモータ101のA相用コイル114、B相用コイル115に電圧を印加する。モータへの印加信号はPWM信号に応じた高周波電圧信号となるが、コイルに発生する電流値信号はコイルのL(インダクタンス)成分によりLPF(ローパスフィルタ)がかかった場合と同様になる。このことから、コイルには実効的に、図5で説明する正弦波状の信号電圧が印加されるのと同様であるものとする。   The motor driver 113 performs amplification according to the PWM signal output from the PWM generator 112, and applies a voltage to the A-phase coil 114 and the B-phase coil 115 of the stepping motor 101. The signal applied to the motor is a high frequency voltage signal corresponding to the PWM signal, but the current value signal generated in the coil is the same as when an LPF (low pass filter) is applied by the L (inductance) component of the coil. From this, it is assumed that the coil is effectively the same as when a sinusoidal signal voltage described in FIG. 5 is applied.

ステータA+116、ステータA−117はそれぞれ、A相用コイルの両端の発生する磁場を集中して放出する働きをもつ。ステータB+118、ステータB−119はそれぞれ、B相用コイルの両端の発生する磁場を集中して放出する働きをもつ。図2(C)を参照して、ステータA+およびA−、ステータB+およびB−、ロータ磁石の配置関係を具体的に説明する。   Each of the stator A + 116 and the stator A-117 functions to concentrate and release the magnetic field generated at both ends of the A phase coil. The stator B + 118 and the stator B-119 function to concentrate and release the magnetic field generated at both ends of the B phase coil. The arrangement of the stators A + and A-, the stators B + and B-, and the rotor magnets will be specifically described with reference to FIG.

図2(C)においてステータA+116、ステータA−117、ステータB+118、ステータB−119は、互いの物理角が18度毎の位置関係で配置される。ロータ磁石120の回転方向はCW方向またはCCW方向である。この例では、ステータ群がそれぞれ合計5組配置されている。ロータ磁石120はステータ群の中央に位置し、N極、S極がそれぞれ5極で、合計10極の磁極を持つ。駆動波形の正弦波が1波出力される毎に、ロータ磁石120は物理角で72度回転する。   In FIG. 2C, the stator A + 116, the stator A-117, the stator B + 118, and the stator B-119 are arranged such that their physical angles are in a positional relationship of 18 degrees. The rotation direction of the rotor magnet 120 is a CW direction or a CCW direction. In this example, a total of five stator groups are arranged. The rotor magnet 120 is located at the center of the stator group, and has five N poles and five S poles, each having a total of 10 poles. The rotor magnet 120 rotates 72 degrees in physical angle each time one sine wave of the drive waveform is output.

次に位置ENC回路109、駆動波形生成回路110の処理を詳細に説明する。図3(A)は位置ENC回路109、駆動波形生成回路110の処理を詳細に示すブロック図である。Apos生成部301およびBpos生成部302が位置ENC回路109に相当する。駆動波形位相決定部303〜回転方向固定機能設定部307が駆動波形生成回路110に相当する。   Next, processing of the position ENC circuit 109 and the drive waveform generation circuit 110 will be described in detail. FIG. 3A is a block diagram showing the process of the position ENC circuit 109 and the drive waveform generation circuit 110 in detail. The Apos generation unit 301 and the Bpos generation unit 302 correspond to the position ENC circuit 109. The drive waveform phase determination unit 303 to the rotation direction fixing function setting unit 307 correspond to the drive waveform generation circuit 110.

図1のHall素子105の出力信号を検出信号1と表記し、Hall素子106の出力信号を検出信号2と表記する。検出信号1および2はアンプ107を介してAD変換回路108へ入力され、AD変換された信号はApos生成部301が取得する。Apos生成部301は、ArcTan(逆正接)演算を用いて回転位置を算出する。前処理として、入力された2つの信号のオフセット調整およびゲイン調整が行われる。つまり、2つの信号のオフセットおよびゲインを同一にする調整が行われる。この調整はOPEN駆動でモータを回転させることによって2つの信号のピーク値とボトム値を検出し、その検出結果を用いて行われる。調整後に、90度の位相差を持った2つの正弦波状信号で正接値を算出し、逆正接演算を行うと回転角度情報(Aposと記す)が生成される。この回転角度の値を積分した値を算出することで回転位置情報を生成することができる。検出信号1および2と回転位置情報との関係について、図4の例で説明する。   The output signal of the Hall element 105 in FIG. 1 is described as a detection signal 1, and the output signal of the Hall element 106 is described as a detection signal 2. The detection signals 1 and 2 are input to the AD conversion circuit 108 via the amplifier 107, and the signal subjected to AD conversion is acquired by the Apos generation unit 301. The Apos generation unit 301 calculates a rotational position using ArcTan (an arctangent) operation. As preprocessing, offset adjustment and gain adjustment of the two input signals are performed. That is, adjustment is made to make the offsets and gains of the two signals identical. This adjustment is performed by detecting the peak value and the bottom value of the two signals by rotating the motor by OPEN drive, and using the detection results. After adjustment, a tangent value is calculated from two sine wave signals having a phase difference of 90 degrees, and rotation angle information (denoted as Apos) is generated by performing an arctangent operation. It is possible to generate rotational position information by calculating a value obtained by integrating the value of the rotational angle. The relationship between the detection signals 1 and 2 and the rotational position information will be described with reference to the example of FIG.

図4(A)および(B)は、それぞれ検出された回転位置信号を調整した後の信号を例示する。図4(A)に示す信号は正弦波状信号であり、図4(B)に示す信号は余弦波状信号である。図4(C)は検出位置のカウント値の変化を示す。横軸はロータの回転量を表す。本実施形態では、2つのHall素子の信号が正弦波の1波長分出力されたときに1024カウント分の位置分解能で位置検出を行えるものとする。検出位置のカウント値は図3(A)のApos生成部301の記憶領域に格納される。   FIGS. 4A and 4B illustrate signals after adjusting the detected rotational position signals. The signal shown in FIG. 4A is a sine wave signal, and the signal shown in FIG. 4B is a cosine wave signal. FIG. 4C shows the change of the count value of the detection position. The horizontal axis represents the amount of rotation of the rotor. In this embodiment, when signals of two Hall elements are output for one wavelength of a sine wave, position detection can be performed with position resolution for 1024 counts. The count value of the detection position is stored in the storage area of the Apos generation unit 301 of FIG.

図3(B)はAposを示し、グラフの横軸はロータの回転量を表す。Aposの値はロータの回転量に比例したカウント値である。Apos生成部301の次にBpos生成部302が処理を引き継ぐ。   FIG. 3B shows Apos, and the horizontal axis of the graph represents the amount of rotation of the rotor. The value of Apos is a count value proportional to the amount of rotation of the rotor. After the Apos generation unit 301, the Bpos generation unit 302 takes over the processing.

Bpos生成部302は、Aposに対して任意のオフセット値を持った情報(Bposと記す)を生成する。CPU111は任意のタイミングでBposを任意の値に書き換え可能であり、当該タイミングで書き換えた値、およびBposとAposとの差分量をオフセット値として記録する。図3(C)はBposを示す。横軸はロータの回転量を表す。Bpos生成部302は、図3(B)に示すApos値に対し、記録されたオフセット値が常に付与されたBpos値を生成する。Bpos値は、ゼロと上限値との間で回転量に対して周期的に変化する鋸歯状波の信号値である。   The Bpos generation unit 302 generates information (referred to as Bpos) having an arbitrary offset value for Apos. The CPU 111 can rewrite Bpos to any value at any timing, and records the value rewritten at the timing and the difference between Bpos and Apos as an offset value. FIG. 3C shows Bpos. The horizontal axis represents the amount of rotation of the rotor. The Bpos generation unit 302 generates a Bpos value to which the recorded offset value is always added with respect to the Apos value shown in FIG. 3 (B). The Bpos value is a sawtooth signal value that changes periodically with respect to the amount of rotation between zero and an upper limit value.

Bpos生成部302により生成されるBposの情報は、駆動波形位相決定部303に入力される。駆動波形位相決定部303は、最終的にA相用コイル114、B相用コイル115に印加する駆動波形の位相カウント情報を決定する。駆動波形位相決定部303は、図1のPWM発生器112に対し、位相カウントに相当するPWM値を出力する。駆動波形位相決定部303は、OPEN駆動用カウント部304の指令により、位相カウント情報を出力するOPEN駆動と、Bpos値に基づいて位相カウント情報を出力する位置連動駆動とを切り替えることができる。OPEN駆動と位置連動駆動は、CPU111が駆動波形位相決定部303に対して設定を行うことで切り替えられる。   The information of Bpos generated by the Bpos generation unit 302 is input to the drive waveform phase determination unit 303. The drive waveform phase determination unit 303 finally determines phase count information of the drive waveform to be applied to the A phase coil 114 and the B phase coil 115. The drive waveform phase determination unit 303 outputs a PWM value corresponding to the phase count to the PWM generator 112 of FIG. The drive waveform phase determination unit 303 can switch between OPEN drive that outputs phase count information and position-linked drive that outputs phase count information based on the Bpos value according to an instruction from the OPEN drive count unit 304. The OPEN drive and the position interlocked drive can be switched by the CPU 111 performing setting on the drive waveform phase determination unit 303.

OPEN駆動を行う場合、CPU111はOPEN駆動用カウント部304に駆動波形の周波数を指令し、駆動波形位相決定部303に駆動波形の振幅ゲインを設定する。これにより、駆動波形位相決定部303は所望周波数、所望振幅の駆動波形を出力する。一方、位置連動駆動を行う場合、Bposの下位10ビット値に対して駆動波形位相決定部303は所定のオフセット値を付与した値を算出する。所定のオフセット値は以下の通りである。
・CPU111が定常位相差設定部305を通じて設定した第1のオフセット値(STC_OFS値)
・CPU111が駆動用位相差設定部306を通じて設定した第2のオフセット値(PHS_OFS値)。
When performing OPEN drive, the CPU 111 instructs the OPEN drive count unit 304 to the frequency of the drive waveform, and sets the amplitude gain of the drive waveform in the drive waveform phase determination unit 303. Thereby, the drive waveform phase determination unit 303 outputs a drive waveform having a desired frequency and a desired amplitude. On the other hand, in the case of position-linked drive, the drive waveform phase determination unit 303 calculates a value obtained by adding a predetermined offset value to the lower 10 bits of Bpos. The predetermined offset values are as follows.
The first offset value (STC_OFS value) set by the CPU 111 through the steady-state phase difference setting unit 305
Second offset value (PHS_OFS value) set by the CPU 111 through the driving phase difference setting unit 306.

これらのオフセットを付与した値が算出されて駆動波形位相のカウント値が取得される。このカウント値に相当する位相の出力値が駆動波形の出力値として選択される。この関係を図3(D)、(E)のグラフによって示す。図3(D)はBposの下位10ビット値と回転量との関係を示す。図3(E)はオフセットを付与した後の駆動波形を示す。横軸はロータの回転量を表す。Bposに対してSTC_OFS、PHS_OFSの両方が加算されてオフセット値が付与される。後述するように、STC_OFSはロータの検出位置カウントと駆動波形カウントの安定位置を管理する役割をもつ。PHS_OFSはトルク発生のための位相差を管理する役割が割り当てられている。   The values to which these offsets are added are calculated, and the count value of the drive waveform phase is obtained. The output value of the phase corresponding to the count value is selected as the output value of the drive waveform. This relationship is shown by the graphs of FIGS. 3 (D) and 3 (E). FIG. 3D shows the relationship between the lower 10 bit value of Bpos and the amount of rotation. FIG. 3E shows the drive waveform after the offset is applied. The horizontal axis represents the amount of rotation of the rotor. Both STC_OFS and PHS_OFS are added to Bpos to give an offset value. As will be described later, the STC_OFS plays a role in managing the detection position count of the rotor and the stable position of the drive waveform count. PHS_OFS is assigned a role of managing phase difference for torque generation.

回転方向固定機能設定部(以下、単に固定機能設定部という)307は、駆動波形生成回路110と位置ENC回路109とを連動させたCLOSE駆動時に、過剰負荷等がかかった場合の意図しない逆転駆動を防ぐ働きをする。その詳細な動作については後述する。   The rotation direction fixing function setting unit (hereinafter simply referred to as the fixing function setting unit) 307 performs an unintended reverse driving when an overload or the like is applied during CLOSE driving in which the drive waveform generation circuit 110 and the position ENC circuit 109 are interlocked. Work to prevent The detailed operation will be described later.

駆動波形生成回路110は、図3(A)の駆動波形位相決定部303〜固定機能設定部307によって駆動波形の位相を決定し、駆動波形に対応するPWM指令値をPWM発生器112へ出力する。PWM発生器112は駆動波形生成回路110から出力されるPWM指令値に応じて、モータドライバ113にPWM信号を出力する。図5を参照して、正弦波位置カウント値と、出力されるPWM値(Duty%値)との関係を説明する。図5(A)、(B)ともに横軸はテーブル番号を表し、図3(E)に示す出力値と同様に1024の分解能である。縦軸はPWM信号のDuty%値を表わす。   Drive waveform generation circuit 110 determines the phase of the drive waveform by drive waveform phase determination unit 303 to fixed function setting unit 307 in FIG. 3A, and outputs a PWM command value corresponding to the drive waveform to PWM generator 112. . The PWM generator 112 outputs a PWM signal to the motor driver 113 according to the PWM command value output from the drive waveform generation circuit 110. The relationship between the sine wave position count value and the output PWM value (Duty% value) will be described with reference to FIG. In both FIGS. 5A and 5B, the horizontal axis represents a table number, and the resolution is 1024 as in the case of the output value shown in FIG. The vertical axis represents the duty% value of the PWM signal.

図5(A)では、横軸がプラスカウントされていてA相駆動電圧波形に対してB相駆動電圧波形が90度先行している。これはモータがCW方向に回転する場合を示している。逆に図5(B)では、横軸がマイナスカウントされていてB相駆動電圧波形に対してA相駆動電圧波形が90度先行している。これはモータがCCW方向に回転する場合を示している。縦軸のDuty%値はCPU111によるゲイン設定値に応じて増減する。本実施形態ではモータの回転運動に支障を来すことのない適切なゲイン値が設定されているものとする。   In FIG. 5A, the horizontal axis is plus counted and the B-phase drive voltage waveform leads by 90 degrees with respect to the A-phase drive voltage waveform. This shows the case where the motor rotates in the CW direction. Conversely, in FIG. 5B, the horizontal axis is counted minus, and the A-phase drive voltage waveform leads by 90 degrees with respect to the B-phase drive voltage waveform. This shows the case where the motor rotates in the CCW direction. The duty% value on the vertical axis increases or decreases in accordance with the gain setting value by the CPU 111. In this embodiment, it is assumed that an appropriate gain value is set so as not to disturb the rotational movement of the motor.

図6および図7は、本実施形態における処理の流れを示すフローチャートである。CPU111は所定のプログラムにしたがって以下の制御を行う。駆動シーケンスが開始するとS601の処理に進む。   6 and 7 are flowcharts showing the flow of processing in the present embodiment. The CPU 111 performs the following control according to a predetermined program. When the drive sequence starts, the process proceeds to the process of S601.

図6のS601でCPU111は、位置連動駆動をオフにする設定処理を実行する。つまり、OPEN駆動が働く設定となる。続くS602でCPU111はリセット機構121が出力しているリセット信号の検出状態を判定する。リセット信号は、ロータ軸102のスクリュー機構に取り付けられた被検知部材の移動に伴い、被検知部材が予め設定された位置を通過するときにHighまたはLowに変化する2値信号である。モータ駆動装置がステッピングモータ101にB相先行の駆動波形を印加してCW回転をするときに被検知部材が進行する側が、リセット信号としてHighレベルを出力する側である。モータ駆動装置がステッピングモータ101にA相先行の駆動波形を印加してCCW回転をするときに被検知部材が進行する側が、リセット信号としてLowレベルを出力する側である。リセット信号が変化する位置を検出して絶対位置を確定するために、S602の判定処理が行われる。   At S601 in FIG. 6, the CPU 111 executes setting processing for turning off position interlocking drive. That is, the setting is such that OPEN drive works. At S602, the CPU 111 determines the detection state of the reset signal output from the reset mechanism 121. The reset signal is a binary signal that changes to High or Low when the detected member passes a predetermined position, as the detected member attached to the screw mechanism of the rotor shaft 102 moves. When the motor drive device applies a B-phase leading drive waveform to the stepping motor 101 to perform CW rotation, the side on which the detected member advances is the side that outputs the High level as the reset signal. When the motor drive device applies a drive waveform of A-phase lead to the stepping motor 101 to perform CCW rotation, the side on which the detected member advances is the side that outputs Low level as the reset signal. In order to detect the position where the reset signal changes and determine the absolute position, the determination process of S602 is performed.

S602にてリセット信号がLowレベルであればS603に進み、またS602にてリセット信号がHighレベルであればS604に進む。S603でCPU111はB相先行波形の駆動波発生をOPEN駆動用カウント部304(図3)に指令し、モータを回転させる制御を行う。S604でCPU111はA相先行波形の駆動波発生をOPEN駆動用カウント部304に指令し、モータを回転させる制御を行う。S603またはS604の処理後、S605の処理に進む。   If the reset signal is low at S602, the process proceeds to S603, and if the reset signal is high at S602, the process proceeds to S604. In step S603, the CPU 111 instructs the OPEN drive count unit 304 (FIG. 3) to generate a drive wave having a B-phase leading waveform, and performs control to rotate the motor. In step S604, the CPU 111 instructs the OPEN drive count unit 304 to generate a drive wave having an A-phase leading waveform, and performs control to rotate the motor. After the process of S603 or S604, the process proceeds to the process of S605.

S605でCPU111はリセット信号の状態が変化したかどうかを判定する。CPU111はリセット信号を監視し、リセット信号に変化が起きた場合、S606の処理に進み、リセット信号に変化がない場合には監視を継続してS605の判定処理を繰り返す。S606でCPU111は、駆動波形の進行を停止させる指令をOPEN駆動用カウント部304に出力する。このときの停止位置は位置カウントの基準位置となる。次のS607では、検出位置の最終的な位置管理を行うBpos値が初期化され、Bposにゼロを書き込む処理が行われる。   In step S605, the CPU 111 determines whether the state of the reset signal has changed. The CPU 111 monitors the reset signal, and if a change occurs in the reset signal, the process proceeds to step S606. If there is no change in the reset signal, the monitoring is continued and the determination process of step S605 is repeated. In S606, the CPU 111 outputs a command to stop the progression of the drive waveform to the OPEN drive count unit 304. The stop position at this time is the reference position of the position count. In the next S607, a Bpos value for performing final position management of the detected position is initialized, and a process of writing zero in Bpos is performed.

続くS608では、ロータの停止状態で駆動波形位相決定部303に保持されている駆動波形の位相カウント値から、Bposの下位10ビット値を引いた値をSTC_OFSとして書き込む処理が実行される。STC_OFSの値は、位置連動駆動をオンにした瞬間に、駆動波形の出力位相がずれないようにするための値である。S608の時点では、OPEN駆動波形の結果、ある駆動波形位相を出力している状態にてロータ磁石120が安定に停止している。位置連動駆動がオンに設定された後の駆動波形位相は、Bposの下10ビットの値に基づいて生成される。位置連動駆動がオンに設定された直後に、Bposの下位10ビットの値にSTC_OFSの値が加算される。加算後の値が駆動波形の位相カウント値として出力されるので、駆動波形の位相カウント値は位置連動駆動のオンとオフの前後で値が変わらないことが保証される。次にS609の処理に進む。   In the subsequent S608, processing is performed to write, as STC_OFS, a value obtained by subtracting the lower 10 bits of Bpos from the phase count value of the drive waveform held in the drive waveform phase determination unit 303 in the stopped state of the rotor. The value of STC_OFS is a value for preventing the output phase of the drive waveform from being shifted at the moment when the position interlocked drive is turned on. At the time of S608, as a result of the OPEN drive waveform, the rotor magnet 120 is stably stopped while outputting a certain drive waveform phase. The drive waveform phase after position interlock drive is set to ON is generated based on the lower 10 bits of Bpos. Immediately after the position-linked drive is set to ON, the value of STC_OFS is added to the lower 10 bits of Bpos. Since the value after the addition is output as the phase count value of the drive waveform, it is ensured that the phase count value of the drive waveform does not change before and after the position interlock drive is on and off. Next, the process proceeds to the process of S609.

S609でCPU111は、固定機能設定部307を通じて、回転方向固定機能をオンにし、回転方向をCW方向、すなわち位置検出のカウント方向でプラス方向に設定する。S610でCPU111は位置連動駆動をオンに設定する。このとき、オフセットPHS_OFSにはゼロが設定されているものとする。位置連動駆動のオン設定の直後には前述の通り、駆動波形の出力位相は変化しない。   In step S609, the CPU 111 turns on the rotation direction fixing function through the fixing function setting unit 307, and sets the rotation direction to the CW direction, that is, the positive direction in the position detection count direction. In step S610, the CPU 111 sets the position interlocking drive to on. At this time, it is assumed that offset PHS_OFS is set to zero. As described above, the output phase of the drive waveform does not change immediately after the on setting of position-linked drive.

S611において、位置連動機能を利用した回転トルク発生動作が行われる。具体的にはPHS_OFSに駆動波形位相で90度に相当する値である256が設定される。この時にモータに発生する現象については図8から図10を用いて後述する。   In S611, a rotational torque generation operation using a position interlocking function is performed. Specifically, 256 which is a value corresponding to 90 degrees in the drive waveform phase is set to PHS_OFS. The phenomenon which generate | occur | produces in a motor at this time is later mentioned using FIGS. 8-10.

S612でCPU111は、ロータの検出位置が予め設定された第1の位置(X1と記す)以上であるか否かを判定する。検出位置がX1以上である場合、S613に進み、検出位置がX1未満である場合にはS612の判定処理が繰り返される。S613でCPU111は、PHS_OFSに対し、S611での値256に256をさらに加えた値512を設定する。次に図7のS614へ進んでCPU111は、ロータの検出位置が予め設定された第2の位置(X2と記す)以上であるか否かを判定する。X2の大きさはX1の大きさより大きいものとする。検出位置がX2以上である場合、S615に進み、検出位置がX2未満である場合にはS614の判定処理が繰り返される。S615でCPU111はPHS_OFSに対し、S613での値512に128をさらに加えた値640を設定する。これらの処理はモータ電流の位相補償のために行われる。処理の詳細については図10、図11を用いて後述する。   In S612, the CPU 111 determines whether or not the detected position of the rotor is equal to or greater than a preset first position (denoted as X1). When the detected position is X1 or more, the process proceeds to S613, and when the detected position is less than X1, the determination process of S612 is repeated. In step S613, the CPU 111 sets a value 512 obtained by further adding 256 to the value 256 in step S611 with respect to PHS_OFS. Next, proceeding to S614 in FIG. 7, the CPU 111 determines whether or not the detected position of the rotor is greater than or equal to a preset second position (denoted as X2). The size of X2 is assumed to be larger than the size of X1. If the detected position is X2 or more, the process proceeds to S615, and if the detected position is less than X2, the determination process of S614 is repeated. In S615, the CPU 111 sets a value 640 obtained by further adding 128 to the value 512 in S613 with respect to PHS_OFS. These processes are performed for phase compensation of the motor current. Details of the process will be described later with reference to FIGS. 10 and 11.

続くS616において、CPU111はモータの減速開始位置の判定処理を行う。ロータの検出位置が減速開始位置以上であると判定された場合、S617の処理に進み、またロータの検出位置が減速開始位置未満であると判定された場合にはS616の判定処理が繰り返される。減速開始位置については、事前にモータおよび機構部の駆動特性を調べておき、所望の減速トルクをかけたときに十分な減速効果が得られるように、必要な回転量分だけ目標停止位置から手前の位置が設定されるものとする。続くS617でCPU111は、モータにCCW方向の回転トルク、すなわちCW回転時にはブレーキとなる減速トルクがかかるようにPHS_OFSの値として、−256を設定する。   In the subsequent S616, the CPU 111 performs a process of determining the deceleration start position of the motor. If it is determined that the detected position of the rotor is equal to or greater than the deceleration start position, the process proceeds to the process of S617. If it is determined that the detected position of the rotor is less than the deceleration start position, the determination process of S616 is repeated. With regard to the deceleration start position, the drive characteristics of the motor and the mechanism are checked in advance, and a sufficient amount of rotation is required to obtain a sufficient deceleration effect when the desired deceleration torque is applied. The position of is assumed to be set. In the following S617, the CPU 111 sets -256 as the value of PHS_OFS so that the rotational torque in the CCW direction, that is, the deceleration torque serving as the brake in CW rotation, is applied to the motor.

S618でCPU111は、ロータの検出位置が減速終了位置以上であるか否かを判定する。ロータの検出位置が減速終了位置以上である場合、S619に進み、またロータの検出位置が減速終了位置未満である場合にはS618の判定処理が繰り返される。減速終了位置については、事前にモータおよび機構部の駆動特性を調べておき、十分な減速が可能であって、かつ減速終了後に慣性で目標到達位置まで到達できるように、目標停止位置より手前の位置が設定されるものとする。   In step S618, the CPU 111 determines whether the detected position of the rotor is equal to or greater than the deceleration end position. If the detected position of the rotor is equal to or greater than the deceleration end position, the process proceeds to S619, and if the detected position of the rotor is less than the deceleration end position, the determination process of S618 is repeated. Regarding the deceleration end position, the drive characteristics of the motor and the mechanism are checked in advance, and sufficient deceleration is possible, and after reaching the end of the deceleration, the target reaching position can be reached by inertia. The position shall be set.

S619でCPU111は、PHS_OFSの値としてゼロを設定する。すなわち検出位置と駆動波形との位相関係は、ブレーキトルクがかかる位相関係から回転トルクが発生しない位相関係へと移行する。続くS620でCPU111はロータの検出位置が予め設定された目標停止位置(TPと記す)以上であるか否かを判定する。ロータの検出位置が目標停止位置TP以上である場合、S621に進み、またロータの検出位置が目標停止位置TP未満である場合にはS620の判定処理が繰り返される。S621でCPU111は位置連動駆動をオフにし、駆動波形の位相を固定する。これにより、モータは回転を停止する。以上で一連の駆動シーケンスを終了する。   In step S619, the CPU 111 sets zero as the value of PHS_OFS. That is, the phase relationship between the detected position and the drive waveform shifts from the phase relationship in which the brake torque is applied to the phase relationship in which the rotation torque is not generated. In the following S620, the CPU 111 determines whether or not the detected position of the rotor is equal to or greater than a preset target stop position (referred to as TP). If the detected position of the rotor is equal to or greater than the target stop position TP, the process proceeds to step S621. If the detected position of the rotor is less than the target stop position TP, the determination process of step S620 is repeated. In step S621, the CPU 111 turns off position interlocking drive and fixes the phase of the drive waveform. This causes the motor to stop rotating. This completes the series of drive sequences.

ロータの回転検出位置が一定時間以上所望の変化をしない場合や、逆転移動量が予め定められた量より大きくなった場合にCPU111はモータの駆動状態が正常でないことを示す通知処理を実行する。逆転移動量とは、モータの駆動中に保持されている回転位置と、位置検出部により検出される回転位置との差分量に相当し、逆転方向の差分量である。このような場合、CPU111はモータの駆動シーケンスを一旦停止し、安全に再始動するシーケンスへ移行させる制御を行う。   When the rotation detection position of the rotor does not change as desired for a predetermined time or when the reverse movement amount becomes larger than a predetermined amount, the CPU 111 executes notification processing indicating that the driving state of the motor is not normal. The reverse movement amount corresponds to the difference between the rotational position held while the motor is driven and the rotational position detected by the position detection unit, and is a difference in the reverse direction. In such a case, the CPU 111 performs control to temporarily stop the drive sequence of the motor and shift to a safe restart sequence.

図8から図10を参照して、図6のS611の処理について具体的に説明する。図8(A)は、図2(C)で示されているステータ群の配置に関し、ステータを横一列に並べた場合の模式図である。また図8(B)はステータ群に対してモータの周方向にどのような電圧印加を行っているかを模式的に示す図である。図8(C)はその電圧印加によってステータ群が発生させている、周方向の位置に対応した磁場の強さを示す図である。図8(D)は図2(C)に示されるロータ磁石120の着磁位相を示す図である。図8(B)から(D)において横軸は位置を表す。図8は、図6のS611の状態を示しており、ステータ群が発生させている磁場のNS磁極位相と、ロータ磁石120のNS磁極位相との関係は、ロータが安定に停止する関係である。   The process of S611 in FIG. 6 will be specifically described with reference to FIGS. 8 to 10. FIG. 8A is a schematic view of the arrangement of the stator group shown in FIG. 2C in which the stators are arranged in a horizontal row. FIG. 8B is a view schematically showing what voltage is applied to the stator group in the circumferential direction of the motor. FIG. 8C is a diagram showing the strength of the magnetic field corresponding to the circumferential position generated by the stator group by the voltage application. FIG. 8 (D) is a diagram showing the magnetization phase of the rotor magnet 120 shown in FIG. 2 (C). In FIG. 8 (B) to (D), the horizontal axis represents the position. FIG. 8 shows the state of S611 in FIG. 6, and the relationship between the NS magnetic pole phase of the magnetic field generated by the stator group and the NS magnetic pole phase of the rotor magnet 120 is a relationship in which the rotor is stably stopped. .

図9は、図6のS611にてPHS_OFSの値に256が設定された後の状態を示す説明図である。図9(A)から(D)はそれぞれ、図8(A)から(D)に対応している。図9に示す状態では、ステータ群が発生させている磁場が図8に示す状態に比べて90度進んだ位置にある。この場合、図8(C)および(D)に示す関係から、図9(C)および(D)に示す関係へと変化する。このことにより、図9(D)で示されるように、ロータ磁石120は右側に引っ張られる引力、すなわちCW方向の回転トルク(正転トルク)が発生する。   FIG. 9 is an explanatory view showing a state after PHS_OFS is set to 256 in S611 of FIG. FIGS. 9A to 9D correspond to FIGS. 8A to 8D, respectively. In the state shown in FIG. 9, the magnetic field generated by the stator group is at a position advanced by 90 degrees as compared with the state shown in FIG. In this case, the relationships shown in FIGS. 8C and 8D change to the relationships shown in FIGS. 9C and 9D. As a result, as shown in FIG. 9D, an attractive force is drawn to the right of the rotor magnet 120, that is, a rotational torque (forward torque) in the CW direction.

図10はモータの挙動を説明するグラフである。図10(A)はBposの時間変化を示し、横軸は時間軸であり、縦軸はロータの位置を表す。X1、X2は図6のS612、図7のS614で説明した所定の位置を表す。図10(B)はBposの下位10ビット値の時間変化を示す。図10(C)は駆動波形位相カウント値の時間変化を示す。時刻t1は、図6のS611においてPHS_OFSの値として256が設定されるタイミングを示す。時刻t2は、図6のS613の実行タイミングを示し、時刻t3は図7のS615の実行タイミングを示す。また図10(D)、(E)はそれぞれ、駆動波形位相カウント値に基づいて、ステータA+116に発生する駆動波形磁場の時間変化と、ステータB+118に発生する駆動波形磁場の時間変化を表している。   FIG. 10 is a graph for explaining the behavior of the motor. FIG. 10A shows a time change of Bpos, the horizontal axis is a time axis, and the vertical axis represents the position of the rotor. X1 and X2 represent predetermined positions described in S612 of FIG. 6 and S614 of FIG. FIG. 10 (B) shows the time change of the lower 10 bit value of Bpos. FIG. 10C shows the time change of the drive waveform phase count value. Time t1 indicates timing when 256 is set as the value of PHS_OFS in S611 of FIG. Time t2 shows the execution timing of S613 of FIG. 6, and time t3 shows the execution timing of S615 of FIG. 10D and 10E respectively show the temporal change of the drive waveform magnetic field generated in the stator A + 116 and the temporal change of the drive waveform magnetic field generated in the stator B + 118 based on the drive waveform phase count value. .

図10の時刻t1にてPHS_OFSに256が設定されると、図10(B)に示すBposの下位10ビット値と、図10(C)に示す駆動波形位相カウント値との間には差分値256が発生する。これにより、駆動波形の位相がロータの回転位相より90度進み、CW回転方向のトルクが発生する。モータが回転することで、検出位置に対応するBposが進み、そのことにより駆動波形の位相カウント値も進む。このループ処理によって、図9(B)および(C)に示す2つの波形の位相差が常に維持され、回転トルクがかかり続けることになる。その結果、図10(A)に示すようにモータに加速がかかりモータの回転速度が上昇していく。   When PHS_OFS is set to 256 at time t1 in FIG. 10, the difference between the lower 10 bits of Bpos shown in FIG. 10B and the drive waveform phase count value shown in FIG. 10C. 256 occur. As a result, the phase of the drive waveform leads by 90 degrees from the rotational phase of the rotor, and a torque in the CW rotational direction is generated. As the motor rotates, Bpos corresponding to the detected position advances, and thereby the phase count value of the drive waveform also advances. By this loop processing, the phase difference between the two waveforms shown in FIGS. 9B and 9C is always maintained, and the rotational torque continues to be applied. As a result, as shown in FIG. 10A, the motor is accelerated and the rotational speed of the motor is increased.

図10の時刻t2、t3では、図10(B)に示すBposの下位10ビット値と、図10(C)に示す駆動波形位相カウント値との位相差がそれぞれ512、640になっていることが分かる。図10(A)にて時刻t2に対応する第1の位置X1は2048での位置を表し、時刻t3に対応する第2の位置X2は3072での位置を表している。このように段階的に位相差を変化させている理由は、モータの回転量に応じて、与えている電圧印加波形の位相に対する電流位相が遅れてくることに対処するためである。極度の低速回転時には印加電圧波形と実際にモータコイルの電流波形との間に位相差がほとんど生じない。しかし回転量が大きくなるにつれて、コイルの電流遅れ成分やモータ構造による逆起電圧の影響により、電流波形は印加電圧波形に対して遅れを生じる。高速回転になるほど、この影響は大きくなる。そこで図6のS613、図7のS615の処理の実行によって、印加電圧波形に対する電流波形の遅れを抑制することができる。   At times t2 and t3 in FIG. 10, the phase difference between the lower 10-bit value of Bpos shown in FIG. 10B and the drive waveform phase count value shown in FIG. 10C are 512 and 640, respectively. I understand. In FIG. 10A, the first position X1 corresponding to time t2 represents the position at 2048, and the second position X2 corresponding to time t3 represents the position at 3072. The reason why the phase difference is changed stepwise in this way is to cope with the delay of the current phase with respect to the phase of the applied voltage application waveform according to the amount of rotation of the motor. During extremely low speed rotation, there is almost no phase difference between the applied voltage waveform and the current waveform of the motor coil. However, as the amount of rotation increases, the current waveform is delayed with respect to the applied voltage waveform due to the influence of the current delay component of the coil and the back electromotive force due to the motor structure. The effect is greater at higher speeds. Therefore, the delay of the current waveform with respect to the applied voltage waveform can be suppressed by executing the processing of S613 of FIG. 6 and S615 of FIG.

図11は、図6のS615の実行後、定常状態に移行した状態での印加電圧波形と発生磁力との関係を説明する図である。図11(A)から(D)は、図8(A)から(D)や図9(A)から(D)に対応している。   FIG. 11 is a view for explaining the relationship between the applied voltage waveform and the generated magnetic force in the state of transitioning to the steady state after execution of S <b> 615 in FIG. 6. FIGS. 11A to 11D correspond to FIGS. 8A to 8D and 9A to 9D, respectively.

図11と図8とを比較すると、磁場とロータ磁石が釣り合った状態から印加電圧の位相は225度進んでいることが分かる。225度はPHS_OFSの設定値640(図6:S615)に対応する位相差である。この時、モータは高速で回転しているため、コイルの電流遅れ、モータの逆起電力の影響で電流が電圧に対して大幅に遅れる。図11では、この遅れ量を135度としている。コイルに流れている電流と発生する磁場は比例関係にあるので、コイル電流と発生磁場の位相は一致する。よって、図11(C)で示す発生磁場の位相は電圧位相から135度遅れる。しかし図8で示す安定停止位相と比べると、ロータ磁石の位相に対して90度進んだ位相になり、図9に示す磁場の引力関係と結果的に同じになる。安定停止の位相関係から、回転のために印加する磁場が90度進んだ位相関係において、最もトルク効率が高い。本実施形態では予めモータの特性を測定しておき、最高速度が得られる場合の印加電圧の位相が225度の進相状態であると特定されているものとする。図6、図7にてS611からS615の処理で説明したように、位相差PHS_OFSを段階的に上げる処理が実行される。これは、低速回転時には電流遅れの作用が少ないため、初めから大きな位相差を加えると効率的なトルクで回転加速を行えないからである。位相差の切り替え点に相当する第1および第2の位置であるX1、X2の値については、予めモータの加速特性、電流遅れ特性等を測定して、測定結果に基づいて設定される。なお、上記の現象は逆起電力作用、コイルの遅れ成分が大きいモータで顕著な現象であり、本実施形態ではそのようなモータを前提としている。   11 and 8 show that the phase of the applied voltage leads 225 degrees from the state where the magnetic field and the rotor magnet are in balance. 225 degrees is a phase difference corresponding to the setting value 640 (FIG. 6: S615) of PHS_OFS. At this time, since the motor is rotating at a high speed, the current is significantly delayed with respect to the voltage due to the current delay of the coil and the back electromotive force of the motor. In FIG. 11, this delay amount is 135 degrees. Since the current flowing in the coil and the generated magnetic field are in a proportional relationship, the phases of the coil current and the generated magnetic field coincide. Therefore, the phase of the generated magnetic field shown in FIG. 11C lags behind the voltage phase by 135 degrees. However, in comparison with the stable stop phase shown in FIG. 8, the phase advances by 90 degrees with respect to the phase of the rotor magnet, resulting in the same attraction relationship as the magnetic field shown in FIG. From the phase relationship of stable stop, the torque efficiency is the highest in the phase relationship in which the magnetic field applied for rotation is advanced by 90 degrees. In the present embodiment, it is assumed that the characteristics of the motor are measured in advance, and the phase of the applied voltage when the maximum speed is obtained is specified as the phase advancing state of 225 degrees. As described with reference to FIGS. 6 and 7 in the processes of S611 to S615, a process of gradually raising the phase difference PHS_OFS is executed. This is because at the time of low speed rotation, the effect of the current delay is small, and therefore, if a large phase difference is added from the beginning, rotation acceleration can not be performed with efficient torque. The values of X1 and X2, which are the first and second positions corresponding to the switching point of the phase difference, are set in advance based on the measurement results by measuring the acceleration characteristic and the current delay characteristic of the motor in advance. The above phenomenon is remarkable in the motor having a large back electromotive force action and a large delay component of the coil, and in this embodiment, such a motor is assumed.

次に、図12を参照して、モータの加速後の挙動を説明する。図12は、モータが加速後に一定速度での定速状態に移行し、さらに減速して空走し、目標停止位置TPにて停止する様子を示す。図12(A)はBposの時間変化を示し、横軸は時間軸であり、縦軸は位置を表す。図12(B)はモータの回転速度の時間変化を示し、横軸は時間軸であり、縦軸は回転速度を表す。また、図12(C)はBposの下位10ビット値の時間変化を示す。図12(D)は駆動波形位相カウント値の時間変化を示す。駆動波形位相カウント値は、図12(C)に示す値に指令位相差を加算して、0〜1023の値に正規化した値に相当する。図12(E)、(F)はそれぞれ、駆動波形位相カウント値に基づいて、ステータA+116に発生する駆動波形磁場の時間変化と、ステータB+118に発生する駆動波形磁場の時間変化を示す。図12では、時刻t4から時刻t5までの期間でモータが定速状態にあり、時刻t5から時刻t6までの期間でモータが減速状態にある。時刻t6から時刻t7までの期間でモータは空走状態にある。   Next, the behavior of the motor after acceleration will be described with reference to FIG. FIG. 12 shows a state in which the motor moves to a constant speed state at a constant speed after acceleration, further decelerates and runs idle, and stops at the target stop position TP. FIG. 12A shows the time change of Bpos, the horizontal axis is a time axis, and the vertical axis represents a position. FIG. 12 (B) shows the time change of the rotational speed of the motor, the horizontal axis is a time axis, and the vertical axis shows the rotational speed. Further, FIG. 12C shows a temporal change of the lower 10 bits of Bpos. FIG. 12 (D) shows the time change of the drive waveform phase count value. The drive waveform phase count value corresponds to a value obtained by adding the command phase difference to the value shown in FIG. 12C and normalized to a value of 0 to 1023. 12 (E) and 12 (F) respectively show the temporal change of the drive waveform magnetic field generated in the stator A + 116 and the temporal change of the drive waveform magnetic field generated in the stator B + 118 based on the drive waveform phase count value. In FIG. 12, the motor is in the constant speed state in the period from time t4 to time t5, and the motor is in the decelerating state in the period from time t5 to time t6. The motor is idle during the period from time t6 to time t7.

図7のS615からS616までの間はモータが正転方向の回転状態であり、図12で示す時刻t4は最終的な位相差指令値が確定した後の速度が一定となるタイミングを示す。時刻t5は図7のS617の処理が実行されるタイミングを示す。以下では図12、図13を用いて、PHS_OFSの値が640となった期間(t4〜t5)において、外力等の外乱作用によってモータが急減速した場合に発生し得る逆転動作について説明する。   The motor rotates in the forward rotation direction from S615 to S616 in FIG. 7, and time t4 shown in FIG. 12 indicates the timing at which the velocity becomes constant after the final phase difference command value is determined. Time t5 indicates the timing at which the process of S617 in FIG. 7 is performed. The reverse operation which may occur when the motor is rapidly decelerated due to a disturbance such as an external force in a period (t4 to t5) in which the value of PHS_OFS becomes 640 will be described below using FIGS. 12 and 13.

図12に示す定速状態の期間(t4〜t5)中に、外力による急減速が起こり、電流遅れ作用が無視できるほど小さくなった場合を想定する。図13は、ロータに逆転トルクが発生することを示す図である。図11(A)から(D)に示す印加電圧波形、発生磁場、ロータ磁石位相の関係は、図13(A)から(D)に示す関係となる。この場合、モータの回転が急減速を起こしており、コイルの電流遅れ、逆起電力による電流遅れが非常に小さくなる。つまり、図11で135度としていた位相遅れは、図13において、これらの作用が無視できるほど小さい場合を表している。図13(B)に示す印加電圧の位相は、図13(D)に示すロータの着磁位相に対して、図9と同様に225度進んでいる。しかし、電流遅れが無視できるほど小さいので、図13(C)で示す発生磁場の位相が、図13(B)で示す印加電圧の位相と同じになってしまう。図13(D)のロータ磁石は、意図している回転方向とは逆向きの、逆転トルクを受けることとなる。この状態が所定時間以上に亘って維持されると逆回転方向に暴走することが懸念される。そこで、この課題の解決方法について、図14を参照して詳細に説明する。   During the period (t4 to t5) of the constant speed state shown in FIG. 12, it is assumed that rapid deceleration occurs due to external force, and the current delay action becomes so small as to be negligible. FIG. 13 is a diagram showing that reverse torque is generated in the rotor. The relationship between the applied voltage waveform, the generated magnetic field, and the rotor magnet phase shown in FIGS. 11 (A) through 11 (D) is the relationship shown in FIGS. 13 (A) through 13 (D). In this case, the rotation of the motor is rapidly decelerating, and the current delay of the coil and the current delay due to the back electromotive force become very small. That is, the phase delay set to 135 degrees in FIG. 11 represents a case where these actions are so small that they can be ignored in FIG. The phase of the applied voltage shown in FIG. 13 (B) leads 225 degrees as in FIG. 9 with respect to the magnetization phase of the rotor shown in FIG. 13 (D). However, since the current delay is so small that it can be ignored, the phase of the generated magnetic field shown in FIG. 13 (C) becomes the same as the phase of the applied voltage shown in FIG. 13 (B). The rotor magnet of FIG. 13 (D) receives reverse torque reverse to the intended rotation direction. If this state is maintained for a predetermined time or more, it is feared that the vehicle will run away in the reverse rotation direction. Then, the solution method of this subject is demonstrated in detail with reference to FIG.

図6のS609で説明したように、固定機能設定部307によって、回転方向固定機能のオン設定と、回転方向の設定が行われている場合には、図14に示す処理が実行される。この処理は、図10(B)および(C)、図12(C)および(D)で示す検出位置と出力駆動波形位相との同期制御時に行われる。図14は、駆動波形位相1301の時間変化と、検出位置の下10ビット1302の時間変化を示し、両者が位相差1303の位相差を維持しながら同期していることを示す。横軸は時間軸であり、時刻m1からm11を示す。予め決められたAD変換周期ごとに検出位置が確定し、その検出位置の下10ビットに位相差を付加した値が駆動波形の位相値として出力される。時刻m1からm11の各時間間隔はAD変換周期に相当する。位相差1303は、例えば、図12の時刻t4〜t5の期間中であれば、値640が設定されている。   As described in S609 of FIG. 6, when the setting of the rotation direction fixing function is on and the setting of the rotation direction is performed by the fixed function setting unit 307, the process illustrated in FIG. 14 is executed. This process is performed at the time of synchronous control of the detection position and the output drive waveform phase shown in FIGS. 10 (B) and (C) and FIGS. 12 (C) and 12 (D). FIG. 14 shows the time change of the drive waveform phase 1301 and the time change of the lower 10 bits 1302 of the detection position, and shows that both are synchronized while maintaining the phase difference of the phase difference 1303. The horizontal axis is a time axis, and indicates time m1 to m11. The detection position is determined every predetermined AD conversion cycle, and the value obtained by adding the phase difference to the lower 10 bits of the detection position is output as the phase value of the drive waveform. Each time interval from time m1 to m11 corresponds to an AD conversion cycle. The phase difference 1303 is set to a value 640, for example, during the period from time t4 to t5 in FIG.

時刻m4での検出位置と時刻m5での検出位置との変化を、範囲1304で示す。これは外乱等の影響により、検出位置のカウント値がマイナス方向に変化している例である。本実施形態では固定機能設定部307によって、CW方向、つまり位置のカウント値でプラス方向が設定されている(図6:S609)。この場合、時刻m5での位置検出時には、検出位置として、この時点までに検出されているプラス方向の最大値が採用される。つまり、時刻m4で検出された値が用いられる。よって、時刻m5で出力される駆動波形位相は、駆動波形位相1305で示されるように、時刻m4での検出位置に相当する位相に対し、位相差1303を加算した値となる。このことにより、駆動波形位相がマイナス方向に変化しないので、逆回転が抑制される。固定機能設定部307は駆動波形によるトルクを、設定された回転方向のトルクに維持する働きをする。   A change between the detection position at time m4 and the detection position at time m5 is indicated by a range 1304. This is an example in which the count value of the detection position changes in the negative direction due to the influence of a disturbance or the like. In the present embodiment, the fixed function setting unit 307 sets the CW direction, that is, the positive direction as the position count value (FIG. 6: S609). In this case, at the time of position detection at time m5, the maximum value in the positive direction detected up to this time is adopted as the detection position. That is, the value detected at time m4 is used. Therefore, as shown by the drive waveform phase 1305, the drive waveform phase output at time m5 is a value obtained by adding the phase difference 1303 to the phase corresponding to the detection position at time m4. As a result, since the drive waveform phase does not change in the negative direction, reverse rotation is suppressed. The fixed function setting unit 307 functions to maintain the torque by the drive waveform at the torque in the set rotational direction.

同様に、時刻m7、m8、m9での各検出位置の変化を範囲1306で示す。外乱等の影響により、検出位置のカウント値が連続してマイナス方向に変化している。固定機能設定部307により、位置のカウント値のプラス方向が設定されているので、時刻m8、m9での位置検出時にはいずれも、それまでに検出されたプラス方向の最大値が採用される。つまり、時刻m7で検出された値が用いられる。よって、時刻m8、m9でそれぞれ出力される駆動波形位相は、駆動波形位相1307で示されるように、時刻m7での検出位置に相当する位相に対し、位相差1303を加算した値となる。このことにより、駆動波形位相がマイナス方向に変化しないので、逆回転が抑制される。このように、位置検出のタイミングごとに位置の差分をとることで、位置検出の周期で設定された回転方向と実際の回転方向が一致しているか否かを判別し、一致していない場合は逆回転を抑制する制御を行うことができる。   Similarly, a change in each detection position at time m7, m8 and m9 is indicated by a range 1306. Due to the influence of disturbance or the like, the count value of the detected position continuously changes in the negative direction. Since the positive direction of the count value of the position is set by the fixed function setting unit 307, the maximum value in the positive direction detected so far is adopted at the time of position detection at times m8 and m9. That is, the value detected at time m7 is used. Therefore, as indicated by the drive waveform phase 1307, the drive waveform phases output at time m8 and m9 are values obtained by adding the phase difference 1303 to the phase corresponding to the detection position at time m7. As a result, since the drive waveform phase does not change in the negative direction, reverse rotation is suppressed. As described above, it is determined whether or not the rotation direction set in the cycle of position detection matches the actual rotation direction by taking the difference in position for each timing of position detection, and in the case where they do not coincide. Control to suppress reverse rotation can be performed.

図7のS616において、検出位置が減速開始位置以上であると判定された場合には、S617の処理に進み(図12の時刻t5)、減速制御が行われる。図15は、S617での状態を説明する図である。図15(A)から(D)は、図8(A)から(D)に対応するが、ステータ群が発生させている磁場は、図8に示す状態に比べて90度遅れた状態にある。よって、図15(D)に示されるロータ磁石120には、左側に引っ張られる引力、すなわちCCW方向の回転トルク(減速トルク)が発生する。このトルクは、図7のS617の段階ではCW方向の回転トルクに対してブレーキトルクとして働くので、これを利用して速やかなモータの減速動作が行われる。   If it is determined at S616 in FIG. 7 that the detected position is at least the deceleration start position, the process proceeds to S617 (time t5 in FIG. 12), and deceleration control is performed. FIG. 15 is a diagram for explaining the state at S617. FIGS. 15A to 15D correspond to FIGS. 8A to 8D, however, the magnetic field generated by the stator group is delayed by 90 degrees as compared with the state shown in FIG. . Therefore, in the rotor magnet 120 shown in FIG. 15D, an attractive force that is pulled to the left, that is, a rotational torque (deceleration torque) in the CCW direction is generated. Since this torque acts as a brake torque with respect to the rotational torque in the CW direction at the stage of S617 of FIG. 7, the motor deceleration operation is performed quickly using this.

その後、図12の時刻t6では、図7のS619に示すように、PHS_OFSの値としてゼロが設定され、空走期間に移行する。図12の時刻t7では、図7のS621に示すように連動機能がオフに設定される。モータの位置は目標停止位置TPに到達して、モータが回転を停止する。   Thereafter, at time t6 in FIG. 12, as shown in S619 in FIG. 7, zero is set as the value of PHS_OFS, and a transition to an idle period is made. At time t7 in FIG. 12, as shown in S621 in FIG. 7, the interlocking function is set to be off. The position of the motor reaches the target stop position TP, and the motor stops its rotation.

本実施形態では、駆動波形の連続性が損なわれて不連続な波形になることを抑制しつつ、検出された回転位置に基づき、モータに対して効率的な駆動波形を生成することができる。その際に反応遅れを低減できる。また、電流遅れを補償する効率的な制御を行っている最中に、急な過剰負荷や外乱等に基づく急減速により、意図しない逆転動作が引き起こされることを防止できる。   In the present embodiment, it is possible to generate an efficient drive waveform for the motor based on the detected rotational position while suppressing the continuity of the drive waveform from being lost and becoming a discontinuous waveform. At that time, the reaction delay can be reduced. In addition, it is possible to prevent an unintended reverse operation caused by a sudden deceleration due to a sudden excessive load, a disturbance, or the like while performing efficient control for compensating the current delay.

[第2実施形態]
次に、本発明の第2実施形態を説明する。第1実施形態においては、位置連動駆動での回転方向が一方向である場合について述べた。本実施形態では、位置連動駆動で現時点とは逆方向の回転動作を行う場合について説明する。この場合、駆動波形の連続性が損なわれて不連続な波形になることを抑制しつつ、急な過剰負荷や外乱等に基づく意図しない逆転動作が引き起こされることを防止できる。
Second Embodiment
Next, a second embodiment of the present invention will be described. In the first embodiment, the case where the rotation direction in position interlocking drive is one direction has been described. In the present embodiment, the case of performing rotational operation in the direction opposite to the current time in position interlocking drive will be described. In this case, it is possible to prevent an unintended reverse operation caused by a sudden overload or disturbance while preventing the continuity of the drive waveform from being lost and becoming a discontinuous waveform.

図6、図16、図17に示すフローチャートを参照して、本実施形態における処理を説明する。CPU111は所定のプログラムにしたがって以下の制御を行う。駆動シーケンスが開始するとS601の処理に進む。図6のS601〜S613の処理については説明を省略する。また図16のS614〜S621の処理に関しては図7と同様のため説明を省略する。本実施形態においては、図16にてS615の後にS1601の処理が追加され、またS616とS618との間でS617の代わりにS1616の処理が行われる。   The process in the present embodiment will be described with reference to the flowcharts shown in FIGS. The CPU 111 performs the following control according to a predetermined program. When the drive sequence starts, the process proceeds to the process of S601. The description of the processing of S601 to S613 in FIG. 6 is omitted. The processes in S614 to S621 in FIG. 16 are the same as those in FIG. In this embodiment, the process of S1601 is added after S615 in FIG. 16, and the process of S1616 is performed instead of S617 between S616 and S618.

S1601でCPU111は、モータの反転動作を行うか否かの判定処理を行う。例えば、操作部材等によって現在の回転方向とは反対の回転方向に指令が変化した場合、CPU111は操作部材の信号変化に基づいて判定処理を行う。反転動作の処理を行うことが判定された場合、S1602の処理に進む。また、反転動作の処理を行わないことが判定された場合、S616に進む。   At S1601, the CPU 111 performs processing to determine whether or not to perform the motor reversing operation. For example, when the command is changed by the operation member or the like in the rotation direction opposite to the current rotation direction, the CPU 111 performs the determination processing based on the signal change of the operation member. If it is determined that the process of the reversing operation is to be performed, the process proceeds to the process of S1602. If it is determined that the process of the reversing operation is not performed, the process proceeds to step S616.

S1602でCPU111は、固定機能設定部307を通じて、回転方向固定機能をオフに設定する。その後にS1603でCPU111は逆回転補正機能をオンに設定する。逆回転補正機能は駆動波形生成回路110によって実現される機能であり、駆動波形生成回路110と位置ENC回路109とを連動させた位置連動駆動時に、過剰負荷等がかかった場合の意図しない駆動を防ぐ働きをする。逆回転補正機能では、差分算出処理により所定期間ごとの回転検出位置の差分量を取得し、その差分量が閾値を上回っていないかを判定する処理が行われる。所定期間とはAD変換周期、つまり回転検出位置の更新タイミングに対応する期間である。逆回転補正機能の詳細については図18〜図20を用いて後述する。   In S1602, the CPU 111 sets the rotation direction fixing function to OFF via the fixing function setting unit 307. Thereafter, the CPU 111 sets the reverse rotation correction function to ON in S1603. The reverse rotation correction function is a function realized by the drive waveform generation circuit 110, and unintended drive when excessive load or the like is applied at the time of position interlock drive where the drive waveform generation circuit 110 and the position ENC circuit 109 interlock. Work to prevent. In the reverse rotation correction function, a difference calculation process is performed to acquire the difference amount of the rotation detection position for each predetermined period, and a process of determining whether the difference amount exceeds the threshold value is performed. The predetermined period is a period corresponding to the AD conversion cycle, that is, the update timing of the rotation detection position. Details of the reverse rotation correction function will be described later with reference to FIGS. 18 to 20.

S1603の次に、S1604でCPU111は逆回転補正機能の閾値(Aと表記する)を算出する。本実施形態では、逆回転補正機能がオンに設定される直前のAD変換周期ごとの回転検出位置の差分量を閾値Aとして設定する処理が行われる。ただし、閾値Aについては、例えば逆回転補正機能がオフに設定された状態での、AD変換周期ごとの回転検出位置の差分量に関する平均値を閾値Aとしてもよい。あるいは、事前にモータおよび機構部の駆動特性を調べておき、反転動作前の速度に応じたAD変換周期ごとの回転検出位置の差分量から決定される閾値Aがメモリに保持されていてもよい。また閾値Aは固定値である必要はない。例えば、事前にモータおよび機構部の駆動特性を調べておき、あらかじめ定められた時間ごとに変化する可変値として閾値Aを設定してもよい。   After S1603, the CPU 111 calculates a threshold (denoted as A) of the reverse rotation correction function in S1604. In the present embodiment, a process of setting the difference amount of the rotation detection position for each AD conversion cycle immediately before the reverse rotation correction function is set to ON as the threshold A is performed. However, for the threshold A, for example, an average value of the difference amount of the rotation detection position for each AD conversion cycle in a state where the reverse rotation correction function is set to OFF may be used as the threshold A. Alternatively, the threshold A determined from the difference amount of the rotation detection position for each AD conversion cycle according to the speed before the reversing operation may be stored in the memory by examining the drive characteristics of the motor and the mechanism in advance. . Also, the threshold A need not be a fixed value. For example, the drive characteristics of the motor and the mechanical unit may be checked in advance, and the threshold value A may be set as a variable value that changes every predetermined time.

S1605において、位置連動機能を利用した回転トルク発生動作が行われる。具体的にはPHS_OFSに駆動波形位相で−90度に相当する値である−256が設定される。モータにCCW方向の回転トルク、すなわちCW回転時にはブレーキとなる減速トルクがかかる。その後に図17のS1606に進む。   In S1605, a rotational torque generation operation using a position interlocking function is performed. Specifically, PHS_OFS is set to -256 which is a value corresponding to -90 degrees in the drive waveform phase. A rotational torque in the CCW direction, that is, a deceleration torque serving as a brake during CW rotation, is applied to the motor. Thereafter, the process proceeds to S1606 in FIG.

S1606にてCPU111は、反転動作処理が完了するまでの所定時間が経過したか否かを判定する。反転動作処理が完了するまでの時間は、事前にモータおよび機構部の駆動特性を調べておき、反転動作前の速度に応じた、反転完了までにかかる時間のデータがメモリに保持されているものとする。事前に設定された時間が経過したと判定された場合、S1607へ進み、当該時間が経過していないと判定された場合にはS1611へ進む。   In S1606, the CPU 111 determines whether a predetermined time until the reverse operation process is completed has elapsed. For the time until the reversal operation processing is completed, the drive characteristics of the motor and mechanism are checked in advance, and the data of the time taken to complete the reversal according to the speed before the reversal operation is held in the memory I assume. If it is determined that the time set in advance has elapsed, the process advances to step S1607, and if it is determined that the time has not elapsed, the process advances to step S1611.

S1611にてCPU111は差分算出処理により得られた、AD変換周期ごとの回転検出位置の差分量(差分の大きさ)が所定の範囲外、例えば閾値以上(A以上)であるか否かを判定する。AD変換周期ごとの回転検出位置の差分量が所定の範囲内、つまり閾値未満(A未満)であると判定された場合、S1606へと進んで判定処理が繰り返される。一方、AD変換周期ごとの回転検出位置の差分量が閾値以上(A以上)であると判定された場合、S1612へ進む。   In S1611, the CPU 111 determines whether the difference amount (magnitude of the difference) of the rotation detection position for each AD conversion cycle obtained by the difference calculation processing is outside a predetermined range, for example, a threshold value or more (A or more). Do. If it is determined that the difference amount of the rotation detection position for each AD conversion cycle is within the predetermined range, that is, less than the threshold (less than A), the process proceeds to S1606 and the determination process is repeated. On the other hand, when it is determined that the difference amount of the rotation detection position for each AD conversion cycle is equal to or more than the threshold (A or more), the process proceeds to S1612.

S1612にてCPU111は、AD変換周期ごとの回転検出位置の差分量が、所定値(Bと表記する)以上であるかどうかを判定する。所定値BはAD変換周期ごとの回転検出位置の差分量としては、ありえない値として事前に設定されている判定用の閾値である。例えば所定値Bは、モータが最高速で動作した場合の回転位置の変化量よりも大きい限界値として設定される。「閾値A<所定値B」の関係が必ず成り立つものとする。S1612にてAD変換周期ごとの回転検出位置の差分量が所定値B以上であると判定された場合、S1613へ進む。またAD変換周期ごとの回転検出位置の差分量が所定値Bよりも小さいと判定された場合、つまりAD変換周期ごとの回転検出位置の差分量が閾値以上(A以上)であって、かつ限界値である所定値Bより小さい場合にはS1614へ進む。   In S1612, the CPU 111 determines whether or not the amount of difference in rotation detection position for each AD conversion cycle is equal to or greater than a predetermined value (denoted as B). The predetermined value B is a threshold for determination which is set in advance as an impossible value as the difference amount of the rotation detection position for each AD conversion cycle. For example, the predetermined value B is set as a limit value larger than the amount of change of the rotational position when the motor operates at the maximum speed. It is assumed that the relationship of “threshold A <predetermined value B” is always established. If it is determined in S1612 that the difference between the rotation detection positions for each AD conversion cycle is equal to or greater than the predetermined value B, the process advances to S1613. When it is determined that the difference between the rotation detection positions for each AD conversion cycle is smaller than the predetermined value B, that is, the difference between the rotation detection positions for each AD conversion cycle is equal to or greater than the threshold (A or more) and limited If the value is smaller than the predetermined value B, the process advances to step S1614.

S1613にてCPU111は緊急停止処理を実行する。例えばモータに接続されたメカ部材が外部から強制的に移動させられた等の場合、CPU111はモータの駆動状態が正常でないことを示す通知処理を実行する。この場合、CPU111はモータの駆動シーケンスを一旦停止し、安全に再始動するシーケンスへ移行させる制御を行い、駆動シーケンスを終了させる。本処理に関しては図19を用いて後述する。   At S1613, the CPU 111 executes an emergency stop process. For example, when the mechanical member connected to the motor is forcibly moved from the outside, the CPU 111 executes notification processing indicating that the driving state of the motor is not normal. In this case, the CPU 111 temporarily stops the drive sequence of the motor, performs control to shift to a safe restart sequence, and ends the drive sequence. This process will be described later with reference to FIG.

S1614にてCPU111は、CCW方向へのトルク生成に関する調整処理を行う。その際には、回転検出位置に対して駆動波形位相で−90度に相当する値を与えるのでなく、一つ前の回転検出位置の値(前回値)に閾値Aを加算した値に対して、駆動波形位相で−90度に相当する値を設定する処理が行われる。本処理に関しては図18を用いて後述する。S1614の処理後にS1606へ戻って判定処理が繰り返し行われる。本実施形態の閾値Aは、逆回転補正機能がオンに設定される直前のAD変換周期ごとの回転検出位置の差分量により設定される。回転検出位置の前回値に、閾値未満であったときの差分量に対応する所定値(例えば閾値A)を加算した値に対して、所定の位相差に相当する値を加算した駆動波形の位相にしたがってモータの駆動制御が行われる。   At S1614, the CPU 111 performs adjustment processing regarding torque generation in the CCW direction. In that case, a value corresponding to -90 degrees in the drive waveform phase is not given to the rotation detection position, but a value obtained by adding the threshold A to the value of the previous rotation detection position (previous value) A process of setting a value corresponding to -90 degrees in the drive waveform phase is performed. This process will be described later with reference to FIG. After the process of S1614, the process returns to S1606 and the determination process is repeated. The threshold A in the present embodiment is set by the difference amount of the rotation detection position for each AD conversion cycle immediately before the reverse rotation correction function is set to ON. A phase of a drive waveform obtained by adding a value corresponding to a predetermined phase difference to a value obtained by adding a predetermined value (for example, threshold A) corresponding to the difference amount when the rotation detection position is less than the threshold to the previous value The drive control of the motor is performed in accordance with.

S1606からS1607へ進む場合、S1607でCPU111は差分算出処理により得られた、AD変換周期ごとの回転検出位置の差分量が所定の範囲外、例えば閾値以上(A以上)であるか否かを判定する。AD変換周期ごとの回転検出位置の差分量が閾値以上であると判定された場合、S1608へ進む。またAD変換周期ごとの回転検出位置の差分量が所定の範囲内、つまり閾値未満(A未満)であると判断された場合にはS1610へ進む。閾値Aを用いた判定処理は例示であり、これに限るものではない。例えばAよりも小さい値で任意に閾値の設定が可能であり、また判定条件については、差分量が閾値Aを所定回数以上に亘って連続で上回ったことを条件としてもよい。   When the process proceeds from step S1606 to step S1607, in step S1607, the CPU 111 determines whether the difference amount of the rotation detection position for each AD conversion cycle obtained by the difference calculation process is outside a predetermined range, for example, a threshold or more (A or more). Do. If it is determined that the difference between the rotation detection positions for each AD conversion cycle is equal to or greater than the threshold, the process advances to step S1608. If it is determined that the difference between the rotation detection positions for each AD conversion cycle is within a predetermined range, that is, less than the threshold (less than A), the process advances to step S1610. The determination process using the threshold A is an example, and the present invention is not limited to this. For example, it is possible to arbitrarily set the threshold with a value smaller than A, and the determination condition may be that the difference amount continuously exceeds the threshold A for a predetermined number of times or more.

S1610にてCPU111は緊急停止処理を実行する。例えばモータの脱調や、外部から強制的にメカ部材が固定させられた等の場合、CPU111はモータの駆動状態が正常でないことを示す通知処理を実行する。この場合、CPU111はモータの駆動シーケンスを一旦停止し、安全に再始動するシーケンスへ移行させる制御を行い、駆動シーケンスを終了させる。本処理に関しては図20を用いて後述する。   At S1610, the CPU 111 executes an emergency stop process. For example, when the motor is out of step or the mechanical member is forcibly fixed from the outside, the CPU 111 executes notification processing indicating that the drive state of the motor is not normal. In this case, the CPU 111 temporarily stops the drive sequence of the motor, performs control to shift to a safe restart sequence, and ends the drive sequence. This process will be described later with reference to FIG.

S1608にてCPU111は反転動作が正常に完了したと判断し、逆回転補正機能をオフに設定する。その次のS1609でCPU111は、固定機能設定部307を通じて回転方向固定機能をオンにし、回転方向をCCW方向、すなわち位置検出のカウント方向でマイナス方向に設定する。その後、図16のS1601へ移行する。   In step S1608, the CPU 111 determines that the reverse operation has been completed normally, and sets the reverse rotation correction function to off. In the next S1609, the CPU 111 turns on the rotation direction fixing function through the fixed function setting unit 307, and sets the rotation direction in the CCW direction, that is, in the minus direction in the position detection count direction. Thereafter, the process proceeds to S1601 in FIG.

図16においては、S616の次にS1616の処理が行われる。つまり、S616にてロータの検出位置が減速開始位置以上であると判定された場合、S1616に進む。CPU111は、モータにCW方向の回転トルク、すなわちCCW回転時にはブレーキとなる減速トルクがかかるようにPHS_OFSの値として、+256を設定する。その後にS618へと進む。   In FIG. 16, the process of S1616 is performed after S616. That is, if it is determined at S616 that the detected position of the rotor is equal to or greater than the deceleration start position, the process proceeds to S1616. The CPU 111 sets +256 as the value of PHS_OFS so that a rotational torque in the CW direction, that is, a deceleration torque serving as a brake during CCW rotation, is applied to the motor. After that, it advances to S618.

図16および図17の例においては、反転動作後に停止処理を行って一連の処理を終了するシーケンスに関して説明した。これに限るものではなく、例えば反転動作を繰り返したのちに停止処理を行うことも同様の方法で可能である。   In the example of FIG. 16 and FIG. 17, the stop processing is performed after the reverse operation and the sequence of ending the series of processing has been described. The present invention is not limited to this, and for example, it is possible to perform the stop process after repeating the reverse operation in the same manner.

次に図16のS1603で説明した、逆回転補正機能に関して、図18を参照して詳細を説明する。図18(A)は、逆回転補正機能を使用しない場合の駆動波形位相1731の時間変化と、検出位置1732の時間変化を示す図である。図18(B)は、逆回転補正機能を使用した場合の駆動波形位相1731の時間変化と、検出位置1732の時間変化を示す図である。図18(A)、図18(B)において横軸は時間軸であり、時刻m1からm13を示す。予め決められたAD変換周期ごとに検出位置が確定し、その検出位置の下10ビットに位相差を付加した値が駆動波形の位相値として出力される。また各図の縦軸は検出位置と駆動波形位相を示している。駆動波形位相1731と検出位置1732は、位相差1702の位相差を維持しながら同期している。時刻m1からm13の各時間間隔、つまり隣り合う時刻の間隔はAD変換周期に相当する。位相差1702については、例えば、図16のS1605における値である−256が設定されている。矢印1701により、図16のS1604で設定された閾値Aを表している。   Next, the reverse rotation correction function described in S1603 of FIG. 16 will be described in detail with reference to FIG. FIG. 18A is a diagram showing a time change of the drive waveform phase 1731 and a time change of the detection position 1732 when the reverse rotation correction function is not used. FIG. 18B is a diagram showing a temporal change of the drive waveform phase 1731 and a temporal change of the detection position 1732 when the reverse rotation correction function is used. In FIG. 18A and FIG. 18B, the horizontal axis is a time axis, and indicates time m1 to m13. The detection position is determined every predetermined AD conversion cycle, and the value obtained by adding the phase difference to the lower 10 bits of the detection position is output as the phase value of the drive waveform. Further, the vertical axis of each figure indicates the detection position and the drive waveform phase. The drive waveform phase 1731 and the detection position 1732 are synchronized while maintaining the phase difference of the phase difference 1702. Each time interval of time m1 to m13, that is, an interval of adjacent time corresponds to an AD conversion cycle. For the phase difference 1702, for example, −256, which is the value in S1605 of FIG. 16, is set. The arrow 1701 represents the threshold A set in S1604 of FIG.

ここで時刻m4に対応するポイント1723と、時刻m8に対応するポイント1724に着目する。これらのポイントにおいて、AD変換の検出誤差や外乱等によって、閾値Aを上回るAD変換周期ごとの回転検出位置の差分量が発生したものとする。図18(A)においては逆回転補正機能を使用しないので、回転検出位置に対して位相差1702の位相差を維持しながら駆動波形位相1731を同期させる制御が行われる。そのため、AD変換の検出誤差や外乱の影響を受けた箇所において駆動波形の連続性が損なわれる可能性がある。   Here, attention is paid to a point 1723 corresponding to time m4 and a point 1724 corresponding to time m8. At these points, it is assumed that a difference amount of the rotation detection position for each AD conversion cycle exceeding the threshold A is generated due to a detection error of AD conversion, a disturbance, or the like. In FIG. 18A, since the reverse rotation correction function is not used, control is performed to synchronize the drive waveform phase 1731 while maintaining the phase difference of the phase difference 1702 with respect to the rotation detection position. Therefore, there is a possibility that the continuity of the drive waveform is lost at a location affected by the detection error of AD conversion or disturbance.

図18(B)においてCPU111は、回転検出位置に対して位相差1702を維持するのではなく、AD変換周期ごとの回転検出位置の差分量が閾値A以上である場合、その状況をAD変換の検出誤差や外乱の影響によると判断する。CPU111は一つ前の回転検出位置に閾値Aを加算した値に対して位相差1702を加算した駆動波形の位相にしたがってモータの駆動を制御する。例えばCPU111は、時刻m4に対応するポイント1723において位相差1713を、また時刻m8に対応するポイント1724においては位相差1714を駆動波形の位相に与える。このように反転挙動中において、AD変換の検出誤差や外乱の影響を極力抑制して、常に一定のトルクを発生させることで反転動作完了までの時間を短縮し、動作を安定させることができる。   In FIG. 18B, the CPU 111 does not maintain the phase difference 1702 with respect to the rotation detection position, and when the difference amount of the rotation detection position for each AD conversion cycle is equal to or larger than the threshold A, the situation is It is judged that it is due to the influence of detection error or disturbance. The CPU 111 controls the driving of the motor in accordance with the phase of the drive waveform obtained by adding the phase difference 1702 to the value obtained by adding the threshold A to the previous rotation detection position. For example, the CPU 111 gives the phase difference 1713 to the phase of the drive waveform at the point 1723 corresponding to the time m4, and the phase difference 1714 at the point 1724 corresponding to the time m8. As described above, during the inversion behavior, the influence of the detection error of AD conversion and the disturbance can be suppressed as much as possible, and a constant torque can be generated at all times to shorten the time until the completion of the inversion operation and stabilize the operation.

次に図19を参照して、モータに接続されたメカ部材が外部から強制的に移動させられた等の事態が発生したことを判断する方法について詳説する。図19は、図17のS1613で緊急停止処理が実行される場合の駆動波形位相1731の時間変化と、検出位置1732の時間変化を示す図である。横軸および縦軸の設定は図18と同様であり、時間軸には時刻m1からm6を示す。時刻m1からm6の各時間間隔はAD変換周期に相当する。   Next, with reference to FIG. 19, a method of determining that a mechanical member connected to the motor has been forcibly moved from the outside will be described in detail. FIG. 19 is a diagram showing the time change of the drive waveform phase 1731 and the time change of the detection position 1732 when the emergency stop process is executed in S1613 of FIG. The settings of the horizontal axis and the vertical axis are the same as in FIG. 18, and the time axis indicates times m1 to m6. Each time interval from time m1 to m6 corresponds to an AD conversion cycle.

図19にて、時刻m5に対応するポイント1802で、あらかじめ定められた所定値B以上の回転検出位置の差分量が発生したものとする(矢印1801参照)。このとき、駆動波形位相1731におけるポイント1802に対応する検出位置1732上での回転検出位置(ポイント1800参照)に対して、位相差1702(図19参照)を付加した駆動波形が出力されたとしても、モータが正常に動作しない可能性が高い。その理由はS1612で説明したように、限界値である所定値B以上の変化量が本実施形態のモータ駆動システムにおいて起こりえない変化量であることによる。この場合、CPU111は図17のS1613にて、例えば外部から強制的にメカ部材が移動させられた等の事態が発生したと判断し、モータの駆動状態が正常でないことを示す通知処理を実行する。そしてCPU111はモータの駆動シーケンスを一旦停止し、安全に再始動するシーケンスへ移行させる制御を行う。   In FIG. 19, it is assumed that a difference amount of the rotation detection position equal to or more than a predetermined value B determined in advance is generated at a point 1802 corresponding to time m5 (see an arrow 1801). At this time, even if a drive waveform in which a phase difference 1702 (see FIG. 19) is added to the rotation detection position (see point 1800) on the detection position 1732 corresponding to the point 1802 in the drive waveform phase 1731 is output. , There is a high possibility that the motor does not operate normally. The reason is that, as described in S1612, the change amount equal to or more than the predetermined value B which is the limit value is a change amount that can not occur in the motor drive system of the present embodiment. In this case, the CPU 111 determines in S1613 in FIG. 17 that, for example, a mechanical member has been forcibly moved from the outside, etc., and executes notification processing indicating that the drive state of the motor is not normal. . Then, the CPU 111 performs control to temporarily stop the drive sequence of the motor and shift to a safe restart sequence.

次に図20を参照して、モータの脱調や、外部から強制的にメカ部材が固定させられた等の事態が発生したことを判断する方法について詳説する。図20は、図17のS1610で緊急停止処理が実行される場合の駆動波形位相1731の時間変化と、検出位置1732の時間変化を示す図である。横軸および縦軸の設定は図18と同様であり、時間軸には時刻m1からm16を示す。時刻m1からm16の各時間間隔はAD変換周期に相当する。時刻m16に対応するポイント1901にて、あらかじめ定められた反転動作に要する時間が経過したものとする。このとき、ポイント1901に対応する、ポイント1902での回転検出位置に対して、位相差1702を付加した駆動波形が出力され続けたとしても、正常にモータが動作しない可能性が高い。この場合、CPU111は、例えばモータの脱調や、外部から強制的にメカ部材が固定させられた等の事態が発生したと判断し、モータの駆動状態が正常でないことを示す通知処理を実行する。そしてCPU111はモータの駆動シーケンスを一旦停止し、安全に再始動するシーケンスへ移行させる制御を行う。   Next, with reference to FIG. 20, a method of judging that a situation such as a step out of a motor or a mechanical member is forcibly fixed from the outside has occurred will be described in detail. FIG. 20 is a diagram showing the time change of the drive waveform phase 1731 and the time change of the detection position 1732 when the emergency stop process is executed in S1610 of FIG. The settings of the horizontal axis and the vertical axis are the same as in FIG. 18, and time m1 to m16 are shown on the time axis. Each time interval from time m1 to m16 corresponds to an AD conversion cycle. It is assumed that a predetermined time required for the reversing operation has elapsed at a point 1901 corresponding to time m16. At this time, there is a high possibility that the motor does not operate normally even if the drive waveform to which the phase difference 1702 is added continues to be output to the rotation detection position at the point 1902 corresponding to the point 1901. In this case, the CPU 111 determines that, for example, the motor is out of step or the mechanical member is forcibly fixed from the outside or the like, and executes a notification process indicating that the drive state of the motor is not normal. . Then, the CPU 111 performs control to temporarily stop the drive sequence of the motor and shift to a safe restart sequence.

本実施形態では、ロータを逆方向に回転させる反転動作において、駆動波形の連続性が損なわれて不連続な波形になることを抑制しつつ、回転検出位置に基づき、モータに対して効率的な駆動波形を生成し、その際の反応遅れを低減できる。本実施形態によれば、急な過剰負荷や外乱等に基づく急減速により、意図しない逆転動作が引き起こされることを防止できる。   In this embodiment, in the reverse operation of rotating the rotor in the reverse direction, the continuity of the drive waveform is lost and the discontinuous waveform is suppressed, and the motor is efficiently applied to the motor based on the rotation detection position. A drive waveform can be generated to reduce reaction delay at that time. According to the present embodiment, it is possible to prevent the occurrence of an unintended reverse operation due to rapid deceleration based on a sudden overload or disturbance.

前記実施形態の位置検出器は、複数のホールセンサと回転磁石を用いた構成であるが、回転位置検出を高精度に行える構成であれば、他のセンサ機構を用いても実施可能である。また本実施形態では10極の一般的なクローポール型ステッピングモータの構成を前提に説明したが、これに限らず、ロータ側が永久磁石であって、ステータ側がコイル・ステータであれば、他の構成のモータでも実施可能である。   The position detector of the embodiment is configured using a plurality of Hall sensors and a rotating magnet, but any other sensor mechanism may be used as long as it can be configured to detect the rotational position with high accuracy. The present embodiment has been described on the premise of the configuration of a general 10-pole claw-pole type stepping motor, but the present invention is not limited thereto. Other configurations are possible if the rotor side is a permanent magnet and the stator side is a coil stator. Is also possible.

101 ステッピングモータ
102 ロータ軸
103 ENC磁石
104 Hall素子パッケージ
109 位置ENC回路
110 駆動波形生成回路
111 CPU
120 ロータ磁石
101 Stepping motor 102 Rotor shaft 103 ENC magnet 104 Hall element package 109 Position ENC circuit 110 Drive waveform generation circuit 111 CPU
120 rotor magnets

Claims (25)

ロータの回転方向を設定する設定手段と、
前記ロータの回転位置を検出する検出手段と、
モータへの駆動波形を生成する生成手段と、
前記回転位置の位相と前記駆動波形の位相とを同期させる同期制御を行う制御手段と、
前記回転位置の位相と前記駆動波形の位相とが同期した状態で、前記回転位置と前記駆動波形との間に位相差を設定する位相差設定手段と、を備え、
前記制御手段は、前記検出手段により検出される回転位置の変化に対応する方向と、前記設定手段によって設定された回転方向とが異なる場合、前記設定された回転方向とは逆の方向である逆回転を抑制する制御を行う
ことを特徴とするモータ駆動装置。
Setting means for setting the rotational direction of the rotor;
Detection means for detecting the rotational position of the rotor;
Generation means for generating a drive waveform to the motor;
Control means for performing synchronous control to synchronize the phase of the rotational position with the phase of the drive waveform;
Phase difference setting means for setting a phase difference between the rotational position and the drive waveform in a state where the phase of the rotational position and the phase of the drive waveform are synchronized;
When the direction corresponding to the change of the rotational position detected by the detection means is different from the rotational direction set by the setting means, the control means is reverse to the set rotational direction, which is the opposite direction. A motor drive device characterized by performing control which controls rotation.
前記検出手段により検出される回転位置の変化に対応する第1の方向と、前記設定手段によって設定された第2の方向とが同じである状態から、前記第1の方向と前記第2の方向とが異なる状態に変化した場合、前記制御手段は、前記第1の方向と前記第2の方向とが同じであったときに前記検出手段により検出された回転位置の最大値に相当する位相に対し、前記位相差設定手段による位相差を加算した駆動波形の位相にしたがってモータの駆動を制御する
ことを特徴とする請求項1に記載のモータ駆動装置。
From the state where the first direction corresponding to the change of the rotational position detected by the detection means is the same as the second direction set by the setting means, the first direction and the second direction And when the first direction and the second direction are the same, the control means sets the phase corresponding to the maximum value of the rotational position detected by the detection means when the first direction and the second direction are the same. The motor drive device according to claim 1, wherein the drive of the motor is controlled in accordance with the phase of the drive waveform to which the phase difference by the phase difference setting means is added.
前記検出手段による回転位置の検出のタイミングに合わせて、前記制御手段が前記同期制御および前記逆回転を抑制する制御を行う
ことを特徴とする請求項1または請求項2に記載のモータ駆動装置。
The motor drive device according to claim 1 or 2, wherein the control means performs the synchronous control and the control for suppressing the reverse rotation in synchronization with the timing of detection of the rotational position by the detection means.
前記検出手段による回転位置の検出のタイミングに係る周期で、前記制御手段が前記検出手段により検出される回転位置の変化に対応する第1の方向と、前記設定手段によって設定された第2の方向とが同じであるか、異なるかを判定する
ことを特徴とする請求項1から3のいずれか1項に記載のモータ駆動装置。
A first direction corresponding to a change in rotational position detected by the control unit, and a second direction set by the setting unit, in a cycle related to the timing of detection of the rotational position by the detection unit. The motor drive device according to any one of claims 1 to 3, wherein it is determined whether or not the same.
前記制御手段は、前記モータの駆動中に前記回転位置が予め定められた時間以上に亘って変化しない場合に通知処理を行う
ことを特徴とする請求項1から4のいずれか1項に記載のモータ駆動装置。
The said control means performs notification processing, when the said rotational position does not change over more than predetermined time during the drive of the said motor. Motor drive.
前記制御手段は、前記モータの駆動中に保持されている回転位置と、前記検出手段によって検出される回転位置との差分の大きさが予め定められた値より大きくなった場合に通知処理を行う
ことを特徴とする請求項1から5のいずれか1項に記載のモータ駆動装置。
The control means performs notification processing when the magnitude of the difference between the rotational position held while the motor is driven and the rotational position detected by the detection means is larger than a predetermined value. The motor drive device according to any one of claims 1 to 5, characterized in that:
前記制御手段は前記通知処理を行い、前記モータの駆動を停止して再始動を行う
ことを特徴とする請求項5または請求項6に記載のモータ駆動装置。
The motor drive device according to claim 5 or 6, wherein the control means performs the notification process, stops driving of the motor, and restarts.
前記検出手段は、
前記ロータの回転量に比例する第1のカウント値を算出する第1の算出手段と、
前記回転量に対して周期的に変化する第2のカウント値を算出する第2の算出手段と、を備える
ことを特徴とする請求項1から7のいずれか1項に記載のモータ駆動装置。
The detection means
First calculation means for calculating a first count value proportional to the rotation amount of the rotor;
The motor drive device according to any one of claims 1 to 7, further comprising second calculation means for calculating a second count value that periodically changes with respect to the rotation amount.
前記検出手段は、位相差を有する複数の正弦波状信号から前記ロータの回転位置を検出する
ことを特徴とする請求項1から8のいずれか1項に記載のモータ駆動装置。
The motor drive device according to any one of claims 1 to 8, wherein the detection means detects a rotational position of the rotor from a plurality of sinusoidal signals having a phase difference.
前記検出手段は、前記複数の正弦波状信号から正接値を算出し、当該正接値に逆正接演算を行って前記ロータの回転角度を算出し、前記回転角度を積分することによって前記ロータの回転位置情報を算出する
ことを特徴とする請求項9に記載のモータ駆動装置。
The detection means calculates a tangent value from the plurality of sinusoidal signals, performs an arctangent operation on the tangent value to calculate a rotation angle of the rotor, and integrates the rotation angle to calculate the rotation position of the rotor. The motor drive device according to claim 9, wherein the information is calculated.
前記生成手段は、前記第2の算出手段の出力を取得して前記駆動波形の位相を決定する位相決定手段を備え、
前記位相差設定手段は前記位相決定手段に対して定常位相差または駆動用位相差を設定する
ことを特徴とする請求項8に記載のモータ駆動装置。
The generation means includes phase determination means for obtaining the output of the second calculation means and determining the phase of the drive waveform.
The motor drive apparatus according to claim 8, wherein the phase difference setting means sets a steady phase difference or a driving phase difference with respect to the phase determination means.
前記制御手段は、前記モータが停止している状態で前記検出手段により検出される回転位置に相当する位相と前記駆動波形の位相との位相差を基準として、前記位相差設定手段によって設定した前記位相差にしたがって前記モータの駆動を制御する
ことを特徴とする請求項11に記載のモータ駆動装置。
The control means is set by the phase difference setting means with reference to a phase difference between the phase corresponding to the rotational position detected by the detection means and the phase of the drive waveform when the motor is stopped. The motor drive device according to claim 11, wherein the drive of the motor is controlled in accordance with a phase difference.
モータ駆動装置にて実行されるモータ駆動方法であって、
ロータの回転方向を設定する設定工程と、
前記ロータの回転位置を検出する検出工程と、
モータへの駆動波形を生成する生成工程と、
前記回転位置の位相と前記駆動波形の位相とを同期させる制御を行う制御工程と、
前記回転位置の位相と前記駆動波形の位相とが同期した状態で、前記回転位置と前記駆動波形との間に位相差を設定する工程と、を有し、
前記制御工程では、前記検出工程により検出される回転位置の変化に対応する方向と、前記設定工程によって設定された回転方向とが異なる場合、前記設定された回転方向とは逆の方向である逆回転を抑制する制御が行われる
ことを特徴とするモータ駆動方法。
A motor drive method executed by a motor drive device, comprising:
A setting step of setting a rotational direction of the rotor;
Detecting the rotational position of the rotor;
A generation step of generating a drive waveform to the motor;
A control step of performing control to synchronize the phase of the rotational position with the phase of the drive waveform;
Setting a phase difference between the rotational position and the drive waveform in a state in which the phase of the rotational position and the phase of the drive waveform are synchronized,
In the control step, when the direction corresponding to the change in the rotational position detected in the detection step and the rotational direction set in the setting step are different, the set rotational direction is reverse to the opposite direction. A motor drive method characterized in that control for suppressing rotation is performed.
ロータの回転方向を設定する設定手段と、
前記ロータの回転位置を検出する検出手段と、
前記ロータの所定期間ごとの回転位置の差分を算出する差分算出手段と、
モータへの駆動波形を生成する生成手段と、
前記回転位置の位相と前記駆動波形の位相とを同期させる同期制御を行う制御手段と、
前記回転位置の位相と前記駆動波形の位相とが同期した状態で、前記回転位置と前記駆動波形との間に位相差を設定する位相差設定手段と、を備え、
前記設定手段によって第1の方向とは逆方向である第2の方向に回転方向が設定された際に前記制御手段は、前記差分算出手段により算出される所定期間ごとの回転位置の差分の大きさが閾値以上であって限界値より小さい場合に前記ロータの回転量を調整する制御を行う
ことを特徴とするモータ駆動装置。
Setting means for setting the rotational direction of the rotor;
Detection means for detecting the rotational position of the rotor;
Difference calculation means for calculating a difference between rotational positions of the rotor for each predetermined period;
Generation means for generating a drive waveform to the motor;
Control means for performing synchronous control to synchronize the phase of the rotational position with the phase of the drive waveform;
Phase difference setting means for setting a phase difference between the rotational position and the drive waveform in a state where the phase of the rotational position and the phase of the drive waveform are synchronized;
When the direction of rotation is set in the second direction opposite to the first direction by the setting means, the control means calculates the magnitude of the difference in rotational position for each predetermined period calculated by the difference calculation means. A motor drive device characterized in that control is performed to adjust the amount of rotation of the rotor when the threshold value is greater than the threshold value and smaller than the limit value.
前記差分算出手段により算出される所定期間ごとの回転位置の差分の大きさが前記閾値以上であって前記限界値より小さい場合、前記制御手段は、前記検出手段により検出された回転位置に対して前記閾値未満であったときの前記回転位置の差分を加算した値に、前記位相差設定手段による位相差を加算した駆動波形の位相にしたがって前記モータの駆動を制御する
ことを特徴とする請求項14に記載のモータ駆動装置。
When the magnitude of the difference of the rotational position for each predetermined period calculated by the difference calculation means is greater than or equal to the threshold value and smaller than the limit value, the control means performs the rotational position detected by the detection means. The drive of the motor is controlled according to the phase of the drive waveform in which the phase difference by the phase difference setting means is added to the value obtained by adding the difference of the rotational position when it is less than the threshold. 14. The motor drive device according to 14.
前記差分算出手段により算出される所定期間ごとの回転位置の差分の大きさが前記閾値以上であって前記限界値より小さい場合、前記制御手段は、前記検出手段により検出された回転位置に対して前記閾値を加算した値に、前記位相差設定手段による位相差を加算した駆動波形の位相にしたがって前記モータの駆動を制御する
ことを特徴とする請求項14に記載のモータ駆動装置。
When the magnitude of the difference of the rotational position for each predetermined period calculated by the difference calculation means is greater than or equal to the threshold value and smaller than the limit value, the control means performs the rotational position detected by the detection means. The motor drive device according to claim 14, wherein the drive of the motor is controlled according to a phase of a drive waveform obtained by adding a phase difference by the phase difference setting means to a value obtained by adding the threshold value.
前記検出手段による回転位置の検出のタイミングに合わせて、前記制御手段が前記同期制御および前記回転量を調整する制御を行う
ことを特徴とする請求項14から16のいずれか1項に記載のモータ駆動装置。
The motor according to any one of claims 14 to 16, wherein the control means performs the synchronization control and the control of adjusting the amount of rotation in accordance with the timing of detection of the rotational position by the detection means. Drive device.
前記所定期間とは、前記検出手段による回転位置の検出のタイミングに係る周期である
ことを特徴とする請求項14から17のいずれか1項に記載のモータ駆動装置。
The motor drive device according to any one of claims 14 to 17, wherein the predetermined period is a cycle related to timing of detection of a rotational position by the detection means.
前記閾値は、前記設定手段によって前記第2の方向に回転方向が設定された際に前記差分算出手段により算出される回転位置の差分の値、または前記設定手段によって前記第2の方向に回転方向が設定される前に前記差分算出手段により算出される回転位置の差分の平均値、または前記ロータの反転動作前の速度に対応する回転位置の差分から決定される値である
ことを特徴とする請求項14から18のいずれか1項に記載のモータ駆動装置。
The threshold value is a value of a difference between rotational positions calculated by the difference calculating unit when the setting unit sets the rotational direction in the second direction, or the rotational direction in the second direction by the setting unit. It is a value determined from an average value of differences in rotational position calculated by the difference calculating means before setting, or from a difference in rotational position corresponding to the speed before the reverse operation of the rotor. The motor drive device according to any one of claims 14 to 18.
前記設定手段によって前記第2の方向が設定されてから予め定められた時間が経過した後に、前記制御手段は前記検出手段により検出される回転位置の変化に対応する方向と、前記設定手段によって設定された前記第2の方向とが異なる場合、前記第1の方向の逆回転を抑制する制御を行う
ことを特徴とする請求項14から19のいずれか1項に記載のモータ駆動装置。
After a predetermined time has elapsed since the setting of the second direction by the setting means, the control means sets the direction corresponding to the change of the rotational position detected by the detecting means, and the setting by the setting means The motor drive device according to any one of claims 14 to 19, wherein control is performed to suppress reverse rotation in the first direction when the second direction is different.
前記制御手段は、前記所定期間ごとの回転位置の差分の大きさが予め定められた値以上である場合に通知処理を行う
ことを特徴とする請求項14から20のいずれか1項に記載のモータ駆動装置。
21. The control method according to any one of claims 14 to 20, wherein the control means performs notification processing when the magnitude of the difference of the rotational position for each predetermined period is equal to or greater than a predetermined value. Motor drive.
前記制御手段は、前記所定期間ごとの回転位置の差分の大きさが予め定められた時間が経過した後も予め定められた値より小さい場合に通知処理を行う
ことを特徴とする請求項14から20のいずれか1項に記載のモータ駆動装置。
15. The control method according to claim 14, wherein the control unit performs notification processing when the magnitude of the difference of the rotational position for each predetermined period is smaller than a predetermined value even after a predetermined time has elapsed. 20. The motor drive device according to any one of 20.
前記制御手段は前記通知処理を行い、前記モータの駆動を停止して再始動を行う
ことを特徴とする請求項21または請求項22に記載のモータ駆動装置。
The motor drive device according to claim 21 or 22, wherein the control means performs the notification process, stops driving of the motor, and restarts.
前記検出手段は、位相差を有する複数の正弦波状信号から前記ロータの回転位置を検出する
ことを特徴とする請求項14から23のいずれか1項に記載のモータ駆動装置。
The motor drive device according to any one of claims 14 to 23, wherein the detection means detects a rotational position of the rotor from a plurality of sinusoidal signals having a phase difference.
モータ駆動装置にて実行されるモータ駆動方法であって、
ロータの回転方向を設定する設定工程と、
前記ロータの回転位置を検出する検出工程と、
前記ロータの所定期間ごとの回転位置の差分を算出する算出工程と、
モータへの駆動波形を生成する生成工程と、
前記回転位置の位相と前記駆動波形の位相とを同期させる同期制御を行う制御工程と、
前記回転位置の位相と前記駆動波形の位相とが同期した状態で、前記回転位置と前記駆動波形との間に位相差を設定する工程と、を有し、
前記設定工程によって第1の方向とは逆方向である第2の方向に回転方向が設定された際に、前記制御工程では、前記算出工程により算出される所定期間ごとの回転位置の差分の大きさが閾値以上であって限界値より小さい場合に前記ロータの回転量を調整する制御が行われる
ことを特徴とするモータ駆動方法。
A motor drive method executed by a motor drive device, comprising:
A setting step of setting a rotational direction of the rotor;
Detecting the rotational position of the rotor;
A calculation step of calculating a difference between rotational positions of the rotor at predetermined intervals;
A generation step of generating a drive waveform to the motor;
A control step of performing synchronous control to synchronize the phase of the rotational position with the phase of the drive waveform;
Setting a phase difference between the rotational position and the drive waveform in a state in which the phase of the rotational position and the phase of the drive waveform are synchronized,
When the rotation direction is set in the second direction opposite to the first direction in the setting step, in the control step, the magnitude of the difference in rotational position for each predetermined period calculated in the calculation step A motor drive method characterized in that control is performed to adjust the amount of rotation of the rotor when the threshold value is greater than the threshold value and smaller than the limit value.
JP2018164624A 2017-09-05 2018-09-03 Motor drive device and motor drive method Active JP7171321B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017170320 2017-09-05
JP2017170320 2017-09-05

Publications (2)

Publication Number Publication Date
JP2019047722A true JP2019047722A (en) 2019-03-22
JP7171321B2 JP7171321B2 (en) 2022-11-15

Family

ID=65815753

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018164624A Active JP7171321B2 (en) 2017-09-05 2018-09-03 Motor drive device and motor drive method

Country Status (1)

Country Link
JP (1) JP7171321B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112803864A (en) * 2019-11-14 2021-05-14 财团法人资讯工业策进会 Robot and micro control unit and method for correcting angular velocity of motor of robot
JP7414481B2 (en) 2019-11-18 2024-01-16 キヤノン株式会社 motor drive device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08172793A (en) * 1994-12-16 1996-07-02 Aisin Seiki Co Ltd Chopping conduction controlling equipment
JP2000299997A (en) * 1999-04-09 2000-10-24 Mitsubishi Electric Corp Drive control system
JP2002359997A (en) * 2001-03-26 2002-12-13 Fdk Corp Stepper motor and driving control method therefor
JP2007336640A (en) * 2006-06-13 2007-12-27 Melec:Cc Method and apparatus for detecting step-out of stepping motor
JP2009244022A (en) * 2008-03-31 2009-10-22 Meidensha Corp Phase detection circuit
JP2014039428A (en) * 2012-08-20 2014-02-27 Canon Inc Control device, and method for controlling stepping motor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08172793A (en) * 1994-12-16 1996-07-02 Aisin Seiki Co Ltd Chopping conduction controlling equipment
JP2000299997A (en) * 1999-04-09 2000-10-24 Mitsubishi Electric Corp Drive control system
JP2002359997A (en) * 2001-03-26 2002-12-13 Fdk Corp Stepper motor and driving control method therefor
JP2007336640A (en) * 2006-06-13 2007-12-27 Melec:Cc Method and apparatus for detecting step-out of stepping motor
JP2009244022A (en) * 2008-03-31 2009-10-22 Meidensha Corp Phase detection circuit
JP2014039428A (en) * 2012-08-20 2014-02-27 Canon Inc Control device, and method for controlling stepping motor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112803864A (en) * 2019-11-14 2021-05-14 财团法人资讯工业策进会 Robot and micro control unit and method for correcting angular velocity of motor of robot
JP7414481B2 (en) 2019-11-18 2024-01-16 キヤノン株式会社 motor drive device

Also Published As

Publication number Publication date
JP7171321B2 (en) 2022-11-15

Similar Documents

Publication Publication Date Title
US10439525B2 (en) Motor drive device and method for driving motor
US10461675B2 (en) Control device, optical apparatus, control method, and storage medium
US6555985B1 (en) Stepping motor control device
US8278851B2 (en) Drive apparatus having a stepping motor
JP5656354B2 (en) Drive device
CN100517946C (en) Method and apparatus for controlling motor drive
JP2011147236A (en) Drive apparatus for stepping motor
US9647586B2 (en) Signal amplifier, phase detector, and motor drive controller
JP7171321B2 (en) Motor drive device and motor drive method
JP2014171344A (en) Imaging apparatus, motor driving device, and imaging method
JP6004830B2 (en) Control device and stepping motor control method
US9503005B2 (en) Control device and stepping motor control method
JP7005275B2 (en) Motor drive device, motor system including the motor drive device, image pickup device, motor drive method
JP2001178193A (en) Stepping motor controller and lens device using the same
JP5464793B2 (en) Motor drive device
US11183954B2 (en) Motor driving device and control method thereof
JP7158891B2 (en) Motor drive device and motor drive method
JP2015033191A (en) Motor controller
JP2011101480A (en) Motor drive device
JP7467036B2 (en) Motor drive device and control method thereof
JP5772799B2 (en) Motor pole phase adjustment method
JP2009017687A (en) Disc-rotating device
WO2011132411A1 (en) Motor control apparatus, motor control method, motor system, and computer-readable medium
JP6684553B2 (en) Linear permanent magnet synchronous motor and motor control device and control method thereof
JP2011062001A (en) Drive control method of stepping motor and drive controller

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210830

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220726

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220802

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220926

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221102

R151 Written notification of patent or utility model registration

Ref document number: 7171321

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151