JP2004015849A - Motor control device - Google Patents

Motor control device Download PDF

Info

Publication number
JP2004015849A
JP2004015849A JP2002161849A JP2002161849A JP2004015849A JP 2004015849 A JP2004015849 A JP 2004015849A JP 2002161849 A JP2002161849 A JP 2002161849A JP 2002161849 A JP2002161849 A JP 2002161849A JP 2004015849 A JP2004015849 A JP 2004015849A
Authority
JP
Japan
Prior art keywords
phase
rotor
energization
energized
encoder
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
JP2002161849A
Other languages
Japanese (ja)
Other versions
JP3800529B2 (en
Inventor
Yasuhiro Nakai
中井 康裕
Shigeru Kamio
神尾 茂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2002161849A priority Critical patent/JP3800529B2/en
Priority to US10/443,795 priority patent/US7084597B2/en
Priority to DE10362105.9A priority patent/DE10362105B4/en
Priority to DE10324846A priority patent/DE10324846A1/en
Publication of JP2004015849A publication Critical patent/JP2004015849A/en
Priority to US11/257,306 priority patent/US7221116B2/en
Priority to US11/404,869 priority patent/US20060197489A1/en
Application granted granted Critical
Publication of JP3800529B2 publication Critical patent/JP3800529B2/en
Priority to US11/730,871 priority patent/US7609012B2/en
Priority to US12/382,603 priority patent/US8013563B2/en
Priority to US12/926,585 priority patent/US8134322B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Control Of Electric Motors In General (AREA)
  • Gear-Shifting Mechanisms (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To learn correspondence between a rotational position of a rotor and an energized phase after power-on, in a brushless type motor such as a switched reluctance motor. <P>SOLUTION: At the initial driving stage after power-on, for example, when switching by the prescribed time schedule the energized phases of the motor in the sequence of W-phase energization, UW-phase energization, U-phase energization, UV-phase energization and VW-phase energization so as to count the output signal of an encoder, the device learns the encoder count value and the correspondence between the rotational position of the rotor and energized phase at the completion of the initial driving stage. At the subsequent regular driving stage, the energized phase is decided based on the encoder count value and the result of learning at the completion of the initial driving stage. At the initial driving stage, the time T1 of the first phase energization is made shorter than the time T2 of the second phase energization, for instance, T1 is set at 10ms and T2 at 100ms. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、エンコーダの出力信号に基づいてモータの通電相を順次切り換えることでロータを回転駆動するモータ制御装置に関するものである。
【0002】
【従来の技術】
近年、構造が簡単で安価なモータとして需要が増加しているスイッチトリラクタンスモータ等のブラシレス型のモータは、ロータの回転に同期してパルス信号を出力するエンコーダを搭載し、このエンコーダの出力信号をカウントしてそのカウント値に基づいてロータの回転位置を検出して通電相を順次切り換えることでロータを回転駆動するようにしたものがある。
【0003】
【発明が解決しようとする課題】
ところで、この種のエンコーダ付きのモータは、起動後のエンコーダの出力信号のカウント値に基づいてロータの起動位置からの回転量(回転角度)を検出できるだけであるので、電源投入後に、何等かの方法で、ロータの絶対的な回転位置を検出して、ロータの回転位置と通電相との対応関係をとらないと、モータを正常に駆動することができない。
【0004】
そこで、例えば、スイッチトリラクタンスモータでは、特開2000−69779号公報に示すように、起動開始時に、2つの相を同時に励磁(通電)して、一定時間経過後に、そのときのロータの回転位置を基準にして通電相を決めるようにしたものがある。
【0005】
しかし、起動開始時に、2つの相を同時に励磁しただけでは、必ずしもロータが2つの通電相に対応する位置まで回転するとは限らず、ロータの回転位置と通電相との対応関係がとれない場合がある。
【0006】
また、上記公報には、2相通電をしても、不安定点が存在することもあると記載されている。この対策として、上記公報は、1相通電し、その後、2つの相を同時に励磁するようにしている。最初に、1つの相を励磁することで、2つの相を励磁することによる不安定領域を除き、その後、2つの相を励磁することで、唯一の安定点にロータを回転させることができ、確実にロータの基準位置を学習できると記載されている。
【0007】
しかしながら、1つの相を励磁する場合は、2つの相を励磁する場合よりも、トルクが小さいため、1つの相に対応する位置までロータが回転しにくい。従って、最初に1つの相を励磁しただけでは、2つの相を励磁する際の不安定領域を除くことができず、依然として、ロータの基準位置を誤学習するおそれがある。
【0008】
本発明はこれらの事情を考慮してなされたものであり、従ってその目的は、電源投入後の初期駆動によりロータの回転位置と通電相との対応関係を確実にとることができるモータ制御装置を提供することにある。
【0009】
【課題を解決するための手段】
上記目的を達成するために、本発明の請求項1のモータ制御装置は、電源投入後の初期駆動時にモータの通電相の切り換えを所定のタイムスケジュールで一巡させてエンコーダの出力信号をカウントして、初期駆動終了時のカウント値とロータの回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダの出力信号のカウント値と初期駆動終了時の学習結果とに基づいて通電相を決定するようにしたものである。このように、初期駆動時に通電相の切り換えを一巡させれば、初期駆動が終了するまでに、いずれかの通電相で必ずロータの回転位置と通電相とが一致して、それ以後、通電相の切り換えに同期してロータが回転して、このロータの回転に同期してエンコーダからパルス信号が出力されるようになる。従って、初期駆動終了時のエンコーダの出力信号のカウント値を見れば、初期駆動が終了するまでにロータが実際に通電相の切り換えに同期して回転した角度(回転量)が分かり、それによって、初期駆動終了時のエンコーダの出力信号のカウント値とロータの回転位置と通電相との対応関係が分かるため、この対応関係を学習することで、その後の通常駆動時に、エンコーダの出力信号のカウント値と初期駆動終了時の学習結果とに基づいて正しい通電相を選択してモータを正常に回転させることができる。
【0010】
更に、請求項2のように、モータとしてスイッチトリラクタンスモータを使用し、初期駆動時に1相通電と2相通電とを交互に切り換えるようにしても良い。スイッチトリラクタンスモータは、永久磁石が不要で構造が簡単であるため、安価であり、温度環境等に対する耐久性・信頼性も高いという利点がある。そして、初期駆動時に1相通電と2相通電とを交互に切り換えるようにすれば、常に1相のみに通電する1相励磁方式や常に2相ずつ通電する2相励磁方式と比較して、1ステップ(1回の励磁)当たりのロータ回転角度が1/2となるため、初期駆動中にロータの回転位置と通電相とを確実に同期させることができると共に、トルクが大きい2相通電でロータの振動を停止させて、エンコーダの出力信号を安定させることができる。
【0011】
この場合、請求項3のように、初期駆動中の1相通電の時間を2相通電の時間よりも短くするようにしても良い。つまり、初期駆動中にロータの回転位置と通電相との同期がとれた後でも、トルクが小さい1相通電では、ロータが振動するため、1相通電の時間を短くして、できるだけ速やかに次の2相通電に切り換えることで、ロータの振動を速やかに停止させてエンコーダの出力信号を安定させることができると共に、初期駆動の時間を短くすることができる。
【0012】
また、請求項4のように、初期駆動を2相通電から開始するようにしても良い。このようにすれば、仮に、初期駆動開始当初のロータの位置が最初の2相通電に対応する位置に正確に一致していなくても、その2相通電の大きなトルクが及ぶ範囲内であれば、初期駆動開始当初からロータの回転位置と通電相とを同期させることができる。
【0013】
また、請求項5のように、初期駆動の途中で該初期駆動を終了して通常駆動に移行する必要が生じたときに、次の2相通電(2相通電の実行中に通常駆動に移行する必要が生じたときはその2相通電)が終了してから通常駆動に移行すると共に、該2相通電終了時の前記エンコーダの出力信号のカウント値と前記ロータの回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダの出力信号のカウント値と前記2相通電終了時の学習結果とに基づいて通電相を決定するようにしても良い。
【0014】
上述したように、2相通電では、トルクが大きいため、ロータの位置が2相通電に対応する位置から多少ずれていたとしても、ロータを2相通電に対応する位置まで回転させることができる。このため、初期駆動中に2相通電を1〜2回行うだけで、ロータの回転位置と通電相との同期がとれる確率は高いものと思われる。従って、初期駆動の途中で該初期駆動を終了して通常駆動に移行する必要が生じたときには、次の2相通電(又は現在の2相通電)が終了してから通常駆動に移行するようにすれば、初期駆動の途中で、エンコーダの出力信号のカウント値とロータの回転位置と通電相との対応関係を学習してから、通常駆動に速やかに移行することができる。
【0015】
また、請求項6のように、エンコーダは、ロータの回転に同期して所定の位相差(一般的には電気角で90°の位相差)を有するA相信号とB相信号を出力すると共に、該ロータの基準回転位置でZ相信号を出力する構成とし、初期駆動時にA相信号及びB相信号のエッジをカウントして、初期駆動終了時のカウント値とロータの回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダの出力信号のカウント値と初期駆動終了時の学習結果とに基づいて通電相を決定すると共に、Z相信号が出力されるときのカウント値とロータの回転位置と通電相との対応関係がずれていないか否かを判定し、ずれていれば、そのずれを補正するようにしても良い(以下この補正を「Z相補正」という)。
【0016】
この構成では、エンコーダから出力されるZ相信号によってロータの基準回転位置を正確に検出できるため、例えば、Z相信号が出力されるときの通電相(カウント値)がロータの基準回転位置に対応する通電相(カウント値)であるか否かを判定することで、ロータの回転位置と通電相(カウント値)との対応関係がずれていないか否かを確認することができ、もし、ずれていれば、そのずれを補正することで、信頼性の高いモータ制御を行うことができる。
【0017】
この場合、Z相補正が繰り返し行われるような場合は、誤ったZ相補正が行われている可能性があるので、請求項7のように、通常駆動中にZ相補正が所定回数行われたときに該Z相補正をZ相補正禁止手段により禁止するようにしても良い。このようにすれば、誤ったZ相補正の繰り返しによるモータ停止・誤作動を防止することができる。
【0018】
また、請求項8のように、Z相補正をA相信号又はB相信号のエッジ割り込み処理により実行するようにしても良い。このようにすれば、Z相補正を通電相の切り換えタイミングに同期させることができる。
【0019】
以上説明した請求項1〜8に係る発明は、スイッチトリラクタンスモータ等のブラシレス型のモータを駆動源とする各種装置に適用でき、例えば、請求項9のように、車両のパーキングレンジと他のレンジとを切り換えるレンジ切換機構を駆動するモータの制御装置に適用しても良い。これにより、信頼性の高いモータ駆動式のレンジ切換装置を構成することができる。
【0020】
【発明の実施の形態】
以下、本発明を車両のレンジ切換装置に適用した一実施形態を図面に基づいて説明する。
【0021】
まず、図1に基づいてレンジ切換機構11の構成を説明する。レンジ切換機構11の駆動源となるモータ12は、例えばスイッチトリラクタンスモータにより構成され、減速機構26(図4参照)を内蔵し、その出力軸13の回転位置を検出する出力軸センサ14が設けられている。この出力軸13には、ディテントレバー15が固定されている。
【0022】
また、ディテントレバー15にはL字形のパーキングロッド18が固定され、このパーキングロッド18の先端部に設けられた円錐体19がロックレバー21に当接している。このロックレバー21は、円錐体19の位置に応じて軸22を中心にして上下動してパーキングギヤ20をロック/ロック解除するようになっている。パーキングギヤ20は、自動変速機27の出力軸に設けられ、このパーキングギヤ20がロックレバー21によってロックされると、車両の駆動輪が回り止めされた状態(パーキング状態)に保持される。
【0023】
一方、ディテントレバー15をパーキングレンジ(以下「Pレンジ」と表記する)と他のレンジ(以下「NotPレンジ」と表記する)に保持するためのディテントバネ23が支持ベース17に固定され、このディテントバネ23の先端に設けられた係合部23aがディテントレバー15のPレンジ保持凹部24に嵌まり込んだときに、ディテントレバー15がPレンジの位置に保持され、該ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25に嵌まり込んだときに、ディテントレバー15がNotPレンジの位置に保持されるようになっている。
【0024】
Pレンジでは、パーキングロッド18がロックレバー21に接近する方向に移動して、円錐体19の太い部分がロックレバー21を押し上げてロックレバー21の凸部21aがパーキングギヤ20に嵌まり込んでパーキングギヤ20をロックした状態となり、それによって、自動変速機27の出力軸(駆動輪)がロックされた状態(パーキング状態)に保持される。
【0025】
一方、NotPレンジでは、パーキングロッド18がロックレバー21から離れる方向に移動して、円錐体19の太い部分がロックレバー21から抜け出てロックレバー21が下降し、それによって、ロックレバー21の凸部21aがパーキングギヤ20から外れてパーキングギヤ20のロックが解除され、自動変速機27の出力軸が回転可能な状態(走行可能な状態)に保持される。
【0026】
尚、前述した出力軸センサ14は、モータ12の減速機構26の出力軸13の回転角度に応じた電圧を出力する回転センサ(例えばポテンショメータ)によって構成され、その出力電圧によって現在のレンジがPレンジとNotPレンジのいずれであるかを確認できるようになっている。
【0027】
次に、図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の数は適宜変更しても良いことは言うまでもない。
【0028】
本実施形態の巻線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’相が同時に通電される。
【0029】
これら2つのモータ励磁部35は、車両に搭載されたバッテリ40を電源として、それぞれ別個のモータドライバ37,38によって駆動される。このように、モータ励磁部35,36とモータドライバ37,38をそれぞれ2系統ずつ設けることで、一方の系統が故障しても、他方の系統でSRモータ12を回転させることができるようになっている。図3に示すモータドライバ37,38の回路構成例では、各相毎にトランジスタ等のスイッチング素子39を1個ずつ設けたユニポーラ駆動方式の回路構成としているが、各相毎にスイッチング素子を2個ずつ設けたバイポーラ駆動方式の回路構成を採用しても良い。尚、本発明は、モータ励磁部とモータドライバをそれぞれ1系統ずつ設けた構成としても良いことは言うまでもない。
【0030】
各モータドライバ37,38の各スイッチング素子39のオン/オフは、ECU41(制御手段)によって制御される。図4に示すように、このECU41と各モータドライバ37,38は、レンジ切換制御装置42に搭載され、このレンジ切換制御装置42には、Pレンジへの切換操作を行うPレンジスイッチ43と、NotPレンジへの切換操作を行うNotPレンジスイッチ44の操作信号が入力される。Pレンジスイッチ43又はNotPレンジスイッチ44の操作により選択されたレンジは、インストルメントパネル(図示せず)に設けられたレンジ表示部45に表示される。
【0031】
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極となっている。
【0032】
更に、ロータ32の基準回転位置に相当する位置のN極(N’)とその両側のS極(S’)がそれ以外の磁極よりも径方向の幅が広くなるように形成されている。尚、本実施形態では、SRモータ12の通電相の切り換えが一巡する間にロータ32とロータリマグネット47が一体的に45°回転することを考慮して、ロータ32の基準回転位置に相当する幅広な着磁部分(N’)が45°ピッチで形成されており、従って、ロータリマグネット47全体として、基準回転位置に相当する幅広な着磁部分(N’)が合計8個形成されている。尚、基準回転位置に相当する幅広な着磁部分(N’)は、ロータリマグネット47全体として、1個のみ形成した構成としても良い。
【0033】
このロータリマグネット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となるように配置されている。
【0034】
各磁気検出素子48,49,50の出力は、N極(N’極)と対向したときにハイレベル“1”となり、S極(S’極)と対向したときにローレベル“0”となる。尚、Z相信号用の磁気検出素子50の出力は、ロータ32の基準回転位置に相当する幅広なN’極に対向する毎にハイレベル“1”となり、それ以外の位置では、ローレベル“0”となる。
【0035】
本実施形態では、ECU41が後述する図15のエンコーダカウンタルーチンによってA相信号とB相信号の立ち上がり/立ち下がりの両方のエッジをカウントして、そのエンコーダカウント値に応じてSRモータ12の通電相を切り換えることでロータ32を回転駆動する。この際、A相信号とB相信号の発生順序によってロータ32の回転方向を判定し、正回転(Pレンジ→NotPレンジの回転方向)ではエンコーダカウント値をカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではエンコーダカウント値をカウントダウンする。これにより、ロータ32が正回転/逆回転のいずれの方向に回転しても、エンコーダカウント値とロータ32の回転位置との対応関係が維持されるため、正回転/逆回転のいずれの回転方向でも、エンコーダカウント値によってロータ32の回転位置(回転角度)を検出して、その回転位置に対応した相の巻線33,34に通電してロータ32を回転駆動する。
【0036】
図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相信号が出力されると言う場合がある。
【0037】
ところで、エンコーダカウント値は、ECU41のRAMに記憶されるため、ECU41の電源がオフされると、エンコーダカウント値の記憶が消えてしまう。そのため、ECU41の電源投入直後のエンコーダカウント値(0)は、実際のロータ32の回転位置(通電相)に対応したものとならい。従って、エンコーダカウント値に応じて通電相を切り換えるためには、電源投入後にエンコーダカウント値と実際のロータ32の回転位置とを対応させて、エンコーダカウント値と通電相とを対応させる必要がある。
【0038】
そこで、本実施形態では、レンジ切換制御装置42のECU41によって後述する図8及び図9に示す初期駆動ルーチンを実行することで、ECU41への電源投入後の初期駆動時に、SRモータ12の通電相の切り換えを所定のタイムスケジュールで一巡させてエンコーダ46のA相信号及びB相信号のエッジをカウントし、初期駆動終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダカウント値と初期駆動終了時の学習結果とに基づいて通電相を決定するようにしている。
【0039】
この初期駆動時の学習は、具体的には次のようにして行われる。図12に示すように、PレンジでECU41に電源が投入されたときに初期駆動を行う場合は、例えば、W相通電→UW相通電→U相通電→UV相通電→V相通電→VW相通電の順序で通電相の切り換えを所定のタイムスケジュールで一巡し、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に駆動する。
【0040】
一方、NotPレンジでECU41に電源が投入されたときに初期駆動を行う場合は、例えば、V相通電→UV相通電→U相通電→UW相通電→W相通電→VW相通電の順序で通電相の切り換えを所定のタイムスケジュールで一巡し、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に駆動する。
【0041】
この初期駆動時には、1相通電の時間T1を2相通電の時間T2よりも短くし、例えばT1=10ms、T2=100msに設定する。初期駆動中にロータ32の回転位置と通電相との同期がとれた後でも、トルクが小さい1相通電では、ロータ32が振動するため、1相通電の時間T1を短くして、できるだけ速やかに次の2相通電に切り換えることで、ロータ32の振動を速やかに停止させてエンコーダ46の出力信号を安定させるようにしている。
【0042】
このように、初期駆動時に通電相の切り換えを一巡させれば、初期駆動が終了するまでに、いずれかの通電相で必ずロータ32の回転位置と通電相とが一致して、それ以後、通電相の切り換えに同期してロータ32が回転して、このロータ32の回転に同期してエンコーダ46からA相信号及びB相信号が出力されるようになる。
【0043】
この初期駆動中に、エンコーダ46のA相信号及びB相信号の立ち上がり/立ち下がりの両方のエッジをカウントする。従って、初期駆動終了時のエンコーダカウント値を見れば、初期駆動が終了するまでにロータ32が実際に通電相の切り換えに同期して回転した角度(回転量)が分かり、それによって、初期駆動終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係が分かる。
【0044】
図12の例では、初期駆動時に最初の通電相(W相)からロータ32が回転し、通電相の切り換え毎にロータ32が7.5°ずつ回転してエンコーダカウント値が2ずつカウントアップし、初期駆動終了時にエンコーダカウント値が12となる。
【0045】
これに対し、例えば、初めの3回の励磁(W相通電→UW相通電→U相通電)でロータ32が回転しない場合、つまり4回目以降の励磁(UV相通電→V相通電→VW相通電)でロータ32の回転位置と通電相とが同期してロータ32が3回の励磁分だけ回転する場合は、初期駆動終了時までにロータ32が7.5°×3=22.5°回転して、エンコーダカウント値が2×3=6となる。従って、初期駆動終了時のエンコーダカウント値を見れば、初期駆動が終了するまでにロータ32が実際に通電相の切り換えに同期して回転した角度(回転量)が判明する。
【0046】
初期駆動の最後の通電相は、常にVW相となるが、エンコーダカウント値は、必ずしも12になるとは限らず、例えば8、或は4である場合もある。初期駆動終了後の通常駆動時には、エンコーダカウント値に基づいて通電相が決定されるため、初期駆動によるエンコーダカウント値のずれを修正しないと、通常駆動時に正しい通電相を選択することができない。
【0047】
そこで、本実施形態では、初期駆動終了時のエンコーダカウント値を初期位置ずれ学習値として学習し、その後の通常駆動時にエンコーダカウント値を初期位置ずれ学習値で補正することで、初期駆動終了時のエンコーダカウント値と通電相(ロータ32の回転位置)とのずれを補正して、通常駆動時に正しい通電相を選択できるようにしている。
【0048】
初期駆動終了後は、図12に示すように、まず初期駆動終了時の通電相(VW相)と同じ相に例えば10ms通電してロータ32の位置を初期駆動終了時の位置に保持し、その後、後述するフィードバック制御(以下「F/B制御」と表記する)により、その時点のエンコーダカウント値と初期位置ずれ学習値とに基づいて通電相を切り換えてロータ32を目標位置Acntの方向へ回転させる。これにより、ロータ32の回転位置(エンコーダカウント値)が目標位置Acntから例えば0.5°以内に到達した時点で、通電相の切り換えを終了してロータ32を停止させ、その後は、同じ相に通電し続けてロータ32の停止状態を保持し、この保持状態を例えば50ms継続する。この後、目標位置Acntが変化しなければ、通電を停止する。
【0049】
また、初期駆動の途中で、Pレンジスイッチ43又はNotPレンジスイッチ44が操作されてレンジ切換要求が発生した場合は、次の2相通電(2相通電の実行中にレンジ切換要求が発生したときはその2相通電)が終了してから通常駆動に移行すると共に、該2相通電終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習し、その後の通常駆動時に、エンコーダカウント値と2相通電終了時の学習結果とに基づいて通電相を決定するようにしている。
【0050】
2相通電では、トルクが大きいため、ロータ32の位置が2相通電に対応する位置から多少ずれていたとしても、ロータ32を2相通電に対応する位置まで回転させることができる。このため、初期駆動中に2相通電を1〜2回行うだけでロータ32の回転位置と通電相との同期がとれる確率は高いものと思われる。従って、初期駆動の途中でレンジ切換要求が発生したときには、次の2相通電(又は現在の2相通電)が終了してから通常駆動に移行するようにすれば、初期駆動の途中で、エンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習してから、通常駆動に速やかに移行することができる。
【0051】
例えば、図13のタイムチャートに示すように、初期駆動の2回目の励磁(UW相通電)中に、PレンジからNotPレンジへのレンジ切換要求が発生したときには、このUW相通電で初期駆動を終了して通常駆動に移行すると共に、UW相通電終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習する。本実施形態では、初期駆動の途中で通常駆動に移行する場合でも、その初期駆動を最後まで実行したと仮定して、本来の初期駆動終了時のエンコーダカウント値を推定し、その推定値を初期位置ずれ学習値とするようにしている。例えば、図13に示すように、初期駆動をW相通電とUW相通電の2回の励磁で終了する場合は、その後に予定されていた4回の励磁を行わずに初期駆動を終了するため、未終了の4回の励磁(U相通電→UV相通電→V相通電→VW相通電)を行ったものと仮定して、4回の励磁分の回転角度に相当するカウントアップ値(2×4=8)をUW相通電終了時のエンコーダカウント値に加算して初期位置ずれ学習値を求める。
【0052】
以上説明した初期駆動の学習処理は、レンジ切換制御装置42のECU41によって図8及び図9に示す初期駆動ルーチンに従って実行される。本ルーチンは、ECU41への電源投入直後(イグニッションスイッチをOFF位置からACC位置へ操作した直後)に、初期駆動が終了するまで所定周期(例えば1ms周期)で実行される。
【0053】
本ルーチンが起動されると、まずステップ101で、オープンループ制御実行フラグXopen=ON、又は、リカバリ処理実行フラグXrcv=ONであるか否かを判定する。ここで、オープンループ制御実行フラグXopenは、エンコーダ46又はSRモータ12が故障したときに実行されるオープンループ制御(フェイルセーフ処理)が実行されているか否かを判定するフラグであり、ONは実行されていることを意味する。また、リカバリ処理実行フラグXrcvは、一時的な動作異常が発生したときに一時的に実行されるリカバリ処理(オープンループ制御)が実行されているか否かを判定するフラグであり、ONは実行されていることを意味する。
【0054】
もし、上記ステップ101で、「Yes」と判定されれば、以降の処理を行うことなく、本ルーチンを終了し、「No」と判定されれば、ステップ102に進み、ECU41のイニシャル処理から出力軸センサ14の出力電圧が安定するまで待つための所定時間(例えば100ms)が経過したか否かを判定する。そして、イニシャル処理から所定時間経過した時点で、ステップ103に進み、出力軸センサ14の出力電圧を読み込んで、この出力電圧がレンジ判定値以下であるか否かで、現在のレンジがPレンジかNotPレンジかを判定し、Pレンジであれば、ステップ104に進み、レンジ判定フラグXnpをPレンジを意味する「0」にセットし、NotPレンジであれば、ステップ105に進み、レンジ判定フラグXnpをNotPレンジを意味する「1」にセットする。
【0055】
この後、ステップ106に進み、レンジ判定フラグXnp=0(Pレンジ)であるか否かを判定し、レンジ判定フラグXnp=0(Pレンジ)であれば、ステップ107に進み、図10のPレンジ初期駆動ルーチンを実行し、レンジ判定フラグXnp=1(NotPレンジ)であれば、ステップ108に進み、図11のNotPレンジ初期駆動ルーチンを実行する。
【0056】
上記ステップ107で、図10のPレンジ初期駆動ルーチンが起動されると、ステップ201〜206で、初期駆動中の励磁回数をカウントする励磁回数カウンタCASEが0〜5のいずれであるかを判定する。この励磁回数カウンタCASEは、イニシャル処理でセットされる初期値が0で、励磁を1回行う毎に1ずつカウントアップされる(図9のステップ114)。そして、励磁回数カウンタCASEの判定結果に応じて通電相と通電時間Tを次のように設定する。
【0057】
CASE=0(1回目の励磁)の場合は、ステップ207に進み、W相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=1(2回目の励磁)の場合は、ステップ208に進み、UW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0058】
CASE=2(3回目の励磁)の場合は、ステップ209に進み、U相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=3(4回目の励磁)の場合は、ステップ210に進み、UV相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0059】
CASE=4(5回目の励磁)の場合は、ステップ211に進み、V相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=5(6回目の励磁)の場合は、ステップ212に進み、VW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0060】
これにより、Pレンジで初期駆動を行う場合は、W相通電→UW相通電→U相通電→UV相通電→V相通電→VW相通電の順序で通電相の切り換えを一巡し、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に駆動する。この際、1相通電の時間T1を2相通電の時間T2よりも短く設定する。
【0061】
一方、ステップ108で、図11のNotPレンジ初期駆動ルーチンが起動されると、ステップ221〜226で、励磁回数カウンタCASEが0〜5のいずれであるかを判定し、その判定結果に応じて通電相と通電時間Tを次のように設定する。
【0062】
CASE=0(1回目の励磁)の場合は、ステップ227に進み、V相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=1(2回目の励磁)の場合は、ステップ228に進み、UV相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0063】
CASE=2(3回目の励磁)の場合は、ステップ229に進み、U相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=3(4回目の励磁)の場合は、ステップ230に進み、UW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0064】
CASE=4(5回目の励磁)の場合は、ステップ231に進み、W相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=5(6回目の励磁)の場合は、ステップ232に進み、VW相通電を選択し、その通電時間TをT2(例えば100ms)にセットする。
【0065】
これにより、NotPレンジで初期駆動を行う場合は、V相通電→UV相通電→U相通電→UW相通電→W相通電→VW相通電の順序で通電相の切り換えを一巡し、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に駆動する。この場合も、1相通電の時間T1を2相通電の時間T2よりも短く設定する。
【0066】
以上のようにして、図10のPレンジ初期駆動ルーチン又は図11のNotPレンジ初期駆動ルーチンを実行した後、図8のステップ109に進み、初期駆動中にレンジ切換操作(Pレンジスイッチ43又はNotPレンジスイッチ44の操作)が行われたか否かを判定し、初期駆動中にレンジ切換操作が行われれば、ステップ110に進み、レンジ切換操作フラグXchgをONにセットし、レンジ切換操作が行われていなければ、ステップ111に進み、レンジ切換操作フラグXchgをOFFにセットする。
【0067】
この後、図9のステップ112に進み、現在の通電相の通電時間をカウントする通電時間カウンタCTをカウントアップし、次のステップ113で、現在の通電相の通電時間CTが前記図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えたか否かを判定し、越えていなければ、以降の処理を行うことなく、本ルーチンを終了する。これにより、現在の通電相の通電時間CTが図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えるまで、現在の通電相への通電が継続される。
【0068】
その後、現在の通電相の通電時間CTが図10又は図11のルーチンで設定した通電時間T(=T1又はT2)を越えた時点で、ステップ114に進み、励磁回数カウンタCASEを1だけカウントアップし、通電相を次の通電相に切り換える。そして、次のステップ115で、通電時間カウンタCTをリセットした後、ステップ116に進み、励磁回数カウンタCASEが初期駆動の終了を意味する「6」に達したか否かを判定し、もし、励磁回数カウンタCASEが「6」に達していれば、ステップ118に進み、初期駆動終了フラグXendを初期駆動の終了を意味する「ON」にセットする。
【0069】
また、励磁回数カウンタCASEが「6」に達していない場合、つまり、初期駆動の途中である場合は、ステップ117に進み、初期駆動の途中終了条件が成立しているか否かを判定する。この初期駆動の途中終了条件は、次の3つの条件▲1▼〜▲3▼によって判定される。
▲1▼レンジ判定フラグXnpが0(Pレンジ)であること
▲2▼励磁回数カウンタCASEが2又は4、つまり2相通電終了時であること
▲3▼レンジ切換操作フラグXchgがON、つまり初期駆動中にレンジ切換操作が行われたこと
【0070】
これら3つの条件▲1▼〜▲3▼のうち、1つでも満たさない条件があれば、初期駆動の途中終了条件が成立せず、初期駆動を継続する。これに対し、3つの条件▲1▼〜▲3▼を全て満たしていれば、初期駆動の途中終了条件が成立して、ステップ118に進み、初期駆動終了フラグXendを初期駆動の終了を意味する「ON」にセットする。
【0071】
この後、ステップ119に進み、レンジ判定フラグXnp=1であるか否か(NotPレンジで初期駆動を行ったか否か)を判定し、レンジ判定フラグXnp=1であれば、ステップ120に進み、初期駆動終了時のエンコーダカウント値Ncntを初期位置ずれ学習値Gcntとして記憶する。そして、次のステップ121で、エンコーダカウント値Ncntを次式によりNotPレンジを基準にした値に補正する。
Ncnt=Ncnt+288
【0072】
本実施形態では、Pレンジの保持位置を0点位置としてエンコーダカウント値Ncntをカウントアップし、NotPレンジの保持位置までロータ32が回転したときに、エンコーダカウント値Ncntが例えば288となるようになっている。従って、NotPレンジで初期駆動を行った場合は、初期駆動終了時のエンコーダカウント値Ncntに288を加算することで、エンコーダカウント値NcntをNotPレンジを基準にした値に補正する。
【0073】
一方、上記ステップ119で、レンジ判定フラグXnp=0(Pレンジで初期駆動)と判定されれば、ステップ122に進み、初期駆動終了時のエンコーダカウント値Ncntを用いて初期位置ずれ学習値Gcntを次式により算出する。
Gcnt=Ncnt+2×(6−CASE)
【0074】
この場合、初期駆動が最後まで行われれば、ステップ114の処理によりCASE=6となるため、初期駆動終了時のエンコーダカウント値Ncntがそのまま初期位置ずれ学習値Gcntとなるが、Pレンジで初期駆動を行う場合は、初期駆動の途中でレンジ切換操作が行われたときに、次の2相通電(2相通電の実行中にレンジ切換要求が発生したときはその2相通電)が終了してから通常駆動に移行するため、その初期駆動を最後まで実行したと仮定して、本来の初期駆動終了時のエンコーダカウント値Ncntを推定し、その推定値を初期位置ずれ学習値Gcntとするようにしている。2×(6−CASE)は、未終了の励磁回数分の回転角度に相当するカウントアップ値(以下「Ncnt補正量」という)である。
【0075】
図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となる。
【0076】
次に、図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を算出する。
【0077】
ここで、A相信号とB相信号の今回値A(i)、B(i)と、前回値A(i−1)、B(i−1)を用いる理由は、A相信号とB相信号の発生順序によってロータ32の回転方向を判定するためであり、図17に示すように、正回転(Pレンジ→NotPレンジの回転方向)ではカウントアップ値ΔNをプラス値にしてエンコーダカウント値Ncntをカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではカウントアップ値ΔNをマイナス値にしてエンコーダカウント値Ncntをカウントダウンする。
【0078】
カウントアップ値ΔNの算出後、ステップ303に進み、前回のエンコーダカウント値Ncntに上記ステップ302で算出したカウントアップ値ΔNを加算して、今回のエンコーダカウント値Ncntを求める。この後、ステップ304に進み、次回のカウント処理のために、A相信号とB相信号の今回値A(i)、B(i)をそれぞれA(i−1)、B(i−1)として記憶して本ルーチンを終了する。
【0079】
次に、図18に示すモータF/B制御ルーチンの処理内容を説明する。本ルーチンは、AB相割り込み処理により実行され、初期駆動終了後にモータF/B制御実行条件が成立しているときに、ロータ32の回転位置(エンコーダカウント値Ncnt)が目標位置Acntから例えば0.5°以内に到達するまで、エンコーダカウント値Ncntと初期位置ずれ学習値Gcntとに基づいて通電相を切り換えてロータ32を目標位置Acntの方向へ回転させる。ここで、モータF/B制御実行条件は、例えば次の▲1▼〜▲4▼の条件を全て満たしているときに成立する。
【0080】
▲1▼初期駆動終了後であること(初期駆動終了フラグXend=ON)
▲2▼フェイルセーフ処理(オープンループ制御)が行われていないこと(オープンループ制御実行フラグXopen=OFF)
▲3▼リカバリ処理が行われていないこと(リカバリ処理実行フラグXrcv=OFF)
▲4▼初期駆動終了から所定の停止保持時間(例えば10ms)が経過していること、又は、モータ通電開始から所定の停止保持時間(例えば10ms)が経過していること
【0081】
尚、▲4▼の停止保持時間は、F/B制御開始時のロータ32の位置を確定するために設けられている。
上記▲1▼〜▲4▼の条件を全て満たしているときにモータF/B制御実行条件が成立し、F/B許可フラグXfbがONにセットされる。
【0082】
図18のモータF/B制御ルーチンが起動されると、まずステップ311で、F/B許可フラグXfbがONにセットされているか否か(モータF/B制御実行条件が成立しているか否か)を判定し、F/B許可フラグXfbがOFF(F/B制御実行条件が不成立)であれば、以降の処理を行うことなく、本ルーチンを終了する。
【0083】
これに対し、F/B許可フラグXfbがONにセットされていれば、ステップ312に進み、後述する図19の通電相設定ルーチンを実行して、現在のエンコーダカウント値Ncntと初期位置ずれ学習値Gcntとに基づいて通電相を設定し、次のステップ313で、通電処理ルーチン(図示せず)を実行して、上記ステップ312で設定した通電相に通電する。
【0084】
一方、上記ステップ312で、図19の通電相設定ルーチンが起動されると、ステップ321で、回転方向指示値Dが正回転(Pレンジ→NotPレンジの回転方向)を意味する「1」であるか否かを判定する。この回転方向指示値Dは、現在のエンコーダカウント値Ncntと目標値Acntとの大小関係によって設定される。
【0085】
この回転方向指示値D=1(正回転)であれば、ステップ322に進み、回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが減少したか否か)を判定し、逆転していなければ、ステップ323に進み、現在のエンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、正回転方向位相進み量K1、速度補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt+K1+Ks
【0086】
ここで、正回転方向位相進み量K1は、ロータ32を正回転させるのに必要な通電相の位相進み量(ロータ32の現在位置に対する通電相の位相進み量)であり、例えばK1=4に設定されている。
【0087】
また、速度補正量Ksは、ロータ32の回転速度に応じて設定される位相進み補正量である。低速域では、速度補正量Ksが0に設定され、高速になるに従って、速度補正量Ksが例えば1又は2に増加される。これにより、ロータ32の回転速度に適した通電相となるように通電相判定値Mptnが補正される。
一方、上記ステップ322で、回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。
【0088】
また、上記ステップ321で、回転方向指示値D=0(逆回転)、つまりNotPレンジ→Pレンジの回転方向と判定された場合は、ステップ324に進み、回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが増加したか否か)を判定し、逆転していなければ、ステップ325に進み、現在のエンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、逆回転方向位相進み量K2、速度補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt−K2−Ks
【0089】
ここで、逆回転方向位相進み量K2は、ロータ32を逆回転させるのに必要な通電相の位相進み量(ロータ32の現在位置に対する通電相の位相進み量)であり、例えばK2=3に設定されている。速度補正量Ksは正回転の場合と同じである。
一方、上記ステップ324で、回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。
【0090】
以上のようにして、今回の通電相判定値Mptnを決定した後、ステップ326に進み、通電相判定値Mptnを“12”で割り算して、その余りmod(Mptn/12)を求める。ここで、“12”は、通電相を一巡させる間のエンコーダカウント値Ncntの増減量に相当する。
【0091】
mod(Mptn/12)の算出後、ステップ327に進み、図20の変換テーブルを検索して、mod(Mptn/12)に対応する通電相を選択し、これを今回の通電相に設定する。
【0092】
図21はU相から回転を開始する場合に最初に通電する相を説明するタイムチャートである。この場合、速度補正量Ks=0となるため、正回転(Pレンジ→NotPレンジ方向への回転)を開始する場合は、通電相判定値Mptnは次式により算出される。
Mptn=Ncnt−Gcnt+K1=Ncnt−Gcnt+4
【0093】
U相から正回転を開始する場合は、mod(Ncnt−Gcnt)は6となるため、mod(Mptn/12)=6+4=10となり、最初の通電相はV相となる。
【0094】
一方、U相から逆回転(NotPレンジ→Pレンジ方向への回転)を開始する場合は、通電相判定値Mptnは次式により算出される。
Mptn=Ncnt−Gcnt−K2=Ncnt−Gcnt−3
U相から逆回転を開始する場合は、mod(Mptn/12)=6−3=3となり、最初の通電相はW相となる。
【0095】
このように、正回転方向位相進み量K1と逆回転方向位相進み量K2をそれぞれ4と3に設定することで、正回転方向と逆回転方向の通電相の切換パターンを対称にすることができ、正回転方向と逆回転方向のいずれの場合も、ロータ32の現在位置から2ステップ分ずらした位置の相を最初に励磁して回転を開始することができる。
【0096】
ところで、SRモータ12の回転中は、図23に示すように、ロータ32の回転に同期してエンコーダ46からA相信号とB相信号が交互に出力されると共に、通電相の切り換えが一巡してロータ32が45°回転する毎に、Z相信号が出力される。このZ相信号によってロータ32の基準回転位置を正確に検出できるため、Z相信号が出力されるときの通電相(エンコーダカウント値)がロータ32の基準回転位置に対応する通電相(エンコーダカウント値)であるか否かを判定することで、ロータ32の回転位置と通電相(エンコーダカウント値)との対応関係がずれていないか否かを確認することができ、もし、ずれていれば、そのずれを補正するZ相補正を行うことで、信頼性の高いモータ制御を行うことができる。
【0097】
このZ相補正は、図22に示すZ相補正ルーチンによって実行される。本ルーチンは、A相割り込み処理によりA相信号の立ち上がり/立ち下がりの両方のエッジに同期して起動される。本ルーチンが起動されると、まずステップ401で、Z相信号の値Zが1(ハイレベル)で、且つエンコーダ故障フラグXfailがエンコーダ46の故障無しを意味するOFFにセットされているか否かを判定し、Z相信号の値Zが0(ローレベル)の場合、又はエンコーダ故障フラグXfailがエンコーダ46の故障有りを意味するONにセットされている場合は、ステップ401で、「No」と判定されて、以降の処理を行うことなく、本ルーチンを終了する。
【0098】
これに対し、ステップ401で、「Yes」と判定された場合は、ステップ402に進み、Z相信号出力時(Z相信号の値Zが1に反転した時)の位置検出カウント値Nzonを記憶する。この位置検出カウント値Nzonは、Z相信号出力時のエンコーダカウント値Ncntを初期位置ずれ学習値Gcntで補正したものであり、この位置検出カウント値Nzonからロータ32の基準回転位置(Z相信号が出力される位置)が検出される。
Nzon=Ncnt−Gcnt
【0099】
この後、ステップ403に進み、今回の本ルーチンの起動タイミングがA相信号の立ち上がりであるか否かで、ロータ32の回転方向が正回転方向(Pレンジ→NotPレンジの回転方向)であるか否かを判定する。
【0100】
図23に示すように、A相信号とZ相信号は、電気角で90°の位相差で出力されるため、正回転方向(Pレンジ→NotPレンジの回転方向)では、Z相信号出力期間中にA相信号が立ち上がり、逆回転方向(NotPレンジ→Pレンジの回転方向)では、Z相信号出力期間中にA相信号が立ち下がる。従って、Z相信号出力期間中にA相信号が立ち上がりか立ち下がるかで、正回転方向か逆回転方向かを判定することができる。
【0101】
上記ステップ403で、今回の本ルーチンの起動タイミングがA相信号の立ち上がりタイミング、つまりロータ32の回転方向が正回転方向(Pレンジ→NotPレンジの回転方向)であると判定された場合は、ステップ404に進み、Z相信号出力時の通電相の設計値と実値とのずれgzを算出する。
gz=K1−mod(Nzon/12)
【0102】
ここで、K1はロータ32を正回転させるのに必要な通電相の正回転方向位相進み量であり、例えばK1=4に設定されている。mod(Nzon/12)は、Z相信号出力時の位置検出カウント値Nzonを“12”で割り算したときの余りである。
【0103】
本実施形態では、図23に示すように、正回転方向(Pレンジ→NotPレンジの回転方向)の場合に、mod(Nzon/12)が4となるように設計されているため、制御系が正常に動作していれば、gz=K1−mod(Nzon/12)=0となる。
【0104】
一方、上記ステップ403で、今回の本ルーチンの起動タイミングがA相信号の立ち下がりタイミング、つまりロータ32の回転方向が逆回転方向(NotPレンジ→Pレンジの回転方向)であると判定された場合は、ステップ405に進み、Z相信号出力時の通電相の設計値と実値とのずれgzを算出する。
gz=K2−mod(Nzon/12)
ここで、K2はロータ32を逆回転させるのに必要な通電相の逆回転方向位相進み量であり、例えばK2=3に設定されている。
【0105】
本実施形態では、図23に示すように、逆回転方向(NotPレンジ→Pレンジの回転方向)の場合に、mod(Nzon/12)が3となるように設計されているため、制御系が正常に動作していれば、gz=K2−mod(Nzon/12)=0となる。
【0106】
設計値と実値とのずれgzの算出後、ステップ406に進み、Z相信号出力時の通電相の設計値と実値とのずれgzが0であるか否かを判定し、設計値と実値とのずれgzが0であれば、制御系は正常に動作しているので、以降のZ相補正等の処理を行わずに本ルーチンを終了する。
【0107】
これに対して、Z相信号出力時の通電相の設計値と実値とのずれgzが0でない場合は、Z相補正が必要と判断して、ステップ407に進み、Z相補正の回数をカウントするZ相補正回数カウンタCgzをカウントアップして、ステップ408に進み、初期位置ずれ学習値Gcntのずれを設計値と実値とのずれgz分だけ補正する。
Gcnt=Gcnt−gz
【0108】
この後、Z相補正回数カウンタCgzの値(Z相補正の回数)が判定値を越えたか否かを判定し、判定値以下であれば、まだエンコーダ46の故障とは判定しないが、Z相補正回数カウンタCgzの値(Z相補正の回数)が判定値を越えていれば、エンコーダ46の故障と判断して、ステップ410に進み、エンコーダ故障フラグXfailをエンコーダ46の故障有りを意味するONにセットして本ルーチンを終了する。
【0109】
エンコーダ故障フラグXfailがONにセットされると、その後、A相割り込み処理により本ルーチンが起動されても、常に、ステップ401で「No」と判定されて、本ルーチンが強制終了されるため、Z相補正が実行されない。この機能が特許請求の範囲でいうZ相補正禁止手段に相当する。
【0110】
以上説明した本実施形態では、ECU41への電源投入後の初期駆動時に、SRモータ12の通電相の切り換えを所定のタイムスケジュールで一巡させるようにしたので、初期駆動が終了するまでに、いずれかの通電相で必ずロータ32の回転位置と通電相とが一致して、それ以後、通電相の切り換えに同期してロータ32が回転して、このロータ32の回転に同期してエンコーダ46からA相信号及びB相信号が出力されるようになる。この初期駆動中に、エンコーダ46のA相信号及びB相信号の立ち上がり/立ち下がりの両方のエッジをカウントするようにしたので、初期駆動終了時のエンコーダカウント値を見れば、初期駆動が終了するまでにロータ32が実際に通電相の切り換えに同期して回転した角度(回転量)が分かり、それによって、初期駆動終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係が分かる。
【0111】
そこで、本実施形態では、初期駆動終了時のエンコーダカウント値を初期位置ずれ学習値として学習し、その後の通常駆動時にエンコーダカウント値を初期位置ずれ学習値で補正するようにしたので、初期駆動終了時のエンコーダカウント値と通電相(ロータ32の回転位置)とのずれを補正することができて、通常駆動時に正しい通電相を選択できる。
【0112】
しかも、本実施形態では、初期駆動時に1相通電と2相通電とを交互に切り換えるようにしたので、常に1相のみに通電する1相励磁方式や常に2相ずつ通電する2相励磁方式と比較して、1ステップ(1回の励磁)当たりのロータ回転角度が1/2となり、初期駆動中にロータ32の回転位置と通電相とを確実に同期させることができると共に、トルクが大きい2相通電でロータ32の振動を停止させて、エンコーダ46の出力信号を安定させることができる。
【0113】
この場合、初期駆動中にロータ32の回転位置と通電相との同期がとれた後でも、トルクが小さい1相通電では、ロータ32が振動するため、本実施形態のように、初期駆動中の1相通電の時間を2相通電の時間よりも短くするようにすれば、ロータ32が振動する1相通電の時間を短くして、できるだけ速やかに次の2相通電に切り換えることで、ロータ32の振動を速やかに停止させてエンコーダ46の出力信号を安定させることができると共に、初期駆動の時間を短くすることができる。
【0114】
但し、本発明は、1相通電の時間と2相通電の時間を同一に設定しても良く、この場合でも、本発明の所期の目的を十分に達成することができる。
【0115】
また、本実施形態では、初期駆動を1相通電から開始するようにしたが、初期駆動を2相通電から開始するようにしても良い。このようにすれば、仮に、初期駆動開始当初のロータ32の位置が最初の2相通電に対応する位置に正確に一致していなくても、その2相通電の大きなトルクが及ぶ範囲内であれば、初期駆動開始当初からロータ32の回転位置と通電相とを同期させることができる。
【0116】
本発明は、初期駆動時に1相通電と2相通電とを交互に切り換える構成に限定されず、常に1相のみに通電する1相励磁方式や常に2相ずつ通電する2相励磁方式で初期駆動を実行するようにしても良い。
【0117】
上述したように、2相通電では、トルクが大きいため、ロータ32の位置が2相通電に対応する位置から多少ずれていたとしても、ロータ32を2相通電に対応する位置まで回転させることができる。このため、初期駆動中に2相通電を1〜2回行うだけで、ロータ32の回転位置と通電相との同期がとれる確率は高いものと思われる。
【0118】
そこで、本実施形態では、Pレンジで初期駆動する途中で、Pレンジ→NotPレンジのレンジ切換操作が行われたときに、次の2相通電(2相通電の実行中にレンジ切換操作が行われたときはその2相通電)が終了してから通常駆動に移行すると共に、該2相通電終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習するようにしたので、初期駆動の途中で、Pレンジ→NotPレンジのレンジ切換操作が行われたときに、エンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習してから、通常駆動に速やかに移行して、PレンジからNotPレンジに速やかに切り換えることができ、運転者に違和感を感じさせずに済む。
【0119】
通常の場合は、NotPレンジで起動されることはない(Pレンジ以外のレンジではイグニッションスイッチをオフ操作できないようになっているためである)。しかしながら、特殊な条件下では、NotPレンジで起動する場合が起こり得る。例えば、走行中にECU41の瞬時停電が発生した場合や、整備工場で整備点検する場合等は、NotPレンジで起動することが起こり得る。
【0120】
制御仕様を簡略化するために、NotPレンジで起動するロジックを省略しても良いが、本実施形態では、NotPレンジで初期駆動する場合に対処するために、NotPレンジで初期駆動する途中で、NotPレンジ→Pレンジのレンジ切換操作が行われた場合は、初期駆動を最後まで実行してから通常駆動に移行してNotPレンジからPレンジに切り換えるようにしている。
【0121】
勿論、本発明は、NotPレンジで初期駆動する場合でも、Pレンジで初期駆動する場合と同じく、レンジ切換操作が行われたときに、次の2相通電(2相通電の実行中にレンジ切換操作が行われたときはその2相通電)が終了してから通常駆動に移行すると共に、該2相通電終了時のエンコーダカウント値とロータ32の回転位置と通電相との対応関係を学習するようにしても良い。
【0122】
或は、Pレンジで初期駆動する途中で、Pレンジ→NotPレンジのレンジ切換操作が行われた場合でも、初期位置ずれの学習を優先して、初期駆動を最後まで実行してから、通常駆動に移行してPレンジからNotPレンジに切り換えるようにしても良い。
【0123】
また、本実施形態では、エンコーダ46のZ相信号が出力されるときの通電相(エンコーダカウント値)がロータ32の基準回転位置に対応する通電相(エンコーダカウント値)であるか否かを判定することで、ロータ32の回転位置と通電相(エンコーダカウント値)との対応関係がずれていないか否かを確認し、もし、ずれていれば、そのずれを補正するZ相補正を行うようにしたので、信頼性の高いモータ制御を行うことができる。
【0124】
この場合、Z相補正が繰り返し行われるような場合は、誤ったZ相補正が行われている可能性がある。そこで、本実施形態では、通常駆動中にZ相補正が所定回数行われたときに該Z相補正を禁止するようにしたので、誤ったZ相補正の繰り返しによるSRモータ12の停止・誤作動を防止することができる。
【0125】
尚、図22のZ相補正ルーチンでは、エンコーダ46のZ相信号が出力されるときの通電相(エンコーダカウント値)とロータ32の回転位置との対応関係がずれていないか否かを判定するようにしたが、例えば、前回のZ相信号出力タイミングから今回のZ相信号出力タイミングまでのエンコーダカウント値の増減量が12であるか否かで、通電相(エンコーダカウント値)とロータ32の回転位置との対応関係がずれていないか否かを判定するようにしても良い。
【0126】
本発明は、Z相信号を出力しないエンコーダ(A相信号とB相信号のみを出力するエンコーダ)を用いても良く、この場合は、Z相補正の機能を省いた構成となる。
また、エンコーダ46は、磁気式のエンコーダに限定されず、例えば、光学式のエンコーダやブラシ式のエンコーダを用いても良い。
【0127】
本実施形態では、SRモータ12を用いたが、エンコーダの出力信号のカウント値に基づいてロータの回転位置を検出してモータの通電相を順次切り換えるブラシレス型のモータであれば、SRモータに限定されず、他の種類のブラシレス型のモータであっても良い。
【0128】
また、本実施形態のレンジ切換装置は、PレンジとNotPレンジの2つのレンジを切り換える構成であるが、例えば、ディテントレバー15の回動動作に連動して自動変速機のレンジ切換弁とマニュアルバルブを切り換えて、自動変速機のP、R、N、D、…の各レンジを切り換えるレンジ切換装置にも本発明を適用して実施できる。
【0129】
その他、本発明は、レンジ切換装置に限定されず、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】モータF/B制御ルーチンの処理の流れを示すフローチャート
【図19】通電相設定ルーチンの処理の流れを示すフローチャート
【図20】mod(Mptn/12)から通電相への変換テーブルの一例を示す図
【図21】通電処理を説明するタイムチャート
【図22】Z相補正ルーチンの処理の流れを示すフローチャート
【図23】Z相補正を説明するタイムチャート
【符号の説明】
11…レンジ切換機構、12…SRモータ、14…出力軸センサ、15…ディテントレバー、18…パーキングロッド、20…パーキングギヤ、21…ロックレバー、23…ディテントバネ、24…Pレンジ保持凹部、25…NotPレンジ保持凹部、26…減速機構、27…自動変速機、31…ステータ、32…ロータ、33,34…巻線、35,36…モータ励磁部、37,38…モータドライバ、41…ECU(制御手段,Z相補正禁止手段)、43…Pレンジスイッチ、44…NotPレンジスイッチ、46…エンコーダ、47…ロータリマグネット、48…A相信号用の磁気検出素子、49…B相信号用の磁気検出素子、50…Z相信号用の磁気検出素子。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a motor control device that rotates a rotor by sequentially switching the energized phase of a motor based on an output signal of an encoder.
[0002]
[Prior art]
In recent years, brushless motors such as switch reluctance motors, which have been increasing in demand as simple and inexpensive motors, are equipped with an encoder that outputs a pulse signal in synchronization with the rotation of the rotor. There is a type in which the rotor is rotationally driven by detecting the rotational position of the rotor based on the count value and sequentially switching the energized phase.
[0003]
[Problems to be solved by the invention]
By the way, this type of motor with an encoder can only detect the amount of rotation (rotation angle) from the start position of the rotor based on the count value of the output signal of the encoder after startup. If the absolute rotation position of the rotor is detected by the method and the correspondence between the rotation position of the rotor and the energized phase is not established, the motor cannot be driven normally.
[0004]
Thus, for example, in a switched reluctance motor, as shown in Japanese Patent Application Laid-Open No. 2000-69779, two phases are simultaneously excited (energized) at the start of startup, and after a lapse of a predetermined time, the rotational position of the rotor at that time is determined. In some cases, the current-carrying phase is determined on the basis of.
[0005]
However, simply exciting the two phases simultaneously at the start of startup does not necessarily mean that the rotor will necessarily rotate to the position corresponding to the two energized phases, and that the rotational position of the rotor and the energized phase may not correspond. is there.
[0006]
In addition, the above-mentioned publication states that there may be unstable points even when two-phase current is applied. As a countermeasure, the above publication discloses that one-phase current is supplied, and then two phases are simultaneously excited. First, by exciting one phase, the unstable region caused by exciting two phases is removed, and then, by exciting two phases, the rotor can be rotated to only one stable point, It is described that the reference position of the rotor can be surely learned.
[0007]
However, when one phase is excited, the rotor is less likely to rotate to a position corresponding to one phase because the torque is smaller than when two phases are excited. Therefore, if only one phase is first excited, the unstable region when the two phases are excited cannot be excluded, and the reference position of the rotor may still be erroneously learned.
[0008]
The present invention has been made in view of these circumstances, and accordingly, an object of the present invention is to provide a motor control device capable of securely associating the rotational position of the rotor with the energized phase by initial driving after power-on. To provide.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, the motor control device according to claim 1 of the present invention counts the output signal of the encoder by making a cycle of switching the energized phase of the motor at a predetermined time schedule at the time of initial driving after power-on. Learns the correspondence between the count value at the end of the initial drive, the rotational position of the rotor, and the energized phase, and then energizes based on the count value of the output signal of the encoder and the learning result at the end of the initial drive during normal drive. The phase is determined. As described above, if the switching of the energized phase is performed once during the initial drive, the rotational position of the rotor and the energized phase always match in one of the energized phases before the end of the initial drive. The rotor rotates in synchronism with the switching, and a pulse signal is output from the encoder in synchronization with the rotation of the rotor. Therefore, by looking at the count value of the output signal of the encoder at the end of the initial drive, the angle (rotation amount) at which the rotor actually rotates in synchronization with the switching of the energized phase before the end of the initial drive can be determined. Since the correspondence between the count value of the output signal of the encoder at the end of the initial drive, the rotational position of the rotor, and the energized phase can be understood, by learning this correspondence, the count value of the output signal of the encoder during normal drive thereafter. The correct energizing phase can be selected based on the learning result at the end of the initial drive and the motor can be normally rotated.
[0010]
Further, a switch reluctance motor may be used as the motor, and one-phase energization and two-phase energization may be alternately switched at the time of initial driving. Switched reluctance motors have the advantage that they are inexpensive and have high durability and reliability against temperature environments and the like because they do not require permanent magnets and have a simple structure. If the one-phase energization and the two-phase energization are alternately switched at the time of the initial drive, compared with the one-phase excitation system in which only one phase is always energized or the two-phase excitation system in which two phases are always energized, one phase energization is performed. Since the rotation angle of the rotor per step (one excitation) is halved, the rotation position of the rotor and the energized phase can be reliably synchronized during the initial drive, and the rotor can be energized by two-phase energization with a large torque. Is stopped, and the output signal of the encoder can be stabilized.
[0011]
In this case, the one-phase energization time during the initial drive may be shorter than the two-phase energization time. In other words, even after the rotational position of the rotor and the energized phase are synchronized during the initial drive, the rotor oscillates in the one-phase energization with a small torque, so that the one-phase energization time is shortened and the next By switching to the two-phase energization, the vibration of the rotor can be stopped quickly, the output signal of the encoder can be stabilized, and the time of the initial drive can be shortened.
[0012]
Further, the initial drive may be started from two-phase energization. In this way, even if the rotor position at the beginning of the initial drive does not exactly match the position corresponding to the first two-phase energization, if it is within the range where the large torque of the two-phase energization can reach. In addition, the rotational position of the rotor and the energized phase can be synchronized from the beginning of the initial drive.
[0013]
Further, when it is necessary to terminate the initial drive and shift to the normal drive during the initial drive, the next two-phase energization (the shift to the normal drive during the execution of the two-phase energization) is performed. When it is necessary to perform the two-phase energization, the operation shifts to the normal drive after the end of the two-phase energization, and the count value of the output signal of the encoder, the rotational position of the rotor, and the energized phase at the end of the two-phase energization The correspondence may be learned, and the energized phase may be determined based on the count value of the output signal of the encoder and the learning result at the end of the two-phase energization during the subsequent normal driving.
[0014]
As described above, in the two-phase energization, since the torque is large, even if the position of the rotor is slightly shifted from the position corresponding to the two-phase energization, the rotor can be rotated to the position corresponding to the two-phase energization. Therefore, it is considered that there is a high probability that the rotation position of the rotor and the energized phase can be synchronized only by performing the two-phase energization once or twice during the initial drive. Therefore, when it is necessary to terminate the initial drive and shift to the normal drive during the initial drive, the normal drive is switched to the normal drive after the next two-phase energization (or the current two-phase energization) ends. Then, during the initial drive, the correspondence between the count value of the output signal of the encoder, the rotational position of the rotor, and the energized phase can be learned, and then the normal drive can be quickly shifted to.
[0015]
In addition, the encoder outputs the A-phase signal and the B-phase signal having a predetermined phase difference (generally, a phase difference of 90 degrees in electrical angle) in synchronization with the rotation of the rotor. The Z-phase signal is output at the reference rotation position of the rotor, and the edges of the A-phase signal and the B-phase signal are counted at the time of the initial drive, and the count value at the end of the initial drive, the rotation position of the rotor, and the energized phase are counted. The energizing phase is determined based on the count value of the output signal of the encoder and the learning result at the end of the initial drive at the time of normal driving, and the count value at the time of outputting the Z-phase signal. It is determined whether or not the correspondence between the rotational position of the rotor and the rotational position of the rotor and the energized phase are not shifted, and if there is a shift, the shift may be corrected (hereinafter, this correction is referred to as “Z-phase correction”). .
[0016]
In this configuration, since the reference rotation position of the rotor can be accurately detected by the Z-phase signal output from the encoder, for example, the energized phase (count value) when the Z-phase signal is output corresponds to the reference rotation position of the rotor. By determining whether the current phase is the current phase (count value), it is possible to confirm whether the correspondence between the rotational position of the rotor and the current phase (count value) is not shifted. If so, by correcting the deviation, highly reliable motor control can be performed.
[0017]
In this case, if the Z-phase correction is repeatedly performed, there is a possibility that an erroneous Z-phase correction has been performed. Therefore, the Z-phase correction is performed a predetermined number of times during normal driving. In such a case, the Z-phase correction may be prohibited by the Z-phase correction prohibiting means. By doing so, it is possible to prevent the motor from stopping and malfunctioning due to repeated incorrect Z-phase correction.
[0018]
Further, the Z-phase correction may be executed by edge interrupt processing of the A-phase signal or the B-phase signal. This makes it possible to synchronize the Z-phase correction with the switching timing of the energized phase.
[0019]
The invention according to claims 1 to 8 described above can be applied to various devices using a brushless type motor such as a switch reluctance motor as a drive source. The present invention may be applied to a control device for a motor that drives a range switching mechanism that switches between a range and a range. Thus, a highly reliable motor-driven range switching device can be configured.
[0020]
BEST MODE FOR CARRYING OUT THE INVENTION
An embodiment in which the present invention is applied to a range switching device for a vehicle will be described below with reference to the drawings.
[0021]
First, the configuration of the range switching mechanism 11 will be described with reference to FIG. The motor 12 serving as a drive source of the range switching mechanism 11 is constituted by, for example, a switch reluctance motor, has a built-in speed reduction mechanism 26 (see FIG. 4), and is provided with an output shaft sensor 14 for detecting the rotational position of the output shaft 13. Have been. A detent lever 15 is fixed to the output shaft 13.
[0022]
An L-shaped parking rod 18 is fixed to the detent lever 15, and a conical body 19 provided at the tip of the parking rod 18 is in contact with the lock lever 21. The lock lever 21 moves up and down about the shaft 22 in accordance with the position of the cone 19 to lock / unlock the parking gear 20. The parking gear 20 is provided on the output shaft of the automatic transmission 27. When the parking gear 20 is locked by the lock lever 21, the driving wheels of the vehicle are held in a state where they are prevented from rotating (parking state).
[0023]
On the other hand, a detent spring 23 for holding the detent lever 15 in a parking range (hereinafter referred to as “P range”) and another range (hereinafter referred to as “NotP range”) is fixed to the support base 17. When the engaging portion 23a provided at the tip of the spring 23 is fitted into the P range holding concave portion 24 of the detent lever 15, the detent lever 15 is held at the position of the P range. The detent lever 15 is held at the position of the NotP range when 23a is fitted into the NotP range holding recess 25 of the detent lever 15.
[0024]
In the P range, the parking rod 18 moves in a direction approaching the lock lever 21, and the thick portion of the cone 19 pushes up the lock lever 21, and the projection 21 a of the lock lever 21 fits into the parking gear 20 to park. The gear 20 is locked, whereby the output shaft (drive wheel) of the automatic transmission 27 is maintained in a locked state (parking state).
[0025]
On the other hand, in the NotP range, the parking rod 18 moves in a direction away from the lock lever 21, the thick portion of the cone 19 comes out of the lock lever 21, and the lock lever 21 descends. 21a is disengaged from the parking gear 20, the lock of the parking gear 20 is released, and the output shaft of the automatic transmission 27 is maintained in a rotatable state (runnable state).
[0026]
The output shaft sensor 14 described above is constituted by a rotation sensor (for example, a potentiometer) that outputs a voltage corresponding to the rotation angle of the output shaft 13 of the speed reduction mechanism 26 of the motor 12, and the current range is set to the P range by the output voltage. And the NotP range.
[0027]
Next, the configuration of the motor 12 will be described with reference to FIG. In the present embodiment, a switched reluctance motor (hereinafter referred to as “SR motor”) is used as the motor 12. The SR motor 12 is a motor in which both the stator 31 and the rotor 32 have a salient pole structure, and has an advantage that a permanent magnet is not required and the structure is simple. For example, twelve salient poles 31a are formed at equal intervals on the inner peripheral portion of the cylindrical stator 31, whereas, for example, eight salient poles 32a are formed at equal intervals on the outer peripheral portion of the rotor 32. The respective salient poles 32a of the rotor 32 are sequentially opposed to the respective salient poles 31a of the stator 31 via a minute gap with the rotation of the rotor 32. The twelve salient poles 31a of the stator 31 have a total of six windings 33 of U-phase, V-phase, and W-phase, and a total of six windings 34 of U'-, V'-, and W'-phases. It is wound in order. It goes without saying that the number of salient poles 31a and 32a of the stator 31 and the rotor 32 may be changed as appropriate.
[0028]
The winding order of the windings 33 and 34 in the present embodiment is, for example, V phase → W phase → U phase → V phase → W phase → U phase → V ′ for the twelve salient poles 31a of the stator 31. The phases are wound in the order of phase → W ′ phase → U ′ phase → V ′ phase → W ′ phase → U ′ phase. As shown in FIG. 3, a total of six windings 33 of U-phase, V-phase and W-phase and a total of six windings 34 of U′-phase, V′-phase and W′-phase are two-system motors. They are connected so as to form the excitation units 35 and 36. One motor excitation unit 35 is configured by connecting a total of six windings 33 of U-phase, V-phase, and W-phase in a Y-connection (two windings 33 of the same phase are connected in series). The other motor excitation unit 36 is configured by connecting a total of six windings 34 of U ′ phase, V ′ phase, and W ′ phase in a Y connection (two windings 34 of the same phase are connected in series, respectively). It is connected to the). In the two motor excitation units 35 and 36, the U phase and the U 'phase are simultaneously energized, the V phase and the V' phase are simultaneously energized, and the W phase and the W 'phase are simultaneously energized.
[0029]
These two motor excitation units 35 are driven by separate motor drivers 37 and 38 using a battery 40 mounted on the vehicle as a power supply. In this way, by providing the motor excitation units 35 and 36 and the motor drivers 37 and 38 each in two systems, even if one system fails, the SR motor 12 can be rotated in the other system. ing. The circuit configuration example of the motor drivers 37 and 38 shown in FIG. 3 has a unipolar drive circuit configuration in which one switching element 39 such as a transistor is provided for each phase, but two switching elements are provided for each phase. Alternatively, a circuit configuration of a bipolar drive system provided for each may be adopted. It is needless to say that the present invention may be configured such that one system is provided for each of the motor excitation unit and the motor driver.
[0030]
ON / OFF of each switching element 39 of each motor driver 37, 38 is controlled by the ECU 41 (control means). As shown in FIG. 4, the ECU 41 and the motor drivers 37 and 38 are mounted on a range switching control device 42. The range switching control device 42 includes a P range switch 43 for performing a switching operation to a P range, An operation signal of a NotP range switch 44 for performing a switching operation to the NotP range is input. The range selected by operating the P range switch 43 or the NotP range switch 44 is displayed on a range display section 45 provided on an instrument panel (not shown).
[0031]
The SR motor 12 is provided with an encoder 46 for detecting the rotational position of the rotor 32. The encoder 46 is constituted by, for example, a magnetic rotary encoder. As shown in FIGS. 5 and 6, the specific configuration of the encoder 46 is such that north poles and south poles are alternately arranged at equal pitches in the circumferential direction. A magnetized annular rotary magnet 47 is coaxially fixed to the side surface of the rotor 32, and three magnetic detecting elements 48, 49, 50 such as Hall ICs are arranged at positions facing the rotary magnet 47. It has a configuration. In the present embodiment, the magnetization pitch between the N pole and the S pole of the rotary magnet 47 is set to 7.5 °. The magnetization pitch (7.5 °) of the rotary magnet 47 is set to be the same as the rotation angle of the rotor 32 per excitation of the SR motor 12. As will be described later, when the energized phase of the SR motor 12 is switched six times by the 1-2-phase excitation method, all energized phases are switched once, and the rotor 32 and the rotary magnet 47 are integrally 7.5 °. × 6 = 45 ° rotation. The number of N poles and S poles present in the rotation angle range of 45 ° of the rotary magnet 47 is a total of six poles.
[0032]
Further, the N pole (N ') at the position corresponding to the reference rotation position of the rotor 32 and the S poles (S') on both sides thereof are formed so as to be wider in the radial direction than the other magnetic poles. In the present embodiment, considering that the rotor 32 and the rotary magnet 47 rotate integrally by 45 ° during one cycle of the switching of the energized phase of the SR motor 12, a wide width corresponding to the reference rotation position of the rotor 32 is taken into consideration. The large magnetized portions (N ′) are formed at a 45 ° pitch, so that a total of eight wide magnetized portions (N ′) corresponding to the reference rotation position are formed as the rotary magnet 47 as a whole. The wide magnetized portion (N ′) corresponding to the reference rotation position may be configured such that only one magnet is formed as the whole rotary magnet 47.
[0033]
Three magnetic detecting elements 48, 49, 50 are arranged with respect to the rotary magnet 47 in the following positional relationship. The magnetic detecting element 48 that outputs the A-phase signal and the magnetic detecting element 49 that outputs the B-phase signal are composed of a narrow magnetized portion (N, S) and a wide magnetized portion (N ′, S ′) of the rotary magnet 47. ) Are arranged on the same circumference at positions that can face both. On the other hand, the magnetic detection element 50 that outputs the Z-phase signal is located at a position radially outside or inside the narrow magnetized portion (N, S) of the rotary magnet 47 and has a wide magnetized portion (N ′). , S ′) only. As shown in FIG. 7, the interval between the two magnetic detecting elements 48 and 49 for outputting the A-phase signal and the B-phase signal is such that the phase difference between the A-phase signal and the B-phase signal is 90 ° in electrical angle (mechanical angle). 3.75 °). Here, “electric angle” is an angle when the generation period of the A / B phase signal is one cycle (360 °), and “mechanical angle” is a mechanical angle (one rotation of the rotor 32 is 360 °). The angle at which the rotor 32 rotates from the fall (rise) of the A-phase signal to the fall (rise) of the B-phase signal corresponds to the mechanical angle of the phase difference between the A-phase signal and the B-phase signal. I do. The magnetic detection element 50 that outputs the Z-phase signal is arranged so that the phase difference between the Z-phase signal and the B-phase signal (or the A-phase signal) becomes zero.
[0034]
The output of each of the magnetic detection elements 48, 49, and 50 becomes a high level "1" when facing the N pole (N 'pole), and becomes a low level "0" when facing the S pole (S' pole). Become. The output of the magnetic detection element 50 for the Z-phase signal becomes high level "1" every time it faces the wide N 'pole corresponding to the reference rotation position of the rotor 32. At other positions, the output becomes low level "1". 0 ".
[0035]
In the present embodiment, the ECU 41 counts both rising and falling edges of the A-phase signal and the B-phase signal in accordance with an encoder counter routine of FIG. , 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, and the encoder count value is counted up in the forward rotation (P direction → NotP range rotation direction), and the reverse rotation (NotP range → In the (P-range rotation direction), the encoder count value is counted down. Accordingly, even if the rotor 32 rotates in either the forward direction or the reverse direction, the correspondence between the encoder count value and the rotational position of the rotor 32 is maintained. However, the rotation position (rotation angle) of the rotor 32 is detected based on the encoder count value, and the windings 33 and 34 of the phase corresponding to the rotation position are energized to drive the rotor 32 to rotate.
[0036]
FIG. 7 shows an output waveform of the encoder 46 and a switching pattern of the energized phase when the rotor 32 is rotated in the reverse rotation direction (the rotation direction from the NotP range to the P range). In both the reverse rotation direction (the rotation direction from the NotP range to the P range) and the normal rotation direction (the rotation direction from the P range to the NotP range), one phase energization and two phases are performed every time the rotor 32 rotates 7.5 °. The energization and the energization are alternately switched, and during the rotation of the rotor 32 by 45 °, for example, in the order of U-phase energization → UW-phase energization → W-phase energization → VW-phase energization → V-phase energization → UV-phase energization The switching of the energized phase is performed once. Each time the energized phase is switched, the rotor 32 rotates by 7.5 ° so that the magnetic pole of the rotary magnet 47 facing the magnetic detection elements 48 and 49 for the A-phase and B-phase signals changes from N pole to S pole. (N ′ pole → S ′ pole) or S pole → N pole (S ′ pole → N ′ pole), and the levels of the A-phase signal and the B-phase signal are alternately inverted. The encoder count value is incremented (or decremented) by 2 for every .5 ° rotation. Each time the switching of the energized phase completes one cycle and the rotor 32 rotates 45 °, the magnetic detection element 50 for the Z phase faces the wide N ′ pole corresponding to the reference rotation position of the rotor 32, and The signal becomes high level "1". In this specification, the fact that the A-phase, B-phase, and Z-phase signals are at the high level “1” may be referred to as the output of the A-phase, B-phase, and Z-phase signals.
[0037]
By the way, since the encoder count value is stored in the RAM of the ECU 41, when the power of the ECU 41 is turned off, the storage of the encoder count value disappears. Therefore, the encoder count value (0) immediately after the power supply of the ECU 41 is turned on does not correspond to the actual rotational position (energized phase) of the rotor 32. Therefore, in order to switch the energized phase according to the encoder count value, it is necessary to make the encoder count value correspond to the actual rotational position of the rotor 32 after power-on, and to make the encoder count value correspond to the energized phase.
[0038]
Therefore, in the present embodiment, the initial drive routine shown in FIGS. 8 and 9 to be described later is executed by the ECU 41 of the range switching control device 42, so that the initial phase of the SR motor 12 is turned on when the ECU 41 is powered on. Is cycled in a predetermined time schedule to count the edges of the A-phase signal and the B-phase signal of the encoder 46, and learn the correspondence between the encoder count value at the end of the initial drive, the rotational position of the rotor 32, and the energized phase. Then, during the subsequent normal driving, the energized phase is determined based on the encoder count value and the learning result at the end of the initial driving.
[0039]
The learning at the time of the initial drive is specifically performed as follows. As shown in FIG. 12, when the initial drive is performed when the power is supplied to the ECU 41 in the P range, for example, W-phase energization → UW-phase energization → U-phase energization → UV-phase energization → V-phase energization → VW-phase The energization phase is switched in a predetermined time schedule in the energization order, and the rotor 32 is driven in the normal rotation direction (P range → Not P range rotation direction).
[0040]
On the other hand, when the initial drive is performed when the power is supplied to the ECU 41 in the NotP range, for example, energization is performed in the order of V-phase energization → UV-phase energization → U-phase energization → UW-phase energization → W-phase energization → VW-phase energization. The phase switching is performed once in a predetermined time schedule, and the rotor 32 is driven in the reverse rotation direction (the rotation direction from the NotP range to the P range).
[0041]
During this initial drive, the one-phase energization time T1 is set shorter than the two-phase energization time T2, for example, T1 = 10 ms and T2 = 100 ms. Even after the rotational position of the rotor 32 and the energized phase are synchronized during the initial drive, the rotor 32 vibrates in the one-phase energization with a small torque, so the time T1 of the one-phase energization is shortened, and as soon as possible. By switching to the next two-phase energization, the vibration of the rotor 32 is stopped immediately and the output signal of the encoder 46 is stabilized.
[0042]
As described above, if the switching of the energized phase is performed once during the initial drive, the rotational position of the rotor 32 and the energized phase always match in any energized phase before the end of the initial drive. The rotor 32 rotates in synchronization with the phase switching, and the A-phase signal and the B-phase signal are output from the encoder 46 in synchronization with the rotation of the rotor 32.
[0043]
During this initial drive, both rising and falling edges of the A-phase signal and the B-phase signal of the encoder 46 are counted. Therefore, by looking at the encoder count value at the end of the initial drive, the angle (rotation amount) at which the rotor 32 actually rotates in synchronization with the switching of the energized phase before the end of the initial drive can be determined. The relationship between the encoder count value at the time, the rotational position of the rotor 32, and the energized phase can be understood.
[0044]
In the example of FIG. 12, the rotor 32 rotates from the first energized phase (W phase) during the initial drive, and the rotor 32 rotates by 7.5 ° every time the energized phase is switched, and the encoder count value is incremented by two. At the end of the initial drive, the encoder count value becomes 12.
[0045]
On the other hand, for example, if the rotor 32 does not rotate in the first three excitations (W-phase energization → UW-phase energization → U-phase energization), that is, the fourth and subsequent excitations (UV-phase energization → V-phase energization → VW-phase) In the case where the rotation position of the rotor 32 and the energized phase are synchronized with each other in the energized state and the rotor 32 rotates by three times of excitation, the rotor 32 is 7.5 ° × 3 = 22.5 ° by the end of the initial drive. It rotates and the encoder count value becomes 2 × 3 = 6. Therefore, by looking at the encoder count value at the end of the initial drive, the angle (rotation amount) at which the rotor 32 actually rotates in synchronization with the switching of the energized phase before the end of the initial drive is determined.
[0046]
Although the last energized phase of the initial drive is always the VW phase, the encoder count value is not always 12 and may be, for example, 8 or 4. At the time of normal drive after the end of the initial drive, the energized phase is determined based on the encoder count value. Therefore, unless the deviation of the encoder count value due to the initial drive is corrected, the correct energized phase cannot be selected at the time of normal drive.
[0047]
Therefore, in the present embodiment, the encoder count value at the end of the initial drive is learned as the initial position deviation learning value, and the encoder count value at the time of the subsequent normal drive is corrected with the initial position deviation learning value. The deviation between the encoder count value and the energized phase (the rotational position of the rotor 32) is corrected so that the correct energized phase can be selected during normal driving.
[0048]
After the end of the initial drive, as shown in FIG. 12, first, for example, 10 ms is applied to the same phase as the energized phase (VW phase) at the end of the initial drive to maintain the position of the rotor 32 at the position at the end of the initial drive. By the feedback control (hereinafter referred to as “F / B control”) described later, the energized phase is switched based on the encoder count value at that time and the initial position deviation learning value to rotate the rotor 32 in the direction of the target position Acnt. Let it. Thereby, when the rotational position (encoder count value) of the rotor 32 reaches, for example, within 0.5 ° from the target position Acnt, the switching of the energized phase is completed and the rotor 32 is stopped. The stationary state of the rotor 32 is maintained by continuing the energization, and this maintained state is continued for, for example, 50 ms. Thereafter, if the target position Acnt does not change, the energization is stopped.
[0049]
When the P range switch 43 or the NotP range switch 44 is operated to generate a range switching request during the initial drive, the next two-phase energization (when the range switching request occurs during the execution of the two-phase energization) is performed. After the completion of the two-phase energization, the operation shifts to the normal drive, and the correspondence between the encoder count value at the end of the two-phase energization, the rotational position of the rotor 32, and the energized phase is learned. The energized phase is determined based on the encoder count value and the learning result at the end of the two-phase energization.
[0050]
In the two-phase energization, since the torque is large, even if the position of the rotor 32 is slightly shifted from the position corresponding to the two-phase energization, the rotor 32 can be rotated to the position corresponding to the two-phase energization. Therefore, it is considered that there is a high probability that the rotation position of the rotor 32 and the energized phase can be synchronized only by performing the two-phase energization once or twice during the initial driving. Therefore, when a range switching request is generated during the initial drive, the normal two-phase energization (or the current two-phase energization) is terminated before the normal drive is started. After learning the correspondence between the count value, the rotational position of the rotor 32, and the energized phase, it is possible to quickly shift to the normal drive.
[0051]
For example, as shown in the time chart of FIG. 13, when a range switching request from the P range to the NotP range occurs during the second excitation (UW phase energization) of the initial drive, the initial drive is performed by the UW phase energization. At the same time, the process is shifted to the normal drive, and the correspondence between the encoder count value at the end of the UW phase energization, the rotational position of the rotor 32, and the energized phase is learned. In the present embodiment, even when shifting to the normal drive in the middle of the initial drive, the encoder count value at the end of the original initial drive is estimated assuming that the initial drive has been executed to the end, and the estimated value is initialized. The position deviation learning value is set. For example, as shown in FIG. 13, when the initial drive is ended by two excitations of the W-phase energization and the UW-phase energization, the initial drive is ended without performing the four scheduled excitations thereafter. Assuming that four unexcited excitations (U-phase energization → UV-phase energization → V-phase energization → VW-phase energization) have been performed, the count-up value (2) corresponding to the rotation angle for the four excitations × 4 = 8) is added to the encoder count value at the end of the UW-phase energization to obtain an initial position deviation learning value.
[0052]
The learning process of the initial drive described above is executed by the ECU 41 of the range switching control device 42 in accordance with the initial drive routine shown in FIGS. This routine is executed at a predetermined cycle (for example, 1 ms cycle) immediately after the power supply to the ECU 41 is turned on (immediately after the ignition switch is operated from the OFF position to the ACC position) until the end of the initial drive.
[0053]
When this routine is started, first, in step 101, it is determined whether the open loop control execution flag Xopen = ON or the recovery processing execution flag Xrcv = ON. Here, the open-loop control execution flag Xopen is a flag that determines whether or not open-loop control (fail-safe processing) that is executed when the encoder 46 or the SR motor 12 has failed is being executed. Means that it is. The recovery process execution flag Xrcv is a flag for determining whether or not a recovery process (open loop control) that is temporarily executed when a temporary operation abnormality occurs is executed, and ON is executed. Means that.
[0054]
If “Yes” is determined in step 101, the present routine is terminated without performing the subsequent processing, and if “No” is determined, the process proceeds to step 102 and the output from the initial processing of the ECU 41 is performed. It is determined whether a predetermined time (for example, 100 ms) for waiting for the output voltage of the axis sensor 14 to stabilize has elapsed. Then, when a predetermined time has elapsed from the initial processing, the process proceeds to step 103, where the output voltage of the output shaft sensor 14 is read, and whether or not the current range is the P range is determined by whether or not this output voltage is equal to or less than the range determination value. It is determined whether the range is the NotP range. If the range is the P range, the process proceeds to step 104, where the range determination flag Xnp is set to “0” meaning the P range. If the range is the NotP range, the process proceeds to step 105 and the range determination flag Xnp Is set to “1” meaning NotP range.
[0055]
Thereafter, the process proceeds to step 106, where it is determined whether or not the range determination flag Xnp = 0 (P range). If the range determination flag Xnp = 0 (P range), the process proceeds to step 107, where P The range initial drive routine is executed, and if the range determination flag Xnp = 1 (NotP range), the routine proceeds to step 108, where the NotP range initial drive routine of FIG. 11 is executed.
[0056]
When the P range initial drive routine of FIG. 10 is started in step 107, in steps 201 to 206, it is determined whether the excitation number counter CASE for counting the number of excitations during the initial drive is 0 to 5. . The excitation number counter CASE has an initial value of 0 set in the initial processing, and is incremented by one each time excitation is performed once (step 114 in FIG. 9). Then, the energizing phase and the energizing time T are set as follows according to the determination result of the excitation number counter CASE.
[0057]
If CASE = 0 (first excitation), the process proceeds to step 207, where W-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 1 (second excitation), the process proceeds to step 208, where UW-phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0058]
If CASE = 2 (third excitation), the process proceeds to step 209 to select U-phase energization and set the energization time T to T1 (for example, 10 ms).
If CASE = 3 (fourth excitation), the process proceeds to step 210, where UV phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0059]
If CASE = 4 (fifth excitation), the process proceeds to step 211, where V-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 5 (sixth excitation), the process proceeds to step 212, where VW-phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0060]
Thus, when the initial drive is performed in the P range, the energized phases are switched in the order of W-phase energization → UW-phase energization → U-phase energization → UV-phase energization → V-phase energization → VW-phase energization, and the rotor 32 is rotated. Driving is performed in the forward rotation direction (P range → NotP range rotation direction). At this time, the one-phase energization time T1 is set shorter than the two-phase energization time T2.
[0061]
On the other hand, when the NotP range initial drive routine of FIG. 11 is started in step 108, it is determined in steps 221 to 226 whether the excitation number counter CASE is 0 to 5 and the energization is performed according to the determination result. The phase and the energizing time T are set as follows.
[0062]
If CASE = 0 (first excitation), the process proceeds to step 227, where V-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 1 (second excitation), the process proceeds to step 228, where UV phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0063]
If CASE = 2 (third excitation), the process proceeds to step 229, where U-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 3 (fourth excitation), the process proceeds to step 230, where UW-phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0064]
If CASE = 4 (fifth excitation), the process proceeds to step 231, where W-phase energization is selected, and the energization time T is set to T1 (for example, 10 ms).
If CASE = 5 (sixth excitation), the process proceeds to step 232, where VW-phase energization is selected, and the energization time T is set to T2 (for example, 100 ms).
[0065]
Thus, when the initial drive is performed in the NotP range, the switching of the energized phases is performed in the order of V phase energization → UV phase energization → U phase energization → UW phase energization → W phase energization → VW phase energization, and the rotor 32 Drive is performed in the reverse rotation direction (the rotation direction from the NotP range to the P range). Also in this case, the one-phase energization time T1 is set shorter than the two-phase energization time T2.
[0066]
After executing the P range initial drive routine of FIG. 10 or the NotP range initial drive routine of FIG. 11 as described above, the process proceeds to step 109 of FIG. 8, and the range switching operation (P range switch 43 or NotP It is determined whether or not the range switch 44 has been operated). If the range switch operation has been performed during the initial drive, the process proceeds to step 110, where the range switch operation flag Xchg is set to ON, and the range switch operation is performed. If not, the routine proceeds to step 111, where the range switching operation flag Xchg is set to OFF.
[0067]
Thereafter, the process proceeds to step 112 in FIG. 9, in which the energizing time counter CT for counting the energizing time of the current energizing phase is counted up. It is determined whether or not the energization time T (= T1 or T2) set in the routine 11 has been exceeded, and if not, this routine is terminated without performing the subsequent processing. Thereby, the energization to the current energized phase is continued until the energized time CT of the current energized phase exceeds the energized time T (= T1 or T2) set in the routine of FIG. 10 or FIG.
[0068]
Thereafter, when the energization time CT of the current energization phase exceeds the energization time T (= T1 or T2) set in the routine of FIG. 10 or FIG. 11, the routine proceeds to step 114, where the excitation number counter CASE is counted up by one. Then, the energized phase is switched to the next energized phase. Then, in the next step 115, after resetting the energization time counter CT, the routine proceeds to step 116, where it is determined whether or not the excitation number counter CASE has reached "6" indicating the end of the initial drive. If the number counter CASE has reached "6", the routine proceeds to step 118, where the initial drive end flag Xend is set to "ON" indicating the end of the initial drive.
[0069]
If the number-of-excitations counter CASE has not reached "6", that is, if the initial drive is being performed, the process proceeds to step 117, and it is determined whether the condition for ending the initial drive is satisfied. The condition for terminating the initial drive halfway is determined by the following three conditions (1) to (3).
(1) The range determination flag Xnp is 0 (P range)
{Circle around (2)} The excitation number counter CASE is 2 or 4, that is, the end of two-phase energization.
(3) The range switching operation flag Xchg is ON, that is, the range switching operation has been performed during the initial drive.
[0070]
If at least one of these three conditions (1) to (3) is not satisfied, the condition for ending the initial drive is not satisfied, and the initial drive is continued. On the other hand, if all of the three conditions (1) to (3) are satisfied, the condition for terminating the middle of the initial drive is satisfied, the process proceeds to step 118, and the initial drive end flag Xend indicates the end of the initial drive. Set to “ON”.
[0071]
Thereafter, the process proceeds to step 119, where it is determined whether or not the range determination flag Xnp = 1 (whether or not the initial drive was performed in the NotP range). If the range determination flag Xnp = 1, the process proceeds to step 120, The encoder count value Ncnt at the end of the initial drive is stored as an initial position deviation learning value Gcnt. Then, in the next step 121, the encoder count value Ncnt is corrected to a value based on the NotP range by the following equation.
Ncnt = Ncnt + 288
[0072]
In the present embodiment, the encoder count value Ncnt is counted up by setting the holding position of the P range to the zero point position, and when the rotor 32 rotates to the holding position of the NotP range, the encoder count value Ncnt becomes, for example, 288. ing. Therefore, when the initial drive is performed in the NotP range, the encoder count value Ncnt is corrected to a value based on the NotP range by adding 288 to the encoder count value Ncnt at the end of the initial drive.
[0073]
On the other hand, if it is determined in step 119 that the range determination flag Xnp = 0 (initial driving in the P range), the process proceeds to step 122, where the initial position deviation learning value Gcnt is calculated using the encoder count value Ncnt at the end of the initial driving. It is calculated by the following equation.
Gcnt = Ncnt + 2 × (6-CASE)
[0074]
In this case, if the initial drive is performed to the end, CASE = 6 by the processing of step 114, so that the encoder count value Ncnt at the end of the initial drive becomes the initial position deviation learning value Gcnt as it is, but the initial drive in the P range is performed. Is performed, when the range switching operation is performed during the initial driving, the next two-phase energization (or when a range switching request occurs during the execution of the two-phase energization, the two-phase energization) ends. To the normal drive, the initial drive is assumed to have been executed to the end, the encoder count value Ncnt at the end of the initial drive is estimated, and the estimated value is used as the initial position deviation learning value Gcnt. ing. 2 × (6-CASE) is a count-up value (hereinafter referred to as “Ncnt correction amount”) corresponding to the rotation angle for the number of unfinished excitations.
[0075]
FIG. 14 is a time chart for explaining the relationship among the excitation number counter CASE, the Ncnt correction amount, the energized phase, the A-phase signal, the B-phase signal, and the encoder count value Ncnt during the initial drive. For example, if the initial drive is to be terminated at the end of the UW-phase energization (when the number-of-excitations counter CASE has changed from 1 to 2) during the initial drive, the Ncnt correction amount = 2 × (6-CASE) = 2 × ( 6-2) = 8, and when ending the initial drive at the end of the UV-phase energization (when the number-of-excitations counter CASE changes from 3 to 4), Ncnt correction amount = 2 × (6-CASE) = 2 × (6-4) = 4.
[0076]
Next, the processing content of the encoder counter routine shown in FIG. 15 will be described. This routine is started in synchronization with both the rising / falling edges of the A-phase signal and the B-phase signal by the AB-phase interrupt processing, and the rising / falling edges of the A-phase signal and the B-phase signal are set next. Count as follows. When this routine is started, first, in step 301, the values A (i) and B (i) of the A-phase signal and the B-phase signal are read, and in the next step 302, the count-up value ΔN calculation map of FIG. A search is performed to calculate the current values A (i) and B (i) of the A-phase signal and the B-phase signal and the count-up value ΔN according to the previous values A (i−1) and B (i−1). .
[0077]
Here, the reason why the present values A (i) and B (i) of the A-phase signal and the B-phase signal and the previous values A (i-1) and B (i-1) are used is that the A-phase signal and the B-phase signal are used. This is because the rotation direction of the rotor 32 is determined based on the order in which the signals are generated. As shown in FIG. Is counted up, and in the reverse rotation (the rotation direction from the NotP range to the P range), the count-up value ΔN is set to a negative value, and the encoder count value Ncnt is counted down.
[0078]
After calculating the count-up value ΔN, the process proceeds to step 303, where the count-up value ΔN calculated in step 302 is added to the previous encoder count value Ncnt to determine the current encoder count value Ncnt. Thereafter, the process proceeds to step 304, where the current values A (i) and B (i) of the A-phase signal and the B-phase signal are changed to A (i-1) and B (i-1) for the next count processing. And the routine ends.
[0079]
Next, the processing content of the motor F / B control routine shown in FIG. 18 will be described. This routine is executed by an AB-phase interrupt process. When the motor F / B control execution condition is satisfied after the end of the initial drive, the rotational position (the encoder count value Ncnt) of the rotor 32 is set to 0. Until the angle reaches 5 °, the energizing phase is switched based on the encoder count value Ncnt and the initial position deviation learning value Gcnt to rotate the rotor 32 in the direction of the target position Acnt. Here, the motor F / B control execution condition is satisfied, for example, when all of the following conditions (1) to (4) are satisfied.
[0080]
(1) After the end of the initial drive (initial drive end flag Xend = ON)
(2) Fail-safe processing (open loop control) is not performed (open loop control execution flag Xopen = OFF)
{Circle around (3)} Recovery processing is not being performed (recovery processing execution flag Xrcv = OFF)
(4) A predetermined stop holding time (for example, 10 ms) has elapsed since the end of the initial drive, or a predetermined stop holding time (for example, 10 ms) has elapsed since the start of motor energization.
[0081]
The stop holding time (4) is provided to determine the position of the rotor 32 at the start of the F / B control.
When all of the above conditions (1) to (4) are satisfied, the motor F / B control execution condition is satisfied, and the F / B permission flag Xfb is set to ON.
[0082]
When the motor F / B control routine of FIG. 18 is started, first, in step 311, whether the F / B permission flag Xfb is set to ON (whether the motor F / B control execution condition is satisfied or not) ), And if the F / B permission flag Xfb is OFF (the F / B control execution condition is not satisfied), the routine ends without performing the subsequent processing.
[0083]
On the other hand, if the F / B permission flag Xfb is set to ON, the routine proceeds to step 312, where the energized phase setting routine shown in FIG. 19 described later is executed, and the current encoder count value Ncnt and the initial position deviation learning value are set. The energization phase is set based on Gcnt, and in the next step 313, an energization processing routine (not shown) is executed to energize the energization phase set in step 312.
[0084]
On the other hand, when the energization phase setting routine of FIG. 19 is started in step 312, the rotation direction instruction value D is "1" meaning forward rotation (rotation direction from P range to NotP range) in step 321. It is determined whether or not. The rotation direction instruction value D is set based on the magnitude relationship between the current encoder count value Ncnt and the target value Acnt.
[0085]
If the rotation direction instruction value D = 1 (forward rotation), the process proceeds to step 322, where it is determined whether the rotation direction has been reversed in reverse to the rotation direction instruction (whether the encoder count value Ncnt has decreased). If not, the process proceeds to step 323, and the energized phase determination value Mptn is calculated using the current encoder count value Ncnt, the initial position deviation learning value Gcnt, the forward rotation direction phase lead amount K1, and the speed correction amount Ks by the following equation. Update.
Mptn = Ncnt−Gcnt + K1 + Ks
[0086]
Here, the forward rotation direction phase lead amount K1 is the phase lead amount of the conduction phase necessary for rotating the rotor 32 in the forward direction (the phase lead amount of the conduction phase with respect to the current position of the rotor 32). For example, K1 = 4 Is set.
[0087]
The speed correction amount Ks is a phase lead correction amount set according to the rotation speed of the rotor 32. In the low speed range, the speed correction amount Ks is set to 0, and as the speed increases, the speed correction amount Ks is increased to, for example, 1 or 2. Thus, the energized phase determination value Mptn is corrected so that the energized phase is suitable for the rotation speed of the rotor 32.
On the other hand, if it is determined in step 322 that the rotation direction has been reversed against the rotation direction instruction, the energized phase determination value Mptn is not updated to prevent reverse rotation.
[0088]
If it is determined in step 321 that the rotation direction instruction value D = 0 (reverse rotation), that is, the rotation direction is from NotP range to P range, the process proceeds to step 324, where the rotation direction is reversed against the rotation direction instruction. It is determined whether or not the encoder count value Ncnt has increased. If the rotation has not been reversed, the process proceeds to step 325, where the current encoder count value Ncnt, the initial displacement learning value Gcnt, and the phase in the reverse rotation direction are advanced. The energized phase determination value Mptn is updated by the following equation using the amount K2 and the speed correction amount Ks.
Mptn = Ncnt-Gcnt-K2-Ks
[0089]
Here, the amount of phase advance K2 in the reverse rotation direction is the amount of phase advance of the energized phase required to rotate the rotor 32 in the reverse direction (the amount of phase advance of the energized phase with respect to the current position of the rotor 32). Is set. The speed correction amount Ks is the same as in the case of the forward rotation.
On the other hand, when it is determined in step 324 that the rotation direction has been reversed against the rotation direction instruction, the energized phase determination value Mptn is not updated to prevent the rotation from being reversed.
[0090]
After the current energized phase determination value Mptn is determined as described above, the process proceeds to step 326, where the energized phase determination value Mptn is divided by “12” to obtain the remainder mod (Mptn / 12). Here, “12” corresponds to the increase / decrease amount of the encoder count value Ncnt during one cycle of the energized phase.
[0091]
After the calculation of mod (Mptn / 12), the process proceeds to step 327, where the conversion table of FIG. 20 is searched to select an energized phase corresponding to mod (Mptn / 12), and set this as the current energized phase.
[0092]
FIG. 21 is a time chart for explaining a phase that is first energized when rotation is started from the U phase. In this case, since the speed correction amount Ks = 0, when the forward rotation (rotation in the direction from the P range to the NotP range) is started, the energized phase determination value Mptn is calculated by the following equation.
Mptn = Ncnt−Gcnt + K1 = Ncnt−Gcnt + 4
[0093]
When starting the normal rotation from the U phase, mod (Ncnt−Gcnt) becomes 6, so that mod (Mptn / 12) = 6 + 4 = 10, and the first energized phase becomes the V phase.
[0094]
On the other hand, when the reverse rotation (rotation from the NotP range to the P range direction) is started from the U phase, the energized phase determination value Mptn is calculated by the following equation.
Mptn = Ncnt-Gcnt-K2 = Ncnt-Gcnt-3
When the reverse rotation is started from the U phase, mod (Mptn / 12) = 6-3 = 3, and the first energized phase is the W phase.
[0095]
In this way, by setting the forward rotation direction phase lead amount K1 and the reverse rotation direction phase lead amount K2 to 4 and 3, respectively, the switching pattern of the energized phase in the forward rotation direction and the reverse rotation direction can be made symmetric. In both the forward rotation direction and the reverse rotation direction, the phase at a position shifted by two steps from the current position of the rotor 32 can be first excited to start rotation.
[0096]
By the way, while the SR motor 12 is rotating, as shown in FIG. 23, the A-phase signal and the B-phase signal are alternately output from the encoder 46 in synchronization with the rotation of the rotor 32, and the switching of the energized phase goes through one cycle. Each time the rotor 32 rotates 45 °, a Z-phase signal is output. Since the reference rotational position of the rotor 32 can be accurately detected from the Z-phase signal, the energized phase (encoder count value) when the Z-phase signal is output changes to the energized phase (encoder count value) corresponding to the reference rotational position of the rotor 32. ), It is possible to confirm whether or not the correspondence between the rotational position of the rotor 32 and the energized phase (encoder count value) is not shifted. By performing the Z-phase correction for correcting the deviation, highly reliable motor control can be performed.
[0097]
This Z-phase correction is executed by a Z-phase correction routine shown in FIG. This routine is started in synchronization with both rising and falling edges of the A-phase signal by the A-phase interrupt processing. When this routine is started, first, in step 401, it is determined whether or not the value Z of the Z-phase signal is 1 (high level) and the encoder failure flag Xfail is set to OFF which means that there is no failure of the encoder 46. When it is determined that the value Z of the Z-phase signal is 0 (low level) or when the encoder failure flag Xfail is set to ON indicating that the encoder 46 has a failure, it is determined as “No” in step 401. Then, this routine ends without performing the subsequent processing.
[0098]
On the other hand, if "Yes" is determined in step 401, the process proceeds to step 402, where the position detection count value Nzon at the time of outputting the Z-phase signal (when the Z value of the Z-phase signal is inverted to 1) is stored. I do. The position detection count value Nzone is obtained by correcting the encoder count value Ncnt at the time of outputting the Z-phase signal with the initial position deviation learning value Gcnt. The reference rotation position of the rotor 32 (when the Z-phase signal is Output position) is detected.
Nzone = Ncnt−Gcnt
[0099]
After that, the process proceeds to step 403, and whether the rotation direction of the rotor 32 is the forward rotation direction (the rotation direction from the P range to the NotP range) is determined by whether or not the current activation timing of this routine is the rising of the A-phase signal. Determine whether or not.
[0100]
As shown in FIG. 23, since the A-phase signal and the Z-phase signal are output with a phase difference of 90 ° in electrical angle, the Z-phase signal output period in the forward rotation direction (the rotation direction from the P range to the NotP range). During the Z-phase signal output period, the A-phase signal falls in the reverse rotation direction (NotP range → P range rotation direction). Therefore, whether the A-phase signal rises or falls during the Z-phase signal output period can determine whether the rotation direction is the normal rotation direction or the reverse rotation direction.
[0101]
If it is determined in step 403 that the activation timing of this routine is the rising timing of the A-phase signal, that is, the rotation direction of the rotor 32 is the forward rotation direction (the rotation direction from the P range to the NotP range), Proceeding to 404, a deviation gz between the design value and the actual value of the energized phase when the Z-phase signal is output is calculated.
gz = K1-mod (Nzon / 12)
[0102]
Here, K1 is a forward rotation direction phase lead amount of an energized phase required for rotating the rotor 32 in the forward direction, and is set to, for example, K1 = 4. mod (Nzone / 12) is the remainder when the position detection count value Nzon at the time of outputting the Z-phase signal is divided by "12".
[0103]
In the present embodiment, as shown in FIG. 23, the mod (Nzone / 12) is designed to be 4 in the forward rotation direction (the rotation direction from the P range to the NotP range). If it operates normally, gz = K1-mod (Nzon / 12) = 0.
[0104]
On the other hand, when it is determined in step 403 that the current activation timing of this routine is the falling timing of the A-phase signal, that is, the rotation direction of the rotor 32 is the reverse rotation direction (the rotation direction from the NotP range to the P range). Proceeds to step 405, and calculates a deviation gz between the design value and the actual value of the energized phase when the Z-phase signal is output.
gz = K2-mod (Nzon / 12)
Here, K2 is the amount of phase advance in the reverse rotation direction of the energization phase required to rotate the rotor 32 in the reverse direction, for example, K2 = 3.
[0105]
In the present embodiment, as shown in FIG. 23, the mod (Nzone / 12) is designed to be 3 in the reverse rotation direction (the rotation direction from the NotP range to the P range), so that the control system is If it operates normally, gz = K2-mod (Nzon / 12) = 0.
[0106]
After calculating the deviation gz between the design value and the actual value, the process proceeds to step 406, and it is determined whether the deviation gz between the design value and the actual value of the energized phase at the time of outputting the Z-phase signal is 0, and If the deviation gz from the actual value is 0, the control system is operating normally, and this routine ends without performing the subsequent processing such as Z-phase correction.
[0107]
On the other hand, if the deviation gz between the design value and the actual value of the energized phase at the time of outputting the Z-phase signal is not 0, it is determined that the Z-phase correction is necessary, and the process proceeds to step 407, where the number of times of the Z-phase correction is The Z-phase correction number counter Cgz to be counted is counted up, and the routine proceeds to step 408, where the deviation of the initial position deviation learning value Gcnt is corrected by the deviation gz between the design value and the actual value.
Gcnt = Gcnt−gz
[0108]
Thereafter, it is determined whether or not the value of the Z-phase correction number counter Cgz (the number of Z-phase corrections) has exceeded a determination value. If the value is equal to or less than the determination value, it is not determined that the encoder 46 has failed yet. If the value of the number-of-corrections counter Cgz (the number of Z-phase corrections) exceeds the determination value, it is determined that the encoder 46 has failed, and the routine proceeds to step 410, where the encoder failure flag Xfail is set to ON indicating that the encoder 46 has a failure. And the routine ends.
[0109]
When the encoder failure flag Xfail is set to ON, even if the present routine is started by the A-phase interrupt processing, “No” is always determined in step 401 and the present routine is forcibly terminated. No phase correction is performed. This function corresponds to the Z-phase correction prohibiting means described in the claims.
[0110]
In the present embodiment described above, at the time of the initial drive after the power supply to the ECU 41 is turned on, the switching of the energized phase of the SR motor 12 is made to complete a predetermined time schedule. In the energized phase, the rotational position of the rotor 32 always coincides with the energized phase. Thereafter, the rotor 32 rotates in synchronization with the switching of the energized phase, and the encoder 46 outputs A A phase signal and a B-phase signal are output. During the initial driving, both the rising and falling edges of the A-phase signal and the B-phase signal of the encoder 46 are counted. Therefore, if the encoder count value at the end of the initial driving is viewed, the initial driving ends. By this time, the angle (rotation amount) at which the rotor 32 actually rotates in synchronization with the switching of the energized phase is known, 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 thereby determined. I understand.
[0111]
Therefore, in the present embodiment, the encoder count value at the end of the initial drive is learned as the initial position deviation learning value, and the encoder count value is corrected by the initial position deviation learning value at the time of normal driving thereafter. The deviation between the encoder count value at the time and the energized phase (the rotational position of the rotor 32) can be corrected, and the correct energized phase can be selected during normal driving.
[0112]
In addition, in the present embodiment, the one-phase energization and the two-phase energization are alternately switched during the initial drive. Therefore, the one-phase excitation system in which only one phase is always energized and the two-phase excitation system in which two phases are always energized are used. In comparison, the rotor rotation angle per one step (one excitation) is reduced to 、, so that the rotational position of the rotor 32 and the energized phase can be reliably synchronized during the initial drive, and the torque is large. The vibration of the rotor 32 is stopped by the phase energization, and the output signal of the encoder 46 can be stabilized.
[0113]
In this case, 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. If the time for one-phase energization is set shorter than the time for two-phase energization, the time for one-phase energization in which the rotor 32 vibrates is shortened, and the rotor 32 is switched to the next two-phase energization as soon as possible. Can be stopped immediately to stabilize the output signal of the encoder 46, and the time of the initial drive can be shortened.
[0114]
However, in the present invention, the one-phase energizing time and the two-phase energizing time may be set to be the same, and even in this case, the intended object of the present invention can be sufficiently achieved.
[0115]
Further, in the present embodiment, the initial drive is started from one-phase energization, but the initial drive may be started from two-phase energization. In this way, even if the position of the rotor 32 at the beginning of the initial drive does not exactly match the position corresponding to the first two-phase energization, the rotor 32 may be within the range where the large torque of the two-phase energization can reach. Thus, the rotational position of the rotor 32 and the energized phase can be synchronized from the beginning of the initial drive.
[0116]
The present invention is not limited to a configuration in which one-phase energization and two-phase energization are alternately switched at the time of initial driving. May be executed.
[0117]
As described above, in the two-phase energization, the torque is large. Therefore, even if the position of the rotor 32 is slightly shifted from the position corresponding to the two-phase energization, the rotor 32 can be rotated to the position corresponding to the two-phase energization. it can. Therefore, 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.
[0118]
Therefore, in the present embodiment, when the range switching operation from the P range to the NotP range is performed during the initial driving in the P range, the next two-phase energization (the range switching operation is performed during the execution of the two-phase energization). When the two-phase energization ends, the operation shifts to the normal drive after the end of the two-phase energization, and the correspondence between the encoder count value at the end of the two-phase energization, the rotational position of the rotor 32, and the energized phase is learned. Therefore, when the range switching operation from the P range to the NotP range is performed during the initial drive, the correspondence between the encoder count value, the rotational position of the rotor 32, and the energized phase is learned, and then the normal drive is performed immediately. Then, it is possible to quickly switch from the P range to the NotP range, so that the driver does not feel uncomfortable.
[0119]
In a normal case, the ignition switch is not started in the NotP range (because the ignition switch cannot be turned off in a range other than the P range). However, under special conditions, a case in which the engine is started in the NotP range may occur. For example, when an instantaneous power failure occurs in the ECU 41 during traveling, or when maintenance and inspection are performed at a maintenance shop, the vehicle may start in the NotP range.
[0120]
In order to simplify the control specifications, the logic that starts in the NotP range may be omitted, but in the present embodiment, in order to deal with the case of initial driving in the NotP range, When the range switching operation from the NotP range to the P range is performed, the initial drive is performed to the end, and then the normal drive is performed to switch from the NotP range to the P range.
[0121]
Of course, the present invention is also applicable to the case where the initial drive is performed in the NotP range, as in the case of the initial drive in the P range. When the operation is performed, the two-phase energization is completed, and then the operation is shifted to the normal drive. At the same time, the correspondence between the encoder count value at the end of the two-phase energization, the rotational position of the rotor 32, and the energized phase is learned. You may do it.
[0122]
Alternatively, even when the range switching operation from the P range to the Not P range is performed during the initial driving in the P range, learning of the initial position shift is prioritized, and the initial driving is performed to the end, and then the normal driving is performed. To switch from the P range to the NotP range.
[0123]
In the present embodiment, it is determined whether the energized phase (encoder count value) when the Z-phase signal of the encoder 46 is output is the energized phase (encoder count value) corresponding to the reference rotation position of the rotor 32. By doing so, it is checked whether or not the correspondence between the rotational position of the rotor 32 and the energized phase (encoder count value) has been shifted, and if so, Z-phase correction for correcting the shift is performed. Therefore, highly reliable motor control can be performed.
[0124]
In this case, when the Z-phase correction is repeatedly performed, there is a possibility that an erroneous Z-phase correction is performed. Therefore, in the present embodiment, when the Z-phase correction is performed a predetermined number of times during the normal driving, the Z-phase correction is prohibited. Therefore, the stop / malfunction of the SR motor 12 due to the erroneous Z-phase correction is repeated. Can be prevented.
[0125]
In the Z-phase correction routine of FIG. 22, it is determined whether or not the correspondence between the energized phase (encoder count value) when the Z-phase signal of the encoder 46 is output and the rotational position of the rotor 32 is out of alignment. However, for example, the energized phase (encoder count value) and the rotation of the rotor 32 are determined based on whether the increase / decrease amount of the encoder count value from the previous Z-phase signal output timing to the current Z-phase signal output timing is 12. It may be determined whether or not the correspondence with the rotational position is not shifted.
[0126]
The present invention may use an encoder that does not output a Z-phase signal (an encoder that outputs only an A-phase signal and a B-phase signal). In this case, the configuration is such that the function of Z-phase correction is omitted.
Further, the encoder 46 is not limited to a magnetic encoder, and for example, an optical encoder or a brush encoder may be used.
[0127]
In this embodiment, the SR motor 12 is used. However, 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 is limited to the SR motor. However, other types of brushless motors may be used.
[0128]
The range switching device of the present embodiment is configured to switch between the two ranges of the P range and the NotP range. For example, the range switching valve and the manual valve of the automatic transmission are interlocked with the turning operation of the detent lever 15. The present invention can also be applied to a range switching device that switches the ranges P, R, N, D,.
[0129]
In addition, it goes without saying that the present invention is not limited to the range switching device but can be applied to various devices using a brushless type motor such as an SR motor as a drive source.
[Brief description of the drawings]
FIG. 1 is a perspective view of a range switching device according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a configuration of an SR motor.
FIG. 3 is a circuit diagram showing a circuit configuration for driving an SR motor.
FIG. 4 is a diagram schematically showing a configuration of an entire control system of the range switching device.
FIG. 5 is a plan view illustrating a configuration of a rotary magnet of the encoder.
FIG. 6 is a side view of the encoder.
FIG. 7A is a time chart showing an output waveform of an encoder, and FIG. 7B is a time chart showing an energized phase switching pattern;
FIG. 8 is a flowchart showing a flow of processing of an initial drive routine (part 1);
FIG. 9 is a flowchart (part 2) showing a flow of processing of an initial drive routine.
FIG. 10 is a flowchart showing the flow of processing of a P range initial drive routine.
FIG. 11 is a flowchart showing the flow of processing of a NotP range initial drive routine.
FIG. 12 is a time chart showing a control example when initial driving is performed in a P range.
FIG. 13 is a time chart showing a control example when a range switching operation is performed during initial driving;
FIG. 14 is a time chart for explaining an initial position deviation learning method when a range switching operation is performed during initial driving;
FIG. 15 is a flowchart showing the flow of processing of an encoder counter routine;
FIG. 16 is a diagram showing an example of a count-up value ΔN calculation map.
FIG. 17 is a time chart showing a relationship among a command range shift, an A-phase signal, a B-phase signal, and an encoder count value.
FIG. 18 is a flowchart showing the flow of processing of a motor F / B control routine;
FIG. 19 is a flowchart illustrating the flow of a process of an energized phase setting routine.
FIG. 20 is a diagram showing an example of a conversion table from mod (Mptn / 12) to an energized phase.
FIG. 21 is a time chart illustrating an energization process.
FIG. 22 is a flowchart showing the flow of processing of a Z-phase correction routine.
FIG. 23 is a time chart illustrating Z-phase correction.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 11 ... Range switching mechanism, 12 ... SR motor, 14 ... Output shaft sensor, 15 ... Detent lever, 18 ... Parking rod, 20 ... Parking gear, 21 ... Lock lever, 23 ... Detent spring, 24 ... P range holding concave part, 25 ... NotP range holding concave part, 26 ... reduction mechanism, 27 ... automatic transmission, 31 ... stator, 32 ... rotor, 33,34 ... winding, 35,36 ... motor excitation part, 37,38 ... motor driver, 41 ... ECU (Control means, Z-phase correction prohibiting means) 43 ... P range switch, 44 ... NotP range switch, 46 ... Encoder, 47 ... Rotary magnet, 48 ... Magnetic detection element for A-phase signal, 49 ... B-phase signal Magnetic detecting element, 50: Magnetic detecting element for Z-phase signal.

Claims (9)

モータのロータの回転に同期してパルス信号を出力するエンコーダと、このエンコーダの出力信号のカウント値に基づいて前記ロータの回転位置を検出して前記モータの通電相を順次切り換えることで前記ロータを回転駆動する制御手段とを備えたモータ制御装置において、
前記制御手段は、電源投入後の初期駆動時に前記モータの通電相の切り換えを所定のタイムスケジュールで一巡させて前記エンコーダの出力信号をカウントして、初期駆動終了時のカウント値と前記ロータの回転位置と通電相との対応関係を学習し、その後の通常駆動時に、前記エンコーダの出力信号のカウント値と前記初期駆動終了時の学習結果とに基づいて通電相を決定することを特徴とするモータ制御装置。
An encoder that outputs a pulse signal in synchronization with the rotation of the rotor of the motor, and 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 to thereby control the rotor. A motor control device comprising:
The control means counts the output signal of the encoder by switching the energized phase of the motor in a predetermined time schedule at the time of initial driving after power-on, and counts the count value at the end of initial driving and the rotation of the rotor. A motor that learns a correspondence relationship between a position and an energized phase, and determines an energized phase based on a count value of an output signal of the encoder and a learning result at the end of the initial drive during normal driving thereafter. Control device.
前記モータは、スイッチトリラクタンスモータであり、
前記制御手段は、前記初期駆動時に1相通電と2相通電とを交互に切り換えることを特徴とする請求項1に記載のモータ制御装置。
The motor is a switched reluctance motor,
2. The motor control device according to claim 1, wherein the control unit alternately switches between one-phase energization and two-phase energization during the initial driving.
前記制御手段は、前記1相通電の時間を前記2相通電の時間よりも短くすることを特徴とする請求項2に記載のモータ制御装置。3. The motor control device according to claim 2, wherein the control unit makes the one-phase energization time shorter than the two-phase energization time. 4. 前記制御手段は、前記初期駆動を前記2相通電から開始するすることを特徴とする請求項2又は3に記載のモータ制御装置。4. The motor control device according to claim 2, wherein the control unit starts the initial drive from the two-phase energization. 5. 前記制御手段は、前記初期駆動の途中で該初期駆動を終了して通常駆動に移行する必要が生じたときに、次の2相通電(2相通電の実行中に通常駆動に移行する必要が生じたときはその2相通電)が終了してから通常駆動に移行すると共に、該2相通電終了時の前記エンコーダの出力信号のカウント値と前記ロータの回転位置と通電相との対応関係を学習し、その後の通常駆動時に前記エンコーダの出力信号のカウント値と前記2相通電終了時の学習結果とに基づいて通電相を決定することを特徴とする請求項2乃至4のいずれかに記載のモータ制御装置。When it is necessary to terminate the initial drive and shift to the normal drive during the initial drive, the control means may control the next two-phase energization (the shift to the normal drive during the execution of the two-phase energization is necessary). When the two-phase energization ends, the operation shifts to the normal drive after the end of the two-phase energization. At the end of the two-phase energization, the relationship between the count value of the output signal of the encoder, the rotational position of the rotor, and the energized phase is determined. The energized phase is determined based on a learned value at the time of normal driving after that, based on a count value of an output signal of the encoder and a learning result at the time of termination of the two-phase energization. Motor control device. 前記エンコーダは、前記ロータの回転に同期して所定の位相差を有するA相信号とB相信号を出力すると共に、該ロータの基準回転位置でZ相信号を出力し、
前記制御手段は、前記初期駆動時に前記A相信号及び前記B相信号のエッジをカウントして、初期駆動終了時のカウント値と前記ロータの回転位置と通電相との対応関係を学習し、その後の通常駆動時に、前記エンコーダの出力信号のカウント値と前記初期駆動終了時の学習結果とに基づいて通電相を決定すると共に、前記Z相信号が出力されるときの前記カウント値と前記ロータの回転位置と通電相との対応関係がずれていないか否かを判定し、ずれていれば、そのずれを補正する(以下この補正を「Z相補正」という)ことを特徴とする請求項1乃至5のいずれかに記載のモータ制御装置。
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, and outputs a Z-phase signal at a reference rotation position of the rotor,
The control means counts the edges of the A-phase signal and the B-phase signal at the time of the initial drive, learns the correspondence between the count value at the end of the initial drive, the rotational position of the rotor, and the energized phase, During normal drive, the energizing phase is determined based on the count value of the output signal of the encoder and the learning result at the end of the initial drive, and the count value when the Z-phase signal is output and the count value of the rotor. 2. The method according to claim 1, wherein it is determined whether or not the correspondence between the rotational position and the energized phase is shifted, and if so, the shift is corrected (hereinafter, this correction is referred to as "Z-phase correction"). 6. The motor control device according to any one of claims 1 to 5.
前記通常駆動中に前記Z相補正が所定回数行われたときに該Z相補正を禁止するZ相補正禁止手段を備えていることを特徴とする請求項6に記載のモータ制御装置。7. The motor control device according to claim 6, further comprising a Z-phase correction prohibiting unit that prohibits the Z-phase correction when the Z-phase correction is performed a predetermined number of times during the normal driving. 前記制御手段は、前記Z相補正を前記A相信号又は前記B相信号のエッジ割り込み処理により実行することを特徴とする請求項6又は7に記載のモータ制御装置。8. The motor control device according to claim 6, wherein the control unit executes the Z-phase correction by edge interrupt processing of the A-phase signal or the B-phase signal. 9. 前記モータは、車両のパーキングレンジと他のレンジとを切り換えるレンジ切換機構を駆動することを特徴とする請求項1乃至8のいずれかに記載のモータ制御装置。9. The motor control device according to claim 1, wherein the motor drives a range switching mechanism that switches between a parking range of the vehicle and another range.
JP2002161849A 2002-06-03 2002-06-03 Motor control device Expired - Fee Related JP3800529B2 (en)

Priority Applications (9)

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

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002161849A JP3800529B2 (en) 2002-06-03 2002-06-03 Motor control device

Publications (2)

Publication Number Publication Date
JP2004015849A true JP2004015849A (en) 2004-01-15
JP3800529B2 JP3800529B2 (en) 2006-07-26

Family

ID=30430794

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002161849A Expired - Fee Related JP3800529B2 (en) 2002-06-03 2002-06-03 Motor control device

Country Status (1)

Country Link
JP (1) JP3800529B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7567051B2 (en) 2006-06-14 2009-07-28 Denso Corporation Position shift control apparatus ensuring durability and operation accuracy thereof
JP2011151931A (en) * 2010-01-20 2011-08-04 Denso Corp Motor controlling device
JP2013126346A (en) * 2011-12-16 2013-06-24 Denso Corp Motor control device
JP2013162659A (en) * 2012-02-07 2013-08-19 Denso Corp Motor controller
JP2014023273A (en) * 2012-07-18 2014-02-03 Aida Engineering Ltd Motor excitation device, motor excitation method, motor control device, and motor control method
JP2014025563A (en) * 2012-07-30 2014-02-06 Denso Corp Range switching device
WO2016136205A1 (en) * 2015-02-25 2016-09-01 株式会社デンソー Motor control device
WO2021079662A1 (en) * 2019-10-25 2021-04-29 株式会社デンソー Shift range device
JP2021153357A (en) * 2020-03-24 2021-09-30 株式会社安川電機 Motor control device, elevator drive system, and motor control method
CN114531895A (en) * 2019-10-01 2022-05-24 株式会社电装 Shift gear control device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4831004B2 (en) 2007-07-23 2011-12-07 トヨタ自動車株式会社 Shift control device
JP4936069B2 (en) 2007-10-31 2012-05-23 株式会社デンソー Motor control device
JP5472044B2 (en) * 2010-11-04 2014-04-16 株式会社デンソー Motor control device

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7567051B2 (en) 2006-06-14 2009-07-28 Denso Corporation Position shift control apparatus ensuring durability and operation accuracy thereof
JP2011151931A (en) * 2010-01-20 2011-08-04 Denso Corp Motor controlling device
JP2013126346A (en) * 2011-12-16 2013-06-24 Denso Corp Motor control device
JP2013162659A (en) * 2012-02-07 2013-08-19 Denso Corp Motor controller
JP2014023273A (en) * 2012-07-18 2014-02-03 Aida Engineering Ltd Motor excitation device, motor excitation method, motor control device, and motor control method
JP2014025563A (en) * 2012-07-30 2014-02-06 Denso Corp Range switching device
WO2016136205A1 (en) * 2015-02-25 2016-09-01 株式会社デンソー Motor control device
JP2016158413A (en) * 2015-02-25 2016-09-01 株式会社デンソー Motor control device
CN114531895A (en) * 2019-10-01 2022-05-24 株式会社电装 Shift gear control device
CN114531895B (en) * 2019-10-01 2023-03-10 株式会社电装 Shift gear control device
WO2021079662A1 (en) * 2019-10-25 2021-04-29 株式会社デンソー Shift range device
CN114641634A (en) * 2019-10-25 2022-06-17 株式会社电装 Gear shifting device
JP2021067328A (en) * 2019-10-25 2021-04-30 株式会社デンソー Shift range device
JP7310538B2 (en) 2019-10-25 2023-07-19 株式会社デンソー shift range device
JP2021153357A (en) * 2020-03-24 2021-09-30 株式会社安川電機 Motor control device, elevator drive system, and motor control method
US11489467B2 (en) 2020-03-24 2022-11-01 Kabushiki Kaisha Yaskawa Denki Motor control apparatus

Also Published As

Publication number Publication date
JP3800529B2 (en) 2006-07-26

Similar Documents

Publication Publication Date Title
US6992451B2 (en) Motor control apparatus operable in fail-safe mode
JP4936069B2 (en) Motor control device
JP5454962B2 (en) Motor control device
US7161314B2 (en) Motor control apparatus having current supply phase correction
JP5648854B2 (en) Motor control device
JP5093624B2 (en) Motor control device
JP3886042B2 (en) Motor control device
JP3800529B2 (en) Motor control device
JP2004023890A (en) Motor controller
JP3849864B2 (en) Motor control device
JP4082164B2 (en) Motor control device
JP3849931B2 (en) Motor control device
JP4189953B2 (en) Position switching control device
JP3947922B2 (en) Motor control device
JP2004056855A (en) Motor controller
JP3871130B2 (en) Motor control device
JP2017161455A (en) Control device
JP3888940B2 (en) Motor control device
JP3849627B2 (en) Motor control device
JP3888278B2 (en) Motor control device
JP3800532B2 (en) Motor control device
JP6357798B2 (en) Motor control device
JP2004023889A (en) Motor controller
JP3849629B2 (en) Motor control device
JP4748611B2 (en) Position switching control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040901

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060126

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060321

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060407

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060420

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3800529

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090512

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100512

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110512

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120512

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120512

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130512

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140512

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees