JP5900186B2 - Motor control device - Google Patents
Motor control device Download PDFInfo
- Publication number
- JP5900186B2 JP5900186B2 JP2012143215A JP2012143215A JP5900186B2 JP 5900186 B2 JP5900186 B2 JP 5900186B2 JP 2012143215 A JP2012143215 A JP 2012143215A JP 2012143215 A JP2012143215 A JP 2012143215A JP 5900186 B2 JP5900186 B2 JP 5900186B2
- Authority
- JP
- Japan
- Prior art keywords
- signal
- time
- interrupt
- trigger signal
- unit
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Control Of Motors That Do Not Use Commutators (AREA)
Description
本発明は、ロータと多相巻線を設けたステータとを備えるモータを、PWM制御するモータ制御装置に関するものである。 The present invention relates to a motor control device that PWM-controls a motor including a rotor and a stator provided with multiphase windings.
従来、例えば特許文献1に記載のように、ロータと多相巻線を設けたステータとを備えるモータを、PWM制御するモータ制御装置が知られている。
Conventionally, as described in
このモータ制御装置では、位置検出回路によって、所定電気角(例えば電気角60度)ごとにロータの回転位置が検出される。そして、回転位置検出のタイミングで、PWMデューティの算出など、マイコンによる割り込み処理(ソフト処理)が実行される。 In this motor control device, the rotational position of the rotor is detected for each predetermined electrical angle (for example, electrical angle of 60 degrees) by the position detection circuit. Then, interrupt processing (software processing) by the microcomputer, such as calculation of PWM duty, is executed at the timing of rotational position detection.
ところで、マイコンの割り込み処理は、上記した所定電気角の回転時間内に終了されなければならない。このため、従来、マイコンの性能は、マイコンの割り込み処理に要する時間が、モータの最高回転時における所定電気角の回転時間よりも短くなるように決定される。したがって、標準使用回転域と最高回転数がかけ離れており、不定期で高回転域が用いられるような場合にも、高性能CPUを有するマイコンを用いなければならず、コストが高くなるという問題があった。 By the way, the interrupt processing of the microcomputer must be completed within the rotation time of the predetermined electrical angle described above. For this reason, conventionally, the performance of the microcomputer is determined so that the time required for the interrupt processing of the microcomputer is shorter than the rotation time of the predetermined electrical angle at the maximum rotation of the motor. Therefore, the standard rotational speed is far from the maximum rotational speed, and even when the high rotational speed is used irregularly, a microcomputer having a high-performance CPU must be used, which increases the cost. there were.
また、同一仕様のモータ制御装置により、最高回転数のより高いモータの制御を行う場合、マイコンの割り込み処理が所定電気角の回転時間内に終了しないという問題が起こりえる。 Further, when a motor with a higher maximum speed is controlled by a motor controller of the same specification, there may be a problem that the interrupt process of the microcomputer does not end within the rotation time of a predetermined electrical angle.
本発明は上記問題点に鑑み、低コストで、より高い回転数まで制御することができるモータ制御装置を提供することを目的とする。 In view of the above problems, an object of the present invention is to provide a motor control device that can control up to a higher rotational speed at low cost.
上記目的を達成するために、本発明は、ロータ(100a)と多相巻線を設けたステータとを備えるモータ(100)を、PWM制御するモータ制御装置であって、ロータの回転位置信号を出力する位置検出手段(11)と、回転位置信号に基づいて、ロータが所定電気角回転するごとにキャプチャ信号を生成する位置検出部(25)と、キャプチャ信号に基づいて決定されるタイミングで、割り込みトリガ信号を生成するタイマ部(26)と、割り込みトリガ信号により割り込み処理を実行し、PWMデューティを算出する演算部(24)と、算出されたPWMデューティに基づいてPWM信号を出力するPWM出力部(27)と、を備え、タイマ部は、演算部での割り込み処理が、所定電気角に対応する割り込み間隔内で終了しない場合、割り込みトリガ信号の生成周期が所定電気角のn倍(nは2以上の整数)に対応する時間となるように、割り込みトリガ信号を生成するタイミングを変更する機能を有し、演算部は、割り込み処理の終了にともなって処理終了タイミング信号を出力し、タイマ部は、キャプチャ信号に基づいて、所定電気角回転するのに要する回転時間を算出するとともに、処理終了タイミング信号に基づいて、演算部での割り込み処理時間を算出して、回転時間と割り込み処理時間とを比較し、割り込み処理時間と回転時間との差分が、予め設定された閾値よりも大きい場合、生成周期が所定電気角に対応する時間となるように、割り込みトリガ信号を生成し、差分が閾値よりも小さい場合、生成周期が所定電気角のn倍(nは2以上の整数)に対応する時間となるように、割り込みトリガ信号を生成することを特徴とする。 In order to achieve the above object, the present invention provides a motor control device that PWM-controls a motor (100) including a rotor (100a) and a stator provided with a multiphase winding, and a rotational position signal of the rotor is obtained. Based on the position detection means (11) for output, the position detection unit (25) for generating a capture signal every time the rotor rotates by a predetermined electrical angle based on the rotation position signal, and the timing determined based on the capture signal, A timer unit (26) that generates an interrupt trigger signal, an interrupt process based on the interrupt trigger signal, a calculation unit (24) that calculates a PWM duty, and a PWM output that outputs a PWM signal based on the calculated PWM duty Unit (27), and the timer unit does not end interrupt processing in the arithmetic unit within an interrupt interval corresponding to a predetermined electrical angle. As the generation cycle of the interrupt trigger signal is time corresponding to n times (n is an integer of 2 or more) of a predetermined electrical angle, it has a function of changing the timing of generating an interrupt trigger signal, calculation unit, an interruption A processing end timing signal is output at the end of processing, and the timer unit calculates a rotation time required to rotate a predetermined electrical angle based on the capture signal, and at the calculation unit based on the processing end timing signal The interrupt processing time is calculated, the rotation time is compared with the interrupt processing time, and if the difference between the interrupt processing time and the rotation time is greater than a preset threshold, the generation cycle corresponds to a predetermined electrical angle When an interrupt trigger signal is generated so as to be time and the difference is smaller than the threshold value, the generation cycle corresponds to n times the predetermined electrical angle (n is an integer of 2 or more). So as to be between, and generating an interrupt trigger signal.
タイマ部は、所定電気角に対応する時間(以下、第1回転時間と示す)内で割り込み処理が終了する場合、第1回転時間を生成周期として割り込みトリガ信号を生成する。換言すれば、キャプチャ信号ごとに割り込みトリガ信号を生成する。一方、モータが高回転となり、第1回転時間内で割り込み処理が終了しない場合、所定電気角のn倍(nは2以上の整数)に対応する時間(以下、第2回転時間と示す)を生成周期として割り込みトリガ信号を生成する。換言すれば、キャプチャ信号ごとではなく、例えばキャプチャ信号ひとつおきに割り込みトリガ信号を生成する。このように、割り込みトリガ信号を生成するタイミングを変更することができるので、高性能CPUを有するマイコンを用いなくとも、より高い回転数まで制御することができる。 When the interrupt process is completed within a time corresponding to a predetermined electrical angle (hereinafter, referred to as a first rotation time), the timer unit generates an interrupt trigger signal with the first rotation time as a generation cycle. In other words, an interrupt trigger signal is generated for each capture signal. On the other hand, when the motor is at a high speed and the interruption process is not completed within the first rotation time, a time corresponding to n times the predetermined electrical angle (n is an integer of 2 or more) (hereinafter referred to as the second rotation time). An interrupt trigger signal is generated as a generation cycle. In other words, an interrupt trigger signal is generated not for every capture signal but for every other capture signal, for example. Thus, since the timing for generating the interrupt trigger signal can be changed, it is possible to control up to a higher rotational speed without using a microcomputer having a high-performance CPU.
以下、本発明の実施形態を図に基づいて説明する。なお、各実施形態において、共通乃至関連する要素には同一の符号を付与するものとする。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In each embodiment, common or related elements are given the same reference numerals.
(第1実施形態)
図1及び図2に示すように、モータ100は、例えば永久磁石を有するロータ100aと、3相巻線を設けたステータ100bと、を有する。このようなモータ100をPWM制御するモータ制御装置10は、位置検出手段としてのホール素子11と、マイクロコンピュータ12(以下、マイコン12と示す)を有している。
(First embodiment)
As shown in FIGS. 1 and 2, the
ホール素子11は、ロータ100aの回転位置を検出するため、モータ100に取り付けられている。本実施形態では、図2に示すようにホール素子11を3つ有しており、3つのホール素子11が、ロータ100aの回転中心に対し、120度ごとに配置されている。
The
なお、位置検出手段としては、ホール素子11に限定されるものではなく、周知の他の手段、例えばモータ100の各相の誘起電圧を演算処理する回路を採用することもできる。また、ホール素子11の個数は上記例に限定されるものではない。
Note that the position detecting means is not limited to the
マイコン12は、図1に示すように、CPU20、ROM21、RAM22、モータ制御回路23、及び図示しないアドレスバス・データバスを有している。CPU20は、ROM21に格納された制御プログラムに従ってRAM22を用い、ソフト処理を実行する。すなわち、CPU20、ROM21、及びRAM22は、ソフト処理部24として機能する。このソフト処理部24は、特許請求の範囲に記載の演算部に相当する。また、CPU20は、アドレスバス・データバスを介して、モータ制御回路23を制御する。
As shown in FIG. 1, the
モータ制御回路23は、キャプチャ信号を生成する位置検出部25、割り込みトリガ信号を生成するタイマ部26、及びPWM信号を出力するPWM出力部27と、を備えている。
The
位置検出部25は、ホール素子11の出力する回転位置信号に基づいて、ロータ100aが所定電気角回転するごとに、キャプチャ信号を生成し、タイマ部26に出力する。本実施形態では、図2に示すようにロータ100aの磁極が2極であり、ホール素子11が120度ごとに配置されているため、周知のように電気角60度ごとにキャプチャ信号を生成する。なお、位置検出部25からタイマ部26に出力される信号は、「0」又は「1」であり、上記キャプチャ信号とは「1」である。また、位置検出部25は、ホール素子11の出力する回転位置信号に基づいて、通電タイミング生成信号を生成し、PWM出力部27に出力する。この通電タイミング生成信号は、転流タイミングを示すものであり、キャプチャ信号同様、電気角60度ごとに生成される。位置検出部25からPWM出力部27に出力される信号は、「0」又は「1」であり、上記通電タイミング信号とは「1」である。
The
タイマ部26は、キャプチャ信号に基づいて決定されるタイミングで、割り込みトリガ信号を生成し、ソフト処理部24に出力する。本実施形態に係るモータ制御装置10は、このタイマ部26に特徴があり、その詳細については後述する。
The
ソフト処理部24は、割り込みトリガ信号により割り込み処理を実行し、PWMデューティを算出する。具体的には、割り込みトリガ信号から回転速度を算出する。そして、算出した回転速度と設定速度との偏差でPI制御を行い、PWMデューティを算出する。
The
PWM出力部27は、算出されたPWMデューティに基づいてPWM信号を出力する。位置検出部25から出力された通電タイミング生成信号を基準として、PWM信号の出力、すなわち3相巻線への通電パターンの切替がなされる。このPWM信号は、ゲートドライバ101を介してインバータ102に入力される。
The
次に、タイマ部26について、図3及び図4を用いて説明する。
Next, the
図3に示すように、タイマ部26は、キャプチャ制御部30、タイマカウンタ31、時間比較制御部32、記憶部33を有する。キャプチャ制御部30は、タイマカウンタ31(例えばフリーランタイマ)のタイマカウント値から、キャプチャ信号が入力されてから次のキャプチャ信号が入力されるまでの時間を算出する。上記したように、キャプチャ信号は電気角60度ごとに生成されるため、キャプチャ制御部30で算出される時間は、ロータ100aが電気角60度回転するのに要する時間である。以下、この時間を60度回転時間と示す。そして、時間比較制御部32は、算出された60度回転時間と、記憶部33に予め設定された基準時間とを比較し、比較結果に応じて、割り込みトリガ信号を選択的に生成・出力する。なお、基準時間は、ソフト処理部24によるソフト処理時間(PWMデューティ算出時間)に所定のマージンを加味して設定されている。
As shown in FIG. 3, the
時間比較制御部32は、時間比較器40、NOTゲート41、割り込みマスク制御部42、及びORゲート43を有する。時間比較器40は、キャプチャ制御部30で算出された60度回転時間と、記憶部33から読みだした基準時間とを比較し、60度回転時間が基準時間よりも長い場合、「1」を出力する。一方、60度回転時間が基準時間よりも短い場合、「0」を出力する。この判定信号は、ORゲート43に入力されるとともに、NOTゲート41を介して割り込みマスク制御部42に入力される。
The time
時間比較器40から「1」が出力されると、割り込みマスク制御部42には「0」が入力され、割り込みマスク制御部42は、ORゲート43に対して「0」を出力する。このため、ORゲート43、すなわちタイマ部26から、「1」が出力される。すなわち、割り込みトリガ信号が生成・出力される。
When “1” is output from the
一方、時間比較器40から「0」が出力されると、割り込みマスク制御部42には「1」が入力される。割り込みマスク制御部42は、入力信号を累算し、その値が1を超えると、1を出力する。すなわち、1回目の「1」が入力されると、累算値は「1」となり、割り込みマスク制御部42から「0」が出力される。このため、ORゲート43への入力は、ともに「0」となり、ORゲート43(タイマ部26)から「0」が出力される。すなわち、割り込みトリガ信号が生成されない。2回目の「1」が入力されると、累算値は「2」となり1を超えるため、割り込みマスク制御部42から「1」が出力される。このため、ORゲート43(タイマ部26)から「1」が出力される。すなわち、割り込みトリガ信号が生成・出力される。また、割り込みマスク制御部42は、「0」が入力される、又は、累算値が「2」となり、「1」を出力すると、累算値をリセットする。換言すれば、ORゲート43から「1」が出力される、すなわち割り込みトリガゲート信号が出力されると、累算値はリセットされる。
On the other hand, when “0” is output from the
このように、本実施形態では、60度回転時間が基準時間よりも長いと、60度回転時間を生成周期として割り込みトリガ信号を生成する。また、60度回転時間が基準時間よりも短くなると、割り込みトリガ信号の生成タイミングを1回分マスクし、120度回転時間を生成周期として割り込みトリガ信号を生成する。 As described above, in this embodiment, when the 60-degree rotation time is longer than the reference time, the interrupt trigger signal is generated with the 60-degree rotation time as a generation period. When the 60-degree rotation time is shorter than the reference time, the interrupt trigger signal generation timing is masked once, and the interrupt trigger signal is generated with the 120-degree rotation time as the generation period.
また、割り込みマスク制御部42は、「1」を出力するとともに、1回分マスクしたことを示すマスク信号を、ソフト処理部24に出力する。したがって、ソフト処理部24は、マスク信号が入力されると、120度回転時間として、回転速度を算出する。
In addition, the interrupt
次に、図5を用いて、PWM出力において実行される処理について説明する。 Next, processing executed in PWM output will be described with reference to FIG.
モータ制御装置10は、イグニッションスイッチがオンされて電力が供給されると、動作を開始して図5の処理を実行する。そして、電力が供給された状態で、以下に示す処理を繰り返し実行する。
When the ignition switch is turned on and electric power is supplied, the
先ず、ホール素子11が、ロータ100aの回転位置を検出し、回転位置信号を出力する(ステップS10)。この回転位置信号はマイコン12に入力され、位置検出部25は、回転位置信号の変化タイミングから、ロータ100aが電気角60度回転するごとにキャプチャ信号を生成する(ステップS11)。また、位置検出部25は、回転位置信号の変化タイミングから、通電タイミング生成信号を生成する(ステップS12)。
First, the
次いで、タイマ部26は、上記したように、キャプチャ信号に基づいて60度回転時間を生成する(ステップS13)。そして、生成した60度回転時間と基準時間とを比較する(ステップS14)。その結果、60度回転時間が基準時間よりも長い場合は、割り込みトリガ信号を生成する(ステップS16)。
Next, as described above, the
一方、ステップS14にて、60度回転時間が基準時間よりも短い場合は、上記した累算値が1より大きいか否かを判定する(ステップS15)。すなわち、割り込みトリガ信号の生成のマスクが1回目なのか否かを判定する。そして、ステップS15において、累算値が「1」、すなわちマスクが1回目の場合に限り、ステップ10に戻って、ステップS10〜ステップS14を繰り返す。そして、ステップS14において、60度回転時間が基準時間よりも長い場合は、割り込みトリガ信号を生成する(ステップS16)。この場合、120度回転時間を生成周期として、割り込みトリガ信号が生成される。なお、ステップS15において、累算値が「2」の場合も、割り込みトリガ信号を生成する(ステップS16)。この場合も、120度回転時間を生成周期として、割り込みトリガ信号が生成される。 On the other hand, if the 60-degree rotation time is shorter than the reference time in step S14, it is determined whether or not the accumulated value is greater than 1 (step S15). That is, it is determined whether or not the mask for generating the interrupt trigger signal is the first time. In step S15, only when the accumulated value is “1”, that is, when the mask is the first time, the process returns to step 10, and steps S10 to S14 are repeated. In step S14, if the 60-degree rotation time is longer than the reference time, an interrupt trigger signal is generated (step S16). In this case, an interrupt trigger signal is generated with a 120-degree rotation time as a generation cycle. In step S15, an interrupt trigger signal is also generated when the accumulated value is “2” (step S16). In this case as well, an interrupt trigger signal is generated with a 120-degree rotation time as a generation cycle.
上記したように、割り込みトリガ信号の生成とともに、タイマ部26(割り込みマスク制御部42)は累算値をリセットする(ステップS17)。そして、ソフト処理部24は、割り込みトリガ信号及び上記したマスク信号により、上記したソフト処理を実行する。すなわちPWMディーティを算出する(ステップS18)。また、算出されたPWMデューティ及び通電タイミング生成信号に基づいて、PWM出力部27は、ゲートドライバ101に対してPWM信号を出力する。
As described above, along with the generation of the interrupt trigger signal, the timer unit 26 (interrupt mask control unit 42) resets the accumulated value (step S17). Then, the
なお、ソフト処理部24によるソフト処理(ステップS18)は、上記したように、CPU20が制御プログラムに従って行うソフトウェア処理であり、それ以外の処理は、マイコン2の内部に構成されているモータ制御回路23(ハードウェアロジック)により行われる処理である。
The software processing (step S18) by the
次に、本実施形態に係るモータ制御装置10の特徴部分の効果について説明する。
Next, the effect of the characteristic part of the
タイマ部26は、60度回転時間が基準時間よりも長い場合、すなわち60度回転時間内でソフト処理部24のソフト処理が終了する場合、60度回転時間を生成周期として割り込みトリガ信号を生成する。換言すれば、キャプチャ信号ごとに割り込みトリガ信号を生成する。
When the 60 ° rotation time is longer than the reference time, that is, when the software processing of the
一方、モータ100が高回転となり、60度回転時間が基準時間よりも短くなる、すなわち、60度回転時間内でソフト処理が終了しない場合、図2及び図6に示すように、120度回転時間を生成周期として割り込みトリガ信号を生成する。このように、割り込みトリガ信号を生成するタイミングを変更することができるので、高性能CPUを有するマイコンを用いなくとも、より高い回転数まで制御することができる。
On the other hand, when the
なお、本実施形態では、割り込みトリガ信号の生成タイミングを1回分マスクする例を示した。しかしながら、マスク回数は1回に限定されるものではない。例えば2回としても良い。この場合、180度回転時間を生成周期として、割り込みトリガ信号が生成されることとなる。 In the present embodiment, an example in which the generation timing of the interrupt trigger signal is masked once is shown. However, the number of masks is not limited to one. For example, it may be twice. In this case, an interrupt trigger signal is generated with a 180 ° rotation time as a generation cycle.
(第2実施形態)
本実施形態において、上記実施形態に示したモータ制御装置10と共通する部分についての説明は割愛する。
(Second Embodiment)
In this embodiment, the description of the parts common to the
本実施形態の特徴は、ソフト処理部24がソフト処理の処理終了タイミング信号を出力する。そして、タイマ部26が、図7に示すように、処理終了タイミング信号に基づいてソフト処理部24でのソフト処理時間を算出して、60度回転時間とソフト処理時間を用いて、割り込みトリガ信号の生成タイミングを決定することにある。
The feature of this embodiment is that the
図7に示すように、タイマ部26は、キャプチャ制御部30、タイマカウンタ31、時間比較制御部32を有する。キャプチャ制御部30は、第1実施形態同様、タイマカウンタ31のタイマカウント値から60度回転時間を生成する。また、処理終了タイミング信号と割り込みトリガ信号に基づいて、ソフト処理部24でのソフト処理時間を算出する。
As shown in FIG. 7, the
時間比較制御部32は、図8に示すように、時間比較器40、NOTゲート41、割り込みマスク制御部42、ORゲート43、及び記憶部44を有する。時間比較器40は、キャプチャ制御部30で算出された60度回転時間及びソフト処理時間の差分(ソフト処理時間−60度回転時間)と、記憶部44から読みだした閾値とを比較し、差分が閾値よりも大きい場合、「1」を出力する。一方、差分が閾値よりも小さい場合、「0」を出力する。この判定信号は、ORゲート43に入力されるとともに、NOTゲート41を介して割り込みマスク制御部42に入力される。なお、閾値は、ソフト処理部24のソフト処理時間に対するマージンが設定されている。
As shown in FIG. 8, the time
時間比較器40から「1」が出力されると、割り込みマスク制御部42には「0」が入力され、割り込みマスク制御部42は、ORゲート43に対して「0」を出力する。このため、ORゲート43、すなわちタイマ部26から、「1」が出力される。すなわち、割り込みトリガ信号が生成・出力される。
When “1” is output from the
一方、時間比較器40から「0」が出力されると、割り込みマスク制御部42には「1」が入力される。割り込みマスク制御部42は、入力信号を累算し、その値が1を超えると、1を出力する。すなわち、1回目の「1」が入力されると、累算値は「1」となり、割り込みマスク制御部42から「0」が出力される。このため、ORゲート43への入力は、ともに「0」となり、ORゲート43(タイマ部26)から「0」が出力される。すなわち、割り込みトリガ信号が生成されない。2回目の「1」が入力されると、累算値は「2」となり1を超えるため、割り込みマスク制御部42から「1」が出力される。このため、ORゲート43(タイマ部26)から「1」が出力される。すなわち、割り込みトリガ信号が生成・出力される。また、割り込みマスク制御部42は、「0」が入力される、又は、累算値が「2」となり、「1」を出力すると、累算値をリセットする。換言すれば、ORゲート43から「1」が出力される、すなわち割り込みトリガゲート信号が出力されると、累算値はリセットされる。
On the other hand, when “0” is output from the
このように、本実施形態では、ソフト処理時間と60度回転時間の差分が閾値よりも大きいと、60度回転時間を生成周期として割り込みトリガ信号を生成する。また、差分が閾値より小さくなると、割り込みトリガ信号の生成タイミングを1回分マスクし、120度回転時間を生成周期として割り込みトリガ信号を生成する。 As described above, in this embodiment, when the difference between the software processing time and the 60-degree rotation time is larger than the threshold value, the interrupt trigger signal is generated using the 60-degree rotation time as a generation cycle. When the difference becomes smaller than the threshold value, the interrupt trigger signal generation timing is masked once, and the interrupt trigger signal is generated with the 120 ° rotation time as the generation cycle.
また、割り込みマスク制御部42は、「1」を出力するとともに、1回分マスクしたことを示すマスク信号を、ソフト処理部24に出力する。したがって、ソフト処理部24は、マスク信号が入力されると、120度回転時間として、回転速度を算出する。
In addition, the interrupt
次に、図9を用いて、PWM出力において実行される処理について説明する。本実施形態における処理は、第1実施形態に示した処理(図5参照)とほぼ同じであるので、異なる点のみを説明する。 Next, processing executed in PWM output will be described with reference to FIG. The processing in the present embodiment is substantially the same as the processing shown in the first embodiment (see FIG. 5), so only the differences will be described.
ステップS20からステップS23までは、第1実施形態に示したステップS10からステップS13と同じである。ステップS23に次いで、タイマ部26は、上記したように、処理終了タイミング信号に基づいて、ソフト処理部24のソフト処理時間を算出する(ステップS24)。そして、ソフト処理時間と60度回転時間との差分と、閾値とを比較する(ステップS25)。その結果、差分が閾値より大きい場合は、割り込みトリガ信号を生成する(ステップS27)。
Steps S20 to S23 are the same as steps S10 to S13 shown in the first embodiment. Following step S23, the
一方、ステップS25にて、差分が閾値より小さい場合は、上記した累算値が1より大きいか否かを判定する(ステップS26)。すなわち、割り込みトリガ信号の生成のマスクが1回目なのか否かを判定する。そして、ステップS26において、累算値が「1」、すなわちマスクが1回目の場合に限り、ステップ20に戻って、ステップS20〜ステップS25を繰り返す。そして、ステップS25において、60度回転時間が基準時間よりも長い場合は、割り込みトリガ信号を生成する(ステップS27)。この場合、120度回転時間を生成周期として、割り込みトリガ信号が生成される。なお、ステップS26において、累算値が「2」の場合も、割り込みトリガ信号を生成する(ステップS27)。この場合も、120度回転時間を生成周期として、割り込みトリガ信号が生成される。 On the other hand, if the difference is smaller than the threshold value in step S25, it is determined whether or not the above-described accumulated value is larger than 1 (step S26). That is, it is determined whether or not the mask for generating the interrupt trigger signal is the first time. In step S26, only when the accumulated value is “1”, that is, when the mask is the first time, the process returns to step 20, and steps S20 to S25 are repeated. If the 60-degree rotation time is longer than the reference time in step S25, an interrupt trigger signal is generated (step S27). In this case, an interrupt trigger signal is generated with a 120-degree rotation time as a generation cycle. In step S26, an interrupt trigger signal is also generated when the accumulated value is “2” (step S27). In this case as well, an interrupt trigger signal is generated with a 120-degree rotation time as a generation cycle.
ステップ28からステップ30は、第1実施形態に示したステップS17からステップS19と同じであるため、説明は割愛する。 Since Step 28 to Step 30 are the same as Step S17 to Step S19 shown in the first embodiment, description thereof will be omitted.
次に、本実施形態に係るモータ制御装置10の特徴部分の効果について説明する。
Next, the effect of the characteristic part of the
タイマ部26は、差分が閾値より大きい場合、すなわち60度回転時間内でソフト処理部24のソフト処理が終了する場合、60度回転時間を生成周期として割り込みトリガ信号を生成する。換言すれば、キャプチャ信号ごとに割り込みトリガ信号を生成する。
When the difference is larger than the threshold value, that is, when the software processing of the
一方、モータ100が高回転となり、差分が閾値よりも小さくなる、すなわち、60度回転時間内でソフト処理が終了しない場合、図10に示すように、120度回転時間を生成周期として割り込みトリガ信号を生成する。このように、割り込みトリガ信号を生成するタイミングを変更することができるので、高性能CPUを有するマイコンを用いなくとも、より高い回転数まで制御することができる。
On the other hand, when the
本実施形態においても、割り込みトリガ信号の生成タイミングを1回分マスクする例を示した。しかしながら、マスク回数は1回に限定されるものではない。例えば2回としても良い。この場合、180度回転時間を生成周期として、割り込みトリガ信号が生成されることとなる。 Also in this embodiment, an example in which the generation timing of the interrupt trigger signal is masked once is shown. However, the number of masks is not limited to one. For example, it may be twice. In this case, an interrupt trigger signal is generated with a 180 ° rotation time as a generation cycle.
また、ソフト処理部24のソフト処理時間に対するマージンを閾値とする例を示した。しかしながら、差分をとる60度回転時間の、1つ前の60度回転時間の例えば10%を閾値としても良い。
In addition, an example in which the margin for the software processing time of the
(第3実施形態)
本実施形態において、上記実施形態に示したモータ制御装置10と共通する部分についての説明は割愛する。
(Third embodiment)
In this embodiment, the description of the parts common to the
本実施形態の特徴は、ソフト処理部24が、ソフト処理の実行中、及び、ソフト処理が終了し、次のソフト処理が実行されるまでの待機中、のいずれであるかを示す状態信号を出力する。そして、タイマ部26は、待機中を示す状態信号が入力された状態で、キャプチャ信号が入力されると、割り込みトリガ信号を生成することにある。
A feature of the present embodiment is that a status signal indicating whether the
図11に示すように、タイマ部26は、ANDゲート34、及び、マスク回数計数部35を有する。ANDゲート34には、キャプチャ信号と状態信号が入力される。状態信号として、ソフト処理の実行中には「0」、待機中には「1」が入力される。したがって、待機中においてキャプチャ信号が入力されると、ANDゲート34は「1」、すなわち割り込みトリガ信号を生成・出力する。
As shown in FIG. 11, the
マスク回数計数部35には、状態信号とキャプチャ信号が入力される。マスク回数計数部35は、状態信号が「0」となってから、キャプチャ信号が何回入力されたかをカウントする。このカウント値は、キャプチャ信号が入力されたのに割り込みトリガ信号が生成されなかったマスク回数であるので、このカウント値をマスク信号として、ソフト処理部24に出力する。ソフト処理部24は、割り込みトリガ信号とこのマスク信号とにより、回転速度を算出する。なお、カウント値は、マスク回数計数部35に「1」が入力されると、すなわち待機中を示す状態信号が入力されるとリセットされる。
A state signal and a capture signal are input to the mask
次に、図12を用いて、PWM出力において実行される処理について説明する。本実施形態における処理は、第1実施形態に示した処理と同じ部分についての説明は割愛する。 Next, processing executed in PWM output will be described with reference to FIG. The processing in the present embodiment will not be described for the same parts as the processing shown in the first embodiment.
ステップS40からステップS42までは、第1実施形態に示したステップS10からステップS12と同じである。次に、ステップS43において、タイマ部26を構成するANDゲート34に、状態信号として待機中を示す信号「1」が入力されており、さらに、ステップS44において、ANDゲート34にキャプチャ信号が入力された場合のみ、タイマ部26(ANDゲート34)は割り込みトリガ信号を生成・出力する。
Steps S40 to S42 are the same as steps S10 to S12 shown in the first embodiment. Next, in step S43, the signal “1” indicating standby is input as a status signal to the AND
ステップS43において、状態信号がソフト処理中を示す信号「0」の場合、割り込みトリガ信号の生成をマスクするため、ステップS40に戻る。また、ステップS44において、待機中を示す信号が入力されているにもかかわらず、キャプチャ信号の入力がない場合は、ステップS43に戻る。 In step S43, if the status signal is a signal “0” indicating that software processing is in progress, the process returns to step S40 in order to mask generation of the interrupt trigger signal. In step S44, if no capture signal is input even though a signal indicating standby is input, the process returns to step S43.
ステップS46,S47は、第1実施形態に示したステップS18,S19と同じであるため、説明は割愛する。 Steps S46 and S47 are the same as steps S18 and S19 shown in the first embodiment, and thus description thereof is omitted.
次に、本実施形態に係るモータ制御装置10の特徴部分の効果について説明する。
Next, the effect of the characteristic part of the
本実施形態のタイマ部26は、図13に示すように、待機中を示す状態信号が入力された状態で、キャプチャ信号が入力されると、割り込みトリガ信号を生成する。一方、ソフト処理中を示す状態信号が入力された状態では、キャプチャ信号が入力されても、割り込みトリガ信号を生成しない。これによれば、60度回転時間内でソフト処理が終了する場合、60度回転時間を生成周期として割り込みトリガ信号を生成することができる。一方、モータ100が高回転となり、60度回転時間内でソフト処理が終了しない場合、ソフト処理時間に応じて、所定電気角のn倍(nは2以上の整数)に対応する時間を生成周期として割り込みトリガ信号を生成することができる。このように、割り込みトリガ信号を生成するタイミングを変更することができるので、高性能CPUを有するマイコンを用いなくとも、より高い回転数まで制御することができる。
As shown in FIG. 13, the
特に本実施形態によれば、マスク回数の制限はないため、モータ100の回転数に応じて、割り込みトリガ信号を生成するタイミング(換言すれば生成周期)を変更することができる。
In particular, according to the present embodiment, since the number of masks is not limited, the timing (in other words, the generation cycle) for generating the interrupt trigger signal can be changed according to the number of rotations of the
以上、本発明の好ましい実施形態について説明したが、本発明は上述した実施形態になんら制限されることなく、本発明の主旨を逸脱しない範囲において、種々変形して実施することが可能である。 The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit of the present invention.
10・・・モータ制御装置、11・・・ホール素子(位置検出手段)、12・・・マイクロコンピュータ、20・・・CPU、21・・・ROM、22・・・RAM、23・・・モータ制御回路、24・・・ソフト処理部(演算部)、25・・・位置検出部、26・・・タイマ部、27・・・PWM出力部、30・・・キャプチャ制御部、31・・・タイマカウンタ、32・・・時間比較制御部、33・・・記憶部、34・・・ANDゲート、35・・・マスク回数計数部、40・・・時間比較器、41・・・NOTゲート、42・・・割り込みマスク制御部、43・・・ORゲート、44・・・記憶部、100・・・モータ、100a・・・ロータ、100b・・・ステータ、101・・・ゲートドライバ、102・・・インバータ
DESCRIPTION OF
Claims (1)
前記ロータの回転位置信号を出力する位置検出手段(11)と、
前記回転位置信号に基づいて、前記ロータが所定電気角回転するごとにキャプチャ信号を生成する位置検出部(25)と、
前記キャプチャ信号に基づいて決定されるタイミングで、割り込みトリガ信号を生成するタイマ部(26)と、
前記割り込みトリガ信号により割り込み処理を実行し、PWMデューティを算出する演算部(24)と、
算出された前記PWMデューティに基づいてPWM信号を出力するPWM出力部(27)と、を備え、
前記タイマ部は、前記演算部での割り込み処理が、前記所定電気角に対応する時間内で終了しない場合、前記割り込みトリガ信号の生成周期が、前記所定電気角のn倍(nは2以上の整数)に対応する時間となるように、前記割り込みトリガ信号を生成するタイミングを変更する機能を有し、
前記演算部は、前記割り込み処理の終了にともなって処理終了タイミング信号を出力し、
前記タイマ部は、
前記キャプチャ信号に基づいて、前記所定電気角回転するのに要する回転時間を算出するとともに、前記処理終了タイミング信号に基づいて、前記演算部での割り込み処理時間を算出して、前記回転時間と前記割り込み処理時間とを比較し、
前記割り込み処理時間と前記回転時間との差分が、予め設定された閾値よりも大きい場合、前記生成周期が前記所定電気角に対応する時間となるように、前記割り込みトリガ信号を生成し、
前記差分が前記閾値よりも小さい場合、前記生成周期が前記所定電気角のn倍(nは2以上の整数)に対応する時間となるように、前記割り込みトリガ信号を生成することを特徴とするモータ制御装置。 A motor control device that PWM-controls a motor (100) including a rotor (100a) and a stator provided with a multiphase winding,
Position detecting means (11) for outputting a rotational position signal of the rotor;
A position detector (25) that generates a capture signal each time the rotor rotates by a predetermined electrical angle based on the rotational position signal;
A timer unit (26) for generating an interrupt trigger signal at a timing determined based on the capture signal;
A calculation unit (24) for executing an interrupt process by the interrupt trigger signal and calculating a PWM duty;
A PWM output unit (27) for outputting a PWM signal based on the calculated PWM duty,
When the interrupt process in the arithmetic unit does not end within the time corresponding to the predetermined electrical angle, the timer unit has a generation cycle of the interrupt trigger signal that is n times the predetermined electrical angle (n is 2 or more). as a time corresponding to an integer), have a function of changing the timing of generating the interrupt trigger signal,
The arithmetic unit outputs a process end timing signal at the end of the interrupt process,
The timer unit is
Based on the capture signal, a rotation time required to rotate the predetermined electrical angle is calculated, and on the basis of the processing end timing signal, an interruption processing time in the calculation unit is calculated, and the rotation time and the rotation time are calculated. Compare with interrupt processing time,
When the difference between the interrupt processing time and the rotation time is greater than a preset threshold, the interrupt trigger signal is generated so that the generation period is a time corresponding to the predetermined electrical angle,
When the difference is smaller than the threshold, the interrupt trigger signal is generated so that the generation period is a time corresponding to n times the predetermined electrical angle (n is an integer of 2 or more). Motor control device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012143215A JP5900186B2 (en) | 2012-06-26 | 2012-06-26 | Motor control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012143215A JP5900186B2 (en) | 2012-06-26 | 2012-06-26 | Motor control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014007894A JP2014007894A (en) | 2014-01-16 |
JP5900186B2 true JP5900186B2 (en) | 2016-04-06 |
Family
ID=50105178
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012143215A Expired - Fee Related JP5900186B2 (en) | 2012-06-26 | 2012-06-26 | Motor control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5900186B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111220843A (en) * | 2020-01-18 | 2020-06-02 | 惠州华阳通用电子有限公司 | Signal level duration time measuring method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3295518B2 (en) * | 1994-03-15 | 2002-06-24 | 東芝キヤリア株式会社 | Motor control circuit |
JP3874865B2 (en) * | 1996-12-06 | 2007-01-31 | ダイキン工業株式会社 | Compressor torque control method and apparatus |
JP2009011134A (en) * | 2007-06-29 | 2009-01-15 | Toshiba Corp | Motor control apparatus, motor control system, motor control method, semiconductor device, and electronic equipment |
-
2012
- 2012-06-26 JP JP2012143215A patent/JP5900186B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2014007894A (en) | 2014-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6081734B2 (en) | Semiconductor device, electronic device, and control signal generation method | |
EP3644495B1 (en) | Motor control device and control method of motor control device | |
JP5503008B2 (en) | AC motor rotation direction detection method and AC motor power converter using the same | |
JP2009240041A (en) | Brushless motor controller and brushless motor | |
JP2015061471A (en) | Motor drive control device and method of controlling motor drive control device | |
US9777738B2 (en) | Anti-air-return system and method of fan | |
JP5900186B2 (en) | Motor control device | |
JP2012135097A (en) | Motor control device and method | |
TW200843323A (en) | Fan motor controller and fan motor control method | |
JP2011217430A (en) | Brushless dc polyphase motor control device and brushless dc three-phase motor control device | |
JP2006115641A (en) | Control method and device for brushless electric motor, and vehicles of brushless electric motor | |
JP6311546B2 (en) | Motor drive device | |
JP5537123B2 (en) | Synchronous motor restart method | |
JP2017195659A (en) | Electronic control device and motor control device | |
JP7461848B2 (en) | MOTOR DRIVE CONTROL DEVICE AND CONTROL METHOD FOR MOTOR DRIVE CONTROL DEVICE | |
TWI690146B (en) | Motor drive circuit, drive method, vibration device and electronic device | |
JP6167945B2 (en) | Motor drive system | |
JP5797478B2 (en) | Brushless motor control device and control method | |
JP2004159500A5 (en) | ||
JP5907091B2 (en) | Motor control device and motor control method | |
JP5582442B2 (en) | Motor drive control device, motor drive control method, and motor using the same | |
JP4386681B2 (en) | Motor driving device, motor driving method, and integrated circuit | |
JP2019152985A (en) | Monitoring circuit and monitoring system and motor control system | |
US8810174B2 (en) | Generating a coil switching signal for a brushless DC motor | |
JP5980095B2 (en) | Switched reluctance motor controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20141027 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150831 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150901 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20151002 |
|
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: 20160209 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160222 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5900186 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 |