JP2013172602A - Motor control device and motor control method - Google Patents
Motor control device and motor control method Download PDFInfo
- Publication number
- JP2013172602A JP2013172602A JP2012036207A JP2012036207A JP2013172602A JP 2013172602 A JP2013172602 A JP 2013172602A JP 2012036207 A JP2012036207 A JP 2012036207A JP 2012036207 A JP2012036207 A JP 2012036207A JP 2013172602 A JP2013172602 A JP 2013172602A
- Authority
- JP
- Japan
- Prior art keywords
- data
- electrical angle
- angle data
- equal
- mechanical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Control Of Electric Motors In General (AREA)
- Control Of Motors That Do Not Use Commutators (AREA)
Abstract
Description
本発明は、検出されたモータ電流値とこの電流検出時の電気角データに応じた正余弦波データとに応じてモータを駆動制御するモータ制御装置およびモータ制御方法に関するものである。 The present invention relates to a motor control device and a motor control method for driving and controlling a motor according to a detected motor current value and positive cosine wave data corresponding to electrical angle data at the time of detecting the current.
従来、モータ制御装置は、検出されたモータ電流値とこの電流検出時の電気角データに応じた正余弦波データとに応じてモータを駆動制御する。この駆動制御では、モータ制御装置は、例えば、ブラシレスモータに直結したエンコーダのカウント値(機械角)から電気角データを算出し、算出した電気角データを正余弦波データが格納された正弦波テーブルのアドレスとして入力することで、上記電気角データに応じた正余弦波データを取得する。 Conventionally, a motor control device drives and controls a motor according to a detected motor current value and positive cosine wave data corresponding to electrical angle data at the time of detecting the current. In this drive control, for example, the motor control device calculates electrical angle data from a count value (mechanical angle) of an encoder directly connected to the brushless motor, and the calculated electrical angle data is stored in a sine wave table in which cosine wave data is stored. As a result, the cosine wave data corresponding to the electrical angle data is acquired.
ところで、規定の極対数のモータのみを制御対象とする場合には、電気角データを算出する電気角算出ブロックと算出した電気角データに応じた正余弦波データを取得するための正弦波テーブルとが、上記規定の極対数に対応して1種類用意される。しかしながら、モータのバージョンアップ等を想定して異なる極対数のモータをも制御対象として汎用性を高めるためには、極対数ごとに電気角算出ブロックおよび正弦波テーブルが必要になるという問題がある。特に、電気角算出ブロックや正弦波テーブルの種類が多くなると、必要な回路が多くなり回路規模が大きくなってしまう。 By the way, when only a motor having a specified number of pole pairs is to be controlled, an electrical angle calculation block for calculating electrical angle data, and a sine wave table for obtaining positive cosine wave data corresponding to the calculated electrical angle data, However, one type is prepared corresponding to the number of pole pairs specified above. However, there is a problem that an electrical angle calculation block and a sine wave table are required for each number of pole pairs in order to improve versatility by controlling motors with different pole pairs, assuming motor version upgrades and the like. In particular, when the types of electrical angle calculation blocks and sine wave tables increase, the number of necessary circuits increases and the circuit scale increases.
そこで、汎用性を高めるモータ制御装置として、上記特許文献1に開示されるデジタルACサーボ装置が知られている。このデジタルACサーボ装置では、カウンタブロックは、各カウンタのカウンタリミット値に応じて、基本三角波f(x)の振幅1/(2i−1)倍かつ周波数(2i−1)の三角波を出力する。そして、このカウンタブロックの各カウンタの出力に、ゲイン乗算ブロックで、この三角波の振幅の1/(2i−1)倍する。次に、加減算ブロックでN個の三角波の値を高調波成分が0になるように加減算することにより、正弦波データを算出する。すなわち、複数の三角波カウンタブロック、ゲイン乗算ブロックおよび加減算ブロックを用いることで、複数のカウンタからなる三角波を合成して、正弦波データが生成される。この構成では、極対数に応じてカウンタリミットを設定しなおすことで、同一の正弦波テーブルを各極対数のモータ制御にて使用することができる。
Therefore, a digital AC servo device disclosed in
しかしながら、複数の三角波を合成して正弦波データを生成するため、正弦波データの精度が低くなってしまう。このように正弦波データの精度が低くなると、この正弦波データを用いたモータ制御の効率悪化等を招いてしまうという問題がある。 However, since the sine wave data is generated by combining a plurality of triangular waves, the accuracy of the sine wave data is lowered. As described above, when the accuracy of the sine wave data is lowered, there is a problem that the efficiency of the motor control using the sine wave data is deteriorated.
本発明は、上述した課題を解決するためになされたものであり、その目的とするところは、回路規模の増大を招くことなく汎用性を高め得るモータ制御装置およびモータ制御方法を提供することにある。 The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a motor control device and a motor control method capable of enhancing versatility without causing an increase in circuit scale. is there.
上記目的を達成するため、特許請求の範囲の請求項1に記載のモータ制御装置は、極対数(Pn)が1〜2n(nは正数)のモータ(1)を、検出されたモータ電流値とこの電流検出時の電気角データ(θe)に応じた正余弦波データとに応じて駆動制御するモータ制御装置(10)であって、制御対象のモータの前記極対数と電気角の一周期に対応する電気角一周期データ(Te)とを取得する取得手段(11)と、前記モータの機械角に対応する機械角データ(θm)を検出する機械角データ検出手段(11,2,14)と、前記機械角データ検出手段により検出された前記機械角データに基づいて前記電気角データを設定する電気角データ設定手段(11,15)と、前記電気角データ設定手段により設定された前記電気角データに基づいて前記正余弦波データを設定する正余弦波データ設定手段(11,16)と、を備え、前記電気角データ設定手段は、前記機械角データ検出手段により検出された前記機械角データが前記電気角一周期データに2n−1を乗算した値以上であるか否かを判定して、否定判定時に前記機械角データに等しくなるように1番目の仮電気角データ(θe1)を設定し、肯定判定時に前記機械角データから前記電気角一周期データに2n−1を乗算した値を減算した値に等しくなるように1番目の仮電気角データ(θe1)を設定する第1仮電気角データ設定手段(11,15)と、k−1番目の仮電気角データが前記電気角一周期データに2n−kを乗算した値以上であるか否かを判定して、否定判定時にk−1番目の仮電気角データ(θek−1)に等しくなるようにk番目の仮電気角データ(θek)を設定し、肯定判定時にk−1番目の仮電気角データ(θek−1)から前記電気角一周期データに2n−kを乗算した値を減算した値に等しくなるようにk番目の仮電気角データ(θek)を設定する処理を、kが2からnまで繰り返す第2仮電気角データ設定手段(11,15)と、を備え、前記電気角データを前記n番目の仮電気角データに等しくなるように設定することを特徴とする。
なお、特許請求の範囲および上記手段の括弧内の符号は、後述する実施形態に記載の具体的手段との対応関係の一例を示すものである。
In order to achieve the above object, a motor control device according to
In addition, the code | symbol in the parenthesis of a claim and the said means shows an example of a corresponding relationship with the specific means as described in embodiment mentioned later.
請求項1,4の発明では、機械角データが電気角一周期データに2n−1を乗算した値以上であるか否かが判定されて、否定判定時に機械角データに等しくなるように1番目の仮電気角データが設定され、肯定判定時に機械角データから電気角一周期データに2n−1を乗算した値を減算した値に等しくなるように1番目の仮電気角データが設定される。そして、k−1番目の仮電気角データが電気角一周期データに2n−kを乗算した値以上であるか否かが判定されて、否定判定時にk−1番目の仮電気角データに等しくなるようにk番目の仮電気角データが設定され、肯定判定時にk−1番目の仮電気角データから電気角一周期データに2n−kを乗算した値を減算した値に等しくなるようにk番目の仮電気角データを設定する処理が、kが2からnまで繰り返される。そして、電気角データがn番目の仮電気角データに等しくなるように設定され、この電気角データに基づいて正余弦波データが設定される。
According to the first and fourth aspects of the present invention, it is determined whether or not the mechanical angle data is equal to or greater than the value obtained by multiplying the electrical angle one period data by 2 n−1, and 1 is set so as to be equal to the mechanical angle data when a negative determination is made. The first temporary electrical angle data is set, and the first temporary electrical angle data is set to be equal to a value obtained by subtracting the value obtained by multiplying the mechanical angle data by 2 n-1 from the mechanical angle data at the time of affirmative determination. The Then, it is determined whether or not the (k−1) th temporary electrical angle data is equal to or greater than a value obtained by multiplying the
これにより、極対数ごとに電気角データを算出する電気角算出ブロックを採用することなく、極対数が1〜2nであればどのような極対数であっても電気角データを算出することができる。特に、乗算ブロックのような規模が大きくなる回路を用いる必要もないので、回路規模を小さくすることができる。また、複数の三角波を合成して正余弦波データを作成することもないので、正余弦波データの精度が低下することもない。
したがって、回路規模の増大を招くことなく汎用性を高めることができる。
Thus, the electrical angle data can be calculated for any number of pole pairs as long as the number of pole pairs is 1 to 2 n , without employing an electrical angle calculation block for calculating electrical angle data for each number of pole pairs. it can. In particular, since it is not necessary to use a circuit having a large scale such as a multiplication block, the circuit scale can be reduced. In addition, since the positive cosine wave data is not created by combining a plurality of triangular waves, the accuracy of the positive cosine wave data is not lowered.
Therefore, versatility can be improved without increasing the circuit scale.
請求項2,5の発明では、電気角データは、2進数のデータであって、極対数が2n−m(mは0またはn以下の正数)である場合の電気角データと正余弦波データとの関係を示すテーブルが設けられている。そして、極対数がPnである場合に電気角データの桁のシフトと加減算とを用いることで当該電気角データにPn/2n−mを積算した正規化電気角データが算出され、この正規化電気角データに基づいて上記テーブルから正余弦波データが設定される。
ここで、正規化電気角データとは、算出された電気角データに対して、その極対数Pn/2n−mを乗算することで、極対数が2n−mに対応するテーブルを共通して使用できるように正規化されたデータである。
According to the second and fifth aspects of the present invention, the electrical angle data is binary data, and the electrical angle data and the positive cosine when the number of pole pairs is 2 nm (m is a positive number equal to or less than n). A table showing the relationship with the wave data is provided. Then, when the number of pole pairs is Pn, normalized electrical angle data obtained by adding Pn / 2 nm to the electrical angle data is calculated by using digit shift and addition / subtraction of the electrical angle data, and this normalization is performed. Positive cosine wave data is set from the table based on the electrical angle data.
Here, the normalized electrical angle data is a common table corresponding to the number of pole pairs of 2 nm , by multiplying the calculated electrical angle data by the number of pole pairs Pn / 2 nm. This data is normalized so that it can be used.
例えば、n=3,m=1であり1〜8の極対数のモータが制御対象であって、極対数Pnが2であるモータを制御する場合に、電気角データを1桁右シフトすることで、当該電気角データに2/2n−m、すなわち2/4を積算した正規化電気角データが算出される。また、例えば、極対数Pnが5であるモータを制御する場合に、電気角データを2桁右シフトしたものに当該電気角データを加算することで、当該電気角データに5/2n−m、すなわち(1+4)/4を積算した正規化電気角データが算出される。また、例えば、極対数Pnが7であるモータを制御する場合に、電気角データを1桁左シフトしたものから電気角データを2桁右シフトしたものを減算することで、当該電気角データに7/2n−m、すなわち(8−1)/4を積算した正規化電気角データが算出される。 For example, when controlling a motor having n = 3, m = 1 and a pole pair number of 1 to 8 and having a pole pair number Pn of 2, the electrical angle data is shifted to the right by one digit. Thus, normalized electrical angle data obtained by adding 2/2 nm , that is, 2/4, to the electrical angle data is calculated. Further, for example, when controlling a motor having a pole pair number Pn of 5, 5/2 nm is added to the electrical angle data by adding the electrical angle data to the right-shifted electrical angle data by 2 digits. That is, normalized electrical angle data obtained by integrating (1 + 4) / 4 is calculated. Also, for example, when controlling a motor having a pole pair number Pn of 7, the electrical angle data is shifted by 1 digit to the left by subtracting the electrical angle data shifted by 2 digits to the electrical angle data. 7/2 nm , that is, normalized electrical angle data obtained by integrating (8-1) / 4 is calculated.
ここで、右シフトとは、2進数の数値を2α(αは正数)で除算する計算手法であり、2進数で「1000」を1桁右シフトすると「0100」となり、2で除算した結果と等しくなり、2進数で「1000」を2桁右シフトすると「0010」となり、22で除算した結果と等しくなる。また、左シフトとは、2進数の数値に2αを乗算する計算手法であり、2進数で「0100」を1桁左シフトすると「1000」となり、2を乗算した結果と等しくなる。すなわち、上述したシフトを用いる計算手法により、乗算器や減算器を用いることなく回路における信号線の接続状態のみで、正規化電気角データが算出されるため、回路規模の増大を招くことなく共通のテーブルの使用が可能となり、さらなる回路の小型化を図ることができる。 Here, right shift is a calculation method of dividing a binary number by 2 α (α is a positive number), and when “1000” is shifted right by one digit to “0100”, it is divided by 2. results and equal, when two digits right shift to "1000" in binary number "0010", and equal to the result of dividing by 2 2. Also, the left shift, a calculation method of multiplying 2 alpha to binary numbers, when 1 Ketahidari shifted to "0100" in a binary number "1000", and equal to 2 result of multiplying. In other words, the normalized electrical angle data is calculated only by the connection state of the signal lines in the circuit without using a multiplier or a subtracter by the calculation method using the shift described above, so that it does not increase the circuit scale. The table can be used, and the circuit can be further reduced in size.
請求項3,6の発明では、機械角一周期データが特定の機械角一周期データに対して2x(xは整数)を乗算したデータとなるモータが制御対象であり、上記テーブルは、上記特定の機械角一周期データに基づいて設定される。そして、上述のように設定された電気角データの桁のシフトを用いることで当該電気角データを2xで除算し、この除算された電気角データを用いて正余弦波データが設定される。 According to the third and sixth aspects of the invention, a motor whose mechanical angle / cycle data is data obtained by multiplying specific mechanical angle / cycle data by 2 x (x is an integer) is a control target, and the table includes the table It is set based on specific mechanical angle data. Then, the electrical angle data is divided by 2 x by using the shift digit of the electrical angle data set as described above, positive cosine wave data is set using the division is the electrical angle data.
これにより、機械角一周期データが特定の機械角一周期データに対して2xで異なるモータが制御対象であっても、共通のテーブルを使用して正余弦波データを設定することができる。特に、上述したシフトを用いる計算手法により、複数の機械角一周期データのモータを制御対象とすることに起因する回路規模の増大を抑制することができる。 As a result, even if a motor whose mechanical angle / cycle data is different from the specific mechanical angle / cycle data by 2 × is controlled, positive cosine wave data can be set using a common table. In particular, by the calculation method using the shift described above, it is possible to suppress an increase in circuit scale resulting from the control of a motor having a plurality of mechanical angle / cycle data.
[第1実施形態]
以下、本発明の第1実施形態に係るモータ制御装置およびモータ制御方法について、図面を参照して説明する。
図1に示すモータ制御装置10は、極対数が1〜2n(nは正数)、具体的には、例えば、極対数が1〜8のブラシレスモータ1が制御対象であって、当該ブラシレスモータ1を、検出されたモータ電流値とこの電流検出時の電気角データに応じた正余弦波データとに応じて駆動制御する装置である。このモータ制御装置10は、ブラシレスモータ1に直結したエンコーダ2のカウント値(機械角)を取得すると、後述する正余弦波データ算出処理により、電気角データを算出しこの算出した電気角データを正余弦波データが格納された正弦波テーブル(正弦波マップ)のアドレスとして入力することで、正余弦波データを算出する。なお、エンコーダ2、カウンタ・ラッチ回路14は、特許請求の範囲に記載の「機械角データ検出手段」の一例に相当し得る。
[First Embodiment]
Hereinafter, a motor control device and a motor control method according to a first embodiment of the present invention will be described with reference to the drawings.
The
モータ制御装置10は、全体的制御を司る制御コントローラ11と、ブラシレスモータ1のモータ電流を検出する電流検出器12と、A/Dコンバータ13とを備えている。ブラシレスモータ1のモータ電流は、電流検出器2により電圧変換され、A/Dコンバータ3でデジタル量に変換されて、モータ電流データIu,Iv,Iwとして制御コントローラ11に取り込まれる。
The
また、この電流取り込みタイミングとは独立した制御コントローラ11の制御周期に同期して、エンコーダ2より出力されるブラシレスモータ1の回転量に応じたエンコーダパルスが機械角データθmとしてカウンタ・ラッチ回路14に取り込まれる。そして、電気角算出ブロック15にて、取り込まれたエンコーダパルス値に応じたブラシレスモータ1の電気角データθeが出力されると、例えば、極対数Pnが4である場合の正余弦波データが格納されている正弦波テーブル16により、入力される電気角データθeに対応した正余弦波データが制御コントローラ11に出力される。なお、エンコーダ2からのエンコーダパルスは、上記電流取り込みタイミングと同期して、機械角データθmとしてカウンタ・ラッチ回路14に取り込まれてもよい。
Further, in synchronization with the control cycle of the
制御コントローラ11では、上記に示したそれぞれのタイミングで読み込まれた電気角データθeに対応した正余弦波データと、モータ電流データIu,Iv,Iwとより、2相3相変換し、モータ無効効率成分であるd軸電流値と、モータ有効効率成分であるq軸電流値とを算出する。そして、これら実際の電流値と、制御コントローラ4内で算出される指令値との偏差が小さくなるように、ブラシレスモータ1がベクトル制御される。
The
次に、本発明の特徴的部分である正余弦波データ算出処理について、図2〜図6を用いて説明する。図2は、正余弦波データ算出処理の流れを示すフローチャートである。図3は、電気角算出処理にて極対数Pnが5である場合に算出される電気角データθeの一例を説明する説明図である。図4は、電気角算出処理にて極対数Pnが3である場合に算出される電気角データθeの一例を説明する説明図である。図5は、極対数Pnと正規化倍率との関係を示す図表である。図6は、正余弦波データ算出処理におけるアドレス正規化処理を説明するための説明図である。 Next, the positive cosine wave data calculation process, which is a characteristic part of the present invention, will be described with reference to FIGS. FIG. 2 is a flowchart showing the flow of the positive cosine wave data calculation process. FIG. 3 is an explanatory diagram illustrating an example of electrical angle data θe calculated when the pole pair number Pn is 5 in the electrical angle calculation process. FIG. 4 is an explanatory diagram illustrating an example of the electrical angle data θe calculated when the pole pair number Pn is 3 in the electrical angle calculation process. FIG. 5 is a chart showing the relationship between the number of pole pairs Pn and the normalized magnification. FIG. 6 is an explanatory diagram for explaining an address normalization process in the positive cosine wave data calculation process.
正余弦波データ算出処理は、極対数が1〜2n(nは正数)で異なる複数のブラシレスモータ1を制御対象とする場合であっても、電気角算出ブロック15の簡素化と正弦波テーブル16の共用化を実現するためのものである。この正余弦波データ算出処理は、主に、検出した機械角データθmに基づいて電気角データθeを算出する電気角算出処理と、算出された電気角データθeを正規化した正規化電気角データθnを算出するアドレス正規化処理とから構成されている。なお、正余弦波データ算出処理では、機械角データθmおよび電気角データθe等のデータは、2進数のデータとして取り扱われる。
The positive cosine wave data calculation process can simplify the electrical
以下、正余弦波データ算出処理について、図2に示すフローチャートを用いて詳細に説明する。
まず、図2のステップS101に示す取得処理がなされ、制御対象のブラシレスモータ1の極対数Pnと、電気角の一周期に対応する電気角一周期データTeと、機械角データθmとが取得される。なお、上記取得処理は、特許請求の範囲に記載の「取得手段」および「第1,第2ステップ」の一例に相当し得る。
Hereinafter, the positive cosine wave data calculation process will be described in detail with reference to the flowchart shown in FIG.
First, the acquisition process shown in step S101 of FIG. 2 is performed, and the number of pole pairs Pn of the
続いて、ステップS103に示す判定処理にて、機械角データθmが電気角一周期データTeに2n−1を乗算した値以上であるか否かについて判定される。ステップS103の判定処理にて否定判定される場合には(S103でNo)、ステップS105にて、1番目の仮電気角データθe1が、機械角データθmに等しくなるように設定される。一方、ステップS103の判定処理にて肯定判定される場合には(S103でYes)、ステップS107にて、1番目の仮電気角データθe1が、機械角データθmから電気角一周期データTeに2n−1を乗算した値を減算した値に等しくなるように設定される。なお、ステップS103〜S107に示す処理は、特許請求の範囲に記載の「第1仮電気角データ設定手段」の一例に相当し得る。また、ステップS103に示す判定処理は、特許請求の範囲に記載の「第3ステップ」の一例に相当し、ステップS105,S107に示す処理は、特許請求の範囲に記載の「第4ステップ」の一例に相当し得る。 Subsequently, in the determination process shown in step S103, it is determined whether or not the mechanical angle data θm is equal to or greater than a value obtained by multiplying the electrical angle one period data Te by 2 n−1 . If the determination is negative in the determination process of step S103 (No at S103), at step S105, 1-th provisional electrical angle data .theta.e 1 is set to be equal to the mechanical angle data .theta.m. On the other hand, if an affirmative determination is made in the determination processing in step S103 (Yes at S103), at step S107, 1-th provisional electrical angle data .theta.e 1 is the electrical angle one cycle data Te from the mechanical angle data θm 2 It is set to be equal to a value obtained by subtracting a value obtained by multiplying n−1 . The processing shown in steps S103 to S107 may correspond to an example of “first provisional electrical angle data setting unit” recited in the claims. The determination process shown in step S103 corresponds to an example of the “third step” described in the claims, and the processes shown in steps S105 and S107 are the “fourth step” described in the claims. It can correspond to an example.
このように1番目の仮電気角データθe1が設定されると、ステップS109にて仮電気角データの順番を示すkがインクリメントされる。なお、kは、正余弦波データ算出処理が開始されるごとに、初期化されて1に設定される。 When the first provisional electrical angle data θe 1 is set in this way, k indicating the order of the provisional electrical angle data is incremented in step S109. Note that k is initialized and set to 1 each time the positive cosine wave data calculation process is started.
続いて、ステップS111に示す判定処理にて、k−1番目の仮電気角データθek−1が電気角一周期データTeに2n−kを乗算した値以上であるか否かについて判定される。ステップS111の判定処理にて否定判定される場合には(S111でNo)、ステップS113にて、k番目の仮電気角データθekが、k−1番目の仮電気角データθek−1に等しくなるように設定される。一方、ステップS111の判定処理にて肯定判定される場合には(S111でYes)、ステップS115にて、k番目の仮電気角データθekが、k−1番目の仮電気角データθek−1から電気角一周期データTeに2n−kを乗算した値を減算した値に等しくなるように設定される。 Subsequently, in the determination process shown in step S111, it is determined whether or not the (k−1) th temporary electrical angle data θe k−1 is equal to or greater than the value obtained by multiplying the electrical angle one period data Te by 2 n−k. The When a negative determination is made in the determination process in step S111 (No in S111), in step S113, the kth provisional electrical angle data θe k is changed to the k−1th provisional electrical angle data θe k−1 . Set to be equal. On the other hand, when an affirmative determination is made in the determination process in step S111 (Yes in S111), in step S115, the k-th temporary electrical angle data θe k is converted into the (k-1) th temporary electrical angle data θe k−. It is set to be equal to a value obtained by subtracting a value obtained by multiplying 1 electrical angle cycle data Te by 2 nk from 1 .
このようにk番目の仮電気角データθekが設定されると、ステップS117にてkがn以上であるか否かについて判定され、kがn以上でなければ(S117でNo)、ステップS109にてkがインクリメントされて、ステップS111以降の処理が繰り返される。なお、ステップS111〜S115に示す処理は、特許請求の範囲に記載の「第2仮電気角データ設定手段」の一例に相当し得る。また、ステップS111に示す判定処理は、特許請求の範囲に記載の「第5ステップ」の一例に相当し、ステップS113,S115に示す処理は、特許請求の範囲に記載の「第6ステップ」の一例に相当し得る。 When the k-th provisional electrical angle data θe k is set in this way, it is determined in step S117 whether k is n or more. If k is not n or more (No in S117), step S109 is performed. K is incremented, and the processes after step S111 are repeated. The processing shown in steps S111 to S115 can correspond to an example of “second provisional electrical angle data setting means” described in the claims. Further, the determination process shown in step S111 corresponds to an example of “fifth step” described in the claims, and the processes shown in steps S113 and S115 correspond to “sixth step” described in the claims. It can correspond to an example.
そして、インクリメントされたkがn以上になると(S117でYes)、ステップS119にて電気角データ設定処理がなされる。この処理では、電気角データθeが、n番目の仮電気角データθenに等しくなるように設定される。なお、ステップS119に示す電気角データ設定処理は、特許請求の範囲に記載の「第7ステップ」の一例に相当し得る。 When the incremented k becomes n or more (Yes in S117), electrical angle data setting processing is performed in step S119. In this process, the electrical angle data θe is set to be equal to the nth provisional electrical angle data θen. The electrical angle data setting process shown in step S119 may correspond to an example of “seventh step” recited in the claims.
上述したステップS101からステップS119までの処理が電気角算出処理を構成し、この電気角算出処理について、図3に例示する具体的な数値を用いて説明する。なお、上記電気角算出処理は、特許請求の範囲に記載の「電気角データ設定手段」の一例に相当し得る。 The processing from step S101 to step S119 described above constitutes an electrical angle calculation process, and this electrical angle calculation process will be described using specific numerical values exemplified in FIG. The electrical angle calculation process may correspond to an example of “electrical angle data setting unit” recited in the claims.
まず、n=3であることから極対数が1〜8のブラシレスモータ1を制御対象としており、ステップS101にて、極対数Pn=5,機械角データθm=7600,電気角一周期データTe=1638が取得される場合に算出される電気角データθeについて説明する。
First, since n = 3, the
まず、ステップS103にて、機械角データθmが電気角一周期データTeに2n−1を乗算した値以上であるか否かについて判定される。θm(=7600)は、Te×2n−1(=1638×22=6552)よりも大きいことから(S103でYes)、1番目の仮電気角データθe1がθm−Te×2n−1(7600−1638×22)=1048に設定される。 First, in step S103, it is determined whether or not the mechanical angle data θm is equal to or greater than a value obtained by multiplying the electrical angle one period data Te by 2 n−1 . θm (= 7600) is, Te × 2 n-1 ( = 1638 × 2 2 = 6552) (Yes in S103) from greater than, the first temporary electrical angle data .theta.e 1 is θm-Te × 2 n- 1 (7600-1638 × 2 2 ) = 1048 is set.
そして、kが初期値1からステップS109にてk=2にインクリメントされた後、ステップS111にて、1番目の仮電気角データθe1が電気角一周期データTeに2n−2を乗算した値以上であるか否かについて判定される。θe1(=1048)は、Te×2n−2(=1638×21=3276)よりも小さいことから(S111でNo)、2番目の仮電気角データθe2が1番目の仮電気角データθe1に等しくなるように1048に設定される。
Then, after k is incremented from the
そして、k=2でありk≧nでないことから(S117でNo)、ステップS109にてk=3にインクリメントされた後、ステップS111にて、2番目の仮電気角データθe2が電気角一周期データTeに2n−3を乗算した値以上であるか否かについて判定される。θe2(=1048)は、Te×2n−3(=1638×20=1638)よりも小さいことから(S111でNo)、3番目の仮電気角データθe3が2番目の仮電気角データθe2に等しくなるように1048に設定される。
Then, k = (No in S117) since it is not a 2 a and k ≧ n, after being incremented k = 3 in step S109, in
そして、k=3でありk≧nであることから(S117でYes)、ステップS119にて電気角算出処理がなされ、電気角データθeが、3番目の仮電気角データθe3である1048に等しくなるように設定される。 Since k = 3 and k ≧ n (Yes in S117), an electrical angle calculation process is performed in step S119, and the electrical angle data θe is changed to 1048 which is the third provisional electrical angle data θe3. Set to be equal.
ここで、上述のように設定された電気角データθeと、実際に機械角データθmの数値を用いて計算した計算結果とを比較する。機械角データθm=7600であることから、この機械角データθm=7600を電気角一周期データTe=1638で割ると、商が4で余りが1048になる。この余りが電気角データθeの計算結果となることから、上述のように設定された電気角データθeが正しい数値であることが分かる。 Here, the electrical angle data θe set as described above is compared with the calculation result actually calculated using the numerical value of the mechanical angle data θm. Since mechanical angle data θm = 7600, dividing this mechanical angle data θm = 7600 by electrical angle one-cycle data Te = 1638 results in a quotient of 4 and a remainder of 1048. Since the remainder is the calculation result of the electrical angle data θe, it can be seen that the electrical angle data θe set as described above is a correct numerical value.
また、上述した電気角算出処理について、図4に例示する具体的な数値を用いて説明する。まず、n=3であることから極対数が1〜8のブラシレスモータ1を制御対象としており、ステップS101にて、極対数Pn=3,機械角データθm=7600,電気角一周期データTe=2730が取得される場合に算出される電気角データθeについて説明する。
The electrical angle calculation process described above will be described using specific numerical values illustrated in FIG. First, since n = 3, the
まず、ステップS103にて、機械角データθmが電気角一周期データTeに2n−1を乗算した値以上であるか否かについて判定される。θm(=7600)は、Te×2n−1(=2730×22=10920)よりも小さいことから(S103でNo)、1番目の仮電気角データθe1が機械角データθm=7600に等しくなるように設定される。 First, in step S103, it is determined whether or not the mechanical angle data θm is equal to or greater than a value obtained by multiplying the electrical angle one period data Te by 2 n−1 . θm (= 7600), since smaller than Te × 2 n-1 (= 2730 × 2 2 = 10920) ( in S103 No), 1-th provisional electrical angle data .theta.e 1 is the mechanical angle data .theta.m = 7600 Set to be equal.
そして、kが初期値1からステップS109にてk=2にインクリメントされた後、ステップS111にて、1番目の仮電気角データθe1が電気角一周期データTeに2n−2を乗算した値以上であるか否かについて判定される。θe1(=7600)は、Te×2n−2(=2730×21=5460)よりも大きいことから(S111でYes)、2番目の仮電気角データθe2がθe1−Te×2n−2(7600−2730×21)=2140に設定される。
Then, after k is incremented from the
そして、k=2でありk≧nでないことから(S117でNo)、ステップS109にてk=3にインクリメントされた後、ステップS111にて、2番目の仮電気角データθe2が電気角一周期データTeに2n−3を乗算した値以上であるか否かについて判定される。θe2(=2140)は、Te×2n−3(=2730×20=2730)よりも小さいことから(S111でNo)、3番目の仮電気角データθe3が2番目の仮電気角データθe2に等しくなるように2140に設定される。
Then, k = (No in S117) since it is not a 2 a and k ≧ n, after being incremented k = 3 in step S109, in
そして、k=3でありk≧nであることから(S117でYes)、ステップS119にて電気角算出処理がなされ、電気角データθeが、3番目の仮電気角データθe3である2140に等しくなるように設定される。 Since k = 3 and k ≧ n (Yes in S117), electrical angle calculation processing is performed in step S119, and the electrical angle data θe is changed to 2140, which is the third provisional electrical angle data θe3. Set to be equal.
ここで、上述のように設定された電気角データθeと、実際に機械角データθmの数値を用いて計算した計算結果とを比較する。機械角データθm=7600であることから、この機械角データθm=7600を電気角一周期データTe=2730で割ると、商が2で余りが2140になる。この余りが電気角データθeの計算結果となることから、上述のように設定された電気角データθeが正しい数値であることが分かる。 Here, the electrical angle data θe set as described above is compared with the calculation result actually calculated using the numerical value of the mechanical angle data θm. Since the mechanical angle data θm = 7600, dividing the mechanical angle data θm = 7600 by the electrical angle one period data Te = 2730, the quotient is 2 and the remainder is 2140. Since the remainder is the calculation result of the electrical angle data θe, it can be seen that the electrical angle data θe set as described above is a correct numerical value.
上述のように電気角データθeが設定されると、ステップS121に示すアドレス正規化処理がなされて、正規化電気角データθnが設定される。この正規化電気角データθnに基づいて、ステップS123に示す正余弦波データ設定処理にて正余弦波データが正弦波テーブル16を用いて設定されて、正余弦波データ算出処理が終了する。なお、ステップS121に示す判定処理は、特許請求の範囲に記載の「算出手段」の一例に相当し得る。また、ステップS121,S123に示す判定処理は、特許請求の範囲に記載の「正余弦波データ設定手段」および「第8ステップ」の一例に相当し得る。 When the electrical angle data θe is set as described above, the address normalization process shown in step S121 is performed, and the normalized electrical angle data θn is set. Based on the normalized electrical angle data θn, the positive cosine wave data is set using the sine wave table 16 in the positive cosine wave data setting process shown in step S123, and the positive cosine wave data calculation process is completed. The determination process shown in step S121 may correspond to an example of “calculation unit” recited in the claims. The determination processing shown in steps S121 and S123 may correspond to an example of “positive cosine wave data setting means” and “eighth step” recited in the claims.
ここで、上述したアドレス正規化処理について説明する。この処理は、算出された電気角θeに対して、正規化倍率である極対数Pn/2n−1を乗算した正規化電気角データθnを設定する処理である。すなわち、電気角θeは、正弦波テーブルを使用するための正弦波テーブルアドレスであり、正弦波テーブル16用に正規化したアドレス(正規化電気角データθn)を設定することで正弦波テーブル16の極対数を区別することなく共通して使用できる。 Here, the address normalization process described above will be described. This process is a process of setting normalized electrical angle data θn obtained by multiplying the calculated electrical angle θe by the pole pair number Pn / 2 n−1 which is a normalization magnification. That is, the electrical angle θe is a sine wave table address for using the sine wave table, and by setting a normalized address (normalized electrical angle data θn) for the sine wave table 16, the electrical angle θe It can be used in common without distinguishing the number of pole pairs.
具体的には、電気角データθeは、2進数のデータであるため、桁のシフトと加減算とを用いることで当該電気角データθeに正規化倍率Pn/2n−1を積算した正規化電気角データθnを算出する。このようなアドレス正規化処理について、図5および図6を用いて詳細に説明する。 Specifically, since the electrical angle data θe is binary data, normalized electrical power obtained by multiplying the electrical angle data θe by a normalization magnification Pn / 2 n-1 by using digit shift and addition / subtraction. Angle data θn is calculated. Such an address normalization process will be described in detail with reference to FIGS.
正弦波テーブル16は、例えば、極対数Pn=4を基準に設定しているため、図5から分かるように、正規化電気角データθnは、電気角データθeに正規化倍率であるPn/4が積算されるように設定される。本実施形態では、この積算を、図6に示すように桁のシフトと加減算とを用いることで実施する。 Since the sine wave table 16 is set based on, for example, the number of pole pairs Pn = 4, as can be seen from FIG. 5, the normalized electrical angle data θn is equal to the electrical angle data θe and Pn / 4 which is a normalized magnification. Is set to be accumulated. In this embodiment, this integration is performed by using digit shift and addition / subtraction as shown in FIG.
ここで、演算子「>>」は、右シフト演算(右ビットシフト演算)を示し、2進数の数値を2α(αは正数)で除算する計算手法であり、θe>>1は、電気角データθeを1桁右シフトすることで、2進数である電気角データθeを2で除算した正規化電気角データθnが算出される。例えば、2進数で「1000」を1桁右シフトすると「0100」となり、2で除算した結果と等しくなり、2進数で「1000」を2桁右シフトすると「0010」となり、22で除算した結果と等しくなる。 Here, the operator “>>” indicates a right shift operation (right bit shift operation), which is a calculation method for dividing a binary number by 2 α (α is a positive number), and θe >> 1 is By shifting the electrical angle data θe by one digit to the right, normalized electrical angle data θn obtained by dividing the electrical angle data θe that is a binary number by 2 is calculated. For example, if "1000" is shifted to the right by one digit in binary, it becomes "0100" and is equal to the result obtained by dividing by 2, and if "1000" is shifted by two digits to the right in binary, it becomes "0010" and divided by 2 Equal to the result.
また、演算子「<<」は、左シフト演算(左ビットシフト演算)を示し、2進数の数値に2αを乗算する計算手法であり、θe<<1は、電気角データθeを1桁左シフトすることで、2進数である電気角データθeに2を乗算した正規化電気角データθnが算出される。例えば、2進数で「0100」を1桁左シフトすると「1000」となり、2を乗算した結果と等しくなる。 Furthermore, operator "<<" represents a left shift operation (left bit shift operation), a calculation method of multiplying 2 alpha to binary numbers, .theta.e << 1 is an order of magnitude the electrical angle data .theta.e By shifting leftward, normalized electrical angle data θn obtained by multiplying electrical angle data θe, which is a binary number, by 2 is calculated. For example, if “0100” is shifted by one digit to the left in binary, “1000” is obtained, which is equal to the result of multiplying by 2.
図6に示すように、極対数Pn=1では、電気角データθeに1/4を乗算するため、電気角データθeが2桁右シフトされて正規化電気角データθnが算出される。また、極対数Pn=2では、電気角データθeに2/4を乗算するため、電気角データθeが1桁右シフトされて正規化電気角データθnが算出される。また、極対数Pn=3では、電気角データθeに3/4を乗算するため、電気角データθeが2桁右シフトされた値と電気角データθeが1桁右シフトされた値との和に等しくなるように正規化電気角データθnが算出される。また、極対数Pn=4では、電気角データθeに等しくなるように正規化電気角データθnが算出される。また、極対数Pn=5では、電気角データθeに5/4を乗算するため、電気角データθeが2桁右シフトされた値と電気角データθeとの和に等しくなるように正規化電気角データθnが算出される。また、極対数Pn=6では、電気角データθeに6/4を乗算するため、電気角データθeが1桁右シフトされた値と電気角データθeとの和に等しくなるように正規化電気角データθnが算出される。また、極対数Pn=7では、電気角データθeに7/4を乗算するため、電気角データθeが1桁左シフトされた値から電気角データθeが2桁右シフトされた値を減算した値に等しくなるように正規化電気角データθnが算出される。また、極対数Pn=8では、電気角データθeに8/4を乗算するため、電気角データθeが1桁左シフトされた値に等しくなるように正規化電気角データθnが算出される。 As shown in FIG. 6, when the number of pole pairs Pn = 1, the electrical angle data θe is multiplied by ¼, so that the electrical angle data θe is shifted to the right by two digits to calculate the normalized electrical angle data θn. Further, when the number of pole pairs Pn = 2, the electrical angle data θe is shifted by one digit to calculate the normalized electrical angle data θn because the electrical angle data θe is multiplied by 2/4. In addition, when the pole pair number Pn = 3, the electrical angle data θe is multiplied by 3/4, so that the sum of the value obtained by shifting the electrical angle data θe by two digits to the right and the value obtained by shifting the electrical angle data θe by one digit to the right. Normalized electrical angle data θn is calculated so as to be equal to. Further, when the number of pole pairs Pn = 4, the normalized electrical angle data θn is calculated so as to be equal to the electrical angle data θe. Further, when the number of pole pairs Pn = 5, the electrical angle data θe is multiplied by 5/4, so that the normalized electrical value is set so that the electrical angle data θe is equal to the sum of the right-shifted value and the electrical angle data θe. Angle data θn is calculated. In addition, when the number of pole pairs Pn = 6, the electrical angle data θe is multiplied by 6/4. Therefore, the normalized electrical value is set so that the electrical angle data θe is equal to the sum of the right-shifted value and the electrical angle data θe. Angle data θn is calculated. In addition, when the number of pole pairs Pn = 7, the electrical angle data θe is multiplied by 7/4. Therefore, the value obtained by shifting the electrical angle data θe by two digits to the right is subtracted from the value obtained by shifting the electrical angle data θe by one digit to the left. Normalized electrical angle data θn is calculated to be equal to the value. When the number of pole pairs Pn = 8, the electrical angle data θn is multiplied by 8/4, so that the normalized electrical angle data θn is calculated so that the electrical angle data θe is equal to a value shifted left by one digit.
このように、上述したシフトを用いる計算手法により、乗算器や減算器を用いることなく回路における信号線の接続状態のみで、正規化電気角データθnが算出されるため、回路規模の増大を招くことなく共通のテーブルの使用が可能となり、さらなる回路の小型化を図ることができる。 As described above, the normalized electrical angle data θn is calculated only by the connection state of the signal lines in the circuit without using a multiplier or a subtracter by the above-described calculation method using the shift, resulting in an increase in circuit scale. Thus, a common table can be used without any further reduction in circuit size.
以上説明したように、本実施形態に係るモータ制御装置10およびモータ制御方法では、機械角データθmが電気角一周期データTeに2n−1を乗算した値以上であるか否かが判定されて、否定判定時に機械角データθmに等しくなるように1番目の仮電気角データθe1が設定され、肯定判定時に機械角データθmから電気角一周期データTeに2n−1を乗算した値を減算した値に等しくなるように1番目の仮電気角データθe1が設定される。そして、k−1番目の仮電気角データθek−1が電気角一周期データTeに2n−kを乗算した値以上であるか否かが判定されて、否定判定時にk−1番目の仮電気角データθek−1に等しくなるようにk番目の仮電気角データθekが設定され、肯定判定時にk−1番目の仮電気角データθek−1から電気角一周期データTeに2n−kを乗算した値を減算した値に等しくなるようにk番目の仮電気角データθekを設定する処理が、kが2からnまで繰り返される。そして、電気角データθeがn番目の仮電気角データθenに等しくなるように設定され、この電気角データθeに基づいて正余弦波データが設定される。
As described above, in the
これにより、極対数Pnごとに電気角データθeを算出する電気角算出ブロックを採用することなく、極対数Pnが1〜2nであればどのような極対数Pnであっても電気角データθeを算出することができる。特に、乗算ブロックのような規模が大きくなる回路を用いる必要もないので、回路規模を小さくすることができる。また、複数の三角波を合成して正余弦波データを作成することもないので、正余弦波データの精度が低下することもない。
したがって、回路規模の増大を招くことなく汎用性を高めることができる。
Thus, the electrical angle data θe can be used regardless of the number of pole pairs Pn as long as the number of pole pairs Pn is 1 to 2 n without using an electrical angle calculation block for calculating the electrical angle data θe for each number of pole pairs Pn. Can be calculated. In particular, since it is not necessary to use a circuit having a large scale such as a multiplication block, the circuit scale can be reduced. In addition, since the positive cosine wave data is not created by combining a plurality of triangular waves, the accuracy of the positive cosine wave data is not lowered.
Therefore, versatility can be improved without increasing the circuit scale.
また、電気角データθeは、2進数のデータであって、極対数Pnが2n−1である場合の電気角データθeと正余弦波データとの関係を示す正弦波テーブル16が設けられている。そして、電気角データθeの桁のシフトと加減算とを用いることで当該電気角データθeにPn/2n−1を積算した正規化電気角データθnが算出され、この正規化電気角データθnに基づいて上記正弦波テーブル16から正余弦波データが設定される。 The electrical angle data θe is binary data, and a sine wave table 16 is provided that shows the relationship between the electrical angle data θe and the positive cosine wave data when the pole pair number Pn is 2 n−1. Yes. Then, using the digit shift and addition / subtraction of the electrical angle data θe, the normalized electrical angle data θn obtained by adding Pn / 2 n−1 to the electrical angle data θe is calculated, and the normalized electrical angle data θn is calculated. Based on this, positive cosine wave data is set from the sine wave table 16.
このように、上述したシフトを用いる計算手法により、乗算器や減算器を用いることなく回路における信号線の接続状態のみで、正規化電気角データθnが算出されるため、回路規模の増大を招くことなく共通のテーブルの使用が可能となり、さらなる回路の小型化を図ることができる。 As described above, the normalized electrical angle data θn is calculated only by the connection state of the signal lines in the circuit without using a multiplier or a subtracter by the above-described calculation method using the shift, resulting in an increase in circuit scale. Thus, a common table can be used without any further reduction in circuit size.
[第2実施形態]
次に、本発明の第2実施形態に係るモータ制御装置およびモータ制御方法について、図7を参照して説明する。図7は、第2実施形態における正余弦波データ算出処理の流れを示すフローチャートである。
本第2実施形態では、機械角一周期データTmが異なるブラシレスモータ1を制御対象とする場合であってもその汎用性を高めるため、正余弦波データ算出処理を図2に示すフローチャートに代えて図7に示すフローチャートに基づいて実施する点が、上記第1実施形態と異なる。したがって、第1実施形態と実質的に同一の構成部分には、同一符号を付し、その説明を省略する。
[Second Embodiment]
Next, a motor control device and a motor control method according to a second embodiment of the present invention will be described with reference to FIG. FIG. 7 is a flowchart showing the flow of a positive cosine wave data calculation process in the second embodiment.
In the second embodiment, even when the
上記第1実施形態に係る正余弦波データ算出処理では、エンコーダ2における機械角の一周期に対応する機械角一周期データTmが一定の場合を前提に処理される。このため、ブラシレスモータ1のバージョンアップ等により機械角一周期データTmが変更されると、正弦波テーブル16を共用できなくなってしまう。
In the positive cosine wave data calculation processing according to the first embodiment, the processing is performed on the assumption that the mechanical angle one period data Tm corresponding to one mechanical angle period in the
そこで、本実施形態では、例えば、8192を特定の機械角一周期データとするとき、この特定の機械角一周期データに対して2x(xは整数)を乗算したデータとなる機械角一周期データTmのブラシレスモータ1を制御対象とする。ここで、正弦波テーブル16は、上記特定の機械角一周期データに基づいて設定される。そして、正余弦波データ算出処理では、機械角一周期データTmが異なるブラシレスモータ1を制御対象とする場合であってもその汎用性を高めるため、算出された電気角データθeを上記2xで除算し、この除算されたデータを電気角データθeとして正規化電気角データθnを設定する。これにより、機械角一周期データTmが2xで変化する場合でも、正弦波テーブル16等の共用が可能となる。
Therefore, in the present embodiment, for example, when 8192 is specified as the specific mechanical angle / cycle data, the mechanical angle / cycle becomes data obtained by multiplying the specific mechanical angle / cycle data by 2 x (x is an integer). The
以下、本実施形態における正余弦波データ算出処理について、図7に示すフローチャートを用いて詳細に説明する。
上記第1実施形態と同様に、電気角データ設定処理にて電気角θeが設定されると、図7のステップS120に示すシフト処理がなされる。この処理では、上述のように設定された電気角データθの桁のシフトを用いることで当該電気角データを2xで除算する。なお、上記シフト処理は、特許請求の範囲に記載の「シフト手段」の一例に相当し得る。
Hereinafter, the positive cosine wave data calculation process in the present embodiment will be described in detail with reference to the flowchart shown in FIG.
Similar to the first embodiment, when the electrical angle θe is set in the electrical angle data setting process, the shift process shown in step S120 of FIG. 7 is performed. In this process, the electrical angle data is divided by 2 × by using the shift of the digit of the electrical angle data θ set as described above. The shift process can correspond to an example of “shift means” described in the claims.
具体的には、例えば、x=1であり、機械角一周期データTmが16384(=8192×21)である場合には、電気角データθを、1桁右シフトすることで2で除算する。また、例えば、x=−1であり、機械角一周期データTmが4096(=8192×2−1)である場合には、電気角データθを、1桁左シフトすることで2−1で除算(2で乗算)する。 Specifically, for example, when x = 1 and the mechanical angle single cycle data Tm is 16384 (= 8192 × 2 1 ), the electrical angle data θ is divided by 2 by shifting the electrical angle data θ to the right by one digit. To do. Further, for example, when x = −1 and the mechanical angle one cycle data Tm is 4096 (= 8192 × 2 −1 ), the electrical angle data θ is shifted to the left by −1 by shifting the electrical angle data θ by one digit. Divide (multiply by 2).
そして、このように除算されたデータを電気角データθeとして、ステップS121に示すアドレス正規化処理がなされて、正規化電気角データθnが設定される。 Then, using the data divided in this way as the electrical angle data θe, the address normalization process shown in step S121 is performed, and the normalized electrical angle data θn is set.
以上説明したように、本実施形態に係るモータ制御装置10およびモータ制御方法では、機械角一周期データTmが特定の機械角一周期データに対して2xを乗算したデータとなるブラシレスモータ1が制御対象であり、正弦波テーブル16は、上記特定の機械角一周期データに基づいて設定される。そして、上述のように設定された電気角データθeの桁のシフトを用いることで当該電気角データθeを2xで除算し、この除算された電気角データθeを用いて正余弦波データが設定される。
As described above, in the
これにより、機械角一周期データTmが特定の機械角一周期データに対して2xで異なるブラシレスモータ1が制御対象であっても、共通の正弦波テーブル16を使用して正余弦波データを設定することができる。特に、上述したシフトを用いる計算手法により、複数の機械角一周期データTmのブラシレスモータ1を制御対象とすることに起因する回路規模の増大を抑制することができる。
As a result, even if the
なお、本発明は上記実施形態に限定されるものではなく、以下のように具体化してもよい。
(1)上述した正余弦波データ算出処理は、ブラシレスモータ1を制御対象する場合に採用されることに限らず、検出されたモータ電流値とこの電流検出時の電気角データに応じた正余弦波データとに応じて駆動制御するモータを制御対象とする場合に採用されてもよい。
In addition, this invention is not limited to the said embodiment, You may actualize as follows.
(1) The above-described positive cosine wave data calculation process is not limited to the case where the
(2)上述したアドレス正規化処理では、桁のシフトと加減算とを用いることで正規化電気角データθnを算出することに限らず、当該モータ制御装置10が使用される使用状況に応じて乗算器等を採用することで正規化電気角データθnを算出しても、正弦波テーブル16の共用化を図ることができる。
(2) In the address normalization process described above, not only the normalized electrical angle data θn is calculated by using digit shift and addition / subtraction, but also multiplication according to the usage situation in which the
(3)上述したアドレス正規化処理では、極対数Pnが2n−1である場合の電気角データθeと正余弦波データとの関係を示す正弦波テーブル16に対し、電気角データθeにPn/2n−1を積算した正規化電気角データθnをアドレスとして入力することで、正余弦波データを生成しているが、この生成法に限らず、以下のように処理してもよい。 (3) In the address normalization process described above, Pn is added to the electrical angle data θe with respect to the sine wave table 16 indicating the relationship between the electrical angle data θe and the positive cosine wave data when the pole pair number Pn is 2 n−1. / 2 The positive electrical cosine wave data is generated by inputting the normalized electrical angle data θn obtained by integrating n−1 as an address. However, the present invention is not limited to this generation method, and the following processing may be performed.
すなわち、上述したアドレス正規化処理では、当該モータ制御装置10が使用される使用状況に応じて、極対数Pnが2n−m(mは0またはn以下の正数)である場合の電気角データθeと正余弦波データとの関係を示す正弦波テーブルに対し、電気角データθeにPn/2n−mを積算した正規化電気角データθnをアドレスとして入力することで正余弦波データを生成する方法を採用しても良い。
That is, in the address normalization process described above, the electrical angle when the pole pair number Pn is 2 nm (where m is a positive number equal to or less than n), depending on the usage situation in which the
(4)上述したモータ制御装置10では、機械角を取得する位置検出器としてエンコーダ2を採用することに限らず、例えば、レゾルバなどの位置検出器を採用してもよい。
(4) In the
(5)上述した正弦波テーブル16として、正弦波一周期に相当する4象限(360度)全てのデータを格納した正弦波テーブルを採用することに限らず、例えば、読み出しデータの符号反転や読み出しアドレスの反転等を行う方法を用いて正余弦波を生成することを前提に、1象限(90度)の正弦波データのみを格納した正弦波テーブルを採用してもよい。 (5) The sine wave table 16 described above is not limited to the sine wave table storing all data in four quadrants (360 degrees) corresponding to one sine wave cycle. A sine wave table storing only one quadrant (90 degrees) sine wave data may be employed on the assumption that a positive cosine wave is generated using a method of performing address inversion or the like.
1…ブラシレスモータ(モータ) 2…エンコーダ
10…モータ制御装置 11…制御コントローラ
15…電気角算出ブロック 16…正弦波テーブル
Te…電気角一周期データ
Tm…機械角一周期データ
θe…電気角データ
θek…仮電気角データ
θm…機械角データ
θn…正規化電気角データ
Pn…極対数
DESCRIPTION OF
Claims (6)
制御対象のモータの前記極対数と電気角の一周期に対応する電気角一周期データ(Te)とを取得する取得手段(11)と、
前記モータの機械角に対応する機械角データ(θm)を検出する機械角データ検出手段(11,2,14)と、
前記機械角データ検出手段により検出された前記機械角データに基づいて前記電気角データを設定する電気角データ設定手段(11,15)と、
前記電気角データ設定手段により設定された前記電気角データに基づいて前記正余弦波データを設定する正余弦波データ設定手段(11,16)と、を備え、
前記電気角データ設定手段は、
前記機械角データ検出手段により検出された前記機械角データが前記電気角一周期データに2n−1を乗算した値以上であるか否かを判定して、否定判定時に前記機械角データに等しくなるように1番目の仮電気角データ(θe1)を設定し、肯定判定時に前記機械角データから前記電気角一周期データに2n−1を乗算した値を減算した値に等しくなるように1番目の仮電気角データ(θe1)を設定する第1仮電気角データ設定手段(11,15)と、
k−1番目の仮電気角データが前記電気角一周期データに2n−kを乗算した値以上であるか否かを判定して、否定判定時にk−1番目の仮電気角データ(θek−1)に等しくなるようにk番目の仮電気角データ(θek)を設定し、肯定判定時にk−1番目の仮電気角データ(θek−1)から前記電気角一周期データに2n−kを乗算した値を減算した値に等しくなるようにk番目の仮電気角データ(θek)を設定する処理を、kが2からnまで繰り返す第2仮電気角データ設定手段(11,15)と、を備え、
前記電気角データを前記n番目の仮電気角データに等しくなるように設定することを特徴とするモータ制御装置。 A motor (1) having a pole pair number (Pn) of 1 to 2 n (n is a positive number) is converted into a detected cosine wave data corresponding to the detected motor current value and electrical angle data (θe) at the time of detecting the current. A motor control device (10) that performs drive control in response,
An acquisition means (11) for acquiring the number of pole pairs of the motor to be controlled and one electrical angle cycle data (Te) corresponding to one electrical angle cycle;
Mechanical angle data detecting means (11, 2, 14) for detecting mechanical angle data (θm) corresponding to the mechanical angle of the motor;
Electrical angle data setting means (11, 15) for setting the electrical angle data based on the mechanical angle data detected by the mechanical angle data detection means;
Positive cosine wave data setting means (11, 16) for setting the positive cosine wave data based on the electric angle data set by the electric angle data setting means,
The electrical angle data setting means includes
It is determined whether or not the mechanical angle data detected by the mechanical angle data detection means is equal to or greater than a value obtained by multiplying the electrical angle single period data by 2 n−1 , and is equal to the mechanical angle data when a negative determination is made. The first provisional electrical angle data (θe 1 ) is set so as to be equal to a value obtained by subtracting a value obtained by multiplying the electrical angle one period data by 2 n−1 from the mechanical angle data at the time of affirmative determination. First temporary electrical angle data setting means (11, 15) for setting first temporary electrical angle data (θe 1 );
It is determined whether or not the (k−1) th provisional electrical angle data is equal to or greater than a value obtained by multiplying the electrical angle single cycle data by 2 n−k , and the k−1th provisional electrical angle data (θe) is determined when a negative determination is made. k-1 provisional electrical angle data (θe k ) is set so as to be equal to k−1 ), and from the k−1th provisional electrical angle data (θe k−1 ) to the electrical angle one-period data when an affirmative determination is made. 2nd temporary electrical angle data setting means for repeating the process of setting the kth provisional electrical angle data (θe k ) so as to be equal to the value obtained by subtracting the value obtained by multiplying 2 n−k from k to 2 to n. 11, 15)
The motor control device, wherein the electrical angle data is set to be equal to the nth provisional electrical angle data.
前記正余弦波データ設定手段は、
極対数が2n−m(mは0またはn以下の正数)である場合の前記電気角データと前記正余弦波データとの関係を示すテーブル(16)と、
極対数がPnである場合に前記電気角データの桁のシフトと加減算とを用いることで当該電気角データにPn/2n−mを積算した正規化電気角データを算出する算出手段(11,15)と、を備え、
前記算出手段により算出された前記正規化電気角データに基づいて前記テーブルから前記正余弦波データを設定することを特徴とする請求項1に記載のモータ制御装置。 The electrical angle data is binary data,
The positive cosine wave data setting means includes:
A table (16) showing a relationship between the electrical angle data and the positive cosine wave data when the number of pole pairs is 2 nm (m is a positive number of 0 or less than n);
When the number of pole pairs is Pn, calculating means (11, 11) for calculating normalized electrical angle data obtained by adding Pn / 2 nm to the electrical angle data by using digit shift and addition / subtraction of the electrical angle data. 15)
The motor control device according to claim 1, wherein the cosine wave data is set from the table based on the normalized electrical angle data calculated by the calculation unit.
前記テーブルは、前記特定の機械角一周期データに基づいて設定され、
前記電気角データ設定手段により設定された前記電気角データの桁のシフトを用いることで当該電気角データを前記2xで除算するシフト手段(11,15)を備え、
前記正余弦波データ設定手段は、前記シフト手段により除算された電気角データを用いて前記正余弦波データを設定することを特徴とする請求項2に記載のモータ制御装置。 A motor whose mechanical angle / cycle data (Tm) corresponding to one cycle of the mechanical angle is data obtained by multiplying specific mechanical angle / cycle data by 2 x (x is an integer) is controlled,
The table is set based on the specific mechanical angle / cycle data,
A shift means for dividing the electrical angle data by using a shift of the digits of the electrical angle data set by the 2 x (11, 15) by the electrical angle data setting means,
The motor control apparatus according to claim 2, wherein the positive cosine wave data setting means sets the positive cosine wave data using the electrical angle data divided by the shift means.
制御対象のモータの前記極対数と電気角の一周期に対応する電気角一周期データとを取得する第1ステップと、
前記モータの機械角に対応する機械角データを検出する第2ステップと、
前記第2ステップにより検出された前記機械角データが前記電気角一周期データに2n−1を乗算した値以上であるか否かを判定する第3ステップと、
前記第3ステップにおける否定判定時に前記機械角データに等しくなるように1番目の仮電気角データを設定し、肯定判定時に前記機械角データから前記電気角一周期データに2n−1を乗算した値を減算した値に等しくなるように1番目の仮電気角データを設定する第4ステップと、
k−1番目の仮電気角データが前記電気角一周期データに2n−kを乗算した値以上であるか否かを判定する第5ステップと、
前記第5ステップにおける否定判定時にk−1番目の仮電気角データに等しくなるようにk番目の仮電気角データを設定し、肯定判定時にk−1番目の仮電気角データから前記電気角一周期データに2n−kを乗算した値を減算した値に等しくなるようにk番目の仮電気角データを設定する処理を、kが2からnまで繰り返す第6ステップと、
前記電気角データを前記n番目の仮電気角データに等しくなるように設定する第7ステップと、
前記第7ステップにより算出された前記電気角データに基づいて前記正余弦波データを設定する第8ステップと、
を備えることを特徴とするモータ制御方法。 A motor control method for driving and controlling a motor having a pole pair number of 1 to 2 n (n is a positive number) according to a detected motor current value and positive cosine wave data corresponding to electrical angle data at the time of detecting the current. There,
A first step of acquiring the number of pole pairs of the motor to be controlled and one period of electrical angle data corresponding to one period of the electrical angle;
A second step of detecting mechanical angle data corresponding to the mechanical angle of the motor;
A third step of determining whether or not the mechanical angle data detected in the second step is equal to or greater than a value obtained by multiplying the electrical angle single cycle data by 2 n−1 ;
The first provisional electrical angle data is set to be equal to the mechanical angle data at the time of negative determination in the third step, and the electrical angle one-cycle data is multiplied by 2 n-1 from the mechanical angle data at the time of positive determination. A fourth step of setting the first temporary electrical angle data to be equal to the value obtained by subtracting the value;
a fifth step of determining whether or not the k-1th provisional electrical angle data is equal to or greater than a value obtained by multiplying the electrical angle single period data by 2 n−k ;
The kth temporary electrical angle data is set to be equal to the k-1th temporary electrical angle data at the time of negative determination in the fifth step, and the electrical angle equals from the k-1th temporary electrical angle data at the time of positive determination. A sixth step of repeating the process of setting the k-th temporary electrical angle data so as to be equal to the value obtained by subtracting the value obtained by multiplying the periodic data by 2 nk , from k to 2 to n,
A seventh step of setting the electrical angle data to be equal to the nth provisional electrical angle data;
An eighth step of setting the positive cosine wave data based on the electrical angle data calculated in the seventh step;
A motor control method comprising:
極対数が2n−m(mは0またはn以下の正数)である場合の前記電気角データと前記正余弦波データとの関係を示すテーブルを備え、
前記第7ステップは、
極対数がPnである場合に前記電気角データの桁のシフトと加減算とを用いることで当該電気角データにPn/2n−mを積算した正規化電気角データを算出し、この正規化電気角データに基づいて前記テーブルから前記正余弦波データを設定することを特徴とする請求項1に記載のモータ制御方法。 The electrical angle data is binary data,
A table showing a relationship between the electrical angle data and the positive cosine wave data when the number of pole pairs is 2 nm (m is a positive number of 0 or n or less);
The seventh step includes
When the number of pole pairs is Pn, normalized electrical angle data obtained by adding Pn / 2 nm to the electrical angle data is calculated by using digit shift and addition / subtraction of the electrical angle data. The motor control method according to claim 1, wherein the positive cosine wave data is set from the table based on angle data.
前記テーブルは、前記特定の機械角一周期データに基づいて設定され、
前記第8ステップは、
前記第7ステップにより設定された前記電気角データの桁のシフトを用いることで当該電気角データを前記2xで除算し、この除算された電気角データを用いて前記正余弦波データを設定することを特徴とする請求項5に記載のモータ制御方法。 The control object is a motor whose mechanical angle / cycle data corresponding to one cycle of the mechanical angle is data obtained by multiplying specific mechanical angle / cycle data by 2 x (x is an integer),
The table is set based on the specific mechanical angle / cycle data,
The eighth step includes
The seventh divided by set the electrical angle data of digits of the the electrical angle data by using a shift 2 x in step, the set positive cosine wave data using this division is the electrical angle data were The motor control method according to claim 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012036207A JP5765263B2 (en) | 2012-02-22 | 2012-02-22 | Motor control device and motor control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012036207A JP5765263B2 (en) | 2012-02-22 | 2012-02-22 | Motor control device and motor control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013172602A true JP2013172602A (en) | 2013-09-02 |
JP5765263B2 JP5765263B2 (en) | 2015-08-19 |
Family
ID=49266201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012036207A Expired - Fee Related JP5765263B2 (en) | 2012-02-22 | 2012-02-22 | Motor control device and motor control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5765263B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019086410A (en) * | 2017-11-07 | 2019-06-06 | 株式会社松尾製作所 | Electric angle acquisition system, electric angle acquisition method, electric angle acquisition program, electric angle acquisition characteristic measuring system, electric angle acquisition characteristic measuring method and electric angle acquisition characteristic measuring program |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0495105A (en) * | 1990-08-07 | 1992-03-27 | Fanuc Ltd | Ac servo motor control system |
JPH04355326A (en) * | 1991-05-31 | 1992-12-09 | Fanuc Ltd | Rotary encoder with electrical angle output function |
JPH0583978A (en) * | 1991-09-17 | 1993-04-02 | Matsushita Electric Ind Co Ltd | Magnetic pole position detector for servo motor |
JPH05137374A (en) * | 1991-11-06 | 1993-06-01 | Matsushita Electric Ind Co Ltd | AC servo motor sine wave current command value generation device |
JPH0675635A (en) * | 1992-08-26 | 1994-03-18 | Ntn Corp | Driving circuit for ac servo motor |
JPH07123768A (en) * | 1993-10-26 | 1995-05-12 | Matsushita Electric Ind Co Ltd | Digital AC servo device |
JP2000135829A (en) * | 1998-08-28 | 2000-05-16 | Toshiba Tec Corp | Printer control device |
JP2003103775A (en) * | 2001-10-01 | 2003-04-09 | Fuji Xerox Co Ltd | Printing controlling method |
JP2003244984A (en) * | 2002-02-20 | 2003-08-29 | Yokogawa Electric Corp | Control device for motor |
JP2010096579A (en) * | 2008-10-15 | 2010-04-30 | Yaskawa Electric Corp | Encoder signal processing circuit and encoder |
-
2012
- 2012-02-22 JP JP2012036207A patent/JP5765263B2/en not_active Expired - Fee Related
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0495105A (en) * | 1990-08-07 | 1992-03-27 | Fanuc Ltd | Ac servo motor control system |
JPH04355326A (en) * | 1991-05-31 | 1992-12-09 | Fanuc Ltd | Rotary encoder with electrical angle output function |
JPH0583978A (en) * | 1991-09-17 | 1993-04-02 | Matsushita Electric Ind Co Ltd | Magnetic pole position detector for servo motor |
JPH05137374A (en) * | 1991-11-06 | 1993-06-01 | Matsushita Electric Ind Co Ltd | AC servo motor sine wave current command value generation device |
JPH0675635A (en) * | 1992-08-26 | 1994-03-18 | Ntn Corp | Driving circuit for ac servo motor |
JPH07123768A (en) * | 1993-10-26 | 1995-05-12 | Matsushita Electric Ind Co Ltd | Digital AC servo device |
JP2000135829A (en) * | 1998-08-28 | 2000-05-16 | Toshiba Tec Corp | Printer control device |
US6170933B1 (en) * | 1998-08-28 | 2001-01-09 | Toshiba Tec Kabushiki Kaisha | Printer control apparatus |
JP2003103775A (en) * | 2001-10-01 | 2003-04-09 | Fuji Xerox Co Ltd | Printing controlling method |
JP2003244984A (en) * | 2002-02-20 | 2003-08-29 | Yokogawa Electric Corp | Control device for motor |
JP2010096579A (en) * | 2008-10-15 | 2010-04-30 | Yaskawa Electric Corp | Encoder signal processing circuit and encoder |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019086410A (en) * | 2017-11-07 | 2019-06-06 | 株式会社松尾製作所 | Electric angle acquisition system, electric angle acquisition method, electric angle acquisition program, electric angle acquisition characteristic measuring system, electric angle acquisition characteristic measuring method and electric angle acquisition characteristic measuring program |
JP2023024682A (en) * | 2017-11-07 | 2023-02-16 | 株式会社松尾製作所 | Electrical angle acquisition system, electrical angle acquisition method, electrical angle acquisition program, electrical angle acquisition characteristic measuring system, electrical angle acquisition characteristic measuring method, and electrical angle acquisition characteristic measuring program |
JP7251751B2 (en) | 2017-11-07 | 2023-04-04 | 株式会社松尾製作所 | Electrical angle acquisition system, electrical angle acquisition method, electrical angle acquisition program, electrical angle acquisition characteristic measurement system, electrical angle acquisition characteristic measurement method, and electrical angle acquisition characteristic measurement program |
JP7391341B2 (en) | 2017-11-07 | 2023-12-05 | 株式会社松尾製作所 | Electrical angle acquisition system, electrical angle acquisition method, and electrical angle acquisition program |
Also Published As
Publication number | Publication date |
---|---|
JP5765263B2 (en) | 2015-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6272508B2 (en) | Angular error correction device and angular error correction method for position detector | |
JP5744567B2 (en) | Motor control device, motor control device manufacturing program, and motor control device manufacturing method | |
CN111752531B (en) | Integer division device and motor control device | |
CN116500977A (en) | Servo control system, control data conversion method and computing device | |
JP2016052166A (en) | POSITION ESTIMATION DEVICE, MOTOR DRIVE CONTROL DEVICE, POSITION ESTIMATION METHOD, AND PROGRAM | |
JP5765263B2 (en) | Motor control device and motor control method | |
JP6183554B2 (en) | Periodic disturbance automatic suppression device | |
JP2013198229A (en) | Δς modulation a/d converter and motor controller including the same | |
CN109768755B (en) | Semiconductor device, angle value correction circuit and method thereof | |
JP2008236990A (en) | Motor control apparatus | |
JP6552373B2 (en) | Motor controller | |
JP6305573B2 (en) | Angular error correction device and angular error correction method for position detector | |
JP2015149836A (en) | Motor controller correcting interpolation error of position detector | |
JP2013250084A (en) | Rotation angle detection device, image processing device, and rotation angle detection method | |
JP5912242B2 (en) | Inverter control device and inverter control system | |
CN1489276A (en) | Control device for alternating-current motor | |
JP6119389B2 (en) | Rotation angle detection device, image processing device, and rotation angle detection method | |
JP2009278733A (en) | Motor controller | |
CN109849688B (en) | Motor control method, device and controller of electric bicycle, storage medium | |
JP2008109811A (en) | Initial phase detector for synchronous motor | |
JP2018023203A (en) | Electric motor control device | |
JP5999416B2 (en) | Control device for synchronous motor | |
JP2014204489A (en) | Rotary machine control device | |
CN119995419A (en) | Multipole motor control method, electronic device, and computer-readable storage medium | |
JP5910296B2 (en) | Induction machine control device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140409 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150224 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150303 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150311 |
|
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: 20150519 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150601 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5765263 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
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 |