JP2014007894A - Motor control device - Google Patents

Motor control device Download PDF

Info

Publication number
JP2014007894A
JP2014007894A JP2012143215A JP2012143215A JP2014007894A JP 2014007894 A JP2014007894 A JP 2014007894A JP 2012143215 A JP2012143215 A JP 2012143215A JP 2012143215 A JP2012143215 A JP 2012143215A JP 2014007894 A JP2014007894 A JP 2014007894A
Authority
JP
Japan
Prior art keywords
signal
time
interrupt
trigger signal
interrupt trigger
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012143215A
Other languages
Japanese (ja)
Other versions
JP5900186B2 (en
Inventor
Hiroaki Tezuka
弘招 手塚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2012143215A priority Critical patent/JP5900186B2/en
Publication of JP2014007894A publication Critical patent/JP2014007894A/en
Application granted granted Critical
Publication of JP5900186B2 publication Critical patent/JP5900186B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a motor control device capable of performing control up to a higher rotating speed at low cost.SOLUTION: The motor control device comprises: position detection means (11) which outputs a rotating position signal of a rotor (100a); a position detection section (25) which generates a capture signal each time the rotor rotates at a predetermined electric angle; a timer section (26) which generates an interrupt trigger signal in timing determined on the basis of the capture signal; a calculation section (24) which calculates a PWM duty by executing interrupt processing in accordance with the interrupt trigger signal; and a PWM output section (27) which outputs a PWM signal on the basis of the calculated PWM duty. The timer section includes a function for changing the generation timing of the interrupt trigger signal in such a manner that a generation cycle of the interrupt trigger signal becomes a time corresponding to n-times ((n) is an integer equal to or more than 2) as much as the predetermined electric angle in the case where the interrupt processing is not completed within a time corresponding to the predetermined electric angle.

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 Patent Document 1, for example, a motor control device that performs PWM control on a motor including a rotor and a stator provided with a multiphase winding is known.

このモータ制御装置では、位置検出回路によって、所定電気角(例えば電気角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.

特開2009−11134号公報JP 2009-11134 A

ところで、マイコンの割り込み処理は、上記した所定電気角の回転時間内に終了されなければならない。このため、従来、マイコンの性能は、マイコンの割り込み処理に要する時間が、モータの最高回転時における所定電気角の回転時間よりも短くなるように決定される。したがって、標準使用回転域と最高回転数がかけ離れており、不定期で高回転域が用いられるような場合にも、高性能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以上の整数)に対応する時間となるように、割り込みトリガ信号を生成するタイミングを変更する機能を有することを特徴とする。   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, and having a function of changing the timing of 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.

第1実施形態に係るモータ制御装置が適用されたモータ制御システムの概略構成を示す図である。1 is a diagram illustrating a schematic configuration of a motor control system to which a motor control device according to a first embodiment is applied. モータとホール素子の配置を示す図である。It is a figure which shows arrangement | positioning of a motor and a Hall element. モータ制御装置のうち、タイマ部の概略構成を示す図である。It is a figure which shows schematic structure of a timer part among motor control apparatuses. タイマ部のうち、時間比較制御部の概略構成を示す図である。It is a figure which shows schematic structure of a time comparison control part among timer parts. PWM出力において実行される処理を示すフローチャートである。It is a flowchart which shows the process performed in a PWM output. キャプチャ信号及び割り込みトリガ信号の生成タイミング、ソフト処理部の処理タイミングを示すタイミングチャートである。It is a timing chart which shows the generation timing of a capture signal and an interrupt trigger signal, and the processing timing of a software processing part. 第2実施形態に係るモータ制御装置のうち、タイマ部の概略構成を示す図である。It is a figure which shows schematic structure of a timer part among the motor control apparatuses which concern on 2nd Embodiment. タイマ部のうち、時間比較制御部の概略構成を示す図である。It is a figure which shows schematic structure of a time comparison control part among timer parts. PWM出力において実行される処理のうち、特徴部分を示すフローチャートである。It is a flowchart which shows a characteristic part among the processes performed in a PWM output. キャプチャ信号、処理終了タイミング信号、及び割り込みトリガ信号の生成タイミング、ソフト処理部の処理タイミングを示すタイミングチャートである。It is a timing chart which shows a generation timing of a capture signal, a processing end timing signal, and an interrupt trigger signal, and a processing timing of a software processing unit. 第3実施形態に係るモータ制御装置のうち、タイマ部の概略構成を示す図である。It is a figure which shows schematic structure of a timer part among the motor control apparatuses which concern on 3rd Embodiment. PWM出力において実行される処理のうち、特徴部分を示すフローチャートである。It is a flowchart which shows a characteristic part among the processes performed in a PWM output. キャプチャ信号、状態信号、及び割り込みトリガ信号の生成タイミング、ソフト処理部の処理タイミングを示すタイミングチャートである。It is a timing chart which shows the generation timing of a capture signal, a status signal, and an interrupt trigger signal, and the processing timing of a software processing part.

以下、本発明の実施形態を図に基づいて説明する。なお、各実施形態において、共通乃至関連する要素には同一の符号を付与するものとする。   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 motor 100 includes, for example, a rotor 100a having a permanent magnet and a stator 100b having a three-phase winding. The motor control apparatus 10 that performs PWM control of the motor 100 includes a hall element 11 as a position detection unit and a microcomputer 12 (hereinafter referred to as a microcomputer 12).

ホール素子11は、ロータ100aの回転位置を検出するため、モータ100に取り付けられている。本実施形態では、図2に示すようにホール素子11を3つ有しており、3つのホール素子11が、ロータ100aの回転中心に対し、120度ごとに配置されている。   The hall element 11 is attached to the motor 100 in order to detect the rotational position of the rotor 100a. In the present embodiment, as shown in FIG. 2, the three hall elements 11 are provided, and the three hall elements 11 are arranged every 120 degrees with respect to the rotation center of the rotor 100a.

なお、位置検出手段としては、ホール素子11に限定されるものではなく、周知の他の手段、例えばモータ100の各相の誘起電圧を演算処理する回路を採用することもできる。また、ホール素子11の個数は上記例に限定されるものではない。   Note that the position detecting means is not limited to the Hall element 11, and other well-known means, for example, a circuit for processing the induced voltage of each phase of the motor 100 may be employed. Further, the number of Hall elements 11 is not limited to the above example.

マイコン12は、図1に示すように、CPU20、ROM21、RAM22、モータ制御回路23、及び図示しないアドレスバス・データバスを有している。CPU20は、ROM21に格納された制御プログラムに従ってRAM22を用い、ソフト処理を実行する。すなわち、CPU20、ROM21、及びRAM22は、ソフト処理部24として機能する。このソフト処理部24は、特許請求の範囲に記載の演算部に相当する。また、CPU20は、アドレスバス・データバスを介して、モータ制御回路23を制御する。   As shown in FIG. 1, the microcomputer 12 has a CPU 20, a ROM 21, a RAM 22, a motor control circuit 23, and an address bus / data bus (not shown). The CPU 20 uses the RAM 22 according to a control program stored in the ROM 21 and executes software processing. That is, the CPU 20, ROM 21, and RAM 22 function as the software processing unit 24. The software processing unit 24 corresponds to a calculation unit described in the claims. Further, the CPU 20 controls the motor control circuit 23 via the address bus / data bus.

モータ制御回路23は、キャプチャ信号を生成する位置検出部25、割り込みトリガ信号を生成するタイマ部26、及びPWM信号を出力するPWM出力部27と、を備えている。   The motor control circuit 23 includes a position detection unit 25 that generates a capture signal, a timer unit 26 that generates an interrupt trigger signal, and a PWM output unit 27 that outputs a PWM signal.

位置検出部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 position detection unit 25 generates a capture signal and outputs it to the timer unit 26 every time the rotor 100 a rotates by a predetermined electrical angle based on the rotation position signal output from the Hall element 11. In this embodiment, as shown in FIG. 2, the rotor 100a has two magnetic poles, and the Hall elements 11 are arranged every 120 degrees, so that a capture signal is generated every 60 electrical angles as is well known. . The signal output from the position detection unit 25 to the timer unit 26 is “0” or “1”, and the capture signal is “1”. Further, the position detection unit 25 generates an energization timing generation signal based on the rotational position signal output from the Hall element 11 and outputs the generated energization timing signal to the PWM output unit 27. This energization timing generation signal indicates commutation timing, and is generated every 60 electrical angles, like the capture signal. The signal output from the position detection unit 25 to the PWM output unit 27 is “0” or “1”, and the energization timing signal is “1”.

タイマ部26は、キャプチャ信号に基づいて決定されるタイミングで、割り込みトリガ信号を生成し、ソフト処理部24に出力する。本実施形態に係るモータ制御装置10は、このタイマ部26に特徴があり、その詳細については後述する。   The timer unit 26 generates an interrupt trigger signal at a timing determined based on the capture signal and outputs the interrupt trigger signal to the software processing unit 24. The motor control device 10 according to the present embodiment is characterized by the timer unit 26, and details thereof will be described later.

ソフト処理部24は、割り込みトリガ信号により割り込み処理を実行し、PWMデューティを算出する。具体的には、割り込みトリガ信号から回転速度を算出する。そして、算出した回転速度と設定速度との偏差でPI制御を行い、PWMデューティを算出する。   The software processing unit 24 executes an interrupt process according to the interrupt trigger signal and calculates the PWM duty. Specifically, the rotation speed is calculated from the interrupt trigger signal. Then, PI control is performed with the deviation between the calculated rotation speed and the set speed, and the PWM duty is calculated.

PWM出力部27は、算出されたPWMデューティに基づいてPWM信号を出力する。位置検出部25から出力された通電タイミング生成信号を基準として、PWM信号の出力、すなわち3相巻線への通電パターンの切替がなされる。このPWM信号は、ゲートドライバ101を介してインバータ102に入力される。   The PWM output unit 27 outputs a PWM signal based on the calculated PWM duty. Based on the energization timing generation signal output from the position detection unit 25, the output of the PWM signal, that is, the energization pattern to the three-phase winding is switched. This PWM signal is input to the inverter 102 via the gate driver 101.

次に、タイマ部26について、図3及び図4を用いて説明する。   Next, the timer unit 26 will be described with reference to FIGS.

図3に示すように、タイマ部26は、キャプチャ制御部30、タイマカウンタ31、時間比較制御部32、記憶部33を有する。キャプチャ制御部30は、タイマカウンタ31(例えばフリーランタイマ)のタイマカウント値から、キャプチャ信号が入力されてから次のキャプチャ信号が入力されるまでの時間を算出する。上記したように、キャプチャ信号は電気角60度ごとに生成されるため、キャプチャ制御部30で算出される時間は、ロータ100aが電気角60度回転するのに要する時間である。以下、この時間を60度回転時間と示す。そして、時間比較制御部32は、算出された60度回転時間と、記憶部33に予め設定された基準時間とを比較し、比較結果に応じて、割り込みトリガ信号を選択的に生成・出力する。なお、基準時間は、ソフト処理部24によるソフト処理時間(PWMデューティ算出時間)に所定のマージンを加味して設定されている。   As shown in FIG. 3, the timer unit 26 includes a capture control unit 30, a timer counter 31, a time comparison control unit 32, and a storage unit 33. The capture control unit 30 calculates the time from when the capture signal is input until the next capture signal is input, from the timer count value of the timer counter 31 (for example, a free-run timer). As described above, since the capture signal is generated every 60 degrees of electrical angle, the time calculated by the capture control unit 30 is the time required for the rotor 100a to rotate 60 degrees of electrical angle. Hereinafter, this time is referred to as 60 ° rotation time. Then, the time comparison control unit 32 compares the calculated 60-degree rotation time with a reference time preset in the storage unit 33, and selectively generates and outputs an interrupt trigger signal according to the comparison result. . The reference time is set by adding a predetermined margin to the software processing time (PWM duty calculation time) by the software processing unit 24.

時間比較制御部32は、時間比較器40、NOTゲート41、割り込みマスク制御部42、及びORゲート43を有する。時間比較器40は、キャプチャ制御部30で算出された60度回転時間と、記憶部33から読みだした基準時間とを比較し、60度回転時間が基準時間よりも長い場合、「1」を出力する。一方、60度回転時間が基準時間よりも短い場合、「0」を出力する。この判定信号は、ORゲート43に入力されるとともに、NOTゲート41を介して割り込みマスク制御部42に入力される。   The time comparison control unit 32 includes a time comparator 40, a NOT gate 41, an interrupt mask control unit 42, and an OR gate 43. The time comparator 40 compares the 60-degree rotation time calculated by the capture control unit 30 with the reference time read from the storage unit 33. When the 60-degree rotation time is longer than the reference time, “1” is set. Output. On the other hand, when the 60 degree rotation time is shorter than the reference time, “0” is output. This determination signal is input to the OR gate 43 and also input to the interrupt mask control unit 42 via the NOT gate 41.

時間比較器40から「1」が出力されると、割り込みマスク制御部42には「0」が入力され、割り込みマスク制御部42は、ORゲート43に対して「0」を出力する。このため、ORゲート43、すなわちタイマ部26から、「1」が出力される。すなわち、割り込みトリガ信号が生成・出力される。   When “1” is output from the time comparator 40, “0” is input to the interrupt mask control unit 42, and the interrupt mask control unit 42 outputs “0” to the OR gate 43. Therefore, “1” is output from the OR gate 43, that is, the timer unit 26. That is, an interrupt trigger signal is generated and output.

一方、時間比較器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 time comparator 40, “1” is input to the interrupt mask control unit 42. The interrupt mask control unit 42 accumulates the input signal and outputs 1 when the value exceeds 1. That is, when “1” is input for the first time, the accumulated value is “1”, and “0” is output from the interrupt mask control unit 42. Therefore, both inputs to the OR gate 43 are “0”, and “0” is output from the OR gate 43 (timer unit 26). That is, no interrupt trigger signal is generated. When “2” is input for the second time, the accumulated value is “2” and exceeds 1, and therefore “1” is output from the interrupt mask control unit 42. Therefore, “1” is output from the OR gate 43 (timer unit 26). That is, an interrupt trigger signal is generated and output. Further, the interrupt mask control unit 42 resets the accumulated value when “0” is input or the accumulated value becomes “2” and “1” is output. In other words, when “1” is output from the OR gate 43, that is, when the interrupt trigger gate signal is output, the accumulated value is reset.

このように、本実施形態では、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 mask control unit 42 outputs “1” and also outputs a mask signal indicating that the masking has been performed once to the software processing unit 24. Therefore, when the mask signal is input, the software processing unit 24 calculates the rotation speed as 120-degree rotation time.

次に、図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 motor control device 10 starts operating and executes the process of FIG. And the process shown below is repeatedly performed in the state with which electric power was supplied.

先ず、ホール素子11が、ロータ100aの回転位置を検出し、回転位置信号を出力する(ステップS10)。この回転位置信号はマイコン12に入力され、位置検出部25は、回転位置信号の変化タイミングから、ロータ100aが電気角60度回転するごとにキャプチャ信号を生成する(ステップS11)。また、位置検出部25は、回転位置信号の変化タイミングから、通電タイミング生成信号を生成する(ステップS12)。   First, the hall element 11 detects the rotational position of the rotor 100a and outputs a rotational position signal (step S10). This rotational position signal is input to the microcomputer 12, and the position detection unit 25 generates a capture signal every time the rotor 100a rotates 60 degrees from the change timing of the rotational position signal (step S11). Further, the position detection unit 25 generates an energization timing generation signal from the change timing of the rotational position signal (step S12).

次いで、タイマ部26は、上記したように、キャプチャ信号に基づいて60度回転時間を生成する(ステップS13)。そして、生成した60度回転時間と基準時間とを比較する(ステップS14)。その結果、60度回転時間が基準時間よりも長い場合は、割り込みトリガ信号を生成する(ステップS16)。   Next, as described above, the timer unit 26 generates a 60-degree rotation time based on the capture signal (step S13). Then, the generated 60-degree rotation time is compared with the reference time (step S14). As a result, when the 60-degree rotation time is longer than the reference time, an interrupt trigger signal is generated (step S16).

一方、ステップ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 software processing unit 24 executes the above-described software processing based on the interrupt trigger signal and the above-described mask signal. That is, the PWM duty is calculated (step S18). The PWM output unit 27 outputs a PWM signal to the gate driver 101 based on the calculated PWM duty and energization timing generation signal.

なお、ソフト処理部24によるソフト処理(ステップS18)は、上記したように、CPU20が制御プログラムに従って行うソフトウェア処理であり、それ以外の処理は、マイコン2の内部に構成されているモータ制御回路23(ハードウェアロジック)により行われる処理である。   The software processing (step S18) by the software processing unit 24 is software processing performed by the CPU 20 according to the control program as described above, and other processing is performed by the motor control circuit 23 configured in the microcomputer 2. This is a process performed by (hardware logic).

次に、本実施形態に係るモータ制御装置10の特徴部分の効果について説明する。   Next, the effect of the characteristic part of the motor control apparatus 10 according to the present embodiment will be described.

タイマ部26は、60度回転時間が基準時間よりも長い場合、すなわち60度回転時間内でソフト処理部24のソフト処理が終了する場合、60度回転時間を生成周期として割り込みトリガ信号を生成する。換言すれば、キャプチャ信号ごとに割り込みトリガ信号を生成する。   When the 60 ° rotation time is longer than the reference time, that is, when the software processing of the software processing unit 24 is completed within the 60 ° rotation time, the timer unit 26 generates an interrupt trigger signal with the 60 ° rotation time as a generation cycle. . In other words, an interrupt trigger signal is generated for each capture signal.

一方、モータ100が高回転となり、60度回転時間が基準時間よりも短くなる、すなわち、60度回転時間内でソフト処理が終了しない場合、図2及び図6に示すように、120度回転時間を生成周期として割り込みトリガ信号を生成する。このように、割り込みトリガ信号を生成するタイミングを変更することができるので、高性能CPUを有するマイコンを用いなくとも、より高い回転数まで制御することができる。   On the other hand, when the motor 100 has a high rotation speed and the 60-degree rotation time is shorter than the reference time, that is, when the software process is not completed within the 60-degree rotation time, as shown in FIGS. An interrupt trigger signal is generated with the generation period as. 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.

なお、本実施形態では、割り込みトリガ信号の生成タイミングを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 motor control device 10 shown in the above embodiment is omitted.

本実施形態の特徴は、ソフト処理部24がソフト処理の処理終了タイミング信号を出力する。そして、タイマ部26が、図7に示すように、処理終了タイミング信号に基づいてソフト処理部24でのソフト処理時間を算出して、60度回転時間とソフト処理時間を用いて、割り込みトリガ信号の生成タイミングを決定することにある。   The feature of this embodiment is that the software processing unit 24 outputs a processing end timing signal of the software processing. Then, as shown in FIG. 7, the timer unit 26 calculates the software processing time in the software processing unit 24 based on the processing end timing signal, and uses the 60-degree rotation time and the software processing time to generate an interrupt trigger signal. Is to determine the generation timing.

図7に示すように、タイマ部26は、キャプチャ制御部30、タイマカウンタ31、時間比較制御部32を有する。キャプチャ制御部30は、第1実施形態同様、タイマカウンタ31のタイマカウント値から60度回転時間を生成する。また、処理終了タイミング信号と割り込みトリガ信号に基づいて、ソフト処理部24でのソフト処理時間を算出する。   As shown in FIG. 7, the timer unit 26 includes a capture control unit 30, a timer counter 31, and a time comparison control unit 32. The capture control unit 30 generates a 60-degree rotation time from the timer count value of the timer counter 31 as in the first embodiment. Further, the software processing time in the software processing unit 24 is calculated based on the processing end timing signal and the interrupt trigger signal.

時間比較制御部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 comparison control unit 32 includes a time comparator 40, a NOT gate 41, an interrupt mask control unit 42, an OR gate 43, and a storage unit 44. The time comparator 40 compares the difference between the 60 ° rotation time and the software processing time calculated by the capture control unit 30 (soft processing time−60 ° rotation time) with the threshold value read from the storage unit 44, and the difference When is larger than the threshold, “1” is output. On the other hand, when the difference is smaller than the threshold, “0” is output. This determination signal is input to the OR gate 43 and also input to the interrupt mask control unit 42 via the NOT gate 41. As the threshold value, a margin for the software processing time of the software processing unit 24 is set.

時間比較器40から「1」が出力されると、割り込みマスク制御部42には「0」が入力され、割り込みマスク制御部42は、ORゲート43に対して「0」を出力する。このため、ORゲート43、すなわちタイマ部26から、「1」が出力される。すなわち、割り込みトリガ信号が生成・出力される。   When “1” is output from the time comparator 40, “0” is input to the interrupt mask control unit 42, and the interrupt mask control unit 42 outputs “0” to the OR gate 43. Therefore, “1” is output from the OR gate 43, that is, the timer unit 26. That is, an interrupt trigger signal is generated and output.

一方、時間比較器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 time comparator 40, “1” is input to the interrupt mask control unit 42. The interrupt mask control unit 42 accumulates the input signal and outputs 1 when the value exceeds 1. That is, when “1” is input for the first time, the accumulated value is “1”, and “0” is output from the interrupt mask control unit 42. Therefore, both inputs to the OR gate 43 are “0”, and “0” is output from the OR gate 43 (timer unit 26). That is, no interrupt trigger signal is generated. When “2” is input for the second time, the accumulated value is “2” and exceeds 1, and therefore “1” is output from the interrupt mask control unit 42. Therefore, “1” is output from the OR gate 43 (timer unit 26). That is, an interrupt trigger signal is generated and output. Further, the interrupt mask control unit 42 resets the accumulated value when “0” is input or the accumulated value becomes “2” and “1” is output. In other words, when “1” is output from the OR gate 43, that is, when the interrupt trigger gate signal is output, the accumulated value is reset.

このように、本実施形態では、ソフト処理時間と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 mask control unit 42 outputs “1” and also outputs a mask signal indicating that the masking has been performed once to the software processing unit 24. Therefore, when the mask signal is input, the software processing unit 24 calculates the rotation speed as 120-degree rotation time.

次に、図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 timer unit 26 calculates the software processing time of the software processing unit 24 based on the processing end timing signal as described above (step S24). Then, the difference between the software processing time and the 60-degree rotation time is compared with the threshold value (step S25). As a result, if the difference is larger than the threshold, an interrupt trigger signal is generated (step S27).

一方、ステップ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 motor control apparatus 10 according to the present embodiment will be described.

タイマ部26は、差分が閾値より大きい場合、すなわち60度回転時間内でソフト処理部24のソフト処理が終了する場合、60度回転時間を生成周期として割り込みトリガ信号を生成する。換言すれば、キャプチャ信号ごとに割り込みトリガ信号を生成する。   When the difference is larger than the threshold value, that is, when the software processing of the software processing unit 24 ends within the 60-degree rotation time, the timer unit 26 generates an interrupt trigger signal with the 60-degree rotation time as a generation cycle. In other words, an interrupt trigger signal is generated for each capture signal.

一方、モータ100が高回転となり、差分が閾値よりも小さくなる、すなわち、60度回転時間内でソフト処理が終了しない場合、図10に示すように、120度回転時間を生成周期として割り込みトリガ信号を生成する。このように、割り込みトリガ信号を生成するタイミングを変更することができるので、高性能CPUを有するマイコンを用いなくとも、より高い回転数まで制御することができる。   On the other hand, when the motor 100 is at a high rotation speed and the difference is smaller than the threshold value, that is, when the software process is not completed within the 60-degree rotation time, as shown in FIG. Is generated. 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.

本実施形態においても、割り込みトリガ信号の生成タイミングを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 software processing unit 24 is set as a threshold is shown. However, for example, 10% of the 60-degree rotation time immediately before the 60-degree rotation time for obtaining the difference may be set as the threshold value.

(第3実施形態)
本実施形態において、上記実施形態に示したモータ制御装置10と共通する部分についての説明は割愛する。
(Third embodiment)
In this embodiment, the description of the parts common to the motor control device 10 shown in the above embodiment is omitted.

本実施形態の特徴は、ソフト処理部24が、ソフト処理の実行中、及び、ソフト処理が終了し、次のソフト処理が実行されるまでの待機中、のいずれであるかを示す状態信号を出力する。そして、タイマ部26は、待機中を示す状態信号が入力された状態で、キャプチャ信号が入力されると、割り込みトリガ信号を生成することにある。   A feature of the present embodiment is that a status signal indicating whether the software processing unit 24 is executing a software process or is waiting until the software process ends and the next software process is executed. Output. The timer unit 26 is to generate an interrupt trigger signal when a capture signal is input in a state in which a state signal indicating standby is input.

図11に示すように、タイマ部26は、ANDゲート34、及び、マスク回数計数部35を有する。ANDゲート34には、キャプチャ信号と状態信号が入力される。状態信号として、ソフト処理の実行中には「0」、待機中には「1」が入力される。したがって、待機中においてキャプチャ信号が入力されると、ANDゲート34は「1」、すなわち割り込みトリガ信号を生成・出力する。   As shown in FIG. 11, the timer unit 26 includes an AND gate 34 and a mask number counting unit 35. The AND gate 34 receives a capture signal and a status signal. As the status signal, “0” is input during execution of software processing, and “1” is input during standby. Therefore, when a capture signal is input during standby, the AND gate 34 generates and outputs “1”, that is, an interrupt trigger signal.

マスク回数計数部35には、状態信号とキャプチャ信号が入力される。マスク回数計数部35は、状態信号が「0」となってから、キャプチャ信号が何回入力されたかをカウントする。このカウント値は、キャプチャ信号が入力されたのに割り込みトリガ信号が生成されなかったマスク回数であるので、このカウント値をマスク信号として、ソフト処理部24に出力する。ソフト処理部24は、割り込みトリガ信号とこのマスク信号とにより、回転速度を算出する。なお、カウント値は、マスク回数計数部35に「1」が入力されると、すなわち待機中を示す状態信号が入力されるとリセットされる。   A state signal and a capture signal are input to the mask number counting unit 35. The mask number counting unit 35 counts how many times the capture signal is input after the state signal becomes “0”. Since this count value is the number of masks for which an interrupt trigger signal was not generated even though a capture signal was input, this count value is output to the software processing unit 24 as a mask signal. The software processing unit 24 calculates the rotation speed based on the interrupt trigger signal and the mask signal. The count value is reset when “1” is input to the mask number counting unit 35, that is, when a status signal indicating standby is input.

次に、図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 gate 34 constituting the timer unit 26, and further, a capture signal is input to the AND gate 34 in step S44. The timer unit 26 (AND gate 34) generates and outputs an interrupt trigger signal only when it is detected.

ステップS43において、状態信号がソフト処理中を示す信号「0」の場合、割り込みトリガ信号の生成をマスクするため、ステップS40に戻る。また、ステップS44において、待機中を示す信号が入力されているにもかかわらず、キャプチャ信号の入力がない場合は、ステップS43に戻る。   In step S43, when the status signal is a signal “0” indicating that the software process is being performed, the process returns to step S40 in order to mask the 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 motor control apparatus 10 according to the present embodiment will be described.

本実施形態のタイマ部26は、図13に示すように、待機中を示す状態信号が入力された状態で、キャプチャ信号が入力されると、割り込みトリガ信号を生成する。一方、ソフト処理中を示す状態信号が入力された状態では、キャプチャ信号が入力されても、割り込みトリガ信号を生成しない。これによれば、60度回転時間内でソフト処理が終了する場合、60度回転時間を生成周期として割り込みトリガ信号を生成することができる。一方、モータ100が高回転となり、60度回転時間内でソフト処理が終了しない場合、ソフト処理時間に応じて、所定電気角のn倍(nは2以上の整数)に対応する時間を生成周期として割り込みトリガ信号を生成することができる。このように、割り込みトリガ信号を生成するタイミングを変更することができるので、高性能CPUを有するマイコンを用いなくとも、より高い回転数まで制御することができる。   As shown in FIG. 13, the timer unit 26 of the present embodiment generates an interrupt trigger signal when a capture signal is input in a state where a state signal indicating standby is input. On the other hand, in a state where a state signal indicating that soft processing is in progress, an interrupt trigger signal is not generated even if a capture signal is input. According to this, when the software process ends within the 60-degree rotation time, the interrupt trigger signal can be generated with the 60-degree rotation time as a generation cycle. On the other hand, when the motor 100 becomes a high rotation and the software processing is not completed within the 60-degree rotation time, a time corresponding to n times a predetermined electrical angle (n is an integer of 2 or more) is generated according to the software processing time. An interrupt trigger signal can be generated. 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.

特に本実施形態によれば、マスク回数の制限はないため、モータ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 motor 100.

以上、本発明の好ましい実施形態について説明したが、本発明は上述した実施形態になんら制限されることなく、本発明の主旨を逸脱しない範囲において、種々変形して実施することが可能である。   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 SYMBOLS 10 ... Motor control apparatus, 11 ... Hall element (position detection means), 12 ... Microcomputer, 20 ... CPU, 21 ... ROM, 22 ... RAM, 23 ... Motor Control circuit, 24... Software processing unit (calculation unit), 25... Position detection unit, 26... Timer unit, 27... PWM output unit, 30. Timer counter 32... Time comparison control unit 33... Storage unit 34... AND gate 35. Mask number counting unit 40 40 Time comparator 41. 42 ... Interrupt mask control unit, 43 ... OR gate, 44 ... Storage unit, 100 ... Motor, 100a ... Rotor, 100b ... Stator, 101 ... Gate driver, 102 ..Inverters

Claims (4)

ロータ(100a)と多相巻線を設けたステータとを備えるモータ(100)を、PWM制御するモータ制御装置であって、
前記ロータの回転位置信号を出力する位置検出手段(11)と、
前記回転位置信号に基づいて、前記ロータが所定電気角回転するごとにキャプチャ信号を生成する位置検出部(25)と、
前記キャプチャ信号に基づいて決定されるタイミングで、割り込みトリガ信号を生成するタイマ部(26)と、
前記割り込みトリガ信号により割り込み処理を実行し、PWMデューティを算出する演算部(24)と、
算出された前記PWMデューティに基づいてPWM信号を出力するPWM出力部(27)と、を備え、
前記タイマ部は、前記演算部での割り込み処理が、前記所定電気角に対応する時間内で終了しない場合、前記割り込みトリガ信号の生成周期が、前記所定電気角の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). A motor control device having a function of changing a timing for generating the interrupt trigger signal so that a time corresponding to an integer) is reached.
前記タイマ部は、
前記キャプチャ信号に基づいて、前記所定電気角回転するのに要する回転時間を算出するとともに、算出した前記回転時間と、前記演算部の割り込み処理時間に応じて予め設定された基準時間とを比較し、
前記回転時間が前記基準時間よりも長い場合、前記生成周期が前記所定電気角に対応する時間となるように、前記割り込みトリガ信号を生成し、
前記回転時間が前記基準時間よりも短い場合、前記生成周期が、前記所定電気角のn倍(nは2以上の整数)に対応する時間となるように、前記割り込みトリガ信号を生成することを特徴とする請求項1に記載のモータ制御装置。
The timer unit is
Based on the capture signal, the rotation time required to rotate the predetermined electrical angle is calculated, and the calculated rotation time is compared with a reference time set in advance according to the interrupt processing time of the arithmetic unit. ,
When the rotation time is longer than the reference time, the interrupt trigger signal is generated so that the generation period is a time corresponding to the predetermined electrical angle,
When the rotation time is shorter than the reference time, the interrupt trigger signal is generated so that the generation cycle is a time corresponding to n times the predetermined electrical angle (n is an integer of 2 or more). The motor control device according to claim 1, wherein
前記演算部は、前記割り込み処理の終了にともなって処理終了タイミング信号を出力し、
前記タイマ部は、
前記キャプチャ信号に基づいて、前記所定電気角回転するのに要する回転時間を算出するとともに、前記処理終了タイミング信号に基づいて、前記演算部での割り込み処理時間を算出して、前記回転時間と前記割り込み処理時間とを比較し、
前記割り込み処理時間と前記回転時間との差分が、予め設定された閾値よりも大きい場合、前記生成周期が前記所定電気角に対応する時間となるように、前記割り込みトリガ信号を生成し、
前記差分が前記閾値よりも小さい場合、前記生成周期が前記所定電気角のn倍(nは2以上の整数)に対応する時間となるように、前記割り込みトリガ信号を生成することを特徴とする請求項1に記載のモータ制御装置。
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). The motor control device according to claim 1.
前記演算部は、前記割り込み処理の実行中、及び、前記割り込み処理が終了し、次の前記割り込み処理が実行されるまでの待機中、のいずれであるかを示す状態信号を出力し、
前記タイマ部は、
待機中を示す前記状態信号が入力された状態で、前記キャプチャ信号が入力されると、前記割り込みトリガ信号を生成することを特徴とする請求項1に記載のモータ制御装置。
The arithmetic unit outputs a status signal indicating whether the interrupt process is being executed, and whether the interrupt process is completed and waiting until the next interrupt process is executed,
The timer unit is
The motor control device according to claim 1, wherein the interrupt trigger signal is generated when the capture signal is input in a state where the state signal indicating standby is input.
JP2012143215A 2012-06-26 2012-06-26 Motor control device Expired - Fee Related JP5900186B2 (en)

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 true JP2014007894A (en) 2014-01-16
JP5900186B2 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111220843A (en) * 2020-01-18 2020-06-02 惠州华阳通用电子有限公司 Signal level duration time measuring method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07255192A (en) * 1994-03-15 1995-10-03 Toshiba Corp Motor control circuit
JPH10174488A (en) * 1996-12-06 1998-06-26 Daikin Ind Ltd Torque control method for compressor, and its device
US20090001922A1 (en) * 2007-06-29 2009-01-01 Kabushiki Kaisha Toshiba Motor controlling device, motor drive system, method of motor control, semiconductor device and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07255192A (en) * 1994-03-15 1995-10-03 Toshiba Corp Motor control circuit
JPH10174488A (en) * 1996-12-06 1998-06-26 Daikin Ind Ltd Torque control method for compressor, and its device
US20090001922A1 (en) * 2007-06-29 2009-01-01 Kabushiki Kaisha Toshiba Motor controlling device, motor drive system, method of motor control, semiconductor device and electronic device
JP2009011134A (en) * 2007-06-29 2009-01-15 Toshiba Corp Motor control apparatus, motor control system, motor control method, semiconductor device, and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111220843A (en) * 2020-01-18 2020-06-02 惠州华阳通用电子有限公司 Signal level duration time measuring method and device

Also Published As

Publication number Publication date
JP5900186B2 (en) 2016-04-06

Similar Documents

Publication Publication Date Title
JP5503008B2 (en) AC motor rotation direction detection method and AC motor power converter using the same
JP2014039377A (en) Semiconductor device, electronic apparatus and control signal generation method
JP2015061471A (en) Motor drive control device and method of controlling motor drive control device
JP2009240041A (en) Brushless motor controller and brushless motor
JP5900186B2 (en) Motor control device
JP2011217430A (en) Brushless dc polyphase motor control device and brushless dc three-phase motor control device
US9825569B2 (en) Method for reducing performance degradation due to redundant calculation in high integrity applications
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
JP6619382B2 (en) Motor drive control device and control method of motor drive control device
JP7461848B2 (en) MOTOR DRIVE CONTROL DEVICE AND CONTROL METHOD FOR MOTOR DRIVE CONTROL DEVICE
JP5582442B2 (en) Motor drive control device, motor drive control method, and motor using the same
JP5797478B2 (en) Brushless motor control device and control method
JP5907091B2 (en) Motor control device and motor control method
JP6167945B2 (en) Motor drive system
US8810174B2 (en) Generating a coil switching signal for a brushless DC motor
JP6058339B2 (en) Motor control device, motor control device control method, and motor control device control program
JP2012120354A (en) Motor controller
JP5980095B2 (en) Switched reluctance motor controller
JP2005245075A (en) Device for detecting lock state of brushless dc motor
JP4386681B2 (en) Motor driving device, motor driving method, and integrated circuit
JP2020010459A (en) Brushless motor control device for concrete vibrator
JP2006325346A (en) Method and apparatus for controlling brushless motor and brushless motor device
JP6398840B2 (en) Detection signal conversion circuit, motor lock detection circuit, image forming apparatus, and detection signal conversion method

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