JP2004129451A - Motor controller - Google Patents
Motor controller Download PDFInfo
- Publication number
- JP2004129451A JP2004129451A JP2002293270A JP2002293270A JP2004129451A JP 2004129451 A JP2004129451 A JP 2004129451A JP 2002293270 A JP2002293270 A JP 2002293270A JP 2002293270 A JP2002293270 A JP 2002293270A JP 2004129451 A JP2004129451 A JP 2004129451A
- Authority
- JP
- Japan
- Prior art keywords
- phase
- rotor
- initial drive
- motor
- 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
Links
Images
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、エンコーダのパルス信号のカウント値に基づいてロータの回転位置を検出してモータの通電相を順次切り換えることでロータを目標位置まで回転駆動するモータ制御装置に関するものである。
【0002】
【従来の技術】
近年、構造が簡単で安価なモータとして需要が増加しているスイッチトリラクタンスモータ等のブラシレス型のモータは、ロータの回転に同期してパルス信号を出力するエンコーダを搭載し、このエンコーダのパルス信号をカウントして、そのエンコーダカウント値に基づいてロータの回転位置を検出して通電相を順次切り換えることでロータを回転駆動するようにしたものがある。このようなエンコーダ付きのモータは、起動後のエンコーダカウント値に基づいてロータの回転位置を検出することができるため、フィードバック制御系(F/B制御系)によりロータを目標位置まで回転させる位置切換制御(位置決め制御)を行う各種の位置切換装置の駆動源として用いられている(例えば特許文献1参照)。
【0003】
しかし、この種のエンコーダ付きのモータは、起動後のエンコーダカウント値に基づいてロータの起動位置からの回転量(回転角度)を検出できるだけであるので、電源投入後に、何等かの方法で、ロータの絶対的な回転位置を検出して、ロータの回転位置と通電相との対応関係をとらないと、モータを正常に駆動することができない。
【0004】
そこで、例えば、スイッチトリラクタンスモータでは、特許文献2(特開2000−69779号公報)に示すように、起動開始時(初期駆動時)に、2つの相を同時に励磁(通電)して、ロータの振動が停止するのに必要な一定時間が経過した後に、そのときのロータの回転位置を基準位置として学習して通電相を決めるようにしたものがある。
【0005】
【特許文献1】
特開2001−271917号公報(第4頁〜第8頁等)
【特許文献2】
特開2000−69779号公報(第1頁)
【0006】
【発明が解決しようとする課題】
しかしながら、上記特許文献2のロータ基準位置学習方法では、初期駆動時に2つの相を同時に励磁(通電)してからロータの基準位置を学習するまでに、ロータの振動が停止するまでの一定時間待機する必要があるため、ロータ基準位置の学習に要する時間が長くかかってしまい、モータのフィードバック制御を素早く立ち上げることができないという欠点がある。
【0007】
本発明はこのような事情を考慮してなされたものであり、従ってその目的は、初期駆動時にロータの振動が停止するのを待たずにロータ基準位置の学習を行うことができて、その学習時間を短くすることができ、モータのフィードバック制御を素早く立ち上げることができるモータ制御装置を提供することにある。
【0008】
【課題を解決するための手段】
上記目的を達成するために、本発明の請求項1のモータ制御装置は、モータのロータの回転に同期して所定の位相差(一般的には電気角で90°の位相差)を有するA相信号とB相信号を出力するエンコーダと、このエンコーダのA相信号及び前記B相信号の立ち上がり/立ち下がりのエッジをカウントするエンコーダカウント手段と、このエンコーダカウント手段のカウント値(以下「エンコーダカウント値」という)に基づいて前記ロータの回転位置を検出して前記モータの通電相を順次切り換えることで前記ロータを目標位置まで回転駆動する制御手段とを備え、電源投入後にオープンループ制御により通電相を切り換える初期駆動を実行し、この初期駆動中に前記エンコーダのA相・B相の信号値の組み合わせがその時の通電相に対応する組み合わせになったときの前記エンコーダカウント値に基づいて前記ロータの基準位置を学習し、初期駆動後は、前記エンコーダカウント値を前記基準位置の学習値で補正し、補正後のエンコーダカウント値に基づいて通電相を決定するようにしたものである。
【0009】
本発明のように、A相信号とB相信号を出力するエンコーダを用いれば、A相信号とB相信号の発生順序によってロータの回転方向を判定して、ロータの回転方向に応じてエンコーダカウント値をカウントアップしたりカウントダウンすることができ、ロータが正回転/逆回転のいずれの方向に回転しても、エンコーダカウント値とロータの回転位置との対応関係を維持することができて、正回転/逆回転のいずれの回転方向でも、エンコーダカウント値に基づいてロータの回転位置を検出することができる。
【0010】
この場合、ロータの回転に応じて、エンコーダのA相・B相の信号値の組み合わせが次の▲1▼→▲2▼→▲3▼→▲4▼の順序で繰り返し変化する(図7参照)。
▲1▼A相信号=0(ローレベル)、B相信号=0(ローレベル)
▲2▼A相信号=1(ハイレベル)、B相信号=0(ローレベル)
▲3▼A相信号=1(ハイレベル)、B相信号=1(ハイレベル)
▲4▼A相信号=0(ローレベル)、B相信号=1(ハイレベル)
【0011】
例えば、後述する実施形態のように、通電相を切り換える毎にエンコーダカウント値が2つずつ変化する構成では、1つ目の通電相で▲1▼の状態になると、2つめ目の通電相では▲3▼の状態となり、3つ目の通電相で再び▲1▼の状態に戻るというように、通電相の切り換え毎に▲1▼と▲3▼との間で切り換わる。この場合、1つ目の通電相に切り換えた直後は、ロータが振動しているために、ロータの振動に応じてエンコーダのA相・B相の信号値が▲1▼を中心にして▲2▼又は▲4▼の状態に切り換わるが、2つ目の通電相に対応する▲3▼の位置までは振動しないため、1つ目の通電相に対応する▲1▼の状態になったときに、ロータの回転位置が1つ目の通電相に対応する位置になっていると判断して、その時点のエンコーダカウント値に基づいてロータの基準位置を学習する。このようにすれば、初期駆動時にロータの振動が停止するのを待たずに、ロータの振動中でもロータの基準位置の学習を行うことができて、その学習時間を短くすることができ、モータのフィードバック制御を素早く立ち上げることができる利点がある。
【0012】
尚、通電相の切り換えとエンコーダのA相・B相の信号値の組み合わせとの関係は、上記の例に限定されず、例えば1つ目の通電相で▲2▼、2つめ目の通電相で▲4▼の状態となり、3つ目の通電相で再び▲2▼の状態に戻るというように、通電相の切り換え毎に▲2▼と▲4▼との間で切り換わるように構成しても良い。
【0013】
この場合、ロータの基準位置の学習は1回行うだけでも良いが、請求項2のように、初期駆動中に通電相を切り換える毎にロータの基準位置を学習し、当該初期駆動終了時にそれまでに求めた基準位置の学習値が全て一致しているか否かを判定し、一致していなければ、初期駆動による基準位置の学習を再実行するようにすると良い。このようにすれば、エンコーダの信号にノイズ等が混入しても、基準位置の誤学習を未然に防止することができ、信頼性の高い学習値を求めることができる。本発明では、前述したように、ロータの振動中でも基準位置を学習できるため、基準位置の学習を複数回繰り返しても、ロータの振動が停止するのを待つよりも短い時間で全ての学習を終えることが可能となり、短い学習時間で信頼性の高い基準位置の学習を行うことができる。
【0014】
また、請求項3のように、初期駆動中に通電相の切り換えを一巡させるようにしても良い。このようにすれば、初期駆動の途中まで通電相とロータの回転位置との同期を取ることができなくても、初期駆動を終了するまでに、いずれかの通電相で必ずロータの回転位置と通電相との同期を取ることができて、ロータの基準位置をより確実に学習することができる。
【0015】
また、請求項4のように、初期駆動開始から通電相の切り換えを1回又は数回行うまでは前記基準位置の学習を行わず、それ以後に切り換えられる通電相について前記基準位置の学習を行うようにすると良い。このようにすれば、初期駆動開始後、ロータの回転位置と通電相との同期を確実に取ることができる状態になるのを待って、ロータの基準位置を学習することができ、より信頼性の高い基準位置の学習を行うことができる。
【0016】
また、請求項5のように、モータとしてスイッチトリラクタンスモータを使用するようにしても良い。スイッチトリラクタンスモータは、永久磁石が不要で構造が簡単であるため、安価であり、温度環境等に対する耐久性・信頼性も高いという利点がある。
【0017】
以上説明した請求項1〜5に係る発明は、スイッチトリラクタンスモータ等のブラシレス型のモータを駆動源とする各種の位置切換装置に適用でき、例えば、請求項6のように、車両の自動変速機のレンジを切り換えるレンジ切換機構を駆動するモータの制御装置に適用しても良い。これにより、信頼性の高いモータ駆動式のレンジ切換装置を構成することができる。
【0018】
【発明の実施の形態】
以下、本発明を車両のレンジ切換装置に適用した一実施形態を図面に基づいて説明する。
【0019】
まず、図1に基づいてレンジ切換機構11の構成を説明する。レンジ切換機構11の駆動源となるモータ12は、例えばスイッチトリラクタンスモータにより構成され、減速機構26(図4参照)を内蔵し、その出力軸13の回転位置を検出する出力軸センサ14が設けられている。この出力軸13には、ディテントレバー15が固定されている。
【0020】
また、ディテントレバー15にはL字形のパーキングロッド18が固定され、このパーキングロッド18の先端部に設けられた円錐体19がロックレバー21に当接している。このロックレバー21は、円錐体19の位置に応じて軸22を中心にして上下動してパーキングギヤ20をロック/ロック解除するようになっている。パーキングギヤ20は、自動変速機27の出力軸に設けられ、このパーキングギヤ20がロックレバー21によってロックされると、車両の駆動輪が回り止めされた状態(パーキング状態)に保持される。
【0021】
一方、ディテントレバー15をパーキングレンジ(以下「Pレンジ」と表記する)と他のレンジ(以下「NotPレンジ」と表記する)に保持するためのディテントバネ23が支持ベース17に固定され、このディテントバネ23の先端に設けられた係合部23aがディテントレバー15のPレンジ保持凹部24に嵌まり込んだときに、ディテントレバー15がPレンジの位置に保持され、該ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25に嵌まり込んだときに、ディテントレバー15がNotPレンジの位置に保持されるようになっている。
【0022】
Pレンジでは、パーキングロッド18がロックレバー21に接近する方向に移動して、円錐体19の太い部分がロックレバー21を押し上げてロックレバー21の凸部21aがパーキングギヤ20に嵌まり込んでパーキングギヤ20をロックした状態となり、それによって、自動変速機27の出力軸(駆動輪)がロックされた状態(パーキング状態)に保持される。
【0023】
一方、NotPレンジでは、パーキングロッド18がロックレバー21から離れる方向に移動して、円錐体19の太い部分がロックレバー21から抜け出てロックレバー21が下降し、それによって、ロックレバー21の凸部21aがパーキングギヤ20から外れてパーキングギヤ20のロックが解除され、自動変速機27の出力軸が回転可能な状態(走行可能な状態)に保持される。
【0024】
尚、前述した出力軸センサ14は、モータ12の減速機構26の出力軸13の回転角度に応じた電圧を出力する回転センサ(例えばポテンショメータ)によって構成され、その出力電圧によって現在のレンジがPレンジとNotPレンジのいずれであるかを確認できるようになっている。
【0025】
次に、図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の数は適宜変更しても良いことは言うまでもない。
【0026】
本実施形態の巻線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’相が同時に通電される。
【0027】
これら2つのモータ励磁部35は、車両に搭載されたバッテリ40を電源として、それぞれ別個のモータドライバ37,38によって駆動される。このように、モータ励磁部35,36とモータドライバ37,38をそれぞれ2系統ずつ設けることで、一方の系統が故障しても、他方の系統でSRモータ12を回転させることができるようになっている。図3に示すモータドライバ37,38の回路構成例では、各相毎にトランジスタ等のスイッチング素子39を1個ずつ設けたユニポーラ駆動方式の回路構成としているが、各相毎にスイッチング素子を2個ずつ設けたバイポーラ駆動方式の回路構成を採用しても良い。尚、本発明は、モータ励磁部とモータドライバをそれぞれ1系統ずつ設けた構成としても良いことは言うまでもない。
【0028】
各モータドライバ37,38の各スイッチング素子39のオン/オフは、ECU41(制御手段)によって制御される。図4に示すように、このECU41と各モータドライバ37,38は、レンジ切換制御装置42に搭載され、このレンジ切換制御装置42には、Pレンジへの切換操作を行うPレンジスイッチ43と、NotPレンジへの切換操作を行うNotPレンジスイッチ44の操作信号が入力される。Pレンジスイッチ43又はNotPレンジスイッチ44の操作により選択されたレンジは、インストルメントパネル(図示せず)に設けられたレンジ表示部45に表示される。
【0029】
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極となっている。
【0030】
更に、ロータ32の基準回転位置に相当する位置のN極(N’)とその両側のS極(S’)がそれ以外の磁極よりも径方向の幅が広くなるように形成されている。尚、本実施形態では、SRモータ12の通電相の切り換えが一巡する間にロータ32とロータリマグネット47が一体的に45°回転することを考慮して、ロータ32の基準回転位置に相当する幅広な着磁部分(N’)が45°ピッチで形成されており、従って、ロータリマグネット47全体として、基準回転位置に相当する幅広な着磁部分(N’)が合計8個形成されている。尚、基準回転位置に相当する幅広な着磁部分(N’)は、ロータリマグネット47全体として、1個のみ形成した構成としても良い。
【0031】
このロータリマグネット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となるように配置されている。
【0032】
各磁気検出素子48,49,50の出力は、N極(N’極)と対向したときにハイレベル“1”となり、S極(S’極)と対向したときにローレベル“0”となる。尚、Z相信号用の磁気検出素子50の出力は、ロータ32の基準回転位置に相当する幅広なN’極に対向する毎にハイレベル“1”となり、それ以外の位置では、ローレベル“0”となる。
【0033】
本実施形態では、ECU41が後述する図14のエンコーダカウンタルーチンによってA相信号とB相信号の立ち上がり/立ち下がりの両方のエッジをカウントして、そのエンコーダカウント値に応じてSRモータ12の通電相を切り換えることでロータ32を回転駆動する。この際、A相信号とB相信号の発生順序によってロータ32の回転方向を判定し、正回転(Pレンジ→NotPレンジの回転方向)ではエンコーダカウント値をカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではエンコーダカウント値をカウントダウンする。これにより、ロータ32が正回転/逆回転のいずれの方向に回転しても、エンコーダカウント値とロータ32の回転位置との対応関係が維持されるため、正回転/逆回転のいずれの回転方向でも、エンコーダカウント値によってロータ32の回転位置(回転角度)を検出して、その回転位置に対応した相の巻線33,34に通電してロータ32を回転駆動する。
【0034】
図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相信号が出力されると言う場合がある。
【0035】
このようなエンコーダ46付きのSRモータ12でレンジ切換制御を行う場合は、指令シフトレンジ(目標位置)がPレンジからNotPレンジ又はその反対方向に切り換えられる毎に、ロータ32を回転駆動して、エンコーダカウント値に基づいてSRモータ12の通電相を順次切り換えることでロータ32を目標位置に向かって回転駆動するフィードバック制御(以下「F/B制御」と表記する)を実行し、エンコーダカウント値が目標位置に応じて設定された目標カウント値に到達した時点で、ロータ32の回転位置が目標位置に到達したと判断してF/B制御を終了し、ロータ32を目標位置で停止させるようにしている。
【0036】
ところで、エンコーダカウント値は、ECU41のRAMに記憶されるため、ECU41の電源がオフされると、エンコーダカウント値の記憶が消えてしまう。そのため、ECU41の電源投入直後のエンコーダカウント値(0)は、実際のロータ32の回転位置(通電相)に対応したものとなっていない。従って、エンコーダカウント値に応じて通電相を切り換えるためには、電源投入後にエンコーダカウント値と実際のロータ32の回転位置とを対応させて、エンコーダカウント値と通電相とを対応させる必要がある。
【0037】
そこで、本実施形態では、レンジ切換制御装置42のECU41(制御手段)によって後述する図8及び図9に示す初期駆動ルーチンを実行することで、ECU41への電源投入後の初期駆動時に、オープンループ制御によりSRモータ12の通電相の切り換えを所定のタイムスケジュールで一巡させてエンコーダ46のA相信号及びB相信号のエッジをカウントし、更に、後述する図12に示す基準位置学習ルーチンをAB相割り込み処理により実行することで、初期駆動中に通電相を切り換える毎にエンコーダ46のA相・B相の信号値の組み合わせがその時の通電相に対応する組み合わせになった瞬間を検出して、その時点のエンコーダカウント値に基づいてロータ32の基準位置(本実施形態では初期駆動終了後の最初の通電相に対応するロータ32の回転位置)を学習し、その後のF/B制御時に、エンコーダカウント値を基準位置の学習値で補正し、補正後のエンコーダカウント値に基づいて通電相を決定するようにしている。
【0038】
この初期駆動時の基準位置の学習は、具体的には次のようにして行われる。
図13に示すように、PレンジでECU41に電源が投入されたときに初期駆動を行う場合は、オープンループ制御により、例えば、W相通電→UW相通電→U相通電→UV相通電→V相通電→VW相通電の順序で通電相の切り換えを所定のタイムスケジュールで一巡し、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に駆動する。
【0039】
一方、NotPレンジでECU41に電源が投入されたときに初期駆動を行う場合は、例えば、V相通電→UV相通電→U相通電→UW相通電→W相通電→VW相通電の順序で通電相の切り換えを所定のタイムスケジュールで一巡し、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に駆動する。
【0040】
このように、初期駆動時に通電相の切り換えを一巡させれば、初期駆動の途中まで通電相とロータ32の回転位置との同期を取ることができなくても、初期駆動を終了するまでに、いずれかの通電相で必ずロータ32の回転位置と通電相との同期を取ることができて、ロータ32の基準位置を確実に学習することができる。初期駆動中に、ロータ32の回転位置と通電相との同期が取れた後は、通電相の切り換えに同期してロータ32が回転して、このロータ32の回転に同期してエンコーダ46からA相信号及びB相信号が出力されるようになる。
【0041】
この初期駆動中に、エンコーダ46のA相信号及びB相信号の立ち上がり/立ち下がりの両方のエッジをカウントする。従って、通電相の切り換えに同期してロータ32が回転すれば、通電相を切り換える毎にエンコーダカウント値が2つずつ変化する。
【0042】
図13の例では、初期駆動時に最初の通電相(W相)からロータ32が同期して回転し、通電相の切り換え毎にロータ32が7.5°ずつ回転してエンコーダカウント値が2ずつカウントアップし、初期駆動終了時にエンコーダカウント値が12となる。
【0043】
これに対し、例えば、初めの2回の励磁(W相通電→UW相通電)でロータ32が回転しない場合、つまり3回目以降の励磁(U相通電→UV相通電→V相通電→VW相通電)でロータ32の回転位置と通電相とが同期して初期駆動中にロータ32が4回の励磁分だけ回転する場合は、初期駆動終了時までにロータ32が7.5°×4=30°回転して、エンコーダカウント値が2×4=8となる。従って、初期駆動終了時のエンコーダカウント値を見れば、初期駆動が終了するまでにロータ32が実際に通電相の切り換えに同期して回転した角度(回転量)が判明する。
【0044】
初期駆動の最後の通電相は、常にVW相となるが、エンコーダカウント値は、必ずしも12になるとは限らず、例えば10、或は8である場合もある。初期駆動終了後のF/B制御時には、エンコーダカウント値に基づいて通電相が決定されるため、初期駆動によるエンコーダカウント値のずれを修正しないと、F/B制御時に正しい通電相を選択することができない。
【0045】
そこで、本実施形態では、初期駆動中に通電相を切り換える毎に、エンコーダ46のA相・B相の信号値の組み合わせがその時の通電相に対応する組み合わせになった瞬間を検出して、その時点のエンコーダカウント値Ncntに基づいてロータ32の基準位置(本実施形態では初期駆動終了後の最初の通電相に対応するロータ32の回転位置)の学習値Gcntを次式により演算する。
【0046】
[現在のレンジがPレンジの場合]
Gcnt=Ncnt+2×(6−CASE)
[現在のレンジがNotPレンジの場合]
Gcnt=Ncnt−2×(6−CASE)
ここで、CASEは、初期駆動中の励磁回数(通電相の切り換え回数)に応じて1ずつカウントアップする励磁回数カウンタであり、初期駆動開始時の1回目の励磁でCASE=0、2回目の励磁でCASE=1、3回目の励磁でCASE=2、……、初期駆動の最後の励磁(6回目の励磁)でCASE=5となる。
【0047】
上式において、2×(6−CASE)は、基準位置学習値Gcntを演算する時のロータ32の実際の回転位置から基準位置(本実施形態では初期駆動終了後の最初の通電相に対応するロータ32の回転位置)までの回転角度に相当するカウントアップ値である。
【0048】
例えば、初期駆動時に最初の通電相(W相)からロータ32が同期して回転した場合は、通電相を切り換える毎に、ロータ32の基準位置学習値Gcntを演算すると、下記の表1に示すように全ての基準位置学習値Gcntが同じ値(この場合はGcnt=14)となる。
【0049】
【表1】
【0050】
また、初期駆動中に、例えば、初めの2回の励磁でロータ32が回転せず、3回目以降の励磁からロータ32が同期して回転する場合には、下記の表2に示すように、ロータ32が同期して回転する3回目以降の励磁(CASE=2〜5)では、全ての基準位置学習値Gcntが同じ値(この場合はGcnt=10)となる。
【0051】
【表2】
【0052】
従って、初期駆動中に通電相の切り換えに同期してロータ32が回転するようになった後は、基準位置学習値Gcntの演算は1回でも良いが、本実施形態では、基準位置学習値Gcntの信頼性を高めるために、初期駆動中に通電相を切り換える毎に、基準位置学習値Gcntを演算し、初期駆動終了時に、それまでに求めた全ての基準位置学習値Gcntが一致しているか否かを判定し、一致していなければ、初期駆動による基準位置学習値Gcntの演算を再実行するようにしている。
【0053】
但し、初期駆動の初めの1回又は2回の励磁では、ロータ32が回転していない可能性があるため、本実施形態では、初期駆動の初めの2回の励磁については、基準位置学習値Gcntの演算を行わず、ロータ32が確実に同期して回転する3回目以降の励磁について、通電相を切り換える毎に基準位置学習値Gcntを演算するようにしている。
【0054】
また、初期駆動中に通電相の切り換えに同期してロータ32が回転するようになった後は、ロータ32の回転に応じて、エンコーダ46のA相・B相の信号値の組み合わせが次の▲1▼→▲2▼→▲3▼→▲4▼の順序で繰り返し変化する(図7参照)。
▲1▼A相信号=0(ローレベル)、B相信号=0(ローレベル)
▲2▼A相信号=1(ハイレベル)、B相信号=0(ローレベル)
▲3▼A相信号=1(ハイレベル)、B相信号=1(ハイレベル)
▲4▼A相信号=0(ローレベル)、B相信号=1(ハイレベル)
【0055】
前述したように、本実施形態では、通電相を切り換える毎にエンコーダカウント値Ncntが2つずつ変化するため、1つ目の通電相で▲1▼の状態になると、2つめ目の通電相では▲3▼の状態となり、3つ目の通電相で再び▲1▼の状態に戻るというように、通電相の切り換え毎に▲1▼と▲3▼との間で切り換わる。この場合、1つ目の通電相に切り換えた直後は、ロータ32が振動しているために、ロータ32の振動に応じてエンコーダ46のA相・B相の信号値が▲1▼を中心にして▲2▼又は▲4▼の状態に切り換わるが、2つ目の通電相に対応する▲3▼の位置までは振動しないため、1つ目の通電相に対応する▲1▼の状態になったときに、ロータ32の回転位置が1つ目の通電相に対応する位置になっていると判断して、その時点のエンコーダカウント値に基づいてロータ32の基準位置を学習する。このようにすれば、初期駆動時にロータ32の振動が停止するのを待たずに、ロータ32の振動中でもロータ32の基準位置の学習を行うことができて、その学習時間を短くすることができ、SRモータ12のF/B制御を素早く立ち上げることができる。
【0056】
本実施形態では、ロータ32の振動中でもロータ32の基準位置の学習を行うことができるため、初期駆動中の1相通電の時間T1と2相通電の時間T2は、例えば10ms程度の短い時間に設定されている。
【0057】
初期駆動終了後のF/B制御時には、エンコーダカウント値Ncntを基準位置学習値Gcntで補正することで、初期駆動終了時のエンコーダカウント値Ncntと通電相(ロータ32の回転位置)とのずれを補正して、F/B制御時に正しい通電相を選択できるようにしている。
【0058】
尚、初期駆動終了後は、図13に示すように、まず初期駆動終了時の通電相(VW相)と同じ相に例えば10ms通電してロータ32の位置を初期駆動終了時の位置に保持し、その後、後述するF/B制御により、その時点のエンコーダカウント値と基準位置学習値とに基づいて通電相を切り換えてロータ32を目標位置Acntの方向へ回転させる。これにより、ロータ32の回転位置(エンコーダカウント値)が目標位置Acntから例えば0.5°以内に到達した時点で、通電相の切り換えを終了してロータ32を停止させ、その後は、同じ相に通電し続けてロータ32の停止状態を保持し、この保持状態を例えば50ms継続する。この後、目標位置Acntが変化しなければ、通電フラグXonをOFFして通電を停止する。
【0059】
以上説明した初期駆動(基準位置学習)とF/B制御は、レンジ切換制御装置42のECU41によって後述する各ルーチンに従って実行される。以下、これら各ルーチンの処理内容を説明する。
【0060】
[初期駆動]
図8及び図9に示す初期駆動ルーチンは、ECU41への電源投入直後(イグニッションスイッチをOFF位置からACC位置へ操作した直後)に、初期駆動が終了するまで所定周期(例えば1ms周期)で実行される。
【0061】
本ルーチンが起動されると、まずステップ101で、オープンループ制御実行フラグXopen=ON、又は、初期駆動異常フラグXfail=ONであるか否かを判定する。ここで、オープンループ制御実行フラグXopenは、エンコーダ46又はSRモータ12が故障したときに実行されるオープンループ制御(フェイルセーフ処理)が実行されているか否かを判定するフラグであり、ONは実行されていることを意味する。また、初期駆動異常フラグXfailは、初期駆動が異常で基準位置の学習を失敗した場合に後述するステップ122でONにセットされるフラグである。
【0062】
もし、上記ステップ101で、「Yes」と判定されれば、以降の処理を行うことなく、本ルーチンを終了し、「No」と判定されれば、ステップ102に進み、ECU41のイニシャル処理から出力軸センサ14の出力電圧が安定するまで待つための所定時間(例えば100ms)が経過したか否かを判定する。そして、イニシャル処理から所定時間経過した時点で、ステップ103に進み、出力軸センサ14の出力電圧を読み込んで、この出力電圧がレンジ判定値以下であるか否かで、現在のレンジがPレンジかNotPレンジかを判定し、Pレンジであれば、ステップ104に進み、レンジ判定フラグXnpをPレンジを意味する「0」にセットし、NotPレンジであれば、ステップ105に進み、レンジ判定フラグXnpをNotPレンジを意味する「1」にセットする。
【0063】
この後、ステップ106に進み、レンジ判定フラグXnp=0(Pレンジ)であるか否かを判定し、レンジ判定フラグXnp=0(Pレンジ)であれば、ステップ107に進み、図10のPレンジ初期駆動ルーチンを実行し、レンジ判定フラグXnp=1(NotPレンジ)であれば、ステップ108に進み、図11のNotPレンジ初期駆動ルーチンを実行する。
【0064】
上記ステップ107で、図10のPレンジ初期駆動ルーチンが起動されると、ステップ201〜206で、初期駆動中の励磁回数をカウントする励磁回数カウンタCASEが0〜5のいずれであるかを判定する。この励磁回数カウンタCASEは、イニシャル処理でセットされる初期値が0で、励磁を1回行う毎に1ずつカウントアップされる(図9のステップ114)。そして、励磁回数カウンタCASEの判定結果に応じて通電相と通電時間Tを次のように設定する。
【0065】
CASE=0(1回目の励磁)の場合は、ステップ207に進み、W相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=1(2回目の励磁)の場合は、ステップ208に進み、UW相通電を選択し、その通電時間TをT2(例えば10ms)にセットする。
【0066】
CASE=2(3回目の励磁)の場合は、ステップ209に進み、U相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=3(4回目の励磁)の場合は、ステップ210に進み、UV相通電を選択し、その通電時間TをT2(例えば10ms)にセットする。
【0067】
CASE=4(5回目の励磁)の場合は、ステップ211に進み、V相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=5(6回目の励磁)の場合は、ステップ212に進み、VW相通電を選択し、その通電時間TをT2(例えば10ms)にセットする。
【0068】
これにより、Pレンジで初期駆動を行う場合は、W相通電→UW相通電→U相通電→UV相通電→V相通電→VW相通電の順序で通電相の切り換えを一巡し、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に駆動する。この際、1相通電の時間T1を2相通電の時間T2よりも短く設定する。
【0069】
一方、ステップ108で、図11のNotPレンジ初期駆動ルーチンが起動されると、ステップ221〜226で、励磁回数カウンタCASEが0〜5のいずれであるかを判定し、その判定結果に応じて通電相と通電時間Tを次のように設定する。
【0070】
CASE=0(1回目の励磁)の場合は、ステップ227に進み、V相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=1(2回目の励磁)の場合は、ステップ228に進み、UV相通電を選択し、その通電時間TをT2(例えば10ms)にセットする。
【0071】
CASE=2(3回目の励磁)の場合は、ステップ229に進み、U相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=3(4回目の励磁)の場合は、ステップ230に進み、UW相通電を選択し、その通電時間TをT2(例えば10ms)にセットする。
【0072】
CASE=4(5回目の励磁)の場合は、ステップ231に進み、W相通電を選択し、その通電時間TをT1(例えば10ms)にセットする。
CASE=5(6回目の励磁)の場合は、ステップ232に進み、VW相通電を選択し、その通電時間TをT2(例えば10ms)にセットする。
【0073】
これにより、NotPレンジで初期駆動を行う場合は、V相通電→UV相通電→U相通電→UW相通電→W相通電→VW相通電の順序で通電相の切り換えを一巡し、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に駆動する。この場合も、1相通電の時間T1を2相通電の時間T2よりも短く設定する。
【0074】
以上のようにして、図10のPレンジ初期駆動ルーチン又は図11のNotPレンジ初期駆動ルーチンを実行した後、図8のステップ112に進み、現在の通電相の通電時間をカウントする通電時間カウンタCTをカウントアップする。この後、図9のステップ113に進み、現在の通電相の通電時間CTが前記図10又は図11のルーチンで設定した通電時間T(=T1,T2)を越えたか否かを判定し、越えていなければ、以降の処理を行うことなく、本ルーチンを終了する。これにより、現在の通電相の通電時間CTが図10又は図11のルーチンで設定した通電時間T(=T1,T2)を越えるまで、現在の通電相への通電が継続される。
【0075】
その後、現在の通電相の通電時間CTが図10又は図11のルーチンで設定した通電時間T(=T1,T2)を越えた時点で、ステップ114に進み、励磁回数カウンタCASEを1だけカウントアップし、通電相を次の通電相に切り換える。そして、次のステップ115で、通電時間カウンタCTをリセットした後、ステップ116に進み、励磁回数カウンタCASEが初期駆動の終了を意味する「6」に達したか否かを判定し、まだ、励磁回数カウンタCASEが「6」に達していない場合、つまり、初期駆動の途中である場合は、以降の処理を行うことなく、本ルーチンを終了し、初期駆動を継続する。
【0076】
この初期駆動中は、後述する図12の基準位置学習ルーチンをAB相割り込み処理により実行することで、初期駆動開始後にロータ32が確実に同期して回転する3回目以降の励磁について、通電相を切り換える毎(励磁回数カウンタCASEがカウントアップされる毎)に、エンコーダ46のA相・B相の信号値の組み合わせがその時の通電相に対応する組み合わせになった瞬間を検出し、その時点のエンコーダカウント値に基づいて基準位置学習値Gcntを演算する。
【0077】
その後、励磁回数カウンタCASEが「6」に達した時点で、ステップ117に進み、初期駆動終了フラグXendを初期駆動の終了を意味する「ON」にセットする。そして、次のステップ118で、後述する図12の基準位置学習ルーチンによって3回目以降の励磁毎に演算した全ての基準位置学習値Gcnt(3) ,Gcnt(4) ,Gcnt(5) ,Gcnt(6) が一致しているか否かを判定し、一致していれば、初期駆動による基準位置の学習が正常に行われたと判断して、ステップ119に進み、最後の励磁(6回目の励磁)で求めた基準位置学習値Gcnt(6) を最終的な基準位置学習値GcntとしてECU41のRAMに記憶する。
【0078】
これに対して、上記ステップ118で、3回目以降の励磁毎に演算した基準位置学習値Gcnt(3) ,Gcnt(4) ,Gcnt(5) ,Gcnt(6) が一致していないと判定されれば、初期駆動による基準位置の学習が異常であると判断して、ステップ120に進み、再び初期駆動を実行するために、初期駆動繰り返し回数カウンタCFを1カウントアップして、ステップ121に進み、初期駆動繰り返し回数カウンタCFの値が2以上であるか否かを判定する。
【0079】
ECU41の電源投入時に初期化ルーチン(図示せず)によって初期駆動繰り返し回数カウンタCFの初期値が0にセットされるため、1回目の初期駆動が異常で2回目の初期駆動を実行する場合は、ステップ120の処理により、初期駆動繰り返し回数カウンタCFの値が1となり、ステップ121で「No」と判定されて、ステップ123に進み、初期駆動終了フラグXendをOFFにリセットすると共に、励磁回数カウンタCASEを0にリセットする。これにより、2回目の初期駆動(基準位置学習値Gcntの演算)が実行される。
【0080】
その後、2回目の初期駆動中に演算した全ての基準位置学習値Gcnt(3) ,Gcnt(4) ,Gcnt(5) ,Gcnt(6) が一致すれば、ステップ118で「Yes」と判定されて、ステップ119に進み、2回目の初期駆動の最後の励磁(6回目の励磁)で求めた基準位置学習値Gcnt(6) を最終的な基準位置学習値GcntとしてECU41のRAMに記憶する。
【0081】
これに対して、2回目の初期駆動でも、基準位置学習値Gcnt(3) ,Gcnt(4) ,Gcnt(5) ,Gcnt(6) が一致しなかった場合は、2回目の初期駆動も異常であると判断して、ステップ120に進み、初期駆動繰り返し回数カウンタCFを1カウントアップする。これにより、2回目の初期駆動でも異常と判定された場合は、初期駆動繰り返し回数カウンタCFが2となり、ステップ121で「Yes」と判定されてステップ122に済み、初期駆動異常フラグXfailを、初期駆動が異常であることを意味するONにセットして本ルーチンを終了する。
【0082】
初期駆動異常フラグXfailがONにセットされた後は、本ルーチンが起動されても、ステップ101で「Yes」と判定されて、本ルーチンが強制的に終了され、以後、初期駆動(基準位置学習値Gcntの演算)は行われない。
【0083】
尚、本ルーチンでは、2回目の初期駆動でも、基準位置学習値Gcnt(3) ,Gcnt(4) ,Gcnt(5) ,Gcnt(6) が一致しなかった場合は、初期駆動の異常と判定して最終的な基準位置学習値を決定しないようにしたが、例えば、2回目の初期駆動中に演算した基準位置学習値Gcnt(3) ,Gcnt(4) ,Gcnt(5) ,Gcnt(6) の中で、最も多く一致する基準位置学習値又は平均的な基準位置学習値を最終的な基準位置学習値GcntとしてECU41のRAMに記憶するようにしても良い。
【0084】
また、本ルーチンでは、初期駆動の最大繰り返し回数を1回としたが、これを2回以上の適宜回数としても良いことは言うまでもない。
【0085】
[基準位置学習]
図12に示す基準位置学習ルーチンは、AB相割り込み処理によりA相信号とB相信号の立ち上がり/立ち下がりの両方のエッジに同期して起動され、初期駆動開始後にロータ32が確実に同期して回転する3回目以降の励磁について、通電相を切り換える毎(励磁回数カウンタCASEがカウントアップされる毎)にエンコーダ46のA相・B相の信号値の組み合わせがその時の通電相に対応する組み合わせになった瞬間を検出して、その時点のエンコーダカウント値Ncntに基づいて基準位置学習値Gcntを演算する。
【0086】
本実施形態では、励磁回数カウンタCASE(励磁する通電相)とエンコーダ46のA相・B相の信号値の組み合わせとの関係は、次の表3に示すように設定されている。
【0087】
【表3】
【0088】
初期駆動中に通電相の切り換えに同期してロータ32が回転するようになった後は、ロータ32の回転に応じて、エンコーダ46のA相・B相の信号値の組み合わせが次の▲1▼→▲2▼→▲3▼→▲4▼の順序で繰り返し変化する(図7参照)。
▲1▼A相信号=0(ローレベル)、B相信号=0(ローレベル)
▲2▼A相信号=1(ハイレベル)、B相信号=0(ローレベル)
▲3▼A相信号=1(ハイレベル)、B相信号=1(ハイレベル)
▲4▼A相信号=0(ローレベル)、B相信号=1(ハイレベル)
【0089】
本実施形態のように、通電相を切り換える毎にエンコーダカウント値Ncntが2つずつ変化する構成では、1つ目の通電相で▲1▼の状態になると、2つめ目の通電相で▲3▼の状態となり、3つ目の通電相で再び▲1▼の状態に戻るというように、通電相の切り換え毎にエンコーダ46のA相・B相の信号値の組み合わせが▲1▼と▲3▼との間で切り換わる。この関係から、本実施形態では、例えば3つ目の通電相(U相,CASE=2)を励磁しているときに、3つ目の通電相に対応する▲1▼の状態になったときに、ロータ32の回転位置が3つ目の通電相に対応する位置になっていると判断して、その時点のエンコーダカウント値Ncntを用いて基準位置学習値Gcnt(3) を演算し、その後、4つ目の通電相(UV相,CASE=3)を励磁しているときに、4つ目の通電相に対応する▲3▼の状態になったときに、ロータ32の回転位置が4つ目の通電相に対応する位置になっていると判断して、その時点のエンコーダカウント値Ncntを用いて基準位置学習値Gcnt(4) を演算する。
【0090】
図12に示す基準位置学習ルーチンが起動されると、まずステップ251で、励磁回数カウンタCASEの値が2以上であるか否か(つまり励磁回数が3回以上であるか否か)を判定し、励磁回数カウンタCASEの値が2未満であれば、通電相の切り換えに同期してロータ32が回転していない可能性があると判断して、以降の処理を行わずに、本ルーチンを終了する。
【0091】
これに対して、上記ステップ251で、励磁回数カウンタCASEの値が2以上と判定された場合は、ステップ252に進み、励磁回数カウンタCASEの値が2又は4であるか否かを判定し、励磁回数カウンタCASEの値が2又は4であれば、ステップ253に進み、エンコーダ46のA相・B相の信号値の組み合わせがその時の通電相(U相又はV相)に対応する組み合わせ(A相信号=0且つB相信号=0)になっているか否かを判定する。このような判定をAB相割り込み処理により繰り返すことで、エンコーダ46のA相・B相の信号値の組み合わせがその時の通電相(U相又はV相)に対応する組み合わせ(A相信号=0且つB相信号=0)になった瞬間を検出して、ステップ254に進み、レンジ判定フラグXnp=0(Pレンジ)であるか否かを判定し、レンジ判定フラグXnp=0(Pレンジ)であれば、ステップ255に進み、その時点のエンコーダカウント値Ncntを用いて基準位置学習値Gcnt(i) を次式により演算する。
Gcnt(i) =Ncnt+2×(6−CASE)
(この場合はi=3又は5)
【0092】
また、レンジ判定フラグXnp=1(NotPレンジ)であれば、ステップ256に進み、その時点のエンコーダカウント値Ncntを用いて基準位置学習値Gcnt(i) を次式により演算する。
Gcnt(i) =Ncnt−2×(6−CASE)
(この場合はi=3又は5)
【0093】
一方、励磁回数カウンタCASEの値が3又は5の場合は、ステップ252で「No」と判定されてステップ257に進み、エンコーダ46のA相・B相の信号値の組み合わせがその時の通電相(UV相又はVW相)に対応する組み合わせ(A相信号=1且つB相信号=1)になっているか否かを判定する。このような判定をAB相割り込み処理により繰り返すことで、エンコーダ46のA相・B相の信号値の組み合わせがその時の通電相(UV相又はVW相)に対応する組み合わせ(A相信号=1且つB相信号=1)になった瞬間を検出して、ステップ258に進み、レンジ判定フラグXnp=0(Pレンジ)であるか否かを判定し、レンジ判定フラグXnp=0(Pレンジ)であれば、ステップ259に進み、その時点のエンコーダカウント値Ncntを用いて基準位置学習値Gcnt(i) を次式により演算する。
Gcnt(i) =Ncnt+2×(6−CASE)
(この場合はi=4又は6)
【0094】
また、レンジ判定フラグXnp=1(NotPレンジ)であれば、ステップ260に進み、その時点のエンコーダカウント値Ncntを用いて基準位置学習値Gcnt(i) を次式により演算する。
Gcnt(i) =Ncnt−2×(6−CASE)
(この場合はi=4又は6)
【0095】
[エンコーダカウンタ]
次に、図14に示すエンコーダカウンタルーチンの処理内容を説明する。本ルーチンは、AB相割り込み処理によりA相信号とB相信号の立ち上がり/立ち下がりの両方のエッジに同期して起動され、A相信号とB相信号の立ち上がり/立ち下がりの両方のエッジを次のようにしてカウントする。本ルーチンが起動されると、まずステップ301で、A相信号とB相信号の値A(i) 、B(i) を読み込み、次のステップ302で、図15のカウントアップ値ΔN算出マップを検索して、A相信号とB相信号の今回値A(i) 、B(i) と、前回値A(i−1) 、B(i−1) に応じたカウントアップ値ΔNを算出する。
【0096】
ここで、A相信号とB相信号の今回値A(i) 、B(i) と、前回値A(i−1) 、B(i−1) を用いる理由は、A相信号とB相信号の発生順序によってロータ32の回転方向を判定するためであり、図16に示すように、正回転(Pレンジ→NotPレンジの回転方向)ではカウントアップ値ΔNをプラス値にしてエンコーダカウント値Ncntをカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではカウントアップ値ΔNをマイナス値にしてエンコーダカウント値Ncntをカウントダウンする。
【0097】
カウントアップ値ΔNの算出後、ステップ303に進み、前回のエンコーダカウント値Ncntに上記ステップ302で算出したカウントアップ値ΔNを加算して、今回のエンコーダカウント値Ncntを求める。この後、ステップ304に進み、次回のカウント処理のために、A相信号とB相信号の今回値A(i) 、B(i) をそれぞれA(i−1) 、B(i−1) として記憶して本ルーチンを終了する。
【0098】
以上説明した図14のエンコーダカウンタルーチンは、特許請求の範囲でいうエンコーダカウント手段としての役割を果たす。
【0099】
[F/B制御]
次に、図17に示すF/B制御ルーチンの処理内容を説明する。本ルーチンは、AB相割り込み処理により実行され、初期駆動終了後にF/B制御実行条件が成立しているときに、ロータ32の回転位置(エンコーダカウント値Ncnt−Gcnt)が目標位置(目標カウント値Acnt)から例えば0.5°以内に到達するまで、エンコーダカウント値Ncntと基準位置学習値Gcntとに基づいて通電相を切り換えてロータ32を回転させる。
【0100】
図17のF/B制御ルーチンが起動されると、まずステップ601で、F/B許可フラグXfbがONにセットされているか否か(モータF/B制御実行条件が成立しているか否か)を判定し、F/B許可フラグXfbがOFF(F/B制御実行条件が不成立)であれば、以降の処理を行うことなく、本ルーチンを終了する。
【0101】
これに対して、F/B許可フラグXfbがONにセットされていれば、ステップ602に進み、後述する図18の通電相設定ルーチンを実行して、現在のエンコーダカウント値Ncntと基準位置学習値Gcntとに基づいて通電相を設定し、次のステップ603で、当該通電相を励磁する通電処理を実行する。
【0102】
[通電相設定]
図18に示す通電相設定ルーチンは、図17のF/B制御ルーチンのステップ602で起動されるサブルーチンである。本ルーチンが起動されると、まずステップ611で、回転方向指示値Dが正回転(Pレンジ→NotPレンジの回転方向)を意味する「1」であるか否かを判定する。その結果、回転方向指示値D=1(正回転)と判定されれば、ステップ612に進み、回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが減少したか否か)を判定し、逆転していなければ、ステップ613に進み、現在のエンコーダカウント値Ncnt、基準位置学習値Gcnt、正回転方向位相進み量K1、速度補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt+K1+Ks
【0103】
ここで、正回転方向位相進み量K1は、ロータ32を正回転させるのに必要な通電相の位相進み量(ロータ32の現在位置に対する通電相の位相進み量)であり、例えばK1=4に設定されている。
【0104】
また、速度補正量Ksは、ロータ32の回転速度に応じて設定される位相進み補正量である。低速域では、速度補正量Ksが0に設定され、高速になるに従って、速度補正量Ksが例えば1又は2に増加される。これにより、ロータ32の回転速度に適した通電相となるように通電相判定値Mptnが補正される。
【0105】
一方、上記ステップ612で、回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。この場合は、逆転直前の通電相(前回の通電相)に通電され、ロータ32の逆転を抑制する方向に制動トルクが発生する。
【0106】
また、上記ステップ611で、回転方向指示値D=−1(逆回転)、つまりNotPレンジ→Pレンジの回転方向と判定された場合は、ステップ614に進み、回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが増加したか否か)を判定し、逆転していなければ、ステップ615に進み、現在のエンコーダカウント値Ncnt、基準位置学習値Gcnt、逆回転方向位相進み量K2、速度補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt−K2−Ks
【0107】
ここで、逆回転方向位相進み量K2は、ロータ32を逆回転させるのに必要な通電相の位相進み量(ロータ32の現在位置に対する通電相の位相進み量)であり、例えばK2=3に設定されている。速度補正量Ksは正回転の場合と同じである。
【0108】
一方、上記ステップ614で、回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。この場合は、逆転直前の通電相(前回の通電相)に通電され、ロータ32の逆転を抑制する方向に制動トルクが発生する。
【0109】
以上のようにして、今回の通電相判定値Mptnを決定した後、ステップ615に進み、通電相判定値Mptnを“12”で割り算して、その余りMptn%12を求める。ここで、“12”は、通電相を一巡させる間のエンコーダカウント値Ncntの増減量に相当する。
【0110】
Mptn%12の算出後、ステップ616に進み、図19の変換テーブルを検索して、Mptn%12に対応する通電相を選択し、これを今回の通電相に設定する。
【0111】
図20はU相から回転を開始する場合に最初に通電する相を説明するタイムチャートである。この場合、速度補正量Ks=0となるため、正回転(Pレンジ→NotPレンジ方向への回転)を開始する場合は、通電相判定値Mptnは次式により算出される。
Mptn=Ncnt−Gcnt+K1=Ncnt−Gcnt+4
U相から正回転を開始する場合は、(Ncnt−Gcnt)/12の余りは、6となるため、Mptn%12=6+4=10となり、最初の通電相はV相となる。
【0112】
一方、U相から逆回転(NotPレンジ→Pレンジ方向への回転)を開始する場合は、通電相判定値Mptnは次式により算出される。
Mptn=Ncnt−Gcnt−K2=Ncnt−Gcnt−3
U相から逆回転を開始する場合は、Mptn%12=6−3=3となり、最初の通電相はW相となる。
【0113】
このように、正回転方向位相進み量K1と逆回転方向位相進み量K2をそれぞれ4と3に設定することで、正回転方向と逆回転方向の通電相の切換パターンを対称にすることができ、正回転方向と逆回転方向のいずれの場合も、ロータ32の現在位置から2ステップ分ずらした位置の相を最初に励磁して回転を開始することができる。
【0114】
以上説明した本実施形態によれば、ECU41への電源投入後の初期駆動時に、通電相を切り換える毎にエンコーダ46のA相・B相の信号値の組み合わせがその時の通電相に対応する組み合わせになった瞬間を検出して、その時点のエンコーダカウント値に基づいてロータ32の基準位置を学習するようにしたので、初期駆動時にロータ32の振動が停止するのを待たずに、ロータ32の振動中でもロータ32の基準位置の学習を行うことができて、その学習時間を短くすることができ、SRモータ12のF/B制御を素早く立ち上げることができる。
【0115】
しかも、本実施形態では、初期駆動中に通電相を切り換える毎にロータ32の基準位置を学習し、初期駆動終了時にそれまでに求めた基準位置学習値が全て一致しているか否かを判定し、一致していなければ、初期駆動による基準位置の学習を再実行するようにしたので、エンコーダ46の信号にノイズ等が混入しても、基準位置の誤学習を未然に防止することができ、信頼性の高い学習値を求めることができる。本実施形態では、前述したように、ロータ32の振動中でも基準位置を学習できるため、基準位置の学習を複数回繰り返しても、ロータ32の振動が停止するのを待つよりも短い時間で全ての学習を終えることが可能となり、短い学習時間で信頼性の高い基準位置の学習を行うことができる。
【0116】
但し、本発明は、初期駆動の最後に基準位置の学習を1回のみ行ったり、或は、数回の学習を行うようにしても良く、基準位置の学習回数は、要求される信頼性の程度に応じて適宜設定すれば良い。
【0117】
また、本実施形態では、初期駆動中に通電相の切り換えを一巡させるようにしたので、初期駆動の途中まで通電相とロータ32の回転位置との同期を取ることができなくても、初期駆動を終了するまでに、いずれかの通電相で必ずロータ32の回転位置と通電相との同期を取ることができて、ロータ32の基準位置をより確実に学習することができる。
【0118】
しかしながら、本発明は、初期駆動中に通電相の切り換えを一巡させる構成に限定されず、初期駆動中に通電相の切り換えを例えば2〜5回実行して基準位置を学習するようにしても良い。
【0119】
尚、本実施形態では、初期駆動とF/B制御中に、1相通電と2相通電とを交互に切り換える1−2相励磁方式で駆動するようにしたが、1相通電のみで駆動する1相励磁方式、又は、2相通電のみで駆動する2相励磁方式を採用しても良い。
【0120】
また、本発明に用いるエンコーダは、磁気式のエンコーダ46に限定されず、例えば、光学式のエンコーダやブラシ式のエンコーダを用いても良い。
また、本発明に用いるモータは、SRモータ12に限定されず、エンコーダの出力信号のカウント値に基づいてロータの回転位置を検出してモータの通電相を順次切り換えるブラシレス型のモータであれば、SRモータ以外のブラシレス型のモータを用いても良い。
【0121】
また、本実施形態のレンジ切換装置は、PレンジとNotPレンジの2つのレンジを切り換える構成であるが、例えば、ディテントレバー15の回動動作に連動して自動変速機のレンジ切換弁とマニュアルバルブを切り換えて、自動変速機のP、R、N、D等の各レンジを切り換えるレンジ切換装置にも本発明を適用して実施できる。
【0122】
その他、本発明は、レンジ切換装置に限定されず、SRモータ等のブラシレス型のモータを駆動源とする各種の装置に適用して実施できることは言うまでもない。
【図面の簡単な説明】
【図1】本発明の一実施形態を示すレンジ切換装置の斜視図
【図2】SRモータの構成を説明する図
【図3】SRモータを駆動する回路構成を示す回路図
【図4】レンジ切換装置の制御システム全体の構成を概略的に示す図
【図5】エンコーダのロータリマグネットの構成を説明する平面図
【図6】エンコーダの側面図
【図7】(a)はエンコーダの出力波形を示すタイムチャート、(b)は通電相切り換えパターンを示すタイムチャート
【図8】初期駆動ルーチンの処理の流れを示すフローチャート(その1)
【図9】初期駆動ルーチンの処理の流れを示すフローチャート(その2)
【図10】Pレンジ初期駆動ルーチンの処理の流れを示すフローチャート
【図11】NotPレンジ初期駆動ルーチンの処理の流れを示すフローチャート
【図12】基準位置学習ルーチンの処理の流れを示すフローチャート
【図13】初期駆動の制御例を示すタイムチャート
【図14】エンコーダカウンタルーチンの処理の流れを示すフローチャート
【図15】カウントアップ値ΔN算出マップの一例を示す図
【図16】指令レンジシフト、A相信号、B相信号、エンコーダカウント値の関係を示すタイムチャート
【図17】モータF/B制御ルーチンの処理の流れを示すフローチャート
【図18】通電相設定ルーチンの処理の流れを示すフローチャート
【図19】mod(Mptn/12)から通電相への変換テーブルの一例を示す図
【図20】通電処理を説明するタイムチャート
【符号の説明】
11…レンジ切換機構、12…SRモータ、14…出力軸センサ、15…ディテントレバー、18…パーキングロッド、20…パーキングギヤ、21…ロックレバー、23…ディテントバネ、24…Pレンジ保持凹部、25…NotPレンジ保持凹部、26…減速機構、27…自動変速機、31…ステータ、32…ロータ、33,34…巻線、35,36…モータ励磁部、37,38…モータドライバ、41…ECU(制御手段,エンコーダカウント手段)、43…Pレンジスイッチ、44…NotPレンジスイッチ、46…エンコーダ、47…ロータリマグネット、48…A相信号用の磁気検出素子、49…B相信号用の磁気検出素子、50…Z相信号用の磁気検出素子。[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a motor control device that detects a rotational position of a rotor based on a count value of a pulse signal of an encoder and sequentially switches a current-carrying phase of the motor to rotate the rotor to a target position.
[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. In some cases, the rotational position of the rotor is detected based on the encoder count value, and the rotor is rotationally driven by sequentially switching the energized phase. Since such a motor with an encoder can detect the rotational position of the rotor based on the encoder count value after startup, the position switching for rotating the rotor to a target position by a feedback control system (F / B control system) is performed. It is used as a drive source for various position switching devices that perform control (positioning control) (for example, see Patent Document 1).
[0003]
However, 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 encoder count value after startup. If the absolute rotational position of the motor is not detected and the correspondence between the rotational position of the rotor and the energized phase is not established, the motor cannot be driven normally.
[0004]
Therefore, for example, in a switched reluctance motor, as shown in Patent Document 2 (Japanese Patent Application Laid-Open No. 2000-69779), at the start of startup (at the time of initial drive), two phases are simultaneously excited (energized) to form a rotor. After a certain period of time required to stop the vibration of the rotor has elapsed, there is a method in which the energized phase is determined by learning using the rotational position of the rotor at that time as a reference position.
[0005]
[Patent Document 1]
JP 2001-271917 A (
[Patent Document 2]
JP-A-2000-69779 (page 1)
[0006]
[Problems to be solved by the invention]
However, in the rotor reference position learning method disclosed in
[0007]
The present invention has been made in view of such circumstances, and therefore has as its object to be able to learn the rotor reference position without waiting for the rotor to stop vibrating during the initial drive. An object of the present invention is to provide a motor control device capable of shortening the time and quickly starting the feedback control of the motor.
[0008]
[Means for Solving the Problems]
In order to achieve the above object, a motor control device according to a first aspect of the present invention provides a motor control device having a predetermined phase difference (generally a phase difference of 90 ° in electrical angle) in synchronization with rotation of a motor rotor. Encoder for outputting a phase signal and a B-phase signal; encoder counting means for counting rising / falling edges of the A-phase signal and the B-phase signal of the encoder; and a count value of the encoder counting means (hereinafter referred to as “encoder count”). Control means for detecting the rotational position of the rotor based on the current value and sequentially switching the energized phase of the motor to rotate the rotor to a target position. Is performed, and during this initial drive, the combination of the A-phase and B-phase signal values of the encoder corresponds to the energized phase at that time. The reference position of the rotor is learned based on the encoder count value when the combination is performed.After the initial drive, the encoder count value is corrected with the learned value of the reference position, and the corrected encoder count value is calculated. The current-carrying phase is determined based on this.
[0009]
When an encoder that outputs the A-phase signal and the B-phase signal is used as in the present invention, the rotation direction of the rotor is determined based on the generation order of the A-phase signal and the B-phase signal, and the encoder count is determined according to the rotation direction of the rotor. The value can be counted up or down, and the correspondence between the encoder count value and the rotational position of the rotor can be maintained, regardless of whether the rotor rotates in the forward or reverse direction. The rotational position of the rotor can be detected based on the encoder count value in either rotational direction or reverse rotational direction.
[0010]
In this case, according to the rotation of the rotor, the combination of the A-phase and B-phase signal values of the encoder repeatedly changes in the following order (1) → (2) → (3) → (4) (see FIG. 7). ).
(1) A-phase signal = 0 (low level), B-phase signal = 0 (low level)
(2) A-phase signal = 1 (high level), B-phase signal = 0 (low level)
(3) A-phase signal = 1 (high level), B-phase signal = 1 (high level)
(4) A-phase signal = 0 (low level), B-phase signal = 1 (high level)
[0011]
For example, in a configuration in which the encoder count value changes by two each time the energized phase is switched, as in an embodiment described later, if the state becomes (1) in the first energized phase, the state in the second energized phase will change. Each time the energized phase is switched, the state is switched between (1) and (3) such that the state becomes (3) and the state returns to (1) again in the third energized phase. In this case, since the rotor is vibrating immediately after switching to the first energized phase, the A-phase and B-phase signal values of the encoder are set to (2) around (1) according to the vibration of the rotor. The state switches to the state of ▼ or 4), but does not vibrate to the position of 3) corresponding to the second energized phase, so that the state of 1) corresponding to the first energized phase is reached Then, it is determined that the rotational position of the rotor is at the position corresponding to the first energized phase, and the reference position of the rotor is learned based on the encoder count value at that time. With this configuration, the reference position of the rotor can be learned even during the vibration of the rotor without waiting for the vibration of the rotor to stop at the time of the initial drive, and the learning time can be shortened. There is an advantage that the feedback control can be quickly started.
[0012]
The relationship between the switching of the energized phase and the combination of the A-phase and B-phase signal values of the encoder is not limited to the above example. For example, the first energized phase is (2), the second energized phase is Then, the state is changed to (2) and (4) every time the energized phase is switched, such that the state becomes (4) and the state returns to (2) again in the third energized phase. May be.
[0013]
In this case, the learning of the reference position of the rotor may be performed only once, but as in
[0014]
Further, the switching of the energized phase may be made to complete a cycle during the initial drive. In this way, even if it is not possible to synchronize the energized phase and the rotational position of the rotor until the middle of the initial drive, the rotational position of the rotor must be maintained in any energized phase before the end of the initial drive. Synchronization with the energized phase can be achieved, and the reference position of the rotor can be learned more reliably.
[0015]
Further, the reference position is not learned until the energized phase is switched once or several times from the start of the initial drive, and the reference position is learned for the energized phase switched thereafter. It is good to do so. With this configuration, after starting the initial drive, the reference position of the rotor can be learned after waiting for a state where the rotational position of the rotor and the energized phase can be reliably synchronized. Learning of a reference position having a high level can be performed.
[0016]
Further, a switch reluctance motor may be used as the motor. Switched reluctance motors have the advantage that they are inexpensive and have high durability and reliability against temperature environments and the like because they do not require permanent magnets and have a simple structure.
[0017]
The invention according to
[0018]
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.
[0019]
First, the configuration of the
[0020]
An L-shaped
[0021]
On the other hand, a
[0022]
In the P range, the
[0023]
On the other hand, in the NotP range, the
[0024]
The
[0025]
Next, the configuration of the
[0026]
The winding order of the
[0027]
These two
[0028]
ON / OFF of each switching
[0029]
The
[0030]
Further, the N pole (N ') at the position corresponding to the reference rotation position of the
[0031]
Three magnetic detecting
[0032]
The output of each of the
[0033]
In the present embodiment, the
[0034]
FIG. 7 shows an output waveform of the
[0035]
When the range switching control is performed by the
[0036]
By the way, since the encoder count value is stored in the RAM of the
[0037]
Therefore, in the present embodiment, the initial drive routine shown in FIGS. 8 and 9 described later is executed by the ECU 41 (control means) of the range switching
[0038]
The learning of the reference position at the time of the initial drive is specifically performed as follows.
As shown in FIG. 13, when the initial drive is performed when the power is supplied to the
[0039]
On the other hand, when the initial drive is performed when the power is supplied to the
[0040]
As described above, if the switching of the energized phase is performed at the time of the initial drive, even if the energized phase cannot be synchronized with the rotational position of the
[0041]
During this initial drive, both rising and falling edges of the A-phase signal and the B-phase signal of the
[0042]
In the example of FIG. 13, the
[0043]
On the other hand, for example, when the
[0044]
The last energized phase of the initial drive is always the VW phase, but the encoder count value is not always 12 and may be, for example, 10 or 8. During the F / B control 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 must be selected during the F / B control. Can not.
[0045]
Therefore, in the present embodiment, every time the energized phase is switched during the initial drive, the moment when the combination of the A-phase and B-phase signal values of the
[0046]
[When the current range is the P range]
Gcnt = Ncnt + 2 × (6-CASE)
[When the current range is the NotP range]
Gcnt = Ncnt−2 × (6-CASE)
Here, CASE is a number-of-excitations counter that counts up by one in accordance with the number of excitations during the initial drive (the number of times of switching of the energized phase), and CASE = 0 and 2nd at the first excitation at the start of the initial drive. CASE = 1 in the excitation, CASE = 2 in the third excitation,..., CASE = 5 in the final excitation (the sixth excitation) of the initial drive.
[0047]
In the above equation, 2 × (6-CASE) is a reference position from the actual rotation position of the
[0048]
For example, when the
[0049]
[Table 1]
[0050]
In addition, during the initial drive, for example, when the
[0051]
[Table 2]
[0052]
Therefore, after the
[0053]
However, since the
[0054]
Also, after the
(1) A-phase signal = 0 (low level), B-phase signal = 0 (low level)
(2) A-phase signal = 1 (high level), B-phase signal = 0 (low level)
(3) A-phase signal = 1 (high level), B-phase signal = 1 (high level)
(4) A-phase signal = 0 (low level), B-phase signal = 1 (high level)
[0055]
As described above, in the present embodiment, each time the energized phase is switched, the encoder count value Ncnt changes by two. Each time the energized phase is switched, the state is switched between (1) and (3) such that the state becomes (3) and the state returns to (1) again in the third energized phase. In this case, since the
[0056]
In the present embodiment, since the reference position of the
[0057]
At the time of the F / B control after the end of the initial drive, the encoder count value Ncnt is corrected by the reference position learning value Gcnt, so that the deviation between the encoder count value Ncnt at the end of the initial drive and the energized phase (rotational position of the rotor 32) is obtained. The correction is made so that the correct energized phase can be selected during the F / B control.
[0058]
After the end of the initial drive, as shown in FIG. 13, first, for example, 10 ms is supplied to the same phase as the energized phase (VW phase) at the end of the initial drive to hold the position of the
[0059]
The above-described initial drive (reference position learning) and F / B control are executed by the
[0060]
[Initial drive]
The initial drive routine shown in FIGS. 8 and 9 is executed at a predetermined cycle (for example, a 1 ms cycle) immediately after the power supply to the
[0061]
When this routine is started, first, in
[0062]
If “Yes” is determined in
[0063]
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.
[0064]
When the P range initial drive routine of FIG. 10 is started in
[0065]
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, 10 ms).
[0066]
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, 10 ms).
[0067]
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, 10 ms).
[0068]
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
[0069]
On the other hand, when the NotP range initial drive routine of FIG. 11 is started in
[0070]
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, 10 ms).
[0071]
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 routine proceeds to step 230, where UW-phase energization is selected, and the energization time T is set to T2 (for example, 10 ms).
[0072]
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, 10 ms).
[0073]
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
[0074]
After the P range initial drive routine of FIG. 10 or the NotP range initial drive routine of FIG. 11 is executed as described above, the process proceeds to step 112 of FIG. 8, and an energization time counter CT for counting the energization time of the current energization phase. Count up. Thereafter, the process proceeds to step 113 in FIG. 9 to determine whether or not the current energization time CT of the current energization phase has exceeded the energization time T (= T1, T2) set in the routine of FIG. 10 or FIG. If not, the routine is terminated without performing the subsequent processing. Thus, 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, T2) set in the routine of FIG. 10 or FIG.
[0075]
Thereafter, when the energization time CT of the current energization phase exceeds the energization time T (= T1, T2) set in the routine of FIG. 10 or FIG. Then, the energized phase is switched to the next energized phase. Then, in the
[0076]
During this initial drive, the reference phase learning routine of FIG. 12 to be described later is executed by the AB phase interrupt processing, so that the energized phase is set for the third and subsequent excitations in which the
[0077]
After that, when the number-of-excitations counter CASE reaches "6", the routine proceeds to step 117, where the initial drive end flag Xend is set to "ON" indicating the end of the initial drive. Then, in the
[0078]
On the other hand, in
[0079]
When the power of the
[0080]
Thereafter, if all of the reference position learning values Gcnt (3), Gcnt (4), Gcnt (5), and Gcnt (6) calculated during the second initial drive match, “Yes” is determined in
[0081]
On the other hand, if the reference position learning values Gcnt (3), Gcnt (4), Gcnt (5), and Gcnt (6) do not match even in the second initial drive, the second initial drive is also abnormal. Then, the routine proceeds to step 120, where the initial drive repetition counter CF is counted up by one. As a result, if it is determined that the initial drive is abnormal even in the second initial drive, the initial drive repetition number counter CF is set to 2 and “Yes” is determined in
[0082]
After the initial drive abnormality flag Xfail is set to ON, even if this routine is started, “Yes” is determined in
[0083]
In this routine, if the reference position learning values Gcnt (3), Gcnt (4), Gcnt (5), and Gcnt (6) do not match even in the second initial drive, it is determined that the initial drive is abnormal. Thus, the final reference position learning value is not determined. For example, the reference position learning values Gcnt (3), Gcnt (4), Gcnt (5), and Gcnt (6) calculated during the second initial drive. ), The reference position learning value that matches the most or the average reference position learning value may be stored in the RAM of the
[0084]
In this routine, the maximum number of repetitions of the initial drive is set to one, but it is needless to say that this may be set to two or more times as appropriate.
[0085]
[Reference position learning]
The reference position learning routine shown in FIG. 12 is started in synchronization with both rising and falling edges of the A-phase signal and the B-phase signal by the AB-phase interrupt processing, and the
[0086]
In the present embodiment, the relationship between the excitation count counter CASE (the energized phase to be excited) and the combination of the A-phase and B-phase signal values of the
[0087]
[Table 3]
[0088]
After the
(1) A-phase signal = 0 (low level), B-phase signal = 0 (low level)
(2) A-phase signal = 1 (high level), B-phase signal = 0 (low level)
(3) A-phase signal = 1 (high level), B-phase signal = 1 (high level)
(4) A-phase signal = 0 (low level), B-phase signal = 1 (high level)
[0089]
In a configuration in which the encoder count value Ncnt changes by two each time the energized phase is switched as in the present embodiment, if the state becomes (1) in the first energized phase, the state becomes (3) in the second energized phase. Each time the energized phase is switched, the combination of the A-phase and B-phase signal values of the
[0090]
When the reference position learning routine shown in FIG. 12 is started, it is first determined in
[0091]
On the other hand, if it is determined in
Gcnt (i) = Ncnt + 2 × (6-CASE)
(In this case, i = 3 or 5)
[0092]
If the range determination flag Xnp = 1 (NotP range), the process proceeds to step 256, and the reference position learning value Gcnt (i) is calculated by the following equation using the encoder count value Ncnt at that time.
Gcnt (i) = Ncnt−2 × (6-CASE)
(In this case, i = 3 or 5)
[0093]
On the other hand, if the value of the excitation number counter CASE is 3 or 5, it is determined as “No” in
Gcnt (i) = Ncnt + 2 × (6-CASE)
(In this case, i = 4 or 6)
[0094]
If the range determination flag Xnp = 1 (NotP range), the process proceeds to step 260, and the reference position learning value Gcnt (i) is calculated by the following equation using the encoder count value Ncnt at that time.
Gcnt (i) = Ncnt−2 × (6-CASE)
(In this case, i = 4 or 6)
[0095]
[Encoder counter]
Next, processing contents of the encoder counter routine shown in FIG. 14 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
[0096]
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
[0097]
After calculating the count-up value ΔN, the process proceeds to step 303, where the count-up value ΔN calculated in
[0098]
The encoder counter routine of FIG. 14 described above plays a role as an encoder counting means referred to in the claims.
[0099]
[F / B control]
Next, the processing content of the F / B control routine shown in FIG. 17 will be described. This routine is executed by an AB phase interrupt process. When the F / B control execution condition is satisfied after the end of the initial drive, the rotational position of the rotor 32 (the encoder count value Ncnt−Gcnt) is set to the target position (the target count value). From (Acnt) to within 0.5 °, for example, the energized phase is switched based on the encoder count value Ncnt and the reference position learning value Gcnt to rotate the
[0100]
When the F / B control routine in FIG. 17 is started, first, in
[0101]
On the other hand, if the F / B permission flag Xfb is set to ON, the routine proceeds to step 602, where the energized phase setting routine shown in FIG. 18 described later is executed, and the current encoder count value Ncnt and the reference position learning value are set. An energizing phase is set based on Gcnt, and in the
[0102]
[Current phase setting]
The energized phase setting routine shown in FIG. 18 is a subroutine started in
Mptn = Ncnt−Gcnt + K1 + Ks
[0103]
Here, the forward rotation direction phase lead amount K1 is the phase lead amount of the conduction phase necessary for rotating the
[0104]
The speed correction amount Ks is a phase lead correction amount set according to the rotation speed of the
[0105]
On the other hand, if it is determined in
[0106]
If it is determined in
Mptn = Ncnt-Gcnt-K2-Ks
[0107]
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
[0108]
On the other hand, if it is determined in
[0109]
After the current energized phase determination value Mptn is determined as described above, the process proceeds to step 615, where the energized phase determination value Mptn is divided by "12" to obtain the
[0110]
After the calculation of
[0111]
FIG. 20 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−
When starting the normal rotation from the U phase, the remainder of (Ncnt−Gcnt) / 12 is 6, so that
[0112]
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,
[0113]
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
[0114]
According to the present embodiment described above, at the time of the initial drive after the power supply to the
[0115]
Moreover, in the present embodiment, the reference position of the
[0116]
However, according to the present invention, the reference position may be learned only once at the end of the initial drive, or may be learned several times. What is necessary is just to set suitably according to a degree.
[0117]
Further, in the present embodiment, since the switching of the energized phase is performed once during the initial drive, even if the energized phase and the rotational position of the
[0118]
However, the present invention is not limited to a configuration in which the energized phase is switched during the initial drive, and the energized phase may be switched two to five times during the initial drive to learn the reference position. .
[0119]
In the present embodiment, during the initial drive and the F / B control, the drive is performed by the 1-2-phase excitation method in which one-phase energization and two-phase energization are alternately switched. However, the drive is performed only by one-phase energization. A one-phase excitation system or a two-phase excitation system driven by only two-phase conduction may be employed.
[0120]
Further, the encoder used in the present invention is not limited to the
The motor used in the present invention is not limited to the
[0121]
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 device and the manual valve of the automatic transmission are interlocked with the turning operation of the
[0122]
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 the configuration of the 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 flowchart showing the flow of processing of a reference position learning routine.
FIG. 13 is a time chart showing an example of control of initial drive.
FIG. 14 is a flowchart showing the flow of processing of an encoder counter routine;
FIG. 15 is a diagram showing an example of a count-up value ΔN calculation map.
FIG. 16 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. 17 is a flowchart showing the flow of processing of a motor F / B control routine;
FIG. 18 is a flowchart showing a flow of a process of an energized phase setting routine.
FIG. 19 is a diagram showing an example of a conversion table from mod (Mptn / 12) to an energized phase.
FIG. 20 is a time chart illustrating an energization process.
[Explanation of symbols]
DESCRIPTION OF
Claims (6)
前記制御手段は、電源投入後にオープンループ制御で通電相を切り換える初期駆動を実行し、この初期駆動中に前記エンコーダのA相・B相の信号値の組み合わせがその時の通電相に対応する組み合わせになったときの前記エンコーダカウント値に基づいて前記ロータの基準位置を学習し、初期駆動後は、前記エンコーダカウント値を前記基準位置の学習値で補正し、補正後のエンコーダカウント値に基づいて通電相を決定することを特徴とするモータ制御装置。An encoder that outputs an A-phase signal and a B-phase signal having a predetermined phase difference in synchronization with the rotation of a rotor of a motor that rotationally drives a controlled object; and rise / fall of the A-phase signal and the B-phase signal of the encoder Encoder count means for counting the edges of the motor, and detecting the rotational position of the rotor based on the count value of the encoder count means (hereinafter referred to as "encoder count value") and sequentially switching the energized phase of the motor, And a control means for rotationally driving the motor to a target position,
The control means performs an initial drive for switching the energized phase by open loop control after power-on, and during this initial drive, the combination of the signal values of the A phase and the B phase of the encoder is changed to a combination corresponding to the energized phase at that time. The reference position of the rotor is learned based on the encoder count value at the time of becoming, and after the initial drive, the encoder count value is corrected with the learned value of the reference position, and power is supplied based on the corrected encoder count value. A motor control device for determining a phase.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002293270A JP4082164B2 (en) | 2002-10-07 | 2002-10-07 | Motor control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002293270A JP4082164B2 (en) | 2002-10-07 | 2002-10-07 | Motor control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004129451A true JP2004129451A (en) | 2004-04-22 |
JP4082164B2 JP4082164B2 (en) | 2008-04-30 |
Family
ID=32284230
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002293270A Expired - Fee Related JP4082164B2 (en) | 2002-10-07 | 2002-10-07 | Motor control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4082164B2 (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009112151A (en) * | 2007-10-31 | 2009-05-21 | Denso Corp | Motor control apparatus |
KR100969582B1 (en) | 2008-06-13 | 2010-07-12 | 한국기계연구원 | Method for detecting the position of the Rotor |
JP2012100462A (en) * | 2010-11-04 | 2012-05-24 | Denso Corp | Motor control device |
JP2012170213A (en) * | 2011-02-14 | 2012-09-06 | Denso Corp | Motor control device |
JP2013162659A (en) * | 2012-02-07 | 2013-08-19 | Denso Corp | Motor controller |
DE102015203163A1 (en) | 2014-02-26 | 2015-08-27 | Denso Corporation | Motor control device |
CN112039397A (en) * | 2020-08-21 | 2020-12-04 | 深圳大学 | Rotor position correction method and system for position-sensorless planar switch reluctance motor |
CN112368933A (en) * | 2018-08-27 | 2021-02-12 | 株式会社电装 | Shift gear control device |
WO2023276593A1 (en) * | 2021-06-29 | 2023-01-05 | マブチモーター株式会社 | Control device and control method |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7135757B2 (en) | 2018-11-15 | 2022-09-13 | 株式会社デンソー | shift range controller |
-
2002
- 2002-10-07 JP JP2002293270A patent/JP4082164B2/en not_active Expired - Fee Related
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009112151A (en) * | 2007-10-31 | 2009-05-21 | Denso Corp | Motor control apparatus |
KR100969582B1 (en) | 2008-06-13 | 2010-07-12 | 한국기계연구원 | Method for detecting the position of the Rotor |
JP2012100462A (en) * | 2010-11-04 | 2012-05-24 | Denso Corp | Motor control device |
JP2012170213A (en) * | 2011-02-14 | 2012-09-06 | Denso Corp | Motor control device |
JP2013162659A (en) * | 2012-02-07 | 2013-08-19 | Denso Corp | Motor controller |
US8760092B2 (en) | 2012-02-07 | 2014-06-24 | Denso Corporation | Motor control apparatus |
DE102015203163A1 (en) | 2014-02-26 | 2015-08-27 | Denso Corporation | Motor control device |
CN112368933A (en) * | 2018-08-27 | 2021-02-12 | 株式会社电装 | Shift gear control device |
CN112039397A (en) * | 2020-08-21 | 2020-12-04 | 深圳大学 | Rotor position correction method and system for position-sensorless planar switch reluctance motor |
CN112039397B (en) * | 2020-08-21 | 2022-03-18 | 深圳大学 | Rotor position correction method and system for position-sensorless planar switch reluctance motor |
WO2023276593A1 (en) * | 2021-06-29 | 2023-01-05 | マブチモーター株式会社 | Control device and control method |
Also Published As
Publication number | Publication date |
---|---|
JP4082164B2 (en) | 2008-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7990088B2 (en) | Motor control apparatus | |
US8917049B2 (en) | Motor control apparatus | |
US6992451B2 (en) | Motor control apparatus operable in fail-safe mode | |
US7161314B2 (en) | Motor control apparatus having current supply phase correction | |
JP5648854B2 (en) | Motor control device | |
JP5093624B2 (en) | Motor control device | |
JP3800529B2 (en) | Motor control device | |
JP2004023890A (en) | Motor controller | |
JP4082164B2 (en) | Motor control device | |
JP3849864B2 (en) | Motor control device | |
JP4189953B2 (en) | Position switching control device | |
JP3947922B2 (en) | Motor control device | |
JP3849931B2 (en) | Motor control device | |
JP3871130B2 (en) | Motor control device | |
JP2017161455A (en) | Control device | |
JP3849627B2 (en) | Motor control device | |
JP5472044B2 (en) | Motor control device | |
JP3888940B2 (en) | Motor control device | |
JP3888278B2 (en) | Motor control device | |
JP6357798B2 (en) | Motor control device | |
JP3849629B2 (en) | Motor control device | |
JP3800532B2 (en) | Motor control device | |
JP2004023889A (en) | Motor controller | |
JP5472038B2 (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: 20041222 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080117 |
|
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: 20080122 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080204 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4082164 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110222 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120222 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130222 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140222 Year of fee payment: 6 |
|
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 |