JP3800532B2 - Motor control device - Google Patents

Motor control device Download PDF

Info

Publication number
JP3800532B2
JP3800532B2 JP2002177738A JP2002177738A JP3800532B2 JP 3800532 B2 JP3800532 B2 JP 3800532B2 JP 2002177738 A JP2002177738 A JP 2002177738A JP 2002177738 A JP2002177738 A JP 2002177738A JP 3800532 B2 JP3800532 B2 JP 3800532B2
Authority
JP
Japan
Prior art keywords
phase
rotor
energization
control
energized
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.)
Expired - Fee Related
Application number
JP2002177738A
Other languages
Japanese (ja)
Other versions
JP2004023931A (en
Inventor
康裕 中井
神尾  茂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2002177738A priority Critical patent/JP3800532B2/en
Priority to US10/443,795 priority patent/US7084597B2/en
Priority to DE10362105.9A priority patent/DE10362105B4/en
Priority to DE10324846A priority patent/DE10324846A1/en
Publication of JP2004023931A publication Critical patent/JP2004023931A/en
Priority to US11/257,306 priority patent/US7221116B2/en
Priority to US11/404,869 priority patent/US20060197489A1/en
Application granted granted Critical
Publication of JP3800532B2 publication Critical patent/JP3800532B2/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
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Control Of Electric Motors In General (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、モータの通電相を順次切り換えることでロータを目標位置まで回転駆動するモータ制御装置に関するものである。
【0002】
【従来の技術】
近年、構造が簡単で安価なモータとして需要が増加しているスイッチトリラクタンスモータ等のブラシレス型のモータは、ロータの回転に同期してパルス信号を出力するエンコーダを搭載し、このエンコーダの出力信号をカウントして、そのエンコーダカウント値に基づいてロータの回転位置を検出して通電相を順次切り換えることでロータを回転駆動するようにしたものがある。このようなエンコーダ付きのモータは、起動後のエンコーダカウント値に基づいてロータの回転位置を検出することができるため、フィードバック制御系(閉ループ制御系)によりロータを目標位置まで回転させる位置切換制御(位置決め制御)を行う各種の位置切換装置の駆動源として用いられている。
【0003】
【発明が解決しようとする課題】
このようなエンコーダ付きのモータで、エンコーダカウント値に基づいてロータの回転位置を検出して目標位置まで回転駆動する際に、通電相の切り換えは、エンコーダカウント値に基づいて決定される。この際、ロータを回転駆動するトルクを発生させるためには、ロータの回転位相に対して通電相の位相を進める必要がある。
【0004】
駆動開始後に、ロータの回転速度が上昇するのに伴って、エンコーダカウント値の変化速度が速くなって、通電相の切り換えタイミングが速くなるが、通電相の巻線に通電を開始してから実際にトルクが発生するまでに、巻線のインダクタンス分の遅れが生じるため、ロータの回転速度が速くなると、通電相の巻線に通電を開始してから実際にトルクを発生するまでの間に、ロータがかなりの角度回転して、実際のロータの回転位相に対して通電相のトルク発生タイミングが遅れた状態となる。このような状態になると、駆動トルクが低下してロータの回転速度が抑えられてしまい、位置切換速度の高速化(ロータの回転速度の高速化)の要求を満たすことができない。
【0005】
この対策として、予め、通電相の位相進み量を大きく設定しておくことが考えられるが、駆動開始時(起動時)に、通電相の位相進み量が大きいと、起動トルクが小さくなってモータの起動が不安定になったり、起動に失敗するおそれがある。
【0006】
また、予め、通電相の位相進み量を大きく設定してロータの回転速度を高速化すると、駆動終了時にロータが慣性により目標位置を越えてオーバーシュートしやすくなり、ロータを正確に目標位置で停止させることが難しくなる。
【0007】
また、位置切換制御の安定性を向上させるために、駆動開始時、駆動終了時、目標位置変更時(回転方向反転時)の各位置で、ロータを一時的に停止保持するように通電相を選択して通電することが考えられるが、この停止保持を保持トルクの小さい1相通電で行うと、ロータが振動してしまい、ロータを各位置で完全に停止させることができない。
【0008】
本発明はこれらの事情を考慮してなされたものであり、本発明の目的は、起動性能と高速性能とを両立させると共に、停止性能(減速性能)も向上させることである
【0009】
【課題を解決するための手段】
記目的を達成するために、本発明の請求項1のモータ制御装置は、エンコーダカウント値に基づいてモータの通電相を順次切り換えてロータを目標位置まで回転駆動する際に、ロータの回転速度に応じて該ロータの回転位相に対する通電相の位相進み量を補正する第1の補正手段と、前記ロータの回転速度を減速させる必要が生じたときに前記通電相の位相進み量を小さくする方向に補正する第2の補正手段とを有することを特徴とするものである。この構成では、駆動開始時に、通電相の位相進み量を小さくするように補正すれば、起動トルクを大きくすることができ、ロータの回転速度を素早く立ち上げることができる。そして、ロータの回転速度が上昇するのに伴って、通電相の位相進み量を大きくするように補正すれば、高速回転時でも、通電相のトルク発生タイミングと実際のロータの回転位相との同期関係を維持することができ、ロータを高速で安定して回転させることができる。これにより、起動性能と高速性能とを両立させることができる。
【0010】
更に、請求項1に係る発明では、ロータの回転速度を減速させる必要が生じたときに(例えばロータが目標位置に近付いたときに)、通電相の位相進み量を小さくする方向に補正する第2の補正手段を備えている。例えば、高速回転時に、減速したい場合は、通電相の位相進み量を小さくする方向に補正すれば、実際のロータの回転位相に対して通電相のトルク発生タイミングが遅れた状態となり、それによって、駆動トルクを低下させたり、或は、ロータの回転方向と反対方向のトルク(制動トルク)を発生させることができ、ロータの回転速度を確実に減速させることができる。
【0017】
また、請求項のように、モータとしてスイッチトリラクタンスモータを使用するようにしても良い。スイッチトリラクタンスモータは、永久磁石が不要で構造が簡単であるため、安価であり、温度環境等に対する耐久性・信頼性も高いという利点がある。
【0018】
以上説明した請求項1,2に係る発明は、スイッチトリラクタンスモータ等のブラシレス型のモータを駆動源とする各種の位置切換装置に適用でき、例えば、請求項のように、車両の自動変速機のレンジを切り換えるレンジ切換機構を駆動するモータの制御装置に適用しても良い。これにより、信頼性の高いモータ駆動式のレンジ切換装置を構成することができる。
【0019】
【発明の実施の形態】
以下、本発明を車両のレンジ切換装置に適用した一実施形態を図面に基づいて説明する。
【0020】
まず、図1に基づいてレンジ切換機構11の構成を説明する。レンジ切換機構11の駆動源となるモータ12は、例えばスイッチトリラクタンスモータにより構成され、減速機構26(図4参照)を内蔵し、その出力軸13の回転位置を検出する出力軸センサ14が設けられている。この出力軸13には、ディテントレバー15が固定されている。
【0021】
また、ディテントレバー15にはL字形のパーキングロッド18が固定され、このパーキングロッド18の先端部に設けられた円錐体19がロックレバー21に当接している。このロックレバー21は、円錐体19の位置に応じて軸22を中心にして上下動してパーキングギヤ20をロック/ロック解除するようになっている。パーキングギヤ20は、自動変速機27の出力軸に設けられ、このパーキングギヤ20がロックレバー21によってロックされると、車両の駆動輪が回り止めされた状態(パーキング状態)に保持される。
【0022】
一方、ディテントレバー15をパーキングレンジ(以下「Pレンジ」と表記する)と他のレンジ(以下「NotPレンジ」と表記する)に保持するためのディテントバネ23が支持ベース17に固定され、このディテントバネ23の先端に設けられた係合部23aがディテントレバー15のPレンジ保持凹部24に嵌まり込んだときに、ディテントレバー15がPレンジの位置に保持され、該ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25に嵌まり込んだときに、ディテントレバー15がNotPレンジの位置に保持されるようになっている。
【0023】
Pレンジでは、パーキングロッド18がロックレバー21に接近する方向に移動して、円錐体19の太い部分がロックレバー21を押し上げてロックレバー21の凸部21aがパーキングギヤ20に嵌まり込んでパーキングギヤ20をロックした状態となり、それによって、自動変速機27の出力軸(駆動輪)がロックされた状態(パーキング状態)に保持される。
【0024】
一方、NotPレンジでは、パーキングロッド18がロックレバー21から離れる方向に移動して、円錐体19の太い部分がロックレバー21から抜け出てロックレバー21が下降し、それによって、ロックレバー21の凸部21aがパーキングギヤ20から外れてパーキングギヤ20のロックが解除され、自動変速機27の出力軸が回転可能な状態(走行可能な状態)に保持される。
【0025】
尚、前述した出力軸センサ14は、モータ12の減速機構26の出力軸13の回転角度に応じた電圧を出力する回転センサ(例えばポテンショメータ)によって構成され、その出力電圧によって現在のレンジがPレンジとNotPレンジのいずれであるかを確認できるようになっている。
【0026】
次に、図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の数は適宜変更しても良いことは言うまでもない。
【0027】
本実施形態の巻線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’相が同時に通電される。
【0028】
これら2つのモータ励磁部35は、車両に搭載されたバッテリ40を電源として、それぞれ別個のモータドライバ37,38によって駆動される。このように、モータ励磁部35,36とモータドライバ37,38をそれぞれ2系統ずつ設けることで、一方の系統が故障しても、他方の系統でSRモータ12を回転させることができるようになっている。図3に示すモータドライバ37,38の回路構成例では、各相毎にトランジスタ等のスイッチング素子39を1個ずつ設けたユニポーラ駆動方式の回路構成としているが、各相毎にスイッチング素子を2個ずつ設けたバイポーラ駆動方式の回路構成を採用しても良い。尚、本発明は、モータ励磁部とモータドライバをそれぞれ1系統ずつ設けた構成としても良いことは言うまでもない。
【0029】
各モータドライバ37,38の各スイッチング素子39のオン/オフは、ECU41(制御手段)によって制御される。図4に示すように、このECU41と各モータドライバ37,38は、レンジ切換制御装置42に搭載され、このレンジ切換制御装置42には、Pレンジへの切換操作を行うPレンジスイッチ43と、NotPレンジへの切換操作を行うNotPレンジスイッチ44の操作信号が入力される。Pレンジスイッチ43又はNotPレンジスイッチ44の操作により選択されたレンジは、インストルメントパネル(図示せず)に設けられたレンジ表示部45に表示される。
【0030】
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極となっている。
【0031】
更に、ロータ32の基準回転位置に相当する位置のN極(N’)とその両側のS極(S’)がそれ以外の磁極よりも径方向の幅が広くなるように形成されている。尚、本実施形態では、SRモータ12の通電相の切り換えが一巡する間にロータ32とロータリマグネット47が一体的に45°回転することを考慮して、ロータ32の基準回転位置に相当する幅広な着磁部分(N’)が45°ピッチで形成されており、従って、ロータリマグネット47全体として、基準回転位置に相当する幅広な着磁部分(N’)が合計8個形成されている。尚、基準回転位置に相当する幅広な着磁部分(N’)は、ロータリマグネット47全体として、1個のみ形成した構成としても良い。
【0032】
このロータリマグネット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となるように配置されている。
【0033】
各磁気検出素子48,49,50の出力は、N極(N’極)と対向したときにハイレベル“1”となり、S極(S’極)と対向したときにローレベル“0”となる。尚、Z相信号用の磁気検出素子50の出力は、ロータ32の基準回転位置に相当する幅広なN’極に対向する毎にハイレベル“1”となり、それ以外の位置では、ローレベル“0”となる。
【0034】
本実施形態では、ECU41が後述するエンコーダカウンタルーチンによってA相信号とB相信号の立ち上がり/立ち下がりの両方のエッジをカウントして、そのエンコーダカウント値に応じてSRモータ12の通電相を切り換えることでロータ32を回転駆動する。この際、A相信号とB相信号の発生順序によってロータ32の回転方向を判定し、正回転(Pレンジ→NotPレンジの回転方向)ではエンコーダカウント値をカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではエンコーダカウント値をカウントダウンする。これにより、ロータ32が正回転/逆回転のいずれの方向に回転しても、エンコーダカウント値とロータ32の回転位置との対応関係が維持されるため、正回転/逆回転のいずれの回転方向でも、エンコーダカウント値によってロータ32の回転位置(回転角度)を検出して、その回転位置に対応した相の巻線33,34に通電してロータ32を回転駆動する。
【0035】
図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相信号が出力されると言う場合がある。
【0036】
ところで、エンコーダカウント値は、ECU41のRAMに記憶されるため、ECU41の電源がオフされると、エンコーダカウント値の記憶が消えてしまう。そのため、ECU41の電源投入直後のエンコーダカウント値(0)は、実際のロータ32の回転位置(通電相)に対応したものとならい。従って、エンコーダカウント値に応じて通電相を切り換えるためには、電源投入後にエンコーダカウント値と実際のロータ32の回転位置とを対応させて、エンコーダカウント値と通電相とを対応させる必要がある。
【0037】
そこで、本実施形態では、レンジ切換制御装置42のECU41によって後述する図8及び図9に示す初期駆動ルーチンを実行することで、ECU41への電源投入後の初期駆動時に、SRモータ12の通電相の切り換えを所定のタイムスケジュールで一巡させてエンコーダ46のA相信号及びB相信号のエッジをカウントし、初期駆動終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダカウント値と初期駆動終了時の学習結果とに基づいて通電相を決定するようにしている。
【0038】
この初期駆動時の学習は、具体的には次のようにして行われる。図12に示すように、PレンジでECU41に電源が投入されたときに初期駆動を行う場合は、例えば、W相通電→UW相通電→U相通電→UV相通電→V相通電→VW相通電の順序で通電相の切り換えを所定のタイムスケジュールで一巡し、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に駆動する。
【0039】
一方、NotPレンジでECU41に電源が投入されたときに初期駆動を行う場合は、例えば、V相通電→UV相通電→U相通電→UW相通電→W相通電→VW相通電の順序で通電相の切り換えを所定のタイムスケジュールで一巡し、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に駆動する。
【0040】
この初期駆動時には、1相通電の時間T1を2相通電の時間T2よりも短くし、例えばT1=10ms、T2=100msに設定する。初期駆動中にロータ32の回転位置と通電相との同期がとれた後でも、トルクが小さい1相通電では、ロータ32が振動するため、1相通電の時間T1を短くして、できるだけ速やかに次の2相通電に切り換えることで、ロータ32の振動を速やかに停止させてエンコーダ46の出力信号を安定させるようにしている。
【0041】
このように、初期駆動時に通電相の切り換えを一巡させれば、初期駆動が終了するまでに、いずれかの通電相で必ずロータ32の回転位置と通電相とが一致して、それ以後、通電相の切り換えに同期してロータ32が回転して、このロータ32の回転に同期してエンコーダ46からA相信号及びB相信号が出力されるようになる。
【0042】
この初期駆動中に、エンコーダ46のA相信号及びB相信号の立ち上がり/立ち下がりの両方のエッジをカウントする。従って、初期駆動終了時のエンコーダカウント値を見れば、初期駆動が終了するまでにロータ32が実際に通電相の切り換えに同期して回転した角度(回転量)が分かり、それによって、初期駆動終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係が分かる。
【0043】
図12の例では、初期駆動時に最初の通電相(W相)からロータ32が回転し、通電相の切り換え毎にロータ32が7.5°ずつ回転してエンコーダカウント値が2ずつカウントアップし、初期駆動終了時にエンコーダカウント値が12となる。
【0044】
これに対し、例えば、初めの3回の励磁(W相通電→UW相通電→U相通電)でロータ32が回転しない場合、つまり4回目以降の励磁(UV相通電→V相通電→VW相通電)でロータ32の回転位置と通電相とが同期してロータ32が3回の励磁分だけ回転する場合は、初期駆動終了時までにロータ32が7.5°×3=22.5°回転して、エンコーダカウント値が2×3=6となる。従って、初期駆動終了時のエンコーダカウント値を見れば、初期駆動が終了するまでにロータ32が実際に通電相の切り換えに同期して回転した角度(回転量)が判明する。
【0045】
初期駆動の最後の通電相は、常にVW相となるが、エンコーダカウント値は、必ずしも12になるとは限らず、例えば8、或は4である場合もある。初期駆動終了後の通常駆動時には、エンコーダカウント値に基づいて通電相が決定されるため、初期駆動によるエンコーダカウント値のずれを修正しないと、通常駆動時に正しい通電相を選択することができない。
【0046】
そこで、本実施形態では、初期駆動終了時のエンコーダカウント値を初期位置ずれ学習値として学習し、その後の通常駆動時にエンコーダカウント値を初期位置ずれ学習値で補正することで、初期駆動終了時のエンコーダカウント値と通電相(ロータ32の回転位置)とのずれを補正して、通常駆動時に正しい通電相を選択できるようにしている。
【0047】
初期駆動終了後は、図12に示すように、後述するF/B制御開始位置停止保持処理により、初期駆動終了時の通電相(VW相)と同じ相に例えば10ms通電してロータ32の位置を初期駆動終了時の位置に保持し、その後、後述するフィードバック制御(以下「F/B制御」と表記する)により、その時点のエンコーダカウント値と初期位置ずれ学習値とに基づいて通電相を切り換えてロータ32を目標位置Acntの方向へ回転させる。これにより、ロータ32の回転位置(エンコーダカウント値)が目標位置Acntから例えば0.5°以内に到達した時点で、通電相の切り換えを終了してロータ32を停止させ、その後は、後述する目標位置停止保持処理により、同じ相に通電し続けてロータ32の停止状態を保持し、この保持状態を例えば50ms継続する。この後、目標位置Acntが変化しなければ、通電を停止する。
【0048】
また、初期駆動の途中で、Pレンジスイッチ43又はNotPレンジスイッチ44が操作されてレンジ切換要求が発生した場合は、次の2相通電(2相通電の実行中にレンジ切換要求が発生したときはその2相通電)が終了してから通常駆動に移行すると共に、該2相通電終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダカウント値と2相通電終了時の学習結果とに基づいて通電相を決定するようにしている。
【0049】
2相通電では、トルクが大きいため、ロータ32の位置が2相通電に対応する位置から多少ずれていたとしても、ロータ32を2相通電に対応する位置まで回転させることができる。このため、初期駆動中に2相通電を1〜2回行うだけでロータ32の回転位置と通電相との同期がとれる確率は高いものと思われる。従って、初期駆動の途中でレンジ切換要求が発生したときには、次の2相通電(又は現在の2相通電)が終了してから通常駆動に移行するようにすれば、初期駆動の途中で、エンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習してから、通常駆動に速やかに移行することができる。
【0050】
例えば、図13のタイムチャートに示すように、初期駆動の2回目の励磁(UW相通電)中に、PレンジからNotPレンジへのレンジ切換要求が発生したときには、このUW相通電で初期駆動を終了して通常駆動に移行すると共に、UW相通電終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習する。本実施形態では、初期駆動の途中で通常駆動に移行する場合でも、その初期駆動を最後まで実行したと仮定して、本来の初期駆動終了時のエンコーダカウント値を推定し、その推定値を初期位置ずれ学習値とするようにしている。例えば、図13に示すように、初期駆動をW相通電とUW相通電の2回の励磁で終了する場合は、その後に予定されていた4回の励磁を行わずに初期駆動を終了するため、未終了の4回の励磁(U相通電→UV相通電→V相通電→VW相通電)を行ったものと仮定して、4回の励磁分の回転角度に相当するカウントアップ値(2×4=8)をUW相通電終了時のエンコーダカウント値に加算して初期位置ずれ学習値を求める。
【0051】
ところで、従来のレンジ切換制御では、指令シフトレンジ(目標位置)がPレンジからNotPレンジ又はその反対方向に切り換えられる毎に、ロータ32を回転駆動して、エンコーダカウント値に基づいてSRモータ12の通電相を順次切り換えることでロータ32を目標位置まで回転駆動するフィードバック制御(以下「F/B制御」と表記する)を実行した後に、SRモータ12への通電をオフするようにしている。
【0052】
この場合、F/B制御終了後に、目標位置に対応する相の巻線に通電し続ければ、ロータ32を目標位置で電磁力により保持し続けることができるが、この構成では、停止時間が長くなると、同じ相の巻線に連続して長い時間通電し続けることになるため、巻線が過熱して焼損するおそれがある。そのため、ロータ32の停止中は、巻線への通電をオフして巻線の過熱・焼損を防止するようにしている。
【0053】
しかし、ロータ32の停止中に、通電をオフすると、ロータ32を目標位置(F/B制御終了時の位置)に保持する電磁力が消滅するため、ロータ32の位置が目標位置からずれる可能性がある。本実施形態では、ロータ32を目標位置でディテントバネ23のバネ力により保持する機械的な停止保持機構を設けているが、この場合でも、停止保持機構のガタや製造ばらつき等によりロータ32の位置が目標位置からずれることがある。
【0054】
また、従来のレンジ切換制御では、F/B制御開始時に前回のF/B制御終了時のエンコーダカウント値を用いて最初の通電相を決定し、更に、最初の通電相決定後、直ちにF/B制御を開始するようにしている。
【0055】
従って、ロータ32の位置が停止中にずれた場合、従来のレンジ切換制御では、実際に最初に通電すべき通電相とは異なる通電相からF/B制御を開始してしまうことになる。このため、F/B制御開始時に脱調が発生して起動に失敗したり、ロータ32が目標位置とは反対方向に回転するなど、ロータ32を正常に目標位置へ回転させることができなくなる可能性がある。
【0056】
また、停止中のロータ32のずれ量が小さく、ロータ32の位置が前回のF/B制御終了時のエンコーダカウント値に相当する範囲内に収まっていた場合は、最初に通電すべき通電相は前回のF/B制御終了時の通電相となる。従って、この場合は、従来のレンジ切換制御でも、最初に通電すべき通電相に関しては問題ない。
【0057】
しかしながら、F/B制御は、通電時のロータ32の位置を基準にして行われるため、仮に、ロータ32の位置ずれが前回のF/B制御終了時のエンコーダカウント値に相当する範囲内に収まっていたとしても、最初の通電相に通電を行ってから、ロータ32の位置が通電時のロータ32の位置に移動・保持される前にF/B制御が開始されると、F/B制御開始時に脱調が発生して起動に失敗する可能性がある。
【0058】
この対策として、本実施形態では、図18に示すように、SRモータ12の通電オフ状態からF/B制御を開始するときに、現在のエンコーダカウント値に基づいて通電相を選択して2相通電でロータ32を停止保持する処理(以下「F/B制御開始位置停止保持処理」という)を所定時間(例えば10ms)だけ実行し、その後、F/B制御を実行してロータ32を目標位置まで回転駆動するようにしている。
【0059】
このようにすれば、仮に、ロータ32の停止中にロータ32の位置がずれても、F/B制御開始直前にF/B制御開始位置停止保持処理によってロータ32の位置ずれを修正して、F/B制御開始時のロータ32の位置を正確に位置決めすることができる。これにより、F/B制御開始時に最初の通電相からロータ32の位置と通電相(エンコーダカウント値)とを確実に同期させることができて、F/B制御開始時の脱調やロータ32が目標位置と反対方向に回転することを防止でき、安定したF/B制御を行ってロータ32を確実に目標位置まで回転させることができて、安定性・信頼性の高い位置切換制御(位置決め制御)を行うことができる。
【0060】
ところで、位置切換制御を高応答化するために、ロータ32の回転速度を高速化して目標位置までの到達時間を短くするようにしている。このため、ロータ32が目標位置に到達した直後は、ロータ32が完全に停止せずにまだ振動した状態になっており、このような状態で通電をオフすると、慣性力によりロータ32の停止位置が目標位置から大きくずれてしまう可能性がある。このようなF/B制御終了時のロータ32の位置ずれが大きくなりすぎると、次のF/B制御開始直前にF/B制御開始位置停止保持処理を行っても、ロータ32の位置ずれを修正することができなくなる可能性がある。
【0061】
この対策として、本実施形態では、F/B制御終了後に、ロータ32を当該F/B制御終了時の位置に2相通電で停止保持する処理(以下「目標位置停止保持処理」という)を所定時間(例えば50ms)だけ実行した後、SRモータ12への通電をオフするようにしている。このようにすれば、ロータ32が目標位置に到達した後、ロータ32の振動が収まってから通電をオフすることができるので、慣性力によりロータ32の停止位置が目標位置から大きくずれることを防止することができる。これにより、位置切換制御の安定性・信頼性を維持しながら、位置切換制御の高応答化の要求も満たすことができる。
【0062】
更に、本実施形態では、F/B制御中に指令シフトレンジ(目標位置)が変更されてロータ32の回転方向を反転させる必要が生じたときに、ロータ32を反転位置で2相通電により停止保持する処理(以下「反転位置停止保持処理」という)を所定時間(例えば50ms)だけ実行し、その後、F/B制御を再開してロータ32を変更後の目標位置まで回転駆動するようにしている。このようにすれば、F/B制御中に指令シフトレンジ(目標位置)が変更されたときに、ロータ32の反転位置を位置決めして反転動作を安定して行うことができ、反転位置がずれて脱調(通電相のずれ)が発生することを防止できて、ロータ32を変更後の目標位置まで確実に回転駆動することができる。
【0063】
また、本実施形態では、F/B制御中にエンコーダカウント値と目標位置に相当する目標カウント値との差が所定値(例えば通電相の位相進み分に相当するカウント値)以下になったときに、F/B制御を終了して目標位置停止保持処理に移行するようにしている。つまり、ロータ32を回転させるためには、図19に示すように、通電相の位相をロータ32の実際の位置よりも例えば2〜4カウント分(ロータ回転角で3.75°〜15°)だけ進める必要があるため、F/B制御中にエンコーダカウント値と目標カウント値との差が例えば通電相の位相進み分に相当するカウント値になったときに、F/B制御を終了するようにすれば、F/B制御の最後の通電相がロータ32を目標位置に停止保持する通電相と一致するため、目標位置停止保持処理移行後も、F/B制御の最後の通電相に引き続き通電することができ、F/B制御から目標位置停止保持処理への移行をスムーズに行うことができる。
【0064】
ところで、ロータ32を回転駆動するトルクを発生させるためには、ロータ32の回転位相に対して通電相の位相を進める必要がある。F/B制御開始後に、ロータ32の回転速度が上昇するのに伴って、エンコーダカウント値の変化速度が速くなって、通電相の切り換えタイミングが速くなるが、通電相の巻線33,34に通電を開始してから実際にトルクが発生するまでに、巻線33,34のインダクタンス分の遅れが生じるため、ロータ32の回転速度が速くなると、通電相の巻線33,34に通電を開始してから実際にトルクを発生するまでの間に、ロータ32がかなりの角度回転して、実際のロータ32の回転位相に対して通電相のトルク発生タイミングが遅れた状態となる。このような状態になると、駆動トルクが低下してロータ32の回転速度が抑えられてしまい、位置切換速度の高速化(ロータの回転速度の高速化)の要求を満たすことができない。
【0065】
この対策として、予め、通電相の位相進み量を大きく設定しておくことが考えられるが、F/B制御開始時(起動時)に、通電相の位相進み量が大きいと、起動トルクが小さくなってSRモータ12の起動が不安定になったり、起動に失敗するおそれがある。
【0066】
また、予め、通電相の位相進み量を大きく設定してロータ32の回転速度を高速化すると、F/B制御終了時にロータ32が慣性により目標位置を越えてオーバーシュートしやすくなり、ロータ32を正確に目標位置で停止させることが難しくなる。
【0067】
そこで、本実施形態では、F/B制御中に、ロータ32の回転速度に応じて該ロータ32の回転位相に対する通電相の位相進み量を補正すると共に、ロータ32の回転速度を減速させる必要が生じたときに(例えばロータ32が目標位置に近付いたときに)、通電相の位相進み量を小さくする方向に補正するようにしている。具体的には、F/B制御開始時に、通電相の位相進み量を小さくするように補正することで、起動トルクを大きくすることができ、ロータ32の回転速度を素早く立ち上げることができる。そして、ロータ32の回転速度が上昇するのに伴って、通電相の位相進み量を大きくするように補正することで、高速回転時でも、通電相のトルク発生タイミングと実際のロータの回転位相との同期関係を維持することができ、ロータ32を高速で安定して回転させることができる。これにより、起動性能と高速性能とを両立させることができる。
【0068】
その後、ロータ32が目標位置に近付いたときに、通電相の位相進み量を小さくする方向に補正すれば、実際のロータ32の回転位相に対して通電相のトルク発生タイミングが遅れた状態となり、それによって、駆動トルクを低下させたり、或は、ロータ32の回転方向と反対方向のトルク(制動トルク)を発生させることができ、ロータ32の回転速度を確実に減速させることができて、ロータ32を正確に目標位置で停止させることができる。これにより、起動性能と高速性能と停止性能(減速性能)に優れたF/B制御を行うことができる。
【0069】
以上説明したレンジ切換制御は、レンジ切換制御装置42のECU41によって後述する各ルーチンに従って実行される。以下、これら各ルーチンの処理内容を説明する。
【0070】
[初期駆動]
図8及び図9に示す初期駆動ルーチンに従って実行される。本ルーチンは、ECU41への電源投入直後(イグニッションスイッチをOFF位置からACC位置へ操作した直後)に、初期駆動が終了するまで所定周期(例えば1ms周期)で実行される。
【0071】
本ルーチンが起動されると、まずステップ101で、オープンループ制御実行フラグXopen=ON、又は、リカバリ処理実行フラグXrcv=ONであるか否かを判定する。ここで、オープンループ制御実行フラグXopenは、エンコーダ46又はSRモータ12が故障したときに実行されるオープンループ制御(フェイルセーフ処理)が実行されているか否かを判定するフラグであり、ONは実行されていることを意味する。また、リカバリ処理実行フラグXrcvは、一時的な動作異常が発生したときに一時的に実行されるリカバリ処理(オープンループ制御)が実行されているか否かを判定するフラグであり、ONは実行されていることを意味する。
【0072】
もし、上記ステップ101で、「Yes」と判定されれば、以降の処理を行うことなく、本ルーチンを終了し、「No」と判定されれば、ステップ102に進み、ECU41のイニシャル処理から出力軸センサ14の出力電圧が安定するまで待つための所定時間(例えば100ms)が経過したか否かを判定する。そして、イニシャル処理から所定時間経過した時点で、ステップ103に進み、出力軸センサ14の出力電圧を読み込んで、この出力電圧がレンジ判定値以下であるか否かで、現在のレンジがPレンジかNotPレンジかを判定し、Pレンジであれば、ステップ104に進み、レンジ判定フラグXnpをPレンジを意味する「0」にセットし、NotPレンジであれば、ステップ105に進み、レンジ判定フラグXnpをNotPレンジを意味する「1」にセットする。
【0073】
この後、ステップ106に進み、レンジ判定フラグXnp=0(Pレンジ)であるか否かを判定し、レンジ判定フラグXnp=0(Pレンジ)であれば、ステップ107に進み、図10のPレンジ初期駆動ルーチンを実行し、レンジ判定フラグXnp=1(NotPレンジ)であれば、ステップ108に進み、図11のNotPレンジ初期駆動ルーチンを実行する。
【0074】
上記ステップ107で、図10のPレンジ初期駆動ルーチンが起動されると、ステップ201〜206で、初期駆動中の励磁回数をカウントする励磁回数カウンタCASEが0〜5のいずれであるかを判定する。この励磁回数カウンタCASEは、イニシャル処理でセットされる初期値が0で、励磁を1回行う毎に1ずつカウントアップされる(図9のステップ114)。そして、励磁回数カウンタCASEの判定結果に応じて通電相と通電時間Tを次のように設定する。
【0075】
CASE=0(1回目の励磁)の場合は、ステップ207に進み、W相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=1(2回目の励磁)の場合は、ステップ208に進み、UW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0076】
CASE=2(3回目の励磁)の場合は、ステップ209に進み、U相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=3(4回目の励磁)の場合は、ステップ210に進み、UV相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0077】
CASE=4(5回目の励磁)の場合は、ステップ211に進み、V相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=5(6回目の励磁)の場合は、ステップ212に進み、VW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0078】
これにより、Pレンジで初期駆動を行う場合は、W相通電→UW相通電→U相通電→UV相通電→V相通電→VW相通電の順序で通電相の切り換えを一巡し、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に駆動する。この際、1相通電の時間T1を2相通電の時間T2よりも短く設定する。
【0079】
一方、ステップ108で、図11のNotPレンジ初期駆動ルーチンが起動されると、ステップ221〜226で、励磁回数カウンタCASEが0〜5のいずれであるかを判定し、その判定結果に応じて通電相と通電時間Tを次のように設定する。
【0080】
CASE=0(1回目の励磁)の場合は、ステップ227に進み、V相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=1(2回目の励磁)の場合は、ステップ228に進み、UV相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0081】
CASE=2(3回目の励磁)の場合は、ステップ229に進み、U相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=3(4回目の励磁)の場合は、ステップ230に進み、UW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0082】
CASE=4(5回目の励磁)の場合は、ステップ231に進み、W相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=5(6回目の励磁)の場合は、ステップ232に進み、VW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0083】
これにより、NotPレンジで初期駆動を行う場合は、V相通電→UV相通電→U相通電→UW相通電→W相通電→VW相通電の順序で通電相の切り換えを一巡し、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に駆動する。この場合も、1相通電の時間T1を2相通電の時間T2よりも短く設定する。
【0084】
以上のようにして、図10のPレンジ初期駆動ルーチン又は図11のNotPレンジ初期駆動ルーチンを実行した後、図8のステップ109に進み、初期駆動中にレンジ切換操作(Pレンジスイッチ43又はNotPレンジスイッチ44の操作)が行われたか否かを判定し、初期駆動中にレンジ切換操作が行われれば、ステップ110に進み、レンジ切換操作フラグXchgをONにセットし、レンジ切換操作が行われていなければ、ステップ111に進み、レンジ切換操作フラグXchgをOFFにセットする。
【0085】
この後、図9のステップ112に進み、現在の通電相の通電時間をカウントする通電時間カウンタCTをカウントアップし、次のステップ113で、現在の通電相の通電時間CTが前記図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えたか否かを判定し、越えていなければ、以降の処理を行うことなく、本ルーチンを終了する。これにより、現在の通電相の通電時間CTが図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えるまで、現在の通電相への通電が継続される。
【0086】
その後、現在の通電相の通電時間CTが図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えた時点で、ステップ114に進み、励磁回数カウンタCASEを1だけカウントアップし、通電相を次の通電相に切り換える。そして、次のステップ115で、通電時間カウンタCTをリセットした後、ステップ116に進み、励磁回数カウンタCASEが初期駆動の終了を意味する「6」に達したか否かを判定し、もし、励磁回数カウンタCASEが「6」に達していれば、ステップ118に進み、初期駆動終了フラグXendを初期駆動の終了を意味する「ON」にセットする。
【0087】
また、励磁回数カウンタCASEが「6」に達していない場合、つまり、初期駆動の途中である場合は、ステップ117に進み、初期駆動の途中終了条件が成立しているか否かを判定する。この初期駆動の途中終了条件は、次の3つの条件▲1▼〜▲3▼によって判定される。
▲1▼レンジ判定フラグXnpが0(Pレンジ)であること
▲2▼励磁回数カウンタCASEが2又は4、つまり2相通電終了時であること
▲3▼レンジ切換操作フラグXchgがON、つまり初期駆動中にレンジ切換操作が行われたこと
【0088】
これら3つの条件▲1▼〜▲3▼のうち、1つでも満たさない条件があれば、初期駆動の途中終了条件が成立せず、初期駆動を継続する。これに対し、3つの条件▲1▼〜▲3▼を全て満たしていれば、初期駆動の途中終了条件が成立して、ステップ118に進み、初期駆動終了フラグXendを初期駆動の終了を意味する「ON」にセットする。
【0089】
この後、ステップ119に進み、レンジ判定フラグXnp=1であるか否か(NotPレンジで初期駆動を行ったか否か)を判定し、レンジ判定フラグXnp=1であれば、ステップ120に進み、初期駆動終了時のエンコーダカウント値Ncntを初期位置ずれ学習値Gcntとして記憶する。そして、次のステップ121で、エンコーダカウント値Ncntを次式によりNotPレンジを基準にした値に補正する。
Ncnt=Ncnt+288
【0090】
本実施形態では、Pレンジの保持位置を0点位置としてエンコーダカウント値Ncntをカウントアップし、NotPレンジの保持位置までロータ32が回転したときに、エンコーダカウント値Ncntが例えば288となるようになっている。従って、NotPレンジで初期駆動を行った場合は、初期駆動終了時のエンコーダカウント値Ncntに288を加算することで、エンコーダカウント値NcntをNotPレンジを基準にした値に補正する。
【0091】
一方、上記ステップ119で、レンジ判定フラグXnp=0(Pレンジで初期駆動)と判定されれば、ステップ122に進み、初期駆動終了時のエンコーダカウント値Ncntを用いて初期位置ずれ学習値Gcntを次式により算出する。
Gcnt=Ncnt+2×(6−CASE)
【0092】
この場合、初期駆動が最後まで行われれば、ステップ114の処理によりCASE=6となるため、初期駆動終了時のエンコーダカウント値Ncntがそのまま初期位置ずれ学習値Gcntとなるが、Pレンジで初期駆動を行う場合は、初期駆動の途中でレンジ切換操作が行われたときに、次の2相通電(2相通電の実行中にレンジ切換要求が発生したときはその2相通電)が終了してから通常駆動に移行するため、その初期駆動を最後まで実行したと仮定して、本来の初期駆動終了時のエンコーダカウント値Ncntを推定し、その推定値を初期位置ずれ学習値Gcntとするようにしている。2×(6−CASE)は、未終了の励磁回数分の回転角度に相当するカウントアップ値(以下「Ncnt補正量」という)である。
【0093】
図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となる。
【0094】
[エンコーダカウンタ]
次に、図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を算出する。
【0095】
ここで、A相信号とB相信号の今回値A(i) 、B(i) と、前回値A(i-1) 、B(i-1) を用いる理由は、A相信号とB相信号の発生順序によってロータ32の回転方向を判定するためであり、図17に示すように、正回転(Pレンジ→NotPレンジの回転方向)ではカウントアップ値ΔNをプラス値にしてエンコーダカウント値Ncntをカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではカウントアップ値ΔNをマイナス値にしてエンコーダカウント値Ncntをカウントダウンする。
【0096】
カウントアップ値ΔNの算出後、ステップ303に進み、前回のエンコーダカウント値Ncntに上記ステップ302で算出したカウントアップ値ΔNを加算して、今回のエンコーダカウント値Ncntを求める。この後、ステップ304に進み、次回のカウント処理のために、A相信号とB相信号の今回値A(i) 、B(i) をそれぞれA(i-1) 、B(i-1) として記憶して本ルーチンを終了する。
【0097】
[制御モード設定]
図20乃至図22に示す制御モード設定ルーチンは、初期駆動終了後に所定周期(例えば1ms周期)で実行され、制御モード判定値modeを0、1、3、4、5のいずれかに設定して、下記のように制御モードを指定する。
【0098】
mode=0:通電オフ(スタンバイ)
mode=1:通常駆動
(F/B制御開始位置停止保持処理及びF/B制御)
mode=3:目標位置停止保持処理
mode=4:反転位置停止保持処理
mode=5:オープンループ制御
【0099】
制御モード設定ルーチンが起動されると、まずステップ401で、システム故障フラグXfailoffがレンジ切換制御装置42の故障を意味するONにセットされているか否かを判定し、もし、Xfailoff=ONに設定されていれば、ステップ402に進み、SRモータ12を通電オフ状態に維持するための処理を実行する。これにより、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、F/B許可フラグXfb=OFF(F/B制御禁止)、制御モード判定値mode=0(通電オフ)にセットする。
【0100】
一方、システム故障フラグXfailoffがOFF(故障無し)の場合は、ステップ401からステップ403に進み、オープンループ制御実行フラグXopen=OFF、且つ、リカバリ処理実行フラグXrcv=OFFであるか否かを判定する。もし、オープンループ制御実行フラグXopenとリカバリ処理実行フラグXrcvのいずれか一方又は両方がONにセットされている場合は、ステップ404に進み、オープンループ制御を実行するために、回転方向指示値D=0(停止)、制御モード判定値mode=5(オープンループ制御)、F/B許可フラグXfb=OFF(F/B制御禁止)にセットする。
【0101】
オープンループ制御実行フラグ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
【0102】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が+Kth以上(例えば+10°以上)であれば、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に回転駆動する必要があると判断して、ステップ407に進み、回転方向指示値D=1(正回転)、通電フラグXon=ON(通電オン)、制御モード判定値mode=1(F/B制御開始位置停止保持処理及びF/B制御)にセットする。
【0103】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が−Kth以下(例えば−10°以下)であれば、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に回転駆動する必要があると判断して、ステップ409に進み、回転方向指示値D=−1(逆回転)、通電フラグXon=ON(通電オン)、制御モード判定値mode=1(F/B制御開始位置停止保持処理及びF/B制御)にセットする。
【0104】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が−Kthから+Kthの範囲内(例えば−10°から+10°の範囲内)であれば、ロータ32を目標位置にディテントバネ23のバネ力により保持することが可能である(SRモータ12への通電は不要)と判断して、ステップ408に進み、SRモータ12を通電オフ状態に維持するために、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、制御モード判定値mode=0(通電オフ)にセットする。
【0105】
一方、前記ステップ405で、通電フラグXon=ON(通電オン)にセットされていると判定された場合は、図21のステップ410〜415の処理によって、指令シフトレンジ(目標位置)が反転されたか否かを判定し、反転されていれば、回転方向指示値Dを反転させる。
【0106】
具体的には、まずステップ410で、回転方向指示値D=1(正回転)であるか否かを判定し、回転方向指示値D=1(正回転)であれば、ステップ411に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)がマイナス値であるか否かで、ロータ32の回転方向を正回転から逆回転に反転させる必要があるか否かを判定し、その必要があれば、ステップ412に進み、回転方向指示値D=−1(逆回転)にセットする。
【0107】
これに対して、上記ステップ410で、回転方向指示値Dが1(正回転)でないと判定された場合(つまりD=0又は−1の場合)は、ステップ413に進み、回転方向指示値D=−1(逆回転)であるか否かを判定し、回転方向指示値D=−1(逆回転)であれば、ステップ414に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)がプラス値であるか否かで、ロータ32の回転方向を逆回転から正回転に反転させる必要があるか否かを判定し、その必要があれば、ステップ415に進み、回転方向指示値D=1(正回転)にセットする。
【0108】
以上のようにして、回転方向指示値Dが反転された場合は、ステップ416に進み、ロータ32の回転方向を反転させるために、制御モード判定値mode=4(反転位置停止保持処理)、F/B許可フラグXfb=OFF(F/B制御禁止)にセットしてステップ417に進む。これに対し、回転方向指示値Dが反転されない場合は、上記ステップ416の処理を行わずにステップ417に進む。
【0109】
このステップ417では、制御モード判定値mode=4(反転位置停止保持処理)にセットされているか否かを判定し、「Yes」であれば、ステップ418に進み、通電フラグXon=ON(通電オン)にセットして、反転位置停止保持処理を実行する。
【0110】
これに対して、上記ステップ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制御の終了タイミングであるか否かを判定する。
【0111】
つまり、F/B制御の終了判定値Krefを例えば通電相の位相進み分(例えば2〜4カウント分)に設定することで、目標カウント値Acntよりも通電相の位相進み分だけ前のタイミングでF/B制御を終了するようにしたものである。これにより、F/B制御の最後の通電相がロータ32を目標位置(目標カウント値Acnt)に停止保持する通電相と一致するようになる。
【0112】
上記ステップ420又は421で「No」と判定された場合(F/B制御の終了タイミングでない場合)は、ステップ422に進み、目標位置停止保持処理の時間をカウントする停止保持時間カウンタCTholdをリセットする。
【0113】
一方、上記ステップ420又は421で「Yes」と判定された場合(F/B制御の終了タイミングである場合)は、ステップ423に進み、F/B許可フラグXfb=OFF(F/B制御禁止)にセットし、F/B制御を終了して目標位置停止保持処理に移行する。そして、次のステップ424で、停止保持時間カウンタCTholdをカウントアップして、目標位置停止保持処理の時間をカウントする。
【0114】
この後、ステップ425に進み、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達したか否かを判定し、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達していなければ、ステップ426に進み、目標位置停止保持処理を続行するために、回転方向指示値D=0(停止)、通電フラグXon=ON(通電オン)、制御モード判定値mode=3(目標位置停止保持処理)に維持する。
【0115】
その後、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達した時点で、ステップ427に進み、SRモータ12の通電をオフするために、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、制御モード判定値mode=0(通電オフ)にセットする。
【0116】
[時間同期モータ制御]
図23に示す時間同期モータ制御ルーチンは、初期駆動終了後に所定周期(例えば1ms周期)で起動され、F/B制御開始位置停止保持処理、目標位置停止保持処理、反転位置停止保持処理を実行する。
【0117】
本ルーチンが起動されると、まずステップ501で、F/B許可フラグXfb=OFF(F/B制御禁止)であるか否かを判定し、F/B許可フラグXfb=ON(F/B制御実行)の場合は、以降の処理を行うことなく、本ルーチンを終了する。この場合は、後述する図29に示すF/B制御ルーチンによって通電相の設定と通電処理が実行される。
【0118】
これに対して、上記ステップ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を算出する。
【0119】
また、制御モード判定値mode=3(目標位置停止保持処理)の場合は、ステップ503からステップ506に進み、後述する図25に示すmode3ルーチンを実行して、目標位置停止保持処理実行時の通電相を設定するための通電相判定値Mptnを算出する。
【0120】
また、制御モード判定値mode=4(反転位置停止保持処理)の場合は、ステップ504からステップ507に進み、後述する図26に示すmode4ルーチンを実行して、反転位置停止保持処理実行時の通電相を設定するための通電相判定値Mptnを算出する。
【0121】
以上のようにして、制御モード判定値mode=1,3,4の場合は、通電相判定値Mptnを算出した後、ステップ508に進み、後述する図27に示す通電処理ルーチンを実行して、F/B制御開始位置停止保持処理、目標位置停止保持処理、反転位置停止保持処理を実行する。
【0122】
一方、上記ステップ502〜504で、いずれも「No」と判定された場合、つまり、制御モード判定値mode=0,5の場合は、ステップ508に進み、後述する図27に示す通電処理ルーチンを実行して、通電オフ又はオープンループ制御を実行する。
【0123】
[mode1]
図24に示すmode1ルーチンは、図23の時間同期モータ制御ルーチンのステップ505で起動されるサブルーチンであり、F/B制御開始位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0124】
本ルーチンが起動されると、まずステップ511で、F/B制御開始位置停止保持処理の時間をカウントする通電時間カウンタCT1をカウントアップし、次のステップ512で、F/B制御開始位置停止保持処理の時間CT1が所定時間(例えば10ms)を越えたか否かを判定する。
【0125】
もし、F/B制御開始位置停止保持処理の時間CT1が所定時間(例えば10ms)を越えていなければ、ステップ513に進み、停止保持時通電相記憶済みフラグXhold=OFF(未記憶)であるか否か(つまりF/B制御開始位置停止保持処理の開始直前のタイミングであるか否か)を判定し、停止保持時通電相記憶済みフラグXhold=OFFであれば、ステップ514に進み、F/B制御開始位置停止保持処理時の通電相判定値Mptnを現在の位置カウンタ値(Ncnt−Gcnt)にセットする。
Mptn=Ncnt−Gcnt
【0126】
ここで、位置カウンタ値(Ncnt−Gcnt)は、エンコーダカウント値Ncntを初期位置ずれ学習値Gcntで補正した値であり、ロータ32の現在位置を正確に表した値となっている。
【0127】
この後、ステップ515に進み、通電相判定値Mptnを“12”で割り算して、その余りMptn%12を求める。ここで、“12”は、通電相を一巡させる間のエンコーダカウント値Ncnt(通電相判定値Mptn)の増減量に相当する。このMptn%12の値に基づいて、図28の変換テーブルによって通電相が決定される。
【0128】
そして、次のステップ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制御開始位置に確実に停止保持できるようにする。
【0129】
そして、次のステップ518で、停止保持時通電相記憶済みフラグXhold=ON(記憶済み)にセットして本ルーチンを終了する。この後、本ルーチンが起動されたときには、ステップ513で「No」と判定され、ステップ514〜518の処理が実行されない。これにより、F/B制御開始位置停止保持処理時の通電相判定値Mptn(通電相)を設定する処理は、F/B制御開始位置停止保持処理の開始直前に1回のみ実行される。
【0130】
その後、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制御実行)にセットする。
【0131】
図31はUW相から回転を開始する場合に最初に通電する相を説明するタイムチャートである。この場合、正回転(Pレンジ→NotPレンジ方向への回転)を開始する場合は、通電相判定値Mptnは、エンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、正回転方向位相進み量K1を用いて次式により算出される。
Mptn=Ncnt−Gcnt+K1
【0132】
ここで、正回転方向位相進み量K1を例えば4とすると、通電相判定値Mptnは、次式により算出される。
Mptn=Ncnt−Gcnt+4
UW相から正回転を開始する場合は、mod(Ncnt−Gcnt)は4となるため、Mptn%12=4+4=8となり、最初の通電相はUV相となる。
【0133】
一方、UW相から逆回転(NotPレンジ→Pレンジ方向への回転)を開始する場合は、逆回転方向位相進み量K2を例えば3とすると、通電相判定値Mptnは、次式により算出される。
Mptn=Ncnt−Gcnt−K2=Ncnt−Gcnt−3
UW相から逆回転を開始する場合は、Mptn%12=4−3=1となり、最初の通電相はVW相となる。
【0134】
このように、正回転方向位相進み量K1と逆回転方向位相進み量K2をそれぞれ4と3に設定することで、正回転方向と逆回転方向の通電相の切換パターンを対称にすることができ、正回転方向と逆回転方向のいずれの場合も、ロータ32の現在位置から2ステップ分ずらした位置の相を最初に励磁して回転を開始することができる。
【0135】
[mode3]
図25に示すmode3ルーチンは、図23の時間同期モータ制御ルーチンのステップ506で起動されるサブルーチンであり、目標位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0136】
本ルーチンが起動されると、まずステップ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相通電に変更する。
【0137】
この際、ステップ532で、回転方向を次のようにして判定する。本ルーチンに入る直前(F/B制御終了時)に、図22のステップ426で、回転方向指示値Dが0(停止)にセットされるため、回転方向指示値Dを見ても回転方向を判定することができない。そこで、本ルーチンでは、F/B制御終了時の通電相判定値Mptnと位置カウント値(Ncnt−Gcnt)との間に、通電相の位相進み量K1,K2分の差があることに着目し、F/B制御終了時の通電相判定値Mptnと位置カウント値(Ncnt−Gcnt)との大小関係によって回転方向を次のように判定する。
【0138】
Mptn>Ncnt−Gcntの場合は、正回転(Pレンジ→NotPレンジの回転方向)と判定して、ステップ533に進み、通電相判定値Mptnを2だけ増加させることで、2相通電に補正する。
【0139】
一方、Mptn<Ncnt−Gcntの場合は、逆回転(NotPレンジ→Pレンジの回転方向)と判定して、ステップ534に進み、通電相判定値Mptnを2だけ減少させることで、2相通電に補正する。
【0140】
尚、Mptn=Ncnt−Gcntの場合は、停止と判定して、通電相は変更しない。
【0141】
このように、目標位置停止保持処理についても、F/B制御開始位置停止保持処理と同じく、1相通電と比べて保持トルクの大きい2相通電で実行することで、ロータ32が目標位置付近で振動することを防止して、ロータ32を目標位置で確実に停止保持できるようにする。
【0142】
[mode4]
図26に示すmode4ルーチンは、図23の時間同期モータ制御ルーチンのステップ507で起動されるサブルーチンであり、反転位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0143】
本ルーチンが起動されると、まずステップ541で、反転位置停止保持処理の時間をカウントする通電時間カウンタCT4をカウントアップし、次のステップ542で、反転位置停止保持処理の時間CT4が所定時間(例えば50ms)を越えたか否かを判定する。
【0144】
もし、反転位置停止保持処理の時間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の処理と同じである。
【0145】
このように、反転位置停止保持処理についても、F/B制御開始位置停止保持処理や目標位置停止保持処理と同じく、1相通電と比べて保持トルクの大きい2相通電で実行することで、ロータ32が反転位置付近で振動することを防止して、ロータ32を反転位置で確実に停止保持できるようにする。
【0146】
その後、反転位置停止保持処理の時間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(通常駆動)にセットして本ルーチンを終了する。
【0147】
[通電処理]
図27に示す通電処理ルーチンは、図23の時間同期モータ制御ルーチンのステップ508で起動されるサブルーチンである。尚、本ルーチンは、後述する図29のF/B制御ルーチンのステップ603でも起動される。
【0148】
図27の通電処理ルーチンが起動されると、まずステップ551で、制御モード判定値mode=0(通電オフ)であるか否かを判定し、制御モード判定値mode=0(通電オフ)であれば、ステップ552に進み、SRモータ12の全相の通電をオフしてスタンバイ状態とする。
【0149】
一方、上記ステップ551で、「No」と判定されれば、ステップ553に進み、制御モード判定値mode=5(オープンループ制御)であるか否かを判定し、制御モード判定値mode=5(オープンループ制御)であれば、ステップ554に進み、オープンループ制御を実行する。このオープンループ制御は、エンコーダ46の故障又はSRモータ12の動作異常が発生したときに、例えば1ms周期の時間同期処理によって通電相を設定してロータ32を目標位置まで回転駆動する。
【0150】
また、上記ステップ551、553で、いずれも「No」と判定された場合、つまり、制御モード判定値mode=1,3,4(F/B制御開始位置停止保持処理、F/B制御、目標位置停止保持処理、反転位置停止保持処理)の場合は、ステップ555に進み、Mptn%12に応じて図28の変換テーブルによって通電相を設定し、その通電相の巻線33,34に通電する。
【0151】
[F/B制御]
次に、図29に示すF/B制御ルーチンの処理内容を説明する。本ルーチンは、AB相割り込み処理により実行され、初期駆動終了後にF/B制御実行条件が成立しているときに、ロータ32の回転位置(エンコーダカウント値Ncnt−Gcnt)が目標位置(目標カウント値Acnt)から例えば0.5°以内に到達するまで、エンコーダカウント値Ncntと初期位置ずれ学習値Gcntとに基づいて通電相を切り換えてロータ32を回転させる。
【0152】
図29のF/B制御ルーチンが起動されると、まずステップ601で、F/B許可フラグXfbがONにセットされているか否か(F/B制御実行条件が成立しているか否か)を判定し、F/B許可フラグXfbがOFF(F/B制御実行条件が不成立)であれば、以降の処理を行うことなく、本ルーチンを終了する。
【0153】
これに対し、F/B許可フラグXfbがONにセットされていれば、ステップ602に進み、後述する図30の通電相設定ルーチンを実行して、現在のエンコーダカウント値Ncntと初期位置ずれ学習値Gcntとに基づいて通電相を設定し、次のステップ603で、図27の通電処理ルーチンを実行する。
【0154】
[通電相設定]
図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
【0155】
ここで、正回転方向位相進み量K1は、ロータ32を正回転させるのに必要な通電相の位相進み量(ロータ32の現在の回転位相に対する通電相の位相進み量)であり、例えばK1=4に設定されている。
【0156】
また、速度位相進み補正量Ksは、ロータ32の回転速度に応じて設定される位相進み補正量であり、後述する図33の速度位相進み補正量設定ルーチンによって設定される。例えば、低速域では、速度位相進み補正量Ksが0に設定され、高速になるに従って、速度位相進み補正量Ksが例えば1又は2に増加される。これにより、ロータ32の回転速度に適した通電相となるように通電相判定値Mptnが補正される。
【0157】
一方、上記ステップ612で、ロータ32の回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。この場合は、逆転直前の通電相(前回の通電相)に通電され、ロータ32の逆転を抑制する方向に制動トルクが発生する。
【0158】
また、上記ステップ611で、回転方向指示値D=0(逆回転)、つまりNotPレンジ→Pレンジの回転方向と判定された場合は、ステップ614に進み、ロータ32の回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが増加したか否か)を判定し、逆転していなければ、ステップ615に進み、現在のエンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、逆回転方向位相進み量K2、速度位相進み補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt−K2−Ks
【0159】
ここで、逆回転方向位相進み量K2は、ロータ32を逆回転させるのに必要な通電相の位相進み量(ロータ32の現在の回転位相に対する通電相の位相進み量)であり、例えばK2=3に設定されている。速度位相進み補正量Ksは正回転の場合と同じく、後述する図33の速度位相進み補正量設定ルーチンによって設定される。
【0160】
一方、上記ステップ614で、ロータ32の回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。この場合は、逆転直前の通電相(前回の通電相)に通電され、ロータ32の逆転を抑制する方向に制動トルクが発生する。
【0161】
以上のようにして、今回の通電相判定値Mptnを決定した後、図27の通電処理ルーチンを実行し、F/B制御実行中は、ステップ555で、図28の変換テーブルを検索して、Mptn%12に対応する通電相を選択し、その通電相に通電する。
【0162】
[ロータ回転速度演算]
図32に示すロータ回転速度演算ルーチンは、AB相割り込み処理により実行され、次のようにしてロータ32の回転速度SPを演算する。本ルーチンが起動されると、まずステップ621で、F/B許可フラグXfbがON(F/B制御実行中)であるか否かを判定し、F/B許可フラグXfbがOFF(F/B制御禁止)であれば、ロータ32の回転速度SPに応じた通電相の位相進み補正を行わないため、ステップ624に進み、ロータ32の回転速度SP,SPaの記憶値をリセットして、本ルーチンを終了する。
【0163】
これに対して、F/B許可フラグXfbがON(F/B制御実行中)であれば、次のようにしてロータ32の回転速度SPを演算する。まず、ステップ622で、エンコーダ46のA相信号とB相信号の立ち上がり/立ち下がりエッジ間の時間間隔ΔT(n) (すなわちエンコーダカウント値が増減する時間間隔)を計測して、その時間間隔ΔT(n) の過去N回分の平均値ΔTavを算出する。そして、回転速度演算値SPaを次式により算出する。
SPa=60/(ΔTav×Kp) [rpm]
【0164】
ここで、Kpは、ロータ32の1回転当たりの時間間隔ΔT(n) の数(ロータ32の1回転当たりのエンコーダカウント値の変化量)であり、図5の構成のエンコーダ46の場合は、Kp=96となる。ΔTav×Kpは、ロータ32が1回転するのに要する時間[sec]である。
【0165】
この後、ステップ623に進み、回転速度演算値SPaを用いて、ロータ32の回転速度SPを次式によりなまし処理して求める。
SP(i) =SP(i-1) +{SPa−SP(i-1) }/R
ここで、SP(i) は今回の回転速度、SP(i-1) は前回の回転速度、Rはなまし係数である。
【0166】
[速度位相進み補正量設定]
図33に示す速度位相進み補正量設定ルーチンは、所定周期(例えば1ms周期)で起動され、ロータ32の回転速度SPに応じて速度位相進み補正量Ksを次のようにして設定する。本ルーチンが起動されると、まずステップ631で、F/B許可フラグXfbがON(F/B制御実行中)であるか否かを判定し、F/B許可フラグXfbがOFF(F/B制御禁止)であれば、通電相の位相進み補正は不要であるため、以降の処理を行うことなく、本ルーチンを終了する。
【0167】
これに対して、F/B許可フラグXfbがON(F/B制御実行中)であれば、ステップ632〜636の処理により、図32のロータ回転速度演算ルーチンで演算されたロータ32の回転速度SPに応じて速度位相進み補正量Ksを次のようにして設定する。
【0168】
ステップ632で、ロータ32の回転速度SPが所定値Klow(例えば300rpm)よりも低いと判定されれば、ステップ634に進み、速度位相進み補正量Ksを最小値Ka(例えば0)に設定し、ステップ633で、ロータ32の回転速度SPが所定値Khigh(例えば600rpm)よりも高いと判定されれば、ステップ636に進み、速度位相進み補正量Ksを最大値Kc(例えば2)に設定する。また、ロータ32の回転速度SPがKlow〜Khighの範囲内であれば、ステップ635に進み、速度位相進み補正量Ksを中間値Kb(例えば1)に設定する。このような処理により、ロータ32の回転速度SPが速くなるほど、速度位相進み補正量Ksを大きな値に設定する。
以上説明したステップ632〜636の処理が特許請求の範囲でいう第1の補正手段としての役割を果たす。
【0169】
この後、ステップ637に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差の絶対値|Acnt−Ncnt|が所定値よりも小さいか否かで、ロータ32の回転位置が目標位置に近付いたか否か(停止のための減速領域に入ったか否か)を判定する。
【0170】
もし、|Acnt−Ncnt|が所定値以上であれば、ステップ639に進み、F/B制御中に何等かの減速要求が発生したか否かを判定し、減速要求が無ければ、上記ステップ634〜636のいずれかで設定した速度位相進み補正量Ksをそのまま用い、減速要求が有れば、ステップ640に進み、速度位相進み補正量Ksを小さい値Ke(例えば0又は−1)に設定する。
【0171】
一方、|Acnt−Ncnt|が所定値よりも小さい場合は、減速領域と判断して、ステップ637からステップ638に進み、速度位相進み補正量Ksを小さい値Kd(例えば0又は−1)に設定する。
以上説明したステップ637〜640の処理が特許請求の範囲でいう第2の補正手段としての役割を果たす。
【0172】
尚、本ルーチンでは、ロータ32の回転速度SPに応じて速度位相進み補正量Ksを3段階に切り換えるようにしたが、2段階又は4段階以上に切り換えるようにしても良い。
【0173】
以上説明した本実施形態によれば、F/B制御中に、ロータ32の回転速度に応じて通電相の位相進み量を補正するようにしたので、F/B制御開始時に、通電相の位相進み量を小さくして、起動トルクを大きくすることができ、F/B制御開始後に、ロータ32の回転速度を素早く立ち上げることができる。そして、ロータ32の回転速度が上昇するのに伴って、通電相の位相進み量が大きくなるように補正されるので、高速回転時でも、通電相のトルク発生タイミングと実際のロータの回転位相との同期関係を維持することができ、ロータ32を高速で安定して回転させることができる。
【0174】
その後、ロータ32が目標位置に近付いたときに、通電相の位相進み量が小さくする方向に補正されるので、実際のロータ32の回転位相に対して通電相のトルク発生タイミングが遅れた状態となり、それによって、駆動トルクを低下させたり、或は、ロータ32の回転方向と反対方向のトルク(制動トルク)を発生させることができ、ロータ32の回転速度を確実に減速させることができて、ロータ32を正確に目標位置で停止させることができる。これにより、起動性能と高速性能と停止性能(減速性能)に優れたF/B制御を行うことができる。
【0175】
また、本実施形態では、図18に示すように、SRモータ12の通電オフ状態からF/B制御を開始するときに、現在のエンコーダカウント値に基づいて通電相を選択して2相通電でロータ32の位置を保持するF/B制御開始位置停止保持処理を所定時間(例えば10ms)だけ実行し、その後、F/B制御を実行してロータ32を目標位置まで回転駆動するようにした。よって、ロータ32の停止中にロータ32の位置がずれても、F/B制御開始時にはロータの位置を適正な位置に位置決めすることができる。これにより、F/B制御開始時に最初の通電相からロータ32の位置と通電相(エンコーダカウント値)とを確実に同期させることができて、F/B制御開始時の脱調やロータ32が目標位置と反対方向に回転することを防止でき、安定したF/B制御を行ってロータ32を確実に目標位置まで回転させることができて、安定性・信頼性の高い位置切換制御(位置決め制御)を行うことができる。
【0176】
しかも、本実施形態では、F/B制御終了後に、ロータ32を当該F/B制御終了時の位置に2相通電で停止保持する目標位置停止保持処理を所定時間(例えば50ms)だけ実行した後、SRモータ12への通電をオフするようにしたので、F/B制御終了時にロータ32が慣性により目標位置を越えてオーバーシュートすることを防止でき、位置切換制御の安定性・信頼性を維持しながら、位置切換制御の高応答化の要求も満たすことができる。
【0177】
更に、本実施形態では、F/B制御中に指令シフトレンジ(目標位置)が変更されてロータ32の回転方向を反転させる必要が生じたときに、ロータ32を反転位置に2相通電により停止保持する反転位置停止保持処理を所定時間(例えば50ms)だけ実行し、その後、F/B制御を再開してロータ32を変更後の目標位置まで回転駆動するようにしたので、F/B制御中に指令シフトレンジ(目標位置)が変更されたときに、ロータ32の反転位置を位置決めして反転動作を安定して行うことができ、反転位置がずれて脱調(通電相のずれ)が発生することを防止できて、ロータ32を変更後の目標位置まで確実に回転駆動することができる。
【0178】
しかも、本実施形態では、F/B制御開始位置停止保持処理、目標位置停止保持処理、反転位置停止保持処理を行う際に、1相通電であれば、2相通電(UV相通電、VW相通電、UW相通電)に補正するようにしたので、各停止保持処理を保持トルクの大きい2相通電で実行することができて、ロータ32が振動することを防止でき、各位置に確実に停止保持できるという利点もある。
【0179】
尚、本実施形態では、F/B制御中に、1相通電と2相通電とを交互に切り換える1−2相励磁方式で駆動するようにしたが、1相通電のみで駆動する1相励磁方式、又は、2相通電のみで駆動する2相励磁方式を採用しても良い。
【0180】
また、オープンループ制御を行う場合に、駆動開始時、駆動終了時、目標位置変更時(回転方向反転時)の各位置で停止保持する処理を、1相通電と比べて保持トルクが大きい2相通電により行うようにしても良い。このようにすれば、オープンループ制御においても、駆動開始時、駆動終了時、目標位置変更時(回転方向反転時)の各位置の停止保持を安定して行うことができ、オープンループ制御の安定性を向上させることができる。
【0181】
以上説明した実施形態では、F/B制御中に、ロータ32の回転速度や減速要求の有無に応じて通電相の位相進み量を補正するようにしたが、ロータ32の回転速度(駆動初期か否か)や減速要求の有無に応じて励磁方式を切り換えるようにしてもほぼ同様の効果を得ることができる。例えば、駆動初期に1−2相励磁方式で駆動すれば、常に1相のみに通電する1相励磁方式や常に2相ずつ通電する2相励磁方式と比較して、1ステップ(1回の励磁)当たりのロータ回転角度が1/2となり、起動トルクを大きくしてロータ32の回転速度を速やかに立ち上げることができる。その後、1相通電のみを行う1相励磁方式で駆動すれば、1ステップ(1回の励磁)当たりのロータ回転角度が駆動初期(2相励磁方式)の2倍となり、ロータ32を高速で安定して回転させることができる。
【0182】
この場合、ロータ32を1相励磁方式で駆動している期間に該ロータ32の回転速度を減速させる必要が生じたときに(例えばロータ32が目標位置に近付いたときに)、1相励磁方式から1−2相励磁方式に切り換えるようにすれば良い。つまり、1相励磁方式でロータ32が高速回転しているときに、1−2相励磁方式に切り換えると、実際のロータ32の回転位相に対して通電相の位相が遅れた状態となり、それによって、ロータ32の回転方向と反対方向のトルク(制動トルク)が発生して、ロータ32の回転速度を確実に減速させることができる。しかも、1−2相励磁方式では、1相励磁方式と比較して、1ステップ(1回の励磁)当たりのロータ回転角度が1/2となり、ロータ32を目標位置で精度良く停止させることができる。
【0183】
以下、これを具体化した本発明の他の実施形態を図34及び図35に基づいて説明する。
【0184】
図34に示す励磁方式設定ルーチンは、所定周期(例えば1ms周期)で起動され、ロータ32の回転速度(駆動初期か否か)や減速要求の有無に応じて励磁方式を次のようにして設定する。本ルーチンが起動されると、まずステップ701で、F/B許可フラグXfbがON(F/B制御実行中)であるか否かを判定し、F/B許可フラグXfbがOFF(F/B制御禁止)であれば、以降の処理を行うことなく、本ルーチンを終了する。
【0185】
これに対して、F/B許可フラグXfbがON(F/B制御実行中)であれば、ステップ702に進み、駆動初期であるか否かを次の▲1▼〜▲3▼の少なくとも1つの条件を用いて判定する。
【0186】
▲1▼ロータ32の回転速度SPが所定値以下であるか否かで、駆動初期であるか否かを判定する。
▲2▼駆動開始からのエンコーダカウント値の変化量(ロータ回転量)が所定値以下であるか否かで、駆動初期であるか否かを判定する。
▲3▼駆動開始からの経過時間が所定値以下であるか否かで、駆動初期であるか否かを判定する。
【0187】
尚、上記▲1▼〜▲3▼のうちの2つ以上の条件が同時に成立するか否かで、駆動初期であるか否かを判定するようにしても良い。勿論、上記▲1▼〜▲3▼以外の判定条件を用いても良く、例えば、モータ負荷トルクが所定値以上であるか否かで、駆動初期であるか否かを判定するようにしても良い。
【0188】
上記ステップ702で、駆動初期と判定されれば、ステップ703に進み、励磁方式を1−2相励磁方式に設定し、次のステップ704で、速度位相進み補正量Ksを例えば0に設定する。これにより、駆動初期は、前述した実施形態と同じ1−2相励磁方式で駆動される。
【0189】
一方、上記ステップ702で、駆動初期ではないと判定されれば、ステップ705に進み、減速要求が発生したか否かを判定する。この際、例えば、目標カウント値Acntとエンコーダカウント値Ncntとの差の絶対値|Acnt−Ncnt|が所定値よりも小さいか否かで、ロータ32の回転位置が目標位置に近付いたか否か(停止のための減速領域に入ったか否か)を判定したり、或は、F/B制御の途中に設定された減速領域に入ったか否かを判定する。
【0190】
減速要求が無ければ、ステップ706に進み、励磁方式を1相励磁方式に設定してロータ32を駆動する。1相励磁方式では、Mptn%12の値に基づいて、図35の変換テーブルによって通電相が決定される。
【0191】
その後、減速要求が発生した時点で、上記ステップ705で「Yes」と判定されて、ステップ707に進み、励磁方式を1−2相励磁方式に設定し、次のステップ708で、速度位相進み補正量Ksを例えば−1に設定する。これにより、ロータ32の回転方向と反対方向のトルク(制動トルク)を発生させることができ、ロータ32の回転速度を確実に減速させることができる。
【0192】
このように、励磁方式の切り換えと通電相の位相進み補正とを組み合わせて実行すれば、起動性能、高速性能、停止性能(減速性能)を効果的に向上させることができる。但し、本発明は、通電相の位相進み補正を省略して、励磁方式の切り換えのみとした構成としても良い。
【0193】
尚、本発明に用いるエンコーダは、磁気式のエンコーダ46に限定されず、例えば、光学式のエンコーダやブラシ式のエンコーダを用いても良い。
【0194】
また、本発明に用いるモータは、SRモータ12に限定されず、エンコーダの出力信号のカウント値に基づいてロータの回転位置を検出してモータの通電相を順次切り換えるブラシレス型のモータであれば、SRモータ以外のブラシレス型のモータを用いても良い。
【0195】
また、F/B制御中に要求回転速度(目標回転速度)を設定して、その要求回転速度(目標回転速度)に応じて通電相の位相進み量の補正及び/又は励磁方式の切り換えを行うことで、ロータ32の回転速度を要求回転速度(目標回転速度)に応じて制御するようにしても良い。例えば、ロータ32の回転速度を上昇させたい場合は、通電相の位相進み量を大きくするように補正したり、励磁方式を1−2相励磁方式から1相励磁方式(又は2相励磁方式)に切り換えるようにすれば良い。反対に、ロータ32の回転速度を減速させたい場合は、通電相の位相進み量を小さくするように補正したり、励磁方式を1相励磁方式(又は2相励磁方式)から1−2相励磁方式に切り換えるようにすれば良い。このようにすれば、エンコーダカウント値に基づいてロータ32を目標位置へフィードバック制御しながら、ロータ32の回転速度を制御することができる。
【0196】
また、本実施形態のレンジ切換装置は、PレンジとNotPレンジの2つのレンジを切り換える構成であるが、例えば、ディテントレバー15の回動動作に連動して自動変速機のレンジ切換弁とマニュアルバルブを切り換えて、自動変速機のP、R、N、D、…の各レンジを切り換えるレンジ切換装置にも本発明を適用して実施できる。
【0197】
その他、本発明は、レンジ切換装置に限定されず、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】1−2相励磁方式の場合のMptn%12から通電相への変換テーブルの一例を示す図
【図29】F/B制御ルーチンの処理の流れを示すフローチャート
【図30】通電相設定ルーチンの処理の流れを示すフローチャート
【図31】UW相から回転を開始する時の通電処理を説明するタイムチャート
【図32】ロータ回転速度演算ルーチンの処理の流れを示すフローチャート
【図33】速度位相進み補正量設定ルーチンの処理の流れを示すフローチャート
【図34】励磁方式設定ルーチンの処理の流れを示すフローチャート
【図35】1相励磁方式の場合のMptn%12から通電相への変換テーブルの一例を示す図
【符号の説明】
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]
BACKGROUND OF THE INVENTION
The present invention relates to a motor control device that rotationally drives a rotor to a target position by sequentially switching energized phases of the motor.
[0002]
[Prior art]
In recent years, brushless motors such as switched reluctance motors, which are increasing in demand as simple and inexpensive motors, are equipped with encoders that output pulse signals in synchronization with the rotation of the rotor. And the rotor is rotationally driven by detecting the rotational position of the rotor based on the encoder count value and sequentially switching the energized phase. Since such a motor with an encoder can detect the rotational position of the rotor based on the encoder count value after startup, position switching control for rotating the rotor to a target position by a feedback control system (closed loop control system) ( 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 such a motor with an encoder detects the rotational position of the rotor based on the encoder count value and rotationally drives it to the target position, the switching of the energized phase is determined based on the encoder count value. At this time, in order to generate torque for rotationally driving the rotor, it is necessary to advance the phase of the energized phase with respect to the rotational phase of the rotor.
[0004]
After the start of driving, as the rotor speed increases, the encoder count value change speed increases and the switching timing of the energized phase becomes faster. Until the torque is generated, a delay corresponding to the inductance of the winding occurs, so when the rotational speed of the rotor increases, the energization phase winding is energized until the torque is actually generated, The rotor rotates by a considerable angle, and the torque generation timing of the energized phase is delayed with respect to the actual rotational phase of the rotor. In such a state, the drive torque is reduced and the rotational speed of the rotor is suppressed, and the demand for higher position switching speed (higher rotational speed of the rotor) cannot be satisfied.
[0005]
As a countermeasure, it is conceivable to set a large phase advance amount of the energized phase in advance. However, if the phase advance amount of the energized phase is large at the start of driving (starting up), the starting torque decreases and the motor May become unstable or fail to start.
[0006]
Also, if the rotor speed is increased by setting a large phase advance amount in advance in the energized phase, the rotor will easily overshoot beyond the target position due to inertia at the end of driving, and the rotor will stop at the target position accurately. It becomes difficult to let you.
[0007]
In order to improve the stability of the position switching control, the energization phase is set so that the rotor is temporarily stopped and held at each position at the start of driving, at the end of driving, and at the time of changing the target position (when reversing the rotation direction). It is conceivable to electrify and electrify. However, if this stop and hold is performed by one-phase energization with a small holding torque, the rotor vibrates and the rotor cannot be completely stopped at each position.
[0008]
  The present invention has been made in consideration of these circumstances,The present inventionThe purpose of is to achieve both startup performance and high-speed performanceWithBy improving stopping performance (deceleration performance)is there.
[0009]
[Means for Solving the Problems]
  in frontNoteIn order to achieve the target, the motor control device according to claim 1 of the present invention changes the energization phase of the motor sequentially based on the encoder count value, and rotates the rotor to the target position according to the rotational speed of the rotor. To correct the phase advance amount of the energized phase with respect to the rotational phase of the rotorThe first correction means and the second correction means for correcting in a direction to reduce the phase advance amount of the energized phase when the rotational speed of the rotor needs to be reduced. is there.In this configuration, if the correction is made so that the phase advance amount of the energized phase is reduced at the start of driving, the starting torque can be increased and the rotational speed of the rotor can be quickly raised. If the phase advance amount of the energized phase is increased as the rotational speed of the rotor increases, synchronization between the torque generation timing of the energized phase and the actual rotor phase is achieved even during high-speed rotation. The relationship can be maintained, and the rotor can be stably rotated at a high speed. This makes it possible to achieve both startup performance and high speed performance.
[0010]
  Furthermore,In the invention according to claim 1,When it becomes necessary to decelerate the rotational speed of the rotor (for example, when the rotor approaches the target position), the phase advance amount of the energized phase is corrected so as to decrease.Second correction means is provided.For example, if you want to decelerate during high-speed rotation, if you correct in the direction to reduce the phase advance amount of the energized phase, the torque generation timing of the energized phase is delayed with respect to the actual rotational phase of the rotor, The driving torque can be reduced, or torque (braking torque) in the direction opposite to the rotation direction of the rotor can be generated, and the rotation speed of the rotor can be surely reduced.
[0017]
  Claims2As described above, a switched reluctance motor may be used as the motor. The switched reluctance motor is advantageous in that it does not require a permanent magnet and is simple in structure, so that it is inexpensive and has high durability and reliability against temperature environments.
[0018]
  Claim 1 explained above, 2The present invention can be applied to various position switching devices using a brushless motor such as a switched reluctance motor as a driving source.3As described above, the present invention may be applied to a motor control device that drives a range switching mechanism that switches a range of an automatic transmission of a vehicle. Thus, a highly reliable motor-driven range switching device can be configured.
[0019]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment in which the present invention is applied to a vehicle range switching device will be described with reference to the drawings.
[0020]
First, the configuration of the range switching mechanism 11 will be described with reference to FIG. The motor 12 serving as a drive source for the range switching mechanism 11 is constituted by a switched reluctance motor, for example, and includes a speed reduction mechanism 26 (see FIG. 4), and an output shaft sensor 14 for detecting the rotational position of the output shaft 13 is provided. It has been. A detent lever 15 is fixed to the output shaft 13.
[0021]
Further, an L-shaped parking rod 18 is fixed to the detent lever 15, and a cone 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 around 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, and when the parking gear 20 is locked by the lock lever 21, the driving wheel of the vehicle is held in a stopped state (parking state).
[0022]
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 “Not P 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 recess 24 of the detent lever 15, the detent lever 15 is held at the P range position, and the engaging portion of the detent spring 23 is When 23a is fitted into the NotP range holding recess 25 of the detent lever 15, the detent lever 15 is held at the position of the NotP range.
[0023]
In the P range, the parking rod 18 moves in a direction approaching the lock lever 21, the thick part of the cone 19 pushes up the lock lever 21, and the convex portion 21 a of the lock lever 21 fits into the parking gear 20. The gear 20 is locked, whereby the output shaft (drive wheel) of the automatic transmission 27 is held in the locked state (parking state).
[0024]
On the other hand, in the NotP range, the parking rod 18 moves away from the lock lever 21, the thick part of the cone 19 comes out of the lock lever 21, and the lock lever 21 is lowered. 21a is disengaged from the parking gear 20, the parking gear 20 is unlocked, and the output shaft of the automatic transmission 27 is held in a rotatable state (runnable state).
[0025]
The output shaft sensor 14 described above is composed of 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 changed to the P range by the output voltage. And the NotP range can be confirmed.
[0026]
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 unnecessary 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, on the other hand, for example, eight salient poles 32a are equally spaced on the outer peripheral portion of the rotor 32. As the rotor 32 rotates, the salient poles 32a of the rotor 32 are sequentially opposed to the salient poles 31a of the stator 31 via a minute gap. 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 'phase, V' phase, and W 'phase. It is wound in order. Needless to say, the number of salient poles 31a and 32a of the stator 31 and the rotor 32 may be appropriately changed.
[0027]
The winding order of the windings 33 and 34 of the present embodiment is, for example, V phase → W phase → U phase → V phase → W phase → U phase → V ′ with respect to the 12 salient poles 31a of the stator 31. It is 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 composed of two systems of motors. The excitation parts 35 and 36 are connected so as to constitute them. One motor excitation unit 35 is configured by Y-connecting a total of six windings 33 of U phase, V phase, and W phase (two windings 33 of the same phase are connected in series, respectively). The other motor excitation unit 36 is configured by Y-connecting a total of six windings 34 of the U ′ phase, the V ′ phase, and the W ′ phase (the two windings 34 of the same phase are connected in series, respectively. It is connected to the). The two motor excitation portions 35 and 36 are energized simultaneously in the U phase and the U ′ phase, energized in the V phase and the V ′ phase simultaneously, and energized in the W phase and the W ′ phase simultaneously.
[0028]
These two motor excitation sections 35 are driven by separate motor drivers 37 and 38, respectively, using a battery 40 mounted on the vehicle as a power source. In this way, by providing two motor excitation units 35 and 36 and two motor drivers 37 and 38, even if one system fails, the SR motor 12 can be rotated by the other system. ing. In the circuit configuration example of the motor drivers 37 and 38 shown in FIG. 3, the circuit configuration is a unipolar drive system in which one switching element 39 such as a transistor is provided for each phase. However, two switching elements are provided for each phase. A bipolar drive type circuit configuration provided one by one may be adopted. Needless to say, the present invention may have a configuration in which one motor excitation unit and one motor driver are provided.
[0029]
On / off of each switching element 39 of each motor driver 37, 38 is controlled by an 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 that performs a switching operation to the P range, An operation signal of the NotP range switch 44 for performing the 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 unit 45 provided on an instrument panel (not shown).
[0030]
The SR motor 12 is provided with an encoder 46 for detecting the rotational position of the rotor 32. The encoder 46 is composed of, for example, a magnetic rotary encoder. As shown in FIGS. 5 and 6, the specific configuration of the encoder 46 is such that the N pole and the S pole 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 magnetic detection elements 48, 49, 50 such as three Hall ICs are arranged at positions facing the rotary magnet 47. It has a configuration. In this embodiment, the magnetization pitch of the N pole and 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, the switching of all energized phases is completed and the rotor 32 and the rotary magnet 47 are integrally 7.5 °. × 6 = 45 ° rotation. The total number of N poles and S poles existing in the 45 ° rotation angle range of the rotary magnet 47 is six poles.
[0031]
Further, the N pole (N ′) at a 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 have a wider radial width than the other magnetic poles. In the present embodiment, considering that the rotor 32 and the rotary magnet 47 are integrally rotated by 45 ° while the energized phase of the SR motor 12 is switched once, the width corresponding to the reference rotation position of the rotor 32 is widened. Thus, a total of eight wide magnetized portions (N ′) corresponding to the reference rotation position are formed in the rotary magnet 47 as a whole. Note that only one wide magnetized portion (N ′) corresponding to the reference rotation position may be formed as the entire rotary magnet 47.
[0032]
Three magnetic detection elements 48, 49, 50 are arranged with respect to the rotary magnet 47 in the following positional relationship. A magnetic detection element 48 that outputs an A-phase signal and a magnetic detection element 49 that outputs a B-phase signal include a narrow magnetized portion (N, S) and a wide magnetized portion (N ′, S ′) of the rotary magnet 47. ) On both sides of the same circumference. On the other hand, the magnetic detection element 50 that outputs the Z-phase signal has a wide magnetized portion (N ′) at a position radially outside or inside the narrow magnetized portion (N, S) of the rotary magnet 47. , S ′) only. As shown in FIG. 7, the interval between the two magnetic detection elements 48 and 49 that output 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 ° (mechanical angle). And 3.75 °). Here, the “electrical angle” is an angle when the generation period of the A / B phase signal is one period (360 °), and the “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. To 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 A-phase signal) becomes zero.
[0033]
The output of each magnetic detection element 48, 49, 50 is high level "1" when facing the N pole (N 'pole) and 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, and at other positions, the output is low level “1”. 0 ”.
[0034]
In the present embodiment, the ECU 41 counts both rising and falling edges of the A-phase signal and 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. Thus, the rotor 32 is rotationally driven. 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, the encoder count value is counted up in the normal rotation (P range → NotP range rotation direction), and the reverse rotation (NotP range → In the P range rotation direction), the encoder count value is counted down. As a result, even if the rotor 32 rotates in either the forward rotation / reverse rotation direction, the correspondence relationship between the encoder count value and the rotation position of the rotor 32 is maintained. However, the rotation position (rotation angle) of the rotor 32 is detected from the encoder count value, and the rotors 32 are rotationally driven by energizing the windings 33 and 34 of the phase corresponding to the rotation position.
[0035]
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 of NotP range → P range). In each of the reverse rotation direction (NotP range → P range rotation direction) and forward rotation direction (P range → NotP range rotation direction), one-phase energization and two-phase each time the rotor 32 rotates 7.5 °. During the rotation of the rotor 32 by 45 °, for example, U phase energization → UW phase energization → W phase energization → VW phase energization → V phase energization → UV phase energization The energized phase is switched once. Each time this energized phase is switched, the rotor 32 rotates by 7.5 °, and the magnetic pole of the rotary magnet 47 facing the magnetic detection elements 48 and 49 for 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 counts up by 2 (or counts down) every time it rotates 5 °. In addition, every time the energized phase is switched and the rotor 32 rotates 45 °, the Z-phase magnetic detection element 50 faces the wide N ′ pole corresponding to the reference rotation position of the rotor 32, and the Z-phase The signal becomes high level “1”. In this specification, when the A-phase, B-phase, and Z-phase signals are at a high level “1”, the A-phase, B-phase, and Z-phase signals may be output.
[0036]
By the way, since the encoder count value is stored in the RAM of the ECU 41, the storage of the encoder count value is lost when the power of the ECU 41 is turned off. For this reason, the encoder count value (0) immediately after 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 associate the encoder count value with the energized phase by making the encoder count value correspond to the actual rotational position of the rotor 32 after the power is turned on.
[0037]
Therefore, in the present embodiment, an 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 energization phase of the SR motor 12 during the initial drive after the ECU 41 is powered on. Is switched once in a predetermined time schedule, the edges of the A phase signal and B phase signal of the encoder 46 are counted, and 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 is learned. In the subsequent normal drive, the energized phase is determined based on the encoder count value and the learning result at the end of the initial drive.
[0038]
Specifically, learning at the time of initial driving is performed as follows. As shown in FIG. 12, when the initial drive is performed when the ECU 41 is powered on in the P range, for example, W phase energization → UW phase energization → U phase energization → UV phase energization → V phase energization → VW phase The energized phases are switched in a predetermined time schedule in the energization order, and the rotor 32 is driven in the normal rotation direction (P range → NotP range rotation direction).
[0039]
On the other hand, when initial driving is performed when 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 phases are switched once in a predetermined time schedule, and the rotor 32 is driven in the reverse rotation direction (the rotation direction of NotP range → P range).
[0040]
During this initial drive, the one-phase energization time T1 is set shorter than the two-phase energization time T2, and for example, T1 = 10 ms and T2 = 100 ms are set. 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 as quickly as possible. By switching to the next two-phase energization, the vibration of the rotor 32 is quickly stopped and the output signal of the encoder 46 is stabilized.
[0041]
Thus, if the energized phase is switched once during the initial drive, the rotational position of the rotor 32 and the energized phase always coincide with each other in the energized phase by 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.
[0042]
During this initial drive, both the rising and falling edges of the A phase signal and 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) that the rotor 32 has actually rotated in synchronization with the switching of the energized phase before the end of the initial drive can be found. The correspondence relationship between the encoder count value at the time, the rotational position of the rotor 32, and the energized phase is known.
[0043]
In the example of FIG. 12, the rotor 32 rotates from the first energized phase (W phase) during initial driving, and the rotor 32 rotates by 7.5 ° every time the energized phase is switched and the encoder count value is incremented by 2. At the end of the initial drive, the encoder count value becomes 12.
[0044]
In contrast, for example, when the rotor 32 does not rotate by 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). When the rotor 32 rotates by the amount of excitation three times in synchronization with the rotation position of the rotor 32 and the energized phase, the rotor 32 is 7.5 ° × 3 = 22.5 ° before the end of the initial drive. Rotate 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 found.
[0045]
The last energized phase of the initial drive is always the VW phase, but the encoder count value is not necessarily 12 and may be 8 or 4, for example. During normal driving after the end of initial driving, the energized phase is determined based on the encoder count value. Therefore, the correct energized phase cannot be selected during normal driving unless the encoder count value deviation due to initial driving is corrected.
[0046]
Therefore, in this embodiment, the encoder count value at the end of the initial drive is learned as the initial position deviation learned value, and the encoder count value is corrected with the initial position deviation learned value at the subsequent normal drive, so that The correct energized phase can be selected during normal driving by correcting the deviation between the encoder count value and the energized phase (rotation position of the rotor 32).
[0047]
After the end of the initial drive, as shown in FIG. 12, the position of the rotor 32 is set by energizing, for example, 10 ms in the same phase as the energized phase (VW phase) at the end of the initial drive by the F / B control start position stop holding process described later. Is held at the position at the end of the initial drive, and then the energization phase is changed based on the encoder count value and the initial position deviation learning value at that time by feedback control (hereinafter referred to as “F / B control”) described later. The rotor 32 is switched to rotate in the direction of the target position Acnt. As a result, when the rotational position (encoder count value) of the rotor 32 reaches within, for example, 0.5 ° from the target position Acnt, the switching of the energized phase is terminated and the rotor 32 is stopped. By the position stop holding process, the same phase is continuously energized to hold the rotor 32 in a stopped state, and this holding state is continued for, for example, 50 ms. Thereafter, if the target position Acnt does not change, the energization is stopped.
[0048]
In the middle of the initial drive, when the P range switch 43 or the NotP range switch 44 is operated to generate a range switching request, the next two-phase energization (when a range switching request occurs during execution of two-phase energization) Shifts to normal drive after the two-phase energization is completed, and learns 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, and during the subsequent normal drive The energized phase is determined based on the encoder count value and the learning result at the end of the two-phase energization.
[0049]
In the two-phase energization, since the torque is large, even if the position of the rotor 32 is slightly deviated from the position corresponding to the two-phase energization, the rotor 32 can be rotated to the position corresponding to the two-phase energization. For this reason, it is considered that there is a high probability that the rotational 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 drive. Therefore, when a range switching request is generated during the initial drive, if the next two-phase energization (or the current two-phase energization) is completed and then the normal drive is started, the encoder is changed during the initial drive. After learning the correspondence relationship between the count value, the rotational position of the rotor 32 and the energized phase, it is possible to quickly shift to normal driving.
[0050]
For example, as shown in the time chart of FIG. 13, when a request for switching the range from the P range to the NotP range is generated during the second excitation (UW phase energization) of the initial drive, the initial drive is performed by this UW phase energization. At the same time, the process shifts to normal driving, and the correspondence between the encoder count value at the end of energization of the UW phase, the rotational position of the rotor 32 and the energized phase is learned. In this embodiment, even when shifting to normal driving in the middle of initial driving, assuming that the initial driving has been executed to the end, the encoder count value at the end of the initial initial driving is estimated, and the estimated value is initialized. The misregistration learning value is used. For example, as shown in FIG. 13, when the initial drive is completed with two excitations of W-phase energization and UW-phase energization, the initial drive is terminated without performing the four excitations scheduled thereafter. Assuming that four unfinished excitations (U-phase energization → UV-phase energization → V-phase energization → VW-phase energization) were performed, a count-up value corresponding to the rotation angle for the four excitations (2 X4 = 8) is added to the encoder count value at the end of energization of the UW phase to obtain the initial misalignment learning value.
[0051]
By the way, in the conventional range switching control, every time the command shift range (target position) is switched from the P range to the NotP range or the opposite direction, the rotor 32 is driven to rotate and the SR motor 12 is driven based on the encoder count value. After performing feedback control (hereinafter referred to as “F / B control”) that rotationally drives the rotor 32 to the target position by sequentially switching the energization phase, the energization to the SR motor 12 is turned off.
[0052]
In this case, if the energization is continued in the winding of the phase corresponding to the target position after the end of the F / B control, the rotor 32 can be continuously held by the electromagnetic force at the target position. In this case, the windings of the same phase are continuously energized for a long time, so that the windings may overheat and burn out. For this reason, while the rotor 32 is stopped, the power supply to the winding is turned off to prevent overheating and burning of the winding.
[0053]
However, if the energization 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, so the position of the rotor 32 may deviate from the target position. There is. In the present embodiment, a mechanical stop holding 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 caused by backlash of the stop holding mechanism, manufacturing variations, and the like. May deviate from the target position.
[0054]
In the conventional range switching control, the first energized phase is determined using the encoder count value at the end of the previous F / B control at the start of F / B control, and immediately after the first energized phase is determined, B control is started.
[0055]
Therefore, when the position of the rotor 32 is shifted during the stop, in the conventional range switching control, the F / B control is started from an energized phase that is different from the energized phase that is actually energized first. For this reason, there is a possibility that the rotor 32 cannot be normally rotated to the target position, such as a step-out occurs at the start of the F / B control and the start-up fails or the rotor 32 rotates in a direction opposite to the target position. There is sex.
[0056]
If the amount of deviation 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 It becomes the energized phase at the end of the previous F / B control. Therefore, in this case, there is no problem with the energized phase that should be energized first, even with the conventional range switching control.
[0057]
However, since the F / B control is performed on the basis of the position of the rotor 32 at the time of energization, the positional deviation of the rotor 32 temporarily falls within a range corresponding to the encoder count value at the end of the previous F / B control. Even if the F / B control is started after the first energized phase is energized and before the position of the rotor 32 is moved / held to the position of the rotor 32 at the time of energization, the F / B control is started. There is a possibility that step-out occurs at the start and the startup fails.
[0058]
As a countermeasure, in this 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 based on the current encoder count value, and two phases are selected. Processing to stop and hold the rotor 32 by energization (hereinafter referred to as “F / B control start position stop holding processing”) is executed for a predetermined time (for example, 10 ms), and then F / B control is executed to move the rotor 32 to the target position. It is made to drive to rotation.
[0059]
In this way, even if the position of the rotor 32 is shifted 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 determined. 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 can be controlled. It is possible to prevent rotation in the direction opposite to the target position, perform stable F / B control and reliably rotate the rotor 32 to the target position, and position switching control (positioning control with high stability and reliability). )It can be performed.
[0060]
By the way, in order to make the position switching control highly responsive, the rotational speed of the rotor 32 is increased to shorten the arrival time to the target position. For this reason, immediately after the rotor 32 reaches the target position, the rotor 32 is still in a state of being oscillated without being completely stopped, and when the energization is turned off in such a state, the stop position of the rotor 32 is caused by inertial force. May greatly deviate from the target position. If the position shift of the rotor 32 at the end of the F / B control becomes too large, the position shift of the rotor 32 is detected even if the F / B control start position stop holding process is performed immediately before the start of the next F / B control. There is a possibility that it cannot be corrected.
[0061]
As a countermeasure, in this embodiment, after the end of the F / B control, a process for stopping and holding the rotor 32 by two-phase energization at the position at the end of the F / B control (hereinafter referred to as “target position stop holding process”) is predetermined. After being executed for a time (for example, 50 ms), the energization to the SR motor 12 is turned off. In this way, after the rotor 32 reaches the target position, the energization can be turned off after the vibration of the rotor 32 has subsided. Therefore, the stop position of the rotor 32 is prevented from greatly deviating from the target position due to inertial force. can do. Thereby, the request | requirement of the high response of position switching control can be satisfy | filled, maintaining the stability and reliability of position switching control.
[0062]
Furthermore, in this embodiment, when the command shift range (target position) is changed during the F / B control and it is necessary to reverse the rotation direction of the rotor 32, the rotor 32 is stopped by two-phase energization at the reverse position. The holding process (hereinafter referred to as “reverse position stop holding process”) is executed for a predetermined time (for example, 50 ms), and then the F / B control is resumed to rotate the rotor 32 to the changed target position. Yes. In this way, when the command shift range (target position) is changed during the F / B control, the reversing position of the rotor 32 can be positioned and the reversing operation can be performed stably. Thus, it is possible to prevent step-out (displacement of the energized phase) from occurring, and to reliably drive the rotor 32 to the changed target position.
[0063]
In the present embodiment, when the difference between the encoder count value and the target count value corresponding to the target position becomes less than a predetermined value (for example, a count value corresponding to the phase advance of the energized phase) during the F / B control. In addition, the F / B control is terminated and the process proceeds 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 °). Therefore, when the difference between the encoder count value and the target count value reaches, for example, a count value corresponding to the phase advance of the energized phase during the F / B control, the F / B control is terminated. If this is the case, the last energized phase of the F / B control matches the energized phase that stops and holds the rotor 32 at the target position. Energization can be performed, and the transition from the F / B control to the target position stop holding process can be performed smoothly.
[0064]
By the way, in order to generate torque for rotationally driving the rotor 32, it is necessary to advance the phase of the energized phase with respect to the rotational phase of the rotor 32. After the start of the F / B control, as the rotational speed of the rotor 32 increases, the change speed of the encoder count value increases and the switching timing of the energized phase becomes faster. Since a delay corresponding to the inductance of the windings 33 and 34 occurs from when the energization is started to when the torque is actually generated, energization of the windings 33 and 34 in the energized phase starts when the rotational speed of the rotor 32 increases. Then, the rotor 32 rotates by a considerable angle from when the torque is actually generated, and the torque generation timing of the energized phase is delayed with respect to the actual rotation phase of the rotor 32. In such a state, the drive torque decreases and the rotational speed of the rotor 32 is suppressed, and the demand for higher position switching speed (higher rotational speed of the rotor) cannot be satisfied.
[0065]
As a countermeasure, it is conceivable to set a large phase advance amount of the energized phase in advance. However, when the phase advance amount of the energized phase is large at the start of F / B control (at the time of start-up), the starting torque becomes small. Therefore, the SR motor 12 may become unstable or fail to start.
[0066]
In addition, if the phase advance amount of the energized phase is set large in advance to increase the rotational speed of the rotor 32, the rotor 32 tends to overshoot beyond the target position due to inertia when the F / B control ends, and the rotor 32 It becomes difficult to stop at the target position accurately.
[0067]
Therefore, in the present embodiment, during F / B control, it is necessary to correct the phase advance amount of the energized phase with respect to the rotational phase of the rotor 32 according to the rotational speed of the rotor 32 and to reduce the rotational speed of the rotor 32. When this occurs (for example, when the rotor 32 approaches the target position), the phase advance amount of the energized phase is corrected so as to be reduced. Specifically, at the start of the F / B control, the starting torque can be increased and the rotational speed of the rotor 32 can be quickly raised by correcting so that the phase advance amount of the energized phase is reduced. As the rotational speed of the rotor 32 increases, the torque generation timing of the energized phase and the actual rotation phase of the rotor are corrected by increasing the phase advance amount of the energized phase even during high-speed rotation. Can be maintained, and the rotor 32 can be stably rotated at a high speed. This makes it possible to achieve both startup performance and high speed performance.
[0068]
Thereafter, when the rotor 32 approaches the target position, if the phase advance amount of the energized phase is corrected to be reduced, the torque generation timing of the energized phase is delayed with respect to the actual rotational phase of the rotor 32. As a result, the driving torque can be reduced, or a torque (braking torque) in the direction opposite to the rotation direction of the rotor 32 can be generated, and the rotation speed of the rotor 32 can be reliably reduced. 32 can be accurately stopped at the target position. Thereby, F / B control excellent in starting performance, high speed performance, and stopping performance (deceleration performance) can be performed.
[0069]
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. The processing contents of these routines will be described below.
[0070]
[Initial drive]
It 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 is turned on to the ECU 41 (immediately after the ignition switch is operated from the OFF position to the ACC position) until the initial drive is completed.
[0071]
When this routine is started, first, at step 101, it is determined whether or not the open loop control execution flag Xopen = ON or the recovery process execution flag Xrcv = ON. Here, the open loop control execution flag XOpen is a flag for determining whether or not the open loop control (fail safe process) executed when the encoder 46 or the SR motor 12 fails is executed, and ON is executed. Means that 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. Means that
[0072]
If “Yes” is determined in step 101, this routine is terminated without performing the subsequent processing, and if “No” is determined, the process proceeds to step 102 and output from the initial process of the ECU 41. It is determined whether or not 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 process, the process proceeds to step 103, the output voltage of the output shaft sensor 14 is read, and whether or not the current range is the P range depending on whether the output voltage is equal to or less than the range determination value. If it is the NotP range, if it is the P range, the process proceeds to step 104, and the range determination flag Xnp is set to “0” meaning the P range. If it is the NotP range, the process proceeds to step 105, and the range determination flag Xnp Is set to “1” meaning the NotP range.
[0073]
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 in FIG. If the range initial drive routine is executed and the range determination flag Xnp = 1 (NotP range), the routine proceeds to step 108 and the NotP range initial drive routine of FIG. 11 is executed.
[0074]
When the P range initial drive routine of FIG. 10 is started in step 107, it is determined in steps 201 to 206 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 set to 0 in the initial process, and is incremented by 1 every time excitation is performed (step 114 in FIG. 9). Then, the energization phase and energization time T are set as follows according to the determination result of the excitation number counter CASE.
[0075]
If CASE = 0 (first excitation), the process proceeds to step 207, 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).
[0076]
If CASE = 2 (third excitation), the process proceeds to step 209, where the U-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
When CASE = 3 (the fourth excitation), the process proceeds to step 210, UV phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0077]
If CASE = 4 (fifth excitation), the process proceeds to step 211, 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, VW phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0078]
As a result, when the initial drive is performed in the P range, the energized phase is switched in the order of W phase energization → UW phase energization → U phase energization → UV phase energization → V phase energization → VW phase energization. Drive 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.
[0079]
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 energization is performed according to the determination result. The phase and energization time T are set as follows.
[0080]
If CASE = 0 (first excitation), the process proceeds to step 227, 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, UV phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0081]
If CASE = 2 (third excitation), the process proceeds to step 229, U phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 3 (the fourth excitation), the process proceeds to step 230, where the UW phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0082]
If CASE = 4 (the fifth excitation), the process proceeds to step 231 to select W-phase energization and set the energization time T to T1 (for example, 10 ms).
If CASE = 5 (sixth excitation), the process proceeds to step 232, VW phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0083]
As a result, when initial drive is performed in the NotP range, the switching of the energized phases is made in the order of V phase energization → UV phase energization → U phase energization → UW phase energization → W phase energization → VW phase energization in order. It drives in the reverse rotation direction (NotP range → P range rotation direction). Also in this case, the one-phase energization time T1 is set shorter than the two-phase energization time T2.
[0084]
As described above, after the P range initial drive routine of FIG. 10 or the NotP range initial drive routine of FIG. 11 is executed, the process proceeds to Step 109 of FIG. 8 to perform the range switching operation (P range switch 43 or NotP during the initial drive). If the range switch operation is performed during the initial drive, the process proceeds to step 110, the range switch operation flag Xchg is set to ON, and the range switch operation is performed. If not, the process proceeds to step 111, and the range switching operation flag Xchg is set to OFF.
[0085]
Thereafter, the process proceeds to step 112 in FIG. 9, and the energization time counter CT for counting the energization time of the current energized phase is counted up. In the next step 113, the energization time CT of the current energized phase is changed to that shown in FIG. It is determined whether the energization time T (= T1 or T2) set in the routine No. 11 has been exceeded. If not, the routine is terminated without performing the subsequent processing. As a result, energization of the current energized phase is continued until the energization time CT of the current energized phase exceeds the energization time T (= T1 or T2) set in the routine of FIG. 10 or FIG.
[0086]
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 11, the process proceeds to step 114, and the excitation number counter CASE is incremented by 1. Then, the energized phase is switched to the next energized phase. In the next step 115, the energization time counter CT is reset, and then the process proceeds to step 116, where it is determined whether or not the excitation number counter CASE has reached “6” which means the end of the initial drive. If the number counter CASE has reached “6”, the process proceeds to step 118, and the initial drive end flag Xend is set to “ON” which means the end of the initial drive.
[0087]
On the other hand, if the excitation number counter CASE has not reached “6”, that is, if it is in the middle of the initial drive, the routine proceeds to step 117, where it is determined whether or not the initial drive halfway termination condition is satisfied. The initial driving end condition is determined by the following three conditions (1) to (3).
(1) Range determination flag Xnp is 0 (P range)
(2) The excitation number counter CASE is 2 or 4, that is, at the end of two-phase energization
(3) The range switching operation flag Xchg is ON, that is, the range switching operation was performed during the initial drive.
[0088]
If any one of the three conditions (1) to (3) does not satisfy one of the conditions, the initial driving halfway termination condition is not satisfied, and the initial driving is continued. On the other hand, if all the three conditions (1) to (3) are satisfied, the initial driving end condition is satisfied, and the routine proceeds to step 118, where the initial driving end flag Xend means the end of the initial driving. Set to “ON”.
[0089]
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 is 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 the initial misregistration learning value Gcnt. 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
[0090]
In the present embodiment, the encoder count value Ncnt is counted up with the holding position of the P range as the zero point position, and when the rotor 32 rotates to the holding position of the NotP range, the encoder count value Ncnt becomes 288, for example. ing. Accordingly, when initial drive is performed in the NotP range, 288 is added to the encoder count value Ncnt at the end of the initial drive, thereby correcting the encoder count value Ncnt to a value based on the NotP range.
[0091]
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 set using the encoder count value Ncnt at the end of initial driving. Calculated by the following formula.
Gcnt = Ncnt + 2 × (6-CASE)
[0092]
In this case, if the initial driving is performed to the end, CASE = 6 is obtained by the process of step 114, and therefore the encoder count value Ncnt at the end of the initial driving becomes the initial positional deviation learning value Gcnt as it is, but the initial driving is performed in the P range. When the range switching operation is performed during the initial drive, the next two-phase energization (or the two-phase energization when a range switching request occurs during execution of the two-phase energization) is completed. Therefore, assuming that the initial drive has been executed to the end, the encoder count value Ncnt at the end of the initial initial drive is estimated, and the estimated value is set as the initial misregistration learning value Gcnt. ing. 2 × (6-CASE) is a count-up value (hereinafter referred to as “Ncnt correction amount”) corresponding to the rotation angle corresponding to the number of incomplete excitations.
[0093]
FIG. 14 is a time chart for explaining the relationship among the excitation number counter CASE, Ncnt correction amount, energized phase, A phase signal, B phase signal, and encoder count value Ncnt at the time of initial driving. For example, during the initial drive, when the initial drive ends when the UW phase energization ends (when the excitation number counter CASE is changed from 1 to 2), Ncnt correction amount = 2 × (6-CASE) = 2 × ( 6-2) = 8, and when the initial driving is ended when the UV phase energization ends (when the excitation number counter CASE is changed from 3 to 4), the Ncnt correction amount = 2 × (6-CASE) = 2 ×. (6-4) = 4.
[0094]
[Encoder counter]
Next, processing contents of the encoder counter routine shown in FIG. 15 will be described. This routine is started in synchronization with both the rising and falling edges of the A phase signal and the B phase signal by the AB phase interrupt processing, and the rising and falling edges of the A phase signal and the B phase signal are followed. 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 B phase signal are read, and in the next step 302, the count-up value ΔN calculation map of FIG. By searching, the current values A (i) and B (i) of the A phase signal and the B phase signal and the count-up value ΔN corresponding to the previous values A (i-1) and B (i-1) are calculated. .
[0095]
Here, the reason why the current 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 as follows. This is because the rotation direction of the rotor 32 is determined based on the signal generation order. As shown in FIG. 17, in the normal rotation (the rotation direction from the P range to the NotP range), the count-up value ΔN is set to a plus value and the encoder count value Ncnt. Is counted up, and in reverse rotation (rotation direction of NotP range → P range), the count-up value ΔN is set to a negative value, and the encoder count value Ncnt is counted down.
[0096]
After calculating the count-up value ΔN, the process proceeds to step 303, and the current encoder count value Ncnt is obtained by adding the count-up value ΔN calculated in step 302 to the previous encoder count value Ncnt. Thereafter, the process proceeds to step 304, and the current values A (i) and B (i) of the A-phase signal and the B-phase signal are respectively converted to A (i-1) and B (i-1) for the next counting process. And the routine is terminated.
[0097]
[Control mode setting]
The control mode setting routine shown in FIG. 20 to FIG. 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 0, 1, 3, 4, or 5. Specify the control mode as follows.
[0098]
mode = 0: energization off (standby)
mode = 1: Normal drive
(F / B control start position stop holding process and F / B control)
mode = 3: target position stop holding process
mode = 4: Reverse position stop holding process
mode = 5: Open loop control
[0099]
When the control mode setting routine is started, first, at step 401, it is determined whether or not the system failure flag Xfailoff is set to ON, which means that the range switching control device 42 has failed, and if Xfailoff = ON is set. If so, the process proceeds to step 402, and a process for maintaining the SR motor 12 in the energized 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 prohibited), the control mode determination value mode = 0 (energization off) ).
[0100]
On the other hand, if the system failure flag Xfailoff is OFF (no failure), the process proceeds from step 401 to step 403 to determine whether or not the open loop control execution flag Xopen = OFF and the recovery process execution flag Xrcv = OFF. . If either or both of the open loop control execution flag Xopen and the recovery process execution flag Xrcv are set to ON, the process proceeds to step 404, and in order to execute the open loop control, the rotation direction instruction value D = Set to 0 (stop), control mode determination value mode = 5 (open loop control), and F / B permission flag Xfb = OFF (F / B control prohibited).
[0101]
If both the open loop control execution flag Xopen and the recovery process execution flag Xrcv are set to OFF, the process proceeds to step 405, where it is determined whether the energization flag Xon = ON (energization on) is set. If the flag Xon is set to OFF (energization off), the process proceeds to step 406, where a difference between the target count value Acnt and the encoder count value Ncnt (difference between the target position and the rotor 32 and the position) is obtained. Based on the difference (Acnt−Ncnt), it is determined whether it corresponds to forward rotation (rotation in the P range → NotP range direction), reverse rotation (rotation in the NotP range → P range direction), or stop. At this time, the encoder count value Ncnt uses a value corrected by the initial positional deviation learning value Gcnt learned in the initial driving routine of FIGS.
Ncnt = Ncnt-Gcnt
[0102]
If the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is + Kth or more (for example, + 10 ° or more), the rotor 32 is rotationally driven in the normal rotation direction (P range → NotP range rotation direction). It is determined that it is necessary, and 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 process and F / B control).
[0103]
If the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is −Kth or less (for example, −10 ° or less), the rotor 32 is rotated in the reverse rotation direction (notP range → P range rotation direction). 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 holding process and F / B control).
[0104]
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 brought to the target position and the detent spring 23 It is determined that the SR motor 12 can be held (the SR motor 12 need not be energized), and the process proceeds to step 408 to maintain the SR motor 12 in the energized off state. 0 (stop), energization flag Xon = OFF (energization off), and control mode determination value mode = 0 (energization off).
[0105]
On the other hand, if it is determined in step 405 that the energization flag Xon = ON (energization on) is set, has the command shift range (target position) been reversed by the processing of steps 410 to 415 in FIG. If it is reversed, the rotation direction instruction value D is reversed.
[0106]
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 or not it is necessary to reverse the rotation direction of the rotor 32 from the normal rotation to the reverse rotation depending 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 to set the rotation direction instruction value D = −1 (reverse rotation).
[0107]
On the other hand, when it is determined in step 410 that the rotation direction instruction value D is not 1 (forward rotation) (that is, when D = 0 or −1), the process proceeds to step 413 and the rotation direction instruction value D is reached. Is determined to be equal to −1 (reverse rotation). If the rotation direction instruction value D is −1 (reverse rotation), the process proceeds to step 414 and the difference between the target count value Acnt and the encoder count value Ncnt ( It is determined whether or not it is necessary to reverse the rotation direction of the rotor 32 from the reverse rotation to the normal rotation based on whether or not (Acnt−Ncnt) is a positive value. Direction indication value D = 1 (forward rotation) is set.
[0108]
As described above, when the rotation direction instruction value D is reversed, the process proceeds to step 416, and in order to reverse the rotation direction of the rotor 32, the control mode determination value mode = 4 (reverse position stop holding process), F / B permission flag Xfb = OFF (F / B control prohibited) is set, and the process proceeds to step 417. On the other hand, if the rotation direction instruction value D is not reversed, the process proceeds to step 417 without performing the process of step 416.
[0109]
In this step 417, it is determined whether or not the control mode determination value mode = 4 (reverse position stop holding process) is set. If “Yes”, the process proceeds to step 418 and the energization flag Xon = ON (energization on). ) And the reverse position stop holding process is executed.
[0110]
On the other hand, if it is determined “No” in step 417 (not the reverse position stop holding process), it is determined in steps 419 to 421 in FIG. 22 whether it is the end timing of the F / B control. Determine. 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 and the target count is reached. Whether or not it is 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 + Kref or less (for example, + 0.5 ° or less). 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 −Kref or more (for example, −0.5). It is determined whether or not it is the end timing of the F / B control.
[0111]
In other words, 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 before the target count value Acnt is 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 that stops and holds the rotor 32 at the target position (target count value Acnt).
[0112]
When it is determined as “No” in the above-described step 420 or 421 (when it is not the end timing of the F / B control), the process proceeds to step 422 and the stop holding time counter CThold for counting the time of the target position stop holding process is reset. .
[0113]
On the other hand, if “Yes” is determined in 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 prohibited). To end the F / B control and shift to the target position stop holding process. Then, in the next step 424, the stop holding time counter CThold is counted up, and the time of the target position stop holding process is counted.
[0114]
Thereafter, the process proceeds to step 425, where it is determined whether or not the target position stop holding process time CThold has reached a predetermined time (for example, 50 ms), and the target position stop holding process time CThold 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), the control mode determination value mode = 3 (target The position stop holding process) is maintained.
[0115]
Thereafter, when the target position stop holding processing time CThold reaches a predetermined time (for example, 50 ms), the process proceeds to step 427 to turn off the SR motor 12, and 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.
[0116]
[Time synchronous motor control]
The time-synchronized motor control routine shown in FIG. 23 is started at a predetermined cycle (for example, 1 ms cycle) after the end of the initial drive, and executes F / B control start position stop holding processing, target position stop holding processing, and reverse position stop holding processing. .
[0117]
When this routine is started, first, at step 501, it is determined whether or not the F / B permission flag Xfb = OFF (F / B control prohibited), and the F / B permission flag Xfb = ON (F / B control). In the case of execution), this routine is terminated without performing the subsequent processing. In this case, energization phase setting and energization processing are executed by an F / B control routine shown in FIG. 29 described later.
[0118]
On the other hand, if it is determined in step 501 that the F / B permission flag Xfb = OFF (F / B control prohibited), the control mode determination value mode = 1, 3, 4 is determined in steps 502 to 504. If the control mode determination value mode = 1 (F / B control start position stop holding process and F / B control), the process proceeds from step 502 to step 505, and will be described later. The mode 1 routine shown in FIG. 24 is executed to calculate the energized phase determination value Mptn for setting the energized phase when the F / B control start position stop holding process is executed.
[0119]
When the control mode determination value mode = 3 (target position stop holding process), the process proceeds from step 503 to step 506, and a mode 3 routine shown in FIG. An energized phase determination value Mptn for setting the phase is calculated.
[0120]
When the control mode determination value mode = 4 (reverse position stop holding process), the process proceeds from step 504 to step 507, and a mode 4 routine shown in FIG. An energized phase determination value Mptn for setting the phase is calculated.
[0121]
As described above, in the case of the control mode determination value mode = 1, 3, 4, after calculating the energization phase determination value Mptn, the process proceeds to step 508, and an energization process routine shown in FIG. F / B control start position stop holding processing, target position stop holding processing, and reverse position stop holding processing are executed.
[0122]
On the other hand, if it is determined “No” in steps 502 to 504, that is, if the control mode determination value mode = 0, 5, the process proceeds to step 508, and an energization processing routine shown in FIG. Run to turn off power or open loop control.
[0123]
[Mode1]
The mode1 routine shown in FIG. 24 is a subroutine started in step 505 of the time synchronous motor control routine of FIG. 23, and the energized phase determination value Mptn (energized phase) at the time of the F / B control start position stop holding process is Set as follows.
[0124]
When this routine is started, first, in step 511, the energization time counter CT1 for counting the time of the F / B control start position stop holding process is counted up, and in the next step 512, the F / B control start position stop hold. It is determined whether or not the processing time CT1 exceeds a predetermined time (for example, 10 ms).
[0125]
If the time CT1 of the F / B control start position stop holding process does not exceed a predetermined time (for example, 10 ms), the process proceeds to step 513, and whether the energized phase stored flag Xhold = OFF (not stored) at the time of stop holding. (That is, whether or not it is the timing immediately before the start of the F / B control start position stop holding process), and if the stopped holding energized phase stored flag Xhold = OFF, the process proceeds to step 514, where F / B The energized phase determination value Mptn during the B control start position stop holding process is set to the current position counter value (Ncnt−Gcnt).
Mptn = Ncnt−Gcnt
[0126]
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.
[0127]
Thereafter, the process proceeds to step 515, where the energized phase determination value Mptn is divided by “12” to obtain the remainder Mptn% 12. Here, “12” corresponds to an increase / decrease amount of the encoder count value Ncnt (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.
[0128]
In the next step 516, whether or not one-phase energization (U-phase energization, V-phase energization, W-phase energization) is performed depending on whether or not Mptn% 12 = 2, 3, 6, 7, 10, 11. If one-phase energization is determined, the process proceeds to step 517, where the energization phase determination value Mptn is increased by “2” corresponding to one step and two-phase energization (UV-phase energization, VW-phase energization, UW-phase energization). ). This prevents the rotor 32 from vibrating near the F / B control start position by executing the F / B control start position stop holding process with the two-phase energization having a larger holding torque than the one-phase energization. The rotor 32 can be reliably stopped and held at the F / B control start position.
[0129]
In the next step 518, the energized phase stored flag Xhold = ON (stored) is set at the time of stopping and this routine is finished. Thereafter, when this routine is started, “No” is determined in Step 513, and the processing in Steps 514 to 518 is not executed. Thereby, the process of setting the energized phase determination value Mptn (energized phase) during the F / B control start position stop holding process is executed only once just before the start of the F / B control start position stop holding process.
[0130]
Thereafter, when the time CT1 of the F / B control start position stop holding process exceeds a predetermined time (for example, 10 ms), “Yes” is determined in step 512, and the F / B control start position stop holding process is ended. , Shift to F / B control. Thereby, first, in step 519, the count value (for example, 4 or 3) for the phase advance of the energized phase is added to the energized phase determination value Mptn in the F / B control start position stop holding process. Alternatively, the first energized phase determination value Mptn at the start of the F / B control is set by subtraction, and thereby the rotational drive of the rotor 32 is started. Thereafter, the process proceeds to step 520, where the F / B permission flag Xfb = ON (F / B control execution) is set.
[0131]
FIG. 31 is a time chart for explaining a phase that is first energized when rotation starts from the UW phase. In this case, when starting normal rotation (rotation in the P range → NotP range direction), the energized phase determination value Mptn uses the encoder count value Ncnt, the initial misalignment learning value Gcnt, and the positive rotation direction phase advance amount K1. Is calculated by the following equation.
Mptn = Ncnt−Gcnt + K1
[0132]
Here, assuming that the forward rotation direction phase advance amount K1 is 4, for example, the energized phase determination value Mptn is calculated by the following equation.
Mptn = Ncnt−Gcnt + 4
When starting normal rotation from the UW phase, mod (Ncnt−Gcnt) is 4, so Mptn% 12 = 4 + 4 = 8, and the first energized phase is the UV phase.
[0133]
On the other hand, when reverse rotation (rotation in the NotP range → P range direction) is started from the UW phase, when the reverse rotation direction phase advance amount K2 is set to 3, for example, the energized phase determination value Mptn is calculated by the following equation. .
Mptn = Ncnt-Gcnt-K2 = Ncnt-Gcnt-3
When reverse rotation is started from the UW phase, Mptn% 12 = 4-3 = 1, and the first energized phase is the VW phase.
[0134]
Thus, by setting the forward rotation direction phase advance amount K1 and the reverse rotation direction phase advance amount K2 to 4 and 3, respectively, the switching pattern of the energized phases in the forward rotation direction and the reverse rotation direction can be made symmetric. In both cases of 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.
[0135]
[Mode3]
The mode3 routine shown in FIG. 25 is a subroutine started in step 506 of the time synchronous motor control routine of FIG. 23, and the energized phase determination value Mptn (energized phase) at the time of target position stop holding processing is set as follows. To do.
[0136]
When this routine is started, first, in step 531, the energization phase at the end of the F / B control is determined depending on whether or not Mptn% 12 at the end of the F / B control is 2, 3, 6, 7, 10, 11. Is one-phase energization (U-phase energization, V-phase energization, W-phase energization), and if it is one-phase energization, the F / B control performed so far 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 the current, thereby changing to the two-phase energization of the next step of the one-phase energization.
[0137]
At this time, in step 532, the rotation direction is determined as follows. Immediately before entering this routine (at the end of F / B control), in step 426 of FIG. 22, the rotation direction instruction value D is set to 0 (stop). Cannot judge. Therefore, in this routine, attention is paid to the difference between the energized phase phase advance amounts K1 and K2 between the energized phase determination value Mptn at the end of the F / B control and the position count value (Ncnt−Gcnt). The rotational direction is determined as follows according to 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).
[0138]
In the case of Mptn> Ncnt−Gcnt, it is determined that the rotation is normal (the rotation direction from the P range to the NotP range), the process proceeds to step 533, and the energized phase determination value Mptn is increased by 2 to correct the two-phase energization. .
[0139]
On the other hand, in the case of Mptn <Ncnt−Gcnt, it is determined that the rotation is reverse (the rotation direction of the NotP range → P range), the process proceeds to step 534, and the energized phase determination value Mptn is decreased by 2 so that 2-phase energization is achieved. to correct.
[0140]
In addition, when Mptn = Ncnt−Gcnt, it is determined to be stopped and the energized phase is not changed.
[0141]
As described above, the target position stop holding process is executed by two-phase energization having a holding torque larger than that of the one-phase energization, similarly to the F / B control start position stop holding process, so that the rotor 32 is near the target position. By preventing vibration, the rotor 32 can be reliably stopped and held at the target position.
[0142]
[Mode4]
The mode4 routine shown in FIG. 26 is a subroutine started in step 507 of the time synchronous motor control routine of FIG. 23, and the energized phase determination value Mptn (energized phase) during the reverse position stop holding process is set as follows. To do.
[0143]
When this routine is started, first, in step 541, the energization time counter CT4 for counting the time of the reverse position stop holding process is counted up. In the next step 542, the time CT4 of the reverse position stop holding process is set to a predetermined time ( For example, it is determined whether or not it exceeds 50 ms.
[0144]
If the reverse position stop holding processing time CT4 does not exceed a predetermined time (for example, 50 ms), the process proceeds to step 543, where the current value depends on whether Mptn% 12 = 2,3,6,7,10,11. It is determined whether or not the energized phase is one-phase energization (U-phase energization, V-phase energization, W-phase energization), and if it is one-phase energization, the processing of steps 544 to 546 has been performed until then. By increasing or decreasing the energization phase determination value Mptn by 2 in accordance with the rotation direction of the / B control, it is changed to 2-phase energization of the next step of the one-phase energization. The processing of steps 543 to 546 is the same as the processing of steps 531 to 534 of the mode 3 routine of FIG.
[0145]
As described above, the reverse position stop holding process is executed by two-phase energization having a larger holding torque than the one-phase energization, as in the F / B control start position stop holding process and the target position stop holding process. It is possible to prevent the rotor 32 from vibrating near the reversing position and to reliably stop and hold the rotor 32 at the reversing position.
[0146]
Thereafter, when the time CT4 of the reverse position stop holding process exceeds a predetermined time (for example, 50 ms), it is determined as “Yes” in Step 542, the reverse position stop holding process is ended, and the F / B control is restarted. . Thereby, 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 reverse position stop holding process according to the rotation direction. The first energized phase determination value Mptn at the time of resumption of the F / B control is set, and thereby the rotation drive of the rotor 32 is started. Thereafter, the process proceeds to step 548, where the F / B permission flag Xfb = ON (F / B control execution), the energization time counter CT4 = 0, and the control mode determination value mode = 1 (normal drive) are set, and this routine is terminated. To do.
[0147]
[Energization processing]
The energization processing routine shown in FIG. 27 is a subroutine started in step 508 of the time synchronous motor control routine of FIG. This routine is also started in step 603 of the F / B control routine of FIG. 29 described later.
[0148]
When the energization processing routine of FIG. 27 is started, first, at step 551, it is determined whether or not the control mode determination value mode = 0 (energization off), and if the control mode determination value mode = 0 (energization off). In step 552, the energization of all phases of the SR motor 12 is turned off to enter the standby state.
[0149]
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 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, for example, by a time synchronization process with a cycle of 1 ms, and the rotor 32 is rotated to the target position.
[0150]
Further, when it is determined as “No” in steps 551 and 553, that is, the control mode determination value mode = 1, 3, 4 (F / B control start position stop holding process, F / B control, target In the case of the position stop holding process and the reverse position stop holding process), the process proceeds to step 555, the energized phase is set by the conversion table of FIG. 28 according to Mptn% 12, and the windings 33 and 34 of the energized phase are energized. .
[0151]
[F / B control]
Next, processing contents of the F / B control routine shown in FIG. 29 will be described. This routine is executed by the AB phase interruption process, and when the F / B control execution condition is satisfied after the end of the initial drive, the rotational position of the rotor 32 (encoder count value Ncnt−Gcnt) becomes the target position (target count value). The rotor 32 is rotated by switching the energized phase based on the encoder count value Ncnt and the initial misregistration learning value Gcnt until, for example, within 0.5 ° from (Acnt).
[0152]
When the F / B control routine of FIG. 29 is started, first in step 601, it is determined whether or not the F / B permission flag Xfb is set to ON (whether or not the F / B control execution condition is satisfied). If the determination is made and the F / B permission flag Xfb is OFF (the F / B control execution condition is not established), this routine is terminated without performing the subsequent processing.
[0153]
On the other hand, if the F / B permission flag Xfb is set to ON, the process proceeds to step 602, and an energized phase setting routine shown in FIG. 30 described later is executed to determine the current encoder count value Ncnt and the initial position deviation learning value. The energization phase is set based on Gcnt, and the energization processing routine of FIG. 27 is executed in the next step 603.
[0154]
[Energized phase setting]
The energized phase setting routine shown in FIG. 30 is a subroutine started in step 602 of the F / B control routine of FIG. When this routine is started, first, at step 611, whether or not the rotation direction instruction value D for instructing the rotation direction to the target position is “1” indicating normal rotation (P range → NotP range rotation direction). Determine whether. As a result, if it is determined that the rotation direction instruction value D = 1 (forward rotation), the process proceeds to step 612, and whether or not the rotation direction of the rotor 32 has been reversed against the rotation direction instruction (the encoder count value Ncnt has decreased). If there is no reverse rotation, the process proceeds to step 613, using the current encoder count value Ncnt, initial position deviation learning value Gcnt, forward rotation direction phase advance amount K1, and speed phase advance correction amount Ks. The energized phase determination value Mptn is updated by the following equation.
Mptn = Ncnt−Gcnt + K1 + Ks
[0155]
Here, the positive rotation direction phase advance amount K1 is the phase advance amount of the energized phase necessary for normal rotation of the rotor 32 (the phase advance amount of the energized phase with respect to the current rotational phase of the rotor 32), for example, K1 = 4 is set.
[0156]
The speed phase advance correction amount Ks is a phase advance correction amount set according to the rotational speed of the rotor 32, and is set by a speed phase advance correction amount setting routine of FIG. For example, in the low speed range, the speed phase advance correction amount Ks is set to 0, and the speed phase advance correction amount Ks is increased to, for example, 1 or 2 as the speed increases. Thus, the energized phase determination value Mptn is corrected so that the energized phase is suitable for the rotational speed of the rotor 32.
[0157]
On the other hand, if it is determined in step 612 that the rotation direction of the rotor 32 is reversed against the rotation direction instruction, the energized phase determination value Mptn is not updated to prevent reverse rotation. In this case, the energization phase immediately before the reverse rotation (previous energization phase) is energized, and braking torque is generated in a direction that suppresses the reverse rotation of the rotor 32.
[0158]
If it is determined in step 611 that the rotation direction instruction value D = 0 (reverse rotation), that is, the rotation direction of the NotP range → 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 contrary, it is determined whether or not the rotation has been reversed (whether or not the encoder count value Ncnt has increased). The energized phase determination value Mptn is updated by the following equation using the direction phase advance amount K2 and the speed phase advance correction amount Ks.
Mptn = Ncnt-Gcnt-K2-Ks
[0159]
Here, the reverse rotation direction phase advance amount K2 is a phase advance amount of the energized phase necessary to reversely rotate the rotor 32 (phase advance amount of the energized phase with respect to the current rotation phase of the rotor 32), for example, K2 = 3 is set. The speed phase advance correction amount Ks is set by a speed phase advance correction amount setting routine of FIG.
[0160]
On the other hand, if it is determined in step 614 that the rotation direction of the rotor 32 is reversed against the rotation direction instruction, the energized phase determination value Mptn is not updated to prevent reverse rotation. In this case, the energization phase immediately before the reverse rotation (previous energization phase) is energized, and braking torque is generated in a direction that suppresses the reverse rotation of the rotor 32.
[0161]
After determining the current energized phase determination value Mptn as described above, the energization processing routine of FIG. 27 is executed, and 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.
[0162]
[Rotor speed calculation]
The rotor rotation speed calculation routine shown in FIG. 32 is executed by AB phase interruption processing, and calculates the rotation speed SP of the rotor 32 as follows. When this routine is started, first, at step 621, it is determined whether or not the F / B permission flag Xfb is ON (F / B control is being executed), and the F / B permission flag Xfb is OFF (F / B If the control is prohibited), the phase advance correction of the energized phase according to the rotational speed SP of the rotor 32 is not performed, so that the routine proceeds to step 624 and the stored values of the rotational speed SP and SPa of the rotor 32 are reset and this routine is executed. Exit.
[0163]
On the other hand, if the F / B permission flag Xfb is ON (F / B control is being executed), the rotational speed SP of the rotor 32 is calculated as follows. First, at step 622, the time interval ΔT (n) between the rising / falling edges of the A phase signal and the B phase signal of the encoder 46 (that is, the time interval at which the encoder count value increases or decreases) is measured, and the time interval ΔT is measured. The average value ΔTav for the past N times of (n) is calculated. Then, the rotational speed calculation value SPa is calculated by the following equation.
SPa = 60 / (ΔTav × Kp) [rpm]
[0164]
Here, Kp is the number of time intervals ΔT (n) per rotation of the rotor 32 (amount of change in the encoder count value per rotation of the rotor 32). In the case of the encoder 46 configured as shown in FIG. Kp = 96. ΔTav × Kp is the time [sec] required for the rotor 32 to make one rotation.
[0165]
Thereafter, the process proceeds to step 623, and the rotational speed SP of the rotor 32 is obtained by subjecting the rotational speed SP to the following equation using the rotational speed calculation value SPa.
SP (i) = SP (i-1) + {SPa-SP (i-1)} / R
Here, SP (i) is the current rotational speed, SP (i-1) is the previous rotational speed, and R is the smoothing coefficient.
[0166]
[Speed phase advance correction amount setting]
The speed phase advance correction amount setting routine shown in FIG. 33 is started at a predetermined cycle (for example, 1 ms cycle), and sets the speed phase advance correction amount Ks according to the rotational speed SP of the rotor 32 as follows. When this routine is started, it is first determined in step 631 whether or not the F / B permission flag Xfb is ON (F / B control is being executed), and the F / B permission flag Xfb is OFF (F / B If the control is prohibited), the phase advance correction of the energized phase is unnecessary, and this routine is terminated without performing the subsequent processing.
[0167]
On the other hand, if the F / B permission flag Xfb is ON (F / B control is being executed), the rotation speed of the rotor 32 calculated in the rotor rotation speed calculation routine of FIG. The speed phase lead correction amount Ks is set as follows according to SP.
[0168]
  If it is determined in step 632 that the rotational speed SP of the rotor 32 is lower than a predetermined value Klow (for example, 300 rpm), the process proceeds to step 634, where the speed phase advance correction amount Ks is set to the minimum value Ka (for example, 0), If it is determined in step 633 that the rotational speed SP of the rotor 32 is higher than a predetermined value Khigh (for example, 600 rpm), the process proceeds to step 636 to set the speed phase advance correction amount Ks to the maximum value Kc (for example, 2). If the rotational speed SP of the rotor 32 is within the range of Klow to Khigh, the process proceeds to step 635, and the speed phase advance correction amount Ks is set to an intermediate value Kb (for example, 1). By such processing, the speed phase advance correction amount Ks is set to a larger value as the rotational speed SP of the rotor 32 becomes faster.
  The processes in steps 632 to 636 described above serve as first correction means in the claims.
[0169]
Thereafter, the process proceeds to step 637, and whether or not the rotational position of the rotor 32 approaches the target position depending on whether or not the absolute value | Acnt−Ncnt | of the difference between the target count value Acnt and the encoder count value Ncnt is smaller than a predetermined value. It is determined whether or not (entered in the deceleration area for stopping).
[0170]
If | Acnt−Ncnt | is equal to or greater than a predetermined value, the process proceeds to step 639, where it is determined whether any deceleration request is generated during the F / B control. If there is no deceleration request, step 634 is performed. The speed phase advance correction amount Ks set in any of .about.636 is used as it is, and if there is a deceleration request, the process proceeds to step 640 and the speed phase advance correction amount Ks is set to a small value Ke (for example, 0 or −1). .
[0171]
  On the other hand, if | Acnt−Ncnt | is smaller than a predetermined value, it is determined as a deceleration region, the process proceeds from step 637 to step 638, and the speed phase advance correction amount Ks is set to a small value Kd (for example, 0 or −1). To do.
  The processes in steps 637 to 640 described above serve as second correction means in the claims.
[0172]
In this routine, the speed phase advance correction amount Ks is switched in three steps according to the rotational speed SP of the rotor 32, but may be switched in two steps or four or more steps.
[0173]
According to the present embodiment described above, the phase advance amount of the energized phase is corrected in accordance with the rotational speed of the rotor 32 during the F / B control. Therefore, when the F / B control is started, the phase of the energized phase is corrected. The starting amount can be increased by reducing the advance amount, and the rotational speed of the rotor 32 can be quickly raised after the start of the F / B control. As the rotational speed of the rotor 32 increases, the phase advance amount of the energized phase is corrected so as to increase. Therefore, even during high-speed rotation, the torque generation timing of the energized phase and the actual rotational phase of the rotor Can be maintained, and the rotor 32 can be stably rotated at a high speed.
[0174]
Thereafter, when the rotor 32 approaches the target position, the phase advance amount of the energized phase is corrected so as to decrease, so that the torque generation timing of the energized phase is delayed with respect to the actual rotation phase of the rotor 32. Thereby, the driving torque can be reduced, or the torque (braking torque) in the direction opposite to the rotation direction of the rotor 32 can be generated, and the rotation speed of the rotor 32 can be surely reduced, The rotor 32 can be accurately stopped at the target position. Thereby, F / B control excellent in starting performance, high speed performance, and stopping performance (deceleration performance) can be performed.
[0175]
Further, in this embodiment, as shown in FIG. 18, when F / B control is started from the energization-off state of the SR motor 12, the energized phase is selected based on the current encoder count value, and the two-phase energization is performed. The F / B control start position stop holding process for holding the position of the rotor 32 is executed for a predetermined time (for example, 10 ms), and then the F / B control is executed to rotationally drive the rotor 32 to the target position. Therefore, even if the position of the rotor 32 is shifted while the rotor 32 is stopped, the position of the rotor can be positioned at an appropriate position when the F / B control is started. 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 can be controlled. It is possible to prevent rotation in the direction opposite to the target position, perform stable F / B control and reliably rotate the rotor 32 to the target position, and position switching control (positioning control with high stability and reliability). )It can be performed.
[0176]
Moreover, in the present embodiment, after the F / B control is completed, the target position stop holding process for stopping and holding the rotor 32 at the position at the end of the F / B control by two-phase energization is executed for a predetermined time (for example, 50 ms). Since the SR motor 12 is de-energized, the rotor 32 can be prevented from overshooting beyond the target position due to inertia at the end of the F / B control, and the stability and reliability of the position switching control can be maintained. However, it is possible to satisfy the demand for high response of the position switching control.
[0177]
Furthermore, in this 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, the rotor 32 is stopped at the reversal position by two-phase energization. Since the reverse position stop holding process for holding is executed for a predetermined time (for example, 50 ms) and then the F / B control is resumed to rotate the rotor 32 to the changed target position, the F / B control is in progress. When the command shift range (target position) is changed, the reversing position of the rotor 32 can be positioned and the reversing operation can be performed stably, and the reversing position is deviated and step-out (deviation of energized phase) occurs. Thus, the rotor 32 can be reliably rotated to the target position after the change.
[0178]
In addition, in the present embodiment, when performing the F / B control start position stop holding process, the target position stop holding process, and the reverse position stop holding process, if one-phase energization, two-phase energization (UV phase energization, VW phase Energized, UW-phase energized), so that each stop and hold process can be executed with two-phase energization with a large holding torque, and the rotor 32 can be prevented from vibrating and stopped at each position reliably. There is also an advantage that it can be held.
[0179]
In this embodiment, during the F / B control, the driving is performed by the 1-2 phase excitation method in which the one-phase energization and the two-phase energization are alternately switched. However, the one-phase excitation that is driven only by the one-phase energization. Alternatively, a two-phase excitation method that drives only by two-phase energization may be employed.
[0180]
Also, when performing open loop control, the process of stopping and holding at each position at the start of driving, at the end of driving, and at the time of changing the target position (at the time of reversing the rotation direction) It may be performed by energization. In this way, even in open loop control, it is possible to stably hold and hold each position at the start of driving, at the end of driving, and at the time of changing the target position (when reversing the rotation direction). Can be improved.
[0181]
In the embodiment described above, during the F / B control, the phase advance amount of the energized phase is corrected according to the rotational speed of the rotor 32 and the presence / absence of a deceleration request. No.) or switching the excitation method according to the presence or absence of a deceleration request, the same effect can be obtained. For example, when driving with the 1-2 phase excitation method at the initial stage of driving, one step (one excitation) compared to the one phase excitation method in which only one phase is always energized and the two phase excitation method in which two phases are always energized. ) The rotor rotation angle per hit becomes ½, the starting torque can be increased, and the rotation speed of the rotor 32 can be quickly raised. After that, if it is driven by the one-phase excitation method that performs only one-phase energization, the rotor rotation angle per step (one excitation) becomes twice that of the initial driving (two-phase excitation method), and the rotor 32 is stabilized at high speed. And can be rotated.
[0182]
In this case, when it is necessary to reduce the rotational speed of the rotor 32 during the period in which the rotor 32 is driven by the one-phase excitation method (for example, when the rotor 32 approaches the target position), the one-phase excitation method To the 1-2 phase excitation method. In other words, when the rotor 32 is rotating at a high speed by the one-phase excitation method, switching to the 1-2 phase excitation method results in a state in which the phase of the energized phase is delayed with respect to the actual rotation phase of the rotor 32. Torque (braking torque) in the direction opposite to the rotation direction of the rotor 32 is generated, and the rotation speed of the rotor 32 can be reliably reduced. Moreover, in the 1-2 phase excitation method, the rotor rotation angle per step (one excitation) is halved compared to the 1 phase excitation method, and the rotor 32 can be stopped at the target position with high accuracy. it can.
[0183]
Hereinafter, another embodiment of the present invention embodying this will be described with reference to FIGS. 34 and 35.
[0184]
The excitation method setting routine shown in FIG. 34 is started at a predetermined cycle (for example, 1 ms cycle), and the excitation method is set as follows according to the rotational speed of the rotor 32 (whether or not the drive is in the initial stage) and the presence or absence of a deceleration request. To do. When this routine is started, first, at step 701, it is determined whether or not the F / B permission flag Xfb is ON (F / B control is being executed), and the F / B permission flag Xfb is OFF (F / B If the control is prohibited), this routine is terminated without performing the subsequent processing.
[0185]
On the other hand, if the F / B permission flag Xfb is ON (F / B control is being executed), the routine proceeds to step 702, where it is determined whether or not the driving is in the initial stage, at least one of the following (1) to (3). Judgment using two conditions.
[0186]
(1) It is determined whether or not the driving is in the initial stage based on whether or not the rotational speed SP of the rotor 32 is not more than a predetermined value.
(2) It is determined whether or not the driving is in the initial stage based on whether or not the change amount (rotor rotation amount) of the encoder count value from the start of driving is equal to or less than a predetermined value.
(3) It is determined whether or not the driving is in the initial stage based on whether or not the elapsed time from the start of driving is equal to or less than a predetermined value.
[0187]
Note that it may be determined whether or not the driving is in the initial stage based on whether or not two or more of the above conditions (1) to (3) are satisfied. Of course, determination conditions other than the above (1) to (3) may be used. For example, whether or not the driving is in the initial stage is determined based on whether or not the motor load torque is equal to or greater than a predetermined value. good.
[0188]
If it is determined in step 702 that the drive is in the initial stage, the process proceeds to step 703, where the excitation method is set to the 1-2 phase excitation method, and in the next step 704, the speed phase advance correction amount Ks is set to 0, for example. Thereby, at the initial stage of driving, it is driven by the same 1-2 phase excitation method as in the above-described embodiment.
[0189]
On the other hand, if it is determined in step 702 that the driving is not in the initial stage, the process proceeds to step 705 to determine whether or not a deceleration request has been generated. At this time, for example, whether or not the rotational position of the rotor 32 approaches the target position depending on whether or not the absolute value | Acnt−Ncnt | of the difference between the target count value Acnt and the encoder count value Ncnt is smaller than a predetermined value ( It is determined whether or not the vehicle has entered a deceleration region for stopping), or whether or not the vehicle has entered a deceleration region set during F / B control.
[0190]
If there is no deceleration request, the process proceeds to step 706, where the excitation method is set to the one-phase excitation method and the rotor 32 is driven. In the one-phase excitation method, the energized phase is determined by the conversion table in FIG. 35 based on the value of Mptn% 12.
[0191]
Thereafter, when a deceleration request is generated, “Yes” is determined in step 705, the process proceeds to step 707, the excitation method is set to the 1-2 phase excitation method, and the speed phase advance correction is performed in the next step 708. For example, the amount Ks is set to -1. As a result, torque (braking torque) in a direction opposite to the rotation direction of the rotor 32 can be generated, and the rotation speed of the rotor 32 can be reliably reduced.
[0192]
In this way, if the switching of the excitation method and the phase advance correction of the energized phase are executed in combination, the start performance, the high speed performance, and the stop performance (deceleration performance) can be effectively improved. However, the present invention may be configured such that the phase advance correction of the energized phase is omitted and only the excitation method is switched.
[0193]
The encoder used in the present invention is not limited to the magnetic encoder 46. For example, an optical encoder or a brush encoder may be used.
[0194]
Further, the motor used in the present invention is not limited to the SR motor 12, but is a brushless type 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. A brushless motor other than the SR motor may be used.
[0195]
Further, a required rotational speed (target rotational speed) is set during F / B control, and the phase advance amount of the energized phase is corrected and / or the excitation method is switched according to the required rotational speed (target rotational speed). Thus, the rotational speed of the rotor 32 may be controlled according to the required rotational speed (target rotational speed). For example, when it is desired to increase the rotation speed of the rotor 32, the phase advance amount of the energized phase is corrected to be increased, or the excitation method is changed from the 1-2 phase excitation method to the one phase excitation method (or two phase excitation method). It is sufficient to switch to. On the other hand, when the rotational speed of the rotor 32 is to be reduced, it is corrected to reduce the phase advance amount of the energized phase, or the excitation method is changed from the one-phase excitation method (or the two-phase excitation method) to the 1-2 phase excitation. What is necessary is just to switch to a system. In this way, the rotational speed of the rotor 32 can be controlled while feedback controlling the rotor 32 to the target position based on the encoder count value.
[0196]
In addition, the range switching device of the present embodiment is configured to switch between 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 of P, R, N, D,.
[0197]
In addition, the present invention is not limited to the range switching device, and it goes without saying that the present invention 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 showing an embodiment of the present invention.
FIG. 2 is a diagram illustrating the 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 the configuration of the entire control system of the range switching device.
FIG. 5 is a plan view illustrating the configuration of a rotary magnet of an encoder
FIG. 6 is a side view of the encoder.
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 (part 1) showing the flow of processing of an initial drive routine;
FIG. 9 is a flowchart showing a flow of processing of an initial drive routine (part 2).
FIG. 10 is a flowchart showing a process flow of a P-range initial drive routine.
FIG. 11 is a flowchart showing a process flow of an NotP range initial drive routine.
FIG. 12 is a time chart showing an example of control when initial driving is performed in the 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 misalignment learning method when a range switching operation is performed during initial driving.
FIG. 15 is a flowchart showing a 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 the relationship between command range shift, phase A signal, phase B signal, and encoder count value.
FIG. 18 is a time chart showing a control example of an SR motor.
FIG. 19 is a time chart for explaining the timing for shifting from F / B control to target position stop holding processing;
FIG. 20 is a flowchart (part 1) showing the flow of processing of a control mode setting routine.
FIG. 21 is a flowchart showing the process flow of a control mode setting routine (part 2);
FIG. 22 is a flowchart (No. 3) showing the flow of processing of a control mode setting routine.
FIG. 23 is a flowchart showing a process flow of a time synchronous motor control routine.
FIG. 24 is a flowchart showing a process flow of a mode1 routine.
FIG. 25 is a flowchart showing a process flow of a mode3 routine.
FIG. 26 is a flowchart showing a process flow of a mode4 routine.
FIG. 27 is a flowchart showing a process flow of an energization process routine;
FIG. 28 is a diagram showing an example of a conversion table from Mptn% 12 to energized phase in the case of the 1-2 phase excitation method;
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 processing of an energized phase setting routine.
FIG. 31 is a time chart for explaining energization processing when rotation is started from the UW phase.
FIG. 32 is a flowchart showing a processing flow of a rotor rotation speed calculation routine.
FIG. 33 is a flowchart showing the flow of processing of a speed phase advance correction amount setting routine;
FIG. 34 is a flowchart showing the flow of processing of an excitation method setting routine.
FIG. 35 is a diagram showing an example of a conversion table from Mptn% 12 to energized phase in the case of the one-phase excitation method.
[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 recessed part, 25 ... NotP range holding recess, 26 ... deceleration mechanism, 27 ... automatic transmission, 31 ... stator, 32 ... rotor, 33,34 ... winding, 35,36 ... motor excitation part, 37,38 ... motor driver, 41 ... ECU (Control means), 43 ... P range switch, 44 ... NotP range switch, 46 ... encoder, 47 ... rotary magnet, 48 ... magnetic detection element for A phase signal, 49 ... magnetic detection element for B phase signal, 50 ... Magnetic detection element for Z-phase signal.

Claims (3)

モータのロータの回転に同期してパルス信号を出力するエンコーダと、このエンコーダの出力信号のカウント値(以下「エンコーダカウント値」という)に基づいて前記ロータの回転位置を検出して前記モータの通電相を順次切り換えることで前記ロータを目標位置まで回転駆動する制御手段とを備えたモータ制御装置において、
前記制御手段は、前記ロータの回転速度に応じて該ロータの回転位相に対する通電相の位相進み量を補正する第1の補正手段と、前記ロータの回転速度を減速させる必要が生じたときに前記通電相の位相進み量を小さくする方向に補正する第2の補正手段とを有することを特徴とするモータ制御装置。
An encoder that outputs a pulse signal in synchronization with the rotation of the rotor of the motor, and the energization of the motor by 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”) In a motor control device comprising control means for rotationally driving the rotor to a target position by sequentially switching phases,
The control means includes a first correction means for correcting a phase advance amount of the energized phase with respect to the rotation phase of the rotor according to the rotation speed of the rotor, and when the rotation speed of the rotor needs to be reduced. A motor control apparatus comprising: a second correction unit that corrects the phase advance amount of the energized phase in a direction that decreases .
前記モータは、スイッチトリラクタンスモータであることを特徴とする請求項1に記載のモータ制御装置。The motor control device according to claim 1, wherein the motor is a switched reluctance motor. 前記モータは、車両の自動変速機のレンジを切り換えるレンジ切換機構を駆動することを特徴とする請求項1又は2に記載のモータ制御装置。The motor, motor controller according to claim 1 or 2, characterized in that for driving the range switchover mechanism for switching the range of the automatic transmission of the vehicle.
JP2002177738A 2002-06-03 2002-06-18 Motor control device Expired - Fee Related JP3800532B2 (en)

Priority Applications (9)

Application Number Priority Date Filing Date Title
JP2002177738A JP3800532B2 (en) 2002-06-18 2002-06-18 Motor control device
US10/443,795 US7084597B2 (en) 2002-06-03 2003-05-23 Motor control apparatus
DE10362105.9A DE10362105B4 (en) 2002-06-03 2003-06-02 Engine control unit
DE10324846A DE10324846A1 (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
JP2002177738A JP3800532B2 (en) 2002-06-18 2002-06-18 Motor control device

Publications (2)

Publication Number Publication Date
JP2004023931A JP2004023931A (en) 2004-01-22
JP3800532B2 true JP3800532B2 (en) 2006-07-26

Family

ID=31175685

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002177738A Expired - Fee Related JP3800532B2 (en) 2002-06-03 2002-06-18 Motor control device

Country Status (1)

Country Link
JP (1) JP3800532B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5423981B2 (en) * 2010-06-04 2014-02-19 株式会社デンソー Range switching control device
JP6458689B2 (en) * 2015-09-10 2019-01-30 株式会社デンソー Motor control device
JP6528638B2 (en) 2015-10-09 2019-06-12 株式会社デンソー Electronic control unit
KR102008919B1 (en) * 2017-11-09 2019-08-08 현대오트론 주식회사 Motor control system and method for an Electric Shift-By-Wire system

Also Published As

Publication number Publication date
JP2004023931A (en) 2004-01-22

Similar Documents

Publication Publication Date Title
US7084597B2 (en) Motor control apparatus
US7667427B2 (en) Motor control apparatus
US7161314B2 (en) Motor control apparatus having current supply phase correction
JP3886042B2 (en) Motor control device
JP5093624B2 (en) Motor control device
JP3849864B2 (en) Motor control device
JP3800529B2 (en) Motor control device
JP3849930B2 (en) Motor control device
JP2004023890A (en) Motor controller
JP3849931B2 (en) Motor control device
JP4189953B2 (en) Position switching control device
JP3947922B2 (en) Motor control device
JP4082164B2 (en) Motor control device
JP3888940B2 (en) Motor control device
JP3800532B2 (en) Motor control device
JP3871130B2 (en) Motor control device
JP2017161455A (en) Control device
JP3849627B2 (en) Motor control device
JP3888278B2 (en) Motor control device
JP2004023889A (en) Motor controller
JP3849629B2 (en) Motor control device
JP4748611B2 (en) Position switching 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: 20060124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060321

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060407

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060420

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3800532

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090512

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100512

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110512

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120512

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120512

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130512

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140512

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees