JP2004129452A - Motor controller - Google Patents

Motor controller Download PDF

Info

Publication number
JP2004129452A
JP2004129452A JP2002293271A JP2002293271A JP2004129452A JP 2004129452 A JP2004129452 A JP 2004129452A JP 2002293271 A JP2002293271 A JP 2002293271A JP 2002293271 A JP2002293271 A JP 2002293271A JP 2004129452 A JP2004129452 A JP 2004129452A
Authority
JP
Japan
Prior art keywords
phase
rotor
control
motor
energized
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002293271A
Other languages
Japanese (ja)
Other versions
JP3888278B2 (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 JP2002293271A priority Critical patent/JP3888278B2/en
Priority to US10/674,472 priority patent/US7161314B2/en
Publication of JP2004129452A publication Critical patent/JP2004129452A/en
Priority to US11/226,388 priority patent/US7005814B2/en
Application granted granted Critical
Publication of JP3888278B2 publication Critical patent/JP3888278B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Control Of Electric Motors In General (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reconcile the increase of the rotational speed of a rotor during F/B control of a motor and the rise of accuracy in stop position of a rotor. <P>SOLUTION: When a difference between the target position (target count value Acnt) and the rotational position (encoder count value Ncnt) of the rotor comes to a specified value or under during F/B control of the motor, this motor controller shifts to deceleration control(step 701), and sets the quantity Ks of correction of speed phase lead for correcting the quantity of phase lead of the current application phase to the rotational phase of the motor, according to the rotational speed of the rotor(steps 702-706). Consequently, this decelerates the rotor smoothly toward the target position by making the appropriate braking force geared to the rotational speed of the rotor work on the rotor at the time of deceleration control. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、エンコーダのパルス信号のカウント値に基づいてロータの回転位置を検出してモータの通電相を順次切り換えることでロータを目標位置まで回転駆動するモータ制御装置に関するものである。
【0002】
【従来の技術】
近年、構造が簡単で安価なモータとして需要が増加しているスイッチトリラクタンスモータ等のブラシレス型のモータは、ロータの回転に同期してパルス信号を出力するエンコーダを搭載し、このエンコーダのパルス信号をカウントして、そのエンコーダカウント値に基づいてロータの回転位置を検出して通電相を順次切り換えることでロータを回転駆動するようにしたものがある。このようなエンコーダ付きのモータは、起動後のエンコーダカウント値に基づいてロータの回転位置を検出することができるため、フィードバック制御系(F/B制御系)によりロータを目標位置まで回転させる位置切換制御(位置決め制御)を行う各種の位置切換装置の駆動源として用いられている(例えば特許文献1参照)。
【0003】
このようなエンコーダ付きのモータでF/B制御を行う場合、エンコーダのパルス信号出力タイミングに同期してエンコーダカウント値に基づいて通電相を切り換えてロータを目標位置に向かって回転駆動し、エンコーダカウント値が目標位置に応じて設定された目標カウント値に到達した時点で、ロータが目標位置に到達したと判断してF/B制御を終了し、ロータを目標位置で停止させるようにしている。
【0004】
【特許文献1】
特開2001−271917号公報(第4頁〜第8頁等)
【0005】
【発明が解決しようとする課題】
ところで、ロータを回転駆動するトルクを発生させるためには、ロータの回転位相に対して通電相の位相を進める必要があり、この通電相の位相進み量を脱調が発生しない範囲内で大きくすることで、ロータ回転速度を高速化できるという特徴がある。
【0006】
しかし、F/B制御中のロータ回転速度を高速化すると、F/B制御終了時にロータが慣性により目標位置を越えてオーバーシュートしやすくなり、ロータを正確に目標位置で停止させることが難しくなる。
【0007】
本発明はこのような事情を考慮してなされたものであり、従ってその目的は、F/B制御中のロータ回転速度を高速化しても、F/B制御終了時にロータを精度良く目標位置で停止させることができ、F/B制御中のロータ回転速度の高速化とロータ停止位置精度向上とを両立させることができるモータ制御装置を提供することにある。
【0008】
【課題を解決するための手段】
上記目的を達成するために、本発明の請求項1のモータ制御装置は、ロータの減速制御時にロータ回転速度に応じて該ロータの回転位相に対する通電相の位相進み量を補正するようにしたものである。このようにすれば、ロータの減速制御時に、ロータ回転速度に応じた適度な制動力をロータに作用させて、目標位置の手前でロータを確実に減速させることができる。これにより、F/B制御終了時にロータが慣性により目標位置を越えてオーバーシュートすることを防止できて、ロータを精度良く目標位置で停止させることができ、F/B制御中のロータ回転速度の高速化とロータ停止位置精度向上とを両立させることができる。
【0009】
具体的には、請求項2のように、ロータの減速制御時にロータ回転速度が低下するに従って、ロータに作用させる制動力を小さくする方向に通電相の位相進み量を補正するようにすると良い。このようにすれば、ロータの減速制御時に、ロータを目標位置に向かってスムーズに減速させることができる。
【0010】
更に、請求項3のように、ロータの減速制御時に、ロータ回転速度の他に、ロータの現在位置から目標位置までの回転角も考慮して、通電相の位相進み量を補正するようにすると良い。このようにすれば、何等かの原因で、ロータの減速が遅れた場合でも、目標位置の手前でロータに作用させる制動力を増大させてロータを確実に減速させることができ、ロータを精度良く目標位置で停止させることができる。
【0011】
ところで、一般的なモータのF/B制御では、エンコーダのパルス信号出力タイミングに同期して通電相を切り換えるため、F/B制御によりロータを目標位置に向かって減速する途中で、何等かの原因でロータの回転が一旦停止して、エンコーダからパルス信号が出力されなくなると、通電相の切り換えを行うことができなくなってしまい、ロータを目標位置まで回転駆動できないという不具合が発生する。
【0012】
この対策として、請求項4のように、モータの駆動制御中にエンコーダのパルス信号出力タイミングに同期してエンコーダカウント値に基づいて通電相を設定する第1の通電相設定手段と、ロータが目標位置に回転駆動されるまで所定周期でエンコーダカウント値に基づいて通電相を設定する第2の通電相設定手段とを備え、前記第1及び第2の各通電相設定手段によって通電相を設定する際に、ロータ回転速度に応じて通電相の位相進み量を補正するようにしても良い。
【0013】
このようにすれば、ロータの減速制御の途中で、何等かの原因でロータの回転が一旦停止してエンコーダからパルス信号が出力されなくなった場合でも、第2の通電相設定手段が所定周期でその時点のエンコーダカウント値に基づいて通電相を設定するため、ロータの回転が停止した状態でも通電相の切り換えを行うことができて、可能な限りロータを目標位置まで回転駆動することができ、モータ駆動制御の信頼性を向上することができる。
【0014】
また、請求項5のように、モータとしてスイッチトリラクタンスモータを使用するようにしても良い。スイッチトリラクタンスモータは、永久磁石が不要で構造が簡単であるため、安価であり、温度環境等に対する耐久性・信頼性も高いという利点がある。
【0015】
以上説明した請求項1〜5に係る発明は、スイッチトリラクタンスモータ等のブラシレス型のモータを駆動源とする各種の位置切換装置に適用でき、例えば、請求項6のように、車両の自動変速機のレンジを切り換えるレンジ切換機構を駆動するモータの制御装置に適用しても良い。これにより、信頼性の高いモータ駆動式のレンジ切換装置を構成することができる。
【0016】
【発明の実施の形態】
以下、本発明を車両のレンジ切換装置に適用した一実施形態を図面に基づいて説明する。
【0017】
まず、図1に基づいてレンジ切換機構11の構成を説明する。レンジ切換機構11の駆動源となるモータ12は、例えばスイッチトリラクタンスモータにより構成され、減速機構26(図4参照)を内蔵し、その出力軸13の回転位置を検出する出力軸センサ14が設けられている。この出力軸13には、ディテントレバー15が固定されている。
【0018】
また、ディテントレバー15にはL字形のパーキングロッド18が固定され、このパーキングロッド18の先端部に設けられた円錐体19がロックレバー21に当接している。このロックレバー21は、円錐体19の位置に応じて軸22を中心にして上下動してパーキングギヤ20をロック/ロック解除するようになっている。パーキングギヤ20は、自動変速機27の出力軸に設けられ、このパーキングギヤ20がロックレバー21によってロックされると、車両の駆動輪が回り止めされた状態(パーキング状態)に保持される。
【0019】
一方、ディテントレバー15をパーキングレンジ(以下「Pレンジ」と表記する)と他のレンジ(以下「NotPレンジ」と表記する)に保持するためのディテントバネ23が支持ベース17に固定され、このディテントバネ23の先端に設けられた係合部23aがディテントレバー15のPレンジ保持凹部24に嵌まり込んだときに、ディテントレバー15がPレンジの位置に保持され、該ディテントバネ23の係合部23aがディテントレバー15のNotPレンジ保持凹部25に嵌まり込んだときに、ディテントレバー15がNotPレンジの位置に保持されるようになっている。
【0020】
Pレンジでは、パーキングロッド18がロックレバー21に接近する方向に移動して、円錐体19の太い部分がロックレバー21を押し上げてロックレバー21の凸部21aがパーキングギヤ20に嵌まり込んでパーキングギヤ20をロックした状態となり、それによって、自動変速機27の出力軸(駆動輪)がロックされた状態(パーキング状態)に保持される。
【0021】
一方、NotPレンジでは、パーキングロッド18がロックレバー21から離れる方向に移動して、円錐体19の太い部分がロックレバー21から抜け出てロックレバー21が下降し、それによって、ロックレバー21の凸部21aがパーキングギヤ20から外れてパーキングギヤ20のロックが解除され、自動変速機27の出力軸が回転可能な状態(走行可能な状態)に保持される。
【0022】
尚、前述した出力軸センサ14は、モータ12の減速機構26の出力軸13の回転角度に応じた電圧を出力する回転センサ(例えばポテンショメータ)によって構成され、その出力電圧によって現在のレンジがPレンジとNotPレンジのいずれであるかを確認できるようになっている。
【0023】
次に、図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の数は適宜変更しても良いことは言うまでもない。
【0024】
本実施形態の巻線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’相が同時に通電される。
【0025】
これら2つのモータ励磁部35は、車両に搭載されたバッテリ40を電源として、それぞれ別個のモータドライバ37,38によって駆動される。このように、モータ励磁部35,36とモータドライバ37,38をそれぞれ2系統ずつ設けることで、一方の系統が故障しても、他方の系統でSRモータ12を回転させることができるようになっている。図3に示すモータドライバ37,38の回路構成例では、各相毎にトランジスタ等のスイッチング素子39を1個ずつ設けたユニポーラ駆動方式の回路構成としているが、各相毎にスイッチング素子を2個ずつ設けたバイポーラ駆動方式の回路構成を採用しても良い。尚、本発明は、モータ励磁部とモータドライバをそれぞれ1系統ずつ設けた構成としても良いことは言うまでもない。
【0026】
各モータドライバ37,38の各スイッチング素子39のオン/オフは、ECU41(制御手段)によって制御される。図4に示すように、このECU41と各モータドライバ37,38は、レンジ切換制御装置42に搭載され、このレンジ切換制御装置42には、Pレンジへの切換操作を行うPレンジスイッチ43と、NotPレンジへの切換操作を行うNotPレンジスイッチ44の操作信号が入力される。Pレンジスイッチ43又はNotPレンジスイッチ44の操作により選択されたレンジは、インストルメントパネル(図示せず)に設けられたレンジ表示部45に表示される。
【0027】
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極となっている。
【0028】
更に、ロータ32の基準回転位置に相当する位置のN極(N’)とその両側のS極(S’)がそれ以外の磁極よりも径方向の幅が広くなるように形成されている。尚、本実施形態では、SRモータ12の通電相の切り換えが一巡する間にロータ32とロータリマグネット47が一体的に45°回転することを考慮して、ロータ32の基準回転位置に相当する幅広な着磁部分(N’)が45°ピッチで形成されており、従って、ロータリマグネット47全体として、基準回転位置に相当する幅広な着磁部分(N’)が合計8個形成されている。尚、基準回転位置に相当する幅広な着磁部分(N’)は、ロータリマグネット47全体として、1個のみ形成した構成としても良い。
【0029】
このロータリマグネット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となるように配置されている。
【0030】
各磁気検出素子48,49,50の出力は、N極(N’極)と対向したときにハイレベル“1”となり、S極(S’極)と対向したときにローレベル“0”となる。尚、Z相信号用の磁気検出素子50の出力は、ロータ32の基準回転位置に相当する幅広なN’極に対向する毎にハイレベル“1”となり、それ以外の位置では、ローレベル“0”となる。
【0031】
本実施形態では、ECU41が後述する図8のエンコーダカウンタルーチンによってA相信号とB相信号の立ち上がり/立ち下がりの両方のエッジをカウントして、そのエンコーダカウント値に応じてSRモータ12の通電相を切り換えることでロータ32を回転駆動する。この際、A相信号とB相信号の発生順序によってロータ32の回転方向を判定し、正回転(Pレンジ→NotPレンジの回転方向)ではエンコーダカウント値をカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではエンコーダカウント値をカウントダウンする。これにより、ロータ32が正回転/逆回転のいずれの方向に回転しても、エンコーダカウント値とロータ32の回転位置との対応関係が維持されるため、正回転/逆回転のいずれの回転方向でも、エンコーダカウント値によってロータ32の回転位置(回転角度)を検出して、その回転位置に対応した相の巻線33,34に通電してロータ32を回転駆動する。
【0032】
図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相信号が出力されると言う場合がある。
【0033】
このようなエンコーダ46付きのSRモータ12でレンジ切換制御を行う場合は、指令シフトレンジ(目標位置)がPレンジからNotPレンジ又はその反対方向に切り換えられる毎に、ロータ32を回転駆動して、エンコーダカウント値に基づいてSRモータ12の通電相を順次切り換えることでロータ32を目標位置に向かって回転駆動するフィードバック制御(以下「F/B制御」と表記する)を実行し、エンコーダカウント値が目標位置に応じて設定された目標カウント値に到達した時点で、ロータ32が目標位置に到達したと判断してF/B制御を終了し、ロータ32を目標位置で停止させるようにしている。
【0034】
この際、F/B制御中のロータ32の回転速度を高速化すると、F/B制御終了時にロータ32が慣性により目標位置を越えてオーバーシュートしやすくなり、ロータ32を正確に目標位置で停止させることが難しくなる。
【0035】
そこで、本実施形態では、F/B制御中に、ロータ32の回転位置(エンコーダカウント値)と目標位置(目標カウント値)との差が所定値以下になった段階で、減速制御に移行し、ロータ32の回転速度に応じて該ロータ32の回転位相に対する通電相の位相進み量を補正することで、ロータ32の回転速度に応じた適度な制動力をロータ32に作用させる。具体的には、減速制御時に、ロータ32の回転速度が低下するに従って、ロータ32に作用させる制動力を小さくする方向に通電相の位相進み量を補正する。これにより、減速制御時に、ロータ32を目標位置に向かってスムーズに減速する。
【0036】
更に、本実施形態では、減速制御時にロータ32の回転速度の他に、ロータ32の現在の回転位置(エンコーダカウント値)から目標位置(目標カウント値)までの回転角も考慮して、通電相の位相進み量を補正するようにしている。このようにすれば、何等かの原因で、ロータ32の減速が遅れた場合でも、目標位置の手前でロータ32に作用させる制動力を増大させてロータ32を確実に減速させることができ、ロータ32を精度良く目標位置で停止させることができる。
【0037】
ところで、F/B制御では、エンコーダ46のA相・B相信号出力タイミングに同期して通電相を切り換えるため、減速制御の途中で、何等かの原因でロータ32の回転が一旦停止して、エンコーダ46からA相・B相信号が出力されなくなると、通電相の切り換えを行うことができなくなってしまい、ロータ32を目標位置まで回転駆動できないという不具合が発生する。
【0038】
この対策として、本実施形態では、F/B制御開始からロータ32が目標位置に回転駆動されるまで、所定周期(例えば1ms周期)でエンコーダカウント値に基づいて通電相を設定する時間同期通電相設定処理をF/B制御と並行して実行する。
【0039】
この構成では、F/B制御の途中で、何等かの原因でロータ32の回転が一旦停止してエンコーダ46からA相・B相信号が出力されなくなった場合でも、時間同期通電相設定処理によってその時点のエンコーダカウント値に基づいて通電相が設定されるため、ロータ32の回転が停止した状態でも、時間同期通電相設定処理によって通電相の切り換えを行うことができて、可能な限りロータ32を目標位置まで回転駆動することができ、SRモータ12のF/B制御(レンジ切換制御)の信頼性を向上することができる。
【0040】
以下、レンジ切換制御装置42のECU41によって実行される各ルーチンの処理内容を説明する。
【0041】
[エンコーダカウンタ]
図8に示すエンコーダカウンタルーチンの処理内容を説明する。本ルーチンは、AB相割り込み処理によりA相信号とB相信号の立ち上がり/立ち下がりの両方のエッジに同期して起動され、A相信号とB相信号の立ち上がり/立ち下がりの両方のエッジを次のようにしてカウントする。本ルーチンが起動されると、まずステップ301で、A相信号とB相信号の値A(i) 、B(i) を読み込み、次のステップ302で、図9のカウントアップ値ΔN算出マップを検索して、A相信号とB相信号の今回値A(i) 、B(i) と、前回値A(i−1) 、B(i−1) に応じたカウントアップ値ΔNを算出する。
【0042】
ここで、A相信号とB相信号の今回値A(i) 、B(i) と、前回値A(i−1) 、B(i−1) を用いる理由は、A相信号とB相信号の発生順序によってロータ32の回転方向を判定するためであり、図10に示すように、正回転(Pレンジ→NotPレンジの回転方向)ではカウントアップ値ΔNをプラス値にしてエンコーダカウント値Ncntをカウントアップし、逆回転(NotPレンジ→Pレンジの回転方向)ではカウントアップ値ΔNをマイナス値にしてエンコーダカウント値Ncntをカウントダウンする。
【0043】
カウントアップ値ΔNの算出後、ステップ303に進み、前回のエンコーダカウント値Ncntに上記ステップ302で算出したカウントアップ値ΔNを加算して、今回のエンコーダカウント値Ncntを求める。この後、ステップ304に進み、次回のカウント処理のために、A相信号とB相信号の今回値A(i) 、B(i) をそれぞれA(i−1) 、B(i−1) として記憶して本ルーチンを終了する。
【0044】
[制御モード設定]
図11乃至図13に示す制御モード設定ルーチンは、初期駆動終了後に所定周期(例えば1ms周期)で実行される。ここで、初期駆動とは、ECU41への電源投入後にエンコーダカウント値と実際のロータ32の回転位置とを対応させるための処理であり、初期駆動時には、SRモータ12の通電相の切り換えを所定のタイムスケジュールで一巡させてエンコーダ46のA相信号及びB相信号のエッジをカウントし、初期駆動終了時のエンコーダカウント値とロータ32の回転位置(通電相)との対応関係を学習する。具体的には、初期駆動終了時のエンコーダカウント値を初期位置ずれ学習値として学習し、その後のF/B制御等の際にエンコーダカウント値を初期位置ずれ学習値で補正することで、初期駆動終了時のエンコーダカウント値と通電相(ロータ32の回転位置)とのずれを補正して、F/B制御等の際に正しい通電相を選択できるようにしている。
【0045】
図11乃至図13に示す制御モード設定ルーチンは、初期駆動終了後に所定周期(例えば1ms周期)で制御モード判定値modeを0、1、3、4、5のいずれかに設定して、下記のように制御モードを指定する。
【0046】
mode=0:通電オフ(スタンバイ)
mode=1:通常駆動
(F/B制御開始位置停止保持処理、時間同期通電相設定処理、F/B制御)
mode=3:目標位置停止保持処理
mode=4:反転位置停止保持処理
mode=5:オープンループ制御
【0047】
制御モード設定ルーチンが起動されると、まずステップ401で、システム故障フラグXfailoffがレンジ切換制御装置42の故障を意味するONにセットされているか否かを判定し、もし、Xfailoff=ONに設定されていれば、ステップ402に進み、SRモータ12を通電オフ状態に維持するための処理を実行する。これにより、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、F/B許可フラグXfb=OFF(F/B制御禁止)、制御モード判定値mode=0(通電オフ)にセットする。
【0048】
一方、システム故障フラグXfailoffがOFF(故障無し)の場合は、ステップ401からステップ403に進み、フェールセーフ処理実行フラグXfsop=OFF、且つ、リカバリ処理実行フラグXrcv=OFFであるか否かを判定する。もし、フェールセーフ処理実行フラグXfsopとリカバリ処理実行フラグXrcvのいずれか一方又は両方がONにセットされている場合は、ステップ404に進み、オープンループ制御を実行するために、回転方向指示値D=0(停止)、制御モード判定値mode=5(オープンループ制御)、F/B許可フラグXfb=OFF(F/B制御禁止)にセットする。
【0049】
フェールセーフ処理実行フラグXfsopとリカバリ処理実行フラグXrcvの両方がOFFにセットされている場合は、ステップ405に進み、通電フラグXon=ON(通電オン)にセットされているか否かを判定し、通電フラグXon=OFF(通電オフ)にセットされている場合は、ステップ406に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(目標位置とロータ32と位置との差)を求めて、この差(Acnt−Ncnt)に基づいて正回転(Pレンジ→NotPレンジ方向への回転)、逆回転(NotPレンジ→Pレンジ方向への回転)、停止のいずれに該当するか判定する。この際、エンコーダカウント値Ncntは、初期駆動で学習された初期位置ずれ学習値Gcntによって補正された値を用いる。
Ncnt=Ncnt−Gcnt
【0050】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が+Kth以上(例えば+10°以上)であれば、ロータ32を正回転方向(Pレンジ→NotPレンジの回転方向)に回転駆動する必要があると判断して、ステップ407に進み、回転方向指示値D=1(正回転)、通電フラグXon=ON(通電オン)、制御モード判定値mode=1(F/B制御開始位置停止保持処理及びF/B制御)にセットする。
【0051】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が−Kth以下(例えば−10°以下)であれば、ロータ32を逆回転方向(NotPレンジ→Pレンジの回転方向)に回転駆動する必要があると判断して、ステップ409に進み、回転方向指示値D=−1(逆回転)、通電フラグXon=ON(通電オン)、制御モード判定値mode=1(F/B制御開始位置停止保持処理及びF/B制御)にセットする。
【0052】
目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が−Kthから+Kthの範囲内(例えば−10°から+10°の範囲内)であれば、ロータ32を目標位置にディテントバネ23のバネ力により保持することが可能である(SRモータ12への通電は不要)と判断して、ステップ408に進み、SRモータ12を通電オフ状態に維持するために、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、制御モード判定値mode=0(通電オフ)にセットする。
【0053】
一方、前記ステップ405で、通電フラグXon=ON(通電オン)にセットされていると判定された場合は、図12のステップ410〜415の処理によって、指令シフトレンジ(目標位置)が反転されたか否かを判定し、反転されていれば、回転方向指示値Dを反転させる。
【0054】
具体的には、まずステップ410で、回転方向指示値D=1(正回転)であるか否かを判定し、回転方向指示値D=1(正回転)であれば、ステップ411に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)がマイナス値であるか否かで、ロータ32の回転方向を正回転から逆回転に反転させる必要があるか否かを判定し、その必要があれば、ステップ412に進み、回転方向指示値D=−1(逆回転)にセットする。
【0055】
これに対して、上記ステップ410で、回転方向指示値Dが1(正回転)でないと判定された場合(つまりD=0又は−1の場合)は、ステップ413に進み、回転方向指示値D=−1(逆回転)であるか否かを判定し、回転方向指示値D=−1(逆回転)であれば、ステップ414に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)がプラス値であるか否かで、ロータ32の回転方向を逆回転から正回転に反転させる必要があるか否かを判定し、その必要があれば、ステップ415に進み、回転方向指示値D=1(正回転)にセットする。
【0056】
以上のようにして、回転方向指示値Dが反転された場合は、ステップ416に進み、ロータ32の回転方向を反転させるために、制御モード判定値mode=4(反転位置停止保持処理)、F/B許可フラグXfb=OFF(F/B制御禁止)にセットしてステップ417に進む。これに対し、回転方向指示値Dが反転されない場合は、上記ステップ416の処理を行わずにステップ417に進む。
【0057】
このステップ417では、制御モード判定値mode=4(反転位置停止保持処理)にセットされているか否かを判定し、「Yes」であれば、ステップ418に進み、通電フラグXon=ON(通電オン)にセットして、反転位置停止保持処理を実行する。
【0058】
これに対して、上記ステップ417で「No」と判定された場合(反転位置停止保持処理ではない場合)は、図13のステップ419〜421で、F/B制御の終了タイミングであるか否かを判定する。具体的には、まずステップ419で、回転方向指示値D≧0(正回転又は停止)であるか否かを判定し、回転方向指示値D≧0であれば、ステップ420に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が+Kref以下(例えば+0.5°以下)であるか否かで、F/B制御の終了タイミングであるか否かを判定する。また、回転方向指示値D=−1(逆回転)であれば、ステップ421に進み、目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が−Kref以上(例えば−0.5°以上)であるか否かで、F/B制御の終了タイミングであるか否かを判定する。
【0059】
つまり、図14に示すように、F/B制御の終了判定値Krefを例えば通電相の位相進み分(例えば2〜4カウント分)に設定することで、目標カウント値Acntよりも通電相の位相進み分だけ前のタイミングでF/B制御を終了するようにしたものである。これにより、F/B制御の最後の通電相がロータ32を目標位置(目標カウント値Acnt)に停止保持する通電相と一致するようになる。
【0060】
上記ステップ420又は421で「No」と判定された場合(F/B制御の終了タイミングでない場合)は、ステップ422に進み、目標位置停止保持処理の時間をカウントする停止保持時間カウンタCTholdをリセットする。
【0061】
一方、上記ステップ420又は421で「Yes」と判定された場合(F/B制御の終了タイミングである場合)は、ステップ423に進み、F/B許可フラグXfb=OFF(F/B制御禁止)にセットし、F/B制御を終了して目標位置停止保持処理に移行する。そして、次のステップ424で、停止保持時間カウンタCTholdをカウントアップして、目標位置停止保持処理の時間をカウントする。
【0062】
この後、ステップ425に進み、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達したか否かを判定し、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達していなければ、ステップ426に進み、目標位置停止保持処理を続行するために、回転方向指示値D=0(停止)、通電フラグXon=ON(通電オン)、制御モード判定値mode=3(目標位置停止保持処理)に維持する。
【0063】
その後、目標位置停止保持処理の時間CTholdが所定時間(例えば50ms)に達した時点で、ステップ427に進み、SRモータ12の通電をオフするために、回転方向指示値D=0(停止)、通電フラグXon=OFF(通電オフ)、制御モード判定値mode=0(通電オフ)にセットする。
【0064】
以上説明した制御モード判定値modeの設定例が図15のタイムチャートに示されている。
【0065】
[時間同期モータ制御]
図16に示す時間同期モータ制御ルーチンは、初期駆動終了後に所定周期(例えば1ms周期)で起動され、通常駆動(F/B制御開始位置停止保持処理、時間同期通電相設定処理、F/B制御)、目標位置停止保持処理、反転位置停止保持処理を実行する。
【0066】
本ルーチンが起動されると、まずステップ501で、制御モード判定値mode=1(通常駆動)であるか否かを判定し、制御モード判定値mode=1であれば、ステップ505に進み、後述する図17に示すmode1ルーチンを実行して、F/B制御開始位置停止保持処理時及び時間同期通電相設定処理時の通電相を設定するための通電相判定値Mptnを算出する。
【0067】
一方、上記ステップ501で、制御モード判定値mode=1でないと判定された場合は、ステップ502に進み、F/B許可フラグXfb=OFF(F/B制御禁止)であるか否かを判定し、F/B許可フラグXfb=ON(F/B制御実行)の場合は、以降の処理を行うことなく、本ルーチンを終了する。この場合は、後述する図22に示すF/B制御ルーチンによって通電相の設定と通電処理が実行される。
【0068】
本ルーチンでは、制御モード判定値mode=1の場合は、F/B制御中であっても、上記ステップ505の処理(図17のmode1ルーチン)が実行されるため、F/B制御中は、図22のF/B制御ルーチンによってエンコーダ46のA相・B相信号出力タイミングに同期して通電相を設定するF/B処理と、図17のmode1ルーチンによって所定周期で通電相を設定する時間同期通電相設定処理とが並行して実行される。これにより、F/B制御の途中で、何等かの原因でロータ32が一旦停止しても、時間同期通電相設定処理によって通電相判定値Mptnが算出され、ロータ32が目標位置に向かって回転駆動される。
【0069】
これに対し、上記ステップ502で、F/B許可フラグXfb=OFF(F/B制御禁止)と判定された場合は、ステップ503、504で、制御モード判定値mode=3,4のいずれかに該当するか否かを判定し、制御モード判定値mode=3(目標位置停止保持処理)の場合は、ステップ503からステップ506に進み、後述する図18に示すmode3ルーチンを実行して、目標位置停止保持処理実行時の通電相を設定するための通電相判定値Mptnを算出する。
【0070】
また、制御モード判定値mode=4(反転位置停止保持処理)の場合は、ステップ504からステップ507に進み、後述する図19に示すmode4ルーチンを実行して、反転位置停止保持処理実行時の通電相を設定するための通電相判定値Mptnを算出する。
【0071】
以上のようにして、制御モード判定値mode=1,3,4の場合は、通電相判定値Mptnを算出した後、ステップ508に進み、後述する図20に示す通電処理ルーチンを実行して、通常駆動、目標位置停止保持処理、反転位置停止保持処理を実行する。
【0072】
一方、上記ステップ503、504で、いずれも「No」と判定された場合、つまり、制御モード判定値mode=0,5の場合は、ステップ508に進み、後述する図20に示す通電処理ルーチンを実行して、通電オフ又はオープンループ制御を実行する。
【0073】
[mode1]
図17に示すmode1ルーチンは、図16の時間同期モータ制御ルーチンのステップ505で起動されるサブルーチンであり、F/B制御開始位置停止保持処理時及び時間同期通電相設定処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0074】
本ルーチンが起動されると、まずステップ511で、F/B制御開始位置停止保持処理の時間をカウントする通電時間カウンタCT1をカウントアップし、次のステップ512で、F/B制御開始位置停止保持処理の時間CT1が所定時間(例えば10ms)を越えたか否かを判定する。
【0075】
もし、F/B制御開始位置停止保持処理の時間CT1が所定時間(例えば10ms)を越えていなければ、ステップ513に進み、停止保持時通電相記憶済みフラグXhold=OFF(未記憶)であるか否か(つまりF/B制御開始位置停止保持処理の開始直前のタイミングであるか否か)を判定し、停止保持時通電相記憶済みフラグXhold=OFFであれば、ステップ514に進み、F/B制御開始位置停止保持処理時の通電相判定値Mptnを現在の位置カウンタ値(Ncnt−Gcnt)にセットする。
Mptn=Ncnt−Gcnt
【0076】
ここで、位置カウンタ値(Ncnt−Gcnt)は、エンコーダカウント値Ncntを初期駆動時に学習された初期位置ずれ学習値Gcntで補正した値であり、ロータ32の現在位置を正確に表した値となっている。
【0077】
この後、ステップ515に進み、通電相判定値Mptnを“12”で割り算して、その余りMptn%12を求める。ここで、“12”は、通電相を一巡させる間のエンコーダカウント値Ncnt(通電相判定値Mptn)の増減量に相当する。このMptn%12の値に基づいて、図21の変換テーブルによって通電相が決定される。
【0078】
そして、次のステップ516で、Mptn%12=2,3,6,7,10,11であるか否かによって1相通電(U相通電、V相通電、W相通電)であるか否かを判定し、1相通電であれば、ステップ517に進み、通電相判定値Mptnを1ステップ分に相当する“2”だけ増加して2相通電(UV相通電、VW相通電、UW相通電)に補正する。これにより、F/B制御開始位置停止保持処理を1相通電と比べて保持トルクの大きい2相通電で実行することで、ロータ32がF/B制御開始位置付近で振動することを防止して、ロータ32をF/B制御開始位置に確実に停止保持できるようにする。
【0079】
そして、次のステップ518で、停止保持時通電相記憶済みフラグXhold=ON(記憶済み)にセットして本ルーチンを終了する。この後、本ルーチンが起動されたときには、ステップ513で「No」と判定され、ステップ514〜518の処理が実行されない。これにより、F/B制御開始位置停止保持処理時の通電相判定値Mptn(通電相)を設定する処理は、F/B制御開始位置停止保持処理の開始直前に1回のみ実行される。
【0080】
その後、F/B制御開始位置停止保持処理の時間CT1が所定時間(例えば10ms)を越えた時点で、ステップ512で「Yes」と判定されて、F/B制御開始位置停止保持処理を終了し、F/B制御に移行する。F/B制御中は、所定周期(例えば1ms周期)で本ルーチンを起動する毎に、ステップ519で、後述する図23に示す通電相設定ルーチンを実行し、通電相判定値Mptnを算出する。この処理が特許請求の範囲でいう第2の通電相設定手段としての役割を果たす。尚、図23の通電相設定ルーチンは、後述する図22に示すF/B制御ルーチンのステップ602でも起動される。この後、ステップ520に進み、F/B許可フラグXfb=ON(F/B制御実行)にセットする。
【0081】
前記図11〜図13の制御モード設定ルーチンでは、F/B制御により目標カウント値Acntとエンコーダカウント値Ncntとの差(Acnt−Ncnt)が所定値以下になった時点で、ロータ32が目標位置に到達した(F/B制御の終了タイミング)と判断して、F/B許可フラグXfb=OFFにセットし、F/B制御を終了して、制御モード判定値mode=3(目標位置停止保持処理)にセットし、その後、所定時間(例えば50ms)が経過した時点で、制御モード判定値mode=0(通電オフ)にセットする(図13のステップ419以降の処理参照)。
【0082】
従って、F/B制御終了後は、図17のmode1ルーチンが起動されないため、ステップ519の時間同期通電相設定処理による通電相の設定は、F/B制御開始からロータ32が目標位置に到達するまで(つまりF/B制御が終了するまで)実行される。
【0083】
図24はUW相から回転を開始する場合に最初に通電する相を説明するタイムチャートである。この場合、正回転(Pレンジ→NotPレンジ方向への回転)を開始する場合は、通電相判定値Mptnは、エンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、正回転方向位相進み量K1を用いて次式により算出される。
Mptn=Ncnt−Gcnt+K1
【0084】
ここで、正回転方向位相進み量K1を例えば4とすると、通電相判定値Mptnは、次式により算出される。
Mptn=Ncnt−Gcnt+4
UW相から正回転を開始する場合は、mod(Ncnt−Gcnt)は4となるため、Mptn%12=4+4=8となり、最初の通電相はUV相となる。
【0085】
一方、UW相から逆回転(NotPレンジ→Pレンジ方向への回転)を開始する場合は、逆回転方向位相進み量K2を例えば3とすると、通電相判定値Mptnは、次式により算出される。
Mptn=Ncnt−Gcnt−K2=Ncnt−Gcnt−3
UW相から逆回転を開始する場合は、Mptn%12=4−3=1となり、最初の通電相はVW相となる。
【0086】
このように、正回転方向位相進み量K1と逆回転方向位相進み量K2をそれぞれ4と3に設定することで、正回転方向と逆回転方向の通電相の切換パターンを対称にすることができ、正回転方向と逆回転方向のいずれの場合も、ロータ32の現在位置から2ステップ分ずらした位置の相を最初に励磁して回転を開始することができる。
【0087】
[mode3]
図18に示すmode3ルーチンは、図16の時間同期モータ制御ルーチンのステップ506で起動されるサブルーチンであり、目標位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0088】
本ルーチンが起動されると、まずステップ531で、F/B制御終了時のMptn%12=2,3,6,7,10,11であるか否かによってF/B制御終了時の通電相が1相通電(U相通電、V相通電、W相通電)であるか否かを判定し、1相通電であれば、ステップ532〜534の処理によって、それまで行っていたF/B制御の回転方向に応じて通電相判定値Mptnを2だけ増加又は減少させることで、当該1相通電の次のステップの2相通電に変更する。
【0089】
この際、ステップ532で、回転方向を次のようにして判定する。本ルーチンに入る直前(F/B制御終了時)に、図13のステップ426で、回転方向指示値Dが0(停止)にセットされるため、回転方向指示値Dを見ても回転方向を判定することができない。そこで、本ルーチンでは、F/B制御終了時の通電相判定値Mptnと位置カウント値(Ncnt−Gcnt)との間に、通電相の位相進み量K1,K2分の差があることに着目し、F/B制御終了時の通電相判定値Mptnと位置カウント値(Ncnt−Gcnt)との大小関係によって回転方向を次のように判定する。
【0090】
Mptn>Ncnt−Gcntの場合は、正回転(Pレンジ→NotPレンジの回転方向)と判定して、ステップ533に進み、通電相判定値Mptnを2だけ増加させることで、2相通電に補正する。
【0091】
一方、Mptn<Ncnt−Gcntの場合は、逆回転(NotPレンジ→Pレンジの回転方向)と判定して、ステップ534に進み、通電相判定値Mptnを2だけ減少させることで、2相通電に補正する。
尚、Mptn=Ncnt−Gcntの場合は、停止と判定して、通電相は変更しない。
【0092】
このように、目標位置停止保持処理についても、F/B制御開始位置停止保持処理と同じく、1相通電と比べて保持トルクの大きい2相通電で実行することで、ロータ32が目標位置付近で振動することを防止して、ロータ32を目標位置で確実に停止保持できるようにする。
【0093】
[mode4]
図19に示すmode4ルーチンは、図16の時間同期モータ制御ルーチンのステップ507で起動されるサブルーチンであり、反転位置停止保持処理時の通電相判定値Mptn(通電相)を次のようにして設定する。
【0094】
本ルーチンが起動されると、まずステップ541で、反転位置停止保持処理の時間をカウントする通電時間カウンタCT4をカウントアップし、次のステップ542で、反転位置停止保持処理の時間CT4が所定時間(例えば50ms)を越えたか否かを判定する。
【0095】
もし、反転位置停止保持処理の時間CT4が所定時間(例えば50ms)を越えていなければ、ステップ543に進み、Mptn%12=2,3,6,7,10,11であるか否かによって現在の通電相が1相通電(U相通電、V相通電、W相通電)であるか否かを判定し、1相通電であれば、ステップ544〜546の処理によって、それまで行っていたF/B制御の回転方向に応じて通電相判定値Mptnを2だけ増加又は減少させることで、当該1相通電の次のステップの2相通電に変更する。このステップ543〜546の処理は、前記図18のmode3ルーチンのステップ531〜534の処理と同じである。
【0096】
このように、反転位置停止保持処理についても、F/B制御開始位置停止保持処理や目標位置停止保持処理と同じく、1相通電と比べて保持トルクの大きい2相通電で実行することで、ロータ32が反転位置付近で振動することを防止して、ロータ32を反転位置で確実に停止保持できるようにする。
【0097】
その後、反転位置停止保持処理の時間CT4が所定時間(例えば50ms)を越えた時点で、ステップ542で「Yes」と判定されて、反転位置停止保持処理を終了し、F/B制御を再開する。これにより、最初に、ステップ547で、反転位置停止保持処理時の通電相判定値Mptnに、回転方向に応じて通電相の位相進み分のカウント値(例えば4又は3)を加算又は減算してF/B制御再開時の最初の通電相判定値Mptnを設定し、それによって、ロータ32の回転駆動を開始する。この後、ステップ548に進み、F/B許可フラグXfb=ON(F/B制御実行)、通電時間カウンタCT4=0、制御モード判定値mode=1(通常駆動)にセットして本ルーチンを終了する。
【0098】
[通電処理]
図20に示す通電処理ルーチンは、図16の時間同期モータ制御ルーチンのステップ508で起動されるサブルーチンである。尚、本ルーチンは、後述する図22のF/B制御ルーチンのステップ603でも起動される。
【0099】
図20の通電処理ルーチンが起動されると、まずステップ551で、制御モード判定値mode=0(通電オフ)であるか否かを判定し、制御モード判定値mode=0(通電オフ)であれば、ステップ552に進み、SRモータ12の全相の通電をオフしてスタンバイ状態とする。
【0100】
一方、上記ステップ551で、「No」と判定されれば、ステップ553に進み、制御モード判定値mode=5(オープンループ制御)であるか否かを判定し、制御モード判定値mode=5(オープンループ制御)であれば、ステップ554に進み、オープンループ制御を実行する。このオープンループ制御は、エンコーダ46の故障又はSRモータ12の動作異常が発生したときに、例えば1ms周期の時間同期処理によって通電相を設定してロータ32を目標位置まで回転駆動する。
【0101】
また、上記ステップ551、553で、いずれも「No」と判定された場合、つまり、制御モード判定値mode=1,3,4(通常駆動、目標位置停止保持処理、反転位置停止保持処理)の場合は、ステップ555に進み、Mptn%12に応じて図21の変換テーブルによって通電相を設定し、その通電相の巻線33,34に通電する。
【0102】
[F/B制御]
次に、図22に示すF/B制御ルーチンの処理内容を説明する。本ルーチンは、AB相割り込み処理により実行され、初期駆動終了後にF/B制御実行条件が成立しているときに、ロータ32の回転位置(エンコーダカウント値Ncnt−Gcnt)が目標位置(目標カウント値Acnt)から例えば0.5°以内に到達するまで、エンコーダカウント値Ncntと初期位置ずれ学習値Gcntとに基づいて通電相を切り換えてロータ32を回転させる。
【0103】
図22のF/B制御ルーチンが起動されると、まずステップ601で、F/B許可フラグXfbがONにセットされているか否か(F/B制御実行条件が成立しているか否か)を判定し、F/B許可フラグXfbがOFF(F/B制御実行条件が不成立)であれば、以降の処理を行うことなく、本ルーチンを終了する。
【0104】
これに対し、F/B許可フラグXfbがONにセットされていれば、ステップ602に進み、後述する図23の通電相設定ルーチンを実行して、現在のエンコーダカウント値Ncntと初期位置ずれ学習値Gcntとに基づいて通電相を設定し(この処理が特許請求の範囲でいう第1の通電相設定手段としての役割を果たす)、次のステップ603で、図20の通電処理ルーチンを実行する。
【0105】
[通電相設定]
図23に示す通電相設定ルーチンは、図22のF/B制御ルーチンのステップ602と図17のmode1ルーチンのステップ519で起動されるサブルーチンである。本ルーチンが起動されると、まずステップ611で、目標位置への回転方向を指示する回転方向指示値Dが正回転(Pレンジ→NotPレンジの回転方向)を意味する「1」であるか否かを判定する。その結果、回転方向指示値D=1(正回転)と判定されれば、ステップ612に進み、ロータ32の回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが減少したか否か)を判定し、逆転していなければ、ステップ613に進み、現在のエンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、正回転方向位相進み量K1、速度位相進み補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt+K1+Ks
【0106】
ここで、正回転方向位相進み量K1は、ロータ32を正回転させるのに必要な通電相の位相進み量(ロータ32の現在の回転位相に対する通電相の位相進み量)であり、例えばK1=4に設定されている。
【0107】
また、速度位相進み補正量Ksは、ロータ32の回転速度に応じて設定される位相進み補正量であり、例えば、低速域では、速度位相進み補正量Ksが0に設定され、高速になるに従って、速度位相進み補正量Ksが例えば1又は2に増加される。これにより、ロータ32の回転速度に適した通電相となるように通電相判定値Mptnが補正される。
【0108】
更に、F/B制御中に、ロータ32の回転位置(エンコーダカウント値Ncnt)と目標位置(目標カウント値Acnt)との差が所定値以下になった段階で減速制御に移行すると、後述する図26の減速制御時速度位相進み補正量設定ルーチンによってロータ32の回転速度に応じて速度位相進み補正量Ksが設定される。
【0109】
一方、上記ステップ612で、ロータ32の回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。この場合は、逆転直前の通電相(前回の通電相)に通電され、ロータ32の逆転を抑制する方向に制動トルクが発生する。
【0110】
また、上記ステップ611で、回転方向指示値D=−1(逆回転)、つまりNotPレンジ→Pレンジの回転方向と判定された場合は、ステップ614に進み、ロータ32の回転方向が回転方向指示に反して逆転したか否か(エンコーダカウント値Ncntが増加したか否か)を判定し、逆転していなければ、ステップ615に進み、現在のエンコーダカウント値Ncnt、初期位置ずれ学習値Gcnt、逆回転方向位相進み量K2、速度位相進み補正量Ksを用いて通電相判定値Mptnを次式により更新する。
Mptn=Ncnt−Gcnt−K2−Ks
【0111】
ここで、逆回転方向位相進み量K2は、ロータ32を逆回転させるのに必要な通電相の位相進み量(ロータ32の現在の回転位相に対する通電相の位相進み量)であり、例えばK2=3に設定されている。速度位相進み補正量Ksは正回転の場合と同じように設定される。
【0112】
一方、上記ステップ614で、ロータ32の回転方向が回転方向指示に反して逆転したと判定された場合は、逆転防止のために通電相判定値Mptnを更新しない。この場合は、逆転直前の通電相(前回の通電相)に通電され、ロータ32の逆転を抑制する方向に制動トルクが発生する。
【0113】
以上のようにして、今回の通電相判定値Mptnを決定した後、図20の通電処理ルーチンを実行し、F/B制御中は、ステップ555で、図21の変換テーブルを検索して、Mptn%12に対応する通電相を選択し、その通電相の巻線33,34に通電する。
【0114】
[ロータ回転速度演算]
図25に示すロータ回転速度演算ルーチンは、AB相割り込み処理により実行され、次のようにしてロータ32の回転速度SPを演算する。本ルーチンが起動されると、まずステップ621で、F/B許可フラグXfbがON(F/B制御実行中)であるか否かを判定し、F/B許可フラグXfbがOFF(F/B制御禁止)であれば、ロータ32の回転速度SPに応じた通電相の位相進み補正を行わないため、ステップ624に進み、ロータ32の回転速度SP,SPaの記憶値をリセットして、本ルーチンを終了する。
【0115】
これに対して、F/B許可フラグXfbがON(F/B制御実行中)であれば、次のようにしてロータ32の回転速度SPを演算する。まず、ステップ622で、エンコーダ46のA相信号とB相信号の立ち上がり/立ち下がりエッジ間の時間間隔ΔT(n) (すなわちエンコーダカウント値が増減する時間間隔)を計測して、その時間間隔ΔT(n) の過去N回分の平均値ΔTavを算出する。そして、回転速度演算値SPaを次式により算出する。
SPa=60/(ΔTav×Kp)  [rpm]
【0116】
ここで、Kpは、ロータ32の1回転当たりの時間間隔ΔT(n) の数(ロータ32の1回転当たりのエンコーダカウント値の変化量)であり、図5の構成のエンコーダ46の場合は、Kp=96となる。ΔTav×Kpは、ロータ32が1回転するのに要する時間[sec]である。
【0117】
この後、ステップ623に進み、回転速度演算値SPaを用いて、ロータ32の回転速度SPを次式によりなまし処理して求める。
SP(i) =SP(i−1) +{SPa−SP(i−1) }/R
ここで、SP(i) は今回の回転速度、SP(i−1) は前回の回転速度、Rはなまし係数である。
【0118】
[減速制御時速度位相進み補正量設定]
図26に示す減速制御時速度位相進み補正量設定ルーチンは、所定周期(例えば1ms周期)で起動され、減速制御時にロータ32の回転速度SPに応じて速度位相進み補正量Ksを次のようにして設定する。
【0119】
本ルーチンが起動されると、まずステップ701で、目標カウント値Acntとエンコーダカウント値Ncntとの差の絶対値|Acnt−Ncnt|が所定値(例えば100)よりも小さいか否かで、ロータ32の回転位置が目標位置に近付いたか否か(停止のための減速制御領域に入ったか否か)を判定する。その結果、|Acnt−Ncnt|が所定値以上(つまり減速制御領域ではない)と判定されれば、以降の処理を行うことなく、本ルーチンを終了する。
【0120】
一方、|Acnt−Ncnt|が所定値よりも小さい場合は、減速制御領域と判断して、ステップ702〜706の処理により、ロータ32の回転速度SPに応じて速度位相進み補正量Ksを次のようにして設定する。まず、ステップ702、703で、ロータ32の現在の回転速度SPが高速領域(例えば1500rpm以上)、中速領域(例えば1500〜500rpm)、低速領域(例えば500rpm以下)のいずれに該当するか判別し、高速領域(例えば1500rpm以上)であれば、ステップ704に進み、減速制御時の速度位相進み補正量Ksを例えば−2に設定し、中速領域(例えば1500〜500rpm)であれば、ステップ705に進み、減速制御時の速度位相進み補正量Ksを例えば−1に設定し、低速領域(例えば500rpm以下)であれば、ステップ706に進み、減速制御時の速度位相進み補正量Ksを例えば0に設定する。これにより、減速制御時には、ロータ32の回転速度SPが高速領域→中速領域→低速領域へと速度低下するに従って、速度位相進み補正量Ksの絶対値が小さくなり、ロータ32に作用させる制動力が小さくなる。
【0121】
この後、ステップ707に進み、ロータ32の減速が遅れているか否かを判定する。具体的には、目標カウント値Acntとエンコーダカウント値Ncntとの差の絶対値|Acnt−Ncnt|が例えば50よりも小さくなっている(つまりロータ32の現在の回転位置が目標位置にかなり近付いている)にも拘らず、ロータ32の回転速度SPが高速領域(例えば1500rpm以上)であれば、ロータ32の減速が遅れていると判断して、ステップ708に進み、減速制御時の速度位相進み補正量Ksを例えば−3に設定して、ロータ32に作用させる制動力を最大限に増大させて、ロータ32の回転速度SPを急速に低下させる。これにより、ロータ32が慣性により目標位置を越えてオーバーシュートすることを防止する。
【0122】
以上説明した本実施形態では、F/B制御中に、ロータ32の回転位置(エンコーダカウント値)と目標位置(目標カウント値)との差が所定値以下になった段階で、減速制御に移行し、ロータ32の回転速度に応じて通電相の位相進み量に対する速度位相進み補正量Ksを設定するようにしたので、ロータ32の回転速度に応じて該ロータ32に作用させる制動力を適度に変化させて、ロータ32を目標位置に向かってスムーズに減速することができる。これにより、F/B制御終了時にロータ32が慣性により目標位置を越えてオーバーシュートすることを防止できて、ロータ32を精度良く目標位置で停止させることができ、F/B制御中のロータ32の回転速度の高速化と停止位置精度向上とを両立させることができる。
【0123】
しかも、本実施形態では、減速制御時に、ロータ32の回転速度の他に、ロータ32の現在位置から目標位置までの回転角も考慮して、速度位相進み補正量Ksを設定するようにしたので、何等かの原因で、ロータ32の減速が遅れた場合でも、目標位置の手前でロータ32に作用させる制動力を増大させてロータ32を確実に減速させることができ、ロータ32を精度良く目標位置で停止させることができる。
【0124】
更に、本実施形態では、F/B制御開始からロータ32が目標位置に回転駆動されるまで、所定周期(例えば1ms周期)でエンコーダカウント値に基づいて通電相を設定する時間同期通電相設定処理をF/B制御と並行して実行するようにしたので、減速制御の途中で、何等かの原因でロータ32の回転が一旦停止してエンコーダ46からA相・B相信号が出力されなくなった場合でも、時間同期通電相設定処理によってその時点のエンコーダカウント値に基づいて通電相を設定することができて、可能な限りロータ32を目標位置まで回転駆動することができ、SRモータ12のF/B制御(レンジ切換制御)の信頼性を向上することができる。
【0125】
尚、本実施形態では、F/B制御開始からロータ32が目標位置に回転駆動されるまでの全期間にわたって時間同期通電相設定処理を行うようにしたので、ロータ32がどの様なタイミングで停止しても、時間同期通電相設定処理によってロータ32の停止直後に遅れずに通電相を設定することができ、ロータ32の停止時間を短くすることができる利点がある。
【0126】
しかし、ロータ32の回転速度が所定値以下に低下してから時間同期通電相設定処理を実行するようにしても良い。このようにすれば、ロータ32の回転速度が一時停止する可能性のある回転速度まで低下したときのみ、時間同期通電相設定処理を実行すれば良いため、ECU41のCPUの演算負荷を軽減できる利点がある。
【0127】
或は、減速制御の途中でロータ32が停止したときのみ、時間同期通電相設定処理を実行するようにしても良い。勿論、時間同期通電相設定処理を行わずにF/B制御のみで通電相を設定する場合でも、本発明を適用して実施できることは言うまでもない。
【0128】
尚、本実施形態では、F/B制御中に、1相通電と2相通電とを交互に切り換える1−2相励磁方式で駆動するようにしたが、1相通電のみで駆動する1相励磁方式、又は、2相通電のみで駆動する2相励磁方式を採用しても良い。
【0129】
また、本発明に用いるエンコーダは、磁気式のエンコーダ46に限定されず、例えば、光学式のエンコーダやブラシ式のエンコーダを用いても良い。
また、本発明に用いるモータは、SRモータ12に限定されず、エンコーダの出力信号のカウント値に基づいてロータの回転位置を検出してモータの通電相を順次切り換えるブラシレス型のモータであれば、SRモータ以外のブラシレス型のモータを用いても良い。
【0130】
また、本実施形態のレンジ切換装置は、PレンジとNotPレンジの2つのレンジを切り換える構成であるが、例えば、ディテントレバー15の回動動作に連動して自動変速機のレンジ切換弁とマニュアルバルブを切り換えて、自動変速機のP、R、N、D等の各レンジを切り換えるレンジ切換装置にも本発明を適用して実施できる。
【0131】
その他、本発明は、レンジ切換装置に限定されず、SRモータ等のブラシレス型のモータを駆動源とする各種の装置に適用して実施できることは言うまでもない。
【図面の簡単な説明】
【図1】本発明の一実施形態を示すレンジ切換装置の斜視図
【図2】SRモータの構成を説明する図
【図3】SRモータを駆動する回路構成を示す回路図
【図4】レンジ切換装置の制御システム全体の構成を概略的に示す図
【図5】エンコーダのロータリマグネットの構成を説明する平面図
【図6】エンコーダの側面図
【図7】(a)はエンコーダの出力波形を示すタイムチャート、(b)は通電相切り換えパターンを示すタイムチャート
【図8】エンコーダカウンタルーチンの処理の流れを示すフローチャート
【図9】カウントアップ値ΔN算出マップの一例を示す図
【図10】指令レンジシフト、A相信号、B相信号、エンコーダカウント値の関係を示すタイムチャート
【図11】制御モード設定ルーチンの処理の流れを示すフローチャート(その1)
【図12】制御モード設定ルーチンの処理の流れを示すフローチャート(その2)
【図13】制御モード設定ルーチンの処理の流れを示すフローチャート(その3)
【図14】F/B制御から目標位置停止保持処理へ移行するタイミングを説明するタイムチャート
【図15】SRモータの制御例を示すタイムチャート
【図16】時間同期モータ制御ルーチンの処理の流れを示すフローチャート
【図17】mode1ルーチンの処理の流れを示すフローチャート
【図18】mode3ルーチンの処理の流れを示すフローチャート
【図19】mode4ルーチンの処理の流れを示すフローチャート
【図20】通電処理ルーチンの処理の流れを示すフローチャート
【図21】1−2相励磁方式の場合のMptn%12から通電相への変換テーブルの一例を示す図
【図22】F/B制御ルーチンの処理の流れを示すフローチャート
【図23】通電相設定ルーチンの処理の流れを示すフローチャート
【図24】UW相から回転を開始する時の通電処理を説明するタイムチャート
【図25】ロータ回転速度演算ルーチンの処理の流れを示すフローチャート
【図26】減速制御時速度位相進み補正量設定ルーチンの処理の流れを示すフローチャート
【符号の説明】
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(制御手段,第1の通電相設定手段,第2の通電相設定手段)、43…Pレンジスイッチ、44…NotPレンジスイッチ、46…エンコーダ、47…ロータリマグネット、48…A相信号用の磁気検出素子、49…B相信号用の磁気検出素子、50…Z相信号用の磁気検出素子。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a motor control device that rotationally drives a rotor to a target position by detecting the rotational position of the rotor based on the count value of the pulse signal of the encoder and sequentially switching the energized phase of the motor.
[0002]
[Prior art]
In recent years, brushless motors such as switched reluctance motors, which are increasing in demand as simple and inexpensive motors, are equipped with an encoder that outputs a pulse signal in synchronization with the rotation of the rotor. And the rotor is rotationally driven by detecting the rotational position of the rotor based on the encoder count value and sequentially switching the energized phase. Since such a motor with an encoder can detect the rotational position of the rotor based on the encoder count value after startup, position switching for rotating the rotor to a target position by a feedback control system (F / B control system) It is used as a drive source for various position switching devices that perform control (positioning control) (for example, see Patent Document 1).
[0003]
When performing F / B control with such a motor with an encoder, the energized phase is switched based on the encoder count value in synchronization with the encoder pulse signal output timing, and the rotor is driven to rotate toward the target position. When the value reaches the target count value set according to the target position, it is determined that the rotor has reached the target position, the F / B control is terminated, and the rotor is stopped at the target position.
[0004]
[Patent Document 1]
JP 2001-271917 A (pages 4 to 8 etc.)
[0005]
[Problems to be solved by the invention]
By the way, in order to generate torque for rotationally driving the rotor, it is necessary to advance the phase of the energized phase with respect to the rotational phase of the rotor, and the phase advance amount of the energized phase is increased within a range where no step-out occurs. Thus, the rotor rotation speed can be increased.
[0006]
However, if the rotational speed of the rotor during F / B control is increased, the rotor tends to overshoot beyond the target position due to inertia at the end of F / B control, making it difficult to stop the rotor accurately at the target position. .
[0007]
The present invention has been made in consideration of such circumstances. Therefore, even if the rotor rotational speed during F / B control is increased, the object of the present invention is to accurately place the rotor at the target position at the end of F / B control. An object of the present invention is to provide a motor control device that can be stopped and can achieve both a higher rotor rotation speed during F / B control and improved rotor stop position accuracy.
[0008]
[Means for Solving the Problems]
In order to achieve the above object, the motor control device according to claim 1 of the present invention corrects the phase advance amount of the energized phase with respect to the rotational phase of the rotor in accordance with the rotational speed of the rotor during the deceleration control of the rotor. It is. In this way, during the deceleration control of the rotor, an appropriate braking force according to the rotor rotational speed can be applied to the rotor, so that the rotor can be reliably decelerated before the target position. As a result, the rotor can be prevented from overshooting beyond the target position due to inertia at the end of the F / B control, the rotor can be stopped at the target position with high accuracy, and the rotor rotational speed during the F / B control can be reduced. Both high speed and improved rotor stop position accuracy can be achieved.
[0009]
Specifically, as in claim 2, it is preferable to correct the phase advance amount of the energized phase in a direction in which the braking force applied to the rotor is reduced as the rotor rotational speed is reduced during the deceleration control of the rotor. In this way, the rotor can be smoothly decelerated toward the target position during the rotor deceleration control.
[0010]
Further, as in claim 3, when the speed reduction control of the rotor is performed, the phase advance amount of the energized phase is corrected in consideration of the rotation angle from the current position of the rotor to the target position in addition to the rotor rotational speed. good. In this way, even if the rotor slows down for some reason, the rotor can be reliably decelerated by increasing the braking force applied to the rotor before the target position, and the rotor can be accurately It can be stopped at the target position.
[0011]
By the way, in general motor F / B control, the energized phase is switched in synchronism with the pulse signal output timing of the encoder, so there is some cause during the deceleration of the rotor toward the target position by F / B control. If the rotation of the rotor is temporarily stopped and the pulse signal is not output from the encoder, the energized phase cannot be switched, and the rotor cannot be rotated to the target position.
[0012]
As a countermeasure against this, the first energized phase setting means for setting the energized phase based on the encoder count value in synchronism with the pulse signal output timing of the encoder during motor drive control, and the rotor as a target Second energized phase setting means for setting the energized phase based on the encoder count value at a predetermined period until the position is rotationally driven, and the energized phase is set by the first and second energized phase setting means. At this time, the phase advance amount of the energized phase may be corrected according to the rotor rotational speed.
[0013]
In this way, even when the rotation of the rotor is temporarily stopped and the pulse signal is not output from the encoder for some reason during the deceleration control of the rotor, the second energized phase setting means is in a predetermined cycle. Since the energized phase is set based on the encoder count value at that time, the energized phase can be switched even when the rotation of the rotor is stopped, and the rotor can be rotated to the target position as much as possible. The reliability of motor drive control can be improved.
[0014]
Further, as in claim 5, a switched reluctance motor may be used as the motor. The switched reluctance motor is advantageous in that it does not require a permanent magnet and is simple in structure, so that it is inexpensive and has high durability and reliability against temperature environments.
[0015]
The invention according to claims 1 to 5 described above can be applied to various position switching devices using a brushless type motor such as a switched reluctance motor as a drive source. You may apply to the control apparatus of the motor which drives the range switching mechanism which switches the range of a machine. Thus, a highly reliable motor-driven range switching device can be configured.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment in which the present invention is applied to a vehicle range switching device will be described with reference to the drawings.
[0017]
First, the configuration of the range switching mechanism 11 will be described with reference to FIG. The motor 12 serving as a drive source for the range switching mechanism 11 is constituted by a switched reluctance motor, for example, and includes a speed reduction mechanism 26 (see FIG. 4), and an output shaft sensor 14 for detecting the rotational position of the output shaft 13 is provided. It has been. A detent lever 15 is fixed to the output shaft 13.
[0018]
Further, an L-shaped parking rod 18 is fixed to the detent lever 15, and a cone 19 provided at the tip of the parking rod 18 is in contact with the lock lever 21. The lock lever 21 moves up and down around the shaft 22 in accordance with the position of the cone 19 to lock / unlock the parking gear 20. The parking gear 20 is provided on the output shaft of the automatic transmission 27, and when the parking gear 20 is locked by the lock lever 21, the driving wheel of the vehicle is held in a stopped state (parking state).
[0019]
On the other hand, a detent spring 23 for holding the detent lever 15 in the parking range (hereinafter referred to as “P range”) and another range (hereinafter referred to as “Not P range”) is fixed to the support base 17. When the engaging portion 23a provided at the tip of the spring 23 is fitted into the P range holding recess 24 of the detent lever 15, the detent lever 15 is held at the P range position, and the engaging portion of the detent spring 23 is When 23a is fitted into the NotP range holding recess 25 of the detent lever 15, the detent lever 15 is held at the position of the NotP range.
[0020]
In the P range, the parking rod 18 moves in a direction approaching the lock lever 21, the thick part of the cone 19 pushes up the lock lever 21, and the convex portion 21 a of the lock lever 21 fits into the parking gear 20. The gear 20 is locked, whereby the output shaft (drive wheel) of the automatic transmission 27 is held in the locked state (parking state).
[0021]
On the other hand, in the NotP range, the parking rod 18 moves away from the lock lever 21, the thick part of the cone 19 comes out of the lock lever 21, and the lock lever 21 is lowered. 21a is disengaged from the parking gear 20, the parking gear 20 is unlocked, and the output shaft of the automatic transmission 27 is held in a rotatable state (runnable state).
[0022]
The output shaft sensor 14 described above is composed of a rotation sensor (for example, a potentiometer) that outputs a voltage corresponding to the rotation angle of the output shaft 13 of the speed reduction mechanism 26 of the motor 12, and the current range is changed to the P range by the output voltage. And the NotP range can be confirmed.
[0023]
Next, the configuration of the motor 12 will be described with reference to FIG. In the present embodiment, a switched reluctance motor (hereinafter referred to as “SR motor”) is used as the motor 12. The SR motor 12 is a motor in which both the stator 31 and the rotor 32 have a salient pole structure, and has an advantage that a permanent magnet is unnecessary and the structure is simple. For example, twelve salient poles 31a are formed at equal intervals on the inner peripheral portion of the cylindrical stator 31, whereas, on the other hand, for example, eight salient poles 32a are equally spaced on the outer peripheral portion of the rotor 32. As the rotor 32 rotates, the salient poles 32a of the rotor 32 are sequentially opposed to the salient poles 31a of the stator 31 via a minute gap. The twelve salient poles 31a of the stator 31 have a total of six windings 33 of U phase, V phase, and W phase, and a total of six windings 34 of U 'phase, V' phase, and W 'phase. It is wound in order. Needless to say, the number of salient poles 31a and 32a of the stator 31 and the rotor 32 may be appropriately changed.
[0024]
The winding order of the windings 33 and 34 of the present embodiment is, for example, V phase → W phase → U phase → V phase → W phase → U phase → V ′ with respect to the 12 salient poles 31a of the stator 31. It is wound in the order of phase → W ′ phase → U ′ phase → V ′ phase → W ′ phase → U ′ phase. As shown in FIG. 3, a total of six windings 33 of U phase, V phase, and W phase, and a total of six windings 34 of U 'phase, V' phase, and W 'phase are composed of two systems of motors. The excitation parts 35 and 36 are connected so as to constitute them. One motor excitation unit 35 is configured by Y-connecting a total of six windings 33 of U phase, V phase, and W phase (two windings 33 of the same phase are connected in series, respectively). The other motor excitation unit 36 is configured by Y-connecting a total of six windings 34 of the U ′ phase, the V ′ phase, and the W ′ phase (the two windings 34 of the same phase are connected in series, respectively. It is connected to the). In the two motor excitation units 35 and 36, the U phase and the U ′ phase are energized simultaneously, the V phase and the V ′ phase are energized simultaneously, and the W phase and the W ′ phase are energized simultaneously.
[0025]
These two motor excitation sections 35 are driven by separate motor drivers 37 and 38, respectively, using a battery 40 mounted on the vehicle as a power source. In this way, by providing two motor excitation units 35 and 36 and two motor drivers 37 and 38, even if one system fails, the SR motor 12 can be rotated by the other system. ing. In the circuit configuration example of the motor drivers 37 and 38 shown in FIG. 3, the circuit configuration is a unipolar drive system in which one switching element 39 such as a transistor is provided for each phase. However, two switching elements are provided for each phase. A bipolar drive type circuit configuration provided one by one may be adopted. Needless to say, the present invention may have a configuration in which one motor excitation unit and one motor driver are provided.
[0026]
On / off of each switching element 39 of each motor driver 37, 38 is controlled by an ECU 41 (control means). As shown in FIG. 4, the ECU 41 and the motor drivers 37 and 38 are mounted on a range switching control device 42. The range switching control device 42 includes a P range switch 43 that performs a switching operation to the P range, An operation signal of the NotP range switch 44 for performing the switching operation to the NotP range is input. The range selected by operating the P range switch 43 or the NotP range switch 44 is displayed on a range display unit 45 provided on an instrument panel (not shown).
[0027]
The SR motor 12 is provided with an encoder 46 for detecting the rotational position of the rotor 32. The encoder 46 is composed of, for example, a magnetic rotary encoder. As shown in FIGS. 5 and 6, the specific configuration of the encoder 46 is such that the N pole and the S pole are alternately arranged at equal pitches in the circumferential direction. A magnetized annular rotary magnet 47 is coaxially fixed to the side surface of the rotor 32, and magnetic detection elements 48, 49, 50 such as three Hall ICs are arranged at positions facing the rotary magnet 47. It has a configuration. In this embodiment, the magnetization pitch of the N pole and S pole of the rotary magnet 47 is set to 7.5 °. The magnetization pitch (7.5 °) of the rotary magnet 47 is set to be the same as the rotation angle of the rotor 32 per excitation of the SR motor 12. As will be described later, when the energized phase of the SR motor 12 is switched six times by the 1-2 phase excitation method, the switching of all energized phases is completed and the rotor 32 and the rotary magnet 47 are integrally 7.5 °. × 6 = 45 ° rotation. The total number of N poles and S poles existing in the 45 ° rotation angle range of the rotary magnet 47 is six poles.
[0028]
Further, the N pole (N ′) at the position corresponding to the reference rotation position of the rotor 32 and the S poles (S ′) on both sides thereof are formed to have a larger radial width than the other magnetic poles. In the present embodiment, considering that the rotor 32 and the rotary magnet 47 are integrally rotated by 45 ° while the energized phase of the SR motor 12 is switched once, the width corresponding to the reference rotation position of the rotor 32 is widened. Thus, a total of eight wide magnetized portions (N ′) corresponding to the reference rotation position are formed in the rotary magnet 47 as a whole. Note that only one wide magnetized portion (N ′) corresponding to the reference rotational position may be formed as the entire rotary magnet 47.
[0029]
Three magnetic detection elements 48, 49, 50 are arranged with respect to the rotary magnet 47 in the following positional relationship. A magnetic detection element 48 that outputs an A-phase signal and a magnetic detection element 49 that outputs a B-phase signal include a narrow magnetized portion (N, S) and a wide magnetized portion (N ′, S ′) of the rotary magnet 47. ) On both sides of the same circumference. On the other hand, the magnetic detection element 50 that outputs the Z-phase signal has a wide magnetized portion (N ′) at a position radially outside or inside the narrow magnetized portion (N, S) of the rotary magnet 47. , S ′) only. As shown in FIG. 7, the interval between the two magnetic detection elements 48 and 49 that output the A phase signal and the B phase signal is such that the phase difference between the A phase signal and the B phase signal is 90 ° (mechanical angle). And 3.75 °). Here, the “electrical angle” is an angle when the generation period of the A / B phase signal is one period (360 °), and the “mechanical angle” is a mechanical angle (one rotation of the rotor 32 is 360 °). The angle at which the rotor 32 rotates from the fall (rise) of the A phase signal to the fall (rise) of the B phase signal corresponds to the mechanical angle of the phase difference between the A phase signal and the B phase signal. To do. The magnetic detection element 50 that outputs the Z-phase signal is arranged so that the phase difference between the Z-phase signal and the B-phase signal (or A-phase signal) becomes zero.
[0030]
The output of each magnetic detection element 48, 49, 50 is high level "1" when facing the N pole (N 'pole) and low level "0" when facing the S pole (S' pole). Become. The output of the magnetic detection element 50 for the Z-phase signal becomes high level “1” every time it faces the wide N ′ pole corresponding to the reference rotation position of the rotor 32, and at other positions, the output is low level “1”. 0 ”.
[0031]
In the present embodiment, the ECU 41 counts both rising and falling edges of the A-phase signal and the B-phase signal by an encoder counter routine shown in FIG. 8 to be described later, and the energized phase of the SR motor 12 according to the encoder count value. Is switched to rotate the rotor 32. At this time, the rotation direction of the rotor 32 is determined based on the generation order of the A-phase signal and the B-phase signal, the encoder count value is counted up in the normal rotation (P range → NotP range rotation direction), and the reverse rotation (NotP range → In the P range rotation direction), the encoder count value is counted down. As a result, even if the rotor 32 rotates in either the forward rotation / reverse rotation direction, the correspondence relationship between the encoder count value and the rotation position of the rotor 32 is maintained. However, the rotation position (rotation angle) of the rotor 32 is detected from the encoder count value, and the rotors 32 are rotationally driven by energizing the windings 33 and 34 of the phase corresponding to the rotation position.
[0032]
FIG. 7 shows an output waveform of the encoder 46 and a switching pattern of the energized phase when the rotor 32 is rotated in the reverse rotation direction (the rotation direction of NotP range → P range). In each of the reverse rotation direction (NotP range → P range rotation direction) and forward rotation direction (P range → NotP range rotation direction), one-phase energization and two-phase each time the rotor 32 rotates 7.5 °. During the rotation of the rotor 32 by 45 °, for example, U phase energization → UW phase energization → W phase energization → VW phase energization → V phase energization → UV phase energization The energized phase is switched once. Each time this energized phase is switched, the rotor 32 rotates by 7.5 °, and the magnetic pole of the rotary magnet 47 facing the magnetic detection elements 48 and 49 for A-phase and B-phase signals changes from N pole to S pole. (N ′ pole → S ′ pole) or S pole → N pole (S ′ pole → N ′ pole), and the levels of the A phase signal and the B phase signal are alternately inverted. The encoder count value counts up by 2 (or counts down) every time it rotates 5 °. In addition, every time the energized phase is switched and the rotor 32 rotates 45 °, the Z-phase magnetic detection element 50 faces the wide N ′ pole corresponding to the reference rotation position of the rotor 32, and the Z-phase The signal becomes high level “1”. In this specification, when the A-phase, B-phase, and Z-phase signals are at a high level “1”, the A-phase, B-phase, and Z-phase signals may be output.
[0033]
When performing range switching control with such an SR motor 12 with an encoder 46, each time the command shift range (target position) is switched from the P range to the NotP range or the opposite direction, the rotor 32 is rotationally driven, Based on the encoder count value, the energized phase of the SR motor 12 is sequentially switched to perform feedback control (hereinafter referred to as “F / B control”) that rotationally drives the rotor 32 toward the target position. When the target count value set according to the target position is reached, it is determined that the rotor 32 has reached the target position, the F / B control is terminated, and the rotor 32 is stopped at the target position.
[0034]
At this time, if the rotational speed of the rotor 32 during F / B control is increased, the rotor 32 tends to overshoot beyond the target position due to inertia at the end of the F / B control, and the rotor 32 is accurately stopped at the target position. It becomes difficult to let you.
[0035]
Therefore, in the present embodiment, during the F / B control, when the difference between the rotational position (encoder count value) of the rotor 32 and the target position (target count value) becomes a predetermined value or less, the shift to the deceleration control is performed. By correcting the phase advance amount of the energized phase with respect to the rotational phase of the rotor 32 according to the rotational speed of the rotor 32, an appropriate braking force according to the rotational speed of the rotor 32 is applied to the rotor 32. Specifically, during deceleration control, as the rotational speed of the rotor 32 decreases, the phase advance amount of the energized phase is corrected so as to reduce the braking force applied to the rotor 32. Thereby, at the time of deceleration control, the rotor 32 is smoothly decelerated toward the target position.
[0036]
Furthermore, in the present embodiment, in addition to the rotational speed of the rotor 32 during deceleration control, the rotation angle from the current rotational position (encoder count value) of the rotor 32 to the target position (target count value) is also considered. The amount of phase advance is corrected. In this manner, even if the deceleration of the rotor 32 is delayed due to some reason, the braking force applied to the rotor 32 before the target position can be increased and the rotor 32 can be reliably decelerated. 32 can be accurately stopped at the target position.
[0037]
By the way, in the F / B control, the energized phase is switched in synchronization with the A / B phase signal output timing of the encoder 46. Therefore, during the deceleration control, the rotation of the rotor 32 is temporarily stopped for some reason, When the A-phase / B-phase signal is not output from the encoder 46, the energized phase cannot be switched, and the rotor 32 cannot be rotated to the target position.
[0038]
As a countermeasure, in the present embodiment, a time-synchronized energized phase in which the energized phase is set based on the encoder count value at a predetermined period (for example, 1 ms period) from the start of the F / B control until the rotor 32 is rotationally driven to the target position. The setting process is executed in parallel with the F / B control.
[0039]
In this configuration, even when the rotation of the rotor 32 is temporarily stopped for some reason during the F / B control and the A-phase / B-phase signal is not output from the encoder 46, the time-synchronized energized phase setting process is performed. Since the energized phase is set based on the encoder count value at that time, the energized phase can be switched by the time-synchronized energized phase setting process even when the rotation of the rotor 32 is stopped. Can be rotated to the target position, and the reliability of the F / B control (range switching control) of the SR motor 12 can be improved.
[0040]
Hereinafter, processing contents of each routine executed by the ECU 41 of the range switching control device 42 will be described.
[0041]
[Encoder counter]
The processing contents of the encoder counter routine shown in FIG. 8 will be described. This routine is started in synchronization with both the rising and falling edges of the A phase signal and the B phase signal by the AB phase interrupt processing, and the rising and falling edges of the A phase signal and the B phase signal are followed. Count as follows. When this routine is started, first, in step 301, the values A (i) and B (i) of the A-phase signal and B-phase signal are read. In the next step 302, the count-up value ΔN calculation map of FIG. By searching, the current values A (i) and B (i) of the A-phase signal and B-phase signal and the count-up value ΔN corresponding to the previous values A (i−1) and B (i−1) are calculated. .
[0042]
Here, the reason why the current values A (i) and B (i) and the previous values A (i-1) and B (i-1) of the A phase signal and the B phase signal are used is as follows. This is because the rotation direction of the rotor 32 is determined based on the signal generation order. As shown in FIG. 10, the encoder count value Ncnt is increased by setting the count-up value ΔN to a positive value in the normal rotation (P range → NotP range rotation direction). Is counted up, and in reverse rotation (rotation direction of NotP range → P range), the count-up value ΔN is set to a negative value, and the encoder count value Ncnt is counted down.
[0043]
After calculating the count-up value ΔN, the process proceeds to step 303, and the current encoder count value Ncnt is obtained by adding the count-up value ΔN calculated in step 302 to the previous encoder count value Ncnt. Thereafter, the process proceeds to step 304, and the current values A (i) and B (i) of the A phase signal and the B phase signal are respectively converted to A (i-1) and B (i-1) for the next counting process. And the routine is terminated.
[0044]
[Control mode setting]
The control mode setting routine shown in FIGS. 11 to 13 is executed at a predetermined cycle (for example, 1 ms cycle) after the end of the initial drive. Here, the initial drive is a process for making the encoder count value correspond to the actual rotational position of the rotor 32 after the ECU 41 is powered on. During the initial drive, switching of the energized phase of the SR motor 12 is performed in a predetermined manner. The edges of the A phase signal and B phase signal of the encoder 46 are counted in a time schedule and the correspondence between the encoder count value at the end of the initial drive and the rotational position (energized phase) of the rotor 32 is learned. Specifically, the encoder count value at the end of the initial drive is learned as the initial position deviation learning value, and the initial drive is performed by correcting the encoder count value with the initial position deviation learned value during subsequent F / B control or the like. A deviation between the encoder count value at the end and the energized phase (rotational position of the rotor 32) is corrected so that the correct energized phase can be selected during F / B control or the like.
[0045]
The control mode setting routine shown in FIG. 11 to FIG. 13 sets the control mode determination value mode to 0, 1, 3, 4, or 5 at a predetermined cycle (for example, 1 ms cycle) after the end of the initial drive. Specify the control mode as follows.
[0046]
mode = 0: energization off (standby)
mode = 1: Normal drive
(F / B control start position stop holding process, time-synchronized energized phase setting process, F / B control)
mode = 3: target position stop holding process
mode = 4: Reverse position stop holding process
mode = 5: Open loop control
[0047]
When the control mode setting routine is started, first, in step 401, it is determined whether or not the system failure flag Xfailoff is set to ON, which means that the range switching control device 42 has failed. If Xfailoff = ON is set. If so, the process proceeds to step 402, and processing for maintaining the SR motor 12 in the energized off state is executed. Thereby, the rotation direction instruction value D = 0 (stop), the energization flag Xon = OFF (energization off), the F / B permission flag Xfb = OFF (F / B control prohibited), the control mode determination value mode = 0 (energization off) ).
[0048]
On the other hand, if the system failure flag Xfailoff is OFF (no failure), the process proceeds from step 401 to step 403 to determine whether or not the fail safe process execution flag Xfsop = OFF and the recovery process execution flag Xrcv = OFF. . If either or both of the fail safe process execution flag Xfsop and the recovery process execution flag Xrcv are set to ON, the process proceeds to step 404, and the rotation direction instruction value D = Set to 0 (stop), control mode determination value mode = 5 (open loop control), and F / B permission flag Xfb = OFF (F / B control prohibited).
[0049]
If both the fail-safe process execution flag Xfsop and the recovery process execution flag Xrcv are set to OFF, the process proceeds to step 405 to determine whether or not the energization flag Xon = ON (energization on) is set. If the flag Xon is set to OFF (energization off), the process proceeds to step 406, where a difference between the target count value Acnt and the encoder count value Ncnt (difference between the target position and the rotor 32 and the position) is obtained. Based on the difference (Acnt−Ncnt), it is determined whether it corresponds to forward rotation (rotation in the P range → NotP range direction), reverse rotation (rotation in the NotP range → P range direction), or stop. At this time, the encoder count value Ncnt uses a value corrected by the initial positional deviation learning value Gcnt learned by the initial driving.
Ncnt = Ncnt-Gcnt
[0050]
If the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is + Kth or more (for example, + 10 ° or more), the rotor 32 is rotationally driven in the normal rotation direction (P range → NotP range rotation direction). It is determined that it is necessary, and the process proceeds to step 407, where the rotation direction instruction value D = 1 (forward rotation), the energization flag Xon = ON (energization on), the control mode determination value mode = 1 (F / B control start position stop) Holding process and F / B control).
[0051]
If the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is −Kth or less (for example, −10 ° or less), the rotor 32 is rotated in the reverse rotation direction (notP range → P range rotation direction). It is determined that it is necessary to drive, and the process proceeds to step 409, where the rotation direction instruction value D = −1 (reverse rotation), the energization flag Xon = ON (energization on), the control mode determination value mode = 1 (F / B control) Start position stop holding process and F / B control).
[0052]
If the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is within the range of −Kth to + Kth (for example, within the range of −10 ° to + 10 °), the rotor 32 is brought to the target position and the detent spring 23 It is determined that the SR motor 12 can be held (the SR motor 12 need not be energized), and the process proceeds to step 408 to maintain the SR motor 12 in the energized off state. Set to 0 (stop), energization flag Xon = OFF (energization off), and control mode determination value mode = 0 (energization off).
[0053]
On the other hand, if it is determined in step 405 that the energization flag Xon = ON (energization on) is set, has the command shift range (target position) been reversed by the processing of steps 410 to 415 in FIG. If it is reversed, the rotation direction instruction value D is reversed.
[0054]
Specifically, first, in step 410, it is determined whether or not the rotation direction instruction value D = 1 (forward rotation). If the rotation direction instruction value D = 1 (forward rotation), the process proceeds to step 411. It is determined whether or not it is necessary to reverse the rotation direction of the rotor 32 from the normal rotation to the reverse rotation depending on whether or not the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is a negative value. If necessary, the process proceeds to step 412 to set the rotation direction instruction value D = −1 (reverse rotation).
[0055]
On the other hand, when it is determined in step 410 that the rotation direction instruction value D is not 1 (forward rotation) (that is, when D = 0 or −1), the process proceeds to step 413 and the rotation direction instruction value D is reached. Is determined to be equal to −1 (reverse rotation). If the rotation direction instruction value D is −1 (reverse rotation), the process proceeds to step 414 and the difference between the target count value Acnt and the encoder count value Ncnt ( It is determined whether or not it is necessary to reverse the rotation direction of the rotor 32 from the reverse rotation to the normal rotation based on whether or not (Acnt−Ncnt) is a positive value. The direction indication value D = 1 (forward rotation) is set.
[0056]
As described above, when the rotation direction instruction value D is reversed, the process proceeds to step 416, and in order to reverse the rotation direction of the rotor 32, the control mode determination value mode = 4 (reverse position stop holding process), F / B permission flag Xfb = OFF (F / B control prohibited) is set, and the process proceeds to step 417. On the other hand, if the rotation direction instruction value D is not reversed, the process proceeds to step 417 without performing the process of step 416.
[0057]
In this step 417, it is determined whether or not the control mode determination value mode = 4 (reverse position stop holding process) is set. If “Yes”, the process proceeds to step 418 and the energization flag Xon = ON (energization on). ) And the reverse position stop holding process is executed.
[0058]
On the other hand, if it is determined “No” in step 417 (not the reverse position stop holding process), it is determined in steps 419 to 421 in FIG. Determine. Specifically, first, in step 419, it is determined whether or not the rotation direction instruction value D ≧ 0 (forward rotation or stop). If the rotation direction instruction value D ≧ 0, the process proceeds to step 420 and the target count is reached. Whether or not it is the end timing of the F / B control is determined based on whether or not the difference (Acnt−Ncnt) between the value Acnt and the encoder count value Ncnt is + Kref or less (for example, + 0.5 ° or less). If the rotation direction instruction value D = −1 (reverse rotation), the process proceeds to step 421, where the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt is −Kref or more (for example, −0.5). It is determined whether or not it is the end timing of the F / B control.
[0059]
That is, as shown in FIG. 14, by setting the end determination value Kref of the F / B control to, for example, a phase advance amount (for example, 2 to 4 counts) of the energized phase, the phase of the energized phase is greater than the target count value Acnt. The F / B control is terminated at the timing before the advance amount. As a result, the last energized phase of the F / B control coincides with the energized phase that stops and holds the rotor 32 at the target position (target count value Acnt).
[0060]
When it is determined as “No” in the above-described step 420 or 421 (when it is not the end timing of the F / B control), the process proceeds to step 422 and the stop holding time counter CThold for counting the time of the target position stop holding process is reset. .
[0061]
On the other hand, if “Yes” is determined in step 420 or 421 (when it is the end timing of the F / B control), the process proceeds to step 423 and the F / B permission flag Xfb = OFF (F / B control prohibited). To end the F / B control and shift to the target position stop holding process. Then, in the next step 424, the stop holding time counter CThold is counted up, and the time of the target position stop holding process is counted.
[0062]
Thereafter, the process proceeds to step 425, where it is determined whether or not the target position stop holding process time CThold has reached a predetermined time (for example, 50 ms), and the target position stop holding process time CThold has reached a predetermined time (for example, 50 ms). If not, the process proceeds to step 426, and in order to continue the target position stop holding process, the rotation direction instruction value D = 0 (stop), the energization flag Xon = ON (energization on), the control mode determination value mode = 3 (target The position stop holding process) is maintained.
[0063]
Thereafter, when the target position stop holding processing time CThold reaches a predetermined time (for example, 50 ms), the process proceeds to step 427 to turn off the SR motor 12, and the rotation direction instruction value D = 0 (stop), The energization flag Xon = OFF (energization off) and the control mode determination value mode = 0 (energization off) are set.
[0064]
A setting example of the control mode determination value mode described above is shown in the time chart of FIG.
[0065]
[Time synchronous motor control]
The time-synchronized motor control routine shown in FIG. 16 is started at a predetermined period (for example, 1 ms period) after the end of the initial drive, and is normally driven (F / B control start position stop holding process, time-synchronized energized phase setting process, F / B control). ), The target position stop holding process and the reverse position stop holding process are executed.
[0066]
When this routine is started, it is first determined in step 501 whether or not the control mode determination value mode = 1 (normal drive). If the control mode determination value mode = 1, the process proceeds to step 505, which will be described later. The mode1 routine shown in FIG. 17 is executed to calculate the energized phase determination value Mptn for setting the energized phase during the F / B control start position stop holding process and the time-synchronized energized phase setting process.
[0067]
On the other hand, if it is determined in step 501 that the control mode determination value mode is not 1, the process proceeds to step 502 to determine whether or not the F / B permission flag Xfb = OFF (F / B control prohibited). When the F / B permission flag Xfb = ON (F / B control execution), this routine is terminated without performing the subsequent processing. In this case, energization phase setting and energization processing are executed by an F / B control routine shown in FIG.
[0068]
In this routine, when the control mode determination value mode = 1, the processing of step 505 (mode 1 routine in FIG. 17) is executed even during F / B control. Therefore, during F / B control, The F / B processing for setting the energized phase in synchronization with the A / B phase signal output timing of the encoder 46 by the F / B control routine of FIG. 22, and the time for setting the energized phase at a predetermined cycle by the mode 1 routine of FIG. The synchronous energized phase setting process is executed in parallel. As a result, even if the rotor 32 stops temporarily for some reason during the F / B control, the energized phase determination value Mptn is calculated by the time-synchronized energized phase setting process, and the rotor 32 rotates toward the target position. Driven.
[0069]
On the other hand, if it is determined in step 502 that the F / B permission flag Xfb = OFF (F / B control prohibited), the control mode determination value mode = 3 or 4 is set in steps 503 and 504. If the control mode determination value mode = 3 (target position stop holding process), the process proceeds from step 503 to step 506 to execute a mode 3 routine shown in FIG. An energized phase determination value Mptn for setting an energized phase at the time of executing the stop holding process is calculated.
[0070]
When the control mode determination value mode = 4 (reverse position stop holding process), the process proceeds from step 504 to step 507 to execute a mode 4 routine shown in FIG. An energized phase determination value Mptn for setting the phase is calculated.
[0071]
As described above, in the case of the control mode determination value mode = 1, 3 and 4, after calculating the energization phase determination value Mptn, the process proceeds to step 508, and an energization processing routine shown in FIG. Normal driving, target position stop holding processing, and reverse position stop holding processing are executed.
[0072]
On the other hand, if both of the above-mentioned steps 503 and 504 are determined as “No”, that is, if the control mode determination value mode = 0, 5, the process proceeds to step 508, and an energization processing routine shown in FIG. Run to turn off power or open loop control.
[0073]
[Mode1]
The mode1 routine shown in FIG. 17 is a subroutine started in step 505 of the time synchronous motor control routine of FIG. 16, and the energized phase determination value during the F / B control start position stop holding process and the time synchronized energized phase setting process. Mptn (energized phase) is set as follows.
[0074]
When this routine is started, first, in step 511, the energization time counter CT1 for counting the time of the F / B control start position stop holding process is counted up, and in the next step 512, the F / B control start position stop hold. It is determined whether or not the processing time CT1 exceeds a predetermined time (for example, 10 ms).
[0075]
If the time CT1 of the F / B control start position stop holding process does not exceed a predetermined time (for example, 10 ms), the process proceeds to step 513, and whether the energized phase stored flag Xhold = OFF (not stored) at the time of stop holding. (That is, whether or not it is the timing immediately before the start of the F / B control start position stop holding process), and if the stopped holding energized phase stored flag Xhold = OFF, the process proceeds to step 514, where F / B The energized phase determination value Mptn during the B control start position stop holding process is set to the current position counter value (Ncnt−Gcnt).
Mptn = Ncnt−Gcnt
[0076]
Here, the position counter value (Ncnt−Gcnt) is a value obtained by correcting the encoder count value Ncnt with the initial position deviation learning value Gcnt learned during initial driving, and is a value that accurately represents the current position of the rotor 32. ing.
[0077]
Thereafter, the process proceeds to step 515, where the energized phase determination value Mptn is divided by “12” to obtain the remainder Mptn% 12. Here, “12” corresponds to an increase / decrease amount of the encoder count value Ncnt (energized phase determination value Mptn) during one cycle of the energized phase. Based on the value of Mptn% 12, the energized phase is determined by the conversion table of FIG.
[0078]
In the next step 516, whether or not one-phase energization (U-phase energization, V-phase energization, W-phase energization) is performed depending on whether or not Mptn% 12 = 2, 3, 6, 7, 10, 11. If one-phase energization is determined, the process proceeds to step 517, where the energization phase determination value Mptn is increased by “2” corresponding to one step and two-phase energization (UV phase energization, VW phase energization, UW phase energization). ). This prevents the rotor 32 from vibrating near the F / B control start position by executing the F / B control start position stop holding process with the two-phase energization having a larger holding torque than the one-phase energization. The rotor 32 can be reliably stopped and held at the F / B control start position.
[0079]
In the next step 518, the energized phase stored flag Xhold = ON (stored) is set at the time of stopping and this routine is finished. Thereafter, when this routine is started, “No” is determined in Step 513, and the processing in Steps 514 to 518 is not executed. Thereby, the process of setting the energized phase determination value Mptn (energized phase) during the F / B control start position stop holding process is executed only once just before the start of the F / B control start position stop holding process.
[0080]
Thereafter, when the time CT1 of the F / B control start position stop holding process exceeds a predetermined time (for example, 10 ms), “Yes” is determined in step 512, and the F / B control start position stop holding process is ended. , Shift to F / B control. During the F / B control, every time this routine is started at a predetermined cycle (for example, 1 ms cycle), an energized phase setting routine shown in FIG. 23 described later is executed at step 519 to calculate an energized phase determination value Mptn. This process serves as second energized phase setting means in the claims. Note that the energized phase setting routine of FIG. 23 is also started in step 602 of the F / B control routine shown in FIG. Thereafter, the process proceeds to step 520, where the F / B permission flag Xfb = ON (F / B control execution) is set.
[0081]
In the control mode setting routine of FIGS. 11 to 13, when the difference (Acnt−Ncnt) between the target count value Acnt and the encoder count value Ncnt becomes equal to or smaller than a predetermined value by F / B control, the rotor 32 is moved to the target position. (F / B control end timing), the F / B permission flag Xfb = OFF is set, the F / B control is ended, and the control mode determination value mode = 3 (target position stop hold) Then, when a predetermined time (for example, 50 ms) elapses, the control mode determination value mode = 0 (energization off) is set (see the processing after step 419 in FIG. 13).
[0082]
Accordingly, since the mode 1 routine of FIG. 17 is not started after the F / B control is completed, the rotor 32 reaches the target position from the start of the F / B control in the setting of the energized phase by the time-synchronized energized phase setting process in step 519. (That is, until the F / B control is completed).
[0083]
FIG. 24 is a time chart illustrating a phase that is first energized when rotation is started from the UW phase. In this case, when starting normal rotation (rotation in the P range → NotP range direction), the energized phase determination value Mptn uses the encoder count value Ncnt, the initial misalignment learning value Gcnt, and the positive rotation direction phase advance amount K1. Is calculated by the following equation.
Mptn = Ncnt−Gcnt + K1
[0084]
Here, assuming that the forward rotation direction phase advance amount K1 is 4, for example, the energized phase determination value Mptn is calculated by the following equation.
Mptn = Ncnt−Gcnt + 4
When starting normal rotation from the UW phase, mod (Ncnt−Gcnt) is 4, so Mptn% 12 = 4 + 4 = 8, and the first energized phase is the UV phase.
[0085]
On the other hand, when reverse rotation (rotation in the NotP range → P range direction) is started from the UW phase, when the reverse rotation direction phase advance amount K2 is set to 3, for example, the energized phase determination value Mptn is calculated by the following equation. .
Mptn = Ncnt-Gcnt-K2 = Ncnt-Gcnt-3
When reverse rotation is started from the UW phase, Mptn% 12 = 4-3 = 1, and the first energized phase is the VW phase.
[0086]
Thus, by setting the forward rotation direction phase advance amount K1 and the reverse rotation direction phase advance amount K2 to 4 and 3, respectively, the switching pattern of the energized phases in the forward rotation direction and the reverse rotation direction can be made symmetric. In both cases of the forward rotation direction and the reverse rotation direction, the phase at a position shifted by two steps from the current position of the rotor 32 can be first excited to start rotation.
[0087]
[Mode3]
The mode3 routine shown in FIG. 18 is a subroutine started in step 506 of the time synchronous motor control routine of FIG. 16, and the energized phase determination value Mptn (energized phase) at the time of target position stop holding processing is set as follows. To do.
[0088]
When this routine is started, first, in step 531, the energization phase at the end of the F / B control is determined depending on whether or not Mptn% 12 = 2, 3, 6, 7, 10, 11 at the end of the F / B control. Is one-phase energization (U-phase energization, V-phase energization, W-phase energization), and if it is one-phase energization, the F / B control performed so far by the processing of steps 532 to 534 The energized phase determination value Mptn is increased or decreased by 2 in accordance with the rotation direction of the current, thereby changing to the two-phase energization of the next step of the one-phase energization.
[0089]
At this time, in step 532, the rotation direction is determined as follows. Immediately before entering this routine (at the end of F / B control), in step 426 of FIG. 13, the rotation direction instruction value D is set to 0 (stop). Cannot judge. Therefore, in this routine, attention is paid to the difference between the energized phase phase advance amounts K1 and K2 between the energized phase determination value Mptn at the end of the F / B control and the position count value (Ncnt−Gcnt). The rotational direction is determined as follows according to the magnitude relationship between the energized phase determination value Mptn at the end of the F / B control and the position count value (Ncnt−Gcnt).
[0090]
In the case of Mptn> Ncnt−Gcnt, it is determined that the rotation is normal (the rotation direction from the P range to the NotP range), the process proceeds to step 533, and the energized phase determination value Mptn is increased by 2, thereby correcting to the 2-phase energization. .
[0091]
On the other hand, in the case of Mptn <Ncnt−Gcnt, it is determined that the rotation is reverse (the rotation direction of the NotP range → P range), the process proceeds to step 534, and the energized phase determination value Mptn is decreased by 2 so that 2-phase energization is achieved. to correct.
In addition, when Mptn = Ncnt−Gcnt, it is determined to be stopped and the energized phase is not changed.
[0092]
As described above, the target position stop holding process is executed by two-phase energization having a holding torque larger than that of the one-phase energization, similarly to the F / B control start position stop holding process, so that the rotor 32 is near the target position. By preventing vibration, the rotor 32 can be reliably stopped and held at the target position.
[0093]
[Mode4]
The mode4 routine shown in FIG. 19 is a subroutine started in step 507 of the time synchronous motor control routine of FIG. 16, and the energized phase determination value Mptn (energized phase) during the reverse position stop holding process is set as follows. To do.
[0094]
When this routine is started, first, in step 541, the energization time counter CT4 for counting the time of the reverse position stop holding process is counted up. In the next step 542, the time CT4 of the reverse position stop holding process is set to a predetermined time ( For example, it is determined whether or not it exceeds 50 ms.
[0095]
If the reverse position stop holding processing time CT4 does not exceed a predetermined time (for example, 50 ms), the process proceeds to step 543, where the current value depends on whether Mptn% 12 = 2,3,6,7,10,11. It is determined whether or not the energized phase is one-phase energization (U-phase energization, V-phase energization, W-phase energization), and if it is one-phase energization, the processing of steps 544 to 546 has been performed until then. By increasing or decreasing the energization phase determination value Mptn by 2 in accordance with the rotation direction of the / B control, it is changed to 2-phase energization of the next step of the one-phase energization. The processing of steps 543 to 546 is the same as the processing of steps 531 to 534 of the mode 3 routine of FIG.
[0096]
As described above, the reverse position stop holding process is executed by two-phase energization having a larger holding torque than the one-phase energization, as in the F / B control start position stop holding process and the target position stop holding process. It is possible to prevent the rotor 32 from vibrating near the reversing position and to reliably stop and hold the rotor 32 at the reversing position.
[0097]
Thereafter, when the time CT4 of the reverse position stop holding process exceeds a predetermined time (for example, 50 ms), it is determined as “Yes” in Step 542, the reverse position stop holding process is ended, and the F / B control is restarted. . Thereby, first, in step 547, the count value (for example, 4 or 3) of the phase advance of the energized phase is added or subtracted to the energized phase determination value Mptn at the time of the reverse position stop holding process according to the rotation direction. The first energized phase determination value Mptn at the time of resumption of the F / B control is set, and thereby the rotation drive of the rotor 32 is started. Thereafter, the process proceeds to step 548, where the F / B permission flag Xfb = ON (F / B control execution), the energization time counter CT4 = 0, and the control mode determination value mode = 1 (normal drive) are set, and this routine is terminated. To do.
[0098]
[Energization processing]
The energization processing routine shown in FIG. 20 is a subroutine started in step 508 of the time synchronous motor control routine of FIG. This routine is also started in step 603 of the F / B control routine of FIG. 22 described later.
[0099]
When the energization processing routine of FIG. 20 is started, first, at step 551, it is determined whether or not the control mode determination value mode = 0 (energization off), and if the control mode determination value mode = 0 (energization off). In step 552, the energization of all phases of the SR motor 12 is turned off to enter the standby state.
[0100]
On the other hand, if “No” is determined in Step 551, the process proceeds to Step 553, where it is determined whether or not the control mode determination value mode = 5 (open loop control), and the control mode determination value mode = 5 ( If open loop control), the process proceeds to step 554 to execute open loop control. In this open loop control, when a failure of the encoder 46 or an abnormal operation of the SR motor 12 occurs, the energized phase is set, for example, by a time synchronization process with a cycle of 1 ms, and the rotor 32 is rotated to the target position.
[0101]
Further, when it is determined as “No” in the above steps 551 and 553, that is, the control mode determination value mode = 1, 3, 4 (normal drive, target position stop holding process, reverse position stop holding process). In this case, the process proceeds to step 555, where the energized phase is set according to the conversion table of FIG.
[0102]
[F / B control]
Next, processing contents of the F / B control routine shown in FIG. 22 will be described. This routine is executed by AB phase interruption processing, and when the F / B control execution condition is satisfied after the end of the initial drive, the rotational position of the rotor 32 (encoder count value Ncnt−Gcnt) is changed to the target position (target count value). The rotor 32 is rotated by switching the energized phase based on the encoder count value Ncnt and the initial misregistration learning value Gcnt until, for example, within 0.5 ° from (Acnt).
[0103]
When the F / B control routine of FIG. 22 is started, first, at step 601, whether or not the F / B permission flag Xfb is set to ON (whether or not the F / B control execution condition is satisfied) is determined. If the determination is made and the F / B permission flag Xfb is OFF (the F / B control execution condition is not established), this routine is terminated without performing the subsequent processing.
[0104]
On the other hand, if the F / B permission flag Xfb is set to ON, the process proceeds to step 602, and an energized phase setting routine shown in FIG. 23 described later is executed to determine the current encoder count value Ncnt and the initial position deviation learning value. Based on Gcnt, an energized phase is set (this process serves as the first energized phase setting means in the claims), and in the next step 603, the energization process routine of FIG. 20 is executed.
[0105]
[Energized phase setting]
The energization phase setting routine shown in FIG. 23 is a subroutine started in step 602 of the F / B control routine of FIG. 22 and step 519 of the mode1 routine of FIG. When this routine is started, first, in step 611, whether or not the rotation direction instruction value D for instructing the rotation direction to the target position is “1” indicating normal rotation (P range → NotP range rotation direction). Determine whether. As a result, if it is determined that the rotation direction instruction value D = 1 (forward rotation), the process proceeds to step 612, and whether or not the rotation direction of the rotor 32 has been reversed against the rotation direction instruction (the encoder count value Ncnt has decreased). If there is no reverse rotation, the process proceeds to step 613, using the current encoder count value Ncnt, initial position deviation learning value Gcnt, forward rotation direction phase advance amount K1, and speed phase advance correction amount Ks. The energized phase determination value Mptn is updated by the following equation.
Mptn = Ncnt−Gcnt + K1 + Ks
[0106]
Here, the positive rotation direction phase advance amount K1 is the phase advance amount of the energized phase necessary for normal rotation of the rotor 32 (the phase advance amount of the energized phase with respect to the current rotational phase of the rotor 32), for example, K1 = 4 is set.
[0107]
The speed phase advance correction amount Ks is a phase advance correction amount that is set according to the rotational speed of the rotor 32. For example, in the low speed range, the speed phase advance correction amount Ks is set to 0, and the speed increases. The speed phase advance correction amount Ks is increased to 1 or 2, for example. Thus, the energized phase determination value Mptn is corrected so that the energized phase is suitable for the rotational speed of the rotor 32.
[0108]
Furthermore, during F / B control, when shifting to deceleration control when the difference between the rotational position (encoder count value Ncnt) of the rotor 32 and the target position (target count value Acnt) is less than or equal to a predetermined value, a later-described diagram will be given. The speed phase advance correction amount Ks is set according to the rotational speed of the rotor 32 by the speed phase advance correction amount setting routine 26 during deceleration control.
[0109]
On the other hand, if it is determined in step 612 that the rotation direction of the rotor 32 is reversed against the rotation direction instruction, the energized phase determination value Mptn is not updated to prevent reverse rotation. In this case, the energization phase immediately before the reverse rotation (previous energization phase) is energized, and braking torque is generated in a direction that suppresses the reverse rotation of the rotor 32.
[0110]
If it is determined in step 611 that the rotation direction instruction value D = −1 (reverse rotation), that is, the rotation direction of the NotP range → P range, the process proceeds to step 614 where the rotation direction of the rotor 32 is determined as the rotation direction instruction. In contrast, it is determined whether or not the rotation has been reversed (whether or not the encoder count value Ncnt has increased). If the rotation has not been reversed, the process proceeds to step 615, where the current encoder count value Ncnt, the initial positional deviation learning value Gcnt, The energized phase determination value Mptn is updated by the following equation using the rotational direction phase advance amount K2 and the speed phase advance correction amount Ks.
Mptn = Ncnt-Gcnt-K2-Ks
[0111]
Here, the reverse rotation direction phase advance amount K2 is a phase advance amount of the energized phase necessary to reversely rotate the rotor 32 (phase advance amount of the energized phase with respect to the current rotation phase of the rotor 32), for example, K2 = 3 is set. The speed phase advance correction amount Ks is set in the same manner as in the case of forward rotation.
[0112]
On the other hand, if it is determined in step 614 that the rotation direction of the rotor 32 is reversed against the rotation direction instruction, the energized phase determination value Mptn is not updated to prevent reverse rotation. In this case, the energization phase immediately before the reverse rotation (previous energization phase) is energized, and braking torque is generated in a direction that suppresses the reverse rotation of the rotor 32.
[0113]
After determining the current energized phase determination value Mptn as described above, the energization processing routine of FIG. 20 is executed, and during the F / B control, the conversion table of FIG. The energized phase corresponding to% 12 is selected, and the windings 33 and 34 of the energized phase are energized.
[0114]
[Rotor speed calculation]
The rotor rotation speed calculation routine shown in FIG. 25 is executed by AB phase interruption processing, and calculates the rotation speed SP of the rotor 32 as follows. When this routine is started, first, at step 621, it is determined whether or not the F / B permission flag Xfb is ON (F / B control is being executed), and the F / B permission flag Xfb is OFF (F / B If the control is prohibited), the phase advance correction of the energized phase according to the rotational speed SP of the rotor 32 is not performed, so the process proceeds to step 624 to reset the stored values of the rotational speeds SP and SPa of the rotor 32, and this routine Exit.
[0115]
On the other hand, if the F / B permission flag Xfb is ON (F / B control is being executed), the rotational speed SP of the rotor 32 is calculated as follows. First, in step 622, the time interval ΔT (n) between the rising and falling edges of the A phase signal and the B phase signal of the encoder 46 (that is, the time interval at which the encoder count value increases or decreases) is measured, and the time interval ΔT is measured. The average value ΔTav for the past N times of (n) is calculated. Then, the rotational speed calculation value SPa is calculated by the following equation.
SPa = 60 / (ΔTav × Kp) [rpm]
[0116]
Here, Kp is the number of time intervals ΔT (n) per rotation of the rotor 32 (amount of change in the encoder count value per rotation of the rotor 32). In the case of the encoder 46 configured as shown in FIG. Kp = 96. ΔTav × Kp is the time [sec] required for the rotor 32 to make one rotation.
[0117]
Thereafter, the process proceeds to step 623, and the rotational speed SP of the rotor 32 is obtained by subjecting the rotational speed SP to the following equation using the rotational speed calculation value SPa.
SP (i) = SP (i-1) + {SPa-SP (i-1)} / R
Here, SP (i) is the current rotational speed, SP (i-1) is the previous rotational speed, and R is the smoothing coefficient.
[0118]
[Speed phase advance correction amount setting during deceleration control]
26 is started at a predetermined cycle (for example, 1 ms cycle), and the speed phase advance correction amount Ks is set as follows according to the rotational speed SP of the rotor 32 during the deceleration control. To set.
[0119]
When this routine is started, first, in step 701, the rotor 32 determines whether the absolute value | Acnt−Ncnt | of the difference between the target count value Acnt and the encoder count value Ncnt is smaller than a predetermined value (for example, 100). It is determined whether or not the rotational position has approached the target position (whether or not the vehicle has entered a deceleration control region for stopping). As a result, if it is determined that | Acnt−Ncnt | is equal to or greater than a predetermined value (that is, not in the deceleration control region), this routine is terminated without performing the subsequent processing.
[0120]
On the other hand, if | Acnt−Ncnt | is smaller than the predetermined value, it is determined as a deceleration control region, and the speed phase advance correction amount Ks is set to the following value according to the rotational speed SP of the rotor 32 by the processing of Steps 702 to 706. Set as follows. First, in steps 702 and 703, it is determined whether the current rotational speed SP of the rotor 32 corresponds to a high speed region (for example, 1500 rpm or more), a medium speed region (for example, 1500 to 500 rpm), or a low speed region (for example, 500 rpm or less). If it is in the high speed region (for example, 1500 rpm or more), the process proceeds to step 704, and the speed phase advance correction amount Ks at the time of deceleration control is set to, for example, -2, and if it is the medium speed region (for example, 1500 to 500 rpm), If the speed phase advance correction amount Ks at the time of deceleration control is set to −1, for example, and it is a low speed region (for example, 500 rpm or less), the process proceeds to step 706 and the speed phase advance correction amount Ks at the time of deceleration control is set to 0, for example. Set to. Thus, during the deceleration control, the absolute value of the speed phase advance correction amount Ks decreases as the rotational speed SP of the rotor 32 decreases from the high speed region to the medium speed region to the low speed region, and the braking force that acts on the rotor 32. Becomes smaller.
[0121]
Thereafter, the process proceeds to step 707, where it is determined whether or not the deceleration of the rotor 32 is delayed. Specifically, the absolute value | Acnt−Ncnt | of the difference between the target count value Acnt and the encoder count value Ncnt is smaller than, for example, 50 (that is, the current rotational position of the rotor 32 is very close to the target position). However, if the rotational speed SP of the rotor 32 is in a high speed region (for example, 1500 rpm or more), it is determined that the deceleration of the rotor 32 is delayed, and the process proceeds to step 708 to advance the speed phase during deceleration control. For example, the correction amount Ks is set to -3, the braking force applied to the rotor 32 is increased to the maximum, and the rotational speed SP of the rotor 32 is rapidly decreased. This prevents the rotor 32 from overshooting beyond the target position due to inertia.
[0122]
In the present embodiment described above, the shift to the deceleration control is performed when the difference between the rotational position (encoder count value) of the rotor 32 and the target position (target count value) becomes a predetermined value or less during the F / B control. Since the speed phase advance correction amount Ks with respect to the phase advance amount of the energized phase is set according to the rotational speed of the rotor 32, the braking force applied to the rotor 32 is appropriately set according to the rotational speed of the rotor 32. By changing, the rotor 32 can be smoothly decelerated toward the target position. As a result, it is possible to prevent the rotor 32 from overshooting beyond the target position due to inertia at the end of the F / B control, and to stop the rotor 32 at the target position with high accuracy. This makes it possible to achieve both higher rotation speed and improved stop position accuracy.
[0123]
Moreover, in this embodiment, the speed phase advance correction amount Ks is set in consideration of the rotation angle from the current position of the rotor 32 to the target position in addition to the rotation speed of the rotor 32 during deceleration control. Even if the deceleration of the rotor 32 is delayed due to some reason, the braking force applied to the rotor 32 can be increased before the target position to reliably decelerate the rotor 32, and the rotor 32 can be accurately targeted. Can be stopped in position.
[0124]
Furthermore, in the present embodiment, the time-synchronized energized phase setting process for setting the energized phase based on the encoder count value at a predetermined cycle (for example, 1 ms cycle) from the start of the F / B control until the rotor 32 is rotationally driven to the target position. Is executed in parallel with the F / B control. During the deceleration control, the rotation of the rotor 32 is temporarily stopped for some reason, and the A phase / B phase signal is not output from the encoder 46. Even in this case, the energized phase can be set based on the encoder count value at that time by the time-synchronized energized phase setting process, and the rotor 32 can be rotated to the target position as much as possible. / B control (range switching control) reliability can be improved.
[0125]
In this embodiment, the time-synchronized energized phase setting process is performed over the entire period from the start of the F / B control until the rotor 32 is rotationally driven to the target position, so the rotor 32 stops at any timing. However, the energized phase can be set without delay immediately after the rotor 32 is stopped by the time-synchronized energized phase setting process, and there is an advantage that the stop time of the rotor 32 can be shortened.
[0126]
However, the time-synchronized energized phase setting process may be executed after the rotational speed of the rotor 32 has dropped below a predetermined value. In this way, the time-synchronized energized phase setting process only needs to be executed when the rotational speed of the rotor 32 is reduced to a rotational speed at which the rotor 32 may be temporarily stopped, so that the calculation load of the CPU of the ECU 41 can be reduced. There is.
[0127]
Alternatively, the time-synchronized energized phase setting process may be executed only when the rotor 32 is stopped during the deceleration control. Of course, it goes without saying that the present invention can be applied even when the energized phase is set only by the F / B control without performing the time-synchronized energized phase setting process.
[0128]
In this embodiment, during the F / B control, the driving is performed by the 1-2 phase excitation method in which the one-phase energization and the two-phase energization are alternately switched. However, the one-phase excitation that is driven only by the one-phase energization. Alternatively, a two-phase excitation method that drives only by two-phase energization may be employed.
[0129]
The encoder used in the present invention is not limited to the magnetic encoder 46, and for example, an optical encoder or a brush encoder may be used.
Further, the motor used in the present invention is not limited to the SR motor 12, but is a brushless type motor that detects the rotational position of the rotor based on the count value of the output signal of the encoder and sequentially switches the energized phase of the motor. A brushless motor other than the SR motor may be used.
[0130]
In addition, the range switching device of the present embodiment is configured to switch between two ranges of the P range and the NotP range. For example, the range switching valve and the manual valve of the automatic transmission are interlocked with the turning operation of the detent lever 15. The present invention can also be applied to a range switching device that switches each range of P, R, N, D, etc. of the automatic transmission by switching the.
[0131]
In addition, the present invention is not limited to the range switching device, and it goes without saying that the present invention can be applied to various devices using a brushless type motor such as an SR motor as a drive source.
[Brief description of the drawings]
FIG. 1 is a perspective view of a range switching device showing an embodiment of the present invention.
FIG. 2 is a diagram illustrating the configuration of an SR motor
FIG. 3 is a circuit diagram showing a circuit configuration for driving an SR motor.
FIG. 4 is a diagram schematically showing the configuration of the entire control system of the range switching device.
FIG. 5 is a plan view illustrating the configuration of a rotary magnet of an encoder
FIG. 6 is a side view of the encoder.
7A is a time chart showing an output waveform of an encoder, and FIG. 7B is a time chart showing an energized phase switching pattern.
FIG. 8 is a flowchart showing a flow of processing of an encoder counter routine.
FIG. 9 is a diagram showing an example of a count-up value ΔN calculation map
FIG. 10 is a time chart showing the relationship between command range shift, phase A signal, phase B signal, and encoder count value.
FIG. 11 is a flowchart showing the flow of processing of a control mode setting routine (part 1).
FIG. 12 is a flowchart showing a flow of processing of a control mode setting routine (part 2).
FIG. 13 is a flowchart (No. 3) showing the flow of processing of a control mode setting routine.
FIG. 14 is a time chart for explaining the timing for shifting from F / B control to target position stop holding processing;
FIG. 15 is a time chart showing an example of control of an SR motor.
FIG. 16 is a flowchart showing a flow of processing of a time synchronous motor control routine.
FIG. 17 is a flowchart showing a process flow of a mode1 routine.
FIG. 18 is a flowchart showing a process flow of a mode3 routine.
FIG. 19 is a flowchart showing a process flow of a mode4 routine.
FIG. 20 is a flowchart showing a flow of processing of an energization processing routine.
FIG. 21 is a diagram showing an example of a conversion table from Mptn% 12 to energized phase in the case of the 1-2 phase excitation method;
FIG. 22 is a flowchart showing the flow of processing of an F / B control routine.
FIG. 23 is a flowchart showing a flow of processing of an energized phase setting routine.
FIG. 24 is a time chart for explaining energization processing when rotation is started from the UW phase.
FIG. 25 is a flowchart showing a processing flow of a rotor rotation speed calculation routine.
FIG. 26 is a flowchart showing the flow of processing of a speed phase advance correction amount setting routine during deceleration control.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 11 ... Range switching mechanism, 12 ... SR motor, 14 ... Output shaft sensor, 15 ... Detent lever, 18 ... Parking rod, 20 ... Parking gear, 21 ... Lock lever, 23 ... Detent spring, 24 ... P range holding recessed part, 25 ... NotP range holding recess, 26 ... deceleration mechanism, 27 ... automatic transmission, 31 ... stator, 32 ... rotor, 33,34 ... winding, 35,36 ... motor excitation part, 37,38 ... motor driver, 41 ... ECU (Control means, first energized phase setting means, second energized phase setting means), 43 ... P range switch, 44 ... NotP range switch, 46 ... encoder, 47 ... rotary magnet, 48 ... magnetic for A phase signal Detection element, 49... Magnetic detection element for B phase signal, 50... Magnetic detection element for Z phase signal.

Claims (6)

制御対象を回転駆動するモータのロータの回転に同期してパルス信号を出力するエンコーダと、このエンコーダの出力信号のカウント値(以下「エンコーダカウント値」という)に基づいて前記ロータの回転位置を検出して前記モータの通電相を順次切り換えることで前記ロータを目標位置まで回転駆動する制御手段とを備えたモータ制御装置において、
前記制御手段は、前記ロータの減速制御時に前記ロータの回転速度に応じて前記ロータの回転位相に対する通電相の位相進み量を補正することを特徴とするモータ制御装置。
Rotation position of the rotor is detected based on an encoder that outputs a pulse signal in synchronization with the rotation of the rotor of the motor that rotates the controlled object, and the count value (hereinafter referred to as “encoder count value”) of the output signal of this encoder And a motor control device comprising control means for rotating the rotor to a target position by sequentially switching the energization phase of the motor,
The motor control device according to claim 1, wherein the control unit corrects a phase advance amount of the energized phase with respect to a rotation phase of the rotor in accordance with a rotation speed of the rotor during deceleration control of the rotor.
前記制御手段は、前記ロータの減速制御時に前記ロータの回転速度が低下するに従って、前記ロータに作用させる制動力を小さくする方向に前記通電相の位相進み量を補正することを特徴とする請求項1に記載のモータ制御装置。The control means corrects the phase advance amount of the energized phase in a direction to reduce the braking force applied to the rotor as the rotational speed of the rotor decreases during deceleration control of the rotor. The motor control device according to 1. 前記制御手段は、前記ロータの減速制御時に前記ロータの回転速度の他に、前記ロータの現在位置から前記目標位置までの回転角も考慮して前記通電相の位相進み量を補正することを特徴とする請求項1又は2に記載のモータ制御装置。The control means corrects the phase advance amount of the energized phase in consideration of the rotation angle from the current position of the rotor to the target position in addition to the rotation speed of the rotor during deceleration control of the rotor. The motor control device according to claim 1 or 2. 前記制御手段は、前記モータの駆動制御中に前記エンコーダのパルス信号出力タイミングに同期して前記エンコーダカウント値に基づいて通電相を設定する第1の通電相設定手段と、前記ロータが前記目標位置に回転駆動されるまで所定周期で前記エンコーダカウント値に基づいて通電相を設定する第2の通電相設定手段とを備え、前記第1及び第2の各通電相設定手段によって通電相を設定する際に、前記ロータの回転速度に応じて前記通電相の位相進み量を補正することを特徴とする請求項1乃至3のいずれかに記載のモータ制御装置。The control means includes first energization phase setting means for setting an energization phase based on the encoder count value in synchronization with a pulse signal output timing of the encoder during drive control of the motor; And a second energized phase setting means for setting the energized phase based on the encoder count value at a predetermined period until it is driven to rotate, and the energized phase is set by the first and second energized phase setting means. 4. The motor control device according to claim 1, wherein a phase advance amount of the energized phase is corrected in accordance with a rotational speed of the rotor. 前記モータは、スイッチトリラクタンスモータであることを特徴とする請求項1乃至4のいずれかに記載のモータ制御装置。The motor control device according to claim 1, wherein the motor is a switched reluctance motor. 前記モータは、車両の自動変速機のレンジを切り換えるレンジ切換機構を駆動することを特徴とする請求項1乃至5のいずれかに記載のモータ制御装置。6. The motor control device according to claim 1, wherein the motor drives a range switching mechanism that switches a range of an automatic transmission of the vehicle.
JP2002293271A 2002-10-07 2002-10-07 Motor control device Expired - Fee Related JP3888278B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2002293271A JP3888278B2 (en) 2002-10-07 2002-10-07 Motor control device
US10/674,472 US7161314B2 (en) 2002-10-07 2003-10-01 Motor control apparatus having current supply phase correction
US11/226,388 US7005814B2 (en) 2002-10-07 2005-09-15 Motor control apparatus having current supply phase correction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002293271A JP3888278B2 (en) 2002-10-07 2002-10-07 Motor control device

Publications (2)

Publication Number Publication Date
JP2004129452A true JP2004129452A (en) 2004-04-22
JP3888278B2 JP3888278B2 (en) 2007-02-28

Family

ID=32284231

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002293271A Expired - Fee Related JP3888278B2 (en) 2002-10-07 2002-10-07 Motor control device

Country Status (1)

Country Link
JP (1) JP3888278B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9602033B2 (en) 2013-07-19 2017-03-21 Canon Kabushiki Kaisha Motor control apparatus, motor-driven apparatus, method of controlling motor and non-transitory computer-readable recording medium storing a computer program
JP2020061869A (en) * 2018-10-10 2020-04-16 株式会社デンソー Shift range control device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5789952B2 (en) * 2010-10-21 2015-10-07 株式会社デンソー Motor control device
KR101402894B1 (en) * 2013-02-15 2014-06-03 주식회사 자이벡 Apparatus and method of controlling wound-rotor induction motor in reversing phase brake

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9602033B2 (en) 2013-07-19 2017-03-21 Canon Kabushiki Kaisha Motor control apparatus, motor-driven apparatus, method of controlling motor and non-transitory computer-readable recording medium storing a computer program
JP2020061869A (en) * 2018-10-10 2020-04-16 株式会社デンソー Shift range control device
WO2020075765A1 (en) * 2018-10-10 2020-04-16 株式会社デンソー Shift range control device
JP7021045B2 (en) 2018-10-10 2022-02-16 株式会社デンソー Shift range controller

Also Published As

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

Similar Documents

Publication Publication Date Title
US7005814B2 (en) Motor control apparatus having current supply phase correction
US6992451B2 (en) Motor control apparatus operable in fail-safe mode
JP5454962B2 (en) Motor control device
JP4936069B2 (en) Motor control device
JP5789952B2 (en) Motor control device
JP5093624B2 (en) Motor control device
JP3886042B2 (en) Motor control device
JP2007336611A (en) Control device of synchronous motor
JP3849864B2 (en) Motor control device
JP3800529B2 (en) Motor control device
JP3849930B2 (en) Motor control device
JP2004023890A (en) Motor controller
JP4082164B2 (en) Motor control device
JP4189953B2 (en) Position switching control device
JP3849931B2 (en) Motor control device
JP3947922B2 (en) Motor control device
JP3871130B2 (en) Motor control device
JP6547663B2 (en) Control device
JP3849627B2 (en) Motor control device
JP3888278B2 (en) Motor control device
JP3888940B2 (en) Motor control device
JP3800532B2 (en) Motor control device
JP3849629B2 (en) Motor control device
JP2004023889A (en) Motor controller
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: 20060804

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060808

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061120

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3888278

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101208

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111208

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121208

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131208

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees