[go: up one dir, main page]

JP2004023889A - Motor controller - Google Patents

Motor controller Download PDF

Info

Publication number
JP2004023889A
JP2004023889A JP2002175377A JP2002175377A JP2004023889A JP 2004023889 A JP2004023889 A JP 2004023889A JP 2002175377 A JP2002175377 A JP 2002175377A JP 2002175377 A JP2002175377 A JP 2002175377A JP 2004023889 A JP2004023889 A JP 2004023889A
Authority
JP
Japan
Prior art keywords
phase
rotor
energization
count value
control
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.)
Pending
Application number
JP2002175377A
Other languages
Japanese (ja)
Inventor
Yasuhiro Nakai
中井 康裕
Shigeru Kamio
神尾 茂
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.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2002175377A priority Critical patent/JP2004023889A/en
Priority to US10/443,795 priority patent/US7084597B2/en
Priority to DE10324846A priority patent/DE10324846A1/en
Priority to DE10362105.9A priority patent/DE10362105B4/en
Publication of JP2004023889A publication Critical patent/JP2004023889A/en
Priority to US11/257,306 priority patent/US7221116B2/en
Priority to US11/404,869 priority patent/US20060197489A1/en
Priority to US11/730,871 priority patent/US7609012B2/en
Priority to US12/382,603 priority patent/US8013563B2/en
Priority to US12/926,585 priority patent/US8134322B2/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Gear-Shifting Mechanisms (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To quickly recover from reverse rotation state into a normal rotational direction even if the rotational direction of a rotor is reversed by any irresistible force when performing the F/B control of a motor, based on an encoder count value. <P>SOLUTION: This motor controller judges whether a rotational direction instruction value D which instructs the rotational direction to a target position is positive rotation "1" (step 611) or not, and judges whether the rotational direction of a rotor 32 is opposite to the instruction of the rotational direction or not, based on the direction of a change in the encoder count value, by the direction of change of the encoder count value (steps 612 and 614). If, it is judged that it is reversed, a current application phase judgment value Mptn for reversal prevention is not updated. In this case, a current is applied to the current application phase (the last current application phase) just before reversal. Hereby, braking torque is generated in the direction of suppressing the reversal of the rotor 32, and the reversal is suppressed quickly. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、エンコーダの出力信号(以下「エンコーダカウント値」という)に基づいてモータの通電相を順次切り換えることでロータを回転駆動するモータ制御装置に関するものである。
【0002】
【従来の技術】
近年、構造が簡単で安価なモータとして需要が増加しているスイッチトリラクタンスモータ等のブラシレス型のモータは、ロータの回転に同期してパルス信号を出力するエンコーダを搭載し、このエンコーダの出力信号をカウントして、そのエンコーダカウント値に基づいてロータの回転位置を検出して通電相を順次切り換えることでロータを回転駆動するようにしたものがある。このようなエンコーダ付きのモータは、起動後のエンコーダカウント値に基づいてロータの回転位置を検出することができるため、フィードバック制御系(閉ループ制御系)によりロータを目標位置まで回転させる位置切換制御(位置決め制御)を行う各種の位置切換装置の駆動源として用いられている。
【0003】
【発明が解決しようとする課題】
このようなエンコーダ付きのモータで位置切換制御を行う場合、エンコーダカウント値に基づいてロータを目標位置まで回転駆動する途中で、何等かの不可抗力でロータの回転方向が逆転すると、エンコーダカウント値の変化方向も逆転するため、そのエンコーダカウント値に基づいて決定される通電相の切換順序も逆転して、ロータを逆転方向に駆動するトルクが発生してしまう結果となる。そのため、ロータが、一旦、逆転し始めると、その逆転が抑制されずに助長されてしまう結果となり、逆転状態から再び正常な回転方向に復帰するまでに長い時間がかかって、ロータが目標位置に到達するのが著しく遅くなったり、最悪の場合、逆転を止めることができなくなって制御不能に陥るおそれがある。
【0004】
本発明はこのような事情を考慮してなされたものであり、従ってその目的は、エンコーダカウント値に基づいてロータを目標位置まで回転駆動する途中で、何等かの不可抗力でロータの回転方向が逆転したときに、逆転方向のトルクが発生することを未然に防止できて、逆転状態から正常な回転方向に復帰するのに要する時間を短くすることができ、安定した位置切換制御(位置決め制御)を行うことができるモータ制御装置を提供することにある。
【0005】
【課題を解決するための手段】
上記目的を達成するために、本発明の請求項1のモータ制御装置は、制御手段によってエンコーダカウント値に基づいてロータを目標位置まで回転させる際に、逆転監視手段によってエンコーダカウント値の変化方向を監視してロータの回転方向が目標位置へ向かう回転方向から逆転したか否かを監視し、逆転が検出されたときに、ロータを逆転方向に駆動する通電相に通電することを逆転防止手段によって禁止するようにしたものである。このようにすれば、エンコーダカウント値に基づいてロータを目標位置まで回転駆動する途中で、何等かの不可抗力でロータの回転方向が逆転して、エンコーダカウント値の変化方向が逆転しても、ロータを逆転方向に駆動するトルクが発生することを未然に防止できる。これにより、逆転状態から正常な回転方向に復帰するのに要する時間を短くすることができて、安定した位置切換制御(位置決め制御)を行うことができる。
【0006】
この場合、請求項2のように、逆転検出時にその逆転直前の通電相に通電するようにすると良い。このように、逆転直前の通電相に通電すれば、ロータの逆転を抑制する方向に制動トルクを生じさせることができて、その制動トルクによって逆転抑制効果を高めることができ、逆転状態から正常な回転方向に速やかに復帰させることができる。
【0007】
但し、本発明は、請求項3のように、逆転検出時にいずれの相にも通電しない構成としても良く、この場合でも、逆転方向のトルクが発生することを未然に防止できるため、本発明の所期の目的を達成することができる。
【0008】
また、請求項4のように、モータとしてスイッチトリラクタンスモータを使用するようにしても良い。スイッチトリラクタンスモータは、永久磁石が不要で構造が簡単であるため、安価であり、温度環境等に対する耐久性・信頼性も高いという利点がある。
【0009】
また、請求項5のように、エンコーダは、ロータの回転に同期して所定の位相差(一般的には電気角で90°の位相差)を有するA相信号とB相信号を出力し、ロータの回転駆動中に、A相信号及びB相信号をカウントしてエンコーダカウント値を更新する際に、A相信号とB相信号の発生順序によってロータの回転方向を判定して、その回転方向に応じてエンコーダカウント値をカウントアップ又はカウントダウンし、そのエンコーダカウント値とロータの回転方向に応じて通電相を選択して通電するようにすると良い。このようにすれば、ロータが正回転/逆回転のいずれの方向に回転しても、エンコーダカウント値とロータの回転位置との対応関係を維持することができて、正回転/逆回転のいずれの回転方向でも、エンコーダカウント値に基づいて正しい通電相を選択することができる。
【0010】
以上説明した請求項1〜5に係る発明は、スイッチトリラクタンスモータ等のブラシレス型のモータを駆動源とする各種の位置切換装置に適用でき、例えば、請求項6のように、車両の自動変速機のレンジを切り換えるレンジ切換機構を駆動するモータの制御装置に適用しても良い。これにより、信頼性の高いモータ駆動式のレンジ切換装置を構成することができる。
【0011】
【発明の実施の形態】
以下、本発明を車両のレンジ切換装置に適用した一実施形態を図面に基づいて説明する。
【0012】
まず、図1に基づいてレンジ切換機構11の構成を説明する。レンジ切換機構11の駆動源となるモータ12は、例えばスイッチトリラクタンスモータにより構成され、減速機構26(図4参照)を内蔵し、その出力軸13の回転位置を検出する出力軸センサ14が設けられている。この出力軸13には、ディテントレバー15が固定されている。
【0013】
また、ディテントレバー15にはL字形のパーキングロッド18が固定され、このパーキングロッド18の先端部に設けられた円錐体19がロックレバー21に当接している。このロックレバー21は、円錐体19の位置に応じて軸22を中心にして上下動してパーキングギヤ20をロック/ロック解除するようになっている。パーキングギヤ20は、自動変速機27の出力軸に設けられ、このパーキングギヤ20がロックレバー21によってロックされると、車両の駆動輪が回り止めされた状態(パーキング状態)に保持される。
【0014】
一方、ディテントレバー15をパーキングレンジ(以下「Pレンジ」と表記する)と他のレンジ(以下「NotPレンジ」と表記する)に保持するためのディテントバネ23が支持ベース17に固定され、このディテントバネ23の先端に設けられた係合部23aがディテントレバー15のPレンジ保持凹部24に嵌まり込んだときに、ディテントレバー15がPレンジの位置に保持され、該ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25に嵌まり込んだときに、ディテントレバー15がNotPレンジの位置に保持されるようになっている。
【0015】
Pレンジでは、パーキングロッド18がロックレバー21に接近する方向に移動して、円錐体19の太い部分がロックレバー21を押し上げてロックレバー21の凸部21aがパーキングギヤ20に嵌まり込んでパーキングギヤ20をロックした状態となり、それによって、自動変速機27の出力軸(駆動輪)がロックされた状態(パーキング状態)に保持される。
【0016】
一方、NotPレンジでは、パーキングロッド18がロックレバー21から離れる方向に移動して、円錐体19の太い部分がロックレバー21から抜け出てロックレバー21が下降し、それによって、ロックレバー21の凸部21aがパーキングギヤ20から外れてパーキングギヤ20のロックが解除され、自動変速機27の出力軸が回転可能な状態(走行可能な状態)に保持される。
【0017】
尚、前述した出力軸センサ14は、モータ12の減速機構26の出力軸13の回転角度に応じた電圧を出力する回転センサ(例えばポテンショメータ)によって構成され、その出力電圧によって現在のレンジがPレンジとNotPレンジのいずれであるかを確認できるようになっている。
【0018】
次に、図2に基づいてモータ12の構成を説明する。本実施形態では、モータ12として、スイッチトリラクタンスモータ(以下「SRモータ」と表記する)が用いられている。このSRモータ12は、ステータ31とロータ32が共に突極構造を持つモータで、永久磁石が不要で構造が簡単であるという利点がある。円筒状のステータ31の内周部には、例えば12個の突極31aが等間隔に形成され、これに対して、ロータ32の外周部には、例えば8個の突極32aが等間隔に形成され、ロータ32の回転に伴い、ロータ32の各突極32aがステータ31の各突極31aと微小ギャップを介して順番に対向するようになっている。ステータ31の12個の突極31aには、U相、V相、W相の合計6個の巻線33と、U’相、V’相、W’相の合計6個の巻線34が順番に巻回されている。尚、ステータ31とロータ32の突極31a,32aの数は適宜変更しても良いことは言うまでもない。
【0019】
本実施形態の巻線33,34の巻回順序は、ステータ31の12個の突極31aに対して、例えば、V相→W相→U相→V相→W相→U相→V’相→W’相→U’相→V’相→W’相→U’相の順序で巻回されている。図3に示すように、U相、V相、W相の合計6個の巻線33と、U’相、V’相、W’相の合計6個の巻線34は、2系統のモータ励磁部35,36を構成するように結線されている。一方のモータ励磁部35は、U相、V相、W相の合計6個の巻線33をY結線して構成され(同じ相の2個の巻線33はそれぞれ直列に接続されている)、他方のモータ励磁部36は、U’相、V’相、W’相の合計6個の巻線34をY結線して構成されている(同じ相の2個の巻線34はそれぞれ直列に接続されている)。2つのモータ励磁部35,36は、U相とU’相が同時に通電され、V相とV’相が同時に通電され、W相とW’相が同時に通電される。
【0020】
これら2つのモータ励磁部35は、車両に搭載されたバッテリ40を電源として、それぞれ別個のモータドライバ37,38によって駆動される。このように、モータ励磁部35,36とモータドライバ37,38をそれぞれ2系統ずつ設けることで、一方の系統が故障しても、他方の系統でSRモータ12を回転させることができるようになっている。図3に示すモータドライバ37,38の回路構成例では、各相毎にトランジスタ等のスイッチング素子39を1個ずつ設けたユニポーラ駆動方式の回路構成としているが、各相毎にスイッチング素子を2個ずつ設けたバイポーラ駆動方式の回路構成を採用しても良い。尚、本発明は、モータ励磁部とモータドライバをそれぞれ1系統ずつ設けた構成としても良いことは言うまでもない。
【0021】
各モータドライバ37,38の各スイッチング素子39のオン/オフは、ECU41(制御手段)によって制御される。図4に示すように、このECU41と各モータドライバ37,38は、レンジ切換制御装置42に搭載され、このレンジ切換制御装置42には、Pレンジへの切換操作を行うPレンジスイッチ43と、NotPレンジへの切換操作を行うNotPレンジスイッチ44の操作信号が入力される。Pレンジスイッチ43又はNotPレンジスイッチ44の操作により選択されたレンジは、インストルメントパネル(図示せず)に設けられたレンジ表示部45に表示される。
【0022】
SRモータ12には、ロータ32の回転位置を検出するためのエンコーダ46が設けられている。このエンコーダ46は、例えば磁気式のロータリエンコーダにより構成されており、その具体的な構成は、図5及び図6に示すように、N極とS極が円周方向に交互に等ピッチで着磁された円環状のロータリマグネット47がロータ32の側面に同軸状に固定され、このロータリマグネット47に対向する位置に、3個のホールIC等の磁気検出素子48,49,50が配置された構成となっている。本実施形態では、ロータリマグネット47のN極とS極の着磁ピッチが7.5°に設定されている。このロータリマグネット47の着磁ピッチ(7.5°)は、SRモータ12の励磁1回当たりのロータ32の回転角度と同じに設定されている。後述するように、1−2相励磁方式でSRモータ12の通電相の切り換えを6回行うと、全ての通電相の切り換えが一巡してロータ32とロータリマグネット47が一体的に7.5°×6=45°回転する。このロータリマグネット47の45°の回転角度範囲に存在するN極とS極の数は、合計6極となっている。
【0023】
更に、ロータ32の基準回転位置に相当する位置のN極(N’)とその両側のS極(S’)がそれ以外の磁極よりも径方向の幅が広くなるように形成されている。尚、本実施形態では、SRモータ12の通電相の切り換えが一巡する間にロータ32とロータリマグネット47が一体的に45°回転することを考慮して、ロータ32の基準回転位置に相当する幅広な着磁部分(N’)が45°ピッチで形成されており、従って、ロータリマグネット47全体として、基準回転位置に相当する幅広な着磁部分(N’)が合計8個形成されている。尚、基準回転位置に相当する幅広な着磁部分(N’)は、ロータリマグネット47全体として、1個のみ形成した構成としても良い。
【0024】
このロータリマグネット47に対して3個の磁気検出素子48,49,50が次のような位置関係で配置されている。A相信号を出力する磁気検出素子48とB相信号を出力する磁気検出素子49は、ロータリマグネット47の幅狭な着磁部分(N,S)と幅広な着磁部分(N’,S’)の両方に対向し得る位置の同一円周上に配置されている。一方、Z相信号を出力する磁気検出素子50は、ロータリマグネット47の幅狭な着磁部分(N,S)よりも径方向外側又は内側の位置で、且つ、幅広な着磁部分(N’,S’)のみに対向し得る位置に配置されている。A相信号とB相信号を出力する2個の磁気検出素子48,49の間隔は、図7に示すように、A相信号とB相信号の位相差が、電気角で90°(機械角で3.75°)となるように設定されている。ここで、“電気角”はA・B相信号の発生周期を1周期(360°)とした場合の角度で、“機械角”は機械的な角度(ロータ32の1回転を360°とした場合の角度)であり、A相信号の立ち下がり(立ち上がり)からB相信号の立ち下がり(立ち上がり)までにロータ32が回転する角度がA相信号とB相信号の位相差の機械角に相当する。また、Z相信号を出力する磁気検出素子50は、Z相信号とB相信号(又はA相信号)との位相差が0となるように配置されている。
【0025】
各磁気検出素子48,49,50の出力は、N極(N’極)と対向したときにハイレベル“1”となり、S極(S’極)と対向したときにローレベル“0”となる。尚、Z相信号用の磁気検出素子50の出力は、ロータ32の基準回転位置に相当する幅広なN’極に対向する毎にハイレベル“1”となり、それ以外の位置では、ローレベル“0”となる。
【0026】
本実施形態では、ECU41が後述するエンコーダカウンタルーチンによってA相信号とB相信号の立ち上がり/立ち下がりの両方のエッジをカウントして、そのエンコーダカウント値に応じてSRモータ12の通電相を切り換えることでロータ32を回転駆動する。この際、A相信号とB相信号の発生順序によってロータ32の回転方向を判定し、正回転(Pレンジ→NotPレンジの回転方向)ではエンコーダカウント値をカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではエンコーダカウント値をカウントダウンする。これにより、ロータ32が正回転/逆回転のいずれの方向に回転しても、エンコーダカウント値とロータ32の回転位置との対応関係が維持されるため、正回転/逆回転のいずれの回転方向でも、エンコーダカウント値によってロータ32の回転位置(回転角度)を検出して、その回転位置に対応した相の巻線33,34に通電してロータ32を回転駆動する。
【0027】
図7は、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に回転させたときのエンコーダ46の出力波形と通電相の切換パターンを示している。逆回転方向(NotPレンジ→Pレンジの回転方向)と正回転方向(Pレンジ→NotPレンジの回転方向)のいずれの場合も、ロータ32が7.5°回転する毎に1相通電と2相通電とを交互に切り換えるようになっており、ロータ32が45°回転する間に、例えば、U相通電→UW相通電→W相通電→VW相通電→V相通電→UV相通電の順序で通電相の切り換えを一巡するようになっている。そして、この通電相の切り換え毎に、ロータ32が7.5°ずつ回転して、A相、B相信号用の磁気検出素子48,49に対向するロータリマグネット47の磁極がN極→S極(N’極→S’極)又はS極→N極(S’極→N’極)に変化してA相信号とB相信号のレベルが交互に反転し、それによって、ロータ32が7.5°回転する毎に、エンコーダカウント値が2ずつカウントアップ(又はカウントダウン)する。また、通電相の切り換えが一巡してロータ32が45°回転する毎に、Z相用の磁気検出素子50がロータ32の基準回転位置に相当する幅広なN’極に対向して、Z相信号がハイレベル“1”となる。尚、本明細書では、A相、B相、Z相信号がハイレベル“1”となることを、A相、B相、Z相信号が出力されると言う場合がある。
【0028】
ところで、エンコーダカウント値は、ECU41のRAMに記憶されるため、ECU41の電源がオフされると、エンコーダカウント値の記憶が消えてしまう。そのため、ECU41の電源投入直後のエンコーダカウント値(0)は、実際のロータ32の回転位置(通電相)に対応したものとならい。従って、エンコーダカウント値に応じて通電相を切り換えるためには、電源投入後にエンコーダカウント値と実際のロータ32の回転位置とを対応させて、エンコーダカウント値と通電相とを対応させる必要がある。
【0029】
そこで、本実施形態では、レンジ切換制御装置42のECU41によって後述する図8及び図9に示す初期駆動ルーチンを実行することで、ECU41への電源投入後の初期駆動時に、SRモータ12の通電相の切り換えを所定のタイムスケジュールで一巡させてエンコーダ46のA相信号及びB相信号のエッジをカウントし、初期駆動終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダカウント値と初期駆動終了時の学習結果とに基づいて通電相を決定するようにしている。
【0030】
この初期駆動時の学習は、具体的には次のようにして行われる。図12に示すように、PレンジでECU41に電源が投入されたときに初期駆動を行う場合は、例えば、W相通電→UW相通電→U相通電→UV相通電→V相通電→VW相通電の順序で通電相の切り換えを所定のタイムスケジュールで一巡し、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に駆動する。
【0031】
一方、NotPレンジでECU41に電源が投入されたときに初期駆動を行う場合は、例えば、V相通電→UV相通電→U相通電→UW相通電→W相通電→VW相通電の順序で通電相の切り換えを所定のタイムスケジュールで一巡し、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に駆動する。
【0032】
この初期駆動時には、1相通電の時間T1を2相通電の時間T2よりも短くし、例えばT1=10ms、T2=100msに設定する。初期駆動中にロータ32の回転位置と通電相との同期がとれた後でも、トルクが小さい1相通電では、ロータ32が振動するため、1相通電の時間T1を短くして、できるだけ速やかに次の2相通電に切り換えることで、ロータ32の振動を速やかに停止させてエンコーダ46の出力信号を安定させるようにしている。
【0033】
このように、初期駆動時に通電相の切り換えを一巡させれば、初期駆動が終了するまでに、いずれかの通電相で必ずロータ32の回転位置と通電相とが一致して、それ以後、通電相の切り換えに同期してロータ32が回転して、このロータ32の回転に同期してエンコーダ46からA相信号及びB相信号が出力されるようになる。
【0034】
この初期駆動中に、エンコーダ46のA相信号及びB相信号の立ち上がり/立ち下がりの両方のエッジをカウントする。従って、初期駆動終了時のエンコーダカウント値を見れば、初期駆動が終了するまでにロータ32が実際に通電相の切り換えに同期して回転した角度(回転量)が分かり、それによって、初期駆動終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係が分かる。
【0035】
図12の例では、初期駆動時に最初の通電相(W相)からロータ32が回転し、通電相の切り換え毎にロータ32が7.5°ずつ回転してエンコーダカウント値が2ずつカウントアップし、初期駆動終了時にエンコーダカウント値が12となる。
【0036】
これに対し、例えば、初めの3回の励磁(W相通電→UW相通電→U相通電)でロータ32が回転しない場合、つまり4回目以降の励磁(UV相通電→V相通電→VW相通電)でロータ32の回転位置と通電相とが同期してロータ32が3回の励磁分だけ回転する場合は、初期駆動終了時までにロータ32が7.5°×3=22.5°回転して、エンコーダカウント値が2×3=6となる。従って、初期駆動終了時のエンコーダカウント値を見れば、初期駆動が終了するまでにロータ32が実際に通電相の切り換えに同期して回転した角度(回転量)が判明する。
【0037】
初期駆動の最後の通電相は、常にVW相となるが、エンコーダカウント値は、必ずしも12になるとは限らず、例えば8、或は4である場合もある。初期駆動終了後の通常駆動時には、エンコーダカウント値に基づいて通電相が決定されるため、初期駆動によるエンコーダカウント値のずれを修正しないと、通常駆動時に正しい通電相を選択することができない。
【0038】
そこで、本実施形態では、初期駆動終了時のエンコーダカウント値を初期位置ずれ学習値として学習し、その後の通常駆動時にエンコーダカウント値を初期位置ずれ学習値で補正することで、初期駆動終了時のエンコーダカウント値と通電相(ロータ32の回転位置)とのずれを補正して、通常駆動時に正しい通電相を選択できるようにしている。
【0039】
初期駆動終了後は、図12に示すように、後述するF/B制御開始位置停止保持処理により、初期駆動終了時の通電相(VW相)と同じ相に例えば10ms通電してロータ32の位置を初期駆動終了時の位置に保持し、その後、後述するフィードバック制御(以下「F/B制御」と表記する)により、その時点のエンコーダカウント値と初期位置ずれ学習値とに基づいて通電相を切り換えてロータ32を目標位置Acntの方向へ回転させる。これにより、ロータ32の回転位置(エンコーダカウント値)が目標位置Acntから例えば0.5°以内に到達した時点で、通電相の切り換えを終了してロータ32を停止させ、その後は、後述する目標位置停止保持処理により、同じ相に通電し続けてロータ32の停止状態を保持し、この保持状態を例えば50ms継続する。この後、目標位置Acntが変化しなければ、通電を停止する。
【0040】
また、初期駆動の途中で、Pレンジスイッチ43又はNotPレンジスイッチ44が操作されてレンジ切換要求が発生した場合は、次の2相通電(2相通電の実行中にレンジ切換要求が発生したときはその2相通電)が終了してから通常駆動に移行すると共に、該2相通電終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダカウント値と2相通電終了時の学習結果とに基づいて通電相を決定するようにしている。
【0041】
2相通電では、トルクが大きいため、ロータ32の位置が2相通電に対応する位置から多少ずれていたとしても、ロータ32を2相通電に対応する位置まで回転させることができる。このため、初期駆動中に2相通電を1〜2回行うだけでロータ32の回転位置と通電相との同期がとれる確率は高いものと思われる。従って、初期駆動の途中でレンジ切換要求が発生したときには、次の2相通電(又は現在の2相通電)が終了してから通常駆動に移行するようにすれば、初期駆動の途中で、エンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習してから、通常駆動に速やかに移行することができる。
【0042】
例えば、図13のタイムチャートに示すように、初期駆動の2回目の励磁(UW相通電)中に、PレンジからNotPレンジへのレンジ切換要求が発生したときには、このUW相通電で初期駆動を終了して通常駆動に移行すると共に、UW相通電終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習する。本実施形態では、初期駆動の途中で通常駆動に移行する場合でも、その初期駆動を最後まで実行したと仮定して、本来の初期駆動終了時のエンコーダカウント値を推定し、その推定値を初期位置ずれ学習値とするようにしている。例えば、図13に示すように、初期駆動をW相通電とUW相通電の2回の励磁で終了する場合は、その後に予定されていた4回の励磁を行わずに初期駆動を終了するため、未終了の4回の励磁(U相通電→UV相通電→V相通電→VW相通電)を行ったものと仮定して、4回の励磁分の回転角度に相当するカウントアップ値(2×4=8)をUW相通電終了時のエンコーダカウント値に加算して初期位置ずれ学習値を求める。
【0043】
ところで、従来のレンジ切換制御では、指令シフトレンジ(目標位置)がPレンジからNotPレンジ又はその反対方向に切り換えられる毎に、ロータ32を回転駆動して、エンコーダカウント値に基づいてSRモータ12の通電相を順次切り換えることでロータ32を目標位置まで回転駆動するフィードバック制御(以下「F/B制御」と表記する)を実行した後に、SRモータ12への通電をオフするようにしている。
【0044】
この場合、F/B制御終了後に、目標位置に対応する相の巻線に通電し続ければ、ロータ32を目標位置で電磁力により保持し続けることができるが、この構成では、停止時間が長くなると、同じ相の巻線に連続して長い時間通電し続けることになるため、巻線が過熱して焼損するおそれがある。そのため、ロータ32の停止中は、巻線への通電をオフして巻線の過熱・焼損を防止するようにしている。
【0045】
しかし、ロータ32の停止中に、通電をオフすると、ロータ32を目標位置(F/B制御終了時の位置)に保持する電磁力が消滅するため、ロータ32の位置が目標位置からずれる可能性がある。本実施形態では、ロータ32を目標位置でディテントバネ23のバネ力により保持する機械的な停止保持機構を設けているが、この場合でも、停止保持機構のガタや製造ばらつき等によりロータ32の位置が目標位置からずれることがある。
【0046】
また、従来のレンジ切換制御では、F/B制御開始時に前回のF/B制御終了時のエンコーダカウント値を用いて最初の通電相を決定し、更に、最初の通電相決定後、直ちにF/B制御を開始するようにしている。
【0047】
よって、ロータ32の位置が停止中にずれた場合、従来のレンジ切換制御では、実際に最初に通電すべき通電相とは異なる通電相からF/B制御を開始してしまうことになる。このため、F/B制御開始時に脱調が発生して起動に失敗したり、ロータ32が目標位置とは反対方向に回転するなど、ロータ32を正常に目標位置へ回転させることができなくなる可能性がある。
【0048】
また、停止中のロータ32のずれ量が小さく、ロータ32の位置が前回のF/B制御終了時のエンコーダカウント値に相当する範囲内に収まっていた場合は、最初に通電すべき通電相は前回のF/B制御終了時の通電相となる。従って、この場合は、従来のレンジ切換制御でも、最初に通電すべき通電相に関しては問題ない。
【0049】
しかしながら、F/B制御は、通電時のロータ32の位置を基準にして行われるため、仮に、ロータ32の位置ずれがエンコーダカウント値に収まっていたとしても、最初の通電相に通電を行ってから、ロータ32の位置が通電時のロータ32の位置に移動・保持される前にF/B制御が開始されると、F/B制御開始時に脱調が発生して起動に失敗する可能性がある。
【0050】
この対策として、本実施形態では、図18に示すように、SRモータ12の通電オフ状態からF/B制御を開始するときに、現在のエンコーダカウント値に基づいて通電相を選択して通電する処理(以下「F/B制御開始位置停止保持処理」という)を所定時間(例えば10ms)だけ実行し、その後、F/B制御を実行してロータ32を目標位置まで回転駆動するようにしている。
【0051】
このようにすれば、仮に、ロータ32の停止中にロータ32の位置がずれても、F/B制御開始直前にF/B制御開始位置停止保持処理によってロータ32の位置ずれを修正して、F/B制御開始時のロータ32の位置を正確に位置決めすることができる。これにより、F/B制御開始時に最初の通電相からロータ32の位置と通電相(エンコーダカウント値)とを確実に同期させることができて、F/B制御開始時の脱調やロータ32が目標位置と反対方向に回転することを防止でき、安定したF/B制御を行ってロータ32を確実に目標位置まで回転させることができて、安定性・信頼性の高い位置切換制御(位置決め制御)を行うことができる。
【0052】
ところで、位置切換制御を高応答化するために、ロータ32の回転速度を高速化して目標位置までの到達時間を短くするようにしている。このため、ロータ32が目標位置に到達した直後は、ロータ32が完全に停止せずにまだ振動した状態になっており、このような状態で通電をオフすると、慣性力によりロータ32の停止位置が目標位置から大きくずれてしまう可能性がある。このようなF/B制御終了時のロータの位置ずれが大きくなりすぎると、次のF/B制御開始直前にF/B制御開始位置停止保持処理を行っても、ロータ32の位置ずれを修正することができなくなる可能性がある。
【0053】
この対策として、本実施形態では、F/B制御終了後に、ロータ32を当該F/B制御終了時の位置に停止保持するように通電相を選択して通電する処理(以下「目標位置停止保持処理」という)を所定時間(例えば50ms)だけ実行した後、SRモータ12への通電をオフするようにしている。このようにすれば、ロータ32が目標位置に到達した後、ロータ32の振動が収まってから通電をオフすることができるので、慣性力によりロータ32の停止位置が目標位置から大きくずれることを防止することができる。これにより、位置切換制御の安定性・信頼性を維持しながら、位置切換制御の高応答化の要求も満たすことができる。
【0054】
更に、本実施形態では、F/B制御中に指令シフトレンジ(目標位置)が変更されてロータ32の回転方向を反転させる必要が生じたときに、ロータ32を停止保持する通電相を選択して通電する処理(以下「反転位置停止保持処理」という)を所定時間(例えば50ms)だけ実行し、その後、F/B制御を再開してロータ32を変更後の目標位置まで回転駆動するようにしている。このようにすれば、F/B制御中に指令シフトレンジ(目標位置)が変更されたときに、ロータ32の反転位置を位置決めして反転動作を安定して行うことができ、反転位置がずれて脱調(通電相のずれ)が発生することを防止できて、ロータ32を変更後の目標位置まで確実に回転駆動することができる。
【0055】
また、本実施形態では、F/B制御中にエンコーダカウント値と目標位置に相当する目標カウント値との差が所定値(例えば通電相の位相進み分に相当するカウント値)以下になったときに、F/B制御を終了して目標位置停止保持処理に移行するようにしている。つまり、ロータ32を回転させるためには、図19に示すように、通電相の位相をロータ32の実際の位置よりも例えば2〜4カウント分(ロータ回転角で3.75°〜15°)だけ進める必要があるため、F/B制御中にエンコーダカウント値と目標カウント値との差が例えば通電相の位相進み分に相当するカウント値になったときに、F/B制御を終了するようにすれば、F/B制御の最後の通電相がロータ32を目標位置に停止保持する通電相と一致するため、目標位置停止保持処理移行後も、F/B制御の最後の通電相に引き続き通電することができ、F/B制御から目標位置停止保持処理への移行をスムーズに行うことができる。
【0056】
ところで、F/B制御中に、何等かの不可抗力でロータ32の回転方向が逆転すると、エンコーダカウント値の変化方向も逆転するため、そのエンコーダカウント値に基づいて決定される通電相の切換順序も逆転して、ロータ32を逆転方向に駆動するトルクが発生してしまう結果となる。そのため、ロータ32が、一旦、逆転し始めると、その逆転が抑制されずに助長されてしまう結果となり、逆転状態から再び正常な回転方向に復帰するまでに長い時間がかかって、ロータ32が目標位置に到達するのが著しく遅くなったり、最悪の場合、逆転を止めることができなくなって制御不能に陥るおそれがある。
【0057】
この対策として、本実施形態では、F/B制御中に、エンコーダカウント値の変化方向を監視してロータ32の回転方向が目標位置へ向かう回転方向から逆転したか否かを監視し、逆転が検出されたときに、ロータ32を逆転方向に駆動する通電相に通電することを禁止し、逆転直前の通電相に通電する。このように、逆転直前の通電相に通電すれば、ロータ32の逆転を抑制する方向に制動トルクを生じさせることができて、その制動トルクによって逆転を速やかに抑制することができ、逆転状態から正常な回転方向に速やかに復帰させることができる。
【0058】
以上説明したレンジ切換制御は、レンジ切換制御装置42のECU41によって後述する各ルーチンに従って実行される。以下、これら各ルーチンの処理内容を説明する。
【0059】
[初期駆動]
図8及び図9に示す初期駆動ルーチンに従って実行される。本ルーチンは、ECU41への電源投入直後(イグニッションスイッチをOFF位置からACC位置へ操作した直後)に、初期駆動が終了するまで所定周期(例えば1ms周期)で実行される。
【0060】
本ルーチンが起動されると、まずステップ101で、オープンループ制御実行フラグXopen=ON、又は、リカバリ処理実行フラグXrcv=ONであるか否かを判定する。ここで、オープンループ制御実行フラグXopenは、エンコーダ46又はSRモータ12が故障したときに実行されるオープンループ制御(フェイルセーフ処理)が実行されているか否かを判定するフラグであり、ONは実行されていることを意味する。また、リカバリ処理実行フラグXrcvは、一時的な動作異常が発生したときに一時的に実行されるリカバリ処理(オープンループ制御)が実行されているか否かを判定するフラグであり、ONは実行されていることを意味する。
【0061】
もし、上記ステップ101で、「Yes」と判定されれば、以降の処理を行うことなく、本ルーチンを終了し、「No」と判定されれば、ステップ102に進み、ECU41のイニシャル処理から出力軸センサ14の出力電圧が安定するまで待つための所定時間(例えば100ms)が経過したか否かを判定する。そして、イニシャル処理から所定時間経過した時点で、ステップ103に進み、出力軸センサ14の出力電圧を読み込んで、この出力電圧がレンジ判定値以下であるか否かで、現在のレンジがPレンジかNotPレンジかを判定し、Pレンジであれば、ステップ104に進み、レンジ判定フラグXnpをPレンジを意味する「0」にセットし、NotPレンジであれば、ステップ105に進み、レンジ判定フラグXnpをNotPレンジを意味する「1」にセットする。
【0062】
この後、ステップ106に進み、レンジ判定フラグXnp=0(Pレンジ)であるか否かを判定し、レンジ判定フラグXnp=0(Pレンジ)であれば、ステップ107に進み、図10のPレンジ初期駆動ルーチンを実行し、レンジ判定フラグXnp=1(NotPレンジ)であれば、ステップ108に進み、図11のNotPレンジ初期駆動ルーチンを実行する。
【0063】
上記ステップ107で、図10のPレンジ初期駆動ルーチンが起動されると、ステップ201〜206で、初期駆動中の励磁回数をカウントする励磁回数カウンタCASEが0〜5のいずれであるかを判定する。この励磁回数カウンタCASEは、イニシャル処理でセットされる初期値が0で、励磁を1回行う毎に1ずつカウントアップされる(図9のステップ114)。そして、励磁回数カウンタCASEの判定結果に応じて通電相と通電時間Tを次のように設定する。
【0064】
CASE=0(1回目の励磁)の場合は、ステップ207に進み、W相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=1(2回目の励磁)の場合は、ステップ208に進み、UW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0065】
CASE=2(3回目の励磁)の場合は、ステップ209に進み、U相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=3(4回目の励磁)の場合は、ステップ210に進み、UV相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0066】
CASE=4(5回目の励磁)の場合は、ステップ211に進み、V相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=5(6回目の励磁)の場合は、ステップ212に進み、VW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0067】
これにより、Pレンジで初期駆動を行う場合は、W相通電→UW相通電→U相通電→UV相通電→V相通電→VW相通電の順序で通電相の切り換えを一巡し、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に駆動する。この際、1相通電の時間T1を2相通電の時間T2よりも短く設定する。
【0068】
一方、ステップ108で、図11のNotPレンジ初期駆動ルーチンが起動されると、ステップ221〜226で、励磁回数カウンタCASEが0〜5のいずれであるかを判定し、その判定結果に応じて通電相と通電時間Tを次のように設定する。
【0069】
CASE=0(1回目の励磁)の場合は、ステップ227に進み、V相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=1(2回目の励磁)の場合は、ステップ228に進み、UV相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0070】
CASE=2(3回目の励磁)の場合は、ステップ229に進み、U相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=3(4回目の励磁)の場合は、ステップ230に進み、UW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0071】
CASE=4(5回目の励磁)の場合は、ステップ231に進み、W相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=5(6回目の励磁)の場合は、ステップ232に進み、VW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0072】
これにより、NotPレンジで初期駆動を行う場合は、V相通電→UV相通電→U相通電→UW相通電→W相通電→VW相通電の順序で通電相の切り換えを一巡し、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に駆動する。この場合も、1相通電の時間T1を2相通電の時間T2よりも短く設定する。
【0073】
以上のようにして、図10のPレンジ初期駆動ルーチン又は図11のNotPレンジ初期駆動ルーチンを実行した後、図8のステップ109に進み、初期駆動中にレンジ切換操作(Pレンジスイッチ43又はNotPレンジスイッチ44の操作)が行われたか否かを判定し、初期駆動中にレンジ切換操作が行われれば、ステップ110に進み、レンジ切換操作フラグXchgをONにセットし、レンジ切換操作が行われていなければ、ステップ111に進み、レンジ切換操作フラグXchgをOFFにセットする。
【0074】
この後、図9のステップ112に進み、現在の通電相の通電時間をカウントする通電時間カウンタCTをカウントアップし、次のステップ113で、現在の通電相の通電時間CTが前記図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えたか否かを判定し、越えていなければ、以降の処理を行うことなく、本ルーチンを終了する。これにより、現在の通電相の通電時間CTが図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えるまで、現在の通電相への通電が継続される。
【0075】
その後、現在の通電相の通電時間CTが図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えた時点で、ステップ114に進み、励磁回数カウンタCASEを1だけカウントアップし、通電相を次の通電相に切り換える。そして、次のステップ115で、通電時間カウンタCTをリセットした後、ステップ116に進み、励磁回数カウンタCASEが初期駆動の終了を意味する「6」に達したか否かを判定し、もし、励磁回数カウンタCASEが「6」に達していれば、ステップ118に進み、初期駆動終了フラグXendを初期駆動の終了を意味する「ON」にセットする。
【0076】
また、励磁回数カウンタCASEが「6」に達していない場合、つまり、初期駆動の途中である場合は、ステップ117に進み、初期駆動の途中終了条件が成立しているか否かを判定する。この初期駆動の途中終了条件は、次の3つの条件▲1▼〜▲3▼によって判定される。
▲1▼レンジ判定フラグXnpが0(Pレンジ)であること
▲2▼励磁回数カウンタCASEが2又は4、つまり2相通電終了時であること
▲3▼レンジ切換操作フラグXchgがON、つまり初期駆動中にレンジ切換操作が行われたこと
【0077】
これら3つの条件▲1▼〜▲3▼のうち、1つでも満たさない条件があれば、初期駆動の途中終了条件が成立せず、初期駆動を継続する。これに対し、3つの条件▲1▼〜▲3▼を全て満たしていれば、初期駆動の途中終了条件が成立して、ステップ118に進み、初期駆動終了フラグXendを初期駆動の終了を意味する「ON」にセットする。
【0078】
この後、ステップ119に進み、レンジ判定フラグXnp=1であるか否か(NotPレンジで初期駆動を行ったか否か)を判定し、レンジ判定フラグXnp=1であれば、ステップ120に進み、初期駆動終了時のエンコーダカウント値Ncntを初期位置ずれ学習値Gcntとして記憶する。そして、次のステップ121で、エンコーダカウント値Ncntを次式によりNotPレンジを基準にした値に補正する。
Ncnt=Ncnt+288
【0079】
本実施形態では、Pレンジの保持位置を0点位置としてエンコーダカウント値Ncntをカウントアップし、NotPレンジの保持位置までロータ32が回転したときに、エンコーダカウント値Ncntが例えば288となるようになっている。従って、NotPレンジで初期駆動を行った場合は、初期駆動終了時のエンコーダカウント値Ncntに288を加算することで、エンコーダカウント値NcntをNotPレンジを基準にした値に補正する。
【0080】
一方、上記ステップ119で、レンジ判定フラグXnp=0(Pレンジで初期駆動)と判定されれば、ステップ122に進み、初期駆動終了時のエンコーダカウント値Ncntを用いて初期位置ずれ学習値Gcntを次式により算出する。
Gcnt=Ncnt+2×(6−CASE)
【0081】
この場合、初期駆動が最後まで行われれば、ステップ114の処理によりCASE=6となるため、初期駆動終了時のエンコーダカウント値Ncntがそのまま初期位置ずれ学習値Gcntとなるが、Pレンジで初期駆動を行う場合は、初期駆動の途中でレンジ切換操作が行われたときに、次の2相通電(2相通電の実行中にレンジ切換要求が発生したときはその2相通電)が終了してから通常駆動に移行するため、その初期駆動を最後まで実行したと仮定して、本来の初期駆動終了時のエンコーダカウント値Ncntを推定し、その推定値を初期位置ずれ学習値Gcntとするようにしている。2×(6−CASE)は、未終了の励磁回数分の回転角度に相当するカウントアップ値(以下「Ncnt補正量」という)である。
【0082】
図14は、初期駆動時の励磁回数カウンタCASE、Ncnt補正量、通電相、A相信号、B相信号、エンコーダカウント値Ncntの関係を説明するタイムチャートである。例えば、初期駆動中に、UW相通電終了時(励磁回数カウンタCASEが1から2になったとき)に初期駆動を終了する場合は、Ncnt補正量=2×(6−CASE)=2×(6−2)=8となり、UV相通電終了時(励磁回数カウンタCASEが3から4になったとき)に初期駆動を終了する場合は、Ncnt補正量=2×(6−CASE)=2×(6−4)=4となる。
【0083】
[エンコーダカウンタ]
次に、図15に示すエンコーダカウンタルーチンの処理内容を説明する。本ルーチンは、AB相割り込み処理によりA相信号とB相信号の立ち上がり/立ち下がりの両方のエッジに同期して起動され、A相信号とB相信号の立ち上がり/立ち下がりの両方のエッジを次のようにしてカウントする。本ルーチンが起動されると、まずステップ301で、A相信号とB相信号の値A(i) 、B(i) を読み込み、次のステップ302で、図16のカウントアップ値ΔN算出マップを検索して、A相信号とB相信号の今回値A(i) 、B(i) と、前回値A(i−1) 、B(i−1) に応じたカウントアップ値ΔNを算出する。
【0084】
ここで、A相信号とB相信号の今回値A(i) 、B(i) と、前回値A(i−1) 、B(i−1) を用いる理由は、A相信号とB相信号の発生順序によってロータ32の回転方向を判定するためであり、図17に示すように、正回転(Pレンジ→NotPレンジの回転方向)ではカウントアップ値ΔNをプラス値にしてエンコーダカウント値Ncntをカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではカウントアップ値ΔNをマイナス値にしてエンコーダカウント値Ncntをカウントダウンする。
【0085】
カウントアップ値ΔNの算出後、ステップ303に進み、前回のエンコーダカウント値Ncntに上記ステップ302で算出したカウントアップ値ΔNを加算して、今回のエンコーダカウント値Ncntを求める。この後、ステップ304に進み、次回のカウント処理のために、A相信号とB相信号の今回値A(i) 、B(i) をそれぞれA(i−1) 、B(i−1) として記憶して本ルーチンを終了する。
【0086】
[制御モード設定]
図20乃至図22に示す制御モード設定ルーチンは、初期駆動終了後に所定周期(例えば1ms周期)で実行され、制御モード判定値modeを0、1、3、4、5のいずれかに設定して、下記のように制御モードを指定する。
mode=0:通電オフ(スタンバイ)
mode=1:通常駆動(F/B制御開始位置停止保持処理及びF/B制御)
mode=3:目標位置停止保持処理
mode=4:反転位置停止保持処理
mode=5:オープンループ制御
【0087】
制御モード設定ルーチンが起動されると、まずステップ401で、システム故障フラグXfailoffがレンジ切換制御装置42の故障を意味するONにセットされているか否かを判定し、もし、Xfailoff=ONに設定されていれば、ステップ402に進み、SRモータ12を通電オフ状態に維持するための処理を実行する。これにより、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、F/B許可フラグXfb=OFF(F/B制御禁止)、制御モード判定値mode=0(通電オフ)にセットする。
【0088】
一方、システム故障フラグXfailoffがOFF(故障無し)の場合は、ステップ401からステップ403に進み、オープンループ制御実行フラグXopen=OFF、且つ、リカバリ処理実行フラグXrcv=OFFであるか否かを判定する。もし、オープンループ制御実行フラグXopenとリカバリ処理実行フラグXrcvのいずれか一方又は両方がONにセットされている場合は、ステップ404に進み、オープンループ制御を実行するために、回転方向指示値D=0(停止)、制御モード判定値mode=5(オープンループ制御)、F/B許可フラグXfb=OFF(F/B制御禁止)にセットする。
【0089】
オープンループ制御実行フラグXopenとリカバリ処理実行フラグXrcvの両方がOFFにセットされている場合は、ステップ405に進み、通電フラグXon=ON(通電オン)にセットされているか否かを判定し、通電フラグXon=OFF(通電オフ)にセットされている場合は、ステップ406に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(目標位置とロータ32と位置との差)を求めて、この差(Acnt−Ncnt)に基づいて正回転(Pレンジ→NotPレンジ方向への回転)、逆回転(NotPレンジ→Pレンジ方向への回転)、停止のいずれに該当するか判定する。この際、エンコーダカウント値Ncntは、前記図8及び図9の初期駆動ルーチンで学習された初期位置ずれ学習値Gcntによって補正された値を用いる。
Ncnt=Ncnt−Gcnt
【0090】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が+Kth以上(例えば+10°以上)であれば、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に回転駆動する必要があると判断して、ステップ407に進み、回転方向指示値D=1(正回転)、通電フラグXon=ON(通電オン)、制御モード判定値mode=1(F/B制御開始位置停止保持処理及びF/B制御)にセットする。
【0091】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が−Kth以下(例えば−10°以下)であれば、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に回転駆動する必要があると判断して、ステップ409に進み、回転方向指示値D=−1(逆回転)、通電フラグXon=ON(通電オン)、制御モード判定値mode=1(F/B制御開始位置停止保持処理及びF/B制御)にセットする。
【0092】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が−Kthから+Kthの範囲内(例えば−10°から+10°の範囲内)であれば、ロータ32を目標位置にディテントバネ23のバネ力により保持することが可能である(SRモータ12への通電は不要)と判断して、ステップ408に進み、SRモータ12を通電オフ状態に維持するために、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、制御モード判定値mode=0(通電オフ)にセットする。
【0093】
一方、前記ステップ405で、通電フラグXon=ON(通電オン)にセットされていると判定された場合は、図21のステップ410〜415の処理によって、指令シフトレンジ(目標位置)が反転されたか否かを判定し、反転されていれば、回転方向指示値Dを反転させる。
【0094】
具体的には、まずステップ410で、回転方向指示値D=1(正回転)であるか否かを判定し、回転方向指示値D=1(正回転)であれば、ステップ411に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)がマイナス値であるか否かで、ロータ32の回転方向を正回転から逆回転に反転させる必要があるか否かを判定し、その必要があれば、ステップ412に進み、回転方向指示値D=−1(逆回転)にセットする。
【0095】
これに対して、上記ステップ410で、回転方向指示値Dが1(正回転)でないと判定された場合(つまりD=0又は−1の場合)は、ステップ413に進み、回転方向指示値D=−1(逆回転)であるか否かを判定し、回転方向指示値D=−1(逆回転)であれば、ステップ414に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)がプラス値であるか否かで、ロータ32の回転方向を逆回転から正回転に反転させる必要があるか否かを判定し、その必要があれば、ステップ415に進み、回転方向指示値D=1(正回転)にセットする。
【0096】
以上のようにして、回転方向指示値Dが反転された場合は、ステップ416に進み、ロータ32の回転方向を反転させるために、制御モード判定値mode=4(反転位置停止保持処理)、F/B許可フラグXfb=OFF(F/B制御禁止)にセットしてステップ417に進む。これに対し、回転方向指示値Dが反転されない場合は、上記ステップ416の処理を行わずにステップ417に進む。
【0097】
このステップ417では、制御モード判定値mode=4(反転位置停止保持処理)にセットされているか否かを判定し、「Yes」であれば、ステップ418に進み、通電フラグXon=ON(通電オン)にセットして、反転位置停止保持処理を実行する。
【0098】
これに対して、上記ステップ417で「No」と判定された場合(反転位置停止保持処理ではない場合)は、図22のステップ419〜421で、F/B制御の終了タイミングであるか否かを判定する。具体的には、まずステップ419で、回転方向指示値D≧0(正回転又は停止)であるか否かを判定し、回転方向指示値D≧0であれば、ステップ420に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が+Kref以下(例えば+0.5°以下)であるか否かで、F/B制御の終了タイミングであるか否かを判定する。また、回転方向指示値D=−1(逆回転)であれば、ステップ421に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が−Kref以上(例えば−0.5°以上)であるか否かで、F/B制御の終了タイミングであるか否かを判定する。
【0099】
つまり、F/B制御の終了判定値Krefを例えば通電相の位相進み分(例えば2〜4カウント分)に設定することで、目標カウント値Acntよりも通電相の位相進み分だけ前のタイミングでF/B制御を終了するようにしたものである。これにより、F/B制御の最後の通電相がロータ32を目標位置(目標カウント値Acnt)に停止保持する通電相と一致するようになる。
【0100】
上記ステップ420又は421で「No」と判定された場合(F/B制御の終了タイミングでない場合)は、ステップ422に進み、目標位置停止保持処理の時間をカウントする停止保持時間カウンタCTholdをリセットする。
【0101】
一方、上記ステップ420又は421で「Yes」と判定された場合(F/B制御の終了タイミングである場合)は、ステップ423に進み、F/B許可フラグXfb=OFF(F/B制御禁止)にセットし、F/B制御を終了して目標位置停止保持処理に移行する。そして、次のステップ424で、停止保持時間カウンタCTholdをカウントアップして、目標位置停止保持処理の時間をカウントする。
【0102】
この後、ステップ425に進み、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達したか否かを判定し、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達していなければ、ステップ426に進み、目標位置停止保持処理を続行するために、回転方向指示値D=0(停止)、通電フラグXon=ON(通電オン)、制御モード判定値mode=3(目標位置停止保持処理)に維持する。
【0103】
その後、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達した時点で、ステップ427に進み、SRモータ12の通電をオフするために、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、制御モード判定値mode=0(通電オフ)にセットする。
【0104】
[時間同期モータ制御]
図23に示す時間同期モータ制御ルーチンは、初期駆動終了後に所定周期(例えば1ms周期)で起動され、F/B制御開始位置停止保持処理、目標位置停止保持処理、反転位置停止保持処理を実行する。
【0105】
本ルーチンが起動されると、まずステップ501で、F/B許可フラグXfb=OFF(F/B制御禁止)であるか否かを判定し、F/B許可フラグXfb=ON(F/B制御実行)の場合は、以降の処理を行うことなく、本ルーチンを終了する。この場合は、後述する図29に示すF/B制御ルーチンによって通電相の設定と通電処理が実行される。
【0106】
これに対して、上記ステップ501で、F/B許可フラグXfb=OFF(F/B制御禁止)と判定された場合は、ステップ502〜504で、制御モード判定値mode=1,3,4のいずれかに該当するか否かを判定し、制御モード判定値mode=1(F/B制御開始位置停止保持処理及びF/B制御)の場合は、ステップ502からステップ505に進み、後述する図24に示すmode1ルーチンを実行して、F/B制御開始位置停止保持処理実行時の通電相を設定するための通電相判定値Mptnを算出する。
【0107】
また、制御モード判定値mode=3(目標位置停止保持処理)の場合は、ステップ503からステップ506に進み、後述する図25に示すmode3ルーチンを実行して、目標位置停止保持処理実行時の通電相を設定するための通電相判定値Mptnを算出する。
【0108】
また、制御モード判定値mode=4(反転位置停止保持処理)の場合は、ステップ504からステップ507に進み、後述する図26に示すmode4ルーチンを実行して、反転位置停止保持処理実行時の通電相を設定するための通電相判定値Mptnを算出する。
【0109】
以上のようにして、制御モード判定値mode=1,3,4の場合は、通電相判定値Mptnを算出した後、ステップ508に進み、後述する図27に示す通電処理ルーチンを実行して、F/B制御開始位置停止保持処理、目標位置停止保持処理、反転位置停止保持処理を実行する。
【0110】
一方、上記ステップ502〜504で、いずれも「No」と判定された場合、つまり、制御モード判定値mode=0,5の場合は、ステップ508に進み、後述する図27に示す通電処理ルーチンを実行して、通電オフ又はオープンループ制御を実行する。
【0111】
[mode1]
図24に示すmode1ルーチンは、図23の時間同期モータ制御ルーチンのステップ505で起動されるサブルーチンであり、F/B制御開始位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0112】
本ルーチンが起動されると、まずステップ511で、F/B制御開始位置停止保持処理の時間をカウントする通電時間カウンタCT1をカウントアップし、次のステップ512で、F/B制御開始位置停止保持処理の時間CT1が所定時間(例えば10ms)を越えたか否かを判定する。
【0113】
もし、F/B制御開始位置停止保持処理の時間CT1が所定時間(例えば10ms)を越えていなければ、ステップ513に進み、停止保持時通電相記憶済みフラグXhold=OFF(未記憶)であるか否か(つまりF/B制御開始位置停止保持処理の開始直前のタイミングであるか否か)を判定し、停止保持時通電相記憶済みフラグXhold=OFFであれば、ステップ514に進み、F/B制御開始位置停止保持処理時の通電相判定値Mptnを現在の位置カウンタ値(Ncnt−Gcnt)にセットする。
Mptn=Ncnt−Gcnt
【0114】
ここで、位置カウンタ値(Ncnt−Gcnt)は、エンコーダカウント値Ncntを初期位置ずれ学習値Gcntで補正した値であり、ロータ32の現在位置を正確に表した値となっている。
【0115】
この後、ステップ515に進み、通電相判定値Mptnを“12”で割り算して、その余りMptn%12を求める。ここで、“12”は、通電相を一巡させる間のエンコーダカウント値Ncnt(通電相判定値Mptn)の増減量に相当する。このMptn%12の値に基づいて、図28の変換テーブルによって通電相が決定される。
【0116】
そして、次のステップ516で、Mptn%12=2,3,6,7,10,11であるか否かによって1相通電(U相通電、V相通電、W相通電)であるか否かを判定し、1相通電であれば、ステップ517に進み、通電相判定値Mptnを1ステップ分に相当する“2”だけ増加して2相通電(UV相通電、VW相通電、UW相通電)に補正する。これにより、F/B制御開始位置停止保持処理を1相通電と比べて保持トルクの大きい2相通電で実行することで、ロータ32がF/B制御開始位置付近で振動することを防止して、ロータ32をF/B制御開始位置に確実に停止保持できるようにする。
【0117】
そして、次のステップ518で、停止保持時通電相記憶済みフラグXhold=ON(記憶済み)にセットして本ルーチンを終了する。この後、本ルーチンが起動されたときには、ステップ513で「No」と判定され、ステップ514〜518の処理が実行されない。これにより、F/B制御開始位置停止保持処理時の通電相判定値Mptn(通電相)を設定する処理は、F/B制御開始位置停止保持処理の開始直前に1回のみ実行される。
【0118】
その後、F/B制御開始位置停止保持処理の時間CT1が所定時間(例えば10ms)を越えた時点で、ステップ512で「Yes」と判定されて、F/B制御開始位置停止保持処理を終了し、F/B制御に移行する。これにより、最初に、ステップ519で、F/B制御開始位置停止保持処理時の通電相判定値Mptnに、回転方向に応じて通電相の位相進み分のカウント値(例えば4又は3)を加算又は減算してF/B制御開始時の最初の通電相判定値Mptnを設定し、それによって、ロータ32の回転駆動を開始する。この後、ステップ520に進み、F/B許可フラグXfb=ON(F/B制御実行)にセットする。
【0119】
図31はUW相から回転を開始する場合に最初に通電する相を説明するタイムチャートである。この場合、正回転(Pレンジ→NotPレンジ方向への回転)を開始する場合は、通電相判定値Mptnは、エンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、正回転方向位相進み量K1を用いて次式により算出される。
Mptn=Ncnt−Gcnt+K1
【0120】
ここで、正回転方向位相進み量K1を例えば4とすると、通電相判定値Mptnは、次式により算出される。
Mptn=Ncnt−Gcnt+4
UW相から正回転を開始する場合は、mod(Ncnt−Gcnt)は4となるため、Mptn%12=4+4=8となり、最初の通電相はUV相となる。
【0121】
一方、UW相から逆回転(NotPレンジ→Pレンジ方向への回転)を開始する場合は、逆回転方向位相進み量K2を例えば3とすると、通電相判定値Mptnは、次式により算出される。
Mptn=Ncnt−Gcnt−K2=Ncnt−Gcnt−3
UW相から逆回転を開始する場合は、Mptn%12=4−3=1となり、最初の通電相はVW相となる。
【0122】
このように、正回転方向位相進み量K1と逆回転方向位相進み量K2をそれぞれ4と3に設定することで、正回転方向と逆回転方向の通電相の切換パターンを対称にすることができ、正回転方向と逆回転方向のいずれの場合も、ロータ32の現在位置から2ステップ分ずらした位置の相を最初に励磁して回転を開始することができる。
【0123】
[mode3]
図25に示すmode3ルーチンは、図23の時間同期モータ制御ルーチンのステップ506で起動されるサブルーチンであり、目標位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0124】
本ルーチンが起動されると、まずステップ531で、F/B制御終了時のMptn%12=2,3,6,7,10,11であるか否かによってF/B制御終了時の通電相が1相通電(U相通電、V相通電、W相通電)であるか否かを判定し、1相通電であれば、ステップ532〜534の処理によって、それまで行っていたF/B制御の回転方向に応じて通電相判定値Mptnを2だけ増加又は減少させることで、当該1相通電の次のステップの2相通電に変更する。
【0125】
この際、ステップ532で、回転方向を次のようにして判定する。本ルーチンに入る直前(F/B制御終了時)に、図22のステップ426で、回転方向指示値Dが0(停止)にセットされるため、回転方向指示値Dを見ても回転方向を判定することができない。そこで、本ルーチンでは、F/B制御終了時の通電相判定値Mptnと位置カウント値(Ncnt−Gcnt)との間に、通電相の位相進み量K1,K2分の差があることに着目し、F/B制御終了時の通電相判定値Mptnと位置カウント値(Ncnt−Gcnt)との大小関係によって回転方向を次のように判定する。
【0126】
Mptn>Ncnt−Gcntの場合は、正回転(Pレンジ→NotPレンジの回転方向)と判定して、ステップ533に進み、通電相判定値Mptnを2だけ増加させることで、2相通電に補正する。
【0127】
一方、Mptn<Ncnt−Gcntの場合は、逆回転(NotPレンジ→Pレンジの回転方向)と判定して、ステップ534に進み、通電相判定値Mptnを2だけ減少させることで、2相通電に補正する。
尚、Mptn=Ncnt−Gcntの場合は、停止と判定して、通電相は変更しない。
【0128】
このように、目標位置停止保持処理についても、F/B制御開始位置停止保持処理と同じく、1相通電と比べて保持トルクの大きい2相通電で実行することで、ロータ32が目標位置付近で振動することを防止して、ロータ32を目標位置で確実に停止保持できるようにする。
【0129】
[mode4]
図26に示すmode4ルーチンは、図23の時間同期モータ制御ルーチンのステップ507で起動されるサブルーチンであり、反転位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0130】
本ルーチンが起動されると、まずステップ541で、反転位置停止保持処理の時間をカウントする通電時間カウンタCT4をカウントアップし、次のステップ542で、反転位置停止保持処理の時間CT4が所定時間(例えば50ms)を越えたか否かを判定する。
【0131】
もし、反転位置停止保持処理の時間CT4が所定時間(例えば50ms)を越えていなければ、ステップ543に進み、Mptn%12=2,3,6,7,10,11であるか否かによって現在の通電相が1相通電(U相通電、V相通電、W相通電)であるか否かを判定し、1相通電であれば、ステップ544〜546の処理によって、それまで行っていたF/B制御の回転方向に応じて通電相判定値Mptnを2だけ増加又は減少させることで、当該1相通電の次のステップの2相通電に変更する。このステップ543〜546の処理は、前記図25のmode3ルーチンのステップ531〜534の処理と同じである。
【0132】
このように、反転位置停止保持処理についても、F/B制御開始位置停止保持処理や目標位置停止保持処理と同じく、1相通電と比べて保持トルクの大きい2相通電で実行することで、ロータ32が反転位置付近で振動することを防止して、ロータ32を反転位置で確実に停止保持できるようにする。
【0133】
その後、反転位置停止保持処理の時間CT4が所定時間(例えば50ms)を越えた時点で、ステップ542で「Yes」と判定されて、反転位置停止保持処理を終了し、F/B制御を再開する。これにより、最初に、ステップ547で、反転位置停止保持処理時の通電相判定値Mptnに、回転方向に応じて通電相の位相進み分のカウント値(例えば4又は3)を加算又は減算してF/B制御再開時の最初の通電相判定値Mptnを設定し、それによって、ロータ32の回転駆動を開始する。この後、ステップ548に進み、F/B許可フラグXfb=ON(F/B制御実行)、通電時間カウンタCT4=0、制御モード判定値mode=1(通常駆動)にセットして本ルーチンを終了する。
【0134】
[通電処理]
図27に示す通電処理ルーチンは、図23の時間同期モータ制御ルーチンのステップ508で起動されるサブルーチンである。尚、本ルーチンは、後述する図29のF/B制御ルーチンのステップ603でも起動される。
【0135】
図27の通電処理ルーチンが起動されると、まずステップ551で、制御モード判定値mode=0(通電オフ)であるか否かを判定し、制御モード判定値mode=0(通電オフ)であれば、ステップ552に進み、SRモータ12の全相の通電をオフしてスタンバイ状態とする。
【0136】
一方、上記ステップ551で、「No」と判定されれば、ステップ553に進み、制御モード判定値mode=5(オープンループ制御)であるか否かを判定し、制御モード判定値mode=5(オープンループ制御)であれば、ステップ554に進み、オープンループ制御を実行する。このオープンループ制御は、エンコーダ46の故障又はSRモータ12の動作異常が発生したときに、例えば1ms周期の時間同期処理によって通電相を設定してロータ32を目標位置まで回転駆動する。
【0137】
また、上記ステップ551、553で、いずれも「No」と判定された場合、つまり、制御モード判定値mode=1,3,4(F/B制御開始位置停止保持処理、F/B制御、目標位置停止保持処理、反転位置停止保持処理)の場合は、ステップ555に進み、Mptn%12に応じて図28の変換テーブルによって通電相を設定し、その通電相の巻線33,34に通電する。
【0138】
[F/B制御]
次に、図29に示すF/B制御ルーチンの処理内容を説明する。本ルーチンは、AB相割り込み処理により実行され、初期駆動終了後にF/B制御実行条件が成立しているときに、ロータ32の回転位置(エンコーダカウント値Ncnt−Gcnt)が目標位置(目標カウント値Acnt)から例えば0.5°以内に到達するまで、エンコーダカウント値Ncntと初期位置ずれ学習値Gcntとに基づいて通電相を切り換えてロータ32を回転させる。
【0139】
図29のF/B制御ルーチンが起動されると、まずステップ601で、F/B許可フラグXfbがONにセットされているか否か(モータF/B制御実行条件が成立しているか否か)を判定し、F/B許可フラグXfbがOFF(F/B制御実行条件が不成立)であれば、以降の処理を行うことなく、本ルーチンを終了する。
【0140】
これに対し、F/B許可フラグXfbがONにセットされていれば、ステップ602に進み、後述する図30の通電相設定ルーチンを実行して、現在のエンコーダカウント値Ncntと初期位置ずれ学習値Gcntとに基づいて通電相を設定し、次のステップ603で、図27の通電処理ルーチンを実行する。
【0141】
[通電相設定]
図30に示す通電相設定ルーチンは、図29のF/B制御ルーチンのステップ602で起動されるサブルーチンである。本ルーチンが起動されると、まずステップ611で、目標位置への回転方向を指示する回転方向指示値Dが正回転(Pレンジ→NotPレンジの回転方向)を意味する「1」であるか否かを判定する。その結果、回転方向指示値D=1(正回転)と判定されれば、ステップ612に進み、ロータ32の回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが減少したか否か)を判定し、逆転していなければ、ステップ613に進み、現在のエンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、正回転方向位相進み量K1、速度補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt+K1+Ks
【0142】
ここで、正回転方向位相進み量K1は、ロータ32を正回転させるのに必要な通電相の位相進み量(ロータ32の現在位置に対する通電相の位相進み量)であり、例えばK1=4に設定されている。
【0143】
また、速度補正量Ksは、ロータ32の回転速度に応じて設定される位相進み補正量である。低速域では、速度補正量Ksが0に設定され、高速になるに従って、速度補正量Ksが例えば1又は2に増加される。これにより、ロータ32の回転速度に適した通電相となるように通電相判定値Mptnが補正される。
【0144】
一方、上記ステップ612で、ロータ32の回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。この場合は、逆転直前の通電相(前回の通電相)に通電され、ロータ32の逆転を抑制する方向に制動トルクが発生する。
【0145】
また、上記ステップ611で、回転方向指示値D=0(逆回転)、つまりNotPレンジ→Pレンジの回転方向と判定された場合は、ステップ614に進み、ロータ32の回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが増加したか否か)を判定し、逆転していなければ、ステップ615に進み、現在のエンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、逆回転方向位相進み量K2、速度補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt−K2−Ks
【0146】
ここで、逆回転方向位相進み量K2は、ロータ32を逆回転させるのに必要な通電相の位相進み量(ロータ32の現在位置に対する通電相の位相進み量)であり、例えばK2=3に設定されている。速度補正量Ksは正回転の場合と同じである。
【0147】
一方、上記ステップ614で、ロータ32の回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。この場合は、逆転直前の通電相(前回の通電相)に通電され、ロータ32の逆転を抑制する方向に制動トルクが発生する。
尚、ステップ611、612、614の処理が特許請求の範囲でいう逆転監視手段及び逆転防止手段としての役割を果たす。
【0148】
以上のようにして、今回の通電相判定値Mptnを決定した後、図27の通電処理ルーチンを実行し、F/B制御実行中は、ステップ555で、図28の変換テーブルを検索して、Mptn%12に対応する通電相を選択し、その通電相に通電する。
【0149】
以上説明した本実施形態によれば、F/B制御中に、エンコーダカウント値の変化方向を監視してロータ32の回転方向が回転方向指示(目標位置へ向かう回転方向の指示)に反して逆転したか否かを監視し、逆転が検出されたときに、ロータ32を逆転方向に駆動する通電相に通電することを禁止し、逆転直前の通電相に通電するようにしたので、逆転検出時にロータ32の逆転を抑制する方向に制動トルクを生じさせることができて、その制動トルクによって逆転を速やかに抑制することができ、逆転状態から正常な回転方向に速やかに復帰させることができ、安定したレンジ切換制御を行うことができる。
【0150】
尚、本実施形態では、逆転検出時にその逆転直前の通電相に通電するようにしたが、逆転検出時にいずれの相にも通電しない構成としても良く、この場合でも、逆転方向のトルクが発生することを未然に防止できるため、本発明の所期の目的を達成することができる。
【0151】
また、本実施形態では、F/B制御中に、1相通電と2相通電とを交互に切り換える1−2相励磁方式で駆動するようにしたが、1相通電のみで駆動する1相励磁方式、又は、2相通電のみで駆動する2相励磁方式を採用しても良い。
また、本実施形態では、磁気式のエンコーダ46を用いたが、例えば、光学式のエンコーダやブラシ式のエンコーダを用いても良い。
【0152】
また、本実施形態では、SRモータ12を用いたが、エンコーダの出力信号のカウント値に基づいてロータの回転位置を検出してモータの通電相を順次切り換えるブラシレス型のモータであれば、SRモータに限定されず、他の種類のブラシレス型のモータであっても良い。
【0153】
また、本実施形態のレンジ切換装置は、PレンジとNotPレンジの2つのレンジを切り換える構成であるが、例えば、ディテントレバー15の回動動作に連動して自動変速機のレンジ切換弁とマニュアルバルブを切り換えて、自動変速機のP、R、N、D、…の各レンジを切り換えるレンジ切換装置にも本発明を適用して実施できる。
【0154】
その他、本発明は、レンジ切換装置に限定されず、SRモータ等のブラシレス型のモータを駆動源とする各種の装置に適用して実施できることは言うまでもない。
【図面の簡単な説明】
【図1】本発明の一実施形態を示すレンジ切換装置の斜視図
【図2】SRモータの構成を説明する図
【図3】SRモータを駆動する回路構成を示す回路図
【図4】レンジ切換装置の制御システム全体の構成を概略的に示す図
【図5】エンコーダのロータリマグネットの構成を説明する平面図
【図6】エンコーダの側面図
【図7】(a)はエンコーダの出力波形を示すタイムチャート、(b)は通電相切り換えパターンを示すタイムチャート
【図8】初期駆動ルーチンの処理の流れを示すフローチャート(その1)
【図9】初期駆動ルーチンの処理の流れを示すフローチャート(その2)
【図10】Pレンジ初期駆動ルーチンの処理の流れを示すフローチャート
【図11】NotPレンジ初期駆動ルーチンの処理の流れを示すフローチャート
【図12】Pレンジで初期駆動を行ったときの制御例を示すタイムチャート
【図13】初期駆動中にレンジ切換操作されたときの制御例を示すタイムチャート
【図14】初期駆動中にレンジ切換操作されたときの初期位置ずれ学習方法を説明するタイムチャート
【図15】エンコーダカウンタルーチンの処理の流れを示すフローチャート
【図16】カウントアップ値ΔN算出マップの一例を示す図
【図17】指令レンジシフト、A相信号、B相信号、エンコーダカウント値の関係を示すタイムチャート
【図18】SRモータの制御例を示すタイムチャート
【図19】F/B制御から目標位置停止保持処理へ移行するタイミングを説明するタイムチャート
【図20】制御モード設定ルーチンの処理の流れを示すフローチャート(その1)
【図21】制御モード設定ルーチンの処理の流れを示すフローチャート(その2)
【図22】制御モード設定ルーチンの処理の流れを示すフローチャート(その3)
【図23】時間同期モータ制御ルーチンの処理の流れを示すフローチャート
【図24】mode1ルーチンの処理の流れを示すフローチャート
【図25】mode3ルーチンの処理の流れを示すフローチャート
【図26】mode4ルーチンの処理の流れを示すフローチャート
【図27】通電処理ルーチンの処理の流れを示すフローチャート
【図28】Mptn%12から通電相への変換テーブルの一例を示す図
【図29】F/B制御ルーチンの処理の流れを示すフローチャート
【図30】通電相設定ルーチンの処理の流れを示すフローチャート
【図31】UW相から回転を開始する時の通電処理を説明するタイムチャート
【符号の説明】
11…レンジ切換機構、12…SRモータ、14…出力軸センサ、15…ディテントレバー、18…パーキングロッド、20…パーキングギヤ、21…ロックレバー、23…ディテントバネ、24…Pレンジ保持凹部、25…NotPレンジ保持凹部、26…減速機構、27…自動変速機、31…ステータ、32…ロータ、33,34…巻線、35,36…モータ励磁部、37,38…モータドライバ、41…ECU(制御手段,逆転監視手段,逆転防止手段)、43…Pレンジスイッチ、44…NotPレンジスイッチ、46…エンコーダ、47…ロータリマグネット、48…A相信号用の磁気検出素子、49…B相信号用の磁気検出素子、50…Z相信号用の磁気検出素子。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a motor control device that rotates a rotor by sequentially switching the energized phase of a motor based on an output signal of an encoder (hereinafter, referred to as an “encoder count value”).
[0002]
[Prior art]
In recent years, brushless motors such as switch reluctance motors, which have been increasing in demand as simple and inexpensive motors, are equipped with an encoder that outputs a pulse signal in synchronization with the rotation of the rotor. And rotationally drives the rotor by sequentially detecting the rotational position of the rotor based on the encoder count value and sequentially switching the energized phases. Since such a motor with an encoder can detect the rotation position of the rotor based on the encoder count value after startup, the position switching control (rotation of the rotor to the target position by a feedback control system (closed loop control system)) is performed. It is used as a drive source for various position switching devices that perform positioning control).
[0003]
[Problems to be solved by the invention]
When performing position switching control using such a motor with an encoder, if the rotation direction of the rotor reverses due to some force majeure while rotating the rotor to the target position based on the encoder count value, the encoder count value will change. Since the direction is also reversed, the switching order of the energized phases determined based on the encoder count value is also reversed, resulting in the generation of torque for driving the rotor in the reverse direction. Therefore, once the rotor starts to reverse, the result is that the reverse rotation is promoted without being suppressed, and it takes a long time to return to the normal rotation direction again from the reverse rotation state, and the rotor moves to the target position. There is a danger that the arrival will be extremely slow or, in the worst case, it will not be possible to stop the reversal, leading to loss of control.
[0004]
The present invention has been made in view of such circumstances, and accordingly, the object is to reverse the rotation direction of the rotor due to some force majeure while driving the rotor to the target position based on the encoder count value. In this case, it is possible to prevent the occurrence of torque in the reverse rotation direction beforehand, shorten the time required to return to the normal rotation direction from the reverse rotation state, and achieve stable position switching control (positioning control). An object of the present invention is to provide a motor control device that can perform the control.
[0005]
[Means for Solving the Problems]
In order to achieve the above object, a motor control device according to a first aspect of the present invention is configured such that when the control unit rotates the rotor to the target position based on the encoder count value, the rotation direction of the encoder count value is changed by the reverse rotation monitoring unit. By monitoring whether the rotation direction of the rotor has been reversed from the rotation direction toward the target position, when the reverse rotation is detected, the reverse rotation prevention means prevents the energization phase driving the rotor from rotating in the reverse direction. It is forbidden. With this configuration, while the rotor is rotated to the target position based on the encoder count value, the rotation direction of the rotor is reversed by some force majeure, and even if the change direction of the encoder count value is reversed, Is generated in the reverse direction. As a result, the time required to return from the reverse rotation state to the normal rotation direction can be shortened, and stable position switching control (positioning control) can be performed.
[0006]
In this case, it is preferable to supply a current to the current-carrying phase immediately before the reverse rotation is detected when the reverse rotation is detected. In this way, if the energizing phase immediately before the reverse rotation is energized, a braking torque can be generated in the direction of suppressing the reverse rotation of the rotor, and the braking torque can enhance the reverse rotation suppressing effect. It is possible to quickly return to the rotation direction.
[0007]
However, the present invention may be configured such that no phase is energized when reverse rotation is detected. Even in this case, generation of torque in the reverse rotation direction can be prevented beforehand. The intended purpose can be achieved.
[0008]
Further, a switch reluctance motor may be used as the motor. Switched reluctance motors have the advantage that they are inexpensive and have high durability and reliability against temperature environments and the like because they do not require permanent magnets and have a simple structure.
[0009]
Further, as in claim 5, the encoder outputs an A-phase signal and a B-phase signal having a predetermined phase difference (generally a phase difference of 90 ° in electrical angle) in synchronization with the rotation of the rotor, During the rotation of the rotor, when the A-phase signal and the B-phase signal are counted and the encoder count value is updated, the rotation direction of the rotor is determined based on the generation order of the A-phase signal and the B-phase signal, and the rotation direction is determined. It is preferable that the encoder count value is counted up or down in accordance with the above, and the energized phase is selected and energized according to the encoder count value and the rotation direction of the rotor. With this configuration, even if the rotor rotates in either the forward rotation or the reverse rotation, the correspondence between the encoder count value and the rotation position of the rotor can be maintained. , The correct energized phase can be selected based on the encoder count value.
[0010]
The invention according to claims 1 to 5 described above can be applied to various position switching devices using a brushless type motor such as a switch reluctance motor as a drive source. The present invention may be applied to a motor control device that drives a range switching mechanism that switches the range of the machine. Thus, a highly reliable motor-driven range switching device can be configured.
[0011]
BEST MODE FOR CARRYING OUT THE INVENTION
An embodiment in which the present invention is applied to a range switching device for a vehicle will be described below with reference to the drawings.
[0012]
First, the configuration of the range switching mechanism 11 will be described with reference to FIG. The motor 12 serving as a drive source of the range switching mechanism 11 is constituted by, for example, a switch reluctance motor, has a built-in speed reduction mechanism 26 (see FIG. 4), and is provided with an output shaft sensor 14 for detecting the rotational position of the output shaft 13. Have been. A detent lever 15 is fixed to the output shaft 13.
[0013]
An L-shaped parking rod 18 is fixed to the detent lever 15, and a conical body 19 provided at the tip of the parking rod 18 is in contact with the lock lever 21. The lock lever 21 moves up and down about the shaft 22 in accordance with the position of the cone 19 to lock / unlock the parking gear 20. The parking gear 20 is provided on the output shaft of the automatic transmission 27. When the parking gear 20 is locked by the lock lever 21, the driving wheels of the vehicle are held in a state where they are prevented from rotating (parking state).
[0014]
On the other hand, a detent spring 23 for holding the detent lever 15 in a parking range (hereinafter referred to as “P range”) and another range (hereinafter referred to as “NotP range”) is fixed to the support base 17. When the engaging portion 23a provided at the tip of the spring 23 is fitted into the P range holding concave portion 24 of the detent lever 15, the detent lever 15 is held at the position of the P range. The detent lever 15 is held at the position of the NotP range when 23a is fitted into the NotP range holding recess 25 of the detent lever 15.
[0015]
In the P range, the parking rod 18 moves in a direction approaching the lock lever 21, and the thick portion of the cone 19 pushes up the lock lever 21, and the projection 21 a of the lock lever 21 fits into the parking gear 20 to park. The gear 20 is locked, whereby the output shaft (drive wheel) of the automatic transmission 27 is maintained in a locked state (parking state).
[0016]
On the other hand, in the NotP range, the parking rod 18 moves in a direction away from the lock lever 21, the thick portion of the cone 19 comes out of the lock lever 21, and the lock lever 21 descends. 21a is disengaged from the parking gear 20, the lock of the parking gear 20 is released, and the output shaft of the automatic transmission 27 is maintained in a rotatable state (runnable state).
[0017]
The output shaft sensor 14 described above is constituted by a rotation sensor (for example, a potentiometer) that outputs a voltage corresponding to the rotation angle of the output shaft 13 of the speed reduction mechanism 26 of the motor 12, and the current range is set to the P range by the output voltage. And the NotP range.
[0018]
Next, the configuration of the motor 12 will be described with reference to FIG. In the present embodiment, a switched reluctance motor (hereinafter referred to as “SR motor”) is used as the motor 12. The SR motor 12 is a motor in which both the stator 31 and the rotor 32 have a salient pole structure, and has an advantage that a permanent magnet is not required and the structure is simple. For example, twelve salient poles 31a are formed at equal intervals on the inner peripheral portion of the cylindrical stator 31, whereas, for example, eight salient poles 32a are formed at equal intervals on the outer peripheral portion of the rotor 32. The respective salient poles 32a of the rotor 32 are sequentially opposed to the respective salient poles 31a of the stator 31 via a minute gap with the rotation of the rotor 32. The twelve salient poles 31a of the stator 31 have a total of six windings 33 of U-phase, V-phase, and W-phase, and a total of six windings 34 of U'-, V'-, and W'-phases. It is wound in order. It goes without saying that the number of salient poles 31a and 32a of the stator 31 and the rotor 32 may be changed as appropriate.
[0019]
The winding order of the windings 33 and 34 in the present embodiment is, for example, V phase → W phase → U phase → V phase → W phase → U phase → V ′ for the twelve salient poles 31a of the stator 31. The phases are wound in the order of phase → W ′ phase → U ′ phase → V ′ phase → W ′ phase → U ′ phase. As shown in FIG. 3, a total of six windings 33 of U-phase, V-phase and W-phase and a total of six windings 34 of U′-phase, V′-phase and W′-phase are two-system motors. They are connected so as to form the excitation units 35 and 36. One motor excitation unit 35 is configured by connecting a total of six windings 33 of U-phase, V-phase, and W-phase in a Y-connection (two windings 33 of the same phase are connected in series). The other motor excitation unit 36 is configured by connecting a total of six windings 34 of U ′ phase, V ′ phase, and W ′ phase in a Y connection (two windings 34 of the same phase are connected in series, respectively). It is connected to the). In the two motor excitation units 35 and 36, the U phase and the U 'phase are simultaneously energized, the V phase and the V' phase are simultaneously energized, and the W phase and the W 'phase are simultaneously energized.
[0020]
These two motor excitation units 35 are driven by separate motor drivers 37 and 38 using a battery 40 mounted on the vehicle as a power supply. In this way, by providing the motor excitation units 35 and 36 and the motor drivers 37 and 38 each in two systems, even if one system fails, the SR motor 12 can be rotated in the other system. ing. The circuit configuration example of the motor drivers 37 and 38 shown in FIG. 3 has a unipolar drive circuit configuration in which one switching element 39 such as a transistor is provided for each phase, but two switching elements are provided for each phase. Alternatively, a circuit configuration of a bipolar drive system provided for each may be adopted. It is needless to say that the present invention may be configured such that one system is provided for each of the motor excitation unit and the motor driver.
[0021]
ON / OFF of each switching element 39 of each motor driver 37, 38 is controlled by the ECU 41 (control means). As shown in FIG. 4, the ECU 41 and the motor drivers 37 and 38 are mounted on a range switching control device 42. The range switching control device 42 includes a P range switch 43 for performing a switching operation to a P range, An operation signal of a NotP range switch 44 for performing a switching operation to the NotP range is input. The range selected by operating the P range switch 43 or the NotP range switch 44 is displayed on a range display section 45 provided on an instrument panel (not shown).
[0022]
The SR motor 12 is provided with an encoder 46 for detecting the rotational position of the rotor 32. The encoder 46 is constituted by, for example, a magnetic rotary encoder. As shown in FIGS. 5 and 6, the specific configuration of the encoder 46 is such that north poles and south poles are alternately arranged at equal pitches in the circumferential direction. A magnetized annular rotary magnet 47 is coaxially fixed to the side surface of the rotor 32, and three magnetic detecting elements 48, 49, 50 such as Hall ICs are arranged at positions facing the rotary magnet 47. It has a configuration. In the present embodiment, the magnetization pitch between the N pole and the S pole of the rotary magnet 47 is set to 7.5 °. The magnetization pitch (7.5 °) of the rotary magnet 47 is set to be the same as the rotation angle of the rotor 32 per excitation of the SR motor 12. As will be described later, when the energized phase of the SR motor 12 is switched six times by the 1-2-phase excitation method, all energized phases are switched once, and the rotor 32 and the rotary magnet 47 are integrally 7.5 °. × 6 = 45 ° rotation. The number of N poles and S poles present in the rotation angle range of 45 ° of the rotary magnet 47 is a total of six poles.
[0023]
Further, the N pole (N ') at the position corresponding to the reference rotation position of the rotor 32 and the S poles (S') on both sides thereof are formed so as to be wider in the radial direction than the other magnetic poles. In the present embodiment, considering that the rotor 32 and the rotary magnet 47 rotate integrally by 45 ° during one cycle of the switching of the energized phase of the SR motor 12, a wide width corresponding to the reference rotation position of the rotor 32 is taken into consideration. The large magnetized portions (N ′) are formed at a 45 ° pitch, so that a total of eight wide magnetized portions (N ′) corresponding to the reference rotation position are formed as the rotary magnet 47 as a whole. The wide magnetized portion (N ′) corresponding to the reference rotation position may be configured such that only one magnet is formed as the whole rotary magnet 47.
[0024]
Three magnetic detecting elements 48, 49, 50 are arranged with respect to the rotary magnet 47 in the following positional relationship. The magnetic detecting element 48 that outputs the A-phase signal and the magnetic detecting element 49 that outputs the B-phase signal are composed of a narrow magnetized portion (N, S) and a wide magnetized portion (N ′, S ′) of the rotary magnet 47. ) Are arranged on the same circumference at positions that can face both. On the other hand, the magnetic detection element 50 that outputs the Z-phase signal is located at a position radially outside or inside the narrow magnetized portion (N, S) of the rotary magnet 47 and has a wide magnetized portion (N ′). , S ′) only. As shown in FIG. 7, the interval between the two magnetic detecting elements 48 and 49 for outputting the A-phase signal and the B-phase signal is such that the phase difference between the A-phase signal and the B-phase signal is 90 ° in electrical angle (mechanical angle). 3.75 °). Here, “electric angle” is an angle when the generation period of the A / B phase signal is one cycle (360 °), and “mechanical angle” is a mechanical angle (one rotation of the rotor 32 is 360 °). The angle at which the rotor 32 rotates from the fall (rise) of the A-phase signal to the fall (rise) of the B-phase signal corresponds to the mechanical angle of the phase difference between the A-phase signal and the B-phase signal. I do. The magnetic detection element 50 that outputs the Z-phase signal is arranged so that the phase difference between the Z-phase signal and the B-phase signal (or the A-phase signal) becomes zero.
[0025]
The output of each of the magnetic detection elements 48, 49, and 50 becomes a high level "1" when facing the N pole (N 'pole), and becomes a low level "0" when facing the S pole (S' pole). Become. The output of the magnetic detection element 50 for the Z-phase signal becomes high level "1" every time it faces the wide N 'pole corresponding to the reference rotation position of the rotor 32. At other positions, the output becomes low level "1". 0 ".
[0026]
In the present embodiment, the ECU 41 counts both rising and falling edges of the A-phase signal and the B-phase signal by an encoder counter routine described later, and switches the energized phase of the SR motor 12 according to the encoder count value. Drives the rotor 32 to rotate. At this time, the rotation direction of the rotor 32 is determined based on the generation order of the A-phase signal and the B-phase signal, and the encoder count value is counted up in the forward rotation (P direction → NotP range rotation direction), and the reverse rotation (NotP range → In the (P-range rotation direction), the encoder count value is counted down. Accordingly, even if the rotor 32 rotates in either the forward direction or the reverse direction, the correspondence between the encoder count value and the rotational position of the rotor 32 is maintained. However, the rotation position (rotation angle) of the rotor 32 is detected based on the encoder count value, and the windings 33 and 34 of the phase corresponding to the rotation position are energized to drive the rotor 32 to rotate.
[0027]
FIG. 7 shows an output waveform of the encoder 46 and a switching pattern of the energized phase when the rotor 32 is rotated in the reverse rotation direction (the rotation direction from the NotP range to the P range). In both the reverse rotation direction (the rotation direction from the NotP range to the P range) and the normal rotation direction (the rotation direction from the P range to the NotP range), one phase energization and two phases are performed every time the rotor 32 rotates 7.5 °. The energization and the energization are alternately switched, and during the rotation of the rotor 32 by 45 °, for example, in the order of U-phase energization → UW-phase energization → W-phase energization → VW-phase energization → V-phase energization → UV-phase energization The switching of the energized phase is performed once. Each time the energized phase is switched, the rotor 32 rotates by 7.5 ° so that the magnetic pole of the rotary magnet 47 facing the magnetic detection elements 48 and 49 for the A-phase and B-phase signals changes from N pole to S pole. (N ′ pole → S ′ pole) or S pole → N pole (S ′ pole → N ′ pole), and the levels of the A-phase signal and the B-phase signal are alternately inverted. The encoder count value is incremented (or decremented) by 2 for every .5 ° rotation. Each time the switching of the energized phase completes one cycle and the rotor 32 rotates 45 °, the magnetic detection element 50 for the Z phase faces the wide N ′ pole corresponding to the reference rotation position of the rotor 32, and The signal becomes high level "1". In this specification, the fact that the A-phase, B-phase, and Z-phase signals are at the high level “1” may be referred to as the output of the A-phase, B-phase, and Z-phase signals.
[0028]
By the way, since the encoder count value is stored in the RAM of the ECU 41, when the power of the ECU 41 is turned off, the storage of the encoder count value disappears. Therefore, the encoder count value (0) immediately after the power supply of the ECU 41 is turned on does not correspond to the actual rotational position (energized phase) of the rotor 32. Therefore, in order to switch the energized phase according to the encoder count value, it is necessary to make the encoder count value correspond to the actual rotational position of the rotor 32 after power-on, and to make the encoder count value correspond to the energized phase.
[0029]
Therefore, in the present embodiment, the initial drive routine shown in FIGS. 8 and 9 to be described later is executed by the ECU 41 of the range switching control device 42, so that the initial phase of the SR motor 12 is turned on when the ECU 41 is powered on. Is cycled in a predetermined time schedule to count the edges of the A-phase signal and the B-phase signal of the encoder 46, and learn the correspondence between the encoder count value at the end of the initial drive, the rotational position of the rotor 32, and the energized phase. Then, during the subsequent normal driving, the energized phase is determined based on the encoder count value and the learning result at the end of the initial driving.
[0030]
The learning at the time of the initial drive is specifically performed as follows. As shown in FIG. 12, when the initial drive is performed when the power is supplied to the ECU 41 in the P range, for example, W-phase energization → UW-phase energization → U-phase energization → UV-phase energization → V-phase energization → VW-phase The energization phase is switched in a predetermined time schedule in the energization order, and the rotor 32 is driven in the normal rotation direction (P range → Not P range rotation direction).
[0031]
On the other hand, when the initial drive is performed when the power is supplied to the ECU 41 in the NotP range, for example, energization is performed in the order of V-phase energization → UV-phase energization → U-phase energization → UW-phase energization → W-phase energization → VW-phase energization. The phase switching is performed once in a predetermined time schedule, and the rotor 32 is driven in the reverse rotation direction (the rotation direction from the NotP range to the P range).
[0032]
During this initial drive, the one-phase energization time T1 is set shorter than the two-phase energization time T2, for example, T1 = 10 ms and T2 = 100 ms. Even after the rotational position of the rotor 32 and the energized phase are synchronized during the initial drive, the rotor 32 vibrates in the one-phase energization with a small torque, so the time T1 of the one-phase energization is shortened, and as soon as possible. By switching to the next two-phase energization, the vibration of the rotor 32 is stopped immediately and the output signal of the encoder 46 is stabilized.
[0033]
As described above, if the switching of the energized phase is performed once during the initial drive, the rotational position of the rotor 32 and the energized phase always match in any energized phase before the end of the initial drive. The rotor 32 rotates in synchronization with the phase switching, and the A-phase signal and the B-phase signal are output from the encoder 46 in synchronization with the rotation of the rotor 32.
[0034]
During this initial drive, both rising and falling edges of the A-phase signal and the B-phase signal of the encoder 46 are counted. Therefore, by looking at the encoder count value at the end of the initial drive, the angle (rotation amount) at which the rotor 32 actually rotates in synchronization with the switching of the energized phase before the end of the initial drive can be determined. The relationship between the encoder count value at the time, the rotational position of the rotor 32, and the energized phase can be understood.
[0035]
In the example of FIG. 12, the rotor 32 rotates from the first energized phase (W phase) during the initial drive, and the rotor 32 rotates by 7.5 ° every time the energized phase is switched, and the encoder count value is incremented by two. At the end of the initial drive, the encoder count value becomes 12.
[0036]
On the other hand, for example, if the rotor 32 does not rotate in the first three excitations (W-phase energization → UW-phase energization → U-phase energization), that is, the fourth and subsequent excitations (UV-phase energization → V-phase energization → VW-phase) In the case where the rotation position of the rotor 32 and the energized phase are synchronized with each other in the energized state and the rotor 32 rotates by three times of excitation, the rotor 32 is 7.5 ° × 3 = 22.5 ° by the end of the initial drive. It rotates and the encoder count value becomes 2 × 3 = 6. Therefore, by looking at the encoder count value at the end of the initial drive, the angle (rotation amount) at which the rotor 32 actually rotates in synchronization with the switching of the energized phase before the end of the initial drive is determined.
[0037]
Although the last energized phase of the initial drive is always the VW phase, the encoder count value is not always 12 and may be, for example, 8 or 4. At the time of normal drive after the end of the initial drive, the energized phase is determined based on the encoder count value. Therefore, unless the deviation of the encoder count value due to the initial drive is corrected, the correct energized phase cannot be selected at the time of normal drive.
[0038]
Therefore, in the present embodiment, the encoder count value at the end of the initial drive is learned as the initial position deviation learning value, and the encoder count value at the time of the subsequent normal drive is corrected with the initial position deviation learning value. The deviation between the encoder count value and the energized phase (the rotational position of the rotor 32) is corrected so that the correct energized phase can be selected during normal driving.
[0039]
After the end of the initial drive, as shown in FIG. 12, the F / B control start position stop holding process described later energizes the same phase as the energized phase (VW phase) at the end of the initial drive, for example, for 10 ms, and the position of the rotor 32 becomes Is held at the position at the end of the initial driving, and thereafter, the energized phase is determined by feedback control (hereinafter referred to as “F / B control”) described later based on the encoder count value at that time and the initial position deviation learning value. By switching, the rotor 32 is rotated in the direction of the target position Acnt. Thus, when the rotational position (encoder count value) of the rotor 32 reaches, for example, within 0.5 ° from the target position Acnt, the switching of the energized phase is completed and the rotor 32 is stopped. In the position stop holding process, the same phase is continuously energized to hold the stopped state of the rotor 32, and this held state is continued for, for example, 50 ms. Thereafter, if the target position Acnt does not change, the energization is stopped.
[0040]
When the P range switch 43 or the NotP range switch 44 is operated to generate a range switching request during the initial drive, the next two-phase energization (when the range switching request occurs during the execution of the two-phase energization) is performed. After the completion of the two-phase energization, the operation shifts to the normal drive, and the correspondence between the encoder count value at the end of the two-phase energization, the rotational position of the rotor 32, and the energized phase is learned. The energized phase is determined based on the encoder count value and the learning result at the end of the two-phase energization.
[0041]
In the two-phase energization, since the torque is large, even if the position of the rotor 32 is slightly shifted from the position corresponding to the two-phase energization, the rotor 32 can be rotated to the position corresponding to the two-phase energization. Therefore, it is considered that there is a high probability that the rotation position of the rotor 32 and the energized phase can be synchronized only by performing the two-phase energization once or twice during the initial driving. Therefore, when a range switching request is generated during the initial drive, the normal two-phase energization (or the current two-phase energization) is terminated before the normal drive is started. After learning the correspondence between the count value, the rotational position of the rotor 32, and the energized phase, it is possible to quickly shift to the normal drive.
[0042]
For example, as shown in the time chart of FIG. 13, when a range switching request from the P range to the NotP range occurs during the second excitation (UW phase energization) of the initial drive, the initial drive is performed by the UW phase energization. At the same time, the process is shifted to the normal drive, and the correspondence between the encoder count value at the end of the UW phase energization, the rotational position of the rotor 32, and the energized phase is learned. In the present embodiment, even when shifting to the normal drive in the middle of the initial drive, the encoder count value at the end of the original initial drive is estimated assuming that the initial drive has been executed to the end, and the estimated value is initialized. The position deviation learning value is set. For example, as shown in FIG. 13, when the initial drive is ended by two excitations of the W-phase energization and the UW-phase energization, the initial drive is ended without performing the four scheduled excitations thereafter. Assuming that four unexcited excitations (U-phase energization → UV-phase energization → V-phase energization → VW-phase energization) have been performed, the count-up value (2) corresponding to the rotation angle for the four excitations × 4 = 8) is added to the encoder count value at the end of the UW-phase energization to obtain an initial position deviation learning value.
[0043]
By the way, in the conventional range switching control, the rotor 32 is driven to rotate every time the command shift range (target position) is switched from the P range to the NotP range or the opposite direction, and the SR motor 12 is driven based on the encoder count value. After the feedback control (hereinafter referred to as “F / B control”) for rotating and driving the rotor 32 to the target position by sequentially switching the energized phases is performed, the energization to the SR motor 12 is turned off.
[0044]
In this case, after the end of F / B control, if the winding of the phase corresponding to the target position is continuously energized, the rotor 32 can be kept at the target position by the electromagnetic force, but in this configuration, the stop time is long. When this happens, the windings of the same phase are continuously energized for a long time, and the windings may be overheated and burnt out. Therefore, while the rotor 32 is stopped, the power supply to the winding is turned off to prevent overheating and burning of the winding.
[0045]
However, if the power is turned off while the rotor 32 is stopped, the electromagnetic force that holds the rotor 32 at the target position (the position at the end of the F / B control) disappears, and the position of the rotor 32 may deviate from the target position. There is. In the present embodiment, a mechanical stop / hold mechanism that holds the rotor 32 at the target position by the spring force of the detent spring 23 is provided. However, even in this case, the position of the rotor 32 is reduced due to play of the stop / hold mechanism and manufacturing variations. May deviate from the target position.
[0046]
In the conventional range switching control, the first energized phase is determined at the start of the F / B control using the encoder count value at the end of the previous F / B control, and the F / B control is immediately performed after the first energized phase is determined. B control is started.
[0047]
Therefore, when the position of the rotor 32 shifts during the stop, in the conventional range switching control, the F / B control is started from an energized phase different from the energized phase to be actually energized first. For this reason, step-out may occur at the start of the F / B control, and the startup may fail, or the rotor 32 may not be able to rotate normally to the target position, for example, the rotor 32 may rotate in the direction opposite to the target position. There is.
[0048]
If the displacement of the stopped rotor 32 is small and the position of the rotor 32 is within the range corresponding to the encoder count value at the end of the previous F / B control, the energized phase to be energized first is This is the energized phase at the end of the previous F / B control. Therefore, in this case, even with the conventional range switching control, there is no problem with the energized phase to be energized first.
[0049]
However, since the F / B control is performed based on the position of the rotor 32 at the time of energization, even if the displacement of the rotor 32 is within the encoder count value, the first energized phase is energized. Therefore, if the F / B control is started before the position of the rotor 32 is moved and held at the position of the rotor 32 at the time of energization, a step-out may occur at the start of the F / B control and the startup may fail. There is.
[0050]
As a countermeasure against this, in the present embodiment, as shown in FIG. 18, when the F / B control is started from the energization OFF state of the SR motor 12, the energized phase is selected and energized based on the current encoder count value. A process (hereinafter, referred to as “F / B control start position stop holding process”) is executed for a predetermined time (for example, 10 ms), and thereafter, the F / B control is executed to rotationally drive the rotor 32 to the target position. .
[0051]
With this configuration, even if the position of the rotor 32 shifts while the rotor 32 is stopped, the position shift of the rotor 32 is corrected by the F / B control start position stop holding process immediately before the start of the F / B control. The position of the rotor 32 at the start of the F / B control can be accurately positioned. Thereby, the position of the rotor 32 and the energized phase (encoder count value) can be reliably synchronized from the first energized phase at the start of the F / B control, and the step-out at the start of the F / B control and the rotor 32 Rotation in the opposite direction to the target position can be prevented, stable F / B control can be performed, and the rotor 32 can be surely rotated to the target position, resulting in highly stable and reliable position switching control (positioning control). )It can be performed.
[0052]
By the way, in order to increase the response of the position switching control, the rotation speed of the rotor 32 is increased to shorten the time to reach the target position. For this reason, immediately after the rotor 32 reaches the target position, the rotor 32 is still in a state of vibrating without stopping completely, and when the power is turned off in such a state, the stopping position of the rotor 32 due to inertia force. May greatly deviate from the target position. If the displacement of the rotor at the end of the F / B control becomes too large, the displacement of the rotor 32 is corrected even if the F / B control start position stop holding processing is performed immediately before the start of the next F / B control. May be unable to do so.
[0053]
As a countermeasure against this, in the present embodiment, after the F / B control is completed, the energizing phase is selected and energized so that the rotor 32 is stopped and held at the position at the end of the F / B control (hereinafter referred to as “target position stop holding”). Process) is executed for a predetermined time (for example, 50 ms), and then the power supply to the SR motor 12 is turned off. With this configuration, after the rotor 32 reaches the target position, the power can be turned off after the vibration of the rotor 32 stops, so that the inertia force prevents the stop position of the rotor 32 from largely deviating from the target position. can do. This makes it possible to satisfy the demand for higher response of the position switching control while maintaining the stability and reliability of the position switching control.
[0054]
Further, in the present embodiment, when the command shift range (target position) is changed during the F / B control and the rotation direction of the rotor 32 needs to be reversed, an energized phase for stopping and holding the rotor 32 is selected. (Hereinafter referred to as “reversal position stop holding processing”) for a predetermined time (for example, 50 ms), and then, F / B control is restarted to rotate the rotor 32 to the changed target position. ing. With this configuration, when the command shift range (target position) is changed during the F / B control, the reversing position of the rotor 32 can be positioned to perform the reversing operation stably, and the reversing position is shifted. As a result, it is possible to prevent the step-out (shift of the energized phase) from occurring, and it is possible to reliably drive the rotor 32 to the changed target position.
[0055]
Further, in the present embodiment, when the difference between the encoder count value and the target count value corresponding to the target position during the F / B control becomes equal to or smaller than a predetermined value (for example, a count value corresponding to the phase advance of the energized phase). Then, the F / B control is ended and the process shifts to the target position stop holding process. That is, in order to rotate the rotor 32, as shown in FIG. 19, the phase of the energized phase is, for example, 2 to 4 counts from the actual position of the rotor 32 (the rotor rotation angle is 3.75 ° to 15 °). The F / B control is terminated when the difference between the encoder count value and the target count value during the F / B control becomes a count value corresponding to, for example, the phase advance of the energized phase. In this case, since the last energized phase of the F / B control matches the energized phase for stopping and holding the rotor 32 at the target position, even after the shift to the target position stop holding processing, the last energized phase of the F / B control is continued. Electricity can be supplied, and the transition from F / B control to target position stop holding processing can be performed smoothly.
[0056]
By the way, if the rotation direction of the rotor 32 reverses due to some force majeure during the F / B control, the change direction of the encoder count value also reverses. Therefore, the switching order of the energized phase determined based on the encoder count value also changes. The reverse rotation results in the generation of torque for driving the rotor 32 in the reverse rotation direction. Therefore, once the rotor 32 starts reverse rotation, the reverse rotation is promoted without being suppressed, and it takes a long time to return to the normal rotation direction again from the reverse rotation state, and the rotor 32 There is a risk that reaching the position will be extremely slow, or in the worst case, the reversal will not be able to be stopped, resulting in loss of control.
[0057]
As a countermeasure against this, in the present embodiment, during the F / B control, the change direction of the encoder count value is monitored to monitor whether or not the rotation direction of the rotor 32 has reversed from the rotation direction toward the target position. When it is detected, the energization phase for driving the rotor 32 in the reverse rotation direction is prohibited, and the energization phase immediately before the reverse rotation is energized. In this way, if the energizing phase immediately before the reverse rotation is energized, a braking torque can be generated in a direction to suppress the reverse rotation of the rotor 32, and the reverse rotation can be quickly suppressed by the braking torque, and the reverse rotation state can be prevented. It is possible to quickly return to the normal rotation direction.
[0058]
The range switching control described above is executed by the ECU 41 of the range switching control device 42 according to each routine described later. Hereinafter, the processing contents of each of these routines will be described.
[0059]
[Initial drive]
This is executed according to the initial drive routine shown in FIGS. This routine is executed at a predetermined cycle (for example, 1 ms cycle) immediately after the power supply to the ECU 41 is turned on (immediately after the ignition switch is operated from the OFF position to the ACC position) until the end of the initial drive.
[0060]
When this routine is started, first, in step 101, it is determined whether the open loop control execution flag Xopen = ON or the recovery processing execution flag Xrcv = ON. Here, the open-loop control execution flag Xopen is a flag that determines whether or not open-loop control (fail-safe processing) that is executed when the encoder 46 or the SR motor 12 has failed is being executed. Means that it is. The recovery process execution flag Xrcv is a flag for determining whether or not a recovery process (open loop control) that is temporarily executed when a temporary operation abnormality occurs is executed, and ON is executed. Means that.
[0061]
If “Yes” is determined in step 101, the present routine is terminated without performing the subsequent processing, and if “No” is determined, the process proceeds to step 102 and the output from the initial processing of the ECU 41 is performed. It is determined whether a predetermined time (for example, 100 ms) for waiting for the output voltage of the axis sensor 14 to stabilize has elapsed. Then, when a predetermined time has elapsed from the initial processing, the process proceeds to step 103, where the output voltage of the output shaft sensor 14 is read, and whether or not the current range is the P range is determined by whether or not this output voltage is equal to or less than the range determination value. It is determined whether the range is the NotP range. If the range is the P range, the process proceeds to step 104, where the range determination flag Xnp is set to “0” meaning the P range. If the range is the NotP range, the process proceeds to step 105 and the range determination flag Xnp Is set to “1” meaning NotP range.
[0062]
Thereafter, the process proceeds to step 106, where it is determined whether or not the range determination flag Xnp = 0 (P range). If the range determination flag Xnp = 0 (P range), the process proceeds to step 107, where P The range initial drive routine is executed, and if the range determination flag Xnp = 1 (NotP range), the routine proceeds to step 108, where the NotP range initial drive routine of FIG. 11 is executed.
[0063]
When the P range initial drive routine of FIG. 10 is started in step 107, in steps 201 to 206, it is determined whether the excitation number counter CASE for counting the number of excitations during the initial drive is 0 to 5. . The excitation number counter CASE has an initial value of 0 set in the initial processing, and is incremented by one each time excitation is performed once (step 114 in FIG. 9). Then, the energizing phase and the energizing time T are set as follows according to the determination result of the excitation number counter CASE.
[0064]
If CASE = 0 (first excitation), the process proceeds to step 207, where W-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 1 (second excitation), the process proceeds to step 208, where UW-phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0065]
If CASE = 2 (third excitation), the process proceeds to step 209 to select U-phase energization and set the energization time T to T1 (for example, 10 ms).
If CASE = 3 (fourth excitation), the process proceeds to step 210, where UV phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0066]
If CASE = 4 (fifth excitation), the process proceeds to step 211, where V-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 5 (sixth excitation), the process proceeds to step 212, where VW-phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0067]
Thus, when the initial drive is performed in the P range, the energized phases are switched in the order of W-phase energization → UW-phase energization → U-phase energization → UV-phase energization → V-phase energization → VW-phase energization, and the rotor 32 is rotated. Driving is performed in the forward rotation direction (P range → NotP range rotation direction). At this time, the one-phase energization time T1 is set shorter than the two-phase energization time T2.
[0068]
On the other hand, when the NotP range initial drive routine of FIG. 11 is started in step 108, it is determined in steps 221 to 226 whether the excitation number counter CASE is 0 to 5 and the energization is performed according to the determination result. The phase and the energizing time T are set as follows.
[0069]
If CASE = 0 (first excitation), the process proceeds to step 227, where V-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 1 (second excitation), the process proceeds to step 228, where UV phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0070]
If CASE = 2 (third excitation), the process proceeds to step 229, where U-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 3 (fourth excitation), the process proceeds to step 230, where UW-phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0071]
If CASE = 4 (fifth excitation), the process proceeds to step 231, where W-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 5 (sixth excitation), the process proceeds to step 232, where VW-phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0072]
Thus, when the initial drive is performed in the NotP range, the switching of the energized phases is performed in the order of V phase energization → UV phase energization → U phase energization → UW phase energization → W phase energization → VW phase energization, and the rotor 32 Drive is performed in the reverse rotation direction (the rotation direction from the NotP range to the P range). Also in this case, the one-phase energization time T1 is set shorter than the two-phase energization time T2.
[0073]
After executing the P range initial drive routine of FIG. 10 or the NotP range initial drive routine of FIG. 11 as described above, the process proceeds to step 109 of FIG. 8, and the range switching operation (P range switch 43 or NotP It is determined whether or not the range switch 44 has been operated). If the range switch operation has been performed during the initial drive, the process proceeds to step 110, where the range switch operation flag Xchg is set to ON, and the range switch operation is performed. If not, the routine proceeds to step 111, where the range switching operation flag Xchg is set to OFF.
[0074]
Thereafter, the process proceeds to step 112 in FIG. 9, in which the energizing time counter CT for counting the energizing time of the current energizing phase is counted up. It is determined whether or not the energization time T (= T1 or T2) set in the routine 11 has been exceeded, and if not, this routine is terminated without performing the subsequent processing. Thereby, the energization to the current energized phase is continued until the energized time CT of the current energized phase exceeds the energized time T (= T1 or T2) set in the routine of FIG. 10 or FIG.
[0075]
Thereafter, when the energization time CT of the current energization phase exceeds the energization time T (= T1 or T2) set in the routine of FIG. 10 or FIG. 11, the routine proceeds to step 114, where the excitation number counter CASE is counted up by one. Then, the energized phase is switched to the next energized phase. Then, in the next step 115, after resetting the energization time counter CT, the routine proceeds to step 116, where it is determined whether or not the excitation number counter CASE has reached "6" indicating the end of the initial drive. If the number counter CASE has reached "6", the routine proceeds to step 118, where the initial drive end flag Xend is set to "ON" indicating the end of the initial drive.
[0076]
If the number-of-excitations counter CASE has not reached "6", that is, if the initial drive is being performed, the process proceeds to step 117, and it is determined whether the condition for ending the initial drive is satisfied. The condition for terminating the initial drive halfway is determined by the following three conditions (1) to (3).
(1) The range determination flag Xnp is 0 (P range)
{Circle around (2)} The excitation number counter CASE is 2 or 4, that is, the end of two-phase energization.
(3) The range switching operation flag Xchg is ON, that is, the range switching operation has been performed during the initial drive.
[0077]
If at least one of these three conditions (1) to (3) is not satisfied, the condition for ending the initial drive is not satisfied, and the initial drive is continued. On the other hand, if all of the three conditions (1) to (3) are satisfied, the condition for terminating the middle of the initial drive is satisfied, the process proceeds to step 118, and the initial drive end flag Xend indicates the end of the initial drive. Set to “ON”.
[0078]
Thereafter, the process proceeds to step 119, where it is determined whether or not the range determination flag Xnp = 1 (whether or not the initial drive was performed in the NotP range). If the range determination flag Xnp = 1, the process proceeds to step 120, The encoder count value Ncnt at the end of the initial drive is stored as an initial position deviation learning value Gcnt. Then, in the next step 121, the encoder count value Ncnt is corrected to a value based on the NotP range by the following equation.
Ncnt = Ncnt + 288
[0079]
In the present embodiment, the encoder count value Ncnt is counted up by setting the holding position of the P range to the zero point position, and when the rotor 32 rotates to the holding position of the NotP range, the encoder count value Ncnt becomes, for example, 288. ing. Therefore, when the initial drive is performed in the NotP range, the encoder count value Ncnt is corrected to a value based on the NotP range by adding 288 to the encoder count value Ncnt at the end of the initial drive.
[0080]
On the other hand, if it is determined in step 119 that the range determination flag Xnp = 0 (initial driving in the P range), the process proceeds to step 122, where the initial position deviation learning value Gcnt is calculated using the encoder count value Ncnt at the end of the initial driving. It is calculated by the following equation.
Gcnt = Ncnt + 2 × (6-CASE)
[0081]
In this case, if the initial drive is performed to the end, CASE = 6 by the processing of step 114, so that the encoder count value Ncnt at the end of the initial drive becomes the initial position deviation learning value Gcnt as it is, but the initial drive in the P range is performed. Is performed, when the range switching operation is performed during the initial driving, the next two-phase energization (or when a range switching request occurs during the execution of the two-phase energization, the two-phase energization) ends. To the normal drive, the initial drive is assumed to have been executed to the end, the encoder count value Ncnt at the end of the initial drive is estimated, and the estimated value is used as the initial position deviation learning value Gcnt. ing. 2 × (6-CASE) is a count-up value (hereinafter referred to as “Ncnt correction amount”) corresponding to the rotation angle for the number of unfinished excitations.
[0082]
FIG. 14 is a time chart for explaining the relationship among the excitation number counter CASE, the Ncnt correction amount, the energized phase, the A-phase signal, the B-phase signal, and the encoder count value Ncnt during the initial drive. For example, if the initial drive is to be terminated at the end of the UW-phase energization (when the number-of-excitations counter CASE has changed from 1 to 2) during the initial drive, the Ncnt correction amount = 2 × (6-CASE) = 2 × ( 6-2) = 8, and when ending the initial drive at the end of the UV-phase energization (when the number-of-excitations counter CASE changes from 3 to 4), Ncnt correction amount = 2 × (6-CASE) = 2 × (6-4) = 4.
[0083]
[Encoder counter]
Next, the processing content of the encoder counter routine shown in FIG. 15 will be described. This routine is started in synchronization with both the rising / falling edges of the A-phase signal and the B-phase signal by the AB-phase interrupt processing, and the rising / falling edges of the A-phase signal and the B-phase signal are set next. Count as follows. When this routine is started, first, in step 301, the values A (i) and B (i) of the A-phase signal and the B-phase signal are read, and in the next step 302, the count-up value ΔN calculation map of FIG. A search is performed to calculate a current value A (i), B (i) of the A-phase signal and the B-phase signal and a count-up value ΔN corresponding to the previous value A (i−1), B (i−1). .
[0084]
Here, the reason why the present values A (i) and B (i) of the A-phase signal and the B-phase signal and the previous values A (i-1) and B (i-1) are used is that the A-phase signal and the B-phase signal are used. This is because the rotation direction of the rotor 32 is determined based on the order in which the signals are generated. As shown in FIG. Is counted up, and in the reverse rotation (the rotation direction from the NotP range to the P range), the count-up value ΔN is set to a negative value, and the encoder count value Ncnt is counted down.
[0085]
After calculating the count-up value ΔN, the process proceeds to step 303, where the count-up value ΔN calculated in step 302 is added to the previous encoder count value Ncnt to determine the current encoder count value Ncnt. Thereafter, the process proceeds to step 304, where the current values A (i) and B (i) of the A-phase signal and the B-phase signal are changed to A (i-1) and B (i-1) for the next count processing. And the routine ends.
[0086]
[Control mode setting]
The control mode setting routine shown in FIGS. 20 to 22 is executed at a predetermined cycle (for example, 1 ms cycle) after the end of the initial drive, and sets the control mode determination value mode to any one of 0, 1, 3, 4, and 5. Specify the control mode as follows.
mode = 0: Power off (standby)
mode = 1: normal drive (F / B control start position stop holding processing and F / B control)
mode = 3: target position stop holding processing
mode = 4: Inversion position stop holding processing
mode = 5: open loop control
[0087]
When the control mode setting routine is started, first, in step 401, it is determined whether or not the system failure flag Xfailoff is set to ON indicating a failure of the range switching control device 42, and if Xfailoff = ON is set. If yes, the process proceeds to step 402, and a process for maintaining the SR motor 12 in the power-off state is executed. Thereby, the rotation direction instruction value D = 0 (stop), the energization flag Xon = OFF (energization off), the F / B permission flag Xfb = OFF (F / B control prohibition), the control mode determination value mode = 0 (energization off) ).
[0088]
On the other hand, if the system failure flag Xfailoff is OFF (there is no failure), the process proceeds from step 401 to step 403 to determine whether the open loop control execution flag Xopen = OFF and the recovery processing execution flag Xrcv = OFF. . If one or both of the open loop control execution flag Xopen and the recovery processing execution flag Xrcv are set to ON, the process proceeds to step 404, and the rotation direction instruction value D = 0 (stop), control mode determination value mode = 5 (open loop control), and F / B permission flag Xfb = OFF (F / B control prohibited).
[0089]
If both the open loop control execution flag Xopen and the recovery processing execution flag Xrcv are set to OFF, the process proceeds to step 405, and it is determined whether or not the energization flag Xon = ON (energization ON). If the flag Xon is set to OFF (energization off), the process proceeds to step 406, where the difference between the target count value Acnt and the encoder count value Ncnt (the difference between the target position and the rotor 32 and the position) is determined. Based on the difference (Acnt−Ncnt), it is determined whether the rotation corresponds to forward rotation (rotation in the direction of the P range → NotP range), reverse rotation (rotation in the direction of the NotP range → P range), or stopping. At this time, as the encoder count value Ncnt, a value corrected by the initial position deviation learning value Gcnt learned in the initial driving routine of FIGS. 8 and 9 is used.
Ncnt = Ncnt−Gcnt
[0090]
If the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is equal to or more than + Kth (for example, equal to or more than + 10 °), the rotor 32 is rotationally driven in the forward rotation direction (the rotation direction from the P range to the NotP range). If it is determined that it is necessary, the process proceeds to step 407, where the rotation direction instruction value D = 1 (forward rotation), the energization flag Xon = ON (energization ON), the control mode determination value mode = 1 (F / B control start position stop (Holding processing and F / B control).
[0091]
If the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is −Kth or less (eg, −10 ° or less), the rotor 32 rotates in the reverse rotation direction (the rotation direction from the NotP range to the P range). It is determined that it is necessary to drive, and the process proceeds to step 409, where the rotation direction instruction value D = −1 (reverse rotation), the energization flag Xon = ON (energization ON), the control mode determination value mode = 1 (F / B control) (Start position stop hold processing and F / B control).
[0092]
If the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is within the range of −Kth to + Kth (for example, within the range of −10 ° to + 10 °), the rotor 32 is moved to the target position and the detent spring 23 is moved to the target position. It is determined that it is possible to maintain the current by the spring force of (No. energization to the SR motor 12 is unnecessary), and the process proceeds to step 408. In order to maintain the SR motor 12 in the energized off state, the rotation direction instruction value D = 0 (stop), energization flag Xon = OFF (energization off), control mode determination value mode = 0 (energization off).
[0093]
On the other hand, if it is determined in step 405 that the energization flag Xon is set to ON (energization ON), whether the command shift range (target position) has been inverted by the processing in steps 410 to 415 in FIG. It is determined whether or not the rotation direction instruction value D has been inverted.
[0094]
Specifically, first, in step 410, it is determined whether or not the rotation direction instruction value D = 1 (forward rotation). If the rotation direction instruction value D = 1 (forward rotation), the process proceeds to step 411. It is determined whether the rotation direction of the rotor 32 needs to be reversed from normal rotation to reverse rotation based on whether or not the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is a negative value. If necessary, the process proceeds to step 412, where the rotation direction instruction value D is set to D = -1 (reverse rotation).
[0095]
On the other hand, if it is determined in step 410 that the rotation direction instruction value D is not 1 (forward rotation) (that is, if D = 0 or −1), the process proceeds to step 413, where the rotation direction instruction value D = -1 (reverse rotation), and if the rotation direction instruction value D = -1 (reverse rotation), the process proceeds to step 414, where the difference between the target count value Acnt and the encoder count value Ncnt ( (Acnt−Ncnt) is a plus value, and it is determined whether or not the rotation direction of the rotor 32 needs to be reversed from the reverse rotation to the forward rotation. The direction instruction value D is set to 1 (forward rotation).
[0096]
When the rotation direction instruction value D is inverted as described above, the process proceeds to step 416, and in order to invert the rotation direction of the rotor 32, the control mode determination value mode = 4 (inversion position stop holding processing), F / B permission flag Xfb = OFF (F / B control prohibited) is set, and the routine proceeds to step 417. On the other hand, when the rotation direction instruction value D is not inverted, the process proceeds to step 417 without performing the process of step 416.
[0097]
In this step 417, it is determined whether or not the control mode determination value mode = 4 (reversal position stop holding processing) is set. If “Yes”, the flow proceeds to step 418, and the energization flag Xon = ON (energization ON) ) To execute the inversion position stop holding process.
[0098]
On the other hand, when it is determined as “No” in the above step 417 (when it is not the reversal position stop holding processing), it is determined in steps 419 to 421 in FIG. 22 whether or not it is the end timing of the F / B control. Is determined. Specifically, first, in step 419, it is determined whether or not the rotation direction instruction value D ≧ 0 (forward rotation or stop). If the rotation direction instruction value D ≧ 0, the process proceeds to step 420, where the target count Whether or not the end timing of the F / B control is determined based on whether or not the difference (Acnt−Ncnt) between the value Acnt and the encoder count value Ncnt is equal to or smaller than + Kref (for example, equal to or smaller than + 0.5 °). If the rotation direction instruction value D = −1 (reverse rotation), the process proceeds to step 421, where the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is equal to or more than −Kref (for example, −0.5). (° or more), it is determined whether it is the end timing of the F / B control.
[0099]
That is, by setting the end determination value Kref of the F / B control to, for example, the phase advance of the energized phase (for example, 2 to 4 counts), the timing is earlier than the target count value Acnt by the phase advance of the energized phase. The F / B control is terminated. As a result, the last energized phase of the F / B control coincides with the energized phase in which the rotor 32 is stopped and held at the target position (target count value Acnt).
[0100]
If “No” is determined in the above step 420 or 421 (if it is not the end timing of the F / B control), the process proceeds to step 422 to reset the stop holding time counter CThold for counting the time of the target position stop holding processing. .
[0101]
On the other hand, when it is determined “Yes” in the above step 420 or 421 (when it is the end timing of the F / B control), the process proceeds to step 423, and the F / B permission flag Xfb = OFF (F / B control is prohibited). , The F / B control is terminated, and the routine proceeds to the target position stop holding processing. Then, in the next step 424, the stop holding time counter CThold is counted up, and the time of the target position stop holding processing is counted.
[0102]
Thereafter, the process proceeds to step 425, where it is determined whether or not the time CThold of the target position stop holding processing has reached a predetermined time (for example, 50 ms), and the time CThold of the target position stop holding processing has reached a predetermined time (for example, 50 ms). If not, the process proceeds to step 426, and in order to continue the target position stop holding process, the rotation direction instruction value D = 0 (stop), the energization flag Xon = ON (energization ON), and the control mode determination value mode = 3 (target (Position stop holding processing).
[0103]
Thereafter, when the time CThold of the target position stop holding processing reaches a predetermined time (for example, 50 ms), the process proceeds to step 427, and in order to turn off the power supply to the SR motor 12, the rotation direction instruction value D = 0 (stop); The energization flag Xon = OFF (energization off) and the control mode determination value mode = 0 (energization off) are set.
[0104]
[Time synchronous motor control]
The time synchronous motor control routine shown in FIG. 23 is started at a predetermined period (for example, 1 ms period) after the end of the initial drive, and executes the F / B control start position stop holding process, the target position stop holding process, and the reverse position stop holding process. .
[0105]
When this routine is started, first, in step 501, it is determined whether or not the F / B permission flag Xfb = OFF (F / B control is prohibited), and the F / B permission flag Xfb = ON (F / B control In the case of (execute), this routine ends without performing the subsequent processing. In this case, the setting of the energized phase and the energizing process are executed by the F / B control routine shown in FIG.
[0106]
On the other hand, when it is determined in step 501 that the F / B permission flag Xfb = OFF (F / B control is prohibited), in steps 502 to 504, the control mode determination values mode = 1, 3, 4 It is determined whether or not any of the above conditions is satisfied. If the control mode determination value mode = 1 (the F / B control start position stop holding process and the F / B control), the process proceeds from step 502 to step 505, and FIG. A mode1 routine shown in FIG. 24 is executed to calculate an energized phase determination value Mptn for setting an energized phase at the time of executing the F / B control start position stop holding processing.
[0107]
If the control mode determination value mode = 3 (target position stop holding process), the process proceeds from step 503 to step 506, in which a mode 3 routine shown in FIG. An energized phase determination value Mptn for setting a phase is calculated.
[0108]
If the control mode determination value mode = 4 (reversal position stop holding processing), the process proceeds from step 504 to step 507, in which a mode 4 routine shown in FIG. An energized phase determination value Mptn for setting a phase is calculated.
[0109]
As described above, in the case of the control mode determination values mode = 1, 3, and 4, after calculating the energized phase determination value Mptn, the process proceeds to step 508, and the energization process routine shown in FIG. The F / B control start position stop holding process, the target position stop holding process, and the reverse position stop holding process are executed.
[0110]
On the other hand, if it is determined “No” in steps 502 to 504, that is, if the control mode determination values mode = 0 and 5, the process proceeds to step 508, and the energization process routine shown in FIG. Then, the power-off or open-loop control is performed.
[0111]
[Mode1]
The mode1 routine shown in FIG. 24 is a subroutine started in step 505 of the time synchronous motor control routine in FIG. 23, and the energized phase determination value Mptn (energized phase) at the time of the F / B control start position stop holding processing is set as As follows.
[0112]
When this routine is started, first, in step 511, an energization time counter CT1 for counting the time of the F / B control start position stop holding processing is counted up, and in the next step 512, the F / B control start position stop holding is performed. It is determined whether the processing time CT1 has exceeded a predetermined time (for example, 10 ms).
[0113]
If the time CT1 of the F / B control start position stop holding processing does not exceed the predetermined time (for example, 10 ms), the process proceeds to step 513, and whether the stop holding energized phase storage completion flag Xhold = OFF (not stored). Is determined (ie, whether or not the timing is immediately before the start of the F / B control start position stop holding process), and if the stop holding energized phase storage completed flag Xhold = OFF, the process proceeds to step 514, and the F / B The energized phase determination value Mptn during the B control start position stop holding processing is set to the current position counter value (Ncnt-Gcnt).
Mptn = Ncnt−Gcnt
[0114]
Here, the position counter value (Ncnt-Gcnt) is a value obtained by correcting the encoder count value Ncnt with the initial position deviation learning value Gcnt, and is a value that accurately represents the current position of the rotor 32.
[0115]
Thereafter, the process proceeds to step 515, where the energized phase determination value Mptn is divided by "12" to obtain a remainder Mptn% 12. Here, “12” corresponds to the increase or decrease of the encoder count value Ncnt (the energized phase determination value Mptn) during one cycle of the energized phase. Based on the value of Mptn% 12, the energized phase is determined by the conversion table of FIG.
[0116]
Then, in the next step 516, it is determined whether or not Mptn% 12 = 2, 3, 6, 7, 10, and 11 indicates whether or not one-phase conduction (U-phase conduction, V-phase conduction, W-phase conduction). If the current is one-phase energized, the process proceeds to step 517, where the energized phase determination value Mptn is increased by “2” corresponding to one step, and the two-phase energized (UV phase energized, VW phase energized, UW phase energized) ). As a result, the F / B control start position stop holding process is executed by two-phase energization having a larger holding torque than that of one-phase energization, thereby preventing the rotor 32 from vibrating near the F / B control start position. , So that the rotor 32 can be reliably stopped and held at the F / B control start position.
[0117]
Then, at the next step 518, the stop-hold energized phase storage completion flag Xhold = ON (stored) is set, and this routine ends. Thereafter, when this routine is started, “No” is determined in step 513, and the processing in steps 514 to 518 is not performed. Thus, the process of setting the energized phase determination value Mptn (energized phase) in the F / B control start position stop holding process is executed only once immediately before the start of the F / B control start position stop holding process.
[0118]
Thereafter, when the time CT1 of the F / B control start position stop holding processing exceeds a predetermined time (for example, 10 ms), “Yes” is determined in step 512, and the F / B control start position stop holding processing ends. , F / B control. Accordingly, first, in step 519, the count value (for example, 4 or 3) of the phase advance of the energized phase according to the rotation direction is added to the energized phase determination value Mptn in the F / B control start position stop holding processing. Alternatively, the first energized phase determination value Mptn at the start of the F / B control is set by subtraction, whereby the rotation driving of the rotor 32 is started. Thereafter, the process proceeds to step 520, where the F / B permission flag Xfb is set to ON (F / B control is executed).
[0119]
FIG. 31 is a time chart for explaining a phase to be energized first when rotation is started from the UW phase. In this case, when the forward rotation (rotation in the direction from the P range to the NotP range) is started, the energized phase determination value Mptn uses the encoder count value Ncnt, the initial position deviation learning value Gcnt, and the forward rotation direction phase lead amount K1. Is calculated by the following equation.
Mptn = Ncnt−Gcnt + K1
[0120]
Here, if the forward rotation direction phase lead amount K1 is, for example, 4, the energized phase determination value Mptn is calculated by the following equation.
Mptn = Ncnt−Gcnt + 4
When starting the normal rotation from the UW phase, since mod (Ncnt−Gcnt) is 4, Mptn% 12 = 4 + 4 = 8, and the first energized phase is the UV phase.
[0121]
On the other hand, when the reverse rotation (rotation in the direction from the NotP range to the P range) is started from the UW phase, assuming that the amount of phase advance K2 in the reverse rotation direction is 3, for example, the energized phase determination value Mptn is calculated by the following equation. .
Mptn = Ncnt-Gcnt-K2 = Ncnt-Gcnt-3
When the reverse rotation is started from the UW phase, Mptn% 12 = 4-3 = 1, and the first energized phase is the VW phase.
[0122]
In this way, by setting the forward rotation direction phase lead amount K1 and the reverse rotation direction phase lead amount K2 to 4 and 3, respectively, the switching pattern of the energized phase in the forward rotation direction and the reverse rotation direction can be made symmetric. In both the forward rotation direction and the reverse rotation direction, the phase at a position shifted by two steps from the current position of the rotor 32 can be first excited to start rotation.
[0123]
[Mode3]
The mode 3 routine shown in FIG. 25 is a subroutine started in step 506 of the time synchronous motor control routine in FIG. 23, and sets the energized phase determination value Mptn (energized phase) in the target position stop holding process as follows. I do.
[0124]
When this routine is started, first, in step 531, the energizing phase at the end of the F / B control is determined based on whether Mptn% 12 at the end of the F / B control is 2, 3, 6, 7, 10, 11, or 11. Is determined to be one-phase conduction (U-phase conduction, V-phase conduction, W-phase conduction). If it is one-phase conduction, the F / B control that has been performed up to that time is performed by the processing of steps 532 to 534. The energized phase determination value Mptn is increased or decreased by 2 in accordance with the rotation direction of, so that the energized phase determination value Mptn is changed to two-phase energization in the next step of the one-phase energization.
[0125]
At this time, in step 532, the rotation direction is determined as follows. Immediately before entering this routine (at the end of the F / B control), the rotation direction instruction value D is set to 0 (stop) in step 426 in FIG. Cannot be determined. Therefore, in this routine, attention is paid to the fact that there is a difference between the phase lead amounts K1 and K2 of the energized phase between the energized phase determination value Mptn at the end of the F / B control and the position count value (Ncnt-Gcnt). , The rotation direction is determined as follows based on the magnitude relationship between the energized phase determination value Mptn at the end of the F / B control and the position count value (Ncnt−Gcnt).
[0126]
If Mptn> Ncnt−Gcnt, it is determined to be forward rotation (the rotation direction from the P range to the NotP range), and the process proceeds to step 533 where the energized phase determination value Mptn is increased by 2 to correct for two-phase energization. .
[0127]
On the other hand, if Mptn <Ncnt−Gcnt, it is determined that the motor is rotating in the reverse direction (the direction of rotation from the NotP range to the P range), and the process proceeds to step 534. to correct.
If Mptn = Ncnt-Gcnt, it is determined to be stopped, and the energized phase is not changed.
[0128]
As described above, the target position stop holding process is also executed by the two-phase energization having a larger holding torque compared to the one-phase energization, as in the F / B control start position stop holding process, so that the rotor 32 is positioned near the target position. Vibration is prevented so that the rotor 32 can be reliably stopped and held at the target position.
[0129]
[Mode4]
The mode4 routine shown in FIG. 26 is a subroutine started in step 507 of the time synchronous motor control routine in FIG. 23, and sets the energized phase determination value Mptn (energized phase) during the inversion position stop holding process as follows. I do.
[0130]
When this routine is started, first, in step 541, an energization time counter CT4 for counting the time of the inversion position stop holding processing is counted up, and in the next step 542, the inversion position stop holding time CT4 is set to a predetermined time ( For example, it is determined whether the time has exceeded 50 ms).
[0131]
If the time CT4 of the reversal position stop holding processing does not exceed the predetermined time (for example, 50 ms), the process proceeds to step 543, and the current time is determined based on whether or not Mptn% 12 = 2, 3, 6, 7, 10, and 11. It is determined whether or not the energized phase is one-phase energized (U-phase energized, V-phase energized, W-phase energized). If it is one-phase energized, the process of steps 544 to 546 performs F By increasing or decreasing the energization phase determination value Mptn by 2 according to the rotation direction of the / B control, the energization phase determination value Mptn is changed to the two-phase energization in the next step of the one-phase energization. The processing in steps 543 to 546 is the same as the processing in steps 531 to 534 of the mode3 routine in FIG.
[0132]
As described above, the reversing position stop holding process is also executed by the two-phase energization having a larger holding torque than the one-phase energization, similarly to the F / B control start position stop holding process and the target position stop holding process. 32 is prevented from vibrating near the reversing position, and the rotor 32 can be reliably stopped and held at the reversing position.
[0133]
Thereafter, when the time CT4 of the inversion position stop holding processing exceeds a predetermined time (for example, 50 ms), “Yes” is determined in step 542, the inversion position stop holding processing ends, and the F / B control is restarted. . Accordingly, first, in step 547, the count value (for example, 4 or 3) of the phase advance of the energized phase is added or subtracted to the energized phase determination value Mptn at the time of the inversion position stop holding processing according to the rotation direction. The first energized phase determination value Mptn at the time of resuming the F / B control is set, whereby the rotation of the rotor 32 is started. Thereafter, the process proceeds to step 548, in which the F / B permission flag Xfb is set to ON (F / B control is executed), the energization time counter CT4 is set to 0, and the control mode determination value mode is set to 1 (normal drive), and the routine ends. I do.
[0134]
[Electrification processing]
The energization processing routine shown in FIG. 27 is a subroutine started in step 508 of the time synchronous motor control routine in FIG. This routine is also started in step 603 of the F / B control routine of FIG. 29 described later.
[0135]
When the energization processing routine of FIG. 27 is started, it is first determined in step 551 whether or not the control mode determination value mode = 0 (energization off). If the control mode determination value mode = 0 (energization off) If it is, the process proceeds to step 552, in which the energization of all phases of the SR motor 12 is turned off to enter the standby state.
[0136]
On the other hand, if “No” is determined in step 551, the process proceeds to step 553, where it is determined whether or not the control mode determination value mode = 5 (open loop control), and the control mode determination value mode = 5 ( If it is (open loop control), the process proceeds to step 554 to execute open loop control. In this open loop control, when a failure of the encoder 46 or an abnormal operation of the SR motor 12 occurs, the energized phase is set by, for example, time synchronization processing of a 1 ms cycle, and the rotor 32 is driven to rotate to the target position.
[0137]
In addition, when both of the steps 551 and 553 determine “No”, that is, the control mode determination values mode = 1, 3, 4 (F / B control start position stop holding processing, F / B control, target In the case of the position stop holding process and the inversion position stop holding process), the process proceeds to step 555, where the energized phase is set according to the conversion table of FIG. 28 according to Mptn% 12, and the windings 33 and 34 of the energized phase are energized. .
[0138]
[F / B control]
Next, the processing content of the F / B control routine shown in FIG. 29 will be described. This routine is executed by an AB phase interrupt process. When the F / B control execution condition is satisfied after the end of the initial drive, the rotational position of the rotor 32 (the encoder count value Ncnt−Gcnt) is set to the target position (the target count value). From (Acnt) to, for example, within 0.5 °, the energizing phase is switched based on the encoder count value Ncnt and the initial position deviation learning value Gcnt to rotate the rotor 32.
[0139]
When the F / B control routine of FIG. 29 is started, first, in step 601, whether the F / B permission flag Xfb is set to ON (whether the motor F / B control execution condition is satisfied). If the F / B permission flag Xfb is OFF (the F / B control execution condition is not satisfied), the routine ends without performing the subsequent processing.
[0140]
On the other hand, if the F / B permission flag Xfb is set to ON, the routine proceeds to step 602, where the energized phase setting routine shown in FIG. 30 described below is executed, and the current encoder count value Ncnt and the initial position deviation learning value The energizing phase is set based on Gcnt, and in the next step 603, the energizing process routine of FIG. 27 is executed.
[0141]
[Current phase setting]
The energized phase setting routine shown in FIG. 30 is a subroutine started in step 602 of the F / B control routine in FIG. When this routine is started, first, in step 611, it is determined whether or not the rotation direction instruction value D indicating the rotation direction to the target position is “1” meaning forward rotation (the rotation direction from the P range to the NotP range). Is determined. As a result, if it is determined that the rotation direction instruction value D = 1 (forward rotation), the process proceeds to step 612, where it is determined whether the rotation direction of the rotor 32 has been reversed against the rotation direction instruction (the encoder count value Ncnt has decreased. If not, the process proceeds to step 613, where the energizing phase is calculated using the current encoder count value Ncnt, the initial position deviation learning value Gcnt, the forward rotation direction phase lead amount K1, and the speed correction amount Ks. The judgment value Mptn is updated by the following equation.
Mptn = Ncnt−Gcnt + K1 + Ks
[0142]
Here, the forward rotation direction phase lead amount K1 is the phase lead amount of the conduction phase necessary for rotating the rotor 32 in the forward direction (the phase lead amount of the conduction phase with respect to the current position of the rotor 32). For example, K1 = 4 Is set.
[0143]
The speed correction amount Ks is a phase lead correction amount set according to the rotation speed of the rotor 32. In the low speed range, the speed correction amount Ks is set to 0, and as the speed increases, the speed correction amount Ks is increased to, for example, 1 or 2. Thus, the energized phase determination value Mptn is corrected so that the energized phase is suitable for the rotation speed of the rotor 32.
[0144]
On the other hand, if it is determined in step 612 that the rotation direction of the rotor 32 has been reversed against the rotation direction instruction, the energized phase determination value Mptn is not updated to prevent the rotation. In this case, electricity is supplied to the energized phase immediately before the reverse rotation (previous energized phase), and a braking torque is generated in a direction to suppress the reverse rotation of the rotor 32.
[0145]
If it is determined in step 611 that the rotation direction instruction value D = 0 (reverse rotation), that is, the rotation direction is from NotP range to P range, the process proceeds to step 614, and the rotation direction of the rotor 32 is changed to the rotation direction instruction. On the other hand, it is determined whether or not the rotation has been reversed (whether or not the encoder count value Ncnt has increased). If the rotation has not been reversed, the process proceeds to step 615, where the current encoder count value Ncnt, the initial position deviation learning value Gcnt, and the reverse rotation The energized phase determination value Mptn is updated by the following equation using the direction phase lead amount K2 and the speed correction amount Ks.
Mptn = Ncnt-Gcnt-K2-Ks
[0146]
Here, the amount of phase advance K2 in the reverse rotation direction is the amount of phase advance of the energized phase required to rotate the rotor 32 in the reverse direction (the amount of phase advance of the energized phase with respect to the current position of the rotor 32). Is set. The speed correction amount Ks is the same as in the case of the forward rotation.
[0147]
On the other hand, if it is determined in step 614 that the rotation direction of the rotor 32 has been reversed against the rotation direction instruction, the energized phase determination value Mptn is not updated to prevent the rotation. In this case, electricity is supplied to the energized phase immediately before the reverse rotation (previous energized phase), and a braking torque is generated in a direction to suppress the reverse rotation of the rotor 32.
Note that the processing of steps 611, 612, and 614 plays a role as a reverse rotation monitoring unit and a reverse rotation prevention unit described in the claims.
[0148]
After the current energization phase determination value Mptn is determined as described above, the energization processing routine of FIG. 27 is executed. During the execution of the F / B control, the conversion table of FIG. An energized phase corresponding to Mptn% 12 is selected, and the energized phase is energized.
[0149]
According to the above-described embodiment, during the F / B control, the change direction of the encoder count value is monitored, and the rotation direction of the rotor 32 is reversed against the rotation direction instruction (the instruction of the rotation direction toward the target position). When the reverse rotation is detected, the energization phase that drives the rotor 32 in the reverse direction is prohibited and the energization phase immediately before the reverse rotation is energized. A braking torque can be generated in a direction to suppress the reverse rotation of the rotor 32, the reverse rotation can be quickly suppressed by the braking torque, and the normal rotation direction can be promptly returned from the reverse rotation state, and stable. Range switching control can be performed.
[0150]
In the present embodiment, when the reverse rotation is detected, the energized phase immediately before the reverse rotation is energized. However, the configuration may be such that none of the phases is energized when the reverse rotation is detected. Even in this case, the torque in the reverse direction is generated. Since this can be prevented beforehand, the intended object of the present invention can be achieved.
[0151]
Further, in the present embodiment, during the F / B control, the drive is performed by the 1-2-phase excitation method in which the one-phase energization and the two-phase energization are alternately switched. Alternatively, a two-phase excitation method driven by only two-phase energization may be adopted.
In the present embodiment, the magnetic encoder 46 is used. However, for example, an optical encoder or a brush encoder may be used.
[0152]
In the present embodiment, the SR motor 12 is used. However, if a brushless motor that detects the rotational position of the rotor based on the count value of the output signal of the encoder and sequentially switches the energized phase of the motor, the SR motor 12 is used. However, other types of brushless motors may be used.
[0153]
The range switching device of the present embodiment is configured to switch between the two ranges of the P range and the NotP range. For example, the range switching valve and the manual valve of the automatic transmission are interlocked with the turning operation of the detent lever 15. The present invention can also be applied to a range switching device that switches the ranges P, R, N, D,.
[0154]
In addition, it goes without saying that the present invention is not limited to the range switching device but can be applied to various devices using a brushless type motor such as an SR motor as a drive source.
[Brief description of the drawings]
FIG. 1 is a perspective view of a range switching device according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a configuration of an SR motor.
FIG. 3 is a circuit diagram showing a circuit configuration for driving an SR motor.
FIG. 4 is a diagram schematically showing a configuration of an entire control system of the range switching device.
FIG. 5 is a plan view illustrating a configuration of a rotary magnet of the encoder.
FIG. 6 is a side view of the encoder.
FIG. 7A is a time chart showing an output waveform of an encoder, and FIG. 7B is a time chart showing an energized phase switching pattern;
FIG. 8 is a flowchart showing a flow of processing of an initial drive routine (part 1);
FIG. 9 is a flowchart (part 2) showing a flow of processing of an initial drive routine.
FIG. 10 is a flowchart showing the flow of processing of a P range initial drive routine.
FIG. 11 is a flowchart showing the flow of processing of a NotP range initial drive routine.
FIG. 12 is a time chart showing a control example when initial driving is performed in a P range.
FIG. 13 is a time chart showing a control example when a range switching operation is performed during initial driving;
FIG. 14 is a time chart for explaining an initial position deviation learning method when a range switching operation is performed during initial driving;
FIG. 15 is a flowchart showing the flow of processing of an encoder counter routine;
FIG. 16 is a diagram showing an example of a count-up value ΔN calculation map.
FIG. 17 is a time chart showing a relationship among a command range shift, an A-phase signal, a B-phase signal, and an encoder count value.
FIG. 18 is a time chart showing a control example of the SR motor.
FIG. 19 is a time chart for explaining the timing of shifting from F / B control to target position stop holding processing.
FIG. 20 is a flowchart showing the flow of a control mode setting routine (part 1);
FIG. 21 is a flowchart showing the flow of a control mode setting routine (part 2);
FIG. 22 is a flowchart (part 3) illustrating a processing flow of a control mode setting routine.
FIG. 23 is a flowchart showing the flow of processing of a time synchronous motor control routine.
FIG. 24 is a flowchart showing the flow of processing in a mode1 routine;
FIG. 25 is a flowchart showing the flow of processing of a mode3 routine;
FIG. 26 is a flowchart showing the flow of processing of a mode 4 routine;
FIG. 27 is a flowchart showing the flow of processing of an energization processing routine;
FIG. 28 is a diagram showing an example of a conversion table from Mptn% 12 to an energized phase.
FIG. 29 is a flowchart showing the flow of processing of an F / B control routine;
FIG. 30 is a flowchart showing the flow of a process of an energized phase setting routine;
FIG. 31 is a time chart illustrating an energization process when starting rotation from the UW phase.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 11 ... Range switching mechanism, 12 ... SR motor, 14 ... Output shaft sensor, 15 ... Detent lever, 18 ... Parking rod, 20 ... Parking gear, 21 ... Lock lever, 23 ... Detent spring, 24 ... P range holding concave part, 25 ... NotP range holding concave part, 26 ... reduction mechanism, 27 ... automatic transmission, 31 ... stator, 32 ... rotor, 33,34 ... winding, 35,36 ... motor excitation part, 37,38 ... motor driver, 41 ... ECU (Control means, reverse rotation monitoring means, reverse rotation prevention means), 43: P range switch, 44: Not P range switch, 46: encoder, 47: rotary magnet, 48: magnetic detection element for A phase signal, 49: B phase signal , 50 ... Z-phase signal magnetic detection element.

Claims (6)

モータのロータの回転に同期してパルス信号を出力するエンコーダと、このエンコーダの出力信号のカウント値(以下「エンコーダカウント値」という)に基づいて前記ロータの回転位置を検出して前記モータの通電相を順次切り換えることで前記ロータを目標位置まで回転駆動する制御手段とを備えたモータ制御装置において、
前記エンコーダカウント値の変化方向を監視して前記ロータの回転方向が前記目標位置へ向かう回転方向から逆転したか否かを監視する逆転監視手段と、
前記逆転監視手段で逆転が検出されたときに前記ロータを逆転方向に駆動する通電相に通電することを禁止する逆転防止手段と
を備えていることを特徴とするモータ制御装置。
An encoder for outputting a pulse signal in synchronization with the rotation of the motor rotor, and detecting the rotational position of the rotor based on the count value of the output signal of the encoder (hereinafter referred to as "encoder count value") to energize the motor. Control means for rotating the rotor to a target position by sequentially switching phases,
Reverse rotation monitoring means for monitoring whether the rotation direction of the rotor has been reversed from the rotation direction toward the target position by monitoring the direction of change of the encoder count value;
A motor control device comprising: a reverse rotation preventing unit that prohibits energization of an energizing phase that drives the rotor in the reverse rotation direction when the reverse rotation is detected by the reverse rotation monitoring unit.
前記逆転防止手段は、逆転検出時にその逆転直前の通電相に通電することを特徴とする請求項1に記載のモータ制御装置。2. The motor control device according to claim 1, wherein the reverse rotation prevention unit supplies a current to an energizing phase immediately before the reverse rotation when the reverse rotation is detected. 3. 前記逆転防止手段は、逆転検出時にいずれの相にも通電しないことを特徴とする請求項1に記載のモータ制御装置。The motor control device according to claim 1, wherein the reverse rotation preventing unit does not energize any of the phases when the reverse rotation is detected. 前記モータは、スイッチトリラクタンスモータであることを特徴とする請求項1乃至3のいずれかに記載のモータ制御装置。4. The motor control device according to claim 1, wherein the motor is a switched reluctance motor. 前記エンコーダは、前記ロータの回転に同期して所定の位相差を有するA相信号とB相信号を出力し、
前記制御手段は、前記ロータの回転駆動中に、前記A相信号及び前記B相信号をカウントしてエンコーダカウント値を更新する際に、前記A相信号と前記B相信号の発生順序によって前記ロータの回転方向を判定して、その回転方向に応じて前記エンコーダカウント値をカウントアップ又はカウントダウンし、そのエンコーダカウント値と前記ロータの回転方向に応じて通電相を選択して通電することを特徴とする請求項1乃至4のいずれかに記載のモータ制御装置。
The encoder outputs an A-phase signal and a B-phase signal having a predetermined phase difference in synchronization with the rotation of the rotor,
The control means, when counting the A-phase signal and the B-phase signal and updating the encoder count value during the rotation driving of the rotor, determines whether the A-phase signal and the B-phase signal The rotation direction of the encoder is determined, the encoder count value is counted up or down according to the rotation direction, and an energizing phase is selected and energized according to the encoder count value and the rotation direction of the rotor. The motor control device according to claim 1.
前記モータは、車両の自動変速機のレンジを切り換えるレンジ切換機構を駆動することを特徴とする請求項1乃至5のいずれかに記載のモータ制御装置。6. The motor control device according to claim 1, wherein the motor drives a range switching mechanism that switches a range of the automatic transmission of the vehicle.
JP2002175377A 2002-06-03 2002-06-17 Motor controller Pending JP2004023889A (en)

Priority Applications (9)

Application Number Priority Date Filing Date Title
JP2002175377A JP2004023889A (en) 2002-06-17 2002-06-17 Motor controller
US10/443,795 US7084597B2 (en) 2002-06-03 2003-05-23 Motor control apparatus
DE10324846A DE10324846A1 (en) 2002-06-03 2003-06-02 Engine control unit
DE10362105.9A DE10362105B4 (en) 2002-06-03 2003-06-02 Engine control unit
US11/257,306 US7221116B2 (en) 2002-06-03 2005-10-25 Motor control apparatus
US11/404,869 US20060197489A1 (en) 2002-06-03 2006-04-17 Motor control apparatus
US11/730,871 US7609012B2 (en) 2002-06-03 2007-04-04 Motor control apparatus
US12/382,603 US8013563B2 (en) 2002-06-03 2009-03-19 Motor control apparatus
US12/926,585 US8134322B2 (en) 2002-06-03 2010-11-29 Motor control apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002175377A JP2004023889A (en) 2002-06-17 2002-06-17 Motor controller

Publications (1)

Publication Number Publication Date
JP2004023889A true JP2004023889A (en) 2004-01-22

Family

ID=31174046

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002175377A Pending JP2004023889A (en) 2002-06-03 2002-06-17 Motor controller

Country Status (1)

Country Link
JP (1) JP2004023889A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008086149A (en) * 2006-09-28 2008-04-10 Seiko Epson Corp Motor control device, document reading device, and motor control method
JP2017028919A (en) * 2015-07-25 2017-02-02 株式会社デンソー Range switching controller
CN114365415A (en) * 2019-09-10 2022-04-15 株式会社电装 Motor control device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008086149A (en) * 2006-09-28 2008-04-10 Seiko Epson Corp Motor control device, document reading device, and motor control method
JP2017028919A (en) * 2015-07-25 2017-02-02 株式会社デンソー Range switching controller
CN114365415A (en) * 2019-09-10 2022-04-15 株式会社电装 Motor control device

Similar Documents

Publication Publication Date Title
US6992451B2 (en) Motor control apparatus operable in fail-safe mode
JP5454962B2 (en) Motor control device
US7990088B2 (en) Motor control apparatus
JP5648854B2 (en) Motor control device
JP5093624B2 (en) Motor control device
JP3849864B2 (en) Motor control device
JP3886042B2 (en) Motor control device
JP3800529B2 (en) Motor control device
JP2004023890A (en) Motor controller
JP3849930B2 (en) Motor control device
JP3849931B2 (en) Motor control device
JP4082164B2 (en) Motor control device
JP3947922B2 (en) Motor control device
JP4189953B2 (en) Position switching control device
JP3871130B2 (en) Motor control device
JP2017161455A (en) Control device
JP5472044B2 (en) Motor control device
JP3888940B2 (en) Motor control device
JP3849627B2 (en) Motor control device
JP3800532B2 (en) Motor control device
JP3888278B2 (en) Motor control device
JP2004023889A (en) Motor controller
JP3849629B2 (en) Motor control device
JP6357798B2 (en) Motor control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040901

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060117

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060130

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060526