JP2004048837A - Motor controller - Google Patents

Motor controller Download PDF

Info

Publication number
JP2004048837A
JP2004048837A JP2002199469A JP2002199469A JP2004048837A JP 2004048837 A JP2004048837 A JP 2004048837A JP 2002199469 A JP2002199469 A JP 2002199469A JP 2002199469 A JP2002199469 A JP 2002199469A JP 2004048837 A JP2004048837 A JP 2004048837A
Authority
JP
Japan
Prior art keywords
control
phase
rotor
range
count value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002199469A
Other languages
Japanese (ja)
Other versions
JP3886042B2 (en
Inventor
Shigeru Kamio
神尾 茂
Kenichi Fujiki
藤木 賢一
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 JP2002199469A priority Critical patent/JP3886042B2/en
Priority to US10/448,409 priority patent/US7312595B2/en
Priority to DE10362132.6A priority patent/DE10362132B4/en
Priority to DE10330809.1A priority patent/DE10330809B8/en
Publication of JP2004048837A publication Critical patent/JP2004048837A/en
Priority to US11/320,962 priority patent/US7667427B2/en
Application granted granted Critical
Publication of JP3886042B2 publication Critical patent/JP3886042B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)
  • Control Of Electric Motors In General (AREA)
  • Control Of Stepping Motors (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To rotate a rotor to a target position as much as possible even if the F/B control state becomes abnormal temporarily in the F/B control of a motor. <P>SOLUTION: This controller switches F/B control over to open loop control at the point of time when an abnormality stops the motor or the abnormality of the counting action of an encoder count value occurs in the middle of performing the feedback control (F/B control) of the motor, based on the encoder count value. During the open loop control, this rotates the motor, switching the current application phase of the motor in order without feeding back the information about the encoder count value, and also each time this switches the current application phase, this counts up(or counts down) a position count value Ncntop, and at the point of time when this position count value Ncntop reaches the target count value Acnt, this judges that the rotor has reached the target position and finishes the open loop control and returns to the F/B control. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、エンコーダのパルス信号のカウント値に基づいてロータの回転位置を検出してモータの通電相を順次切り換えることでロータを目標位置まで回転駆動するモータ制御装置に関するものである。
【0002】
【従来の技術】
近年、構造が簡単で安価なモータとして需要が増加しているスイッチトリラクタンスモータ等のブラシレス型のモータは、ロータの回転に同期してパルス信号を出力するエンコーダを搭載し、このエンコーダのパルス信号をカウントして、そのエンコーダカウント値に基づいてロータの回転位置を検出して通電相を順次切り換えることでロータを回転駆動するようにしたものがある。このようなエンコーダ付きのモータは、起動後のエンコーダカウント値に基づいてロータの回転位置を検出することができるため、フィードバック制御系(閉ループ制御系)によりロータを目標位置まで回転させる位置切換制御(位置決め制御)を行う各種の位置切換装置の駆動源として用いられている。
【0003】
【発明が解決しようとする課題】
ところで、エンコーダカウント値に基づいてロータを目標位置まで回転させるフィードバック制御(以下「F/B制御」と表記する)中に、例えば、エンコーダのパルス信号が何等かの原因で一時的に欠けたり、エンコーダの信号ラインに重畳したノイズパルスが正規のパルス信号と誤認されたりすると、通電相(エンコーダカウント値)とロータの回転位相との同期が取れなくなって、ロータを正常に駆動できなくなってしまい、それによって、ロータが停止したり、逆回転することがあり、F/B制御を正常に続けられない状態になって制御不能に陥ることがある。
【0004】
本発明はこのような事情を考慮してなされたものであり、従ってその目的は、F/B制御中に、何等かの原因でF/B制御状態が一時的に異常になっても、可能な限り、ロータを目標位置まで回転させることができ、モータ制御の信頼性を向上させることができるモータ制御装置を提供することにある。
【0005】
【課題を解決するための手段】
上記目的を達成するために、本発明の請求項1のモータ制御装置は、F/B制御中にF/B制御状態の異常の有無を異常監視手段により監視し、その結果、F/B制御状態の異常が検出されたときに、F/B制御からオープンループ制御に切り換えて、エンコーダカウント値の情報をフィードバックせずにモータの通電相を順次切り換えてロータを回転駆動するようにしたものである。
【0006】
F/B制御中に、例えばエンコーダのパルス抜けやノイズによりエンコーダカウント値が異常になったりすると、通電相(エンコーダカウント値)とロータの回転位相との同期が取れなくなって、F/B制御状態(ロータの回転状態)が異常になるが、本発明では、この異常が異常監視手段により検出されて、F/B制御からオープンループ制御に切り換えられる。その結果、本発明では、F/B制御中に、エンコーダカウント値の異常等が発生してF/B制御状態(ロータの回転状態)が一時的に異常になっても、オープンループ制御によりロータを目標位置まで回転させることができ、モータ制御の信頼性を向上させることができる。
【0007】
この場合、請求項2のように、F/B制御中に、エンコーダのパルス信号の出力間隔を監視してF/B制御状態の異常の有無を監視するようにしても良い。F/B制御状態が異常になると、ロータ回転速度が遅くなる。従って、F/B制御中に、エンコーダのパルス信号の出力間隔を監視すれば、迅速にF/B制御状態の異常の有無を判定することができる。
【0008】
また、請求項3のように、ロータの回転に同期してエンコーダから所定の位相差(一般的には電気角で90°の位相差)を有するA相信号とB相信号を出力する場合は、F/B制御中に前記A相信号及び前記B相信号をカウントしてエンコーダカウント値を更新する際に、前記A相信号と前記B相信号の発生順序によってロータの回転方向を判定して、その回転方向に応じて前記エンコーダカウント値をカウントアップ又はカウントダウンし、そのエンコーダカウント値と前記ロータの回転方向に応じて通電相を選択して通電するようにすると良い。このようにすれば、ロータが正回転/逆回転のいずれの方向に回転しても、エンコーダカウント値とロータの回転位置との対応関係を維持することができて、正回転/逆回転のいずれの回転方向でも、エンコーダカウント値に基づいて正しい通電相を選択することができる。
【0009】
この場合、F/B制御中に、A相信号とB相信号とを個別にカウントし、A相信号のカウント値とB相信号のカウント値とを比較してF/B制御状態の異常の有無を監視するようにしても良い。F/B制御中にA相信号とB相信号が正常に出力されていれば、A相信号のカウント値とB相信号のカウント値との差が0又は±1となるため、両信号のカウント値の差が大きくなれば、いずれか一方の信号の抜けやノイズパルスの混入が考えられる。このような状態になると、エンコーダカウント値とロータの回転位置との同期が取れなくなって、F/B制御状態が異常になるため、両信号のカウント値の差によってF/B制御状態の異常の有無を判定することができる。
【0010】
また、請求項4のように、F/B制御中にロータの回転方向を監視し、該ロータの回転方向が目標位置へ向かう回転方向から逆転したか否かでF/B制御状態の異常の有無を監視するようにしても良い。このようにすれば、F/B制御中にロータが目標位置の方向とは逆方向に回転することを防止できる。
【0011】
ところで、この種のエンコーダ付きのモータは、起動後のエンコーダカウント値に基づいてロータの起動位置からの回転量(回転角度)を検出できるだけであるので、電源投入後に、何等かの方法で、ロータの絶対的な回転位置を検出して、ロータの回転位置と通電相との対応関係をとらないと、モータを正常に駆動することができない。
【0012】
そこで、請求項5のように、電源投入後の初期駆動時に、モータの通電相の切り換えを所定のタイムスケジュールで実施させて、ロータの回転位置と通電相との対応関係を学習するようにしても良い。このように、初期駆動時に通電相の切り換えを一巡させれば、いずれかの通電相で必ずロータの回転位置と通電相とが一致して、それ以後、通電相の切り換えに同期してロータが回転して、このロータの回転に同期してエンコーダからパルス信号が出力されるようになる。従って、初期駆動終了時のエンコーダカウント値を見れば、ロータが実際に通電相の切り換えに同期して回転した角度(回転量)が分かり、それによって、ロータの回転位置と通電相との対応関係が分かるため、この対応関係を学習することで、その後の通常駆動時に、正しい通電相を選択してモータを正常に回転させることができる。
【0013】
ところで、このようなエンコーダ付きのモータの回転量(回転角度)は、回転伝達系を介して制御対象(位置切換装置)の操作量に変換されるが、回転伝達系を構成する部品間には、遊び(ガタ)が存在するため、仮に、エンコーダカウント値に基づいてロータの回転量を正確に制御できたとしても、制御対象の操作量には回転伝達系の遊び(ガタ)分の誤差が生じてしまい、制御対象の操作量を精度良く制御することができない。
【0014】
そこで、請求項5のように、モータの回転量を制御対象の操作量に変換する回転伝達系の遊び量を学習する際に、ロータを制御対象の可動範囲の限界位置に突き当たるまで回転させる突き当て制御を実行して、その限界位置を学習するようにしても良い。
【0015】
ところで、エンコーダのパルス抜け又はノイズがあると、エンコーダカウント値が異常となり、エンコーダカウント値とロータの回転位置(制御対象の操作量)との関係又はエンコーダカウント値と通電相との関係がずれる可能性がある。
【0016】
そこで、請求項5のように、オープンループ制御からF/B制御に復帰させるときに、前述した初期駆動と突き当て制御を再実行するようにすると良い。このようにすれば、オープンループ制御中にエンコーダカウント値とロータの回転位置(制御対象の操作量)との関係又はエンコーダカウント値と通電相との関係がずれても、そのずれを初期駆動と突き当て制御によって精度良く補正することができる。
【0017】
この場合、請求項6のように、突き当て制御中にF/B制御状態の異常の有無の監視を中止するようにした方が良い。これは、突き当て制御により限界位置で回転停止したのか、F/B制御の異常により回転停止したのか判別できないためである。従って、突き当て制御中にF/B制御状態の異常の有無の監視を中止するようにすれば、限界位置で回転停止した状態を誤判定することを未然に防止できる。
【0018】
また、請求項7のように、F/B制御状態の異常が検出されたとき、オープンループ制御中の通電相の切換回数をカウントしてそのカウント値に基づいてロータが目標位置に到達したと判断したときにF/B制御に復帰するようにすると良い。このようにすれば、オープンループ制御によりロータを目標位置まで回転させてからF/B制御に復帰させることができる。
【0019】
また、請求項8のように、オープンループ制御からF/B制御に復帰しても、再びF/B制御状態の異常が検出されてオープンループ制御に切り換えられるという状態が所定回数続いたときに、最終的に異常の判定を確定し、以後、F/B制御に復帰しないようにしても良い。このようにすれば、F/B制御系が正常に機能しなくなったときに、F/B制御とオープンループ制御とが頻繁に切り換えられるという事態を回避することができる。
【0020】
また、請求項9のように、モータとしてスイッチトリラクタンスモータを使用するようにしても良い。スイッチトリラクタンスモータは、永久磁石が不要で構造が簡単であるため、安価であり、温度環境等に対する耐久性・信頼性も高いという利点がある。
【0021】
以上説明した請求項1〜9に係る発明は、スイッチトリラクタンスモータ等のブラシレス型のモータを駆動源とする各種の位置切換装置に適用でき、例えば、請求項10のように、車両の自動変速機のレンジを切り換えるレンジ切換機構を駆動するモータの制御装置に適用しても良い。これにより、信頼性の高いモータ駆動式のレンジ切換装置を構成することができる。
【0022】
【発明の実施の形態】
以下、本発明を車両のレンジ切換装置に適用した一実施形態を図面に基づいて説明する。
まず、図1に基づいてレンジ切換機構11の構成を説明する。レンジ切換機構11の駆動源となるモータ12は、例えばスイッチトリラクタンスモータにより構成され、減速機構26(図4参照)を内蔵し、その出力軸13の回転位置を検出する出力軸センサ14が設けられている。この出力軸13には、ディテントレバー15が固定されている。
【0023】
また、ディテントレバー15にはL字形のパーキングロッド18が固定され、このパーキングロッド18の先端部に設けられた円錐体19がロックレバー21に当接している。このロックレバー21は、円錐体19の位置に応じて軸22を中心にして上下動してパーキングギヤ20をロック/ロック解除するようになっている。パーキングギヤ20は、自動変速機27の出力軸に設けられ、このパーキングギヤ20がロックレバー21によってロックされると、車両の駆動輪が回り止めされた状態(パーキング状態)に保持される。
【0024】
一方、ディテントレバー15をパーキングレンジ(以下「Pレンジ」と表記する)と他のレンジ(以下「NotPレンジ」と表記する)に保持するためのディテントバネ23が支持ベース17に固定され、このディテントバネ23の先端に設けられた係合部23aがディテントレバー15のPレンジ保持凹部24に嵌まり込んだときに、ディテントレバー15がPレンジの位置に保持され、該ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25に嵌まり込んだときに、ディテントレバー15がNotPレンジの位置に保持されるようになっている。
【0025】
Pレンジでは、パーキングロッド18がロックレバー21に接近する方向に移動して、円錐体19の太い部分がロックレバー21を押し上げてロックレバー21の凸部21aがパーキングギヤ20に嵌まり込んでパーキングギヤ20をロックした状態となり、それによって、自動変速機27の出力軸(駆動輪)がロックされた状態(パーキング状態)に保持される。
【0026】
一方、NotPレンジでは、パーキングロッド18がロックレバー21から離れる方向に移動して、円錐体19の太い部分がロックレバー21から抜け出てロックレバー21が下降し、それによって、ロックレバー21の凸部21aがパーキングギヤ20から外れてパーキングギヤ20のロックが解除され、自動変速機27の出力軸が回転可能な状態(走行可能な状態)に保持される。
【0027】
尚、前述した出力軸センサ14は、モータ12の減速機構26の出力軸13の回転角度に応じた電圧を出力する回転センサ(例えばポテンショメータ)によって構成され、その出力電圧によって現在のレンジがPレンジとNotPレンジのいずれであるかを確認できるようになっている。
【0028】
次に、図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の数は適宜変更しても良いことは言うまでもない。
【0029】
本実施形態の巻線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’相が同時に通電される。
【0030】
これら2つのモータ励磁部35,36は、車両に搭載されたバッテリ40を電源として、それぞれ別個のモータドライバ37,38によって駆動される。このように、モータ励磁部35,36とモータドライバ37,38をそれぞれ2系統ずつ設けることで、一方の系統が故障しても、他方の系統でSRモータ12を回転させることができるようになっている。図3に示すモータドライバ37,38の回路構成例では、各相毎にトランジスタ等のスイッチング素子39を1個ずつ設けたユニポーラ駆動方式の回路構成としているが、各相毎にスイッチング素子を2個ずつ設けたバイポーラ駆動方式の回路構成を採用しても良い。尚、本発明は、モータ励磁部とモータドライバをそれぞれ1系統ずつ設けた構成としても良いことは言うまでもない。
【0031】
各モータドライバ37,38の各スイッチング素子39のオン/オフは、ECU41(制御手段)によって制御される。図4に示すように、このECU41と各モータドライバ37,38は、レンジ切換制御装置42に搭載され、このレンジ切換制御装置42には、Pレンジへの切換操作を行うPレンジスイッチ43と、NotPレンジへの切換操作を行うNotPレンジスイッチ44の操作信号が入力される。Pレンジスイッチ43又はNotPレンジスイッチ44の操作により選択されたレンジは、インストルメントパネル(図示せず)に設けられたレンジ表示部45に表示される。
【0032】
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極となっている。
【0033】
更に、ロータ32の基準回転位置に相当する位置のN極(N’)とその両側のS極(S’)がそれ以外の磁極よりも径方向の幅が広くなるように形成されている。尚、本実施形態では、SRモータ12の通電相の切り換えが一巡する間にロータ32とロータリマグネット47が一体的に45°回転することを考慮して、ロータ32の基準回転位置に相当する幅広な着磁部分(N’)が45°ピッチで形成されており、従って、ロータリマグネット47全体として、基準回転位置に相当する幅広な着磁部分(N’)が合計8個形成されている。尚、基準回転位置に相当する幅広な着磁部分(N’)は、ロータリマグネット47全体として、1個のみ形成した構成としても良い。
【0034】
このロータリマグネット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となるように配置されている。
【0035】
各磁気検出素子48,49,50の出力は、N極(N’極)と対向したときにハイレベル“1”となり、S極(S’極)と対向したときにローレベル“0”となる。尚、Z相信号用の磁気検出素子50の出力は、ロータ32の基準回転位置に相当する幅広なN’極に対向する毎にハイレベル“1”となり、それ以外の位置では、ローレベル“0”となる。
【0036】
本実施形態では、ECU41が後述するエンコーダカウンタルーチンによってA相信号とB相信号の立ち上がり/立ち下がりの両方のエッジをカウントして、そのエンコーダカウント値に応じてSRモータ12の通電相を切り換えることでロータ32を回転駆動する。この際、A相信号とB相信号の発生順序によってロータ32の回転方向を判定し、正回転(Pレンジ→NotPレンジの回転方向)ではエンコーダカウント値をカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではエンコーダカウント値をカウントダウンする。これにより、ロータ32が正回転/逆回転のいずれの方向に回転しても、エンコーダカウント値とロータ32の回転位置との対応関係が維持されるため、正回転/逆回転のいずれの回転方向でも、エンコーダカウント値によってロータ32の回転位置(回転角度)を検出して、その回転位置に対応した相の巻線33,34に通電してロータ32を回転駆動する。
【0037】
図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相信号が出力されると言う場合がある。
【0038】
ところで、エンコーダカウント値は、ECU41のRAMに記憶されるため、ECU41の電源がオフされると、エンコーダカウント値の記憶が消えてしまう。そのため、ECU41の電源投入直後のエンコーダカウント値(0)は、実際のロータ32の回転位置(通電相)に対応したものとならい。従って、エンコーダカウント値に応じて通電相を切り換えるためには、電源投入後にエンコーダカウント値と実際のロータ32の回転位置とを対応させて、エンコーダカウント値と通電相とを対応させる必要がある。
【0039】
そこで、本実施形態では、レンジ切換制御装置42のECU41によって後述する図8及び図9に示す初期駆動ルーチンを実行することで、ECU41への電源投入後の初期駆動時に、SRモータ12の通電相の切り換えを所定のタイムスケジュールで一巡させてエンコーダ46のA相信号及びB相信号のエッジをカウントし、初期駆動終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダカウント値と初期駆動終了時の学習結果とに基づいて通電相を決定するようにしている。
【0040】
この初期駆動時の学習は、具体的には次のようにして行われる。図12に示すように、PレンジでECU41に電源が投入されたときに初期駆動を行う場合は、例えば、W相通電→UW相通電→U相通電→UV相通電→V相通電→VW相通電の順序で通電相の切り換えを所定のタイムスケジュールで一巡し、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に駆動する。
【0041】
一方、NotPレンジでECU41に電源が投入されたときに初期駆動を行う場合は、例えば、V相通電→UV相通電→U相通電→UW相通電→W相通電→VW相通電の順序で通電相の切り換えを所定のタイムスケジュールで一巡し、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に駆動する。
【0042】
この初期駆動時には、1相通電の時間T1を2相通電の時間T2よりも短くし、例えばT1=10ms、T2=100msに設定する。初期駆動中にロータ32の回転位置と通電相との同期がとれた後でも、トルクが小さい1相通電では、ロータ32が振動するため、1相通電の時間T1を短くして、できるだけ速やかに次の2相通電に切り換えることで、ロータ32の振動を速やかに停止させてエンコーダ46の出力信号を安定させるようにしている。
【0043】
このように、初期駆動時に通電相の切り換えを一巡させれば、初期駆動が終了するまでに、いずれかの通電相で必ずロータ32の回転位置と通電相とが一致して、それ以後、通電相の切り換えに同期してロータ32が回転して、このロータ32の回転に同期してエンコーダ46からA相信号及びB相信号が出力されるようになる。
【0044】
この初期駆動中に、エンコーダ46のA相信号及びB相信号の立ち上がり/立ち下がりの両方のエッジをカウントする。従って、初期駆動終了時のエンコーダカウント値を見れば、初期駆動が終了するまでにロータ32が実際に通電相の切り換えに同期して回転した角度(回転量)が分かり、それによって、初期駆動終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係が分かる。
【0045】
図12の例では、初期駆動時に最初の通電相(W相)からロータ32が回転し、通電相の切り換え毎にロータ32が7.5°ずつ回転してエンコーダカウント値が2ずつカウントアップし、初期駆動終了時にエンコーダカウント値が12となる。
【0046】
これに対し、例えば、初めの3回の励磁(W相通電→UW相通電→U相通電)でロータ32が回転しない場合、つまり4回目以降の励磁(UV相通電→V相通電→VW相通電)でロータ32の回転位置と通電相とが同期してロータ32が3回の励磁分だけ回転する場合は、初期駆動終了時までにロータ32が7.5°×3=22.5°回転して、エンコーダカウント値が2×3=6となる。従って、初期駆動終了時のエンコーダカウント値を見れば、初期駆動が終了するまでにロータ32が実際に通電相の切り換えに同期して回転した角度(回転量)が判明する。
【0047】
初期駆動の最後の通電相は、常にVW相となるが、エンコーダカウント値は、必ずしも12になるとは限らず、例えば8、或は4である場合もある。初期駆動終了後の通常駆動時には、エンコーダカウント値に基づいて通電相が決定されるため、初期駆動によるエンコーダカウント値のずれを修正しないと、通常駆動時に正しい通電相を選択することができない。
【0048】
そこで、本実施形態では、初期駆動終了時のエンコーダカウント値を初期位置ずれ学習値として学習し、その後の通常駆動時にエンコーダカウント値を初期位置ずれ学習値で補正することで、初期駆動終了時のエンコーダカウント値と通電相(ロータ32の回転位置)とのずれを補正して、通常駆動時に正しい通電相を選択できるようにしている。
【0049】
初期駆動終了後は、図12に示すように、後述するF/B制御開始位置停止保持処理により、初期駆動終了時の通電相(VW相)と同じ相に例えば10ms通電してロータ32の位置を初期駆動終了時の位置に保持し、その後、後述するフィードバック制御(以下「F/B制御」と表記する)により、その時点のエンコーダカウント値と初期位置ずれ学習値とに基づいて通電相を切り換えてロータ32を目標位置Acntの方向へ回転させる。これにより、ロータ32の回転位置(エンコーダカウント値)が目標位置Acntから例えば0.5°以内に到達した時点で、通電相の切り換えを終了してロータ32を停止させ、その後は、後述する目標位置停止保持処理により、同じ相に通電し続けてロータ32の停止状態を保持し、この保持状態を例えば50ms継続する。この後、目標位置Acntが変化しなければ、通電を停止する。
【0050】
また、初期駆動の途中で、Pレンジスイッチ43又はNotPレンジスイッチ44が操作されてレンジ切換要求が発生した場合は、次の2相通電(2相通電の実行中にレンジ切換要求が発生したときはその2相通電)が終了してから通常駆動に移行すると共に、該2相通電終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダカウント値と2相通電終了時の学習結果とに基づいて通電相を決定するようにしている。
【0051】
2相通電では、トルクが大きいため、ロータ32の位置が2相通電に対応する位置から多少ずれていたとしても、ロータ32を2相通電に対応する位置まで回転させることができる。このため、初期駆動中に2相通電を1〜2回行うだけでロータ32の回転位置と通電相との同期がとれる確率は高いものと思われる。従って、初期駆動の途中でレンジ切換要求が発生したときには、次の2相通電(又は現在の2相通電)が終了してから通常駆動に移行するようにすれば、初期駆動の途中で、エンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習してから、通常駆動に速やかに移行することができる。
【0052】
例えば、図13のタイムチャートに示すように、初期駆動の2回目の励磁(UW相通電)中に、PレンジからNotPレンジへのレンジ切換要求が発生したときには、このUW相通電で初期駆動を終了して通常駆動に移行すると共に、UW相通電終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習する。本実施形態では、初期駆動の途中で通常駆動に移行する場合でも、その初期駆動を最後まで実行したと仮定して、本来の初期駆動終了時のエンコーダカウント値を推定し、その推定値を初期位置ずれ学習値とするようにしている。例えば、図13に示すように、初期駆動をW相通電とUW相通電の2回の励磁で終了する場合は、その後に予定されていた4回の励磁を行わずに初期駆動を終了するため、未終了の4回の励磁(U相通電→UV相通電→V相通電→VW相通電)を行ったものと仮定して、4回の励磁分の回転角度に相当するカウントアップ値(2×4=8)をUW相通電終了時のエンコーダカウント値に加算して初期位置ずれ学習値を求める。
【0053】
ところで、従来のレンジ切換制御では、指令シフトレンジ(目標位置)がPレンジからNotPレンジ又はその反対方向に切り換えられる毎に、ロータ32を回転駆動して、エンコーダカウント値に基づいてSRモータ12の通電相を順次切り換えることでロータ32を目標位置まで回転駆動するフィードバック制御(以下「F/B制御」と表記する)を実行した後に、SRモータ12への通電をオフするようにしている。
【0054】
この場合、F/B制御終了後に、目標位置に対応する相の巻線に通電し続ければ、ロータ32を目標位置で電磁力により保持し続けることができるが、この構成では、停止時間が長くなると、同じ相の巻線に連続して長い時間通電し続けることになるため、巻線が過熱して焼損するおそれがある。そのため、ロータ32の停止中は、巻線への通電をオフして巻線の過熱・焼損を防止するようにしている。
【0055】
しかし、ロータ32の停止中に、通電をオフすると、ロータ32を目標位置(F/B制御終了時の位置)に保持する電磁力が消滅するため、ロータ32の位置が目標位置からずれる可能性がある。本実施形態では、ロータ32を目標位置でディテントバネ23のバネ力により保持する機械的な停止保持機構を設けているが、この場合でも、停止保持機構のガタや製造ばらつき等によりロータ32の位置が目標位置からずれることがある。
【0056】
また、従来のレンジ切換制御では、F/B制御開始時に前回のF/B制御終了時のエンコーダカウント値を用いて最初の通電相を決定し、更に、最初の通電相決定後、直ちにF/B制御を開始するようにしている。
【0057】
従って、ロータ32の位置が停止中にずれた場合、従来のレンジ切換制御では、実際に最初に通電すべき通電相とは異なる通電相からF/B制御を開始してしまうことになる。このため、F/B制御開始時に脱調が発生して起動に失敗したり、ロータ32が目標位置とは反対方向に回転するなど、ロータ32を正常に目標位置へ回転させることができなくなる可能性がある。
【0058】
また、停止中のロータ32のずれ量が小さく、ロータ32の位置が前回のF/B制御終了時のエンコーダカウント値に相当する範囲内に収まっていた場合は、最初に通電すべき通電相は前回のF/B制御終了時の通電相となる。従って、この場合は、従来のレンジ切換制御でも、最初に通電すべき通電相に関しては問題ない。
【0059】
しかしながら、F/B制御は、通電時のロータ32の位置を基準にして行われるため、仮に、ロータ32の位置ずれが前回のF/B制御終了時のエンコーダカウント値に相当する範囲内に収まっていたとしても、最初の通電相に通電を行ってから、ロータ32の位置が通電時のロータ32の位置に移動・保持される前にF/B制御が開始されると、F/B制御開始時に脱調が発生して起動に失敗する可能性がある。
【0060】
この対策として、本実施形態では、図18に示すように、SRモータ12の通電オフ状態からF/B制御を開始するときに、ロータ32を現在の位置に2相通電で停止保持する処理(以下「F/B制御開始位置停止保持処理」という)を所定時間(例えば10ms)だけ実行し、その後、F/B制御を実行してロータ32を目標位置まで回転駆動するようにしている。
【0061】
このようにすれば、仮に、ロータ32の停止中にロータ32の位置がずれても、F/B制御開始直前にF/B制御開始位置停止保持処理によってロータ32の位置ずれを修正して、F/B制御開始時のロータ32の位置を正確に位置決めすることができる。これにより、F/B制御開始時に最初の通電相からロータ32の位置と通電相(エンコーダカウント値)とを確実に同期させることができて、F/B制御開始時の脱調やロータ32が目標位置と反対方向に回転することを防止でき、安定したF/B制御を行ってロータ32を確実に目標位置まで回転させることができて、安定性・信頼性の高いレンジ切換制御(位置決め制御)を行うことができる。
【0062】
ところで、レンジ切換制御を高応答化するために、ロータ32の回転速度を高速化して目標位置までの到達時間を短くするようにしている。このため、ロータ32が目標位置に到達した直後は、ロータ32が完全に停止せずにまだ振動した状態になっており、このような状態で通電をオフすると、慣性力によりロータ32の停止位置が目標位置から大きくずれてしまう可能性がある。このようなF/B制御終了時のロータ32の位置ずれが大きくなりすぎると、次のF/B制御開始直前にF/B制御開始位置停止保持処理を行っても、ロータ32の位置ずれを修正することができなくなる可能性がある。
【0063】
この対策として、本実施形態では、F/B制御終了後に、ロータ32を当該F/B制御終了時の位置に2相通電で停止保持する処理(以下「目標位置停止保持処理」という)を所定時間(例えば50ms)だけ実行した後、SRモータ12への通電をオフするようにしている。このようにすれば、ロータ32が目標位置に到達した後、ロータ32の振動が収まってから通電をオフすることができるので、慣性力によりロータ32の停止位置が目標位置から大きくずれることを防止することができる。これにより、レンジ切換制御の安定性・信頼性を維持しながら、レンジ切換制御の高応答化の要求も満たすことができる。
【0064】
更に、本実施形態では、F/B制御中に指令シフトレンジ(目標位置)が変更されてロータ32の回転方向を反転させる必要が生じたときに、ロータ32を反転位置で2相通電により停止保持する処理(以下「反転位置停止保持処理」という)を所定時間(例えば50ms)だけ実行し、その後、F/B制御を再開してロータ32を変更後の目標位置まで回転駆動するようにしている。このようにすれば、F/B制御中に指令シフトレンジ(目標位置)が変更されたときに、ロータ32の反転位置を位置決めして反転動作を安定して行うことができ、反転位置がずれて脱調(通電相のずれ)が発生することを防止できて、ロータ32を変更後の目標位置まで確実に回転駆動することができる。
【0065】
また、本実施形態では、F/B制御中にエンコーダカウント値と目標位置に相当する目標カウント値との差が所定値(例えば通電相の位相進み分に相当するカウント値)以下になったときに、F/B制御を終了して目標位置停止保持処理に移行するようにしている。つまり、ロータ32を回転させるためには、図19に示すように、通電相の位相をロータ32の実際の位置よりも例えば2〜4カウント分(ロータ回転角で3.75°〜15°)だけ進める必要があるため、F/B制御中にエンコーダカウント値と目標カウント値との差が例えば通電相の位相進み分に相当するカウント値になったときに、F/B制御を終了するようにすれば、F/B制御の最後の通電相がロータ32を目標位置に停止保持する通電相と一致するため、目標位置停止保持処理移行後も、F/B制御の最後の通電相に引き続き通電することができ、F/B制御から目標位置停止保持処理への移行をスムーズに行うことができる。
【0066】
ところで、ロータ32を回転駆動するトルクを発生させるためには、ロータ32の回転位相に対して通電相の位相を進める必要がある。F/B制御開始後に、ロータ32の回転速度が上昇するのに伴って、エンコーダカウント値の変化速度が速くなって、通電相の切り換えタイミングが速くなるが、通電相の巻線33,34に通電を開始してから実際にトルクが発生するまでに、巻線33,34のインダクタンス分の遅れが生じるため、ロータ32の回転速度が速くなると、通電相の巻線33,34に通電を開始してから実際にトルクを発生するまでの間に、ロータ32がかなりの角度回転して、実際のロータ32の回転位相に対して通電相のトルク発生タイミングが遅れた状態となる。このような状態になると、駆動トルクが低下してロータ32の回転速度が抑えられてしまい、レンジ切換速度の高速化(ロータの回転速度の高速化)の要求を満たすことができない。
【0067】
この対策として、予め、通電相の位相進み量を大きく設定しておくことが考えられるが、F/B制御開始時(起動時)に、通電相の位相進み量が大きいと、起動トルクが小さくなってSRモータ12の起動が不安定になったり、起動に失敗するおそれがある。
【0068】
また、予め、通電相の位相進み量を大きく設定してロータ32の回転速度を高速化すると、F/B制御終了時にロータ32が慣性により目標位置を越えてオーバーシュートしやすくなり、ロータ32を正確に目標位置で停止させることが難しくなる。
【0069】
そこで、本実施形態では、F/B制御中に、ロータ32の回転速度に応じて該ロータ32の回転位相に対する通電相の位相進み量を補正すると共に、ロータ32の回転速度を減速させる必要が生じたときに(例えばロータ32が目標位置に近付いたときに)、通電相の位相進み量を小さくする方向に補正するようにしている。具体的には、F/B制御開始時に、通電相の位相進み量を小さくするように補正することで、起動トルクを大きくすることができ、ロータ32の回転速度を素早く立ち上げることができる。そして、ロータ32の回転速度が上昇するのに伴って、通電相の位相進み量を大きくするように補正することで、高速回転時でも、通電相のトルク発生タイミングと実際のロータの回転位相との同期関係を維持することができ、ロータ32を高速で安定して回転させることができる。これにより、起動性能と高速性能とを両立させることができる。
【0070】
その後、ロータ32が目標位置に近付いたときに、通電相の位相進み量を小さくする方向に補正すれば、実際のロータ32の回転位相に対して通電相のトルク発生タイミングが遅れた状態となり、それによって、駆動トルクを低下させたり、或は、ロータ32の回転方向と反対方向のトルク(制動トルク)を発生させることができ、ロータ32の回転速度を確実に減速させることができて、ロータ32を正確に目標位置で停止させることができる。これにより、起動性能と高速性能と停止性能(減速性能)に優れたF/B制御を行うことができる。
【0071】
ところで、ロータ32の回転量(回転角度)は、減速機構26、出力軸13、ディテントレバー15等からなる回転伝達系を介してレンジ切換機構11の操作量(パーキングロッド18のスライド量)に変換されるが、回転伝達系を構成する部品間には、遊び(ガタ)が存在する。例えば、減速機構26の歯車間のバックラッシが存在し、また、モータ12の回転軸の先端部に形成した断面非円形の連結部を出力軸13の嵌合穴に嵌め込んで連結する構成では、両者の嵌め込み作業を容易にするためのクリアランスが必要となる。
【0072】
また、図35に示すように、ディテントバネ23の係合部23aがディテントレバー15のPレンジ保持凹部24やNotPレンジ保持凹部25に嵌まり込んだときに、係合部23aと各保持凹部24,25の側壁との間に僅かな隙間(ガタ)が存在する。このように、ロータ32の回転量をレンジ切換機構11の操作量(パーキングロッド18のスライド量)に変換する回転伝達系には、バックラッシや部品間の隙間等による遊び(ガタ)が存在するため、仮に、エンコーダカウント値に基づいてロータ32の回転量を正確に制御できたとしても、レンジ切換機構11の操作量には回転伝達系の遊び(ガタ)分の誤差が生じてしまい、レンジ切換機構11の操作量を精度良く制御することができない。
【0073】
そこで、本実施形態では、この回転伝達系の遊び量を学習する機能を備えている。具体的には、回転伝達系の遊び量を学習する際に、ディテントバネ23の係合部23aがレンジ切換機構11の可動範囲のPレンジ側の限界位置であるPレンジ保持凹部24の側壁に突き当たるまでロータ32を回転させるPレンジ側突き当て制御(一方向突き当て制御)と、NotPレンジ側の限界位置であるNotPレンジ保持凹部25の側壁に突き当たるまでロータ32を回転させるNotPレンジ側突き当て制御(他方向突き当て制御)とを実行して、Pレンジ側の限界位置からNotPレンジ側の限界位置までのエンコーダカウント値の増減量をレンジ切換機構11の可動範囲の実測値として求める。そして、この可動範囲の実測値と該可動範囲の設計値との差分を回転伝達系の遊び量として学習し、その後、ロータ32を目標位置まで回転させる際に、当該目標位置を回転伝達系の遊び量の学習値を考慮して設定する。このようにすれば、回転伝達系に遊び(ガタ)があっても、その遊びを含めた目標位置を設定することができ、レンジ切換機構11の操作量を精度良く制御することができる。
【0074】
この場合、SRモータ12を制御するECU41の電源投入(イグニッションスイッチのオン操作)からレンジ切換機構11の制御開始までに回転伝達系の遊び量を学習する時間的な余裕があれば、ECU41の電源投入後に、Pレンジ側突き当て制御とNotPレンジ側突き当て制御とを連続して実行して、レンジ切換機構11の制御開始前に回転伝達系の遊び量を学習するようにしても良いが、ECU41の電源投入後にレンジ切換機構11の制御を速やかに開始する必要がある場合は、ECU41の電源投入後に回転伝達系の遊び量を学習する時間的な余裕がない場合がある。
【0075】
そこで、本実施形態では、遊び量学習を行わずにレンジ切換機構11の制御を開始した後、ロータ32がPレンジで停止しているときに、Pレンジ側突き当て制御を実行して、Pレンジ側突き当て時のエンコーダカウント値をECU41のRAMに記憶し、ロータ32がNotPレンジで停止しているときに、NotPレンジ側突き当て制御を実行して、NotPレンジ側突き当て時のエンコーダカウント値をECU41のRAMに記憶し、前記Pレンジ側突き当て時のエンコーダカウント値と前記NotPレンジ側突き当て時のエンコーダカウント値との差分をレンジ切換機構11の可動範囲の実測値として求め、この可動範囲の実測値と該可動範囲の設計値との差分を回転伝達系の遊び量として学習するようにしている。
【0076】
このようにすれば、ECU41の電源投入からレンジ切換機構11の制御開始までに回転伝達系の遊び量を学習する時間的な余裕がなく、遊び量学習を行わずにレンジ切換機構11の制御を開始しても、その後、ロータ32がPレンジ又はNotPレンジで停止している期間に各突き当て制御を実行して回転伝達系の遊び量を学習することができる。この場合、遊び量学習が終了する前は、回転伝達系の遊び量を考慮しない従来同様の制御を行うようにしても良いが、予め設定した平均的な遊び量又は前回の遊び量学習値の記憶値を用いて制御対象を制御するようにしても良い。尚、以下の説明で、単に「突き当て制御」と表記する場合は、Pレンジ側突き当て制御とNotPレンジ側突き当て制御の両方に該当することを意味する。
【0077】
また、本実施形態では、突き当て制御の実行時に、SRモータ12の通電デューティ比(通電率)を通常駆動時よりも低下させることで、SRモータ12のトルクを通常駆動時よりも低下させるようにしている。SRモータ12のトルクは、レンジ切換時にディテントバネ23の係合部23aがディテントレバー15の両保持凹部24,25間の山部を確実に乗り越えることができるように大きなトルクに設定されているが、突き当て制御では、SRモータ12のトルクによってディテントバネ23の係合部23aをディテントレバー15の各保持凹部24,25の側壁に突き当てた状態にするため、SRモータ12のトルクが大きいと、突き当て制御の実行回数が増えるに従って、ディテントバネ23の係合部23a等の回転伝達系の部品が徐々に変形・損傷する可能性があり、耐久性・信頼性を低下させるおそれがある。
【0078】
この対策として、突き当て制御実行時にSRモータ12のトルクを低下させれば、ディテントバネ23の係合部23aをディテントレバー15の各保持凹部24,25の側壁に突き当てる力を弱めることができ、突き当て制御によるディテントバネ23の係合部23a等の回転伝達系の部品の変形・損傷を防止できて、耐久性・信頼性を確保することができる。尚、本実施形態の突き当て制御では、ディテントバネ23の係合部23aがディテントレバー15の両保持凹部24,25間の山部を乗り越える必要がないため、突き当て制御実行時にSRモータ12のトルクを低下させても、ディテントバネ23の係合部23aをディテントレバー15の各保持凹部24,25の側壁に突き当てるだけの必要最小限のトルクがあれば、突き当て制御を正常に実行できる。
【0079】
また、本実施形態では、突き当て制御実行時に、ロータ32の回転速度を遅くするように通電相の位相進み量を補正するようにしている。つまり、突き当て制御実行時に、ロータ32の回転速度が速いと、ディテントバネ23の係合部23aがディテントレバー15の各保持凹部24,25の側壁に衝突する速度が速くなって、その衝撃力でディテントバネ23の係合部23a等の回転伝達系の部品が徐々に変形・損傷する可能性があるが、突き当て制御実行時に、ロータ32の回転速度を遅くすれば、突き当て制御実行時にディテントバネ23の係合部23aがディテントレバー15の各保持凹部24,25の側壁に衝突する速度が遅くなって、その衝撃力を弱めることができ、ディテントバネ23の係合部23a等の回転伝達系の部品の変形・損傷を防止することができて、耐久性・信頼性を確保することができる。
【0080】
また、本実施形態では、突き当て制御実行時に、ディテントバネ23の係合部23aがディテントレバー15の各保持凹部24,25の側壁に突き当たった状態で該係合部23aが保持凹部24,25の側壁を僅かに乗り上げる角度(乗り上げ補正量)をSRモータ12の電源電圧であるバッテリ電圧に基づいて推定し、その推定値分だけレンジ切換機構11の可動範囲の実測値を補正するようにしている。つまり、突き当て制御実行時に、ディテントバネ23の係合部23aがディテントレバー15の各保持凹部24,25の側壁を乗り上げる角度(乗り上げ補正量)は、SRモータ12のトルクが大きくなるほど大きくなる。一般に、SRモータ12のトルクは、その電源電圧(バッテリ電圧)によって変化するため、電源電圧(バッテリ電圧)とSRモータ12のトルクとの間には相関関係があり、電源電圧(バッテリ電圧)をSRモータ12のトルクの代用情報として用いることができる。従って、突き当て制御実行時に、ディテントバネ23の係合部23aがディテントレバー15の各保持凹部24,25の側壁を乗り上げる角度(乗り上げ補正量)を、SRモータ12のトルクの代用情報である電源電圧(バッテリ電圧)に基づいて推定し、その推定値分だけレンジ切換機構11の可動範囲の実測値を補正するようにすれば、レンジ切換機構11の可動範囲の実測値を精度良く求めることができる。
【0081】
ところで、F/B制御中に、例えば、エンコーダ46のA相信号又はB相信号が何等かの原因で一時的に欠けたり、エンコーダ46の信号ラインに重畳したノイズパルスが正規のパルス信号と誤認されたりすると、通電相(エンコーダカウント値)とロータ32の回転位相との同期が取れなくなって、ロータ32を正常に駆動できなくなってしまい、それによって、ロータ32が停止したり、逆回転することがあり、F/B制御を正常に続けられない状態になって制御不能に陥ることがある。
【0082】
そこで、本実施形態では、F/B制御中に、F/B制御状態(ロータ32の回転状態)が正常か異常かを監視し、異常が検出されれば、その時点で、F/B制御からオープンループ制御に切り換えてリカバリ処理を実行する。図47に示すリカバリ処理の実行例では、シフトレンジをPレンジからNotPレンジに切り換えるF/B制御の途中で、そのF/B制御状態が異常になって、ロータ32の異常停止又はエンコーダカウント値Ncntのカウント動作の異常停止が発生したした時点で、F/B制御からオープンループ制御に切り換えてリカバリ処理を実行する。
【0083】
オープンループ制御(リカバリ処理)中は、エンコーダカウント値Ncntの情報をフィードバックせずに通電相を順次切り換えてロータ32を回転駆動すると共に、当該オープンループ制御中に通電相を切り換える毎にオープンループ制御時の位置カウント値Ncntopをカウントアップ(又はカウントダウン)して、この位置カウント値Ncntopが目標カウント値Acntに到達した時点で、ロータ32が目標位置に到達したと判断してオープンループ制御(リカバリ処理)を終了し、F/B制御に復帰する。その結果、本実施形態では、F/B制御中に、エンコーダカウント値Ncntの異常や脱調等が発生してF/B制御状態(ロータ32の回転状態)が一時的に異常になっても、オープンループ制御によりロータ32を目標位置まで回転させることができる。
【0084】
この際、F/B制御状態の異常検出方法は、次の3つの異常検出方法▲1▼〜▲3▼のいずれか1つ又は2つ、或は全てを用いるようにすれば良い。
【0085】
[異常検出方法▲1▼]
図48に示すように、F/B制御中に、A相信号のエッジとB相信号のエッジとを別々にカウントし、A相信号のカウント値NaとB相信号のカウント値Nbとの偏差|Na−Nb|が異常判定値(例えば3)以上であるか否かでF/B制御状態の異常の有無を監視する。F/B制御中にA相信号とB相信号が正常に出力されていれば、A相信号のカウント値NaとB相信号のカウント値Nbとの差が0又は1となるため、両信号のカウント値の偏差|Na−Nb|が2以上になれば、いずれか一方の信号の抜けやノイズパルスの混入が考えられる。このような状態になると、エンコーダカウント値Ncntとロータ32の回転位置との同期が取れなくなって、ロータ32の回転状態(F/B制御状態)が異常になるため、両信号のカウント値の偏差|Na−Nb|によってロータ32の回転状態(F/B制御状態)の異常の有無を判定することができる。
【0086】
[異常検出方法▲2▼]
図48に示すように、F/B制御中に、A相信号のエッジ間隔ΔTaとB相信号のエッジ間隔ΔTbを計測して、各信号のエッジ間隔ΔTa,ΔTbが異常判定値(例えばΔTa,ΔTbの平均値の10倍)以上であるか否かで、F/B制御状態の異常の有無を監視する。
【0087】
尚、異常検出方法▲2▼として、ロータ回転速度を監視することにより、異常検出するようにしても良く、例えば、単位時間当りのエンコーダ46の出力パルス数に基づいて異常検出するようにしても良い。
【0088】
[異常検出方法▲3▼]
図49に示すように、F/B制御中に、エンコーダカウント値Ncntの変化方向からロータ32の回転方向を監視し、該ロータ32の回転方向が目標位置へ向かう回転方向から逆転したか否かでF/B制御状態(ロータ32の回転状態)の異常の有無を監視する。本実施形態では、エンコーダカウント値Ncntが目標位置と反対方向に連続して更新される回数をカウントし、そのカウント値Crが異常判定値(例えば4)以上であるか否かで、F/B制御状態(ロータ32の回転状態)の異常の有無を監視する。つまり、エンコーダカウント値Ncntが目標位置と反対方向に連続して例えば4回以上更新されたときにロータ32の逆転と判断して、逆転検出フラグXrをONに切り換える。
【0089】
更に、本実施形態では、オープンループ制御(リカバリ処理)中の励磁方式を1−2相励磁方式に設定し、図50に示すように、オープンループ制御開始から例えば3ステップ分は、各通電相の励磁時間を最長時間(例えば50ms)に設定して、ロータ32を確実に掴んでロータ32の回転位相と通電相とを確実に同期させる。この後は、励磁時間を大幅に短くするが、ロータ32の回転速度の上昇に伴って励磁時間を徐々に短くして、ロータ32の回転速度を緩やかに上昇させる。
【0090】
オープンループ制御中は、通電相を切り換える毎にオープンループ制御時の位置カウント値Ncntopをカウントアップ(又はカウントダウン)して、この位置カウント値Ncntopに基づいてロータ32の回転位置を推定し、この位置カウント値Ncntopと目標カウント値Acntとの差が所定値以下になった時点で、減速領域に入ったと判断して、励磁時間を徐々に長くして、ロータ32の回転速度を緩やかに減速し、該位置カウント値Ncntopが目標カウント値Acntに到達した時点で、ロータ32が目標位置に到達したと判断して、オープンループ制御を終了し、F/B制御に復帰する。
【0091】
ところで、エンコーダ46のパルス抜け又はノイズがあると、エンコーダカウント値Ncntとロータ32の回転位置(レンジ切換機構11の操作量)との関係又はエンコーダカウント値Ncntと通電相との関係がずれる可能性がある。
【0092】
そこで、本実施形態では、オープンループ制御からF/B制御に復帰させるときに、前述した初期駆動と突き当て制御を再実行するようにしている。これにより、オープンループ制御中にエンコーダカウント値Ncntとロータ32の回転位置(レンジ切換機構11の操作量)との関係又はエンコーダカウント値Ncntと通電相との関係がずれても、そのずれを初期駆動と突き当て制御によって精度良く補正することができる。
【0093】
以上説明したレンジ切換制御は、レンジ切換制御装置42のECU41によって後述する各ルーチンに従って実行される。以下、これら各ルーチンの処理内容を説明する。
【0094】
[初期駆動]
図8及び図9に示す初期駆動ルーチンに従って実行される。本ルーチンは、ECU41への電源投入直後(イグニッションスイッチをOFF位置からACC位置へ操作した直後)に、初期駆動が終了するまで所定周期(例えば1ms周期)で実行される。
【0095】
本ルーチンが起動されると、まずステップ101で、フェールセーフ処理実行フラグXfsop=ON、又は、リカバリ処理実行フラグXrcv=ONであるか否かを判定する。ここで、フェールセーフ処理実行フラグXfsopは、エンコーダ46又はSRモータ12が故障したときに実行されるフェールセーフ処理(オープンループ制御によるレンジ切り換え)が実行されているか否かを判定するフラグであり、ONは実行されていることを意味する。また、リカバリ処理実行フラグXrcvは、一時的なF/B制御状態の異常が発生したときに一時的に実行されるリカバリ処理(オープンループ制御)が実行されているか否かを判定するフラグであり、ONは実行されていることを意味する。
【0096】
もし、上記ステップ101で、「Yes」と判定されれば、以降の処理を行うことなく、本ルーチンを終了し、「No」と判定されれば、ステップ102に進み、ECU41のイニシャル処理から出力軸センサ14の出力電圧が安定するまで待つための所定時間(例えば100ms)が経過したか否かを判定する。そして、イニシャル処理から所定時間経過した時点で、ステップ103に進み、出力軸センサ14の出力電圧を読み込んで、この出力電圧がレンジ判定値以下であるか否かで、現在のレンジがPレンジかNotPレンジかを判定し、Pレンジであれば、ステップ104に進み、レンジ判定フラグXnpをPレンジを意味する「0」にセットし、NotPレンジであれば、ステップ105に進み、レンジ判定フラグXnpをNotPレンジを意味する「1」にセットする。
【0097】
この後、ステップ106に進み、レンジ判定フラグXnp=0(Pレンジ)であるか否かを判定し、レンジ判定フラグXnp=0(Pレンジ)であれば、ステップ107に進み、図10のPレンジ初期駆動ルーチンを実行し、レンジ判定フラグXnp=1(NotPレンジ)であれば、ステップ108に進み、図11のNotPレンジ初期駆動ルーチンを実行する。
【0098】
上記ステップ107で、図10のPレンジ初期駆動ルーチンが起動されると、ステップ201〜206で、初期駆動中の励磁回数をカウントする励磁回数カウンタCASEが0〜5のいずれであるかを判定する。この励磁回数カウンタCASEは、イニシャル処理でセットされる初期値が0で、励磁を1回行う毎に1ずつカウントアップされる(図9のステップ114)。そして、励磁回数カウンタCASEの判定結果に応じて通電相と通電時間Tを次のように設定する。
【0099】
CASE=0(1回目の励磁)の場合は、ステップ207に進み、W相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=1(2回目の励磁)の場合は、ステップ208に進み、UW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0100】
CASE=2(3回目の励磁)の場合は、ステップ209に進み、U相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=3(4回目の励磁)の場合は、ステップ210に進み、UV相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0101】
CASE=4(5回目の励磁)の場合は、ステップ211に進み、V相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=5(6回目の励磁)の場合は、ステップ212に進み、VW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0102】
これにより、Pレンジで初期駆動を行う場合は、W相通電→UW相通電→U相通電→UV相通電→V相通電→VW相通電の順序で通電相の切り換えを一巡し、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に駆動する。この際、1相通電の時間T1を2相通電の時間T2よりも短く設定する。
【0103】
一方、ステップ108で、図11のNotPレンジ初期駆動ルーチンが起動されると、ステップ221〜226で、励磁回数カウンタCASEが0〜5のいずれであるかを判定し、その判定結果に応じて通電相と通電時間Tを次のように設定する。
【0104】
CASE=0(1回目の励磁)の場合は、ステップ227に進み、V相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=1(2回目の励磁)の場合は、ステップ228に進み、UV相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0105】
CASE=2(3回目の励磁)の場合は、ステップ229に進み、U相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=3(4回目の励磁)の場合は、ステップ230に進み、UW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0106】
CASE=4(5回目の励磁)の場合は、ステップ231に進み、W相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=5(6回目の励磁)の場合は、ステップ232に進み、VW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0107】
これにより、NotPレンジで初期駆動を行う場合は、V相通電→UV相通電→U相通電→UW相通電→W相通電→VW相通電の順序で通電相の切り換えを一巡し、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に駆動する。この場合も、1相通電の時間T1を2相通電の時間T2よりも短く設定する。
【0108】
以上のようにして、図10のPレンジ初期駆動ルーチン又は図11のNotPレンジ初期駆動ルーチンを実行した後、図8のステップ109に進み、初期駆動中にレンジ切換操作(Pレンジスイッチ43又はNotPレンジスイッチ44の操作)が行われたか否かを判定し、初期駆動中にレンジ切換操作が行われれば、ステップ110に進み、レンジ切換操作フラグXchgをONにセットし、レンジ切換操作が行われていなければ、ステップ111に進み、レンジ切換操作フラグXchgをOFFにセットする。
【0109】
この後、図9のステップ112に進み、現在の通電相の通電時間をカウントする通電時間カウンタCTをカウントアップし、次のステップ113で、現在の通電相の通電時間CTが前記図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えたか否かを判定し、越えていなければ、以降の処理を行うことなく、本ルーチンを終了する。これにより、現在の通電相の通電時間CTが図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えるまで、現在の通電相への通電が継続される。
【0110】
その後、現在の通電相の通電時間CTが図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えた時点で、ステップ114に進み、励磁回数カウンタCASEを1だけカウントアップし、通電相を次の通電相に切り換える。そして、次のステップ115で、通電時間カウンタCTをリセットした後、ステップ116に進み、励磁回数カウンタCASEが初期駆動の終了を意味する「6」に達したか否かを判定し、もし、励磁回数カウンタCASEが「6」に達していれば、ステップ118に進み、初期駆動終了フラグXendを初期駆動の終了を意味する「ON」にセットする。
【0111】
また、励磁回数カウンタCASEが「6」に達していない場合、つまり、初期駆動の途中である場合は、ステップ117に進み、初期駆動の途中終了条件が成立しているか否かを判定する。この初期駆動の途中終了条件は、次の3つの条件▲1▼〜▲3▼によって判定される。
▲1▼レンジ判定フラグXnpが0(Pレンジ)であること
▲2▼励磁回数カウンタCASEが2又は4、つまり2相通電終了時であること
▲3▼レンジ切換操作フラグXchgがON、つまり初期駆動中にレンジ切換操作が行われたこと
これら3つの条件▲1▼〜▲3▼のうち、1つでも満たさない条件があれば、初期駆動の途中終了条件が成立せず、初期駆動を継続する。これに対し、3つの条件▲1▼〜▲3▼を全て満たしていれば、初期駆動の途中終了条件が成立して、ステップ118に進み、初期駆動終了フラグXendを初期駆動の終了を意味する「ON」にセットする。
【0112】
この後、ステップ119に進み、レンジ判定フラグXnp=1であるか否か(NotPレンジで初期駆動を行ったか否か)を判定し、レンジ判定フラグXnp=1であれば、ステップ120に進み、初期駆動終了時のエンコーダカウント値Ncntを初期位置ずれ学習値Gcntとして記憶する。そして、次のステップ121で、エンコーダカウント値Ncntを次式によりNotPレンジを基準にした値に補正する。
Ncnt=Ncnt+288
【0113】
本実施形態では、Pレンジの保持位置を0点位置としてエンコーダカウント値Ncntをカウントアップし、NotPレンジの保持位置までロータ32が回転したときに、エンコーダカウント値Ncntが例えば288となるようになっている。従って、NotPレンジで初期駆動を行った場合は、初期駆動終了時のエンコーダカウント値Ncntに288を加算することで、エンコーダカウント値NcntをNotPレンジを基準にした値に補正する。
【0114】
一方、上記ステップ119で、レンジ判定フラグXnp=0(Pレンジで初期駆動)と判定されれば、ステップ122に進み、初期駆動終了時のエンコーダカウント値Ncntを用いて初期位置ずれ学習値Gcntを次式により算出する。
Gcnt=Ncnt+2×(6−CASE)
【0115】
この場合、初期駆動が最後まで行われれば、ステップ114の処理によりCASE=6となるため、初期駆動終了時のエンコーダカウント値Ncntがそのまま初期位置ずれ学習値Gcntとなるが、Pレンジで初期駆動を行う場合は、初期駆動の途中でレンジ切換操作が行われたときに、次の2相通電(2相通電の実行中にレンジ切換要求が発生したときはその2相通電)が終了してから通常駆動に移行するため、その初期駆動を最後まで実行したと仮定して、本来の初期駆動終了時のエンコーダカウント値Ncntを推定し、その推定値を初期位置ずれ学習値Gcntとするようにしている。2×(6−CASE)は、未終了の励磁回数分の回転角度に相当するカウントアップ値(以下「Ncnt補正量」という)である。
【0116】
図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となる。
【0117】
[エンコーダカウンタ]
次に、図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を算出する。
【0118】
ここで、A相信号とB相信号の今回値A(i) 、B(i) と、前回値A(i−1) 、B(i−1) を用いる理由は、A相信号とB相信号の発生順序によってロータ32の回転方向を判定するためであり、図17に示すように、正回転(Pレンジ→NotPレンジの回転方向)ではカウントアップ値ΔNをプラス値にしてエンコーダカウント値Ncntをカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではカウントアップ値ΔNをマイナス値にしてエンコーダカウント値Ncntをカウントダウンする。
【0119】
カウントアップ値ΔNの算出後、ステップ303に進み、前回のエンコーダカウント値Ncntに上記ステップ302で算出したカウントアップ値ΔNを加算して、今回のエンコーダカウント値Ncntを求める。この後、ステップ304に進み、次回のカウント処理のために、A相信号とB相信号の今回値A(i) 、B(i) をそれぞれA(i−1) 、B(i−1) として記憶して本ルーチンを終了する。
【0120】
[制御モード設定]
図20乃至図22に示す制御モード設定ルーチンは、初期駆動終了後に所定周期(例えば1ms周期)で実行され、制御モード判定値modeを0、1、3、4、5のいずれかに設定して、下記のように制御モードを指定する。
【0121】
mode=0:通電オフ(スタンバイ)
mode=1:通常駆動
(F/B制御開始位置停止保持処理及びF/B制御)
mode=3:目標位置停止保持処理
mode=4:反転位置停止保持処理
mode=5:オープンループ制御
【0122】
制御モード設定ルーチンが起動されると、まずステップ401で、システム故障フラグXfailoffがレンジ切換制御装置42の故障を意味するONにセットされているか否かを判定し、もし、Xfailoff=ONに設定されていれば、ステップ402に進み、SRモータ12を通電オフ状態に維持するための処理を実行する。これにより、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、F/B許可フラグXfb=OFF(F/B制御禁止)、制御モード判定値mode=0(通電オフ)にセットする。
【0123】
一方、システム故障フラグXfailoffがOFF(故障無し)の場合は、ステップ401からステップ403に進み、フェールセーフ処理実行フラグXfsop=OFF、且つ、リカバリ処理実行フラグXrcv=OFFであるか否かを判定する。もし、フェールセーフ処理実行フラグXfsopとリカバリ処理実行フラグXrcvのいずれか一方又は両方がONにセットされている場合は、ステップ404に進み、オープンループ制御を実行するために、回転方向指示値D=0(停止)、制御モード判定値mode=5(オープンループ制御)、F/B許可フラグXfb=OFF(F/B制御禁止)にセットする。
【0124】
フェールセーフ処理実行フラグXfsopとリカバリ処理実行フラグXrcvの両方がOFFにセットされている場合は、ステップ405に進み、通電フラグXon=ON(通電オン)にセットされているか否かを判定し、通電フラグXon=OFF(通電オフ)にセットされている場合は、ステップ406に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(目標位置とロータ32と位置との差)を求めて、この差(Acnt−Ncnt)に基づいて正回転(Pレンジ→NotPレンジ方向への回転)、逆回転(NotPレンジ→Pレンジ方向への回転)、停止のいずれに該当するか判定する。この際、エンコーダカウント値Ncntは、前記図8及び図9の初期駆動ルーチンで学習された初期位置ずれ学習値Gcntによって補正された値を用いる。
Ncnt=Ncnt−Gcnt
尚、目標カウント値Acntは、後述する図45及び図46の目標カウント値設定ルーチンで設定される。
【0125】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が+Kth以上(例えば+10°以上)であれば、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に回転駆動する必要があると判断して、ステップ407に進み、回転方向指示値D=1(正回転)、通電フラグXon=ON(通電オン)、制御モード判定値mode=1(F/B制御開始位置停止保持処理及びF/B制御)にセットする。
【0126】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が−Kth以下(例えば−10°以下)であれば、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に回転駆動する必要があると判断して、ステップ409に進み、回転方向指示値D=−1(逆回転)、通電フラグXon=ON(通電オン)、制御モード判定値mode=1(F/B制御開始位置停止保持処理及びF/B制御)にセットする。
【0127】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が−Kthから+Kthの範囲内(例えば−10°から+10°の範囲内)であれば、ロータ32を目標位置にディテントバネ23のバネ力により保持することが可能である(SRモータ12への通電は不要)と判断して、ステップ408に進み、SRモータ12を通電オフ状態に維持するために、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、制御モード判定値mode=0(通電オフ)にセットする。
【0128】
一方、前記ステップ405で、通電フラグXon=ON(通電オン)にセットされていると判定された場合は、図21のステップ410〜415の処理によって、指令シフトレンジ(目標位置)が反転されたか否かを判定し、反転されていれば、回転方向指示値Dを反転させる。
【0129】
具体的には、まずステップ410で、回転方向指示値D=1(正回転)であるか否かを判定し、回転方向指示値D=1(正回転)であれば、ステップ411に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)がマイナス値であるか否かで、ロータ32の回転方向を正回転から逆回転に反転させる必要があるか否かを判定し、その必要があれば、ステップ412に進み、回転方向指示値D=−1(逆回転)にセットする。
【0130】
これに対して、上記ステップ410で、回転方向指示値Dが1(正回転)でないと判定された場合(つまりD=0又は−1の場合)は、ステップ413に進み、回転方向指示値D=−1(逆回転)であるか否かを判定し、回転方向指示値D=−1(逆回転)であれば、ステップ414に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)がプラス値であるか否かで、ロータ32の回転方向を逆回転から正回転に反転させる必要があるか否かを判定し、その必要があれば、ステップ415に進み、回転方向指示値D=1(正回転)にセットする。
【0131】
以上のようにして、回転方向指示値Dが反転された場合は、ステップ416に進み、ロータ32の回転方向を反転させるために、制御モード判定値mode=4(反転位置停止保持処理)、F/B許可フラグXfb=OFF(F/B制御禁止)にセットしてステップ417に進む。これに対し、回転方向指示値Dが反転されない場合は、上記ステップ416の処理を行わずにステップ417に進む。
【0132】
このステップ417では、制御モード判定値mode=4(反転位置停止保持処理)にセットされているか否かを判定し、「Yes」であれば、ステップ418に進み、通電フラグXon=ON(通電オン)にセットして、反転位置停止保持処理を実行する。
【0133】
これに対して、上記ステップ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制御の終了タイミングであるか否かを判定する。
【0134】
つまり、F/B制御の終了判定値Krefを例えば通電相の位相進み分(例えば2〜4カウント分)に設定することで、目標カウント値Acntよりも通電相の位相進み分だけ前のタイミングでF/B制御を終了するようにしたものである。これにより、F/B制御の最後の通電相がロータ32を目標位置(目標カウント値Acnt)に停止保持する通電相と一致するようになる。
【0135】
上記ステップ420又は421で「No」と判定された場合(F/B制御の終了タイミングでない場合)は、ステップ422に進み、目標位置停止保持処理の時間をカウントする停止保持時間カウンタCTholdをリセットする。
【0136】
一方、上記ステップ420又は421で「Yes」と判定された場合(F/B制御の終了タイミングである場合)は、ステップ423に進み、F/B許可フラグXfb=OFF(F/B制御禁止)にセットし、F/B制御を終了して目標位置停止保持処理に移行する。そして、次のステップ424で、停止保持時間カウンタCTholdをカウントアップして、目標位置停止保持処理の時間をカウントする。
【0137】
この後、ステップ425に進み、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達したか否かを判定し、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達していなければ、ステップ426に進み、目標位置停止保持処理を続行するために、回転方向指示値D=0(停止)、通電フラグXon=ON(通電オン)、制御モード判定値mode=3(目標位置停止保持処理)に維持する。
【0138】
その後、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達した時点で、ステップ427に進み、SRモータ12の通電をオフするために、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、制御モード判定値mode=0(通電オフ)にセットする。
【0139】
[時間同期モータ制御]
図23に示す時間同期モータ制御ルーチンは、初期駆動終了後に所定周期(例えば1ms周期)で起動され、F/B制御開始位置停止保持処理、目標位置停止保持処理、反転位置停止保持処理を実行する。
【0140】
本ルーチンが起動されると、まずステップ501で、F/B許可フラグXfb=OFF(F/B制御禁止)であるか否かを判定し、F/B許可フラグXfb=ON(F/B制御実行)の場合は、以降の処理を行うことなく、本ルーチンを終了する。この場合は、後述する図30に示すF/B制御ルーチンによって通電相の設定と通電処理が実行される。
【0141】
これに対して、上記ステップ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を算出する。
【0142】
また、制御モード判定値mode=3(目標位置停止保持処理)の場合は、ステップ503からステップ506に進み、後述する図25に示すmode3ルーチンを実行して、目標位置停止保持処理実行時の通電相を設定するための通電相判定値Mptnを算出する。
【0143】
また、制御モード判定値mode=4(反転位置停止保持処理)の場合は、ステップ504からステップ507に進み、後述する図26に示すmode4ルーチンを実行して、反転位置停止保持処理実行時の通電相を設定するための通電相判定値Mptnを算出する。
【0144】
以上のようにして、制御モード判定値mode=1,3,4の場合は、通電相判定値Mptnを算出した後、ステップ508に進み、後述する図27に示す通電処理ルーチンを実行して、F/B制御開始位置停止保持処理、目標位置停止保持処理、反転位置停止保持処理を実行する。
【0145】
一方、上記ステップ502〜504で、いずれも「No」と判定された場合、つまり、制御モード判定値mode=0,5の場合は、ステップ508に進み、後述する図27に示す通電処理ルーチンを実行して、通電オフ又はオープンループ制御を実行する。
【0146】
[mode1]
図24に示すmode1ルーチンは、図23の時間同期モータ制御ルーチンのステップ505で起動されるサブルーチンであり、F/B制御開始位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0147】
本ルーチンが起動されると、まずステップ511で、F/B制御開始位置停止保持処理の時間をカウントする通電時間カウンタCT1をカウントアップし、次のステップ512で、F/B制御開始位置停止保持処理の時間CT1が所定時間(例えば10ms)を越えたか否かを判定する。
【0148】
もし、F/B制御開始位置停止保持処理の時間CT1が所定時間(例えば10ms)を越えていなければ、ステップ513に進み、停止保持時通電相記憶済みフラグXhold=OFF(未記憶)であるか否か(つまりF/B制御開始位置停止保持処理の開始直前のタイミングであるか否か)を判定し、停止保持時通電相記憶済みフラグXhold=OFFであれば、ステップ514に進み、F/B制御開始位置停止保持処理時の通電相判定値Mptnを現在の位置カウンタ値(Ncnt−Gcnt)にセットする。
Mptn=Ncnt−Gcnt
ここで、位置カウンタ値(Ncnt−Gcnt)は、エンコーダカウント値Ncntを初期位置ずれ学習値Gcntで補正した値であり、ロータ32の現在位置を正確に表した値となっている。
【0149】
この後、ステップ515に進み、通電相判定値Mptnを“12”で割り算して、その余りMptn%12を求める。ここで、“12”は、通電相を一巡させる間のエンコーダカウント値Ncnt(通電相判定値Mptn)の増減量に相当する。このMptn%12の値に基づいて、図28の変換テーブルによって通電相が決定される。
【0150】
そして、次のステップ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制御開始位置に確実に停止保持できるようにする。
【0151】
そして、次のステップ518で、停止保持時通電相記憶済みフラグXhold=ON(記憶済み)にセットして本ルーチンを終了する。この後、本ルーチンが起動されたときには、ステップ513で「No」と判定され、ステップ514〜518の処理が実行されない。これにより、F/B制御開始位置停止保持処理時の通電相判定値Mptn(通電相)を設定する処理は、F/B制御開始位置停止保持処理の開始直前に1回のみ実行される。
【0152】
その後、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制御実行)にセットする。
【0153】
図32はUW相から回転を開始する場合に最初に通電する相を説明するタイムチャートである。この場合、正回転(Pレンジ→NotPレンジ方向への回転)を開始する場合は、通電相判定値Mptnは、エンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、正回転方向位相進み量K1を用いて次式により算出される。
Mptn=Ncnt−Gcnt+K1
【0154】
ここで、正回転方向位相進み量K1を例えば4とすると、通電相判定値Mptnは、次式により算出される。
Mptn=Ncnt−Gcnt+4
UW相から正回転を開始する場合は、mod(Ncnt−Gcnt)は4となるため、Mptn%12=4+4=8となり、最初の通電相はUV相となる。
【0155】
一方、UW相から逆回転(NotPレンジ→Pレンジ方向への回転)を開始する場合は、逆回転方向位相進み量K2を例えば3とすると、通電相判定値Mptnは、次式により算出される。
Mptn=Ncnt−Gcnt−K2=Ncnt−Gcnt−3
UW相から逆回転を開始する場合は、Mptn%12=4−3=1となり、最初の通電相はVW相となる。
【0156】
このように、正回転方向位相進み量K1と逆回転方向位相進み量K2をそれぞれ4と3に設定することで、正回転方向と逆回転方向の通電相の切換パターンを対称にすることができ、正回転方向と逆回転方向のいずれの場合も、ロータ32の現在位置から2ステップ分ずらした位置の相を最初に励磁して回転を開始することができる。
【0157】
[mode3]
図25に示すmode3ルーチンは、図23の時間同期モータ制御ルーチンのステップ506で起動されるサブルーチンであり、目標位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0158】
本ルーチンが起動されると、まずステップ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相通電に変更する。
【0159】
この際、ステップ532で、回転方向を次のようにして判定する。本ルーチンに入る直前(F/B制御終了時)に、図22のステップ426で、回転方向指示値Dが0(停止)にセットされるため、回転方向指示値Dを見ても回転方向を判定することができない。そこで、本ルーチンでは、F/B制御終了時の通電相判定値Mptnと位置カウント値(Ncnt−Gcnt)との間に、通電相の位相進み量K1,K2分の差があることに着目し、F/B制御終了時の通電相判定値Mptnと位置カウント値(Ncnt−Gcnt)との大小関係によって回転方向を次のように判定する。
【0160】
Mptn>Ncnt−Gcntの場合は、正回転(Pレンジ→NotPレンジの回転方向)と判定して、ステップ533に進み、通電相判定値Mptnを2だけ増加させることで、2相通電に補正する。
【0161】
一方、Mptn<Ncnt−Gcntの場合は、逆回転(NotPレンジ→Pレンジの回転方向)と判定して、ステップ534に進み、通電相判定値Mptnを2だけ減少させることで、2相通電に補正する。
尚、Mptn=Ncnt−Gcntの場合は、停止と判定して、通電相は変更しない。
【0162】
このように、目標位置停止保持処理についても、F/B制御開始位置停止保持処理と同じく、1相通電と比べて保持トルクの大きい2相通電で実行することで、ロータ32が目標位置付近で振動することを防止して、ロータ32を目標位置で確実に停止保持できるようにする。
【0163】
[mode4]
図26に示すmode4ルーチンは、図23の時間同期モータ制御ルーチンのステップ507で起動されるサブルーチンであり、反転位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0164】
本ルーチンが起動されると、まずステップ541で、反転位置停止保持処理の時間をカウントする通電時間カウンタCT4をカウントアップし、次のステップ542で、反転位置停止保持処理の時間CT4が所定時間(例えば50ms)を越えたか否かを判定する。
【0165】
もし、反転位置停止保持処理の時間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の処理と同じである。
【0166】
このように、反転位置停止保持処理についても、F/B制御開始位置停止保持処理や目標位置停止保持処理と同じく、1相通電と比べて保持トルクの大きい2相通電で実行することで、ロータ32が反転位置付近で振動することを防止して、ロータ32を反転位置で確実に停止保持できるようにする。
【0167】
その後、反転位置停止保持処理の時間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(通常駆動)にセットして本ルーチンを終了する。
【0168】
[通電処理]
図27に示す通電処理ルーチンは、図23の時間同期モータ制御ルーチンのステップ508で起動されるサブルーチンである。尚、本ルーチンは、後述する図30のF/B制御ルーチンのステップ603でも起動される。
【0169】
図27の通電処理ルーチンが起動されると、まずステップ551で、制御モード判定値mode=0(通電オフ)であるか否かを判定し、制御モード判定値mode=0(通電オフ)であれば、ステップ552に進み、SRモータ12の全相の通電をオフしてスタンバイ状態とする。
【0170】
一方、上記ステップ551で、「No」と判定されれば、ステップ553に進み、制御モード判定値mode=5(オープンループ制御)であるか否かを判定し、制御モード判定値mode=5(オープンループ制御)であれば、ステップ554に進み、オープンループ制御を実行する。このオープンループ制御は、エンコーダ46の故障又はSRモータ12の動作異常が発生したときに、例えば1ms周期の時間同期処理によって通電相を設定してロータ32を目標位置まで回転駆動する。
【0171】
また、上記ステップ551、553で、いずれも「No」と判定された場合、つまり、制御モード判定値mode=1,3,4(F/B制御開始位置停止保持処理、F/B制御、目標位置停止保持処理、反転位置停止保持処理)の場合は、ステップ555に進み、Mptn%12に応じて図28の変換テーブルによって通電相を設定する。
【0172】
この後、ステップ556に進み、突き当て制御実行中(Pレンジ側突き当て制御中フラグXexp=ON又はNotPレンジ側突き当て制御中フラグXexnp=ON)であるか否かを判定し、突き当て制御実行中でなければ、ステップ557に進み、SRモータ12の通電デューティ比を例えば100%に設定するが、突き当て制御実行中であれば、ステップ558に進み、SRモータ12の電源電圧であるバッテリ電圧に応じて図29のテーブルによって通電デューティ比を例えば10〜30%に設定する。これにより、突き当て制御の実行時に、SRモータ12のトルクを通常駆動時よりも大幅に低下させる。
【0173】
尚、図29のテーブルの例では、SRモータ12の電源電圧(バッテリ電圧)が高くなるほど、SRモータ12のトルクが大きくなるという特性を考慮して、電源電圧(バッテリ電圧)が高くなるほど、通電デューティ比が小さくなるように設定されている。これにより、電源電圧(バッテリ電圧)が高くても低くても、SRモータ12のトルクがほぼ一定となり、常にSRモータ12のトルクが突き当て制御に必要最小限のトルクを確保できるようになっている。
【0174】
以上のようにして、通電デューティ比を設定した後、ステップ559に進み、ECU41からモータドライバ37,38に制御信号を出力して、ステップ555で設定された通電相の巻線に、ステップ557又は558で設定された通電デューティ比で通電してSRモータ12を駆動する。
【0175】
[F/B制御]
次に、図30に示すF/B制御ルーチンの処理内容を説明する。本ルーチンは、AB相割り込み処理により実行され、初期駆動終了後にF/B制御実行条件が成立しているときに、ロータ32の回転位置(エンコーダカウント値Ncnt−Gcnt)が目標位置(目標カウント値Acnt)から例えば0.5°以内に到達するまで、エンコーダカウント値Ncntと初期位置ずれ学習値Gcntとに基づいて通電相を切り換えてロータ32を回転させる。
【0176】
図30のF/B制御ルーチンが起動されると、まずステップ601で、F/B許可フラグXfbがONにセットされているか否か(F/B制御実行条件が成立しているか否か)を判定し、F/B許可フラグXfbがOFF(F/B制御実行条件が不成立)であれば、以降の処理を行うことなく、本ルーチンを終了する。
【0177】
これに対し、F/B許可フラグXfbがONにセットされていれば、ステップ602に進み、後述する図31の通電相設定ルーチンを実行して、現在のエンコーダカウント値Ncntと初期位置ずれ学習値Gcntとに基づいて通電相を設定し、次のステップ603で、図27の通電処理ルーチンを実行する。
【0178】
[通電相設定]
図31に示す通電相設定ルーチンは、図30のF/B制御ルーチンのステップ602で起動されるサブルーチンである。本ルーチンが起動されると、まずステップ611で、目標位置への回転方向を指示する回転方向指示値Dが正回転(Pレンジ→NotPレンジの回転方向)を意味する「1」であるか否かを判定する。その結果、回転方向指示値D=1(正回転)と判定されれば、ステップ612に進み、ロータ32の回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが減少したか否か)を判定し、逆転していなければ、ステップ613に進み、現在のエンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、正回転方向位相進み量K1、速度位相進み補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt+K1+Ks
ここで、正回転方向位相進み量K1は、ロータ32を正回転させるのに必要な通電相の位相進み量(ロータ32の現在の回転位相に対する通電相の位相進み量)であり、例えばK1=4に設定されている。
【0179】
また、速度位相進み補正量Ksは、ロータ32の回転速度に応じて設定される位相進み補正量であり、後述する図34の速度位相進み補正量設定ルーチンによって設定される。例えば、低速域では、速度位相進み補正量Ksが0に設定され、高速になるに従って、速度位相進み補正量Ksが例えば1又は2に増加される。これにより、ロータ32の回転速度に適した通電相となるように通電相判定値Mptnが補正される。
【0180】
一方、上記ステップ612で、ロータ32の回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。この場合は、逆転直前の通電相(前回の通電相)に通電され、ロータ32の逆転を抑制する方向に制動トルクが発生する。
【0181】
また、上記ステップ611で、回転方向指示値D=0(逆回転)、つまりNotPレンジ→Pレンジの回転方向と判定された場合は、ステップ614に進み、ロータ32の回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが増加したか否か)を判定し、逆転していなければ、ステップ615に進み、現在のエンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、逆回転方向位相進み量K2、速度位相進み補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt−K2−Ks
【0182】
ここで、逆回転方向位相進み量K2は、ロータ32を逆回転させるのに必要な通電相の位相進み量(ロータ32の現在の回転位相に対する通電相の位相進み量)であり、例えばK2=3に設定されている。速度位相進み補正量Ksは正回転の場合と同じく、後述する図34の速度位相進み補正量設定ルーチンによって設定される。
【0183】
一方、上記ステップ614で、ロータ32の回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。この場合は、逆転直前の通電相(前回の通電相)に通電され、ロータ32の逆転を抑制する方向に制動トルクが発生する。
【0184】
以上のようにして、今回の通電相判定値Mptnを決定した後、図27の通電処理ルーチンを実行し、F/B制御実行中は、ステップ555で、図28の変換テーブルを検索して、Mptn%12に対応する通電相を選択し、その通電相に通電する。
【0185】
[ロータ回転速度演算]
図33に示すロータ回転速度演算ルーチンは、AB相割り込み処理により実行され、次のようにしてロータ32の回転速度SPを演算する。本ルーチンが起動されると、まずステップ621で、F/B許可フラグXfbがON(F/B制御実行中)であるか否かを判定し、F/B許可フラグXfbがOFF(F/B制御禁止)であれば、ロータ32の回転速度SPに応じた通電相の位相進み補正を行わないため、ステップ624に進み、ロータ32の回転速度SP,SPaの記憶値をリセットして、本ルーチンを終了する。
【0186】
これに対して、F/B許可フラグXfbがON(F/B制御実行中)であれば、次のようにしてロータ32の回転速度SPを演算する。まず、ステップ622で、エンコーダ46のA相信号とB相信号の立ち上がり/立ち下がりエッジ間の時間間隔ΔT(n) (すなわちエンコーダカウント値が増減する時間間隔)を計測して、その時間間隔ΔT(n) の過去N回分の平均値ΔTavを算出する。そして、回転速度演算値SPaを次式により算出する。
SPa=60/(ΔTav×Kp)  [rpm]
【0187】
ここで、Kpは、ロータ32の1回転当たりの時間間隔ΔT(n) の数(ロータ32の1回転当たりのエンコーダカウント値の変化量)であり、図5の構成のエンコーダ46の場合は、Kp=96となる。ΔTav×Kpは、ロータ32が1回転するのに要する時間[sec]である。
【0188】
この後、ステップ623に進み、回転速度演算値SPaを用いて、ロータ32の回転速度SPを次式によりなまし処理して求める。
SP(i) =SP(i−1) +{SPa−SP(i−1) }/R
ここで、SP(i) は今回の回転速度、SP(i−1) は前回の回転速度、Rはなまし係数である。
【0189】
[速度位相進み補正量設定]
図34に示す速度位相進み補正量設定ルーチンは、所定周期(例えば1ms周期)で起動され、ロータ32の回転速度SPに応じて速度位相進み補正量Ksを次のようにして設定する。本ルーチンが起動されると、まずステップ631で、F/B許可フラグXfbがON(F/B制御実行中)であるか否かを判定し、F/B許可フラグXfbがOFF(F/B制御禁止)であれば、通電相の位相進み補正は不要であるため、以降の処理を行うことなく、本ルーチンを終了する。
【0190】
これに対して、F/B許可フラグXfbがON(F/B制御実行中)であれば、ステップ632〜636の処理により、図33のロータ回転速度演算ルーチンで演算されたロータ32の回転速度SPに応じて速度位相進み補正量Ksを次のようにして設定する。
【0191】
ステップ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を大きな値に設定する。
【0192】
この後、ステップ637に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差の絶対値|Acnt−Ncnt|が所定値よりも小さいか否かで、ロータ32の回転位置が目標位置に近付いたか否か(停止のための減速領域に入ったか否か)を判定する。
【0193】
もし、|Acnt−Ncnt|が所定値以上であれば、ステップ639に進み、突き当て制御実行中(Pレンジ側突き当て制御中フラグXexp=ON又はNotPレンジ側突き当て制御中フラグXexnp=ON)であるか否かを判定し、突き当て制御実行中でなければ、上記ステップ634〜636のいずれかで設定した速度位相進み補正量Ksをそのまま用い、突き当て制御実行中であれば、ステップ640に進み、速度位相進み補正量Ksを小さい値Ke(例えば0又は−1)に設定して、ロータ32の回転速度を遅くする。
【0194】
一方、|Acnt−Ncnt|が所定値よりも小さい場合は、減速領域と判断して、ステップ637からステップ638に進み、速度位相進み補正量Ksを小さい値Kd(例えば0又は−1)に設定する。
【0195】
尚、本ルーチンでは、ロータ32の回転速度SPに応じて速度位相進み補正量Ksを3段階に切り換えるようにしたが、2段階又は4段階以上に切り換えるようにしても良い。
【0196】
[遊び量学習]
図36に示す遊び量学習ルーチンは、初期駆動終了後に所定周期(例えば8ms周期)で実行される。本ルーチンが起動されると、まずステップ700で、遊び量学習完了フラグXg=ON(遊び量学習完了後)であるか否かを判定し、もし、遊び量学習完了フラグXg=ONであれば、以降の処理を行うことなく、本ルーチンを終了する。これにより、遊び量学習は、イグニッションスイッチのオン期間中に1回のみ行われる。尚、遊び量学習完了フラグXgは、イグニッションスイッチのオン直後に実行される初期化処理ルーチン(図示せず)によってOFFにセットされる。
【0197】
一方、上記ステップ700で、遊び量学習完了フラグXg=OFF(遊び量学習完了前)と判定されれば、ステップ701に進み、指令シフトレンジがPレンジであるか否かを判定し、Pレンジであれば、ステップ702に進み、後述する図39及び図40のPレンジ側突き当て制御ルーチンを実行し、Pレンジ側突き当て時のエンコーダカウント値NpをECU41のRAMに記憶する。一方、NotPレンジであれば、ステップ703に進み、後述する図42及び図43のNotPレンジ側突き当て制御ルーチンを実行して、NotPレンジ側突き当て時のエンコーダカウント値NnpをECU41のRAMに記憶する。
【0198】
この後、ステップ704に進み、Pレンジ側とPレンジ側の両方の突き当て制御を完了したか否か(Pレンジ側突き当て完了フラグXp=ON、且つ、NotPレンジ側突き当て完了フラグXnp=ONであるか否か)を判定し、Pレンジ側とPレンジ側のいずれか一方でも突き当て制御が完了していなければ、以降の処理を行うことなく、本ルーチンを終了する。
【0199】
これに対して、レンジ側とPレンジ側の両方の突き当て制御を完了していれば、ステップ705に進み、Pレンジ側の限界位置(Pレンジ保持凹部24の側壁)からNotPレンジ側の限界位置(NotPレンジ保持凹部25の側壁)までのロータ32の可動範囲(ディテントレバー15の可動範囲)の実測値ΔNactを次式により算出する。
ΔNact=Nnp−Np
【0200】
ここで、Nnpは、NotPレンジ側突き当て時のエンコーダカウント値で、後述する図42及び図43のNotPレンジ側突き当て制御ルーチンによって学習した値GNnpが用いられる。Npは、Pレンジ側突き当て時のエンコーダカウント値で、後述する図39及び図40のPレンジ側突き当て制御ルーチンによって学習した値GNpが用いられる。
【0201】
可動範囲の実測値ΔNactの算出後、ステップ706に進み、図38に示す関係を考慮して、Pレンジ側の遊び量ΔGpとNotPレンジ側の遊び量ΔGnpを可動範囲の実測値ΔNactと設計値ΔNdを用いて次式により算出する。
ΔGp=ΔGnp=(ΔNact−ΔNd)/2
ここで、可動範囲の設計値ΔNdは、予め設計データに基づいて算出しても良いし、量産品の可動範囲の製造ばらつきの中心値(標準品の可動範囲の実測値)を用いても良い。
【0202】
図38に示すように、可動範囲の実測値ΔNactと設計値ΔNdとの差分(ΔNact−ΔNd)は、Pレンジ側とNotPレンジ側の合計遊び量(ΔGp+ΔGnp)に相当する。一般に、Pレンジ側の遊び量ΔGpとNotPレンジ側の遊び量ΔGnpは等しいため、上式により、Pレンジ側とNotPレンジ側の各遊び量ΔGp,ΔGnpを算出することができる。
【0203】
各遊び量ΔGp,ΔGnpの算出後、ステップ707に進み、遊び量学習完了フラグXgを、遊び量学習完了を意味する「ON」にセットして、本ルーチンを終了する。
【0204】
尚、上記ステップ705、706で算出された可動範囲の実測値ΔNactと遊び量ΔGp,ΔGnpは、ECU41のSRAM等の不揮発性メモリ(図示せず)に更新記憶され、イグニッションスイッチのオフ後も、その記憶値が保持される。次回のイグニッションスイッチのオン後は、後述する図45及び図46の目標カウント値設定ルーチンで目標カウント値Acntを設定する際に、ECU41の不揮発性メモリに記憶されている可動範囲の実測値ΔNactと遊び量ΔGp,ΔGnpを用いて目標カウント値Acntを設定する。
【0205】
[Pレンジ側突き当て制御]
図39及び図40に示すPレンジ側突き当て制御ルーチンは、指令シフトレンジがPレンジのときに図36の遊び量学習ルーチンのステップ702で実行されるサブルーチンである。本ルーチンが起動されると、まずステップ711で、Pレンジ側突き当て完了フラグXp=ON(Pレンジ側突き当て制御終了後)であるか否かを判定し、既にPレンジ側突き当て制御が終了していれば、以降の処理を行うことなく、本ルーチンを終了する。これにより、Pレンジ側突き当て制御は、イグニッションスイッチのオン期間中に1回のみ行われる。
【0206】
一方、上記ステップ711で、Pレンジ側突き当て完了フラグXp=OFF(Pレンジ側突き当て制御終了前)であると判定されれば、ステップ712に進み、制御モード判定値modeが0、3に該当するか否かを判定する。ここで、制御モード判定値mode=0は、通電オフ(スタンバイ)を意味し、制御モード判定値mode=3は、目標位置停止保持処理を意味する。
【0207】
本ルーチンでは、ロータ32がPレンジで停止しているときにPレンジ側突き当て制御を行うようにするために、制御モード判定値mode=0又は3でPレンジ側突き当て制御を行うようにしている。
【0208】
制御モード判定値mode=0(通電オフ)の場合は、ステップ713に進み、Pレンジでmode=0になっている時間をカウントするmode0時間カウンタCT0pをカウントアップする。また、制御モード判定値mode=3(目標位置停止保持処理)の場合は、ステップ714に進み、Pレンジでmode=3となっている時間をカウントするmode3時間カウンタCT3pをカウントアップする。これら2つの時間カウンタCT0p,CT3pは、Pレンジでロータ32の振動が収束して停止状態になるまで待機するのに用いられる。
【0209】
尚、制御モード判定値mode=1(通常駆動)、4(反転位置停止保持処理)、5(オープンループ制御)の場合は、ロータ32がPレンジで停止していないため、ステップ731に進み、時間カウンタCT0p,CT3pのカウント値をクリアする。
【0210】
そして、ステップ715で、mode0時間カウンタCT0pの値が停止判定値K0pを越えたか否か、又は、mode3時間カウンタCT3pの値が停止判定値K3pを越えたか否か判定する。ここで、停止判定値K0pは、Pレンジで制御モード判定値mode=0(通電オフ)のときにロータ32の振動が収束するのに必要な時間に相当し、停止判定値K3pは、Pレンジで制御モード判定値mode=3(目標位置停止保持処理)のときにロータ32の振動が収束するのに必要な時間に相当する。
【0211】
上記ステップ715で、「No」と判定されれば、ロータ32の振動が収束していないと判断して、ステップ716に進み、Pレンジ側突き当て制御中フラグXexp=OFFにセットする。この場合は、まだ、Pレンジ側突き当て制御が実行されない。
【0212】
一方、上記ステップ715で、「Yes」と判定されれば、Pレンジでロータ32の振動が収束したと判断して、ステップ717に進み、Pレンジ側突き当て制御中フラグXexp=ONにセットする。
【0213】
この後、ステップ718に進み、Pレンジ側突き当て制御中フラグXexp=ONであるか否かを判定し、Xexp=OFFであれば、ステップ719に進み、突き当て目標カウント値Ag=0、停止時間カウンタCTstop=0、突き当て制御時間カウンタCTg=0にセットして、本ルーチンを終了する。
【0214】
これに対して、Pレンジ側突き当て制御中フラグXexp=ONの場合は、ステップ720に進み、突き当て目標カウント値Agを所定値Kgpに設定する。この突き当て目標カウント値Ag(Kgp)は、Pレンジ側突き当て制御によってディテントバネ23の係合部23aをディテントレバー15のPレンジ保持凹部24の側壁に確実に突き当てることができるように設定される。
【0215】
Pレンジ側突き当て制御中フラグXexp=ONの場合は、後述する図45の目標カウント値設定ルーチンによって目標カウント値Acntが突き当て目標カウント値Ag(Kgp)にセットされるため、図41に示すように、Pレンジ側突き当て制御が実行され、ディテントバネ23の係合部23aがディテントレバー15のPレンジ保持凹部24の側壁に突き当てられる。
【0216】
Pレンジ側突き当て制御中は、図40のステップ721で、突き当て制御時間カウンタCTgをカウントアップして、Pレンジ側突き当て制御の実行時間を計測する。そして、次のステップ722で、Pレンジ側突き当て制御の実行時間CTgが許容最大学習時間Kg(例えば500ms)を越えたか否かを判定する。Pレンジ側突き当て制御が正常に実行されれば、許容最大学習時間Kgよりも短い時間でディテントバネ23の係合部23aがディテントレバー15のPレンジ保持凹部24の側壁に突き当たった状態になって、Pレンジ側突き当て時のエンコーダカウント値Npの学習(Pレンジ側突き当て制御)が終了する。従って、許容最大学習時間Kgを越えてPレンジ側突き当て制御が終了しない場合は、SRモータ12の故障やエンコーダ46の故障等、何等かのシステム異常が発生しているものと思われるため、このような場合は、Pレンジ側突き当て制御を強制的に終了させるために、ステップ723に進み、Pレンジ側突き当て制御中フラグXexp=OFF、Pレンジ側突き当て完了フラグXp=OFF、停止時間カウンタCTstop=0、mode3時間カウンタCT3p=0、mode0時間カウンタCT0p=0、突き当て制御時間カウンタCTg=0にセットして、本ルーチンを終了する。
【0217】
これに対して、Pレンジ側突き当て制御の実行時間CTgが許容最大学習時間Kgを越えていない場合は、ステップ724に進み、出力軸センサ14のPレンジ出力学習値Vpを次式により更新する。
Vp(i) =Vp(i−1) +{Vnsw−Vp(i−1) }/Rnsw
ここで、Vp(i) は今回のPレンジ出力学習値、Vp(i−1) は前回のPレンジ出力学習値、Vnswは今回の出力軸センサ14の出力、Rnswはなまし係数である。
【0218】
そして、次のステップ725で、Pレンジ側突き当て時のエンコーダカウント値の学習値(以下「Pレンジ側突き当て学習値」という)GNpを次式により更新する。
GNp(i) =min{GNp(i−1) ,Ncnt}
【0219】
ここで、GNp(i) は今回のPレンジ側突き当て学習値、GNp(i−1) は前回のPレンジ側突き当て学習値、Ncntは今回のエンコーダカウント値である。また、関数minはGNp(i−1) とNcntを比較して小さい方を選択する関数である。尚、エンコーダカウント値Ncntは、前記図8及び図9の初期駆動ルーチンで学習された初期位置ずれ学習値Gcntにより補正された値を用いる。
【0220】
この後、ステップ726に進み、今回のPレンジ側突き当て学習値GNp(i) と前回のPレンジ側突き当て学習値GNp(i−1) が同じであるか否かで、ディテントバネ23の係合部23aがディテントレバー15のPレンジ保持凹部24の側壁に突き当たった状態になったか否かを判定する。
【0221】
図41に示すように、ディテントバネ23の係合部23aがディテントレバー15のPレンジ保持凹部24の側壁に突き当たった状態になるまでは、ロータ32が回転してエンコーダカウント値Ncntが徐々に減少していくため、今回のPレンジ側突き当て学習値GNp(i) が前回の学習値GNp(i−1) よりも小さくなる。その後、ディテントバネ23の係合部23aがディテントレバー15のPレンジ保持凹部24の側壁に突き当たった状態になると、ロータ32の回転が停止して、エンコーダカウント値Ncntが変化しなくなるか、又は、振動するが、学習値GNp(i) は更新されなくなるため、今回のPレンジ側突き当て学習値GNp(i) と前回のPレンジ側突き当て学習値GNp(i−1) が同じであるか、又は、今回のPレンジ側突き当て学習値GNp(i) の方が大きくなる。
【0222】
図40のステップ726で、「No」と判定された場合は、ディテントバネ23の係合部23aがディテントレバー15のPレンジ保持凹部24の側壁に突き当たった状態になっていないため、ステップ727に進み、停止時間カウンタCTstopをリセットする。
【0223】
これに対して、ステップ726で、「Yes」と判定された場合は、ディテントバネ23の係合部23aがディテントレバー15のPレンジ保持凹部24の側壁に突き当たった可能性があると判断して、ステップ728に進み、この突き当て状態の時間をカウントする停止時間カウンタCTstopをカウントアップする。
【0224】
この後、ステップ729に進み、停止時間カウンタCTstopの値が所定時間Kstop(例えば60ms)を越えるまで、Pレンジ側突き当て制御を継続する。そして、突き当て状態が所定時間Kstop以上続いた時点で、突き当て状態になっていることが確認できたと判断して、ステップ730に進み、Pレンジ側突き当て制御を終了するために、Pレンジ側突き当て制御中フラグXexp=OFF、Pレンジ側突き当て完了フラグXp=ON、Pレンジ側突き当て時のエンコーダカウント値Np=GNp+ΔNover(ΔNoverは乗り上げ補正量)、停止時間カウンタCTstop=0、mode3時間カウンタCT3p=0、mode0時間カウンタCT0p=0にセットして、本ルーチンを終了する。
【0225】
乗り上げ補正量ΔNoverは、突き当て制御実行時にディテントバネ23の係合部23aがディテントレバー15の各保持凹部24,25の側壁に突き当たった状態で該係合部23aが保持凹部24,25の側壁を僅かに乗り上げる角度に相当する。この乗り上げ補正量ΔNoverは、SRモータ12の電源電圧であるバッテリ電圧に応じて図37のテーブルにより設定される。
【0226】
突き当て制御実行時に、ディテントバネ23の係合部23aがディテントレバー15の各保持凹部24,25の側壁を乗り上げる角度(乗り上げ補正量ΔNover)は、SRモータ12のトルクが大きくなるほど大きくなる。一般に、SRモータ12のトルクは、その電源電圧(バッテリ電圧)によって変化するため、電源電圧(バッテリ電圧)とSRモータ12のトルクとの間には相関関係があり、電源電圧(バッテリ電圧)をSRモータ12のトルクの代用情報として用いることができる。従って、突き当て制御実行時に、ディテントバネ23の係合部23aがディテントレバー15の各保持凹部24,25の側壁を乗り上げる角度(乗り上げ補正量ΔNover)を、SRモータ12のトルクの代用情報である電源電圧(バッテリ電圧)に基づいて図37のテーブルにより算出し、その乗り上げ補正量ΔNoverだけロータ32の可動範囲の実測値ΔNactを補正するようにすれば、可動範囲の実測値を精度良く求めることができる。
【0227】
尚、ディテントレバー15の各保持凹部24,25の側壁の形状をディテントバネ23の係合部23aが乗り上げないように形成すれば、乗り上げ補正量ΔNoverは必要なくなり、ΔNact=Nnp−Npとなる。
【0228】
[NotPレンジ側突き当て制御]
図42及び図43に示すNotPレンジ側突き当て制御ルーチンは、指令シフトレンジがNotPレンジのときに図36の遊び量学習ルーチンのステップ703で実行されるサブルーチンである。本ルーチンが起動されると、まずステップ741で、NotPレンジ側突き当て完了フラグXnp=ON(NotPレンジ側突き当て制御終了後)であるか否かを判定し、既にNotPレンジ側突き当て制御が終了していれば、以降の処理を行うことなく、本ルーチンを終了する。これにより、NotPレンジ側突き当て制御は、イグニッションスイッチのオン期間中に1回のみ行われる。
【0229】
一方、上記ステップ741で、NotPレンジ側突き当て完了フラグXnp=OFF(NotPレンジ側突き当て制御終了前)であると判定されれば、ステップ742に進み、制御モード判定値modeが0(通電オフ)、3(目標位置停止保持処理)に該当するか否かを判定する。本ルーチンでは、ロータ32がNotPレンジで停止しているときにNotPレンジ側突き当て制御を行うようにするために、制御モード判定値mode=0又は3でNotPレンジ側突き当て制御を行うようにしている。
【0230】
制御モード判定値mode=0(通電オフ)の場合は、ステップ743に進み、NotPレンジでmode=0になっている時間をカウントするmode0時間カウンタCT0npをカウントアップする。また、制御モード判定値mode=3(目標位置停止保持処理)の場合は、ステップ744に進み、NotPレンジでmode=3となっている時間をカウントするmode3時間カウンタCT3npをカウントアップする。これら2つの時間カウンタCT0np,CT3npは、NotPレンジでロータ32の振動が収束して停止状態になるまで待機するのに用いられる。
【0231】
尚、制御モード判定値mode=1(通常駆動)、4(反転位置停止保持処理)、5(オープンループ制御)の場合は、ロータ32がNotPレンジで停止していないため、ステップ761に進み、時間カウンタCT0np,CT3npのカウント値をクリアする。
【0232】
そして、ステップ745で、mode0時間カウンタCT0npの値が停止判定値K0npを越えたか否か、又は、mode3時間カウンタCT3npの値が停止判定値K3npを越えたか否か判定する。ここで、停止判定値K0npは、NotPレンジで制御モード判定値mode=0(通電オフ)のときにロータ32の振動が収束するのに必要な時間に相当し、停止判定値K3npは、NotPレンジで制御モード判定値mode=3(目標位置停止保持処理)のときにロータ32の振動が収束するのに必要な時間に相当する。
【0233】
上記ステップ745で、「No」と判定されれば、ロータ32の振動が収束していないと判断して、ステップ746に進み、NotPレンジ側突き当て制御中フラグXexnp=OFFにセットする。この場合は、まだ、NotPレンジ側突き当て制御が実行されない。
【0234】
一方、上記ステップ745で、「Yes」と判定されれば、NotPレンジでロータ32の振動が収束したと判断して、ステップ747に進み、NotPレンジ側突き当て制御中フラグXexnp=ONにセットする。
【0235】
この後、ステップ748に進み、NotPレンジ側突き当て制御中フラグXexnp=ONであるか否かを判定し、Xexnp=OFFであれば、ステップ749に進み、突き当て目標カウント値Ag=0、停止時間カウンタCTstop=0、突き当て制御時間カウンタCTg=0にセットして、本ルーチンを終了する。
【0236】
これに対して、NotPレンジ側突き当て制御中フラグXexnp=ONの場合は、ステップ750に進み、突き当て目標カウント値Agを所定値Kgnpに設定する。この突き当て目標カウント値Ag(Kgnp)は、NotPレンジ側突き当て制御によってディテントバネ23の係合部23aをディテントレバー15のNotPレンジ保持凹部25の側壁に確実に突き当てることができるように設定される。
【0237】
NotPレンジ側突き当て制御中フラグXexnp=ONの場合は、後述する図45の目標カウント値設定ルーチンによって目標カウント値Acntが突き当て目標カウント値Ag(Kgnp)にセットされるため、NotPレンジ側突き当て制御が実行され、ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25の側壁に突き当てられる。
【0238】
NotPレンジ側突き当て制御中は、図43のステップ751で、突き当て制御時間カウンタCTgをカウントアップして、NotPレンジ側突き当て制御の実行時間を計測する。そして、次のステップ752で、NotPレンジ側突き当て制御の実行時間CTgが許容最大学習時間Kg(例えば500ms)を越えたか否かを判定する。NotPレンジ側突き当て制御が正常に実行されれば、許容最大学習時間Kgよりも短い時間でディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25の側壁に突き当たった状態になって、NotPレンジ側突き当て時のエンコーダカウント値Nnpの学習(NotPレンジ側突き当て制御)が終了する。従って、許容最大学習時間Kgを越えてNotPレンジ側突き当て制御が終了しない場合は、SRモータ12の故障やエンコーダ46の故障等、何等かのシステム異常が発生しているものと思われるため、このような場合は、NotPレンジ側突き当て制御を強制的に終了させるために、ステップ753に進み、NotPレンジ側突き当て制御中フラグXexnp=OFF、NotPレンジ側突き当て完了フラグXnp=OFF、停止時間カウンタCTstop=0、mode3時間カウンタCT3np=0、mode0時間カウンタCT0np=0、突き当て制御時間カウンタCTg=0にセットして、本ルーチンを終了する。
【0239】
これに対して、NotPレンジ側突き当て制御の実行時間CTgが許容最大学習時間Kgを越えていない場合は、ステップ754に進み、出力軸センサ14のNotPレンジ出力学習値Vnpを次式により更新する。
Vnp(i) =Vnp(i−1) +{Vnsw−Vnp(i−1) }/Rnsw
ここで、Vnp(i) は今回のNotPレンジ出力学習値、Vnp(i−1) は前回のNotPレンジ出力学習値、Vnswは今回の出力軸センサ14の出力、Rnswはなまし係数である。
【0240】
そして、次のステップ755で、NotPレンジ側突き当て時のエンコーダカウント値の学習値(以下「NotPレンジ側突き当て学習値」という)GNnpを次式により更新する。
GNnp(i) =max{GNnp(i−1) ,Ncnt}
【0241】
ここで、GNnp(i) は今回のNotPレンジ側突き当て学習値、GNnp(i−1) は前回のNotPレンジ側突き当て学習値、Ncntは今回のエンコーダカウント値である。また、関数maxはGNnp(i−1) とNcntを比較して大きい方を選択する関数である。尚、エンコーダカウント値Ncntは、前記図8及び図9の初期駆動ルーチンで学習された初期位置ずれ学習値Gcntによって補正された値を用いる。
【0242】
この後、ステップ756に進み、今回のNotPレンジ側突き当て学習値GNnp(i) と前回のNotPレンジ側突き当て学習値GNnp(i−1) が同じであるか否かで、ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25の側壁に突き当たった状態になったか否かを判定する。
【0243】
NotPレンジ突き当て制御中に、ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25の側壁に突き当たった状態になるまでは、ロータ32が回転してエンコーダカウント値Ncntが徐々に増加していくため、今回のNotPレンジ側突き当て学習値GNnp(i) が前回の学習値GNnp(i−1) よりも大きくなる。その後、ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25の側壁に突き当たった状態になると、ロータ32の回転が停止して、エンコーダカウント値Ncntが変化しなくなるか、又は、振動するが、学習値GNnp(i) は更新されなくなるため、今回のNotPレンジ側突き当て学習値GNnp(i) と前回のNotPレンジ側突き当て学習値GNnp(i−1) が同じであるか、又は、今回のNotPレンジ側突き当て学習値GNnp(i) の方が大きくなる。
【0244】
図43のステップ756で、「No」と判定された場合は、ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25の側壁に突き当たった状態になっていないため、ステップ757に進み、停止時間カウンタCTstopをリセットする。
【0245】
これに対し、ステップ756で、「Yes」と判定された場合は、ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25の側壁に突き当たった可能性があると判断して、ステップ758に進み、この突き当て状態の時間をカウントする停止時間カウンタCTstopをカウントアップする。
【0246】
この後、ステップ759に進み、停止時間カウンタCTstopの値が所定時間Kstop(例えば60ms)を越えるまで、NotPレンジ側突き当て制御を継続する。そして、突き当て状態が所定時間Kstop以上続いた時点で、突き当て状態になっていることが確認できたと判断して、ステップ760に進み、NotPレンジ側突き当て制御を終了するために、NotPレンジ側突き当て制御中フラグXexnp=OFF、NotPレンジ側突き当て完了フラグXnp=ON、NotPレンジ側突き当て時のエンコーダカウント値Nnp=GNnp−ΔNover(ΔNoverは乗り上げ補正量)、停止時間カウンタCTstop=0、mode3時間カウンタCT3np=0、mode0時間カウンタCT0np=0にセットして、本ルーチンを終了する。
【0247】
図44は、Pレンジ側突き当て制御とNotPレンジ側突き当て制御の実行タイミングの一例を示すタイムチャートである。図44の例では、イグニッションスイッチのオン操作後(電源投入後)、暫くして、指令シフトレンジがPレンジからNotPレンジに切り換えられると、目標カウント値AcntがNotPレンジの暫定的な目標カウント値(例えば18°)に設定される。この暫定的な目標カウント値Acnt(18°)は、ディテントバネ23の係合部23aがディテントレバー15の両保持凹部24,25間の山部を確実に乗り越える回転角度に相当する。従って、F/B制御により暫定的な目標カウント値Acnt(18°)までロータ32を回転させた後は、ディテントバネ23の弾性力によってディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25の傾斜側壁に沿って底部に落ち込む力を利用して、ロータ32をNotPレンジの目標位置(NotPレンジ保持凹部25の底部)まで回転させる。
【0248】
この後、NotPレンジ側突き当て制御中フラグXexnp=ONにセットされた時点で、目標カウント値AcntがNotPレンジ側の突き当て目標カウント値Ag(Kgnp)にセットされ、NotPレンジ側突き当て制御が実行される。これにより、ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25の側壁に突き当たったときに、エンコーダカウント値Nnp(GNnp)が学習される。この学習終了後、NotPレンジ側突き当て制御中フラグXexnp=OFFにセットされ、NotPレンジ側突き当て制御が終了する。
【0249】
その後、指令シフトレンジがNotPレンジからPレンジに切り換えられると、目標カウント値AcntがPレンジの暫定的な目標カウント値(例えば0°)に設定される。これにより、F/B制御により暫定的な目標カウント値Acnt(0°)までロータ32を回転させた後は、ディテントバネ23の弾性力によってディテントバネ23の係合部23aがディテントレバー15のPレンジ保持凹部24の傾斜側壁に沿って底部に落ち込む力を利用して、ロータ32をPレンジの目標位置(Pレンジ保持凹部24の底部)まで回転させる。
【0250】
この後、Pレンジ側突き当て制御中フラグXexp=ONにセットされた時点で、目標カウント値AcntがPレンジ側の突き当て目標カウント値Ag(Kgp)にセットされ、Pレンジ側突き当て制御が実行される。これにより、ディテントバネ23の係合部23aがディテントレバー15のPレンジ保持凹部24の側壁に突き当たったときに、エンコーダカウント値Np(GNp)が学習される。この学習終了後、Pレンジ側突き当て制御中フラグXexp=OFFにセットされ、Pレンジ側突き当て制御が終了する。
【0251】
[目標カウント値設定]
図45及び図46に示す目標カウント値設定ルーチンは、初期駆動終了後に所定周期(例えば8ms周期)で実行される。本ルーチンが起動されると、まずステップ771で、突き当て制御実行中(Pレンジ側突き当て制御中フラグXexp=ON又はNotPレンジ側突き当て制御中フラグXexnp=ON)であるか否かを判定し、突き当て制御実行中であれば、ステップ772に進み、目標カウント値Acntを突き当て目標カウント値Agに設定する。この突き当て目標カウント値Agは、図39のステップ720又は図42のステップ750で設定される。
【0252】
一方、突き当て制御実行中でなければ、ステップ773に進み、指令シフトレンジがPレンジであるか否かを判定し、Pレンジであれば、ステップ774に進み、Pレンジ側突き当て制御を完了したか否か(Pレンジ側突き当て完了フラグXp=ONであるか否か)を判定し、Pレンジ側突き当て制御が完了していれば、ステップ775に進み、Pレンジの目標カウント値Acntを次式により算出する。
Acnt=Np+ΔGp
【0253】
ここで、NpはPレンジ側突き当て時のエンコーダカウント値であり、図39及び図40のPレンジ側突き当て制御ルーチンによって学習した値GNpが用いられる。また、ΔGpはPレンジ側の遊び量の学習値であり、図36の遊び量学習ルーチンのステップ706で、今回の遊び量の学習値ΔGpが算出されてECU41の不揮発性メモリの記憶値が更新されるまでは、該不揮発性メモリに記憶されている前回値が用いられる。
【0254】
一方、Pレンジ側突き当て制御が完了していない場合は、ステップ774で「No」と判定されて、ステップ776に進み、NotPレンジ側突き当て制御を完了したか否か(NotPレンジ側突き当て完了フラグXnp=ONであるか否か)を判定し、NotPレンジ側突き当て制御が完了していれば、ステップ777に進み、Pレンジの目標カウント値Acntを次式により算出する。
Acnt=Nnp−ΔNact+ΔGp
【0255】
ここで、Nnpは、NotPレンジ側突き当て時のエンコーダカウント値で、図42及び図43のNotPレンジ側突き当て制御ルーチンによって学習した値GNnpが用いられる。また、ΔNactは可動範囲の実測値であり、図36の遊び量学習ルーチンのステップ705で、今回の可動範囲の実測値ΔNactが算出されてECU41の不揮発性メモリの記憶値が更新されるまでは、該不揮発性メモリに記憶されている前回値が用いられる。
【0256】
尚、Pレンジ側とNotPレンジ側の突き当て制御が両方とも完了していない場合(Pレンジ側・NotPレンジ側の両突き当て完了フラグXp,Xnpが両方ともOFFの場合)は、Pレンジ側突き当て時及びNotPレンジ側突き当て時のエンコーダカウント値Np,Nnpが学習されていないため、遊び量ΔGp,ΔGnpによる目標カウント値Acntの補正を行うことができない。従って、この場合は、ステップ778に進み、Pレンジの目標カウント値AcntをPレンジの暫定的な目標カウント値である0に設定する。
【0257】
一方、上記ステップ773で、指令シフトレンジがNotPレンジと判定された場合は、図46のステップ779に進み、NotPレンジ側突き当て制御を完了したか否か(NotPレンジ側突き当て完了フラグXnp=ONであるか否か)を判定し、NotPレンジ側突き当て制御が完了していれば、ステップ780に進み、NotPレンジの目標カウント値Acntを次式により算出する。
Acnt=Nnp−ΔGnp
【0258】
ここで、ΔGnpはNotPレンジ側の遊び量の学習値であり、図36の遊び量学習ルーチンのステップ706で、今回の遊び量の学習値ΔGnpが算出されてECU41の不揮発性メモリの記憶値が更新されるまでは、該不揮発性メモリに記憶されている前回値が用いられる。
【0259】
一方、NotPレンジ側突き当て制御が完了していない場合は、ステップ779で「No」と判定されて、ステップ781に進み、Pレンジ側突き当て制御を完了したか否か(Pレンジ側突き当て完了フラグXp=ONであるか否か)を判定し、Pレンジ側突き当て制御が完了していれば、ステップ782に進み、NotPレンジの目標カウント値Acntを次式により算出する。
Acnt=Np+ΔNact−ΔGnp
【0260】
尚、Pレンジ側とNotPレンジ側の突き当て制御が両方とも完了していない場合(Pレンジ側・NotPレンジ側の両突き当て完了フラグXp,Xnpが両方ともOFFの場合)は、ステップ783に進み、NotPレンジの目標カウント値AcntをNotPレンジの暫定的な目標カウント値Knotp(例えば、18.5°)に設定する。
【0261】
尚、本ルーチンでは、目標カウント値Acntを設定する際に、遊び量の学習値ΔGp,ΔGnpと可動範囲の実測値ΔNactについては、ECU41の不揮発性メモリの記憶値が更新されるまでは、該不揮発性メモリに記憶されている前回値を用いるようにしたが、該不揮発性メモリの記憶値が更新されるまで、暫定的な目標カウント値(0又はKnotp)に設定するようにしても良い。
【0262】
[リカバリ処理]
図51に示すリカバリ処理ルーチンは、所定周期(例えば1ms周期)で起動され、F/B制御状態が異常になったときにリカバリ処理を次のようにして実行する。本ルーチンが起動されると、まずステップ801で、リカバリ処理実行フラグXrcvがOFFであるか否かを判定し、Xrcv=OFF(リカバリ処理実行中でない)の場合は、ステップ802に進み、次の▲1▼〜▲4▼のリカバリ処理実行条件が成立しているか否かを判定する。
【0263】
▲1▼エンコーダ46のA相信号、B相信号、出力軸センサ14の出力信号が全て正常であること
▲2▼後述する図56のシステム異常診断ルーチンでセットされる各異常検出フラグXfnsw、Xfcnt、Xfrcvが全てOFF(異常なし)であること
▲3▼F/B許可フラグXfbがON(F/B制御中)であること
▲4▼後述する図53のAB相信号異常検出ルーチンでセットされるA相信号、B相信号に関する3つの異常検出フラグXfab、Xfta、XftbのいずれかがON(異常あり)であること、又は、後述する図55の逆転判定ルーチンでセットされる逆転検出フラグXrがON(逆転あり)であること
【0264】
これら4つの条件▲1▼〜▲4▼のうち、1つでも満たさない条件があれば、リカバリ処理実行条件が不成立となり、以降の処理を行うことなく、本ルーチンを終了する。
【0265】
これに対し、上記▲1▼〜▲4▼の条件を全て満たせば、リカバリ処理実行条件が成立し、ステップ802からステップ803に進み、リカバリ処理実行フラグXrcvをONにセットし、次のステップ804で、図52に示す関係に基づいて、現在の出力軸センサ14の出力信号Vnswを用いて現在の位置カウント値Ncntopを次式により算出する。

Figure 2004048837
【0266】
ここで、INTは[ ]内の数値を整数化する関数であり、Vpは出力軸センサ14のPレンジ出力学習値、Vnpは出力軸センサ14のNotPレンジ出力学習値、Kopはディテントレバー15の最大回転角、KofpはPレンジ側のオフセット値である。上式は、位置カウント値Ncntopを2の倍数とするように設定されている。
【0267】
ディテントレバー15の最大回転角Kopは、ディテントレバー15のPレンジ保持凹部24の側壁からNotPレンジ保持凹部25の側壁までのディテントレバー15の回転角であり、図38に示す関係に基づいて、可動範囲の設計値ΔNdとPレンジ側の遊び量ΔGpとを加算して求められる。本実施形態では、ΔNd=20.5(deg)、ΔGp=3(deg)となっている。
Figure 2004048837
【0268】
上記位置カウント値Ncntopの算出式において、Kop×61/3.75はディテントレバー15の最大回転角Kopをモータ駆動ステップ数(励磁回数)に換算した値である。「61」は減速機構26の減速比であり、「3.75」は1ステップ(励磁1回当たり)のロータ32の回転角である。この位置カウント値Ncntopは、オープンループ制御開始時の位置カウント値Ncntopの初期値として用いられる。
【0269】
位置カウント値Ncntopの算出後、ステップ805に進み、リカバリ処理の実行回数をカウントするリカバリ処理実行回数カウンタCrcvをカウントアップし、次のステップ806で、オープンループ制御実行フラグXopenをONにセットして、後述する図60のオープンループ制御ルーチンによりオープンループ制御を実行する。
【0270】
リカバリ処理(オープンループ制御)の実行中は、本ルーチンが起動される毎に、ステップ801で「No」と判定されて、ステップ807に進み、オープンループ制御完了フラグXopcmpがオープンループ制御完了を意味するONにセットされているか否かを判定し、Xopcmp=OFFであれば、そのまま本ルーチンを終了し、オープンループ制御を継続する。
【0271】
その後、オープンループ制御が完了した時点で、ステップ808に進み、初期駆動を再実行するために、初期駆動終了フラグXend=OFF(初期駆動未終了)、レンジ切換操作フラグXchg=OFF(レンジ切換操作なし)、通電時間カウンタCT=0、励磁回数カウンタCASE=0、エンコーダカウント値Ncnt=0、初期位置ずれ学習値Gcnt=0にセットする。更に、ステップ809で、突き当て制御を再実行するために、Pレンジ側突き当て完了フラグXp=OFF(Pレンジ側突き当て制御未終了)、NotPレンジ側突き当て完了フラグXnp=OFF(NotPレンジ側突き当て制御未終了)にセットする。そして、次のステップ810で、制御モード判定値mode=初期値「$FF」にセットした後、ステップ811に進み、オープンループ制御実行フラグXopen=OFFにセットしてオープンループ制御(リカバリ処理)を終了する。更に、次のステップ812で、リカバリ処理実行フラグXrcv=OFF、A相信号、B相信号の異常検出フラグXfab=OFF、Xfta=OFF、Xftb=OFF、後述する第3の異常検出フラグXfrcv=OFFにセットする。
【0272】
[AB相信号異常検出]
図53に示すAB相信号異常検出ルーチンは、所定周期(例えば1ms周期)で起動され、エンコーダ46のA相信号とB相信号の異常の有無を次のようにして判定する。本ルーチンが起動されると、まずステップ821で、F/B許可フラグXfb=ON、且つ、Pレンジ側突き当て制御中フラグXexp=OFF、且つ、NotPレンジ側突き当て制御中フラグXexnp=OFFであるか否か、つまり、現在、F/B制御中で、且つ突き当て制御を実行していない状態であるか否かを判定する。このステップ821で「No」と判定された場合、つまり、F/B許可フラグXfb=OFF、又は、Pレンジ側突き当て制御中フラグXexp=ON、又は、NotPレンジ側突き当て制御中フラグXexnp=ONの場合は、ステップ822に進み、A相信号カウンタNa=0、B相信号カウンタNb=0、A相信号エッジ間隔カウンタΔTa=0、B相信号エッジ間隔カウンタΔTb=0にリセットして本ルーチンを終了する。
【0273】
これに対して、ステップ821で「Yes」と判定された場合は、AB相信号異常判定実行条件が成立して、ステップ823に進み、A相信号カウント値NaとB相信号カウント値Nbとの偏差ΔNabを算出する。
ΔNab=|Na−Nb|
ここで、A相信号カウント値NaとB相信号カウント値Nbは、A相信号のエッジとB相信号のエッジを別々にカウントした値である。
【0274】
そして、次のステップ824で、AB相信号カウント値偏差ΔNabを異常判定値Kab(例えば3)と比較し、もし、AB相信号カウント値偏差ΔNabが異常判定値Kab以上であれば、A相信号カウント値NaとB相信号カウント値Nbのいずれかが異常であると判断して、ステップ825に進み、AB相信号異常検出フラグXfabをON(異常あり)にセットして、次のステップ826に進む。
【0275】
一方、AB相信号カウント値偏差ΔNabが異常判定値Kab未満の場合は、AB相信号異常検出フラグXfabをOFF(異常なし)に維持してステップ826に進む。
【0276】
F/B制御中にA相信号とB相信号が正常に出力されていれば、A相信号カウント値NaとB相信号カウント値Nbとの偏差ΔNabが0又は1となるため、このAB相信号カウント値偏差ΔNabが2以上になれば、いずれか一方の信号の抜けやノイズパルスの混入が考えられる(図48参照)。従って、AB相信号カウント値偏差ΔNabが異常判定値Kab以上であるか否かで、A相信号とB相信号の異常の有無を判定することができる。本実施形態では、異常判定値Kabを余裕を見て3に設定したが、2又は4以上の値に設定しても良い。
【0277】
以上のようにして、AB相信号カウント値偏差ΔNabによる異常判定処理を行った後、ステップ826に進み、A相信号のエッジ間隔ΔTaとB相信号のエッジ間隔ΔTbをカウントするカウンタをそれぞれカウントアップした後、ステップ827に進み、A相信号エッジ間隔ΔTaを異常判定値Kta(例えばΔTaの平均値の10倍の値)と比較し、もし、A相信号エッジ間隔ΔTaが異常判定値Kta以上であれば、A相信号が異常であると判断して、ステップ828に進み、A相信号異常検出フラグXftaをON(異常あり)にセットして、次のステップ829に進む。
【0278】
一方、A相信号エッジ間隔ΔTaが異常判定値Kta未満の場合は、A相信号異常検出フラグXftaをOFF(異常なし)に維持してステップ829に進む。そして、このステップ829で、B相信号エッジ間隔ΔTbを異常判定値Ktb(例えばΔTbの平均値の10倍の値)と比較し、もし、B相信号エッジ間隔ΔTbが異常判定値Ktb以上であれば、B相信号が異常であると判断して、ステップ830に進み、B相信号異常検出フラグXftbをON(異常あり)にセットして本ルーチンを終了する。
【0279】
一方、B相信号エッジ間隔ΔTbが異常判定値Ktb未満の場合は、B相信号異常検出フラグXftbをOFF(異常なし)に維持して、本ルーチンを終了する。
【0280】
各信号のエッジ間隔ΔTa,ΔTbは、ロータ回転速度に応じて変化するため、F/B制御中に、各信号のエッジ間隔ΔTa,ΔTbが長くなり過ぎる場合は、ロータ32の異常停止、異常速度低下、パルス抜けが考えられるため(図48参照)、各信号のエッジ間隔ΔTa,ΔTbが異常判定値Kta,Kta(例えばΔTa,ΔTbの平均値の10倍)以上であるか否かで、A相信号とB相信号の異常の有無を判定することができる。
【0281】
尚、各信号のエッジ間隔ΔTa,ΔTbが短くなり過ぎる場合は、ノイズパルスが正規のパルス信号と誤認されている可能性があるため、各信号のエッジ間隔ΔTa,ΔTbが所定の異常判定値以下であるか否かで、A相信号とB相信号の異常の有無を判定するようにしても良い。
【0282】
また、AB相信号カウント値偏差ΔNabによる異常判定処理(ステップ823〜825)と各信号のエッジ間隔ΔTa,ΔTbによる異常判定処理(ステップ826〜830)のいずれか一方の処理のみを行い、他方の処理を省略するようにしても良い。
以上説明したAB相信号異常検出ルーチンは、特許請求の範囲でいう異常監視手段としての役割を果たす。
【0283】
[逆転カウンタ]
図54に示す逆転カウンタルーチンは、AB相割り込み処理により実行され、ロータ32の回転方向が回転方向指示に反して連続して逆転した回数を次のようにしてカウントする。本ルーチンが起動されると、まずステップ831で、回転方向指示値Dが1(Pレンジ→NotPレンジの回転方向)、0(停止)、−1(NotPレンジ→Pレンジの回転方向)のいずれに該当するかを判定し、回転方向指示値Dが0(停止)であれば、以降の処理を行うことなく、本ルーチンを終了する。
【0284】
一方、回転方向指示値Dが1(Pレンジ→NotPレンジの回転方向)であれば、ステップ832に進み、前回のエンコーダカウント値Ncnt(i−1) と今回のエンコーダカウント値Ncnt(i) との差が1以上であるか否かで、ロータ32の回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが減少したか否か)を判定し、逆転していれば、ステップ834に進み、逆転回数をカウントする逆転カウンタCrをカウントアップし、逆転していなければ、ステップ835に進み、逆転カウンタCrを0にリセットする。
【0285】
また、回転方向指示値Dが−1(NotPレンジ→Pレンジの回転方向)であれば、ステップ833に進み、前回のエンコーダカウント値Ncnt(i−1) と今回のエンコーダカウント値Ncnt(i) との差が−1以下であるか否かで、ロータ32の回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが増加したか否か)を判定し、逆転していれば、ステップ836に進み、逆転カウンタCrをカウントアップし、逆転していなければ、ステップ835に進み、逆転カウンタCrを0にリセットする。
【0286】
[逆転判定]
図55に示す逆転判定ルーチンは、所定周期(例えば1ms周期)で起動され、図54の逆転カウンタルーチンと共に特許請求の範囲でいう異常監視手段としての役割を果たす。
【0287】
本ルーチンが起動されると、まずステップ841で、F/B許可フラグXfb=ON、且つ、Pレンジ側突き当て制御中フラグXexp=OFF、且つ、NotPレンジ側突き当て制御中フラグXexnp=OFFであるか否か、つまり、現在、F/B制御中で、且つ突き当て制御を実行していない状態であるか否かを判定する。このステップ841で「No」と判定された場合、つまり、F/B許可フラグXfb=OFF、又は、Pレンジ側突き当て制御中フラグXexp=ON、又は、NotPレンジ側突き当て制御中フラグXexnp=ONの場合は、ステップ844に進み、逆転検出フラグXrをOFFにセットして、本ルーチンを終了する。
【0288】
これに対して、ステップ841で「Yes」と判定された場合は、逆転判定実行条件が成立して、ステップ842に進み、図54の逆転カウンタルーチンで求めた逆転カウント値Crが異常判定値Kr(例えば4)以上であるか否かで、ロータ32が回転方向指示に反して逆転し続けているか否かを判定し、逆転カウント値Crが異常判定値Kr以上であれば、ステップ843に進み、逆転検出フラグXrをONにセットして逆転の判定を確定し、逆転カウント値Crが異常判定値Kr未満であれば、ステップ844に進み、逆転検出フラグXrをOFFに維持する。
【0289】
[システム異常診断]
図56に示すシステム異常診断ルーチンは、所定周期(例えば8ms周期)で起動され、次のようにしてシステム全体の異常診断を実行する。本ルーチンが起動されると、まずステップ851で、次の▲1▼〜▲3▼の異常診断実行条件が成立しているか否かを判定する。
【0290】
▲1▼イグニッションスイッチ(図示せず)の操作によりECU41に電源が投入された後、所定時間(例えば1s)が経過していること
▲2▼突き当て制御中でないこと(Pレンジ側突き当て制御中フラグXexp=OFF、且つ、NotPレンジ側突き当て制御中フラグXexnp=OFFであること)
▲3▼リカバリ処理実行中でないこと(リカバリ処理実行フラグXrcv=OFFであること)
これら3つの条件▲1▼〜▲3▼のうち、1つでも満たさない条件があれば、異常診断実行条件が不成立となり、ステップ852に進み、後述する仮異常状態継続時間カウンタCfnsw、Cfcntを0にリセットして、本ルーチンを終了する。
【0291】
これに対し、上記▲1▼〜▲3▼の条件を全て満たせば、異常診断実行条件が成立し、ステップ851からステップ853に進み、突き当て制御が完了しているか否か(Pレンジ側突き当て完了フラグXp=ON、且つ、NotPレンジ側突き当て完了フラグXnp=ONであるか否か)を判定する。その結果、突き当て制御が完了していると判定されれば、ステップ854に進み、出力軸センサ14が正常で、且つ、指令シフトレンジと、出力軸センサ14の出力信号Vnswから判定したレンジとが一致しているか否かを判定し、その判定結果が「Yes」であれば、ステップ856に進み、第1の仮異常状態継続時間カウンタCfnswを0にリセットする。
【0292】
これに対し、上記ステップ854の判定結果が「No」であれば、ステップ855に進み、第1の仮異常状態継続時間カウンタCfnswをカウントアップして、指令シフトレンジと出力軸センサ14の出力信号Vnswとが一致していない状態の継続時間を計測し、次のステップ857で、第1の仮異常状態継続時間カウンタCfnswの値が異常判定値Kfnswよりも大きいか否かを判定する。ここで、異常判定値Kfnswは、正常なレンジ切換動作に要する最長時間よりも十分に長い時間(例えば10s)に設定されている。従って、第1の仮異常状態継続時間カウンタCfnswの値が異常判定値Kfnswよりも大きければ、レンジ切換動作が正常に行われない状態になっているため、システムの異常ありと判断して、ステップ858に進み、第1の異常検出フラグXfnswをONにセットする。上記ステップ857の判定結果が「No」であれば、第1の異常検出フラグXfnswをOFF(異常なし)に維持する。
【0293】
以上のようにして、出力軸センサ14の出力信号Vnswを用いて1回目の異常診断を行った後、図57のステップ859に進み、エンコーダカウント値Ncntと目標カウント値Acntとの偏差|Ncnt−Acnt|が所定値Kcnt(例えば5°相当値)よりも大きいか否かを判定し、このカウント値偏差|Ncnt−Acnt|が所定値Kcnt以下であれば、ステップ861に進み、第2の仮異常状態継続時間カウンタCfcntを0にリセットする。
【0294】
これに対し、上記ステップ859の判定結果が「Yes」であれば、ステップ860に進み、第2の仮異常状態継続時間カウンタCfcntをカウントアップして、カウント値偏差|Ncnt−Acnt|が所定値Kcntよりも大きい状態の継続時間を計測し、次のステップ862で、第2の仮異常状態継続時間カウンタCfcntの値が異常判定値Kfcntよりも大きいか否かを判定する。ここで、異常判定値Kfcntは、正常なレンジ切換動作に要する最長時間より十分に長い時間(例えば10s)に設定されている。従って、第2の仮異常状態継続時間カウンタCfcntの値が異常判定値Kfcntよりも大きければ、レンジ切換動作が正常に行われない状態になっているため、システムの異常ありと判断して、ステップ863に進み、第2の異常検出フラグXfcntをONにセットする。上記ステップ862の判定結果が「No」であれば、第2の異常検出フラグXfcntをOFF(異常なし)に維持する。
【0295】
以上のようにして、カウント値偏差|Ncnt−Acnt|を用いて2回目の異常診断を行った後、ステップ864に進み、図51のリカバリ処理ルーチンのステップ805でカウントされるリカバリ処理実行回数Crcvが異常判定値Kcrv(例えば3回)以上であるか否かを判定し、リカバリ処理実行回数Crcvが異常判定値Kcrv以上であれば、ステップ865に進み、システムの異常ありと判断して、ステップ865に進み、第3の異常検出フラグXfrcvをONにセットして本ルーチンを終了する。つまり、リカバリ処理が連続して異常判定値Kcrv(例えば3回)以上も繰り返される場合は、F/B制御系が正常に機能しない状態になっているため、システムの異常ありと判断するものである。
【0296】
一方、リカバリ処理実行回数Crcvが異常判定値Kcrv未満であれば、第3の異常検出フラグXfrcvをOFF(異常なし)に維持して本ルーチンを終了する。
【0297】
[フェールセーフ処理]
図58に示すフェールセーフ処理ルーチンは、所定周期(例えば8ms周期)で起動され、次のようにしてフェールセーフ処理を実行する。本ルーチンが起動されると、まずステップ901で、次の▲1▼、▲2▼のフェールセーフ処理実行条件が成立しているか否かを判定する。
【0298】
▲1▼オープンループ制御によるレンジ切り換えが可能な状態であること(システム故障フラグXfailoff=OFFであること)
▲2▼図56のシステム異常診断ルーチンでセットされる3つの異常検出フラグXfnsw、Xfcnt、Xfrcvのうちの少なくとも1つがON(異常あり)であること
これら2つの条件▲1▼、▲2▼のうち、いずれか一方でも満たさない条件があれば、フェールセーフ処理実行条件が不成立となり、以降の処理を行うことなく、本ルーチンを終了する。
【0299】
これに対し、上記2つの条件▲1▼、▲2▼を両方とも満たせば、フェールセーフ処理実行条件が成立し、ステップ901からステップ902に進み、フェールセーフ処理実行フラグXfsopをONにセットし、次のステップ903で、警告ランプを点灯したり、或は、メータパネルの情報表示部等に警告表示して、運転者に警告する。
【0300】
この後、ステップ904に進み、前回のフェールセーフ処理終了後の経過時間を計測するフェールセーフ処理間隔カウンタCfsopの値が所定値Kfsop未満であるか否かを判定する。ここで、所定値Kfsopは、前回のフェールセーフ処理終了後にディテントバネ23の弾性力によってディテントバネ23の係合部23aがディテントレバー15の保持凹部24,25の傾斜側壁に沿ってその底部に滑り落ちるのに要する時間よりもある程度長い時間(例えば500ms)に設定されている。
【0301】
フェールセーフ処理間隔カウンタCfsopの値(前回のフェールセーフ処理終了後の経過時間)が所定値Kfsop未満であれば、ステップ905に進み、フェールセーフ処理間隔カウンタCfsopをカウントアップして前回のフェールセーフ処理終了後の経過時間をカウントする。この後、ステップ906に進み、全相の通電をオフした状態を継続し、次のステップ907で、通電フラグXonを通電オフを意味するOFFにセットして本ルーチンを終了する。これにより、前回のフェールセーフ処理終了後の経過時間が所定値Kfsopを越えるまでは、全相の通電をオフした状態に維持される。
【0302】
その後、フェールセーフ処理間隔カウンタCfsopの値(前回のフェールセーフ処理終了後の経過時間)が所定値Kfsop以上になった時点で、ステップ904からステップ908に進み、オープンループ制御実行フラグXopenがOFFであるか否かを判定し、OFFであれば、ステップ909に進み、レンジ切換操作が行われたか否かを判定する。その結果、レンジ切換操作が行われていないと判定されれば、ステップ910に進み、全相の通電をオフした状態を継続する。
【0303】
これに対して、上記ステップ909で、レンジ切換操作が行われたと判定されれば、ステップ911に進み、前記図51のリカバリ処理ルーチンのステップ804と同じ方法で、現在の出力軸センサ14の出力信号Vnswを用いて現在の位置カウント値Ncntopを算出する。この位置カウント値Ncntopは、オープンループ制御開始時の位置カウント値Ncntopの初期値として用いられる。
【0304】
この後、ステップ912に進み、オープンループ制御実行フラグXopenをONにセットして、後述する図60のオープンループ制御ルーチンによりオープンループ制御を実行し、次のステップ913で、フェールセーフ処理の実行回数をカウントするフェールセーフ処理実行回数カウンタCfsをカウントアップして、本ルーチンを終了する。
【0305】
また、前記ステップ908で、オープンループ制御実行フラグXopenがONであると判定されれば、図59のステップ914に進み、オープンループ制御完了フラグXopcmpがオープンループ制御完了を意味するONにセットされているか否かを判定し、Xopcmp=OFFであれば、以降の処理を行うことなく、本ルーチンを終了する。
【0306】
これに対し、ステップ914で、オープンループ制御完了フラグXopcmpがONにセットされていると判定されれば、ステップ915に進み、指令シフトレンジと、出力軸センサ14の出力信号Vnswから判定したレンジとが一致しているか否かを判定し、その判定結果が「Yes」であれば、ステップ916に進み、フェールセーフ処理実行回数カウンタCfsを0にリセットする。そして、次のステップ918で、オープンループ制御完了フラグXopcmpをOFFにセットすると共に、次のステップ919で、オープンループ制御実行フラグXopenをOFFにセットして、本ルーチンを終了する。
【0307】
また、上記ステップ915で、指令シフトレンジと出力軸センサ14の出力信号Vnswとが一致していないと判定された場合は、ステップ917に進み、フェールセーフ処理実行回数カウンタCfsの値が故障判定値(例えば3回)以上であるか否かを判定し、フェールセーフ処理実行回数カウンタCfsの値が故障判定値未満であれば、まだ故障とは判定せずに、オープンループ制御完了フラグXopcmp=OFF、オープンループ制御実行フラグXopen=OFFにセットして(ステップ918、919)、本ルーチンを終了する。
【0308】
その後、フェールセーフ処理実行回数カウンタCfsの値が故障判定値(例えば3回)以上になれば、その時点で、システムの故障(オープンループ制御でもレンジ切り換えが不可能な状態)と判断して、ステップ917からステップ920に進み、システム故障フラグXfailoffをONにセットし、次のステップ921で、全相の通電をオフして、本ルーチンを終了する。
【0309】
[オープンループ制御]
図60に示すオープンループ制御ルーチンは、所定周期(例えば1ms周期)で起動され、次のようにしてオープンループ制御を実行する。本ルーチンが起動されると、まずステップ931で、オープンループ制御実行フラグXopenがONにセットされているか否かを判定し、Xopen=OFFであれば、以降の処理を行うことなく、本ルーチンを終了する。
【0310】
これに対し、オープンループ制御実行フラグXopenがONにセットされていれば、ステップ931からステップ932に進み、時間を計測する時間カウンタTopをカウントアップし、次のステップ933で、時間カウンタTopの値が現在の通電相の励磁時間tm以上になったか否かを判定し、励磁時間tm未満であれば、以降の処理を行うことなく、本ルーチンを終了する。これにより、ステップ934以降の処理は、励磁時間tm毎に実行される。
【0311】
その後、時間カウンタTopの値が現在の通電相の励磁時間tm以上になった時点で、ステップ933からステップ934に進み、目標カウント値Acntと現在の位置カウント値Ncntopとを比較して、ロータ32の駆動方向を判定する。その結果、現在の位置カウント値Ncntopが目標カウント値Acntよりも小さい場合は、ロータ32の駆動方向がPレンジ側からNotPレンジ側への回転方向(正回転方向)と判断して、ステップ935に進み、通電相判定値Mptnopを1ずつカウントアップし、次のステップ936で、位置カウント値Ncntopを2ずつカウントアップする。これは、1回の励磁でロータ32が2カウント分(3.75°)回転するためである。
【0312】
これに対し、現在の位置カウント値Ncntopが目標カウント値Acntよりも大きい場合は、ロータ32の駆動方向がNotPレンジ側からPレンジ側への回転方向(逆回転方向)と判断して、ステップ937に進み、通電相判定値Mptnopを1ずつカウントダウンし、次のステップ938で、位置カウント値Ncntopを2ずつカウントダウンする。
【0313】
この後、ステップ939に進み、通電相判定値Mptnopを“6”で割り算した時の余りMptnop%6を算出する。ここで、“6”は、オープンループ制御で通電相を一巡させる間の通電相判定値Mptnopの増減量に相当する。
【0314】
Mptnop%6の算出後、ステップ940に進み、図63のテーブルによってMptnop%6に応じて通電相を選択し、その通電相を励磁する。本実施形態では、オープンループ制御中は、1−2相励磁方式で駆動するように通電相を選択し、更に、オープンループ制御を開始するときの最初の励磁が2相通電(WU相通電又はUV相通電又はVW相通電)、つまりMptnop%6=1又は3又は5となるように通電相判定値Mptnopの初期値が設定されている。
【0315】
この後、図61のステップ941に進み、位置偏差devを次式により算出する。
dev=|Acnt−Ncntop|/2
上式から明らかなように、位置偏差devは、目標カウント値Acntと現在の位置カウント値Ncntopとの偏差(絶対値)の1/2である。
【0316】
そして、次のステップ942で、位置偏差devと回転速度パラメータmspdとを比較する。この回転速度パラメータmspdは、位置偏差devに応じて増減されるパラメータであり、この回転速度パラメータmspdに応じて図65のテーブルにより励磁時間tmを設定することで、ロータ32の回転速度、加速、減速を制御する。この場合、目標とする回転速度が高くなるほど、回転速度パラメータmspdが大きくなり、励磁時間tmが短い時間に設定されるようになっている。この回転速度パラメータmspdの初期値は0である。
【0317】
上記ステップ942で、位置偏差devが回転速度パラメータmspdより大きいと判定された場合は、ステップ943に進み、回転速度パラメータmspdを1だけカウントアップし、次のステップ944で、最小回転速度パラメータmspdminを0にセットする。この最小回転速度パラメータmspdminは、回転速度パラメータmspdの最小値を制限するパラメータ(下限ガード値)である。このように、位置偏差devが回転速度パラメータmspdより大きいときに、最小回転速度パラメータmspdminを0にセットすることで、オープンループ制御開始からロータ32が回転し始めるまでの期間に、励磁時間tmを最長時間(50ms)に設定できるようにしている。
【0318】
一方、上記ステップ942で、位置偏差devが回転速度パラメータmspdより小さいと判定された場合は、ステップ945に進み、回転速度パラメータmspdを1だけカウントダウンし、次のステップ946で、最小回転速度パラメータmspdminを4にセットする。これにより、ロータ32の回転が立ち上がった後は、励磁時間tmを例えば5ms以下に制限できるようにしている。
【0319】
また、上記ステップ942で、位置偏差devが回転速度パラメータmspdと一致すると判定された場合は、回転速度パラメータmspdを変化させずに、ステップ947に進み、最小回転速度パラメータmspdminを0にセットする。
【0320】
以上のようにして、回転速度パラメータmspdと最小回転速度パラメータmspdminを設定した後、ステップ948に進み、図64のテーブルを用いてバッテリ電圧(電源電圧)に応じて最大回転速度パラメータmspdmaxを設定する。この最大回転速度パラメータmspdmaxは、回転速度パラメータmspdの最大値を制限するパラメータ(上限ガード値)であり、バッテリ電圧が高くなるほど、最大回転速度パラメータmspdmaxを大きくして、ロータ32の回転速度を速くできるようにしている。
【0321】
そして、次のステップ949で、回転速度パラメータmspdを最小回転速度パラメータmspdminと最大回転速度パラメータmspdmaxとの範囲内に収めるようにガード処理する。例えば、ステップ943又は945で更新した回転速度パラメータmspdが最小回転速度パラメータmspdminよりも小さい場合は、mspd=mspdminとし、また、回転速度パラメータmspdが最大回転速度パラメータmspdmaxよりも大きい場合は、mspd=mspdmaxとし、mspdmin≦mspd≦mspdmaxの場合は、その回転速度パラメータmspdをそのまま用いる。
【0322】
この後、ステップ950に進み、図65のテーブルを用いて、回転速度パラメータmspdに応じて励磁時間tmを設定する。図65の例では、回転速度パラメータmspdが0〜3までの範囲では、励磁時間tmを最長時間(例えば50ms)に設定し、起動時にロータ32の回転位相と通電相との同期を確実にとることができるようにしている。そして、回転速度パラメータmspdが4〜9までの範囲では、回転速度パラメータmspdが大きくなるに従って、励磁時間tmを例えば5msから3msまで3段階に小さくして、ロータ32の回転速度を3段階に調整できるようになっている。尚、励磁時間tmの切り換えは、2段階以下又は4段階以上であっても良いことは言うまでもない。
【0323】
励磁時間tmの設定後、ステップ951に進み、通電フラグXonをONにセットし、次のステップ952で、時間カウンタTopをクリアして本ルーチンを終了する。
【0324】
また、図60のステップ934で、現在の位置カウント値Ncntopが目標カウント値Acntと一致すると判定された場合は、図62のステップ955に進み、時間カウンタTopの計測時間が所定時間Khld(例えば500ms)以上になったか否かを判定する。その結果、時間カウンタTopの計測時間が所定時間Khld未満と判定された場合は、ステップ956に進み、全相の通電をオフし、次のステップ957で、励磁時間tmを所定時間Khld(例えば500ms)にセットする。この後、図61のステップ952に進み、時間カウンタTopをクリアして本ルーチンを終了する。このような処理により、オープンループ制御終了後、所定時間Khld(例えば500ms)が経過するまで、前記図60のステップ934以降の処理が行われないため、次のオープンループ制御が開始されない。これは、オープンループ制御終了後に、ディテントバネ23の弾性力によりディテントバネ23の係合部23aがディテントレバー15の保持凹部24,25の傾斜側壁に沿ってその底部に滑り落ちるまで待つためである。
【0325】
また、図62のステップ955で、時間カウンタTopの値が所定値Khld以上になったと判定されれば、ステップ958に進み、通電相判定値Mptnop=0、回転速度パラメータmspd=0にセットし、次のステップ959で、オープンループ制御完了フラグXopcmpをONにセットする。この後、ステップ960に進み、励磁時間Tmを0にセットし、次のステップ961で、通電フラグXonをOFFにセットした後、図61のステップ952に進み、時間カウンタTopをクリアして本ルーチンを終了する。
【0326】
以上説明した本ルーチンでは、オープンループ制御中の励磁方式を1−2相励磁方式に設定し、図50に示すように、オープンループ制御開始から例えば3ステップ分は、各通電相の励磁時間tmを最長時間(例えば50ms)に設定して、ロータ32を確実に掴んでロータ32の回転位相と通電相とを確実に同期させる。この後は、励磁時間tmを大幅に短くするが、ロータ32の回転速度の上昇に伴って励磁時間tmを徐々に短くして、ロータ32の回転速度を緩やかに上昇させる。
【0327】
オープンループ制御中は、通電相を切り換える毎に位置カウント値Ncntopを2ずつカウントアップ(又はカウントダウン)して、該位置カウント値Ncntopに基づいてロータ32の回転位置を推定し、該位置カウント値Ncntopと目標カウント値Acntとの偏差がある程度小さくなった段階で、減速領域に入ったと判断して、励磁時間tmを徐々に長くして、ロータ32の回転速度を緩やかに減速し、該位置カウント値Ncntopが目標カウント値Acntに到達した時点で、ロータ32が目標位置に到達したと判断して、オープンループ制御を終了し、F/B制御に復帰する。
【0328】
[オープンループ制御時エンジントルク抑制]
図66に示すオープンループ制御時エンジントルク抑制ルーチンは、所定周期(例えば1ms周期)で起動される。本ルーチンが起動されると、まずステップ971で、オープンループ制御実行フラグXopen=ONであるか否かを判定し、Xopen=ONであれば、ステップ972に進み、エンジントルク抑制フラグXtrqをONにセットし、Xopen=OFFであれば、ステップ973に進み、エンジントルク抑制フラグXtrqをOFFにセットする。このエンジントルク抑制フラグXtrqの情報は、レンジ切換制御用のECU41からエンジン制御用のECU(図示せず)に送信される。
【0329】
エンジン制御用のECUは、オープンループ制御実行フラグXopen=ONの情報を受信したときに、エンジントルクを抑制する方向にエンジン制御パラメータを制御して、エンジントルクを抑制した状態で、オープンループ制御によるレンジ切換動作を実行する。
【0330】
この際、エンジントルクを抑制する方向に制御するエンジン制御パラメータは、空気系、燃料系、点火系のうちの少なくとも1つの制御パラメータを用いれば良く、例えば、空気系の場合は、スロットルバルブの開駆動を禁止してスロットル開度を現状維持するようにしたり、或は、運転に支障を来さない範囲内でスロットル開度を閉じるようにしても良い。また、燃料系の場合は、運転に支障を来さない範囲内で燃料噴射量を制限するようにすれば良く、点火系の場合は、運転に支障を来さない範囲内で点火時期を遅角するようにすれば良い。
【0331】
次に、本実施形態のリカバリ処理の実行例を図47のタイムチャートを用いて説明する。図47は、シフトレンジをPレンジからNotPレンジに切り換える途中で、F/B制御状態が異常になって、ロータ32の異常停止又はエンコーダカウント値Ncntのカウント動作の異常停止が発生したときの制御例を示している。
【0332】
シフトレンジをPレンジからNotPレンジに切り換えるF/B制御中に、F/B制御状態が正常か異常かを監視し、異常が検出された時点で、リカバリ処理実行フラグXrcvをOFFからONに切り換える。これにより、F/B制御からオープンループ制御に切り換えてリカバリ処理を開始する。
【0333】
オープンループ制御(リカバリ処理)の開始時に、出力軸センサ14の出力信号Vnswを用いてオープンループ制御時の位置カウント値Ncntopの初期値を算出する。そして、オープンループ制御(リカバリ処理)中は、エンコーダカウント値Ncntの情報をフィードバックせずに通電相を順次切り換えてロータ32を回転駆動すると共に、当該オープンループ制御中に通電相を切り換える毎に位置カウント値Ncntopを2ずつカウントアップ(又はカウントダウン)して、この位置カウント値Ncntopが目標カウント値Acntに到達した時点で、ロータ32が目標位置に到達したと判断して、リカバリ処理実行フラグXrcvをONからOFFに切り換える。これにより、オープンループ制御(リカバリ処理)を終了し、F/B制御に復帰する。
【0334】
以上説明した本実施形態では、F/B制御中に、エンコーダカウント値Ncntの異常や脱調等が発生してF/B制御状態(ロータ32の回転状態)が一時的に異常になっても、F/B制御からオープンループ制御に切り換えてロータ32を目標位置まで回転させることができ、モータ制御(レンジ切換制御)の信頼性を向上させることができる。
【0335】
ところで、オープンループ制御中は、エンコーダカウント値Ncntとは関係なく、通電相が選択されてロータ32が駆動されるため、オープンループ制御中にエンコーダカウント値Ncntとロータ32の回転位置(レンジ切換機構11の操作量)との関係がずれる可能性がある。
【0336】
この対策として、本実施形態では、オープンループ制御からF/B制御に復帰させるときに、初期駆動と一方向・他方向突き当て制御を再実行するようにしたので、オープンループ制御中にエンコーダカウント値Ncntとロータ32の回転位置(レンジ切換機構11の操作量)との関係がずれても、そのずれを初期駆動と一方向・他方向突き当て制御によって精度良く補正することができる。
【0337】
尚、本発明に用いるエンコーダは、磁気式のエンコーダ46に限定されず、例えば、光学式のエンコーダやブラシ式のエンコーダを用いても良い。
また、本発明に用いるモータは、SRモータ12に限定されず、エンコーダの出力信号のカウント値に基づいてロータの回転位置を検出してモータの通電相を順次切り換えるブラシレス型のモータであれば、SRモータ以外のブラシレス型のモータを用いても良い。
【0338】
また、本実施形態のレンジ切換装置は、PレンジとNotPレンジの2つのレンジを切り換える構成であるが、例えば、ディテントレバー15の回動動作に連動して自動変速機のレンジ切換弁とマニュアルバルブを切り換えて、自動変速機のP、R、N、D、…の各レンジを切り換えるレンジ切換装置にも本発明を適用して実施できる。
【0339】
その他、本発明は、レンジ切換装置に限定されず、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】突き当て制御中にバッテリ電圧に応じて通電デューティ比を設定するテーブルの一例を示す図
【図30】F/B制御ルーチンの処理の流れを示すフローチャート
【図31】通電相設定ルーチンの処理の流れを示すフローチャート
【図32】UW相から回転を開始する時の通電処理を説明するタイムチャート
【図33】ロータ回転速度演算ルーチンの処理の流れを示すフローチャート
【図34】速度位相進み補正量設定ルーチンの処理の流れを示すフローチャート
【図35】ディテントバネの係合部とディテントレバーのPレンジ保持凹部とNotPレンジ保持凹部との関係を説明する図
【図36】遊び量学習ルーチンの処理の流れを示すフローチャート
【図37】バッテリ電圧に応じて乗り上げ補正量ΔVoverを設定するテーブルの一例を示す図
【図38】可動範囲の実測値ΔNactと設計値ΔNdと遊び量ΔGp,ΔGnpとの関係を説明する図
【図39】Pレンジ側突き当て制御ルーチンの処理の流れを示すフローチャート(その1)
【図40】Pレンジ側突き当て制御ルーチンの処理の流れを示すフローチャート(その2)
【図41】Pレンジ側突き当て制御の一例を説明するタイムチャート
【図42】NotPレンジ側突き当て制御ルーチンの処理の流れを示すフローチャート(その1)
【図43】NotPレンジ側突き当て制御ルーチンの処理の流れを示すフローチャート(その2)
【図44】Pレンジ側突き当て制御とNotPレンジ側突き当て制御の実行タイミングの一例を説明するタイムチャート
【図45】目標カウント値設定ルーチンの処理の流れを示すフローチャート(その1)
【図46】目標カウント値設定ルーチンの処理の流れを示すフローチャート(その2)
【図47】リカバリ処理の一例を説明するタイムチャート
【図48】エンコーダのA相信号・B相信号の異常を検出する方法を説明する図
【図49】F/B制御中のロータの逆転を検出する方法を説明する図
【図50】オープンループ制御の一例を説明するタイムチャート
【図51】リカバリ処理ルーチンの処理の流れを示すフローチャート
【図52】オープンループ制御開始時の位置カウント値Ncntの初期値を算出する方法を説明する図
【図53】AB相信号異常検出ルーチンの処理の流れを示すフローチャート
【図54】逆転カウンタルーチンの処理の流れを示すフローチャート
【図55】逆転判定ルーチンの処理の流れを示すフローチャート
【図56】システム異常診断ルーチンの処理の流れを示すフローチャート(その1)
【図57】システム異常診断ルーチンの処理の流れを示すフローチャート(その2)
【図58】フェールセーフ処理ルーチンの処理の流れを示すフローチャート(その1)
【図59】フェールセーフ処理ルーチンの処理の流れを示すフローチャート(その2)
【図60】オープンループ制御ルーチンの処理の流れを示すフローチャート(その1)
【図61】オープンループ制御ルーチンの処理の流れを示すフローチャート(その2)
【図62】オープンループ制御ルーチンの処理の流れを示すフローチャート(その3)
【図63】Mptnop%6から通電相への変換テーブルの一例を示す図
【図64】バッテリ電圧から最大回転速度パラメータmspdmaxを求めるテーブルの一例を示す図
【図65】回転速度パラメータmspdから励磁時間tmを求めるテーブルの一例を示す図
【図66】オープンループ制御時エンジントルク抑制ルーチンの処理の流れを示すフローチャート
【符号の説明】
11…レンジ切換機構、12…SRモータ、14…出力軸センサ、15…ディテントレバー、18…パーキングロッド、20…パーキングギヤ、21…ロックレバー、23…ディテントバネ、23a…係合部、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 detecting the rotational position of the rotor based on the count value of the pulse signal of the encoder and sequentially switching the energized phase 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 an encoder that outputs a pulse signal 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]
By the way, during feedback control (hereinafter referred to as “F / B control”) for rotating the rotor to the target position based on the encoder count value, for example, the encoder pulse signal may be temporarily missing for some reason, If the noise pulse superimposed on the encoder signal line is mistaken as a regular pulse signal, the energized phase (encoder count value) and the rotor rotation phase cannot be synchronized, and the rotor cannot be driven normally. As a result, the rotor may stop or reversely rotate, and the F / B control may not be continued normally and the control may be disabled.
[0004]
The present invention has been made in consideration of such circumstances, and therefore the object thereof is possible even if the F / B control state temporarily becomes abnormal for some reason during F / B control. As long as the rotor can be rotated to the target position, it is an object of the present invention to provide a motor control device capable of improving the reliability of motor control.
[0005]
[Means for Solving the Problems]
In order to achieve the above object, the motor control apparatus according to claim 1 of the present invention monitors the presence / absence of an abnormality in the F / B control state during the F / B control by the abnormality monitoring means, and as a result, the F / B control. When an abnormal state is detected, the F / B control is switched to open loop control, and the rotor is driven to rotate by sequentially switching the energized phase of the motor without feeding back the encoder count value information. is there.
[0006]
During F / B control, for example, if the encoder count value becomes abnormal due to missing encoder pulses or noise, the energized phase (encoder count value) and the rotor rotation phase cannot be synchronized, and the F / B control status In the present invention, this abnormality is detected by the abnormality monitoring means, and the F / B control is switched to the open loop control. As a result, according to the present invention, even if an encoder count value abnormality or the like occurs during F / B control and the F / B control state (rotor rotation state) temporarily becomes abnormal, the rotor is opened by open loop control. Can be rotated to the target position, and the reliability of motor control can be improved.
[0007]
In this case, as described in claim 2, during the F / B control, the output interval of the pulse signal of the encoder may be monitored to check whether there is an abnormality in the F / B control state. When the F / B control state becomes abnormal, the rotor rotation speed becomes slow. Therefore, by monitoring the output interval of the pulse signal of the encoder during F / B control, it is possible to quickly determine whether there is an abnormality in the F / B control state.
[0008]
Further, as in claim 3, when outputting an A phase signal and a B phase signal having a predetermined phase difference (generally a phase difference of 90 ° in electrical angle) from the encoder in synchronization with the rotation of the rotor When the encoder count value is updated by counting the A phase signal and the B phase signal during F / B control, the rotational direction of the rotor is determined according to the generation order of the A phase signal and the B phase signal. The encoder count value may be counted up or down according to the rotation direction, and the energized phase may be selected according to the encoder count value and the rotation direction of the rotor. In this way, the correspondence between the encoder count value and the rotational position of the rotor can be maintained regardless of which direction the rotor rotates in the forward or reverse direction. Even in the rotation direction, a correct energized phase can be selected based on the encoder count value.
[0009]
In this case, during the F / B control, the A-phase signal and the B-phase signal are individually counted, and the count value of the A-phase signal and the count value of the B-phase signal are compared to determine whether the F / B control state is abnormal. The presence or absence may be monitored. If the A-phase signal and the B-phase signal are normally output during the F / B control, the difference between the count value of the A-phase signal and the count value of the B-phase signal is 0 or ± 1, so both signals If the difference between the count values increases, it is possible that either one of the signals is missing or a noise pulse is mixed. In such a state, the encoder count value and the rotational position of the rotor cannot be synchronized, and the F / B control state becomes abnormal. Therefore, the abnormality of the F / B control state is caused by the difference between the count values of both signals. Presence / absence can be determined.
[0010]
Further, as in the fourth aspect, the rotation direction of the rotor is monitored during the F / B control, and the abnormality of the F / B control state is determined by whether the rotation direction of the rotor is reversed from the rotation direction toward the target position. The presence or absence may be monitored. By doing so, it is possible to prevent the rotor from rotating in the direction opposite to the direction of the target position during the F / B control.
[0011]
By the way, this type of motor with an encoder can only detect the amount of rotation (rotation angle) from the starting position of the rotor based on the encoder count value after starting. If the absolute rotational position is detected and the correspondence between the rotational position of the rotor and the energized phase is not taken, the motor cannot be driven normally.
[0012]
Therefore, as in claim 5, during the initial drive after power-on, the motor energization phase is switched according to a predetermined time schedule so as to learn the correspondence between the rotational position of the rotor and the energization phase. Also good. In this way, if the energized phase is switched once during the initial drive, the rotor rotation position and the energized phase always coincide with each other in the energized phase, and thereafter the rotor is synchronized with the energized phase switching. The encoder rotates and outputs a pulse signal from the encoder in synchronization with the rotation of the rotor. Therefore, if you look at the encoder count value at the end of the initial drive, you can see the angle (rotation amount) that the rotor actually rotated in synchronization with the switching of the energized phase, and thereby the correspondence between the rotational position of the rotor and the energized phase Therefore, by learning this correspondence relationship, the correct energized phase can be selected and the motor can be rotated normally during normal driving thereafter.
[0013]
By the way, the rotation amount (rotation angle) of such a motor with an encoder is converted into an operation amount of a controlled object (position switching device) via a rotation transmission system, but between the components constituting the rotation transmission system, Since there is play (play), even if the rotation amount of the rotor can be accurately controlled based on the encoder count value, an error corresponding to play (play) of the rotation transmission system is included in the operation amount to be controlled. As a result, the amount of operation to be controlled cannot be controlled with high accuracy.
[0014]
Therefore, as described in claim 5, when learning the play amount of the rotation transmission system that converts the rotation amount of the motor into the operation amount of the control target, the rotor is rotated until it hits the limit position of the movable range of the control target. You may make it learn the limit position by performing contact control.
[0015]
By the way, if there is missing encoder pulses or noise, the encoder count value becomes abnormal, and the relationship between the encoder count value and the rotational position of the rotor (the amount of operation to be controlled) or the relationship between the encoder count value and the energized phase can deviate. There is sex.
[0016]
Therefore, as described in claim 5, when the open loop control is returned to the F / B control, the above-described initial drive and abutting control may be re-executed. In this way, even if the relationship between the encoder count value and the rotational position of the rotor (operation amount to be controlled) or the relationship between the encoder count value and the energized phase shifts during open-loop control, the shift is regarded as initial drive. Correction can be made with high accuracy by the abutting control.
[0017]
In this case, it is better to stop monitoring whether there is an abnormality in the F / B control state during the abutting control. This is because it cannot be determined whether the rotation is stopped at the limit position by the abutting control or the rotation is stopped due to the abnormality of the F / B control. Therefore, if the monitoring of the presence / absence of the abnormality of the F / B control state is stopped during the abutting control, it is possible to prevent erroneous determination of the state where the rotation is stopped at the limit position.
[0018]
Further, as in claim 7, when an abnormality in the F / B control state is detected, the number of times of switching of the energized phase during open loop control is counted, and the rotor has reached the target position based on the count value. It is preferable to return to the F / B control when judged. If it does in this way, after rotating a rotor to a target position by open loop control, it can return to F / B control.
[0019]
Further, as in claim 8, even when the F / B control is returned from the open loop control, when the F / B control state abnormality is detected again and the state is switched to the open loop control for a predetermined number of times. Finally, the determination of abnormality may be finalized, and thereafter it may not be returned to the F / B control. By doing so, it is possible to avoid a situation in which the F / B control and the open loop control are frequently switched when the F / B control system does not function normally.
[0020]
Further, as in the ninth aspect, 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.
[0021]
The invention according to claims 1 to 9 described above can be applied to various position switching devices using a brushless type motor such as a switched reluctance motor as a drive source. You may apply to the control apparatus of the motor which drives the range switching mechanism which switches the range of a machine. Thus, a highly reliable motor-driven range switching device can be configured.
[0022]
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.
First, the configuration of the range switching mechanism 11 will be described with reference to FIG. The motor 12 serving as a drive source of the range switching mechanism 11 is constituted by, for example, a switched reluctance motor, and includes a speed reduction mechanism 26 (see FIG. 4), and an output shaft sensor 14 that detects the rotational position of the output shaft 13 is provided. It has been. A detent lever 15 is fixed to the output shaft 13.
[0023]
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).
[0024]
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.
[0025]
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).
[0026]
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. 21 a 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 (running state).
[0027]
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.
[0028]
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.
[0029]
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). In the two motor excitation units 35 and 36, the U phase and the U ′ phase are energized simultaneously, the V phase and the V ′ phase are energized simultaneously, and the W phase and the W ′ phase are energized simultaneously.
[0030]
These two motor excitation units 35 and 36 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.
[0031]
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).
[0032]
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 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.
[0033]
Further, the N pole (N ′) at the position corresponding to the reference rotation position of the rotor 32 and the S poles (S ′) on both sides thereof are formed to have a larger 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 rotational position may be formed as the entire rotary magnet 47.
[0034]
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 a Z-phase signal is arranged so that the phase difference between the Z-phase signal and the B-phase signal (or A-phase signal) is zero.
[0035]
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 ”.
[0036]
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 or the reverse rotation, 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.
[0037]
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.
[0038]
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.
[0039]
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.
[0040]
The learning at the time of initial driving is specifically 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).
[0041]
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).
[0042]
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.
[0043]
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 before the end of the initial drive. The rotor 32 rotates in synchronization with the phase switching, and the A phase signal and the B phase signal are output from the encoder 46 in synchronization with the rotation of the rotor 32.
[0044]
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.
[0045]
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.
[0046]
On the other hand, 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.
[0047]
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.
[0048]
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).
[0049]
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 50 ms, for example. Thereafter, if the target position Acnt does not change, the energization is stopped.
[0050]
In the middle of the initial drive, when the P range switch 43 or the NotP range switch 44 is operated and a range switching request is generated, the next two-phase energization (when a range switching request occurs during execution of the 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.
[0051]
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.
[0052]
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.
[0053]
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.
[0054]
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.
[0055]
However, if energization is turned off while the rotor 32 is stopped, the electromagnetic force that holds the rotor 32 at the target position (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.
[0056]
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 the F / B control, and immediately after the first energized phase is determined, B control is started.
[0057]
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.
[0058]
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.
[0059]
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.
[0060]
As a countermeasure, in the present embodiment, as shown in FIG. 18, when the F / B control is started from the energization-off state of the SR motor 12, the rotor 32 is stopped and held at the current position by two-phase energization ( Hereinafter, “F / B control start position stop holding process” is executed for a predetermined time (for example, 10 ms), and then the F / B control is executed to rotate the rotor 32 to the target position.
[0061]
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. Rotation in the opposite direction to the target position can be prevented, stable F / B control can be performed, the rotor 32 can be reliably rotated to the target position, and range switching control with high stability and reliability (positioning control) )It can be performed.
[0062]
By the way, in order to make the range 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.
[0063]
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 range switching control can be satisfy | filled, maintaining the stability and reliability of range switching control.
[0064]
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 the occurrence of step-out (the deviation of the energized phase) and to reliably rotate the rotor 32 to the changed target position.
[0065]
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.
[0066]
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 driving torque is reduced and the rotational speed of the rotor 32 is suppressed, and the demand for speeding up the range switching speed (speeding up of the rotor speed) cannot be satisfied.
[0067]
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.
[0068]
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.
[0069]
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.
[0070]
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.
[0071]
By the way, the rotation amount (rotation angle) of the rotor 32 is converted into an operation amount (sliding amount of the parking rod 18) of the range switching mechanism 11 through a rotation transmission system including the speed reduction mechanism 26, the output shaft 13, the detent lever 15, and the like. However, there is play between the parts constituting the rotation transmission system. For example, there is a backlash between the gears of the speed reduction mechanism 26, and in a configuration in which a connecting portion having a non-circular cross section formed at the tip of the rotating shaft of the motor 12 is fitted into the fitting hole of the output shaft 13, and connected. A clearance is required to facilitate the fitting operation of both.
[0072]
As shown in FIG. 35, when the engaging portion 23a of the detent spring 23 is fitted into the P range holding recess 24 or the NotP range holding recess 25 of the detent lever 15, the engaging portion 23a and each holding recess 24 are provided. , 25 there is a slight gap (backlash) between the side walls. As described above, in the rotation transmission system that converts the rotation amount of the rotor 32 into the operation amount of the range switching mechanism 11 (the slide amount of the parking rod 18), there is play (backlash) due to backlash, gaps between components, and the like. Even if the rotation amount of the rotor 32 can be accurately controlled based on the encoder count value, an error corresponding to the play (backlash) of the rotation transmission system occurs in the operation amount of the range switching mechanism 11, and the range switching is performed. The operation amount of the mechanism 11 cannot be accurately controlled.
[0073]
Therefore, in the present embodiment, a function for learning the play amount of the rotation transmission system is provided. Specifically, when learning the amount of play of the rotation transmission system, the engaging portion 23a of the detent spring 23 is placed on the side wall of the P range holding recess 24, which is the limit position on the P range side of the movable range of the range switching mechanism 11. P range-side abutting control (one-way abutting control) for rotating the rotor 32 until it abuts, and NotP range-side abutting for rotating the rotor 32 until it abuts against the side wall of the NotP range holding recess 25, which is the limit position on the NotP range side Control (other-direction butting control) is executed, and the increase / decrease amount of the encoder count value from the limit position on the P range side to the limit position on the NotP range side is obtained as an actual measurement value of the movable range of the range switching mechanism 11. Then, the difference between the actually measured value of the movable range and the design value of the movable range is learned as a play amount of the rotation transmission system. Thereafter, when the rotor 32 is rotated to the target position, the target position is set to the rotation transmission system. Set considering the learning value of play. In this way, even if there is play (backlash) in the rotation transmission system, the target position including the play can be set, and the operation amount of the range switching mechanism 11 can be controlled with high accuracy.
[0074]
In this case, if there is a time allowance for learning the play amount of the rotation transmission system from turning on the power of the ECU 41 that controls the SR motor 12 (turning on the ignition switch) to the start of the control of the range switching mechanism 11, the power of the ECU 41 After the charging, the P range side butting control and NotP range side butting control may be continuously executed to learn the play amount of the rotation transmission system before starting the control of the range switching mechanism 11. When the control of the range switching mechanism 11 needs to be started immediately after the ECU 41 is turned on, there may be no time for learning the play amount of the rotation transmission system after the ECU 41 is turned on.
[0075]
Therefore, in the present embodiment, after starting the control of the range switching mechanism 11 without performing play amount learning, when the rotor 32 is stopped in the P range, the P range side abutting control is executed, and P The encoder count value at the time of range side abutting is stored in the RAM of the ECU 41, and when the rotor 32 is stopped in the NotP range, the NotP range side abutting control is executed, and the encoder count at the time of NotP range side abutting is executed. The value is stored in the RAM of the ECU 41, and a difference between the encoder count value at the time of the P range side abutting and the encoder count value at the time of the NotP range side abutting is obtained as an actually measured value of the movable range of the range switching mechanism 11. The difference between the actually measured value of the movable range and the design value of the movable range is learned as a play amount of the rotation transmission system.
[0076]
In this way, there is no time to learn the play amount of the rotation transmission system from the power-on of the ECU 41 to the start of the control of the range switch mechanism 11, and the range switch mechanism 11 can be controlled without learning the play amount. Even if it starts, after that, each abutting control can be executed during the period when the rotor 32 is stopped in the P range or the NotP range, and the play amount of the rotation transmission system can be learned. In this case, before the play amount learning is finished, the same control as in the conventional case may be performed without considering the play amount of the rotation transmission system, but the preset average play amount or the previous play amount learning value is set. The control target may be controlled using the stored value. In the following description, the simple description of “abutting control” means that it corresponds to both the P range-side abutting control and the NotP range-side abutting control.
[0077]
In the present embodiment, when the abutting control is executed, the energization duty ratio (energization rate) of the SR motor 12 is decreased from that during normal driving, so that the torque of the SR motor 12 is decreased as compared with that during normal driving. I have to. The torque of the SR motor 12 is set to a large torque so that the engaging portion 23a of the detent spring 23 can surely get over the mountain portion between the holding recesses 24 and 25 of the detent lever 15 when the range is switched. In the abutting control, the engaging portion 23a of the detent spring 23 is abutted against the side walls of the holding recesses 24 and 25 of the detent lever 15 by the torque of the SR motor 12, so that the torque of the SR motor 12 is large. As the number of executions of the abutting control increases, the parts of the rotation transmission system such as the engaging portion 23a of the detent spring 23 may be gradually deformed / damaged, which may reduce the durability / reliability.
[0078]
As a countermeasure, if the torque of the SR motor 12 is reduced during the abutting control, the force for abutting the engaging portion 23a of the detent spring 23 against the side walls of the holding recesses 24 and 25 of the detent lever 15 can be weakened. Further, it is possible to prevent deformation / damage of the parts of the rotation transmission system such as the engaging portion 23a of the detent spring 23 by the abutting control, and it is possible to ensure durability and reliability. In the abutting control of the present embodiment, the engaging portion 23a of the detent spring 23 does not have to climb over the crest between the holding recesses 24 and 25 of the detent lever 15, so the SR motor 12 Even if the torque is reduced, the abutting control can be executed normally if there is a minimum torque required to abut the engaging portion 23a of the detent spring 23 against the side walls of the holding recesses 24 and 25 of the detent lever 15. .
[0079]
Further, in the present embodiment, the phase advance amount of the energized phase is corrected so as to slow down the rotation speed of the rotor 32 when the abutting control is executed. That is, when the rotation speed of the rotor 32 is high when the abutting control is executed, the speed at which the engaging portion 23a of the detent spring 23 collides with the side walls of the holding recesses 24 and 25 of the detent lever 15 increases. However, there is a possibility that the parts of the rotation transmission system such as the engaging portion 23a of the detent spring 23 may be gradually deformed / damaged. However, if the rotation speed of the rotor 32 is reduced during the abutting control, the abutting control is performed. The speed at which the engaging portion 23a of the detent spring 23 collides with the side walls of the holding recesses 24 and 25 of the detent lever 15 is reduced, and the impact force can be weakened. It is possible to prevent deformation / damage of the parts of the transmission system, and to ensure durability and reliability.
[0080]
Further, in the present embodiment, when the abutting control is executed, the engaging portion 23a is held in the holding recesses 24, 25 in a state where the engaging portion 23a of the detent spring 23 hits the side wall of each holding recess 24, 25 of the detent lever 15. Is estimated based on the battery voltage, which is the power supply voltage of the SR motor 12, and the actually measured value of the movable range of the range switching mechanism 11 is corrected by the estimated value. Yes. That is, when the abutting control is executed, the angle (climbing correction amount) that the engaging portion 23a of the detent spring 23 rides on the side walls of the holding recesses 24 and 25 of the detent lever 15 increases as the torque of the SR motor 12 increases. In general, since the torque of the SR motor 12 varies depending on the power supply voltage (battery voltage), there is a correlation between the power supply voltage (battery voltage) and the torque of the SR motor 12. It can be used as substitute information for the torque of the SR motor 12. Therefore, the angle at which the engaging portion 23a of the detent spring 23 rides on the side walls of the holding recesses 24 and 25 (climbing correction amount) when the abutting control is executed is the power supply that is the substitute information for the torque of the SR motor 12. By estimating based on the voltage (battery voltage) and correcting the actual measurement value of the movable range of the range switching mechanism 11 by the estimated value, the actual measurement value of the movable range of the range switching mechanism 11 can be obtained with high accuracy. it can.
[0081]
By the way, during F / B control, for example, the A-phase signal or B-phase signal of the encoder 46 is temporarily missing due to some cause, or the noise pulse superimposed on the signal line of the encoder 46 is mistaken as a normal pulse signal. If this happens, the energized phase (encoder count value) and the rotational phase of the rotor 32 cannot be synchronized, and the rotor 32 cannot be driven normally. As a result, the rotor 32 stops or reversely rotates. There is a case where the F / B control cannot be continued normally and the control becomes impossible.
[0082]
Therefore, in the present embodiment, during the F / B control, whether the F / B control state (rotation state of the rotor 32) is normal or abnormal is monitored, and if an abnormality is detected, the F / B control is performed at that time. Switch from open loop control to open loop control. In the execution example of the recovery process shown in FIG. 47, during the F / B control for switching the shift range from the P range to the NotP range, the F / B control state becomes abnormal, and the rotor 32 stops abnormally or the encoder count value. When an abnormal stop of the Ncnt counting operation occurs, the recovery processing is executed by switching from the F / B control to the open loop control.
[0083]
During open loop control (recovery processing), the energized phase is sequentially switched without feeding back the information of the encoder count value Ncnt to rotate the rotor 32, and every time the energized phase is switched during the open loop control, the open loop control is performed. The position count value Ncntop at the time is counted up (or counted down), and when the position count value Ncntop reaches the target count value Acnt, it is determined that the rotor 32 has reached the target position, and the open loop control (recovery processing) ) And return to F / B control. As a result, in the present embodiment, even when the encoder count value Ncnt is abnormal or step-out occurs during the F / B control, the F / B control state (rotation state of the rotor 32) becomes temporarily abnormal. The rotor 32 can be rotated to the target position by open loop control.
[0084]
At this time, as the abnormality detection method of the F / B control state, any one, two or all of the following three abnormality detection methods (1) to (3) may be used.
[0085]
[Abnormality detection method (1)]
As shown in FIG. 48, during the F / B control, the edge of the A phase signal and the edge of the B phase signal are counted separately, and the deviation between the count value Na of the A phase signal and the count value Nb of the B phase signal. Whether or not there is an abnormality in the F / B control state is monitored based on whether or not | Na−Nb | is equal to or greater than an abnormality determination value (eg, 3). If the A-phase signal and the B-phase signal are normally output during the F / B control, the difference between the count value Na of the A-phase signal and the count value Nb of the B-phase signal is 0 or 1, so both signals If the deviation | Na−Nb | of the count value is 2 or more, either one of the signals may be lost or a noise pulse may be mixed. In such a state, the encoder count value Ncnt and the rotational position of the rotor 32 cannot be synchronized, and the rotational state (F / B control state) of the rotor 32 becomes abnormal. | Na−Nb | can determine whether there is an abnormality in the rotation state (F / B control state) of the rotor 32.
[0086]
[Abnormality detection method (2)]
As shown in FIG. 48, during the F / B control, the edge interval ΔTa of the A-phase signal and the edge interval ΔTb of the B-phase signal are measured, and the edge intervals ΔTa, ΔTb of each signal are determined as abnormality determination values (for example, ΔTa, Whether or not there is an abnormality in the F / B control state is monitored based on whether or not it is 10 times the average value of ΔTb.
[0087]
As an abnormality detection method (2), an abnormality may be detected by monitoring the rotor rotational speed. For example, an abnormality may be detected based on the number of output pulses of the encoder 46 per unit time. good.
[0088]
[Abnormality detection method (3)]
As shown in FIG. 49, during the F / B control, the rotation direction of the rotor 32 is monitored from the changing direction of the encoder count value Ncnt, and whether or not the rotation direction of the rotor 32 is reversed from the rotation direction toward the target position. To monitor whether the F / B control state (rotation state of the rotor 32) is abnormal. In the present embodiment, the number of times the encoder count value Ncnt is continuously updated in the direction opposite to the target position is counted, and whether the count value Cr is equal to or greater than an abnormality determination value (for example, 4) is determined as F / B. The presence or absence of abnormality in the control state (rotation state of the rotor 32) is monitored. That is, when the encoder count value Ncnt is continuously updated in the direction opposite to the target position, for example, four times or more, it is determined that the rotor 32 is reversely rotated, and the reverse rotation detection flag Xr is switched ON.
[0089]
Further, in the present embodiment, the excitation method during the open loop control (recovery process) is set to the 1-2 phase excitation method, and as shown in FIG. Is set to the longest time (for example, 50 ms), the rotor 32 is securely grasped, and the rotational phase of the rotor 32 and the energized phase are reliably synchronized. Thereafter, the excitation time is significantly shortened, but as the rotational speed of the rotor 32 increases, the excitation time is gradually shortened to gradually increase the rotational speed of the rotor 32.
[0090]
During open loop control, the position count value Ncntop at the time of open loop control is counted up (or counted down) every time the energized phase is switched, and the rotational position of the rotor 32 is estimated based on this position count value Ncntop. When the difference between the count value Ncntop and the target count value Acnt is less than or equal to a predetermined value, it is determined that the vehicle has entered the deceleration region, the excitation time is gradually increased, and the rotational speed of the rotor 32 is gradually reduced. When the position count value Ncntop reaches the target count value Acnt, it is determined that the rotor 32 has reached the target position, the open loop control is terminated, and the F / B control is resumed.
[0091]
By the way, if there is a missing pulse or noise of the encoder 46, the relationship between the encoder count value Ncnt and the rotational position of the rotor 32 (the operation amount of the range switching mechanism 11) or the relationship between the encoder count value Ncnt and the energized phase may be shifted. There is.
[0092]
Therefore, in this embodiment, when the open loop control is returned to the F / B control, the above-described initial drive and abutting control are re-executed. Thus, even if the relationship between the encoder count value Ncnt and the rotational position of the rotor 32 (the operation amount of the range switching mechanism 11) or the relationship between the encoder count value Ncnt and the energized phase is deviated during open loop control, the deviation is initialized. Correction can be made with high accuracy by driving and abutting control.
[0093]
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.
[0094]
[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.
[0095]
When this routine is started, first, at step 101, it is determined whether or not the fail safe process execution flag Xfsop = ON or the recovery process execution flag Xrcv = ON. Here, the fail safe process execution flag Xfsop is a flag for determining whether or not the fail safe process (range switching by open loop control) executed when the encoder 46 or the SR motor 12 fails is executed. ON means being executed. 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 abnormality of the F / B control state occurs is executed. , ON means being executed.
[0096]
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.
[0097]
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.
[0098]
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.
[0099]
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).
[0100]
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).
[0101]
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).
[0102]
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.
[0103]
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.
[0104]
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).
[0105]
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).
[0106]
When CASE = 4 (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).
[0107]
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.
[0108]
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.
[0109]
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. 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.
[0110]
Thereafter, when the energization time CT of the current energization phase exceeds the energization time T (= T1 or T2) set in the routine of FIG. 10 or FIG. 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.
[0111]
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.
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”.
[0112]
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
[0113]
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. Therefore, 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.
[0114]
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)
[0115]
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.
[0116]
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.
[0117]
[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 process, 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 the B phase signal are read. 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 B-phase signal and the count-up value ΔN corresponding to the previous values A (i−1) and B (i−1) are calculated. .
[0118]
Here, the reason why the current values A (i) and B (i) and the previous values A (i-1) and B (i-1) of the A phase signal and the B phase signal 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 of the P range → NotP range), the count-up value ΔN is set to a positive 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.
[0119]
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.
[0120]
[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.
[0121]
mode = 0: Power 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
[0122]
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) ).
[0123]
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 fail safe process execution flag Xfsop = OFF and the recovery process execution flag Xrcv = OFF. . If either or both of the fail safe process execution flag Xfsop and the recovery process execution flag Xrcv are set to ON, the process proceeds to step 404, and 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).
[0124]
If both the fail-safe process execution flag Xfsop and the recovery process execution flag Xrcv are set to OFF, the process proceeds to step 405 to determine whether or not 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
The target count value Acnt is set by a target count value setting routine shown in FIGS. 45 and 46 described later.
[0125]
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).
[0126]
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).
[0127]
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).
[0128]
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.
[0129]
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 forward rotation to 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).
[0130]
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. The direction indication value D = 1 (forward rotation) is set.
[0131]
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.
[0132]
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.
[0133]
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.
[0134]
That is, by setting the end determination value Kref of the F / B control to, for example, the phase advance amount 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).
[0135]
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. .
[0136]
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.
[0137]
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.
[0138]
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.
[0139]
[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. .
[0140]
When this routine is started, it is first determined in step 501 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.
[0141]
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 set 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.
[0142]
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.
[0143]
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.
[0144]
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.
[0145]
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.
[0146]
[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.
[0147]
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).
[0148]
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
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.
[0149]
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.
[0150]
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.
[0151]
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.
[0152]
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.
[0153]
FIG. 32 is a time chart illustrating a phase that is first energized when rotation is started 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
[0154]
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.
[0155]
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.
[0156]
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 either case of the forward rotation direction or 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.
[0157]
[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.
[0158]
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 = 2, 3, 6, 7, 10, 11 at the end of the F / B control. 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.
[0159]
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).
[0160]
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, thereby correcting to the 2-phase energization. .
[0161]
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.
In addition, when Mptn = Ncnt−Gcnt, it is determined to be stopped and the energized phase is not changed.
[0162]
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.
[0163]
[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.
[0164]
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.
[0165]
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, and the current value depends on whether Mptn% 12 = 2, 3, 6, 7, 10, 11 or not. 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 according to 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.
[0166]
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.
[0167]
Thereafter, when the time CT4 of the reverse position stop holding process exceeds a predetermined time (for example, 50 ms), “Yes” is determined in Step 542, the reverse position stop holding process is ended, and the F / B control is resumed. . 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.
[0168]
[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. 30 described later.
[0169]
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.
[0170]
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.
[0171]
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, and the energized phase is set by the conversion table of FIG.
[0172]
Thereafter, the process proceeds to step 556, where it is determined whether or not the abutting control is being executed (P range side abutting control in progress flag Xexp = ON or NotP range side abutting control in progress flag Xexnp = ON). If not being executed, the process proceeds to step 557 and the energization duty ratio of the SR motor 12 is set to 100%, for example. If the abutting control is being executed, the process proceeds to step 558 and the battery which is the power supply voltage of the SR motor 12 is set. According to the voltage, the energization duty ratio is set to, for example, 10 to 30% by the table of FIG. Thereby, at the time of execution of abutting control, the torque of the SR motor 12 is significantly reduced as compared with that during normal driving.
[0173]
In the example of the table of FIG. 29, in consideration of the characteristic that the torque of the SR motor 12 increases as the power supply voltage (battery voltage) of the SR motor 12 increases, the energization increases as the power supply voltage (battery voltage) increases. The duty ratio is set to be small. As a result, the torque of the SR motor 12 becomes almost constant regardless of whether the power supply voltage (battery voltage) is high or low, and the torque of the SR motor 12 can always ensure the minimum torque necessary for the abutting control. Yes.
[0174]
After the energization duty ratio is set as described above, the process proceeds to step 559, the control signal is output from the ECU 41 to the motor drivers 37, 38, and the step 557 or the winding of the energization phase set in step 555 is set. The SR motor 12 is driven by energizing at the energization duty ratio set at 558.
[0175]
[F / B control]
Next, processing contents of the F / B control routine shown in FIG. 30 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).
[0176]
When the F / B control routine of FIG. 30 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.
[0177]
On the other hand, if the F / B permission flag Xfb is set to ON, the process proceeds to step 602 to execute an energization phase setting routine shown in FIG. 31, which will be described later, and 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.
[0178]
[Energized phase setting]
The energization phase setting routine shown in FIG. 31 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, where the current encoder count value Ncnt, initial misalignment learning value Gcnt, forward rotation direction phase advance amount K1, and speed phase advance correction amount Ks are used. The energized phase determination value Mptn is updated by the following equation.
Mptn = Ncnt−Gcnt + K1 + Ks
Here, the positive rotation direction phase advance amount K1 is a phase advance amount of the energized phase necessary for normal rotation of the rotor 32 (phase advance amount of the energized phase with respect to the current rotational phase of the rotor 32), for example, K1 = 4 is set.
[0179]
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.
[0180]
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.
[0181]
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). If the rotation has not been reversed, the process proceeds to step 615 and the current encoder count value Ncnt, the initial position deviation learning value Gcnt, and the reverse rotation The energized phase determination value Mptn is updated by the following equation using the direction phase advance amount K2 and the speed phase advance correction amount Ks.
Mptn = Ncnt-Gcnt-K2-Ks
[0182]
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 shown in FIG.
[0183]
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.
[0184]
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.
[0185]
[Rotor speed calculation]
The rotor rotation speed calculation routine shown in FIG. 33 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), since the phase advance correction of the energized phase according to the rotational speed SP of the rotor 32 is not performed, 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.
[0186]
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, in 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]
[0187]
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.
[0188]
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.
[0189]
[Speed phase advance correction amount setting]
The speed phase advance correction amount setting routine shown in FIG. 34 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.
[0190]
On the other hand, if the F / B permission flag Xfb is ON (F / B control is being executed), the rotational speed of the rotor 32 calculated by the rotor rotational speed calculation routine of FIG. The speed phase lead correction amount Ks is set as follows according to SP.
[0191]
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 in 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.
[0192]
Thereafter, the process proceeds to step 637, and whether the rotational position of the rotor 32 has approached 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).
[0193]
If | Acnt−Ncnt | is equal to or greater than a predetermined value, the process proceeds to step 639, and the abutting control is being executed (P range side abutting control flag Xexp = ON or NotP range side abutting control in progress flag Xexnp = ON). If the abutting control is not being executed, the speed phase advance correction amount Ks set in any of steps 634 to 636 is used as it is. If the abutting control is being executed, step 640 is performed. , The speed phase advance correction amount Ks is set to a small value Ke (for example, 0 or −1), and the rotational speed of the rotor 32 is decreased.
[0194]
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.
[0195]
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.
[0196]
[Play amount learning]
The play amount learning routine shown in FIG. 36 is executed at a predetermined cycle (for example, 8 ms cycle) after the end of the initial driving. When this routine is started, first, at step 700, it is determined whether or not the play amount learning completion flag Xg = ON (after completion of the play amount learning). If the play amount learning completion flag Xg = ON, it is determined. The routine is terminated without performing the subsequent processing. Thereby, the play amount learning is performed only once during the ON period of the ignition switch. The play amount learning completion flag Xg is set to OFF by an initialization processing routine (not shown) executed immediately after turning on the ignition switch.
[0197]
On the other hand, if it is determined in step 700 that the play amount learning completion flag Xg = OFF (before the play amount learning is completed), the process proceeds to step 701 to determine whether or not the command shift range is the P range. If so, the process proceeds to step 702, and a P range side abutting control routine of FIGS. 39 and 40 described later is executed, and the encoder count value Np at the time of the P range side abutting is stored in the RAM of the ECU 41. On the other hand, if it is the NotP range, the process proceeds to Step 703, and a NotP range side abutting control routine of FIG. 42 and FIG. 43 described later is executed, and the encoder count value Nnp at the NotP range side abutting is stored in the RAM of the ECU 41. To do.
[0198]
Thereafter, the process proceeds to step 704, where it is determined whether or not both P range side and P range side abutting controls have been completed (P range side abutting completion flag Xp = ON, and NotP range side abutting completion flag Xnp = This routine is terminated without performing the subsequent processing if the abutting control is not completed on either the P range side or the P range side.
[0199]
On the other hand, if the abutting control on both the range side and the P range side has been completed, the process proceeds to step 705 and the limit on the NotP range side from the limit position on the P range side (side wall of the P range holding recess 24). The actual measurement value ΔNact of the movable range of the rotor 32 (movable range of the detent lever 15) to the position (side wall of the NotP range holding recess 25) is calculated by the following equation.
ΔNact = Nnp−Np
[0200]
Here, Nnp is an encoder count value at the time of NotP range side abutting, and a value GNnp learned by a NotP range side abutting control routine of FIGS. 42 and 43 described later is used. Np is an encoder count value at the time of P range side abutting, and a value GNp learned by a P range side abutting control routine of FIGS. 39 and 40 described later is used.
[0201]
After calculating the actual value ΔNact of the movable range, the process proceeds to step 706, and the play amount ΔGp on the P range side and the play amount ΔGnp on the NotP range side are set to the actual value ΔNact of the movable range and the design value in consideration of the relationship shown in FIG. It calculates by following Formula using (DELTA) Nd.
ΔGp = ΔGnp = (ΔNact−ΔNd) / 2
Here, the design value ΔNd of the movable range may be calculated based on the design data in advance, or the center value of the manufacturing variation of the movable range of the mass-produced product (actual value of the movable range of the standard product) may be used. .
[0202]
As shown in FIG. 38, the difference (ΔNact−ΔNd) between the actual measurement value ΔNact of the movable range and the design value ΔNd corresponds to the total play amount (ΔGp + ΔGnp) on the P range side and the NotP range side. In general, since the play amount ΔGp on the P range side and the play amount ΔGnp on the NotP range side are equal, the play amounts ΔGp and ΔGnp on the P range side and the NotP range side can be calculated by the above formula.
[0203]
After calculating the play amounts ΔGp and ΔGnp, the process proceeds to step 707, where the play amount learning completion flag Xg is set to “ON” which means that the play amount learning is completed, and this routine is finished.
[0204]
The actual measurement value ΔNact and the play amounts ΔGp, ΔGnp of the movable range calculated in the above steps 705 and 706 are updated and stored in a nonvolatile memory (not shown) such as SRAM of the ECU 41, and even after the ignition switch is turned off. The stored value is held. After the next ignition switch is turned on, the actual value ΔNact of the movable range stored in the nonvolatile memory of the ECU 41 is set when the target count value Acnt is set in a target count value setting routine shown in FIGS. A target count value Acnt is set using the play amounts ΔGp and ΔGnp.
[0205]
[P range side butting control]
The P range side abutting control routine shown in FIGS. 39 and 40 is a subroutine that is executed in step 702 of the play amount learning routine of FIG. 36 when the command shift range is the P range. When this routine is started, first, at step 711, it is determined whether or not the P range side abutting completion flag Xp = ON (after the P range side abutting control ends), and the P range abutting control is already performed. If completed, this routine is terminated without performing the subsequent processing. Thereby, the P range side abutting control is performed only once during the ON period of the ignition switch.
[0206]
On the other hand, if it is determined in step 711 that the P range side abutting completion flag Xp = OFF (before the end of the P range side abutting control), the process proceeds to step 712 and the control mode determination value mode is set to 0,3. It is determined whether it is applicable. Here, the control mode determination value mode = 0 means that the power is off (standby), and the control mode determination value mode = 3 means the target position stop holding process.
[0207]
In this routine, in order to perform the P range side abutting control when the rotor 32 is stopped in the P range, the P range side abutting control is performed with the control mode determination value mode = 0 or 3. ing.
[0208]
When the control mode determination value mode = 0 (energization is off), the process proceeds to step 713, and a mode0 time counter CT0p that counts the time when mode = 0 in the P range is counted up. If the control mode determination value mode = 3 (target position stop holding process), the process proceeds to step 714, and a mode 3 time counter CT3p that counts the time when mode = 3 in the P range is counted up. These two time counters CT0p and CT3p are used to stand by until the vibration of the rotor 32 converges and stops in the P range.
[0209]
In the case of the control mode determination value mode = 1 (normal drive), 4 (reverse position stop holding process), and 5 (open loop control), the rotor 32 is not stopped in the P range. The count values of the time counters CT0p and CT3p are cleared.
[0210]
In step 715, it is determined whether the value of the mode 0 time counter CT0p exceeds the stop determination value K0p, or whether the value of the mode 3 time counter CT3p exceeds the stop determination value K3p. Here, the stop determination value K0p corresponds to the time required for the vibration of the rotor 32 to converge when the control mode determination value mode = 0 (energization off) in the P range, and the stop determination value K3p is the P range. This corresponds to the time required for the vibration of the rotor 32 to converge when the control mode determination value mode = 3 (target position stop holding process).
[0211]
If “No” is determined in Step 715, it is determined that the vibration of the rotor 32 has not converged, and the process proceeds to Step 716 where the P range side abutting control in progress flag Xexp = OFF is set. In this case, the P range side abutting control is not yet executed.
[0212]
On the other hand, if “Yes” is determined in Step 715, it is determined that the vibration of the rotor 32 has converged in the P range, and the process proceeds to Step 717 where the P range side abutting control in-progress flag Xexp = ON is set. .
[0213]
Thereafter, the process proceeds to step 718, where it is determined whether or not the P range side abutting control flag Xexp = ON. If Xexp = OFF, the process proceeds to step 719, where the abutting target count value Ag = 0 and the stop The time counter CTstop = 0 and the abutting control time counter CTg = 0 are set, and this routine ends.
[0214]
On the other hand, when the P range side abutting control flag Xexp = ON, the routine proceeds to step 720, where the abutting target count value Ag is set to a predetermined value Kgp. This abutting target count value Ag (Kgp) is set so that the engaging portion 23a of the detent spring 23 can be reliably abutted against the side wall of the P range holding recess 24 of the detent lever 15 by the P range side abutting control. Is done.
[0215]
When the P range side abutting control flag Xexp = ON, the target count value Acnt is set to the abutting target count value Ag (Kgp) by a target count value setting routine of FIG. As described above, the P range side abutting control is executed, and the engaging portion 23 a of the detent spring 23 is abutted against the side wall of the P range holding recess 24 of the detent lever 15.
[0216]
During the P range side abutting control, the abutting control time counter CTg is counted up at step 721 in FIG. 40, and the execution time of the P range side abutting control is measured. Then, in the next step 722, it is determined whether or not the execution time CTg of the P range side abutting control exceeds the allowable maximum learning time Kg (for example, 500 ms). If the P-range side abutting control is normally executed, the engaging portion 23a of the detent spring 23 comes into contact with the side wall of the P-range holding recess 24 of the detent lever 15 in a time shorter than the allowable maximum learning time Kg. Thus, the learning of the encoder count value Np at the time of P range side abutting (P range side abutting control) ends. Therefore, if the P range side abutting control does not end beyond the allowable maximum learning time Kg, it is considered that some system abnormality such as a failure of the SR motor 12 or a failure of the encoder 46 has occurred. In such a case, in order to forcibly end the P range side abutting control, the process proceeds to step 723, the P range side abutting control in progress flag Xexp = OFF, the P range side abutting completion flag Xp = OFF, and the stop The time counter CTstop = 0, the mode3 time counter CT3p = 0, the mode0 time counter CT0p = 0, and the abutting control time counter CTg = 0 are set, and this routine ends.
[0217]
On the other hand, when the execution time CTg of the P range side abutting control does not exceed the allowable maximum learning time Kg, the process proceeds to step 724, and the P range output learning value Vp of the output shaft sensor 14 is updated by the following equation. .
Vp (i) = Vp (i-1) + {Vnsw-Vp (i-1)} / Rnsw
Here, Vp (i) is the current P range output learning value, Vp (i-1) is the previous P range output learning value, Vnsw is the current output shaft sensor 14 output, and Rnsw is the annealing coefficient.
[0218]
In the next step 725, the learning value of the encoder count value at the time of P range side abutting (hereinafter referred to as “P range side abutting learning value”) GNp is updated by the following equation.
GNp (i) = min {GNp (i-1), Ncnt}
[0219]
Here, GNp (i) is the current P range-side abutting learning value, GNp (i-1) is the previous P-range-side abutting learning value, and Ncnt is the current encoder count value. The function min is a function that compares GNp (i−1) and Ncnt and selects the smaller one. As the encoder count value Ncnt, a value corrected by the initial positional deviation learning value Gcnt learned by the initial driving routine of FIGS. 8 and 9 is used.
[0220]
Thereafter, the process proceeds to step 726, where the detent spring 23 determines whether or not the current P range side abutting learned value GNp (i) and the previous P range side abutting learned value GNp (i-1) are the same. It is determined whether or not the engaging portion 23a has come into contact with the side wall of the P range holding recess 24 of the detent lever 15.
[0221]
As shown in FIG. 41, until the engaging portion 23a of the detent spring 23 comes into contact with the side wall of the P range holding recess 24 of the detent lever 15, the rotor 32 rotates and the encoder count value Ncnt gradually decreases. Therefore, the current P range-side butting learning value GNp (i) becomes smaller than the previous learning value GNp (i-1). Thereafter, when the engaging portion 23a of the detent spring 23 comes into contact with the side wall of the P range holding recess 24 of the detent lever 15, the rotation of the rotor 32 stops and the encoder count value Ncnt does not change, or Although it vibrates, the learned value GNp (i) is not updated, so that the current P range side abutting learned value GNp (i) and the previous P range side abutting learned value GNp (i-1) are the same. Alternatively, the current P range-side butting learning value GNp (i) is larger.
[0222]
If it is determined “No” in step 726 of FIG. 40, the engaging portion 23 a of the detent spring 23 is not in a state of hitting the side wall of the P range holding recess 24 of the detent lever 15, Proceed and reset the stop time counter CTstop.
[0223]
On the other hand, if “Yes” is determined in step 726, it is determined that the engaging portion 23 a of the detent spring 23 may have hit the side wall of the P range holding recess 24 of the detent lever 15. In step 728, the stop time counter CTstop that counts the time of the abutting state is counted up.
[0224]
Thereafter, the process proceeds to step 729, and the P-range side abutting control is continued until the value of the stop time counter CTstop exceeds a predetermined time Kstop (for example, 60 ms). Then, when the abutting state has continued for a predetermined time Kstop or more, it is determined that the abutting state has been confirmed, and the process proceeds to step 730 to complete the P range-side abutting control. Side abutting control in progress flag Xexp = OFF, P range side abutting completion flag Xp = ON, encoder count value Np = GNp + ΔNover at the time of P range abutting (ΔNover is a ride correction amount), stop time counter CTstop = 0, mode 3 The time counter CT3p = 0 and the mode0 time counter CT0p = 0 are set, and this routine ends.
[0225]
The running correction amount ΔNover is such that the engaging portion 23a of the detent lever 15 abuts against the side walls of the holding recesses 24 and 25 of the detent lever 15 when the abutting control is executed. It corresponds to the angle to climb a little. This riding correction amount ΔNover is set by the table of FIG. 37 according to the battery voltage that is the power supply voltage of the SR motor 12.
[0226]
When the abutting control is executed, the angle at which the engaging portion 23a of the detent spring 23 rides on the side walls of the holding recesses 24 and 25 of the detent lever 15 (climbing correction amount ΔNover) increases as the torque of the SR motor 12 increases. In general, since the torque of the SR motor 12 varies depending on the power supply voltage (battery voltage), there is a correlation between the power supply voltage (battery voltage) and the torque of the SR motor 12. It can be used as substitute information for the torque of the SR motor 12. Therefore, the angle at which the engaging portion 23a of the detent spring 23 rides on the side walls of the holding recesses 24 and 25 (climbing correction amount ΔNover) when the abutting control is executed is the substitute information for the torque of the SR motor 12. By calculating from the table of FIG. 37 based on the power supply voltage (battery voltage) and correcting the actual value ΔNact of the movable range of the rotor 32 by the amount of correction ΔNover, the actual value of the movable range can be obtained with high accuracy. Can do.
[0227]
If the shape of the side walls of the holding recesses 24 and 25 of the detent lever 15 is formed so that the engaging portion 23a of the detent spring 23 does not ride, the ride correction amount ΔNo becomes unnecessary and ΔNact = Nnp−Np.
[0228]
[NotP range side butting control]
The NotP range side abutting control routine shown in FIGS. 42 and 43 is a subroutine executed in step 703 of the play amount learning routine of FIG. 36 when the command shift range is the NotP range. When this routine is started, it is first determined in step 741 whether or not the NotP range side abutting completion flag Xnp = ON (after the NotP range side abutting control is finished), and the NotP range side abutting control has already been performed. If completed, this routine is terminated without performing the subsequent processing. Thereby, NotP range side butting control is performed only once during the ON period of the ignition switch.
[0229]
On the other hand, if it is determined in step 741 that the NotP range-side abutting completion flag Xnp = OFF (before the NotP range-side abutting control ends), the process proceeds to step 742, where the control mode determination value mode is 0 (energization off). ) 3 (target position stop holding process) is determined. In this routine, in order to perform NotP range side abutting control when the rotor 32 is stopped in the NotP range, the NotP range side abutting control is performed with the control mode determination value mode = 0 or 3. ing.
[0230]
If the control mode determination value mode = 0 (energization off), the process proceeds to step 743, and a mode0 time counter CT0np that counts the time in which the mode = 0 in the NotP range is counted up. When the control mode determination value mode = 3 (target position stop holding process), the process proceeds to step 744, and a mode 3 time counter CT3np that counts the time when the mode = 3 in the NotP range is counted up. These two time counters CT0np and CT3np are used to wait until the vibration of the rotor 32 converges and stops in the NotP range.
[0231]
If the control mode determination value mode = 1 (normal drive), 4 (reverse position stop holding process), and 5 (open loop control), the rotor 32 has not stopped in the NotP range, so the process proceeds to step 761. The count values of the time counters CT0np and CT3np are cleared.
[0232]
In step 745, it is determined whether or not the value of the mode0 time counter CT0np exceeds the stop determination value K0np or whether the value of the mode3 time counter CT3np exceeds the stop determination value K3np. Here, the stop determination value K0np corresponds to the time required for the vibration of the rotor 32 to converge when the control mode determination value mode = 0 (energization off) in the NotP range, and the stop determination value K3np is the NotP range. This corresponds to the time required for the vibration of the rotor 32 to converge when the control mode determination value mode = 3 (target position stop holding process).
[0233]
If “No” is determined in Step 745, it is determined that the vibration of the rotor 32 has not converged, and the process proceeds to Step 746 where the NotP range side abutting control flag Xexnp = OFF is set. In this case, the NotP range side butting control is not yet executed.
[0234]
On the other hand, if “Yes” is determined in Step 745, it is determined that the vibration of the rotor 32 has converged in the NotP range, and the process proceeds to Step 747 where the NotP range side abutting control in-progress flag Xexnp = ON is set. .
[0235]
Thereafter, the process proceeds to step 748, where it is determined whether or not the NotP range side abutting control flag Xexnp = ON. If Xexnp = OFF, the process proceeds to step 749, where the abutting target count value Ag = 0 and stopped. The time counter CTstop = 0 and the abutting control time counter CTg = 0 are set, and this routine ends.
[0236]
On the other hand, when the NotP range side abutting control flag Xexnp = ON, the routine proceeds to step 750, where the abutting target count value Ag is set to a predetermined value Kgnp. This abutting target count value Ag (Kgnp) is set so that the engaging portion 23a of the detent spring 23 can be abutted against the side wall of the NotP range holding recess 25 of the detent lever 15 by NotP range side abutting control. Is done.
[0237]
When the NotP range side abutting control flag Xexnp = ON, the target count value Acnt is set to the abutting target count value Ag (Kgnp) by the target count value setting routine of FIG. The contact control is executed, and the engaging portion 23 a of the detent spring 23 is abutted against the side wall of the NotP range holding recess 25 of the detent lever 15.
[0238]
During the NotP range side abutting control, in step 751 of FIG. 43, the abutting control time counter CTg is counted up, and the execution time of the NotP range side abutting control is measured. Then, in the next step 752, it is determined whether or not the execution time CTg of NotP range side abutting control has exceeded the allowable maximum learning time Kg (for example, 500 ms). If the NotP range side abutting control is normally executed, the engaging portion 23a of the detent spring 23 is in contact with the side wall of the NotP range holding recess 25 of the detent lever 15 in a time shorter than the allowable maximum learning time Kg. Thus, the learning of the encoder count value Nnp at the time of NotP range side abutting (NotP range side abutting control) ends. Therefore, if the NotP range side abutting control does not end beyond the allowable maximum learning time Kg, it is assumed that some system abnormality such as a failure of the SR motor 12 or a failure of the encoder 46 has occurred. In such a case, in order to forcibly terminate the NotP range side abutting control, the process proceeds to step 753, where the NotP range side abutting control in progress flag Xexnp = OFF, the NotP range side abutting completion flag Xnp = OFF, and stopped. The time counter CTstop = 0, the mode3 time counter CT3np = 0, the mode0 time counter CT0np = 0 and the abutting control time counter CTg = 0 are set, and this routine ends.
[0239]
On the other hand, if the execution time CTg of the NotP range side abutting control does not exceed the allowable maximum learning time Kg, the process proceeds to step 754, and the NotP range output learning value Vnp of the output shaft sensor 14 is updated by the following equation. .
Vnp (i) = Vnp (i-1) + {Vnsw-Vnp (i-1)} / Rnsw
Here, Vnp (i) is the current NotP range output learning value, Vnp (i-1) is the previous NotP range output learning value, Vnsw is the current output shaft sensor 14 output, and Rnsw is the smoothing coefficient.
[0240]
In the next step 755, the learning value of the encoder count value at the time of NotP range side abutting (hereinafter referred to as “NotP range side abutting learning value”) GNnp is updated by the following equation.
GNnp (i) = max {GNnp (i-1), Ncnt}
[0241]
Here, GNnp (i) is the current NotP range side learning value, GNnp (i-1) is the previous NotP range side learning value, and Ncnt is the current encoder count value. The function max is a function that compares GNnp (i-1) and Ncnt and selects the larger one. As the encoder count value Ncnt, a value corrected by the initial position deviation learning value Gcnt learned by the initial driving routine of FIGS. 8 and 9 is used.
[0242]
Thereafter, the process proceeds to step 756, where the detent spring 23 determines whether or not the current NotP range side abutting learned value GNnp (i) and the previous NotP range side abutting learned value GNnp (i-1) are the same. It is determined whether or not the engaging portion 23a has come into contact with the side wall of the NotP range holding recess 25 of the detent lever 15.
[0243]
During the NotP range abutting control, the rotor 32 rotates and the encoder count value Ncnt gradually increases until the engaging portion 23a of the detent spring 23 abuts against the side wall of the NotP range holding recess 25 of the detent lever 15. Since it increases, the current NotP range side abutting learning value GNnp (i) becomes larger than the previous learning value GNnp (i−1). Thereafter, when the engaging portion 23a of the detent spring 23 comes into contact with the side wall of the NotP range holding recess 25 of the detent lever 15, the rotation of the rotor 32 stops and the encoder count value Ncnt does not change, or Although it vibrates, the learned value GNnp (i) is not updated, so that the current NotP range side abutting learned value GNnp (i) and the previous NotP range side abutting learned value GNnp (i-1) are the same. Alternatively, the current NotP range side abutting learning value GNnp (i) becomes larger.
[0244]
If it is determined as “No” in Step 756 of FIG. 43, the engaging portion 23a of the detent spring 23 is not in contact with the side wall of the NotP range holding recess 25 of the detent lever 15, Proceed and reset the stop time counter CTstop.
[0245]
On the other hand, if “Yes” is determined in step 756, it is determined that the engaging portion 23a of the detent spring 23 may have hit the side wall of the NotP range holding recess 25 of the detent lever 15. Proceeding to step 758, a stop time counter CTstop that counts the time of this abutting state is counted up.
[0246]
Thereafter, the process proceeds to step 759, and the NotP range side abutting control is continued until the value of the stop time counter CTstop exceeds a predetermined time Kstop (for example, 60 ms). Then, when the abutting state continues for a predetermined time Kstop or longer, it is determined that the abutting state has been confirmed, and the process proceeds to step 760 to terminate the NotP range abutting control. Side abutting control in progress flag Xexnp = OFF, NotP range side abutting completion flag Xnp = ON, encoder count value Nnp = GNnp−ΔNover (ΔNover is a ride correction amount) at the time of NotP range abutting, stop time counter CTstop = 0 , Mode3 time counter CT3np = 0 and mode0 time counter CT0np = 0 are set, and this routine ends.
[0247]
FIG. 44 is a time chart showing an example of the execution timing of the P range-side butting control and the NotP range-side butting control. In the example of FIG. 44, after the ignition switch is turned on (after power-on), when the command shift range is switched from the P range to the NotP range for a while, the target count value Acnt is the provisional target count value of the NotP range. (For example, 18 °). The provisional target count value Acnt (18 °) corresponds to a rotation angle at which the engaging portion 23a of the detent spring 23 reliably climbs over the peak portion between the holding recesses 24 and 25 of the detent lever 15. Therefore, after the rotor 32 is rotated to the temporary target count value Acnt (18 °) by the F / B control, the engaging portion 23a of the detent spring 23 is moved to the NotP range of the detent lever 15 by the elastic force of the detent spring 23. The rotor 32 is rotated to the target position of the NotP range (the bottom of the NotP range holding recess 25) by using the force that falls to the bottom along the inclined side wall of the holding recess 25.
[0248]
Thereafter, when the NotP range side abutting control in-progress flag Xexnp = ON is set, the target count value Acnt is set to the NotP range side abutting target count value Ag (Kgnp), and the NotP range side abutting control is performed. Executed. Thereby, when the engaging portion 23a of the detent spring 23 hits the side wall of the NotP range holding recess 25 of the detent lever 15, the encoder count value Nnp (GNnp) is learned. After this learning is completed, the NotP range side abutting control flag Xexnp = OFF is set, and the NotP range side abutting control is terminated.
[0249]
Thereafter, when the command shift range is switched from the NotP range to the P range, the target count value Acnt is set to a temporary target count value (for example, 0 °) of the P range. As a result, after the rotor 32 is rotated to the provisional target count value Acnt (0 °) by the F / B control, the engaging portion 23a of the detent spring 23 is moved to the P of the detent lever 15 by the elastic force of the detent spring 23. The rotor 32 is rotated to the target position of the P range (the bottom of the P range holding recess 24) by using the force that falls on the bottom along the inclined side wall of the range holding recess 24.
[0250]
Thereafter, when the P range side abutting control in-progress flag Xexp = ON is set, the target count value Acnt is set to the P range abutting target count value Ag (Kgp), and the P range side abutting control is performed. Executed. As a result, the encoder count value Np (GNp) is learned when the engaging portion 23a of the detent spring 23 hits the side wall of the P range holding recess 24 of the detent lever 15. After completion of this learning, the P range side abutting control in-progress flag Xexp = OFF is set, and the P range side abutting control ends.
[0251]
[Target count value setting]
The target count value setting routine shown in FIGS. 45 and 46 is executed at a predetermined cycle (for example, 8 ms cycle) after the end of the initial driving. When this routine is started, it is first determined in step 771 whether or not the abutting control is being executed (P range side abutting control in progress flag Xexp = ON or NotP range side abutting control in progress flag Xexnp = ON). If the abutting control is being executed, the routine proceeds to step 772, where the target count value Acnt is set to the abutting target count value Ag. The abutting target count value Ag is set in step 720 of FIG. 39 or step 750 of FIG.
[0252]
On the other hand, if the abutting control is not being executed, the process proceeds to step 773, where it is determined whether or not the command shift range is the P range. Is determined (whether or not the P range side abutting completion flag Xp is ON), and if the P range side abutting control is completed, the process proceeds to step 775 and the target count value Acnt of the P range is reached. Is calculated by the following equation.
Acnt = Np + ΔGp
[0253]
Here, Np is the encoder count value at the time of P range side abutting, and the value GNp learned by the P range side abutting control routine of FIGS. 39 and 40 is used. ΔGp is a learning value of the play amount on the P range side. In step 706 of the play amount learning routine of FIG. 36, the learning value ΔGp of the current play amount is calculated, and the stored value in the nonvolatile memory of the ECU 41 is updated. Until that time, the previous value stored in the nonvolatile memory is used.
[0254]
On the other hand, when the P range side abutting control is not completed, it is determined as “No” in Step 774, and the process proceeds to Step 776 to determine whether the NotP range side abutting control is completed (NotP range side abutting). Whether or not the completion flag Xnp = ON is determined), and if the NotP range side abutting control is completed, the process proceeds to step 777, and the target count value Acnt of the P range is calculated by the following equation.
Acnt = Nnp−ΔNact + ΔGp
[0255]
Here, Nnp is an encoder count value at the time of NotP range side abutting, and the value GNnp learned by the NotP range side abutting control routine of FIGS. 42 and 43 is used. Further, ΔNact is an actual value of the movable range until the actual value ΔNact of the current movable range is calculated in step 705 of the play amount learning routine of FIG. 36 and the stored value in the nonvolatile memory of the ECU 41 is updated. The previous value stored in the nonvolatile memory is used.
[0256]
If both the P range side and NotP range side abutment controls are not completed (when both abutment completion flags Xp and Xnp on the P range side and NotP range side are both OFF), the P range side Since the encoder count values Np and Nnp at the time of butting and at the NotP range side butting are not learned, the target count value Acnt cannot be corrected by the play amounts ΔGp and ΔGnp. Accordingly, in this case, the process proceeds to step 778, and the target count value Acnt for the P range is set to 0, which is a provisional target count value for the P range.
[0257]
On the other hand, if it is determined in step 773 that the command shift range is the NotP range, the process proceeds to step 779 in FIG. 46, and whether or not the NotP range side abutting control is completed (NotP range side abutting completion flag Xnp = If the NotP range side abutting control is completed, the process proceeds to step 780, and the target count value Acnt of the NotP range is calculated by the following equation.
Acnt = Nnp−ΔGnp
[0258]
Here, ΔGnp is the learning value of the play amount on the NotP range side. In step 706 of the play amount learning routine of FIG. 36, the learning value ΔGnp of the current play amount is calculated and the stored value of the nonvolatile memory of the ECU 41 is Until the update, the previous value stored in the nonvolatile memory is used.
[0259]
On the other hand, if the NotP range side abutting control is not completed, it is determined as “No” in Step 779 and the process proceeds to Step 781 to determine whether or not the P range side abutting control is completed (P range side abutting). It is determined whether or not the completion flag Xp = ON), and if the P range side abutting control is completed, the process proceeds to step 782, and the target count value Acnt of the NotP range is calculated by the following equation.
Acnt = Np + ΔNact−ΔGnp
[0260]
If both the P range side and NotP range side abutting controls have not been completed (both the abutting completion flags Xp and Xnp on the P range side and the NotP range side are both OFF), step 783 is executed. Then, the target count value Acnt of the NotP range is set to the provisional target count value Knotp (for example, 18.5 °) of the NotP range.
[0261]
In this routine, when the target count value Acnt is set, the learning values ΔGp, ΔGnp of the play amount and the actual measurement value ΔNact of the movable range are not updated until the stored value in the nonvolatile memory of the ECU 41 is updated. Although the previous value stored in the nonvolatile memory is used, the provisional target count value (0 or Knott) may be set until the stored value in the nonvolatile memory is updated.
[0262]
[Recovery processing]
The recovery processing routine shown in FIG. 51 is started at a predetermined cycle (for example, 1 ms cycle), and executes the recovery processing when the F / B control state becomes abnormal as follows. When this routine is started, it is first determined in step 801 whether or not the recovery process execution flag Xrcv is OFF. If Xrcv = OFF (recovery process is not being executed), the process proceeds to step 802, where It is determined whether the recovery process execution conditions (1) to (4) are satisfied.
[0263]
(1) The A phase signal, B phase signal of the encoder 46, and the output signal of the output shaft sensor 14 are all normal.
(2) All abnormality detection flags Xfsww, Xfcnt, and Xfrcv set in the system abnormality diagnosis routine of FIG. 56 to be described later are all OFF (no abnormality).
(3) F / B permission flag Xfb is ON (F / B control in progress)
(4) One of the three abnormality detection flags Xfab, Xfta, and Xftb related to the A phase signal and the B phase signal set in the AB phase signal abnormality detection routine of FIG. 53 to be described later is ON (abnormal), or The reverse rotation detection flag Xr set in the reverse rotation determination routine of FIG. 55 to be described later is ON (with reverse rotation).
[0264]
If any one of the four conditions (1) to (4) does not satisfy the condition, the recovery process execution condition is not satisfied, and the routine is terminated without performing the subsequent processes.
[0265]
On the other hand, if the above conditions (1) to (4) are all satisfied, the recovery process execution condition is satisfied, the process proceeds from step 802 to step 803, the recovery process execution flag Xrcv is set to ON, and the next step 804 is set. Based on the relationship shown in FIG. 52, the current position count value Ncntop is calculated by the following equation using the output signal Vnsw of the current output shaft sensor 14.
Figure 2004048837
[0266]
Here, INT is a function for converting a numerical value in [] into an integer, Vp is a P range output learning value of the output shaft sensor 14, Vnp is a NotP range output learning value of the output shaft sensor 14, and Kop is the detent lever 15. The maximum rotation angle, Kofp, is an offset value on the P range side. The above equation is set so that the position count value Ncntop is a multiple of two.
[0267]
The maximum rotation angle Kop of the detent lever 15 is the rotation angle of the detent lever 15 from the side wall of the P range holding recess 24 to the side wall of the NotP range holding recess 25 of the detent lever 15, and is movable based on the relationship shown in FIG. It is obtained by adding the range design value ΔNd and the play amount ΔGp on the P range side. In this embodiment, ΔNd = 20.5 (deg) and ΔGp = 3 (deg).
Figure 2004048837
[0268]
In the calculation formula of the position count value Ncntop, Kop × 61 / 3.75 is a value obtained by converting the maximum rotation angle Kop of the detent lever 15 into the number of motor drive steps (number of excitations). “61” is the reduction ratio of the reduction mechanism 26, and “3.75” is the rotation angle of the rotor 32 in one step (per excitation). This position count value Ncntop is used as an initial value of the position count value Ncntop at the start of the open loop control.
[0269]
After calculating the position count value Ncntop, the process proceeds to step 805, where the recovery process execution number counter Crcv for counting the number of times the recovery process is executed is counted up. In the next step 806, the open loop control execution flag Xopen is set to ON. The open loop control is executed by an open loop control routine of FIG. 60 described later.
[0270]
During the execution of the recovery process (open loop control), every time this routine is started, “No” is determined in step 801 and the process proceeds to step 807, where the open loop control completion flag Xopcmp means that the open loop control is completed Whether Xopcmp = OFF is determined. This routine is terminated as it is, and the open loop control is continued.
[0271]
Thereafter, when the open loop control is completed, the process proceeds to Step 808, and in order to re-execute the initial drive, the initial drive end flag Xend = OFF (initial drive not completed), the range switching operation flag Xchg = OFF (range switching operation) None), energization time counter CT = 0, excitation number counter CASE = 0, encoder count value Ncnt = 0, and initial misregistration learning value Gcnt = 0. Further, in step 809, in order to re-execute the abutting control, the P range side abutting completion flag Xp = OFF (P range side abutting control not completed), the NotP range abutting completion flag Xnp = OFF (NotP range). Set to side impact control not completed). In the next step 810, the control mode determination value mode is set to the initial value “$ FF”, and then the process proceeds to step 811 where the open loop control execution flag Xopen = OFF is set and the open loop control (recovery process) is performed. finish. Further, in the next step 812, the recovery process execution flag Xrcv = OFF, the A phase signal / B phase signal abnormality detection flag Xfab = OFF, Xfta = OFF, Xftb = OFF, and a third abnormality detection flag Xfrcv = OFF described later. Set to.
[0272]
[AB phase signal error detection]
The AB phase signal abnormality detection routine shown in FIG. 53 is started at a predetermined cycle (for example, 1 ms cycle), and determines whether the A phase signal and the B phase signal of the encoder 46 are abnormal as follows. When this routine is started, first at step 821, the F / B permission flag Xfb = ON, the P range side abutting control in progress flag Xexp = OFF, and the NotP range side abutting control in progress flag Xexnp = OFF. It is determined whether or not there is, that is, whether or not the F / B control is currently being performed and the butting control is not being executed. If “No” is determined in this step 821, that is, the F / B permission flag Xfb = OFF, or the P range side abutting control in progress flag Xexp = ON, or the NotP range side abutting in-control flag Xexnp = If it is ON, the process proceeds to step 822, where the A phase signal counter Na = 0, the B phase signal counter Nb = 0, the A phase signal edge interval counter ΔTa = 0, and the B phase signal edge interval counter ΔTb = 0 are reset to End the routine.
[0273]
On the other hand, if “Yes” is determined in step 821, the AB phase signal abnormality determination execution condition is satisfied, the process proceeds to step 823, and the A phase signal count value Na and the B phase signal count value Nb are set. Deviation ΔNab is calculated.
ΔNab = | Na−Nb |
Here, the A-phase signal count value Na and the B-phase signal count value Nb are values obtained by separately counting the edges of the A-phase signal and the B-phase signal.
[0274]
In the next step 824, the AB phase signal count value deviation ΔNab is compared with the abnormality determination value Kab (eg, 3). If the AB phase signal count value deviation ΔNab is equal to or greater than the abnormality determination value Kab, the A phase signal It is determined that either the count value Na or the B phase signal count value Nb is abnormal, the process proceeds to step 825, the AB phase signal abnormality detection flag Xfab is set to ON (abnormal), and the next step 826 is performed. move on.
[0275]
On the other hand, if the AB phase signal count value deviation ΔNab is less than the abnormality determination value Kab, the AB phase signal abnormality detection flag Xfab is maintained OFF (no abnormality) and the routine proceeds to step 826.
[0276]
If the A-phase signal and the B-phase signal are normally output during the F / B control, the deviation ΔNab between the A-phase signal count value Na and the B-phase signal count value Nb becomes 0 or 1, so this AB phase If the signal count value deviation ΔNab is 2 or more, either one of the signals may be lost or a noise pulse may be mixed (see FIG. 48). Therefore, whether or not there is an abnormality in the A phase signal and the B phase signal can be determined based on whether or not the AB phase signal count value deviation ΔNab is equal to or greater than the abnormality determination value Kab. In the present embodiment, the abnormality determination value Kab is set to 3 with a margin, but may be set to 2 or 4 or more.
[0277]
As described above, after performing the abnormality determination process using the AB phase signal count value deviation ΔNab, the process proceeds to step 826, where the counters for counting the edge interval ΔTa of the A phase signal and the edge interval ΔTb of the B phase signal are counted up. Then, the process proceeds to step 827, where the A-phase signal edge interval ΔTa is compared with an abnormality determination value Kta (for example, a value that is 10 times the average value of ΔTa), and if the A-phase signal edge interval ΔTa is greater than or equal to the abnormality determination value Kta. If there is, it is determined that the A-phase signal is abnormal, the process proceeds to step 828, the A-phase signal abnormality detection flag Xfta is set to ON (abnormal), and the process proceeds to the next step 829.
[0278]
On the other hand, if the A-phase signal edge interval ΔTa is less than the abnormality determination value Kta, the A-phase signal abnormality detection flag Xfta is maintained OFF (no abnormality), and the process proceeds to Step 829. In step 829, the B-phase signal edge interval ΔTb is compared with an abnormality determination value Ktb (for example, a value 10 times the average value of ΔTb). If the B-phase signal edge interval ΔTb is equal to or greater than the abnormality determination value Ktb. If it is determined that the B phase signal is abnormal, the process proceeds to step 830, the B phase signal abnormality detection flag Xftb is set to ON (abnormal), and this routine is terminated.
[0279]
On the other hand, if the B-phase signal edge interval ΔTb is less than the abnormality determination value Ktb, the B-phase signal abnormality detection flag Xftb is maintained OFF (no abnormality), and this routine ends.
[0280]
Since the edge intervals ΔTa and ΔTb of each signal change according to the rotor rotational speed, if the edge intervals ΔTa and ΔTb of each signal become too long during the F / B control, the rotor 32 is abnormally stopped and the abnormal speed is increased. Since drop and missing pulse are considered (see FIG. 48), whether or not the edge intervals ΔTa and ΔTb of each signal are equal to or greater than the abnormality determination values Kta and Kta (for example, 10 times the average value of ΔTa and ΔTb) Whether there is an abnormality in the phase signal and the B phase signal can be determined.
[0281]
If the edge intervals ΔTa and ΔTb of each signal are too short, the noise pulse may be misidentified as a regular pulse signal, so the edge intervals ΔTa and ΔTb of each signal are less than a predetermined abnormality determination value. Whether or not there is an abnormality in the A-phase signal and the B-phase signal may be determined depending on whether or not.
[0282]
Further, only one of the abnormality determination processing based on the AB phase signal count value deviation ΔNab (steps 823 to 825) and the abnormality determination processing based on the edge intervals ΔTa and ΔTb of each signal (steps 826 to 830) is performed. Processing may be omitted.
The AB phase signal abnormality detection routine described above serves as abnormality monitoring means in the claims.
[0283]
[Reverse counter]
The reverse rotation counter routine shown in FIG. 54 is executed by the AB phase interruption process, and counts the number of times that the rotation direction of the rotor 32 is continuously reversed against the rotation direction instruction as follows. When this routine is started, first, in step 831, any one of the rotation direction instruction value D is 1 (P range → NotP range rotation direction), 0 (stop), −1 (NotP range → P range rotation direction). If the rotation direction instruction value D is 0 (stop), this routine is terminated without performing the subsequent processing.
[0284]
On the other hand, if the rotation direction instruction value D is 1 (P range → NotP range rotation direction), the process proceeds to step 832 and the previous encoder count value Ncnt (i−1) and the current encoder count value Ncnt (i) It is determined whether the rotation direction of the rotor 32 is reversed against the rotation direction instruction (whether the encoder count value Ncnt has decreased) or not. In step 834, the reverse counter Cr for counting the number of reverse rotations is counted up. If not, the process proceeds to step 835, and the reverse counter Cr is reset to zero.
[0285]
On the other hand, if the rotation direction instruction value D is −1 (the rotation direction of NotP range → P range), the process proceeds to step 833, and the previous encoder count value Ncnt (i−1) and the current encoder count value Ncnt (i). It is determined whether or not the rotation direction of the rotor 32 is reversed against the rotation direction instruction (whether or not the encoder count value Ncnt has increased). If so, the process proceeds to step 836, where the reverse counter Cr is counted up. If not, the process proceeds to step 835, where the reverse counter Cr is reset to zero.
[0286]
[Reverse rotation judgment]
The reverse rotation determination routine shown in FIG. 55 is started at a predetermined cycle (for example, 1 ms cycle), and plays a role as abnormality monitoring means in the claims together with the reverse rotation counter routine of FIG.
[0287]
When this routine is started, first, in step 841, the F / B permission flag Xfb = ON, the P range side abutting control in progress flag Xexp = OFF, and the NotP range side abutting control in progress flag Xexnp = OFF. It is determined whether or not there is, that is, whether or not the F / B control is currently being performed and the butting control is not being executed. If “No” is determined in step 841, that is, the F / B permission flag Xfb = OFF, or the P range side abutting control in-progress flag Xexp = ON, or the NotP range side abutting in-control flag Xexnp = If it is ON, the process proceeds to step 844, the reverse rotation detection flag Xr is set to OFF, and this routine ends.
[0288]
On the other hand, if “Yes” is determined in step 841, the reverse rotation determination execution condition is satisfied, the process proceeds to step 842, and the reverse rotation count value Cr obtained by the reverse rotation counter routine of FIG. 54 is the abnormality determination value Kr. It is determined whether or not the rotor 32 continues to reversely rotate against the rotation direction instruction depending on whether or not (for example, 4) or more. If the reverse rotation count value Cr is equal to or greater than the abnormality determination value Kr, the process proceeds to step 843. Then, the reverse rotation detection flag Xr is set to ON to determine the reverse rotation determination. If the reverse rotation count value Cr is less than the abnormality determination value Kr, the process proceeds to step 844, and the reverse rotation detection flag Xr is maintained OFF.
[0289]
[System abnormality diagnosis]
The system abnormality diagnosis routine shown in FIG. 56 is started at a predetermined cycle (for example, 8 ms cycle), and performs an abnormality diagnosis of the entire system as follows. When this routine is started, it is first determined in step 851 whether or not the following abnormality diagnosis execution conditions (1) to (3) are satisfied.
[0290]
(1) A predetermined time (for example, 1 s) has elapsed since the ECU 41 was turned on by operating an ignition switch (not shown).
(2) The butt control is not in progress (the P range side butt control flag Xexp = OFF and the NotP range butt control flag Xexnp = OFF)
(3) Recovery processing is not being executed (recovery processing execution flag Xrcv = OFF)
If any one of the three conditions (1) to (3) does not satisfy the condition, the abnormality diagnosis execution condition is not satisfied, and the routine proceeds to step 852, where temporary abnormal condition duration counters Cfsw and Cfcnt described later are set to 0. To end the routine.
[0291]
On the other hand, if all of the above conditions (1) to (3) are satisfied, the abnormality diagnosis execution condition is satisfied, the process proceeds from step 851 to step 853, and whether or not the abutting control is completed (P range side abutting). Whether or not the contact completion flag Xp = ON and the NotP range-side impact completion flag Xnp = ON). As a result, if it is determined that the abutting control is completed, the process proceeds to step 854, where the output shaft sensor 14 is normal and the command shift range and the range determined from the output signal Vnsw of the output shaft sensor 14 are determined. If the determination result is “Yes”, the process proceeds to step 856 to reset the first provisional abnormal state duration counter Cfunsw to 0.
[0292]
On the other hand, if the determination result in the above step 854 is “No”, the process proceeds to step 855, where the first temporary abnormal state duration counter Cfunsw is counted up, and the command shift range and the output signal of the output shaft sensor 14 are counted. The duration of the state in which Vnsw does not match is measured, and in the next step 857, it is determined whether or not the value of the first temporary abnormal state duration counter Cfunsw is larger than the abnormality determination value Kfunsw. Here, the abnormality determination value Kfunsw is set to a time (for example, 10 s) sufficiently longer than the longest time required for a normal range switching operation. Accordingly, if the value of the first temporary abnormal state duration counter Cfunsw is larger than the abnormality determination value Kfunsw, the range switching operation is not performed normally, and it is determined that there is an abnormality in the system. Proceeding to 858, the first abnormality detection flag Xfunsw is set to ON. If the determination result in step 857 is “No”, the first abnormality detection flag Xfunsw is maintained OFF (no abnormality).
[0293]
As described above, after the first abnormality diagnosis is performed using the output signal Vnsw of the output shaft sensor 14, the process proceeds to Step 859 in FIG. 57, and the deviation | Ncnt− between the encoder count value Ncnt and the target count value Acnt It is determined whether or not Acnt | is larger than a predetermined value Kcnt (for example, a value corresponding to 5 °). If the count value deviation | Ncnt−Acnt | is equal to or smaller than the predetermined value Kcnt, the process proceeds to step 861 and the second temporary The abnormal state duration counter Cfcnt is reset to zero.
[0294]
On the other hand, if the determination result in step 859 is “Yes”, the process proceeds to step 860, where the second temporary abnormal state duration counter Cfcnt is counted up, and the count value deviation | Ncnt−Acnt | The duration of the state larger than Kcnt is measured, and in the next step 862, it is determined whether or not the value of the second temporary abnormal state duration counter Cfcnt is larger than the abnormality determination value Kfcnt. Here, the abnormality determination value Kfcnt is set to a time (for example, 10 s) sufficiently longer than the longest time required for a normal range switching operation. Therefore, if the value of the second temporary abnormal condition duration counter Cfcnt is larger than the abnormality determination value Kfcnt, it is determined that the system is abnormal because the range switching operation is not performed normally. Proceeding to 863, the second abnormality detection flag Xfcnt is set to ON. If the determination result in step 862 is “No”, the second abnormality detection flag Xfcnt is maintained OFF (no abnormality).
[0295]
As described above, after the second abnormality diagnosis is performed using the count value deviation | Ncnt−Acnt |, the process proceeds to step 864 and the number of times of recovery process execution Crcv counted in step 805 of the recovery process routine of FIG. Is greater than or equal to the abnormality determination value Kcrv (for example, 3 times), and if the number of recovery processing executions Crcv is greater than or equal to the abnormality determination value Kcrv, the process proceeds to step 865 to determine that there is a system abnormality, Proceeding to 865, the third abnormality detection flag Xfrcv is set to ON, and this routine ends. In other words, if the recovery process is continuously repeated more than the abnormality determination value Kcrv (for example, three times), the F / B control system is in a state of not functioning normally, and therefore it is determined that there is a system abnormality. is there.
[0296]
On the other hand, if the number of recovery processing executions Crcv is less than the abnormality determination value Kcrv, the third abnormality detection flag Xfrcv is maintained OFF (no abnormality), and this routine ends.
[0297]
[Fail-safe processing]
The fail-safe processing routine shown in FIG. 58 is activated at a predetermined cycle (for example, 8 ms cycle), and executes the fail-safe processing as follows. When this routine is started, first, in step 901, it is determined whether or not the following fail safe processing execution conditions (1) and (2) are satisfied.
[0298]
(1) The range can be switched by open loop control (the system failure flag Xfailoff = OFF)
(2) At least one of the three abnormality detection flags Xfsww, Xfcnt, and Xfrcv set in the system abnormality diagnosis routine of FIG. 56 is ON (abnormal).
If any one of these two conditions (1) and (2) is not satisfied, the fail-safe process execution condition is not established, and this routine is terminated without performing the subsequent processes.
[0299]
On the other hand, if both of the above two conditions (1) and (2) are satisfied, the fail safe process execution condition is satisfied, the process proceeds from step 901 to step 902, the fail safe process execution flag Xfsop is set to ON, In the next step 903, a warning lamp is turned on or a warning is displayed on the information display section of the meter panel to warn the driver.
[0300]
Thereafter, the process proceeds to step 904, where it is determined whether or not the value of a fail safe process interval counter Cfsop that measures the elapsed time after the end of the previous fail safe process is less than a predetermined value Kfsop. Here, the predetermined value Kfsop is equal to the engagement portion 23a of the detent spring 23 sliding down to the bottom along the inclined side walls of the holding recesses 24 and 25 of the detent lever 15 by the elastic force of the detent spring 23 after the end of the previous fail safe process It is set to a time (for example, 500 ms) that is somewhat longer than the time required for this.
[0301]
If the value of the fail safe processing interval counter Cfsop (elapsed time after the end of the previous fail safe processing) is less than the predetermined value Kfsop, the process proceeds to step 905 and the fail safe processing interval counter Cfsop is counted up to increase the previous fail safe processing Count elapsed time after completion. Thereafter, the process proceeds to step 906, where the state where the energization of all phases is turned off is continued. In the next step 907, the energization flag Xon is set to OFF which means deenergization off, and this routine is terminated. Thereby, the energization of all phases is maintained in the off state until the elapsed time after the end of the previous fail-safe process exceeds the predetermined value Kfsop.
[0302]
Thereafter, when the value of the fail safe processing interval counter Cfsop (the elapsed time after the end of the previous fail safe processing) becomes equal to or greater than the predetermined value Kfsop, the process proceeds from step 904 to step 908, and the open loop control execution flag Xopen is OFF. If it is OFF, the process proceeds to step 909 to determine whether or not a range switching operation has been performed. As a result, if it is determined that the range switching operation has not been performed, the process proceeds to step 910, and the state where all phases are de-energized is continued.
[0303]
On the other hand, if it is determined in step 909 that the range switching operation has been performed, the process proceeds to step 911, where the output of the current output shaft sensor 14 is output in the same manner as in step 804 of the recovery processing routine of FIG. A current position count value Ncntop is calculated using the signal Vnsw. This position count value Ncntop is used as an initial value of the position count value Ncntop at the start of the open loop control.
[0304]
Thereafter, the process proceeds to step 912, the open loop control execution flag Xopen is set to ON, and the open loop control is executed by the open loop control routine of FIG. 60 described later. In the next step 913, the number of fail safe processing executions Is counted up, and this routine is terminated.
[0305]
If it is determined in step 908 that the open loop control execution flag Xopen is ON, the process proceeds to step 914 in FIG. 59, and the open loop control completion flag Xopcmp is set to ON meaning that the open loop control is complete. If Xopcmp = OFF, this routine is terminated without performing the subsequent processing.
[0306]
On the other hand, if it is determined in step 914 that the open loop control completion flag Xopcmp is set to ON, the process proceeds to step 915, where the command shift range and the range determined from the output signal Vnsw of the output shaft sensor 14 are determined. If the determination result is “Yes”, the process proceeds to step 916, and the fail-safe process execution number counter Cfs is reset to zero. In the next step 918, the open loop control completion flag Xopcmp is set to OFF, and in the next step 919, the open loop control execution flag Xopen is set to OFF, and this routine ends.
[0307]
If it is determined in step 915 that the command shift range and the output signal Vnsw of the output shaft sensor 14 do not match, the process proceeds to step 917, where the value of the fail safe process execution number counter Cfs is the failure determination value. It is determined whether or not (for example, 3 times) or more, and if the value of the fail safe processing execution number counter Cfs is less than the failure determination value, it is not determined that there is a failure yet, and the open loop control completion flag Xopcmp = OFF Then, the open loop control execution flag Xopen = OFF is set (steps 918 and 919), and this routine is terminated.
[0308]
After that, if the value of the fail safe processing execution counter Cfs is equal to or greater than a failure determination value (for example, 3 times), it is determined at that time that the system is faulty (a state in which range switching is impossible even with open loop control), Proceeding from step 917 to step 920, the system failure flag Xfailloff is set to ON, and in the next step 921, energization of all phases is turned off, and this routine is terminated.
[0309]
[Open loop control]
The open loop control routine shown in FIG. 60 is activated at a predetermined cycle (for example, 1 ms cycle), and performs open loop control as follows. When this routine is started, it is first determined in step 931 whether or not the open loop control execution flag Xopen is set to ON. If Xopen = OFF, this routine is executed without performing the subsequent processing. finish.
[0310]
On the other hand, if the open loop control execution flag Xopen is set to ON, the process proceeds from step 931 to step 932, where the time counter Top that measures time is counted up, and in the next step 933, the value of the time counter Top is counted. Is determined to be equal to or greater than the excitation time tm of the current energized phase, and if it is less than the excitation time tm, this routine is terminated without performing the subsequent processing. Thereby, the process after step 934 is performed for every excitation time tm.
[0311]
Thereafter, when the value of the time counter Top becomes equal to or greater than the excitation time tm of the current energized phase, the process proceeds from step 933 to step 934, the target count value Acnt and the current position count value Ncntop are compared, and the rotor 32 The driving direction is determined. As a result, when the current position count value Ncntop is smaller than the target count value Acnt, it is determined that the drive direction of the rotor 32 is the rotation direction (forward rotation direction) from the P range side to the NotP range side, and the process proceeds to step 935. Then, the energized phase determination value Mptnop is incremented by one, and in the next step 936, the position count value Ncntop is incremented by two. This is because the rotor 32 rotates by 2 counts (3.75 °) by one excitation.
[0312]
On the other hand, if the current position count value Ncntop is larger than the target count value Acnt, it is determined that the drive direction of the rotor 32 is the rotation direction from the NotP range side to the P range side (reverse rotation direction), and step 937 Then, the energized phase determination value Mptnop is counted down by 1 and the position count value Ncntop is counted down by 2 in the next step 938.
[0313]
Thereafter, the process proceeds to step 939, and the remainder Mptnop% 6 when the energized phase determination value Mptnop is divided by “6” is calculated. Here, “6” corresponds to an increase / decrease amount of the energized phase determination value Mptnop during the cycle of the energized phase in the open loop control.
[0314]
After calculating Mptnop% 6, the process proceeds to step 940, where an energized phase is selected according to Mptnop% 6 from the table of FIG. In the present embodiment, during the open loop control, the energized phase is selected so as to drive by the 1-2 phase excitation method, and the first excitation when starting the open loop control is the two-phase energization (WU phase energization or UV phase energization or VW phase energization), that is, the initial value of the energization phase determination value Mptnop is set so that Mptnop% 6 = 1, 3 or 5.
[0315]
Thereafter, the process proceeds to step 941 in FIG. 61, and the position deviation dev is calculated by the following equation.
dev = | Acnt-Ncntop | / 2
As is apparent from the above equation, the position deviation dev is ½ of the deviation (absolute value) between the target count value Acnt and the current position count value Ncntop.
[0316]
In the next step 942, the position deviation dev is compared with the rotation speed parameter mspd. The rotational speed parameter mspd is a parameter that is increased or decreased according to the position deviation dev. By setting the excitation time tm according to the rotational speed parameter mspd according to the table of FIG. 65, the rotational speed, acceleration, Control deceleration. In this case, as the target rotational speed increases, the rotational speed parameter mspd increases and the excitation time tm is set to a short time. The initial value of the rotation speed parameter mspd is 0.
[0317]
If it is determined in step 942 that the position deviation dev is larger than the rotational speed parameter mspd, the process proceeds to step 943, where the rotational speed parameter mspd is incremented by 1. In the next step 944, the minimum rotational speed parameter mspdmin is set. Set to 0. The minimum rotation speed parameter mspdmin is a parameter (lower limit guard value) that limits the minimum value of the rotation speed parameter mspd. As described above, when the position deviation dev is larger than the rotation speed parameter mspd, the excitation time tm is set in the period from the start of the open loop control until the rotor 32 starts rotating by setting the minimum rotation speed parameter mspdmin to 0. The longest time (50 ms) can be set.
[0318]
On the other hand, if it is determined in step 942 that the position deviation dev is smaller than the rotational speed parameter mspd, the process proceeds to step 945, where the rotational speed parameter mspd is counted down by 1, and in the next step 946, the minimum rotational speed parameter mspdmin is reached. Is set to 4. Thereby, after the rotation of the rotor 32 is started, the excitation time tm can be limited to, for example, 5 ms or less.
[0319]
If it is determined in step 942 that the position deviation dev matches the rotational speed parameter mspd, the process proceeds to step 947 without changing the rotational speed parameter mspd, and the minimum rotational speed parameter mspdmin is set to zero.
[0320]
After the rotational speed parameter mspd and the minimum rotational speed parameter mspdmin are set as described above, the process proceeds to step 948, and the maximum rotational speed parameter mspdmax is set according to the battery voltage (power supply voltage) using the table of FIG. . The maximum rotation speed parameter mspdmax is a parameter (upper limit guard value) that limits the maximum value of the rotation speed parameter mspd. The higher the battery voltage, the larger the maximum rotation speed parameter mspdmax and the faster the rotation speed of the rotor 32. I can do it.
[0321]
In the next step 949, guard processing is performed so that the rotational speed parameter mspd falls within the range between the minimum rotational speed parameter mspdmin and the maximum rotational speed parameter mspdmax. For example, when the rotational speed parameter mspd updated in step 943 or 945 is smaller than the minimum rotational speed parameter mspdmin, mspd = mspdmin is set. When the rotational speed parameter mspd is larger than the maximum rotational speed parameter mspdmax, mspd = When mspdmax is set and mspdmin ≦ mspd ≦ mspdmax, the rotational speed parameter mspd is used as it is.
[0322]
Thereafter, the process proceeds to step 950, and the excitation time tm is set according to the rotation speed parameter mspd using the table of FIG. In the example of FIG. 65, when the rotational speed parameter mspd is in the range of 0 to 3, the excitation time tm is set to the longest time (for example, 50 ms), and the rotation phase of the rotor 32 and the energized phase are reliably synchronized at the time of startup. To be able to. When the rotational speed parameter mspd is in the range of 4 to 9, the excitation time tm is reduced to 3 levels from 5 ms to 3 ms, for example, and the rotational speed of the rotor 32 is adjusted to 3 levels as the rotational speed parameter mspd increases. It can be done. Needless to say, the switching of the excitation time tm may be two steps or less or four steps or more.
[0323]
After setting the excitation time tm, the routine proceeds to step 951, where the energization flag Xon is set to ON, and at the next step 952, the time counter Top is cleared and this routine is terminated.
[0324]
If it is determined in step 934 in FIG. 60 that the current position count value Ncntop matches the target count value Acnt, the process proceeds to step 955 in FIG. 62, and the measurement time of the time counter Top is a predetermined time Khld (for example, 500 ms). ) It is determined whether or not the above has been reached. As a result, when it is determined that the measurement time of the time counter Top is less than the predetermined time Khld, the process proceeds to step 956, the energization of all phases is turned off, and in the next step 957, the excitation time tm is set to the predetermined time Khld (for example, 500 ms) ). Thereafter, the process proceeds to step 952 in FIG. 61, where the time counter Top is cleared and this routine is terminated. Due to such processing, the processing after step 934 in FIG. 60 is not performed until a predetermined time Khld (for example, 500 ms) elapses after the end of the open loop control, so that the next open loop control is not started. This is to wait until the engaging portion 23a of the detent spring 23 slides to the bottom along the inclined side walls of the holding recesses 24 and 25 of the detent lever 15 by the elastic force of the detent spring 23 after the open loop control is finished.
[0325]
If it is determined in step 955 in FIG. 62 that the value of the time counter Top has become equal to or greater than the predetermined value Khld, the process proceeds to step 958, where the energized phase determination value Mptnop = 0 and the rotation speed parameter mspd = 0 are set. In the next step 959, the open loop control completion flag Xopcmp is set to ON. Thereafter, the process proceeds to step 960, where the excitation time Tm is set to 0. In the next step 961, the energization flag Xon is set to OFF, and then the process proceeds to step 952 in FIG. 61, where the time counter Top is cleared and this routine is executed. Exit.
[0326]
In this routine described above, the excitation method during the open loop control is set to the 1-2 phase excitation method. As shown in FIG. 50, for example, three steps from the start of the open loop control, the excitation time tm of each energized phase. Is set to the longest time (for example, 50 ms), and the rotor 32 is securely held and the rotational phase of the rotor 32 and the energized phase are reliably synchronized. Thereafter, the excitation time tm is significantly shortened, but as the rotational speed of the rotor 32 increases, the excitation time tm is gradually shortened to gradually increase the rotational speed of the rotor 32.
[0327]
During the open loop control, the position count value Ncntop is incremented by 2 (or counted down) every time the energized phase is switched, the rotational position of the rotor 32 is estimated based on the position count value Ncntop, and the position count value Ncntop When the deviation between the target count value Acnt and the target count value Acnt becomes small to some extent, it is determined that the vehicle has entered the deceleration region, the excitation time tm is gradually increased, and the rotational speed of the rotor 32 is gradually reduced. When Ncntop reaches the target count value Acnt, it is determined that the rotor 32 has reached the target position, the open loop control is terminated, and the F / B control is restored.
[0328]
[Engine torque suppression during open loop control]
The open-loop control engine torque suppression routine shown in FIG. 66 is started at a predetermined cycle (for example, 1 ms cycle). When this routine is started, first, at step 971, it is determined whether or not the open loop control execution flag Xopen = ON. If Xopen = ON, the routine proceeds to step 972, where the engine torque suppression flag Xtrq is turned ON. If Xopen = OFF, the routine proceeds to step 973, where the engine torque suppression flag Xtrq is set to OFF. Information on the engine torque suppression flag Xtrq is transmitted from the ECU 41 for range switching control to an ECU (not shown) for engine control.
[0329]
When the engine control ECU receives the information of the open loop control execution flag Xopen = ON, the engine control ECU controls the engine control parameter in a direction to suppress the engine torque, and performs the open loop control in a state in which the engine torque is suppressed. Perform the range switching operation.
[0330]
At this time, at least one of the air system, the fuel system, and the ignition system may be used as the engine control parameter for controlling the engine torque to be suppressed. For example, in the case of the air system, the throttle valve is opened. Driving may be prohibited to maintain the current throttle opening, or the throttle opening may be closed within a range that does not hinder driving. In the case of a fuel system, the fuel injection amount may be limited within a range that does not hinder driving. In the case of an ignition system, the ignition timing is delayed within a range that does not hinder driving. You should make it horn.
[0331]
Next, an execution example of the recovery process of the present embodiment will be described with reference to the time chart of FIG. FIG. 47 shows the control when the F / B control state becomes abnormal during the switching of the shift range from the P range to the NotP range, and the rotor 32 stops abnormally or the encoder count value Ncnt count operation stops abnormally. An example is shown.
[0332]
During F / B control for switching the shift range from the P range to the NotP range, it is monitored whether the F / B control state is normal or abnormal, and when the abnormality is detected, the recovery process execution flag Xrcv is switched from OFF to ON. . Thereby, the recovery processing is started by switching from the F / B control to the open loop control.
[0333]
At the start of the open loop control (recovery process), the initial value of the position count value Ncntop during the open loop control is calculated using the output signal Vnsw of the output shaft sensor 14. During the open loop control (recovery process), the energized phase is sequentially switched without feeding back the information of the encoder count value Ncnt to rotationally drive the rotor 32, and at each time the energized phase is switched during the open loop control. The count value Ncntop is counted up (or counted down) by two, and when the position count value Ncntop reaches the target count value Acnt, it is determined that the rotor 32 has reached the target position, and the recovery process execution flag Xrcv is set. Switch from ON to OFF. As a result, the open loop control (recovery process) is terminated and the process returns to the F / B control.
[0334]
In the present embodiment described above, even if the encoder count value Ncnt is abnormal or step-out occurs during the F / B control, the F / B control state (rotation state of the rotor 32) becomes temporarily abnormal. The rotor 32 can be rotated to the target position by switching from the F / B control to the open loop control, and the reliability of the motor control (range switching control) can be improved.
[0335]
By the way, during the open loop control, the energized phase is selected and the rotor 32 is driven regardless of the encoder count value Ncnt. Therefore, during the open loop control, the encoder count value Ncnt and the rotational position of the rotor 32 (range switching mechanism). 11 operation amount) may be deviated.
[0336]
As a countermeasure against this, in this embodiment, when returning from open loop control to F / B control, initial drive and one-way / other-direction butting control are re-executed. Even if the relationship between the value Ncnt and the rotational position of the rotor 32 (the amount of operation of the range switching mechanism 11) deviates, the deviation can be corrected with high accuracy by initial drive and one-way / other-direction abutting control.
[0337]
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.
Further, the motor used in the present invention is not limited to the SR motor 12, and any brushless motor that detects the rotational position of the rotor based on the count value of the output signal of the encoder and sequentially switches the energized phase of the motor. A brushless motor other than the SR motor may be used.
[0338]
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 be applied to a range switching device that switches the ranges of P, R, N, D,.
[0339]
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 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 flow of processing 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 diagram showing an example of a table for setting an energization duty ratio according to a battery voltage during abutting control.
FIG. 30 is a flowchart showing the flow of processing of an F / B control routine.
FIG. 31 is a flowchart showing a flow of processing of an energized phase setting routine.
FIG. 32 is a time chart for explaining energization processing when rotation is started from the UW phase.
FIG. 33 is a flowchart showing a processing flow of a rotor rotation speed calculation routine.
FIG. 34 is a flowchart showing the flow of processing of a speed phase advance correction amount setting routine;
FIG. 35 is a view for explaining the relationship between the engaging portion of the detent spring, the P range holding recess of the detent lever, and the NotP range holding recess.
FIG. 36 is a flowchart showing the flow of processing of a play amount learning routine.
FIG. 37 is a diagram illustrating an example of a table for setting a ride-on correction amount ΔVover according to a battery voltage.
FIG. 38 is a diagram for explaining the relationship between the actual measurement value ΔNact, the design value ΔNd, and the play amounts ΔGp, ΔGnp of the movable range;
FIG. 39 is a flowchart (No. 1) showing the flow of processing of a P range side abutting control routine;
FIG. 40 is a flowchart (part 2) showing the flow of processing of a P range side abutting control routine;
FIG. 41 is a time chart for explaining an example of P-range side abutting control.
FIG. 42 is a flowchart (No. 1) showing a flow of processing of a NotP range side butting control routine;
FIG. 43 is a flowchart (No. 2) showing the flow of processing of a NotP range side abutting control routine;
FIG. 44 is a time chart for explaining an example of execution timing of P range side butting control and NotP range side butting control;
FIG. 45 is a flowchart (No. 1) showing the flow of processing of a target count value setting routine;
FIG. 46 is a flowchart showing the process flow of a target count value setting routine (part 2).
FIG. 47 is a time chart for explaining an example of recovery processing;
FIG. 48 is a diagram for explaining a method of detecting an abnormality in an A phase signal / B phase signal of an encoder;
FIG. 49 is a diagram for explaining a method of detecting the reverse rotation of the rotor during F / B control.
FIG. 50 is a time chart illustrating an example of open loop control.
FIG. 51 is a flowchart showing the flow of processing of a recovery processing routine
FIG. 52 is a diagram for explaining a method of calculating an initial value of a position count value Ncnt at the start of open loop control.
FIG. 53 is a flowchart showing a flow of processing of an AB phase signal abnormality detection routine;
FIG. 54 is a flowchart showing the flow of processing of a reverse rotation counter routine.
FIG. 55 is a flowchart showing a process flow of a reverse rotation determination routine.
FIG. 56 is a flowchart showing the flow of processing of a system abnormality diagnosis routine (part 1);
FIG. 57 is a flowchart (2) showing the flow of processing of the system abnormality diagnosis routine;
FIG. 58 is a flowchart showing a flow of processing of a fail-safe processing routine (part 1).
FIG. 59 is a flowchart (2) showing the flow of processing of a fail-safe processing routine;
FIG. 60 is a flowchart showing the flow of processing of an open loop control routine (part 1).
FIG. 61 is a flowchart showing the flow of processing of an open loop control routine (part 2).
FIG. 62 is a flowchart (No. 3) showing the flow of processing of an open loop control routine;
FIG. 63 is a diagram showing an example of a conversion table from Mptnop% 6 to energized phase;
FIG. 64 is a diagram showing an example of a table for obtaining the maximum rotation speed parameter mspdmax from the battery voltage.
FIG. 65 is a diagram showing an example of a table for obtaining the excitation time tm from the rotation speed parameter mspd.
FIG. 66 is a flowchart showing the flow of processing of an engine torque suppression routine during open loop control;
[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, 23a ... Engagement part, 24 ... P range holding recess, 25 ... NotP range holding recess, 26 ... deceleration mechanism, 27 ... automatic transmission, 31 ... stator, 32 ... rotor, 33, 34 ... winding, 35, 36 ... motor excitation unit, 37, 38 ... Motor driver, 41 ... ECU (control means, abnormality monitoring means), 43 ... P range switch, 44 ... NotP range switch, 46 ... encoder, 47 ... rotary magnet, 48 ... magnetic detection element for A phase signal, 49 ... B Magnetic detection element for phase signal, 50... Magnetic detection element for Z-phase signal.

Claims (10)

制御対象を回転駆動するモータのロータの回転に同期してパルス信号を出力するエンコーダと、このエンコーダのパルス信号のカウント値(以下「エンコーダカウント値」という)に基づいて前記ロータの回転位置を検出して前記モータの通電相を順次切り換えることで前記ロータを目標位置まで回転駆動するフィードバック制御(以下「F/B制御」と表記する)を実行する制御手段とを備えたモータ制御装置において、
前記モータのF/B制御状態の異常の有無を監視する異常監視手段を備え、
前記制御手段は、前記異常監視手段により前記F/B制御状態の異常が検出されたときに、前記F/B制御からオープンループ制御に切り換えて、前記エンコーダカウント値の情報をフィードバックせずに前記モータの通電相を順次切り換えて前記ロータを回転駆動することを特徴とするモータ制御装置。
An encoder that outputs a pulse signal in synchronization with the rotation of the rotor of the motor that rotates the control target, and the rotational position of the rotor is detected based on the count value (hereinafter referred to as “encoder count value”) of the pulse signal of this encoder And a control means for executing feedback control (hereinafter referred to as “F / B control”) for rotationally driving the rotor to a target position by sequentially switching energized phases of the motor,
Comprising an abnormality monitoring means for monitoring the presence or absence of an abnormality in the F / B control state of the motor
When the abnormality monitoring unit detects an abnormality in the F / B control state, the control unit switches from the F / B control to an open loop control, and feeds back the encoder count value information without feedback. A motor control device characterized in that the rotor is rotationally driven by sequentially switching energized phases of the motor.
前記異常監視手段は、前記F/B制御中に前記エンコーダのパルス信号の出力間隔又は前記ロータの回転速度を監視して前記F/B制御状態の異常の有無を監視することを特徴とする請求項1に記載のモータ制御装置。The abnormality monitoring means monitors whether there is an abnormality in the F / B control state by monitoring an output interval of a pulse signal of the encoder or a rotation speed of the rotor during the F / B control. Item 2. The motor control device according to Item 1. 前記エンコーダは、前記ロータの回転に同期して所定の位相差を有するA相信号とB相信号を出力し、
前記制御手段は、前記F/B制御中に前記A相信号及び前記B相信号をカウントしてエンコーダカウント値を更新する際に、前記A相信号と前記B相信号の発生順序によって前記ロータの回転方向を判定して、その回転方向に応じて前記エンコーダカウント値をカウントアップ又はカウントダウンし、そのエンコーダカウント値と前記ロータの回転方向に応じて通電相を選択して通電し、
前記異常監視手段は、前記F/B制御中に前記A相信号と前記B相信号とを個別にカウントし、前記A相信号のカウント値と前記B相信号のカウント値とを比較して前記F/B制御状態の異常の有無を監視することを特徴とする請求項1又は2に記載のモータ制御装置。
The encoder outputs an A phase signal and a B phase signal having a predetermined phase difference in synchronization with the rotation of the rotor,
The control means counts the A-phase signal and the B-phase signal during the F / B control and updates the encoder count value according to the generation order of the A-phase signal and the B-phase signal. Determine the rotation direction, count up or count down the encoder count value according to the rotation direction, select the energized phase according to the encoder count value and the rotation direction of the rotor,
The abnormality monitoring means individually counts the A-phase signal and the B-phase signal during the F / B control, and compares the count value of the A-phase signal with the count value of the B-phase signal. The motor control device according to claim 1, wherein the presence or absence of an abnormality in the F / B control state is monitored.
前記異常監視手段は、前記F/B制御中に前記ロータの回転方向を監視し、該ロータの回転方向が前記目標位置へ向かう回転方向から逆転したか否かで前記F/B制御状態の異常の有無を監視することを特徴とする請求項1乃至3のいずれかに記載のモータ制御装置。The abnormality monitoring means monitors the rotation direction of the rotor during the F / B control, and the abnormality of the F / B control state depends on whether the rotation direction of the rotor is reversed from the rotation direction toward the target position. The motor control device according to claim 1, wherein the presence or absence of the motor is monitored. 前記制御手段は、電源投入後の初期駆動時に前記モータの通電相の切り換えを所定のタイムスケジュールで実施させて、前記ロータの回転位置と通電相との対応関係を学習する手段と、前記ロータを前記制御対象の可動範囲の少なくとも一方の限界位置に突き当たるまで回転させてその限界位置を学習(以下「突き当て制御」と表記する)する手段とを備え、前記オープンループ制御からF/B制御に復帰させるときにも、前記初期駆動と前記突き当て制御を再実行することを特徴とする請求項1乃至4のいずれかに記載のモータ制御装置。The control means is configured to switch the energized phase of the motor at a predetermined time schedule during initial driving after power-on, and to learn the correspondence between the rotational position of the rotor and the energized phase; and Means for rotating until it reaches at least one limit position of the movable range to be controlled and learning the limit position (hereinafter referred to as “butting control”), from the open loop control to the F / B control. 5. The motor control device according to claim 1, wherein the initial drive and the abutting control are re-executed when returning. 前記異常監視手段は、前記突き当て制御中に前記F/B制御状態の異常の有無の監視を中止することを特徴とする請求項5に記載のモータ制御装置。The motor control apparatus according to claim 5, wherein the abnormality monitoring unit stops monitoring whether there is an abnormality in the F / B control state during the abutting control. 前記制御手段は、前記F/B制御状態の異常が検出されたとき、前記オープンループ制御中の前記通電相の切換回数をカウントしてそのカウント値に基づいて前記ロータが前記目標位置に到達したと判断したときに前記F/B制御に復帰することを特徴とする請求項1乃至6のいずれかに記載のモータ制御装置。When an abnormality in the F / B control state is detected, the control means counts the number of times the energized phase is switched during the open loop control, and the rotor reaches the target position based on the count value. The motor control device according to claim 1, wherein the motor control device returns to the F / B control when it is determined. 前記異常監視手段は、前記オープンループ制御からF/B制御に復帰しても、再び前記F/B制御状態の異常が検出されて前記オープンループ制御に切り換えられるという状態が所定回数続いたときに、最終的に異常の判定を確定し、以後、前記F/B制御に復帰しないことを特徴とする請求項7に記載のモータ制御装置。The abnormality monitoring means detects a failure in the F / B control state again and switches to the open loop control for a predetermined number of times even after returning from the open loop control to F / B control. 8. The motor control device according to claim 7, wherein the determination of abnormality is finally finalized, and thereafter, the control does not return to the F / B control. 前記モータは、スイッチトリラクタンスモータであることを特徴とする請求項1乃至8のいずれかに記載のモータ制御装置。The motor control device according to claim 1, wherein the motor is a switched reluctance motor. 前記制御対象は、車両のパーキングレンジと他のレンジとを切り換えるレンジ切換装置であることを特徴とする請求項1乃至9のいずれかに記載のモータ制御装置。The motor control device according to claim 1, wherein the control target is a range switching device that switches between a parking range of the vehicle and another range.
JP2002199469A 2002-07-09 2002-07-09 Motor control device Expired - Fee Related JP3886042B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2002199469A JP3886042B2 (en) 2002-07-09 2002-07-09 Motor control device
US10/448,409 US7312595B2 (en) 2002-07-09 2003-05-30 Motor control apparatus
DE10362132.6A DE10362132B4 (en) 2002-07-09 2003-07-08 Engine control unit
DE10330809.1A DE10330809B8 (en) 2002-07-09 2003-07-08 Engine control unit
US11/320,962 US7667427B2 (en) 2002-07-09 2005-12-30 Motor control apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002199469A JP3886042B2 (en) 2002-07-09 2002-07-09 Motor control device

Publications (2)

Publication Number Publication Date
JP2004048837A true JP2004048837A (en) 2004-02-12
JP3886042B2 JP3886042B2 (en) 2007-02-28

Family

ID=31706593

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002199469A Expired - Fee Related JP3886042B2 (en) 2002-07-09 2002-07-09 Motor control device

Country Status (1)

Country Link
JP (1) JP3886042B2 (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007024786A (en) * 2005-07-20 2007-02-01 Toyota Motor Corp Motor control device
US7190138B2 (en) 2003-12-22 2007-03-13 Denso Corporation Failure monitor for motor drive control system
JP2012095407A (en) * 2010-10-25 2012-05-17 Denso Corp Motor controller
JP2014093922A (en) * 2012-11-06 2014-05-19 Mitsuba Corp Control device for switched reluctance motor
JP2015001262A (en) * 2013-06-14 2015-01-05 株式会社デンソー Shift-by-wire control device
JPWO2013046472A1 (en) * 2011-09-30 2015-03-26 パイオニア株式会社 Rotation angle detection device and rotation angle detection method
JP2016017561A (en) * 2014-07-08 2016-02-01 株式会社デンソー Range switchover control unit
KR20180129679A (en) * 2017-05-25 2018-12-05 주식회사 주원테크놀러지 Linear Encoder Apparatus for use in Motor Position Control
JP2020054030A (en) * 2018-09-25 2020-04-02 ミネベアミツミ株式会社 Abnormality detection device, motor device, abnormality detection method, and drive control method of motor
CN112136195A (en) * 2018-06-19 2020-12-25 株式会社东芝 Electric operation device for tap changer and tap changing method
CN112970191A (en) * 2018-11-13 2021-06-15 康蒂-特米克微电子有限公司 Operation of brushless DC motor
WO2021215013A1 (en) * 2020-04-24 2021-10-28 株式会社ハーモニック・ドライブ・システムズ Rotary encoder
CN115503683A (en) * 2022-11-18 2022-12-23 华侨大学 Hybrid power motorcycle and shutdown method and device thereof

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6044591B2 (en) * 2014-05-28 2016-12-14 株式会社デンソー Range switching control device
JP6569584B2 (en) * 2016-04-15 2019-09-04 株式会社デンソー Shift range control device
JP6623987B2 (en) * 2016-09-09 2019-12-25 株式会社デンソー Shift range control device
JP6565841B2 (en) * 2016-09-09 2019-08-28 株式会社デンソー Shift range control device
JP2018040461A (en) * 2016-09-09 2018-03-15 株式会社デンソー Shift range control device

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7190138B2 (en) 2003-12-22 2007-03-13 Denso Corporation Failure monitor for motor drive control system
JP2007024786A (en) * 2005-07-20 2007-02-01 Toyota Motor Corp Motor control device
JP4645339B2 (en) * 2005-07-20 2011-03-09 トヨタ自動車株式会社 Motor control device
JP2012095407A (en) * 2010-10-25 2012-05-17 Denso Corp Motor controller
JPWO2013046472A1 (en) * 2011-09-30 2015-03-26 パイオニア株式会社 Rotation angle detection device and rotation angle detection method
JP2014093922A (en) * 2012-11-06 2014-05-19 Mitsuba Corp Control device for switched reluctance motor
JP2015001262A (en) * 2013-06-14 2015-01-05 株式会社デンソー Shift-by-wire control device
JP2016017561A (en) * 2014-07-08 2016-02-01 株式会社デンソー Range switchover control unit
KR20180129679A (en) * 2017-05-25 2018-12-05 주식회사 주원테크놀러지 Linear Encoder Apparatus for use in Motor Position Control
KR102035542B1 (en) * 2017-05-25 2019-10-23 주식회사 주원테크놀러지 Linear Encoder Apparatus for use in Motor Position Control
CN112136195A (en) * 2018-06-19 2020-12-25 株式会社东芝 Electric operation device for tap changer and tap changing method
CN112136195B (en) * 2018-06-19 2023-06-09 株式会社东芝 Electric operating device for tap changer and tap changing method
JP2020054030A (en) * 2018-09-25 2020-04-02 ミネベアミツミ株式会社 Abnormality detection device, motor device, abnormality detection method, and drive control method of motor
JP7158970B2 (en) 2018-09-25 2022-10-24 ミネベアミツミ株式会社 Abnormality detection device, motor device, abnormality detection method, and motor drive control method
CN112970191A (en) * 2018-11-13 2021-06-15 康蒂-特米克微电子有限公司 Operation of brushless DC motor
WO2021215013A1 (en) * 2020-04-24 2021-10-28 株式会社ハーモニック・ドライブ・システムズ Rotary encoder
CN115503683A (en) * 2022-11-18 2022-12-23 华侨大学 Hybrid power motorcycle and shutdown method and device thereof
CN115503683B (en) * 2022-11-18 2023-02-28 华侨大学 Hybrid power motorcycle and stopping method and device thereof

Also Published As

Publication number Publication date
JP3886042B2 (en) 2007-02-28

Similar Documents

Publication Publication Date Title
US7667427B2 (en) Motor control apparatus
US7084597B2 (en) Motor control apparatus
JP3886042B2 (en) Motor control device
US7161314B2 (en) Motor control apparatus having current supply phase correction
JP5454962B2 (en) Motor control device
JP3849864B2 (en) Motor control device
JP3849930B2 (en) Motor control device
JP3800529B2 (en) Motor control device
JP3849931B2 (en) Motor control device
JP2004023890A (en) Motor controller
JP3947922B2 (en) Motor control device
JP3888940B2 (en) Motor control device
JP4189953B2 (en) Position switching control device
JP2017161455A (en) Control device
JP2004129451A (en) Motor controller
JP3800532B2 (en) Motor control device
JP3871130B2 (en) Motor control device
JP3888278B2 (en) Motor control device
JP3849627B2 (en) Motor control device
JP2004023889A (en) Motor controller
JP4748611B2 (en) Position switching control device

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040311

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20040311

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20040311

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040408

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060712

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060823

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061013

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061117

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3886042

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101201

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111201

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121201

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131201

Year of fee payment: 7

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