JP2007312478A - Motor controller - Google Patents

Motor controller Download PDF

Info

Publication number
JP2007312478A
JP2007312478A JP2006137652A JP2006137652A JP2007312478A JP 2007312478 A JP2007312478 A JP 2007312478A JP 2006137652 A JP2006137652 A JP 2006137652A JP 2006137652 A JP2006137652 A JP 2006137652A JP 2007312478 A JP2007312478 A JP 2007312478A
Authority
JP
Japan
Prior art keywords
value
amount
motor
counter
change
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.)
Pending
Application number
JP2006137652A
Other languages
Japanese (ja)
Inventor
Takashi Kawasaki
高志 河崎
Hiroyuki Kanemoto
宏行 鐘本
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2006137652A priority Critical patent/JP2007312478A/en
Publication of JP2007312478A publication Critical patent/JP2007312478A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Output Control And Ontrol Of Special Type Engine (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)
  • Control Of Electric Motors In General (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a motor controller which can compute the amount of slippage between the counter value of having counted the pulse signals from a position sensor and the counter value to the actual rotational angle of a motor, and also can raise the determination accuracy when determining the abnormality of the position sensor, based on the variation of the amount of slippage, in the case of executing the overflow processing to the amount of slippage. <P>SOLUTION: This motor controller computes the variation H, based on the integrated value ΔPa of the amount of slippage (S301). Then, in case that the variation H is over an overflow judgment value α(S302: YES), the variation H is over the capacity of the motor, so it determines that the overflow processing was performed for the integrated value ΔPa. Then, in this case, it executes the modification for removing the amount of variation by the execution of overflow processing from the variation H(S304 or S305), and in case that the modified variation H is at or over an abnormality determining value β(S306: YES), it determines that there is abnormality in the position sensor (S308). <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、モータの制御装置に関する。   The present invention relates to a motor control device.

従来、ブラシレスモータ等のモータを所定の回転角範囲内で回転駆動し、それによって各種機構を駆動するといったことが行われている。この場合、各種機構を精密に駆動するには、モータの回転角を正確に検出し、その回転角を各種機構の目標とする駆動状態に対応した回転角とすることが重要になる。   Conventionally, a motor such as a brushless motor is rotationally driven within a predetermined rotation angle range, thereby driving various mechanisms. In this case, in order to accurately drive various mechanisms, it is important to accurately detect the rotation angle of the motor and set the rotation angle to a rotation angle corresponding to the target driving state of the various mechanisms.

こうした回転角を検出するべく、特許文献1に記載のものでは、モータの回転に伴いパルス信号を出力する位置センサとしてエンコーダを設け、その位置センサから出力されるパルス信号を計数するようにしている。この検出方法によれば、同エッジを計数したカウンタ値がモータの回転角に対応した値になり、そのカウンタ値に基づいてモータの回転角を検出することができる。
特開2004−76265号公報
In order to detect such a rotation angle, in the device described in Patent Document 1, an encoder is provided as a position sensor that outputs a pulse signal as the motor rotates, and the pulse signal output from the position sensor is counted. . According to this detection method, the counter value obtained by counting the edges becomes a value corresponding to the rotation angle of the motor, and the rotation angle of the motor can be detected based on the counter value.
JP 2004-76265 A

ところで、上記位置センサからのパルス信号のエッジを計数して得られるカウンタ値は、常にモータの実際の回転角に対応しているとは限らず、場合によっては実際の回転角に対応した値からずれてしまうことがある。   By the way, the counter value obtained by counting the edge of the pulse signal from the position sensor does not always correspond to the actual rotation angle of the motor, and in some cases, from the value corresponding to the actual rotation angle. It may shift.

例えば、位置センサから出力される信号にノイズが重畳すると、そのノイズのエッジがパルス信号のエッジと誤認されてしまい、パルス信号のエッジを計数して得られるカウンタ値は、モータの実際の回転角に対応した値からずれてしまう。この場合、カウンタ値に基づき検出されるモータの回転角が不正確になるため、その回転角等に基づいてモータを駆動し、各種機器を目標とする駆動状態に制御しようとしても、それを正しく行うことができなくなるといった不具合が発生する。   For example, if noise is superimposed on the signal output from the position sensor, the edge of the noise is mistaken as the edge of the pulse signal, and the counter value obtained by counting the edges of the pulse signal is the actual rotation angle of the motor. It will deviate from the value corresponding to. In this case, since the rotation angle of the motor detected based on the counter value becomes inaccurate, even if the motor is driven based on the rotation angle or the like to control various devices to the target drive state, Problems such as being unable to do so occur.

こうした不具合の発生を抑えるために、本出願人は、先に出願済みの特願2005−218934に記載の制御装置にて、上記カウンタ値が実際のモータの回転角に対応する正常値からずれている場合、そのずれ量に対応する分の補正を当該カウンタ値に加えることにより、同カウンタ値を実際のモータ回転角に対応する値へと戻すようにしている。より詳細には、複数の電気角センサからそれぞれ出力されるパルス信号の出力パターンに基づき通電相を切り換えることで駆動されるブラシレスモータにあって、各電気角センサからのパルス信号のエッジ間隔よりも短い間隔でパルス信号が出力されるように位置センサを配置する。そして、各電気角センサから出力されるパルス信号のエッジ発生毎に、前回のエッジ発生時におけるカウンタ値と今回のエッジ発生時におけるカウンタ値との差を算出する。そして、この差が正常値、すなわち各電気角センサから出力されるパルス信号のエッジ間において位置センサから出力されるはずのパルス信号のエッジ数と異なっている場合に、カウンタ値に異常あり(ずれあり)と判定する。そして、カウンタ値に異常ありと判定された場合には、その算出された差と正常値との差分を求めてこれをずれ量とし、そのずれ量を補正値としてカウンタ値に加えることにより、同カウンタ値を実際のモータ回転角に対応する値へと戻すようにしている。   In order to suppress the occurrence of such problems, the present applicant uses the control device described in Japanese Patent Application No. 2005-218934 previously filed, and the counter value deviates from the normal value corresponding to the actual rotation angle of the motor. If there is, the correction corresponding to the amount of deviation is added to the counter value to return the counter value to a value corresponding to the actual motor rotation angle. More specifically, in a brushless motor driven by switching energized phases based on output patterns of pulse signals respectively output from a plurality of electrical angle sensors, it is more than the edge interval of the pulse signals from each electrical angle sensor. Position sensors are arranged so that pulse signals are output at short intervals. Then, every time an edge of the pulse signal output from each electrical angle sensor is generated, the difference between the counter value at the previous edge generation and the counter value at the current edge generation is calculated. If this difference is different from the normal value, that is, the number of edges of the pulse signal that should be output from the position sensor between the edges of the pulse signal output from each electrical angle sensor, the counter value is abnormal (deviation). Yes). If it is determined that the counter value is abnormal, the difference between the calculated difference and the normal value is obtained and used as a deviation amount, and the deviation amount is added to the counter value as a correction value. The counter value is returned to a value corresponding to the actual motor rotation angle.

ところで、各電気角センサから出力されるパルス信号のエッジは、モータが所定の角度ずつ回転するごとに発生するため、そのエッジ発生毎にずれ量の補正処理を実行すると、時間当たりの実行回数が過度に多くなり、制御装置の演算部において演算負荷が高くなってしまうおそれがある。そこで、ずれ量を算出してカウンタ値を補正する処理について、ずれ量を算出する処理と、予め設定された時間毎にずれ量を補正する処理とを、異なる2つの演算部にてそれぞれ実行する。   By the way, the edge of the pulse signal output from each electrical angle sensor is generated every time the motor rotates by a predetermined angle. Therefore, if the deviation correction processing is executed every time the edge is generated, the number of executions per time is increased. There is a risk that the calculation load will increase excessively in the calculation unit of the control device. Therefore, regarding the process of calculating the deviation amount and correcting the counter value, the process of calculating the deviation amount and the process of correcting the deviation amount for each preset time are respectively executed by two different calculation units. .

より詳細には、各電気角センサから出力されるパルス信号のエッジ発生毎にずれ量を算出してそのずれ量が算出される毎に当該ずれ量を積算する処理を1つの演算部で行う。また、上記エッジの発生周期よりも長い時間に設定された実行時間毎に実施される処理であって、今回の実行タイミング時における上記ずれ量の積算値と前回の実行タイミング時における上記ずれ量の積算値との差を算出し、その算出された値に基づいてカウント値のずれを補正する処理を別の演算部で行う。こうして算出されるずれ量の差は、補正処理の実行周期内におけるずれ量の変化量を表しており、前回補正処理が実行されてから今回補正処理が実行されるまでの間に生じたずれ量に一致する。そのため、この変化量に基づいて補正値を設定し、同補正値を用いてカウンタ値の補正を行うことにより、予め設定された時間毎に補正処理を実行しても、カウンタ値を適切に補正することができる。また、ずれ量の算出処理と、ずれ量の補正処理とを別々の演算部にて処理するため、ずれ量の算出処理を行う演算部において演算負荷が高くなった場合でも、ずれ量の補正処理を行う演算部においては、その演算負荷に余裕を持たせておくことができる。   More specifically, a calculation unit calculates the amount of deviation every time an edge of a pulse signal output from each electrical angle sensor is generated, and integrates the amount of deviation every time the amount of deviation is calculated. Further, it is a process performed at each execution time set to a time longer than the edge generation cycle, and the integrated value of the deviation amount at the current execution timing and the deviation amount at the previous execution timing. A process of calculating the difference from the integrated value and correcting the deviation of the count value based on the calculated value is performed by another calculation unit. The difference in the amount of deviation calculated in this way represents the amount of change in the amount of deviation within the execution period of the correction process, and the amount of deviation that occurred between the previous correction process and the current correction process. Matches. Therefore, by setting a correction value based on the amount of change and correcting the counter value using the correction value, the counter value is corrected appropriately even if correction processing is executed every preset time. can do. In addition, since the deviation amount calculation process and the deviation amount correction process are processed by different calculation units, even when the calculation load is high in the calculation unit that performs the deviation amount calculation process, the deviation amount correction process is performed. In the calculation unit that performs the above, a margin can be given to the calculation load.

他方、上記態様にて積算されるずれ量は、モータの駆動を制御する制御装置にて演算処理されるのであるが、通常、同制御装置では数値が二進法で処理される。そして、数値を処理するビット数によって処理可能な数値の範囲は制限され、例えば数値を8ビットで処理する場合、「256(=2^8)」通りの数値を処理することができる。なお、上記態様にて計数されるカウンタ値は、同カウンタ値の正常値よりも小さくなる場合と大きくなる場合とがある。そのため、上記ずれ量を8ビットで処理する場合にあって、積算可能な数値の範囲を設定する際には、例えば「(+)127」〜「−128」といった範囲を設定することが望ましい。   On the other hand, the deviation amount integrated in the above mode is calculated by a control device that controls the driving of the motor. Normally, the control device processes numerical values in binary. The range of numerical values that can be processed is limited by the number of bits for processing numerical values. For example, when processing numerical values with 8 bits, “256 (= 2 ^ 8)” numerical values can be processed. Note that the counter value counted in the above mode may be smaller or larger than the normal value of the counter value. Therefore, in the case of processing the deviation amount with 8 bits, it is desirable to set a range such as “(+) 127” to “−128” when setting a range of numerical values that can be integrated.

ここで、上述したようなずれ量が発生するたびに上記積算値の絶対値は大きくなるため、ずれ量の発生回数が多くなると、積算されたずれ量が処理可能な数値の上限値や下限値(例えば「127」や「−128」)に達してしまい、その後の積算を行うことができなくなるおそれがある。そこで、こうした状態、いわゆるオーバーフロー状態を解消するべく、積算されたずれ量が上記上限値を超えるときにはその超過分を上記下限値に加算して新たに積算を開始する一方、同ずれ量が上記下限値を超えるときにはその超過分を上記上限値に加算して新たに積算を開始するといったオーバーフロー処理が行われる。   Here, since the absolute value of the integrated value increases every time a deviation amount as described above occurs, an upper limit value or a lower limit value of numerical values that can be processed by the accumulated deviation amount when the number of occurrences of the deviation amount increases. (For example, “127” or “−128”), and subsequent integration may not be performed. Therefore, in order to eliminate such a state, the so-called overflow state, when the accumulated deviation amount exceeds the upper limit value, the excess amount is added to the lower limit value, and a new accumulation is started. When the value is exceeded, an overflow process is performed in which the excess is added to the upper limit value and integration is newly started.

このオーバーフロー処理についてその一例を以下に説明する。なお、以下の一例では、積算値が8ビットで処理されるとともに、処理可能な数値の上限値が「127」、同数値の下限値が「−128」に設定されている。   An example of this overflow processing will be described below. In the following example, the integrated value is processed with 8 bits, the upper limit value of the processable numerical value is set to “127”, and the lower limit value of the same numerical value is set to “−128”.

例えば、前回の積算処理で算出されたずれ量が「125」であって、今回の積算処理でずれ量の増加分として「5」を加算する場合には、積算後のずれ量が「130」となるため、上限値「127」に対して「3」が超過分となる。この場合には、オーバーフロー処理として、下限値である「−128」に「3」を加算した「―125」が新たなずれ量として算出される。   For example, when the deviation amount calculated in the previous integration process is “125” and “5” is added as an increase in the deviation amount in the current integration process, the deviation amount after integration is “130”. Therefore, “3” exceeds the upper limit “127”. In this case, as overflow processing, “−125” obtained by adding “3” to “−128” which is the lower limit value is calculated as a new deviation amount.

一方、前回の積算処理で算出されたずれ量が「−125」であって、今回の積算処理でずれ量の増加分として「−5」を加算する場合には、積算後のずれ量が「−130」となるため、下限値「−128」に対して「−2」が超過分となる。この場合には、オーバーフロー処理として、上限値である「127」に「−2」を加算した「125」が新たなずれ量として算出される。   On the other hand, when the deviation amount calculated in the previous integration process is “−125” and “−5” is added as an increase in the deviation amount in the current integration process, the deviation amount after integration is “ Since “−130”, “−2” exceeds the lower limit “−128”. In this case, as an overflow process, “125” obtained by adding “−2” to “127” which is the upper limit value is calculated as a new deviation amount.

他方、上記ずれ量は、位置センサからの信号等に基づいて算出されるため、同センサに異常が生じた場合には、その信号の信頼性が低下し、その結果、上記態様にて積算されるずれ量についてその変化量は過度に大きくなることがある。そこで、上記ずれ量の変化量が、予め設定された閾値を超えた大きな値になっている場合、センサ異常が生じていると判定する。そして、センサ異常が生じていると判定された場合には、上記ずれ量の算出処理、同ずれ量の積算処理、あるいはカウンタ値の補正処理などを中止するようにすれば、カウンタ値に対する補正精度の低下を抑えることができる。   On the other hand, since the deviation amount is calculated based on a signal from the position sensor or the like, if an abnormality occurs in the sensor, the reliability of the signal decreases, and as a result, the deviation is integrated. The amount of change in the amount of deviation may be excessively large. Therefore, when the change amount of the deviation amount is a large value exceeding a preset threshold value, it is determined that a sensor abnormality has occurred. If it is determined that a sensor abnormality has occurred, the correction accuracy for the counter value can be improved by canceling the calculation processing for the deviation amount, the integration processing for the deviation amount, or the correction processing for the counter value. Can be suppressed.

ところで、そうしたずれ量の変化量は、センサに異常が生じている場合のみならず、上記オーバーフロー処理が実行されたときにも大きくなる。すなわち、上記オーバーフロー処理が実行されると、上限値に対する超過分を下限値に加算した値が新たなずれ量として設定されたり、下限値に対する超過分を上限値に加算した値が新たなずれ量として設定される。従って、ずれ量の変化量が、オーバーフロー処理の実行時期を挟んで算出されたときには、換言すればオーバーフロー処理の実行前におけるずれ量に対して、同処理の実行後におけるずれ量の変化量が算出されたときには、その変化量が非常に大きくなる。   By the way, such a change amount of the deviation amount becomes large not only when the abnormality occurs in the sensor but also when the overflow process is executed. In other words, when the overflow process is executed, a value obtained by adding the excess to the lower limit to the upper limit is set as a new deviation, or a value obtained by adding the excess to the lower limit to the upper limit is the new deviation. Set as Therefore, when the change amount of the deviation amount is calculated across the execution timing of the overflow process, in other words, the change amount of the deviation amount after execution of the same process is calculated with respect to the deviation amount before execution of the overflow process. When done, the amount of change becomes very large.

そのため、ずれ量の変化量に基づいてセンサの異常判定を行う場合にあって、オーバーフロー処理の実行が原因で変化量が大きくなっているときには、センサが正常であっても異常であると誤判定されてしまうおそれがあり、その判定精度が低下してしまう。   Therefore, when the sensor abnormality is determined based on the change amount of the deviation amount, and the change amount is large due to the execution of the overflow process, it is erroneously determined that the sensor is abnormal even if it is normal. The determination accuracy may be reduced.

この発明は、こうした実情に鑑みてなされたものであり、モータの回転に伴いパルス信号を出力する位置センサを備え、その位置センサからのパルス信号のエッジを計数したカウンタ値に基づき、モータの回転角を検出するモータの制御装置を適用対象とする。そして、その目的は、モータの実際の回転角に対するカウンタ値のずれ量を算出して同ずれ量に対するオーバーフロー処理を実行するとともに、同ずれ量の変化量に基づいて位置センサの異常判定を行う場合において、その判定精度を高めることのできるモータの制御装置を提供することにある。   The present invention has been made in view of such circumstances, and includes a position sensor that outputs a pulse signal as the motor rotates, and the rotation of the motor based on a counter value obtained by counting the edges of the pulse signal from the position sensor. The control device of the motor that detects the angle is the application target. The purpose is to calculate the amount of deviation of the counter value with respect to the actual rotation angle of the motor, execute overflow processing for the amount of deviation, and perform abnormality determination of the position sensor based on the amount of change of the amount of deviation. It is an object of the present invention to provide a motor control device capable of increasing the determination accuracy.

以下、上記目的を達成するための手段及びその作用効果について記載する。
請求項1に記載の発明は、所定の回転角範囲内での回転駆動が行われるモータと、同モータの回転に伴いパルス信号を出力する位置センサとを備え、その位置センサからのパルス信号のエッジを計数したカウンタ値に基づいて前記モータの回転角を検出する検出手段と、前記モータの実際の回転角に対応するカウンタ値と前記計数されるカウンタ値とのずれ量を算出する算出手段と、処理可能な数値の範囲が設定されており、前記ずれ量の値が同範囲の上限値を超えるときにはその超過分を同範囲の下限値に加算した値を新たなずれ量として設定する一方、前記ずれ量の値が前記下限値を超えるときにはその超過分を前記上限値に加算した値を新たなずれ量として設定するオーバーフロー処理を実行するオーバーフロー手段と、予め設定された時間周期内での前記ずれ量の変化量に基づいて前記位置センサの異常判定を行う判定手段とを備えるモータの制御装置において、前記変化量が前記モータの能力を超えた量である場合には、同変化量から前記オーバーフロー処理の実行による変化分を除去する修正処理を実行し、その修正された変化量に基づいて前記位置センサの異常判定を行うことをその要旨とする。
In the following, means for achieving the above object and its effects are described.
The invention described in claim 1 includes a motor that is driven to rotate within a predetermined rotation angle range, and a position sensor that outputs a pulse signal along with the rotation of the motor, and outputs a pulse signal from the position sensor. Detection means for detecting the rotation angle of the motor based on a counter value obtained by counting edges, and calculation means for calculating a deviation amount between the counter value corresponding to the actual rotation angle of the motor and the counted counter value; A range of numerical values that can be processed is set, and when the value of the deviation amount exceeds the upper limit value of the same range, a value obtained by adding the excess to the lower limit value of the same range is set as a new deviation amount, Overflow means for executing overflow processing for setting, as a new deviation amount, a value obtained by adding the excess amount to the upper limit value when the deviation amount value exceeds the lower limit value; In a motor control device comprising determination means for determining abnormality of the position sensor based on a change amount of the deviation amount within a time period, when the change amount is an amount exceeding the capacity of the motor. The gist of the present invention is that a correction process for removing a change due to the execution of the overflow process is executed from the change amount, and an abnormality determination of the position sensor is performed based on the corrected change amount.

上記態様にて計数されるカウンタ値は、モータの回転角度に応じて変化するため、同カウンタ値がモータの能力を超えて変化することはない。従って、位置センサに異常が生じ、計数されるカウンタ値が全く変化しない場合であっても、ずれ量の変化量はモータの能力を超えた量になることはない。そのため、ずれ量の変化量がモータの能力を超えた大きな量になっているときには、そうしたずれ量の大きな変化が位置センサの異常によって起きたのではなく、ずれ量に対して上記オーバーフロー処理が実行されたために起きたと判断することができる。   Since the counter value counted in the above aspect changes according to the rotation angle of the motor, the counter value does not change beyond the capacity of the motor. Therefore, even when the position sensor is abnormal and the counted counter value does not change at all, the amount of change in the deviation amount does not exceed the motor capacity. Therefore, when the amount of change in the deviation amount is a large amount that exceeds the capacity of the motor, the above-described overflow processing is executed for the deviation amount, not because of such a large change in deviation amount due to a position sensor abnormality. It can be judged that it happened because it was done.

そこで、同構成では、ずれ量の変化量に基づいて位置センサの異常判定を行うようにしているが、同変化量がモータの能力を超えた量である場合には、オーバーフロー処理の実行による変化分を当該変化量から除去する修正処理を実行し、その修正された変化量に基づいて位置センサの異常判定を行うようにしている。従って、オーバーフロー処理の実行が原因でずれ量の変化量が大きくなった場合でも、そのオーバーフロー処理の実行が変化量に与えた影響は上記修正処理にて除去され、実際のずれ量に対応した変化量が算出される。そしてこの実際のずれ量に対応した変化量に基づいて位置センサの異常判定が行われるため、オーバーフロー処理の実行によって変化量が大きくなったときに生じやすい不具合、すなわち位置センサが正常であっても異常であると誤判定されてしまうといった不具合の発生が抑えられる。従って、ずれ量の変化量に基づいて位置センサの異常判定を行う場合において、その判定精度を高めることができるようになる。   Therefore, in the same configuration, the position sensor abnormality is determined based on the change amount of the deviation amount. However, if the change amount exceeds the motor capacity, the change due to the execution of the overflow process is performed. A correction process for removing the minute amount from the change amount is executed, and an abnormality determination of the position sensor is performed based on the corrected change amount. Therefore, even if the amount of change in the deviation amount becomes large due to the execution of the overflow process, the influence of the execution of the overflow process on the amount of change is removed by the above correction process, and the change corresponding to the actual deviation amount A quantity is calculated. Since the abnormality determination of the position sensor is performed based on the change amount corresponding to the actual deviation amount, even if the change amount becomes large due to the execution of the overflow process, that is, even if the position sensor is normal Occurrence of a malfunction such as erroneous determination as abnormal is suppressed. Therefore, when the position sensor abnormality determination is performed based on the change amount of the deviation amount, the determination accuracy can be improved.

ずれ量の変化量がモータの能力を超えているか否かを判定する際には、請求項2に記載の発明によるように、ずれ量の変化量を算出する時間周期内においてモータが最大回転速度で駆動されるときのカウンタ値の変化量よりも、同時間周期内において算出されるずれ量の変化量の方が大きいときに、その算出された変化量がモータの能力を超えた量である旨判定する、といった構成を採用することにより、そうした判定を適切に行うことができる。   When determining whether or not the change amount of the deviation amount exceeds the capacity of the motor, as in the second aspect of the invention, the motor rotates at the maximum rotation speed within the time period for calculating the change amount of the deviation amount. When the amount of change in the deviation calculated within the same time period is larger than the amount of change in the counter value when the motor is driven at, the amount of change calculated exceeds the capacity of the motor. Such a determination can be appropriately performed by adopting a configuration in which the determination is made.

請求項3に記載の発明は、請求項1または2に記載のモータの制御装置において、前記カウンタ値のずれ量に対する補正値を前記変化量に基づいて設定し、その補正値分の補正を前記カウンタ値に対して行うとともに、同変化量が前記モータの能力を超えた量である場合には、前記修正処理にて修正された変化量に基づいて前記補正値を設定することをその要旨とする。   According to a third aspect of the present invention, in the motor control device according to the first or second aspect, a correction value for the deviation amount of the counter value is set based on the change amount, and the correction for the correction value is performed in the correction amount. The gist is to set the correction value based on the amount of change corrected by the correction process when the change amount is an amount exceeding the capacity of the motor. To do.

予め設定された時間周期内でのずれ量の変化量を算出して、その算出に基づいて補正値を設定し、その補正値分の補正を上記計数されるカウンタ値に対して行う場合にあって、上記オーバーフロー処理が実行される前、あるいは実行された後に算出された変化量であれば、その変化量は、前回補正処理が実行されてから今回補正処理が実行されるまでの間に生じたずれ量と一致するため、その変化量に基づいて設定される補正値にてカウンタ値の補正を行うことにより、同カウンタ値を適切に補正することができる。   There is a case in which the amount of change in the deviation amount within a preset time period is calculated, a correction value is set based on the calculation, and the correction value is corrected for the counted counter value. Thus, if the amount of change is calculated before or after the overflow processing is executed, the amount of change occurs between the execution of the previous correction processing and the execution of the current correction processing. Therefore, the counter value can be appropriately corrected by correcting the counter value with the correction value set based on the amount of change.

一方、上記オーバーフロー処理が実行されたときには、処理可能な数値の上限値に対する超過分を同数値の下限値に加算した値が新たなずれ量として設定されたり、前記下限値に対する超過分を前記上限値に加算した値が新たなずれ量として設定される。従って、オーバーフロー処理の実行時期を挟んでずれ量の変化量が算出されたときには、その算出された変化量が実際のずれ量の変化量に対して大きくなり、前回補正処理が実行されてから今回補正処理が実行されるまでの間に生じたずれ量と一致しなくなる。   On the other hand, when the overflow process is executed, a value obtained by adding an excess of the upper limit of the processable numerical value to the lower limit of the same numerical value is set as a new deviation amount, or an excess of the lower limit is set as the upper limit. A value added to the value is set as a new deviation amount. Therefore, when the deviation amount change amount is calculated across the execution timing of the overflow process, the calculated change amount becomes larger than the actual deviation amount change amount, and this time after the previous correction processing is executed. It does not coincide with the amount of deviation that has occurred until the correction process is executed.

この点、同構成では、ずれ量の変化量がモータの能力を超えた量である場合、すなわちずれ量に対して上記オーバーフロー処理が実行されたと判断可能な場合には、上記修正処理にて修正された変化量に基づいて上記補正値を設定するようにしており、実際のずれ量に対応した変化量に基づき補正値が設定される。従って、オーバーフロー処理の実行時期を挟んでずれ量の変化量が算出されたときでも、カウンタ値に対する補正値を適切に設定することができるようになる。   In this regard, in the same configuration, when the amount of change in the deviation amount exceeds the motor capacity, that is, when it can be determined that the overflow processing has been executed for the deviation amount, the correction processing is performed. The correction value is set based on the changed amount, and the correction value is set based on the change amount corresponding to the actual deviation amount. Therefore, even when the change amount of the deviation amount is calculated with the execution timing of the overflow process, the correction value for the counter value can be set appropriately.

また、上記修正処理の実行に際しては、請求項4に記載の発明によるように、ずれ量が前記上限値を超えた場合には、算出された変化量に対して処理可能な前記数値の範囲分の値を加算する処理を実行し、ずれ量が前記下限値を超えた場合には、算出された変化量に対して処理可能な前記数値の範囲分の値を減算する処理を実行することにより、上記変化量からオーバーフロー処理の実行による変化分を適切に除去することができる。   Further, when the correction process is executed, as in the invention according to claim 4, when the deviation amount exceeds the upper limit value, the range of the numerical value that can be processed with respect to the calculated change amount. When the amount of deviation exceeds the lower limit value, a process of subtracting a value corresponding to the range of numerical values that can be processed from the calculated change amount is performed. The change due to the execution of the overflow process can be appropriately removed from the change amount.

例えば、ずれ量が8ビットで処理されるとともに、処理可能な数値の上限値が「127」、同数値の下限値が「−128」に設定した場合にあって、同構成による修正処理は以下のようにして行われる。   For example, when the shift amount is processed with 8 bits, the upper limit value of the processable numerical value is set to “127”, and the lower limit value of the same numerical value is set to “−128”, the correction processing by the same configuration is as follows. It is done like this.

例えば、前回の補正処理におけるずれ量が「125」であって、今回の補正処理でずれ量「5」が加算される場合には、その積算値が「130」となり、上限値「127」に対して「3」が超過分となる。この場合には、オーバーフロー処理として、下限値である「−128」に「3」を加算した「―125」が新たなずれ量として設定される。こうしたオーバーフロー処理が実行されたときには、今回設定されたずれ量である「−125」から前回のずれ量である「125」を減算した「−250」に対し、処理可能な数値の範囲である「255(=127+128)」が加算される。その結果、変化量としては、上記ずれ量に一致する「5」が算出され、その変化量に基づいてカウンタ値に対する補正値が設定される。   For example, when the deviation amount in the previous correction process is “125” and the deviation amount “5” is added in the current correction process, the integrated value is “130”, and the upper limit value is “127”. On the other hand, “3” is an excess. In this case, as overflow processing, “−125” obtained by adding “3” to “−128” which is the lower limit value is set as a new deviation amount. When such overflow processing is executed, the range of numerical values that can be processed with respect to “−250” obtained by subtracting “125” that is the previous shift amount from “−125” that is the shift amount set this time is “ 255 (= 127 + 128) "is added. As a result, as the amount of change, “5” that matches the amount of deviation is calculated, and a correction value for the counter value is set based on the amount of change.

一方、前回の補正処理におけるずれ量が「−125」であって、今回の補正処理でずれ量「−5」を加算する場合には、その積算値が「−130」となり、下限値「−128」に対して「−2」が超過分となる。この場合には、オーバーフロー処理として、上限値である「127」に「−2」を加算した「125」が新たなずれ量として設定される。こうしたオーバーフロー処理が実行されたときの上記変化量の算出に際しては、今回設定されたずれ量である「125」から前回のずれ量である「−125」を減算した「250」に対し、処理可能な数値の範囲である「255」が減算される。その結果、変化量としては、上記ずれ量に一致する「−5」が算出され、その変化量に基づいてカウンタ値に対する補正値が設定される。   On the other hand, when the deviation amount in the previous correction process is “−125” and the deviation amount “−5” is added in the current correction process, the integrated value becomes “−130”, and the lower limit value “−”. “−2” is an excess of “128”. In this case, as an overflow process, “125” obtained by adding “−2” to “127” which is the upper limit value is set as a new deviation amount. When calculating the change amount when such overflow processing is executed, it is possible to process “250” obtained by subtracting “−125” as the previous deviation amount from “125” as the deviation amount set this time. “255”, which is a range of various numerical values, is subtracted. As a result, “−5” is calculated as the amount of change that matches the amount of deviation, and a correction value for the counter value is set based on the amount of change.

請求項5に記載の発明は、請求項1〜4のいずれか1項に記載のモータの制御装置において、前記モータは、その回転時に同モータに設けられた複数の電気角センサから位相をずらして出力されるパルス信号の出力パターンに基づき通電相を切り換えることで駆動されるブラシレスモータであり、前記位置センサは、各電気角センサからパルス信号のエッジ間隔よりも短いエッジ間隔のパルス信号を出力するものであり、前記算出手段は、各電気角センサから出力されるパルス信号のエッジ発生毎に、今回のエッジ発生時におけるカウンタ値Pi と前回のエッジ発生時におけるカウンタ値Pi-1 との差(Pi −Pi-1 )を算出し、この差(Pi −Pi-1 )の正常時の値である正常値に対する当該差(Pi −Pi-1 )のずれ量を、前記モータの実際の回転角に対応するカウンタ値と前記計数されるカウンタ値とのずれ量とすることをその要旨とする。   According to a fifth aspect of the present invention, in the motor control device according to any one of the first to fourth aspects, the motor shifts a phase from a plurality of electrical angle sensors provided in the motor during the rotation. The position sensor outputs a pulse signal with an edge interval shorter than the edge interval of the pulse signal from each electrical angle sensor. The calculation means calculates the difference between the counter value Pi at the time of the current edge generation and the counter value Pi-1 at the time of the previous edge generation every time an edge of the pulse signal output from each electrical angle sensor occurs. (Pi−Pi−1) is calculated, and the deviation of the difference (Pi−Pi−1) with respect to the normal value, which is the normal value of this difference (Pi−Pi−1), is calculated as the actual speed of the motor. As its gist that the amount of deviation between the counter value the counter value corresponding to the angle to be the counting.

上記構成によれば、計数されるカウンタ値がモータの実際の回転角に対応した値からずれると、そのずれが差(Pi −Pi-1 )に反映される。すなわち、そのずれの分だけ上記差(Pi −Pi-1 )が正常値からずれることになる。従って、正常値に対する上記差(Pi −Pi-1 )のずれ量を、モータの実際の回転角に対応するカウンタ値と計数されるカウンタ値とのずれ量とする同構成によれば、カウンタ値のずれ量を適切に算出することができるようになる。   According to the above configuration, when the counted counter value deviates from a value corresponding to the actual rotation angle of the motor, the deviation is reflected in the difference (Pi−Pi−1). That is, the difference (Pi-Pi-1) deviates from the normal value by the deviation. Therefore, according to the same configuration in which the deviation amount of the difference (Pi−Pi−1) with respect to the normal value is the deviation amount between the counter value corresponding to the actual rotation angle of the motor and the counted counter value, the counter value The amount of deviation can be calculated appropriately.

請求項6に記載の発明は、請求項5に記載のモータの制御装置において、前記算出手段は、前記モータの回転状態が正回転中、逆回転中、及び正逆回転反転中のうちのいずれであるかを判断し、前記各電気角センサから出力されるパルス信号のエッジ間において前記位置センサから出力されるパルス信号のエッジ数の適正値が「n」であるとすると、前記正常値をモータ正回転中であれば「n」に設定し、モータ逆回転中であれば「−n」に設定し、モータ正逆回転反転中であれば「0」に設定することをその要旨とする。   According to a sixth aspect of the present invention, in the motor control device according to the fifth aspect, the calculation means is any of the rotation state of the motor during normal rotation, reverse rotation, and normal / reverse rotation inversion. If the appropriate value of the number of edges of the pulse signal output from the position sensor is “n” between the edges of the pulse signal output from each electrical angle sensor, the normal value is The gist is to set to “n” if the motor is rotating forward, to “−n” if the motor is rotating in reverse, and to “0” if the motor is rotating in reverse. .

上記カウンタ値は、ブラシレスモータの正回転時に位置センサからのパルス信号のエッジ毎に「1」ずつ増加してゆき、ブラシレスモータの逆回転時には位置センサからのパルス信号のエッジ毎に「1」ずつ減少してゆく。このため、カウンタ値が正常であるとき、換言すればカウンタ値がモータの実際の回転角に対応しているとき、差(Pi −Pi-1 )は、モータ正回転中であれば上記エッジ数nに対応して「n」となり、モータ逆回転中であれば「−n」となり、ブラシレスモータの正逆回転反転中であれば「0」となる。この点、同構成によれば、正常値がブラシレスモータの回転状態に応じて「n」、「−n」、及び「0」の間で切り換えられるため、その正常値に対する差(Pi −Pi-1 )のずれ量をモータの回転状態に関わらず適切に算出することができるようになる。   The counter value is incremented by “1” for each edge of the pulse signal from the position sensor when the brushless motor is rotating forward, and is incremented by “1” for each edge of the pulse signal from the position sensor when the brushless motor is rotating backward. It will decrease. Therefore, when the counter value is normal, in other words, when the counter value corresponds to the actual rotation angle of the motor, the difference (Pi−Pi−1) is the number of edges if the motor is rotating forward. “n” corresponding to n, “−n” if the motor is rotating in reverse, and “0” if the brushless motor is rotating in reverse. In this respect, according to the same configuration, the normal value is switched between “n”, “−n”, and “0” according to the rotation state of the brushless motor. The amount of deviation in 1) can be calculated appropriately regardless of the rotational state of the motor.

請求項7に記載の発明は、請求項1〜6のいずれか1項に記載のモータの制御装置において、前記モータは、内燃機関の機関バルブのバルブ特性を可変とする可変動弁機構の駆動に用いられるものであることをその要旨とする。   A seventh aspect of the present invention is the motor control device according to any one of the first to sixth aspects, wherein the motor drives a variable valve mechanism that varies a valve characteristic of an engine valve of an internal combustion engine. The gist is that it is used in

内燃機関の可変動弁機構をモータで駆動する場合、位置センサからの信号を計数した上記カウンタ値に基づいてモータの回転角を検出し、その検出された回転角が目標バルブ特性に対応した回転角となるようにモータを駆動することにより、機関バルブのバルブ特性を機関運転状態に応じた適切な状態に変更することができる。従って、位置センサの異常判定を行うとともにその判定精度を高めたり、カウント値のずれ量を適切に補正するといったことは、機関運転状態に応じて機関バルブのバルブ特性を適切な状態に変更する上で重要なこととなる。この点、同構成によれば、そうした異常判定の判定精度を高めたり、カウント値のずれ量を適切に補正することができるようになるため、機関バルブのバルブ特性を適切に変更することができるようになる。   When a variable valve mechanism of an internal combustion engine is driven by a motor, the rotation angle of the motor is detected based on the counter value obtained by counting signals from the position sensor, and the detected rotation angle corresponds to the target valve characteristic. By driving the motor so as to form a corner, the valve characteristic of the engine valve can be changed to an appropriate state according to the engine operating state. Therefore, performing abnormality determination of the position sensor and improving its determination accuracy or appropriately correcting the amount of deviation of the count value may change the valve characteristic of the engine valve to an appropriate state according to the engine operating state. It will be important. In this regard, according to the same configuration, it is possible to improve the determination accuracy of such abnormality determination and to appropriately correct the deviation amount of the count value, so that the valve characteristic of the engine valve can be appropriately changed. It becomes like this.

以下、本発明にかかるモータの制御装置を具体化した一実施形態について、図1〜図15を併せ参照して説明する。
図1に、本実施形態におけるエンジンのシリンダヘッド周りについてその断面構造を示す。
Hereinafter, an embodiment of a motor control device according to the present invention will be described with reference to FIGS.
FIG. 1 shows a cross-sectional structure around the cylinder head of the engine in the present embodiment.

同図1に示すように、このエンジン1には、シリンダヘッド2、シリンダブロック3、及びピストン5によって燃焼室6が区画され、燃焼室6には吸気通路7及び排気通路8が接続されている。そして、吸気通路7と燃焼室6との間は吸気バルブ9の開閉動作によって連通・遮断され、排気通路8と燃焼室6との間は排気バルブ10の開閉動作によって連通・遮断される。   As shown in FIG. 1, a combustion chamber 6 is defined by a cylinder head 2, a cylinder block 3, and a piston 5 in the engine 1, and an intake passage 7 and an exhaust passage 8 are connected to the combustion chamber 6. . The intake passage 7 and the combustion chamber 6 are connected and cut off by the opening / closing operation of the intake valve 9, and the exhaust passage 8 and the combustion chamber 6 are connected and cut off by the opening / closing operation of the exhaust valve 10.

シリンダヘッド2には、吸気バルブ9及び排気バルブ10を駆動するための吸気カムシャフト11及び排気カムシャフト12が設けられている。これら吸気カムシャフト11及び排気カムシャフト12は、エンジン1のクランクシャフトの回転力を利用して回転駆動される。また、吸気カムシャフト11及び排気カムシャフト12には、それぞれ吸気カム11a及び排気カム12aが設けられている。そして、吸気カムシャフト11と一体回転する吸気カム11aによって吸気バルブ9は開閉動作され、排気カムシャフト12と一体回転する排気カム12aによって排気バルブ10は開閉動作される。   The cylinder head 2 is provided with an intake camshaft 11 and an exhaust camshaft 12 for driving the intake valve 9 and the exhaust valve 10. The intake camshaft 11 and the exhaust camshaft 12 are rotationally driven using the rotational force of the crankshaft of the engine 1. The intake camshaft 11 and the exhaust camshaft 12 are provided with an intake cam 11a and an exhaust cam 12a, respectively. The intake valve 9 is opened and closed by the intake cam 11 a that rotates integrally with the intake cam shaft 11, and the exhaust valve 10 is opened and closed by the exhaust cam 12 a that rotates integrally with the exhaust cam shaft 12.

また、吸気カム11aと吸気バルブ9との間には、吸気バルブ9のバルブ特性、より詳細には吸気バルブ9の最大リフト量VL、及び同吸気バルブ9の開弁期間に相当する吸気カム11aの作用角INCAMを可変とする可変動弁機構14が設けられている。この可変動弁機構14の駆動を通じて、例えば燃焼室6に導入される空気量、すなわち吸入空気量を多く必要とする機関運転状態になるほど、最大リフト量VL及び作用角INCAM(開弁期間)は大きくされる。これは最大リフト量VL及び作用角INCAMが大きくなるほど、吸気通路7から燃焼室6への空気の吸入が効率よく行われ、吸入空気量に関する上記要求を満たすことが可能になるためである。   Between the intake cam 11a and the intake valve 9, the intake cam 9a corresponds to the valve characteristics of the intake valve 9, more specifically, the maximum lift amount VL of the intake valve 9, and the valve opening period of the intake valve 9. There is provided a variable valve mechanism 14 that makes the working angle INCAM variable. The maximum lift amount VL and the operating angle INCAM (valve opening period) become larger as the engine operation state that requires a larger amount of air introduced into the combustion chamber 6 through the driving of the variable valve mechanism 14, that is, the intake air amount, for example. Increased. This is because the larger the maximum lift amount VL and the operating angle INCAM, the more efficiently the air is sucked into the combustion chamber 6 from the intake passage 7 and the above requirement regarding the intake air amount can be satisfied.

次に、可変動弁機構14の詳細な構造について説明する。
同可変動弁機構14は、シリンダヘッド2に固定されて吸気カムシャフト11と平行に延びるパイプ状のロッカシャフト15、ロッカシャフト15に挿入された棒状のコントロールシャフト16、コントロールシャフト16の軸線を中心に揺動する入力アーム17、入力アーム17の揺動に基づき上記軸線を中心に揺動する出力アーム18等を備えている。
Next, the detailed structure of the variable valve mechanism 14 will be described.
The variable valve mechanism 14 is fixed to the cylinder head 2 and extends in parallel with the intake camshaft 11, a pipe-like rocker shaft 15, a rod-like control shaft 16 inserted into the rocker shaft 15, and an axis of the control shaft 16. And an output arm 18 that swings around the axis based on the swing of the input arm 17.

入力アーム17には、ローラ19が回転可能に取り付けられており、このローラ19は、コイルスプリング20によって吸気カム11a側に押し付けられている。また、出力アーム18は、その揺動時にロッカアーム21に押し付けられ、同ロッカアーム21を介して吸気バルブ9をリフトさせる。   A roller 19 is rotatably attached to the input arm 17, and this roller 19 is pressed against the intake cam 11 a side by a coil spring 20. Further, the output arm 18 is pressed against the rocker arm 21 when swinging, and lifts the intake valve 9 via the rocker arm 21.

このロッカアーム21の一端部はラッシュアジャスタ22によって支持され、同ロッカアーム21の他端部は吸気バルブ9に接触している。また、ロッカアーム21は吸気バルブ9のバルブスプリング24によって出力アーム18側に付勢されており、これによりロッカアーム21の一端部と他端部との間に回転可能に支持されたローラ23が出力アーム18に押し付けられている。従って、吸気カム11aの回転に基づき入力アーム17及び出力アーム18が揺動すると、出力アーム18がロッカアーム21を介して吸気バルブ9をリフトさせ、吸気バルブ9の開閉動作が行われる。   One end of the rocker arm 21 is supported by a lash adjuster 22, and the other end of the rocker arm 21 is in contact with the intake valve 9. The rocker arm 21 is urged toward the output arm 18 by a valve spring 24 of the intake valve 9, whereby a roller 23 rotatably supported between one end and the other end of the rocker arm 21 is provided. 18 is pressed against. Therefore, when the input arm 17 and the output arm 18 swing based on the rotation of the intake cam 11a, the output arm 18 lifts the intake valve 9 via the rocker arm 21, and the intake valve 9 is opened and closed.

この可変動弁機構14では、ロッカシャフト15内に配置されたコントロールシャフト16を軸方向に変位させることで、入力アーム17と出力アーム18との揺動方向についての相対位置を変更することが可能になっている。このように、入力アーム17と出力アーム18との揺動方向について、それらの相対位置を変更することにより、上記吸気バルブ9の最大リフト量VL及び作用角INCAMが可変とされる。すなわち、入力アーム17と出力アーム18とを揺動方向について互いに接近させるほど、吸気バルブ9の最大リフト量VL及び作用角INCAMはともに同期しながら小さくなる。逆に、入力アーム17と出力アーム18とを揺動方向について互いに離間させるほど、吸気バルブ9の最大リフト量VL及び作用角INCAMはともに同期しながら大きくなる。   In this variable valve mechanism 14, the relative position of the input arm 17 and the output arm 18 in the swing direction can be changed by displacing the control shaft 16 disposed in the rocker shaft 15 in the axial direction. It has become. Thus, the maximum lift amount VL and the working angle INCAM of the intake valve 9 are made variable by changing the relative positions of the input arm 17 and the output arm 18 in the swinging direction. That is, the closer the input arm 17 and the output arm 18 are to each other in the swing direction, the smaller the maximum lift amount VL and the working angle INCAM of the intake valve 9 are synchronized. Conversely, as the input arm 17 and the output arm 18 are separated from each other in the swinging direction, the maximum lift amount VL and the working angle INCAM of the intake valve 9 both increase in synchronization.

次に、可変動弁機構14を駆動するべく上記コントロールシャフト16を軸方向に変位させるための駆動機構、及び同駆動機構の駆動を制御する制御装置について、図2を参照して説明する。   Next, a drive mechanism for displacing the control shaft 16 in the axial direction to drive the variable valve mechanism 14 and a control device for controlling the drive of the drive mechanism will be described with reference to FIG.

同図2に示されるように、コントロールシャフト16の末端(図中右端)には、ブラシレスモータ47が変換機構48を介して連結されている。この変換機構48は、ブラシレスモータ47の回転運動をコントロールシャフト16の軸方向への直線運動に変換するためのものである。そして、上記ブラシレスモータ47の所定の回転角範囲内での回転駆動、例えば同モータ47の10回転分の回転角範囲(0〜3600°)内での回転駆動を通じて、コントロールシャフト16が軸方向に変位させられ、可変動弁機構14が駆動されることとなる。   As shown in FIG. 2, a brushless motor 47 is connected to the end (right end in the figure) of the control shaft 16 via a conversion mechanism 48. The conversion mechanism 48 is for converting the rotational motion of the brushless motor 47 into linear motion in the axial direction of the control shaft 16. Then, the rotation of the brushless motor 47 within a predetermined rotation angle range, for example, the rotation of the motor 47 within a rotation angle range (0 to 3600 °) corresponding to 10 rotations causes the control shaft 16 to move in the axial direction. It is displaced and the variable valve mechanism 14 is driven.

ちなみに、ブラシレスモータ47を正回転させると、コントロールシャフト16は先端(図中左端)側に変位し、入力アーム17と出力アーム18との揺動方向についての相対位置が互いに接近するように変更される。また、ブラシレスモータ47を逆回転させると、コントロールシャフト16は末端(図中右端)側に変位し、入力アーム17と出力アーム18との揺動方向についての相対位置が互いに離間するように変更される。こうしたブラシレスモータ47の回転駆動による入力アーム17及び出力アーム18の揺動方向についての相対位置の変更を通じて、吸気カム11aの回転により出力アーム18が揺動したときの吸気バルブ9の最大リフト量VL及び作用角INCAMが可変とされる。   Incidentally, when the brushless motor 47 is rotated forward, the control shaft 16 is displaced toward the tip (left end in the figure), and the relative positions of the input arm 17 and the output arm 18 in the swing direction are changed so as to approach each other. The When the brushless motor 47 is rotated in the reverse direction, the control shaft 16 is displaced toward the end (right end in the figure), and the relative positions of the input arm 17 and the output arm 18 in the swing direction are changed from each other. The The maximum lift amount VL of the intake valve 9 when the output arm 18 swings due to the rotation of the intake cam 11a through the change of the relative position in the swing direction of the input arm 17 and the output arm 18 by the rotational drive of the brushless motor 47. The working angle INCAM is variable.

ブラシレスモータ47には、三つの電気角センサS1〜S3、及び二つの位置センサS4,S5が設けられている。
三つの電気角センサS1〜S3は、ブラシレスモータ47の回転時、同モータ47のロータと一体回転する4極の多極マグネットの磁気に応じて、図3(a)〜(c)に示すようなパルス状の信号、すなわちハイ信号「H」とロー信号「L」とを交互に出力するものである。また、各電気角センサS1〜S3からのパルス信号は、互いに位相をずらした状態で出力されるようになっている。すなわち、こうしたパルス信号の波形が得られるよう、上記ロータに対する各電気角センサS1〜S3の周方向位置が定められている。なお、各電気角センサS1〜S3のうちの一つのセンサから出力されるパルス信号のエッジは、ブラシレスモータ47が45°回転する毎に発生する。また、上記一つのセンサからのパルス信号は、他の2つのセンサからのパルス信号に対し、ブラシレスモータ47の30°回転分だけそれぞれ進み側及び遅れ側に位相がずれた状態となっている。
The brushless motor 47 is provided with three electrical angle sensors S1 to S3 and two position sensors S4 and S5.
As shown in FIGS. 3A to 3C, the three electrical angle sensors S <b> 1 to S <b> 3 correspond to the magnetism of the four-pole multipole magnet that rotates integrally with the rotor of the motor 47 when the brushless motor 47 rotates. , A high signal “H” and a low signal “L” are alternately output. In addition, the pulse signals from the electrical angle sensors S1 to S3 are output with their phases shifted from each other. That is, the circumferential positions of the electric angle sensors S1 to S3 with respect to the rotor are determined so that the waveform of such a pulse signal can be obtained. The edge of the pulse signal output from one of the electric angle sensors S1 to S3 is generated every time the brushless motor 47 rotates 45 °. Further, the pulse signal from the one sensor is in a state where the phase is shifted to the advance side and the delay side by 30 ° rotation of the brushless motor 47 with respect to the pulse signals from the other two sensors, respectively.

二つの位置センサS4,S5は、ブラシレスモータ47の回転時、同モータ47のロータと一体回転する48極の多極マグネットの磁気に応じて、図3(d)及び(e)に示されるようなパルス状の信号、すなわちハイ信号「H」とロー信号「L」とを交互に出力するものである。また、各位置センサS4,S5からのパルス信号は、互いに位相をずらした状態で出力されるようになっており、モータ正回転時には位置センサS4からのパルス信号の立ち上がりエッジ及び立ち下がりエッジがそれぞれ、位置センサS4からのパルス信号の立ち上がりエッジ及び立ち下がりエッジよりも先に生じる。すなわち、こうしたパルス信号の波形が得られるよう、上記ロータに対する各位置センサS4,S5の周方向位置が定められている。なお、各位置センサS4,S5の内の一方のセンサから出力されるパルス信号のエッジは、ブラシレスモータ47の7.5°回転毎に発生している。また、上記一方のセンサからのパルス信号は、他方のセンサからのパルス信号に対し、ブラシレスモータ47の3.75°回転分だけ位相をずらした状態となっている。   As shown in FIGS. 3D and 3E, the two position sensors S4 and S5 correspond to the magnetism of the 48-pole multipole magnet that rotates integrally with the rotor of the motor 47 when the brushless motor 47 rotates. , A high signal “H” and a low signal “L” are alternately output. In addition, the pulse signals from the position sensors S4 and S5 are output with their phases shifted from each other, and the rising edge and the falling edge of the pulse signal from the position sensor S4 are respectively displayed during the forward rotation of the motor. This occurs before the rising edge and falling edge of the pulse signal from the position sensor S4. That is, the circumferential positions of the position sensors S4 and S5 with respect to the rotor are determined so that the waveform of the pulse signal can be obtained. Note that the edge of the pulse signal output from one of the position sensors S4 and S5 occurs every 7.5 ° rotation of the brushless motor 47. Further, the pulse signal from the one sensor is in a state of being shifted in phase by the amount of 3.75 ° rotation of the brushless motor 47 with respect to the pulse signal from the other sensor.

従って、電気角センサS1〜S3からのパルス信号のエッジ間隔が15°であるのに対し、位置センサS4,S5からのパルス信号のエッジ間隔は3.75°となっており、上記15°というエッジ間隔よりも短くなっている。更に、電気角センサS1〜S3からのパルス信号のエッジ発生から次回のエッジ発生までには、位置センサS4,S5からのパルス信号のエッジが4回発生するようになっている。   Therefore, while the edge interval of the pulse signals from the electrical angle sensors S1 to S3 is 15 °, the edge interval of the pulse signals from the position sensors S4 and S5 is 3.75 °, which is the above 15 °. It is shorter than the edge interval. Further, the edge of the pulse signal from the position sensors S4 and S5 is generated four times from the generation of the edge of the pulse signal from the electrical angle sensors S1 to S3 to the next generation of the edge.

可変動弁機構14を駆動制御、換言すればブラシレスモータ47の回転駆動制御は、エンジン1の各種制御を行う電子制御装置50(先の図2を参照)よって行われる。この電子制御装置50は、エンジン1の各種制御にかかる演算処理を実行する複数の演算部、その制御に必要なプログラムやデータの記憶されたROM、演算部での演算結果が一時的に記憶されるRAM、外部との間で信号を入・出力するための入・出力ポート等を備えて構成されている。   Drive control of the variable valve mechanism 14, in other words, rotation drive control of the brushless motor 47 is performed by an electronic control unit 50 (see FIG. 2 above) that performs various controls of the engine 1. The electronic control device 50 temporarily stores a plurality of calculation units that execute calculation processes related to various controls of the engine 1, a ROM that stores programs and data necessary for the control, and calculation results in the calculation unit. RAM, an input / output port for inputting / outputting signals to / from the outside, and the like.

電子制御装置50の入力ポートには、上述した電気角センサS1〜S3及び位置センサS4,S5が接続されるほか、更に以下のセンサを含む各種センサが接続されている。
・自動車の運転者によって踏み込み操作されるアクセルペダルの踏み込み量(アクセル操作量ACCP)を検出するアクセルセンサ51。
In addition to the electrical angle sensors S1 to S3 and the position sensors S4 and S5 described above, various sensors including the following sensors are connected to the input port of the electronic control unit 50.
An accelerator sensor 51 that detects the amount of depression of the accelerator pedal (accelerator operation amount ACCP) that is depressed by the driver of the automobile.

・エンジン1の吸気通路7に設けられたスロットルバルブの開度(スロットル開度TA)を検出するスロットルセンサ52。
・上記吸気通路7を介して燃焼室6に吸入される空気の量、すなわち吸入空気量GAを検出するエアフロメータ53。
A throttle sensor 52 that detects the opening of the throttle valve (throttle opening TA) provided in the intake passage 7 of the engine 1.
An air flow meter 53 for detecting the amount of air taken into the combustion chamber 6 via the intake passage 7, that is, the intake air amount GA;

・エンジン1の出力軸の回転に対応する信号を出力して機関回転速度NEの検出等に用いられるクランク角センサ54。
・吸気通路7に設けられて吸入空気の温度(吸気温THA)を検出する吸気温センサ55。
A crank angle sensor 54 that outputs a signal corresponding to the rotation of the output shaft of the engine 1 and is used for detecting the engine rotational speed NE.
An intake air temperature sensor 55 that is provided in the intake passage 7 and detects the temperature of intake air (intake air temperature THA).

・自動車の運転者により切り換え操作され、現在の切換位置に対応した信号を出力するイグニッションスイッチ56。
また、電子制御装置50の出力ポートには、ブラシレスモータ47の駆動回路等が接続されており、同電子制御装置50は、上記各種センサ等から入力した検出信号に基づき機関運転状態を把握する。そして、その把握した機関運転状態に基づいてブラシレスモータ47を駆動し、コントロールシャフト16を軸方向に変位させることで、可変動弁機構14の駆動を通じた吸気バルブ9のバルブ特性制御が行われる。なお、ブラシレスモータ47の駆動は、各電気角センサS1〜S3から出力される同モータ47の回転時のパルス信号の出力パターンに応じて、ブラシレスモータ47の通電相を切り換えることによって行われる。
An ignition switch 56 that is switched by an automobile driver and outputs a signal corresponding to the current switching position.
The output port of the electronic control device 50 is connected to a drive circuit for the brushless motor 47, and the electronic control device 50 grasps the engine operating state based on detection signals input from the various sensors. Then, the brushless motor 47 is driven based on the grasped engine operating state, and the control shaft 16 is displaced in the axial direction, whereby the valve characteristic control of the intake valve 9 through the drive of the variable valve mechanism 14 is performed. The brushless motor 47 is driven by switching the energized phase of the brushless motor 47 in accordance with the output pattern of the pulse signal output from the electric angle sensors S1 to S3 when the motor 47 rotates.

可変とされる上記最大リフト量VL及び作用角INCAMは、コントロールシャフト16の軸方向の位置に対応しており、このコントロールシャフト16の軸方向の位置は、ブラシレスモータ47の上記所定回転角範囲内での回転角に対応している。従って、最大リフト量VL及び作用角INCAMの可変制御に際しては、ブラシレスモータ47の回転角が制御される。   The maximum lift VL and the working angle INCAM that are variable correspond to the axial position of the control shaft 16, and the axial position of the control shaft 16 is within the predetermined rotation angle range of the brushless motor 47. It corresponds to the rotation angle at. Therefore, the rotation angle of the brushless motor 47 is controlled in the variable control of the maximum lift amount VL and the working angle INCAM.

そうしたブラシレスモータ47の回転角についてその検出手順を、図3に示すタイミングチャート及び図4に示すフローチャートを併せ参照して説明する。
図3において、(a)〜(e)は、ブラシレスモータ47の回転時における同モータ47の回転角変化に対し、各センサS1〜S5からパルス信号がどのように出力されるかを示す波形図である。また、(f)〜(h)にはそれぞれ、ブラシレスモータ47の回転時における同モータ47の回転角の変化に対し、電気角カウンタE、位置カウンタP、及びストロークカウンタSのカウンタ値がどのように推移するかを示している。
The procedure for detecting the rotation angle of the brushless motor 47 will be described with reference to the timing chart shown in FIG. 3 and the flowchart shown in FIG.
3A to 3E are waveform diagrams showing how pulse signals are output from the sensors S1 to S5 in response to the rotation angle change of the motor 47 when the brushless motor 47 rotates. It is. Further, in (f) to (h), how the counter values of the electric angle counter E, the position counter P, and the stroke counter S correspond to the change in the rotation angle of the motor 47 when the brushless motor 47 rotates. It shows whether or not.

なお、上記電気角カウンタEは、ブラシレスモータ47を駆動すべく同モータ47の通電相を切り換える際に用いられるものである。また、上記位置カウンタPは、エンジン1を運転開始する際のイグニッションスイッチ56のオン操作(イグニッションオン)後、ブラシレスモータ47の回転角がどれだけ変化したか、その相対回転角を表すものである。更に、上記ストロークカウンタSは、ブラシレスモータ47の上記所定回転角範囲(10回転分)において、コントロールシャフト16を最も先端側に変位させたときのブラシレスモータ47の回転角を基準(0°)とした同モータ47の回転角を表すものであり、このストロークカウンタSは、ブラシレスモータ47の絶対回転角を表している。   The electrical angle counter E is used when the energized phase of the motor 47 is switched to drive the brushless motor 47. The position counter P represents the relative rotation angle of how much the rotation angle of the brushless motor 47 has changed after the ignition switch 56 is turned on (ignition on) when starting the operation of the engine 1. . Further, the stroke counter S is based on the rotation angle of the brushless motor 47 when the control shaft 16 is displaced to the most distal side within the predetermined rotation angle range (10 rotations) of the brushless motor 47 as a reference (0 °). The stroke counter S represents the absolute rotation angle of the brushless motor 47.

図4に、上記電気角カウンタE、位置カウンタP、及びストロークカウンタSのカウンタ値を変化させるためのカウント処理についてその手順を示す。このカウント処理は、電子制御装置50により、位置センサS4,S5からのパルス信号のエッジ間隔に対応する時間間隔よりも短い間隔をもって周期的に実行される。   FIG. 4 shows the procedure of the count process for changing the counter values of the electrical angle counter E, the position counter P, and the stroke counter S. This counting process is periodically executed by the electronic control unit 50 at intervals shorter than the time intervals corresponding to the edge intervals of the pulse signals from the position sensors S4 and S5.

本処理においては、まず、先の図3(a)〜(c)に示した各電気角センサS1〜S3からのパルス信号の出力パターンに基づき、図3(f)に示すように電気角カウンタEのカウンタ値を変化させる(S101)。   In this processing, first, based on the output pattern of the pulse signal from each of the electrical angle sensors S1 to S3 shown in FIGS. 3A to 3C, as shown in FIG. The counter value of E is changed (S101).

より詳しくは、図5(a)に示すように、各電気角センサS1〜S3から各々ハイ信号「H」とロー信号「L」とのいずれが出力されているかに応じて、電気角カウンタEの値は「0」〜「5」の範囲内の連続した整数値のうちのいずれかが当てはめられる。その結果、ブラシレスモータ47の正回転時には、電気角センサS1〜S3からのパルス信号の出力パターンに応じて、「0」〜「5」の範囲内の連続した各整数値が「0」→「1」→「2」→「3」→「4」→「5」→「0」といった順序で順方向に電気角カウンタEの値として当てはめられる。また、ブラシレスモータ47の逆回転時には、電気角センサS1〜S3からのパルス信号の出力パターンに応じて、「0」〜「5」の範囲内の連続した各整数値が「5」→「4」→「3」→「2」→「1」→「0」→「5」といった順序で、逆方向に電気角カウンタEの値として当てはめられる。なお、何らかの原因により、各電気角センサS1〜S3全てがハイ信号「H」を出力する場合、或いは、各電気角センサS1〜S3全てがロー信号「L」を出力する場合もあるが、これらの場合には異常状態である旨判断され、電気角カウンタEは、そのまま保持される。   More specifically, as shown in FIG. 5 (a), the electrical angle counter E depends on whether the high signal “H” or the low signal “L” is output from each of the electrical angle sensors S1 to S3. Any of consecutive integer values in the range of “0” to “5” is applied. As a result, during the forward rotation of the brushless motor 47, each successive integer value in the range of “0” to “5” is changed from “0” to ““ according to the output pattern of the pulse signal from the electrical angle sensors S1 to S3. The value of the electrical angle counter E is applied in the forward direction in the order of “1” → “2” → “3” → “4” → “5” → “0”. Further, during the reverse rotation of the brushless motor 47, each successive integer value in the range of “0” to “5” is changed from “5” to “4” according to the output pattern of the pulse signal from the electrical angle sensors S1 to S3. ”→“ 3 ”→“ 2 ”→“ 1 ”→“ 0 ”→“ 5 ”, and the values of the electrical angle counter E are applied in the reverse direction. For some reason, all the electrical angle sensors S1 to S3 output a high signal “H”, or all the electrical angle sensors S1 to S3 may output a low signal “L”. In this case, it is determined that the state is abnormal, and the electrical angle counter E is held as it is.

そして、この電気角カウンタEに基づいてブラシレスモータ47の通電相を切り換えることで、同モータの正回転方向または逆回転方向への駆動が行われる。
続いて、各位置センサS4,S5からのパルス信号の出力パターンに基づき、同パルス信号のエッジ毎に位置カウンタPのカウンタ値が増減される(図4のS102)。
Then, by switching the energized phase of the brushless motor 47 based on the electric angle counter E, the motor is driven in the forward rotation direction or the reverse rotation direction.
Subsequently, based on the output pattern of the pulse signal from each of the position sensors S4 and S5, the counter value of the position counter P is increased or decreased for each edge of the pulse signal (S102 in FIG. 4).

詳しくは、図5(b)に示すように、位置センサS4,S5のうち、一方のセンサからパルス信号の立ち上がりエッジ或いは立ち下がりエッジのいずれが生じているか、及び他方のセンサからハイ信号「H」或いはロー信号「L」のいずれが出力されているかに応じて、位置カウンタPには、「+1」或いは「−1」が加算される。なお、同図5(b)において、「↑」はパルス信号の立ち上がりエッジを表し、「↓」はパルス信号の立ち下がりエッジを表している。こうした処理を実行して得られる位置カウンタPは、各位置センサS4,S5からのパルス信号のエッジを計数した値となっている。   More specifically, as shown in FIG. 5B, one of the position sensors S4 and S5 has a rising edge or a falling edge of the pulse signal from one sensor, and a high signal “H” from the other sensor. "+1" or "-1" is added to the position counter P depending on whether the low signal "L" is output. In FIG. 5B, “↑” represents the rising edge of the pulse signal, and “↓” represents the falling edge of the pulse signal. The position counter P obtained by executing such processing is a value obtained by counting the edges of the pulse signals from the position sensors S4 and S5.

ここで、ブラシレスモータ47の正回転中であれば、位置カウンタPは、図3(d)及び(e)に示される位置センサS4,S5からのパルス信号のエッジ毎に「1」ずつ加算されてゆき、図3(g)中の右方向に変化してゆく。また、ブラシレスモータ47の逆回転中であれば、位置カウンタPは、上記エッジ毎に「1」ずつ減算されてゆき、図3(g)中の左方向に変化してゆく。なお、この位置カウンタPは、イグニッションスイッチ56のオフ操作(イグニッションオフ)がなされたとき、「0」にリセットされる。従って、位置カウンタPの値は、イグニッションオン後にコントロールシャフト16が軸方向にどれだけ変位したかを表すものとなる。   If the brushless motor 47 is rotating forward, the position counter P is incremented by “1” for each edge of the pulse signal from the position sensors S4 and S5 shown in FIGS. 3 (d) and 3 (e). Then, it changes to the right in FIG. If the brushless motor 47 is rotating in the reverse direction, the position counter P is decremented by “1” for each edge and changes to the left in FIG. The position counter P is reset to “0” when the ignition switch 56 is turned off (ignition off). Therefore, the value of the position counter P represents how much the control shaft 16 is displaced in the axial direction after the ignition is turned on.

そして、図3(g)に示すように変化する位置カウンタPに応じて、図3(h)に示すようにストロークカウンタSは変化する。具体的には、位置カウンタPに対して学習値Prの正負を反転させた値(−Pr)を加算して得られる値がストロークカウンタSのカウンタ値として設定される(図4のS103)。なお、上記学習値Prは、コントロールシャフト16をその移動範囲における図2の左端(先端)側の変位端まで変位させたとき、すなわちブラシレスモータ47の回転角を上記所定の回転角範囲内における上記コントロールシャフト16の変位状態に対応する端まで変化させたときの位置カウンタPに対応した値である。この学習値Prは、イグニッションオン後に所定の条件下で学習が行われて電子制御装置50の不揮発性メモリに記憶される。従って、位置カウンタPに学習値Prの正負を反転させた値を加算して得られるストロークカウンタSの値は、コントロールシャフト16が最も先端側に変位した状態を基準とする同シャフト16の軸方向位置を表すものになる。このことは、言い換えれば、ストロークカウンタSは、ブラシレスモータ47の上記所定回転角範囲におけるコントロールシャフト16の上記変位状態に対応する端を基準とした同モータ47の絶対回転角を表すものになっている。   Then, the stroke counter S changes as shown in FIG. 3 (h) in accordance with the position counter P that changes as shown in FIG. 3 (g). Specifically, a value obtained by adding a value (−Pr) obtained by inverting the sign of the learning value Pr to the position counter P is set as a counter value of the stroke counter S (S103 in FIG. 4). Note that the learning value Pr is the value obtained when the control shaft 16 is displaced to the displacement end on the left end (tip) side in FIG. 2 in the movement range, that is, the rotation angle of the brushless motor 47 is within the predetermined rotation angle range. This is a value corresponding to the position counter P when the control shaft 16 is changed to the end corresponding to the displacement state. The learning value Pr is learned under a predetermined condition after the ignition is turned on, and is stored in the nonvolatile memory of the electronic control unit 50. Accordingly, the value of the stroke counter S obtained by adding the value obtained by inverting the sign of the learning value Pr to the position counter P is the axial direction of the shaft 16 with respect to the state in which the control shaft 16 is displaced to the most distal side. It represents the position. In other words, the stroke counter S represents the absolute rotation angle of the motor 47 with reference to the end corresponding to the displacement state of the control shaft 16 in the predetermined rotation angle range of the brushless motor 47. Yes.

電子制御装置50は、上記ストロークカウンタSに基づき、ブラシレスモータ47の回転角、換言すれば吸気バルブ9の最大リフト量VL及び作用角INCAMを検出する。そして、上記のように検出された最大リフト量VL及び作用角INCAMといったバルブ特性の目標値を機関運転状態に基づいて算出し、上記検出されたバルブ特性が同目標値となるようにブラシレスモータ47の回転駆動制御、換言すれば可変動弁機構14の駆動制御を行う。これにより、上記最大リフト量VL及び作用角INCAMといったバルブ特性は目標とする特性に変更される。   Based on the stroke counter S, the electronic control unit 50 detects the rotation angle of the brushless motor 47, in other words, the maximum lift amount VL and the working angle INCAM of the intake valve 9. Then, target values of the valve characteristics such as the maximum lift amount VL and the working angle INCAM detected as described above are calculated based on the engine operating state, and the brushless motor 47 is set so that the detected valve characteristics become the target values. , In other words, drive control of the variable valve mechanism 14 is performed. As a result, the valve characteristics such as the maximum lift amount VL and the working angle INCAM are changed to target characteristics.

他方、上記位置カウンタPは、常にブラシレスモータ47の実際の回転角に対応したカウンタ値になっているとは限らず、その実際の回転角に対応した値からずれることがある。例えば、位置センサS4,S5から出力される信号にノイズが重畳すると、そのノイズのエッジと位置センサS4,S5からのパルス信号のエッジとを見分けることができず、ノイズのエッジをパルス信号のエッジと誤認し、パルス信号のエッジを計数した位置カウンタPがブラシレスモータ47の実際の回転角と対応しなくなる。また、各位置センサS4、S5に断線やショートなどといった異常が発生した場合にも、位置カウンタPにはずれが生じる。   On the other hand, the position counter P is not always a counter value corresponding to the actual rotation angle of the brushless motor 47, and may deviate from a value corresponding to the actual rotation angle. For example, when noise is superimposed on signals output from the position sensors S4 and S5, the edge of the noise cannot be distinguished from the edge of the pulse signal from the position sensors S4 and S5. And the position counter P that counted the edges of the pulse signal does not correspond to the actual rotation angle of the brushless motor 47. The position counter P also deviates when an abnormality such as a disconnection or short circuit occurs in the position sensors S4 and S5.

以下、図6に示すタイミングチャートを参照して、ブラシレスモータ47の正回転中あるいは逆回転中に上記ノイズが重畳した場合のずれの発生態様を説明する。また、図8に示すタイミングチャートを参照して、ブラシレスモータ47の回転方向が反転するときに上記ノイズが重畳した場合のずれの発生態様を説明する。そして、位置センサS4や位置センサS5に異常が生じた場合、例えば位置センサS4が断線した場合のずれの発生態様について、図9に示すタイミングチャートを参照して説明する。   Hereinafter, with reference to a timing chart shown in FIG. 6, a description will be given of how deviation occurs when the noise is superimposed during the forward or reverse rotation of the brushless motor 47. In addition, with reference to a timing chart shown in FIG. 8, a mode of occurrence of deviation when the noise is superimposed when the rotation direction of the brushless motor 47 is reversed will be described. And when abnormality arises in position sensor S4 or position sensor S5, for example, the generation | occurrence | production mode of deviation when position sensor S4 is disconnected is demonstrated with reference to the timing chart shown in FIG.

なお、図6、図8、及び図9において、(a)、(b)には、ブラシレスモータ47の回転角変化に対する位置センサS4,S5からのパルス信号の波形変化を示す。また(c)には、電気角カウンタEの推移を示す。そして、(d)には、ブラシレスモータ47が正回転しているときの位置カウンタPの推移を、(e)には、ブラシレスモータ47が逆回転しているときの位置カウンタPの推移をそれぞれ示す。   6, 8, and 9, (a) and (b) show changes in the waveform of the pulse signals from the position sensors S <b> 4 and S <b> 5 with respect to the rotation angle change of the brushless motor 47. Further, (c) shows the transition of the electrical angle counter E. (D) shows the transition of the position counter P when the brushless motor 47 is rotating forward, and (e) is the transition of the position counter P when the brushless motor 47 is rotating backward. Show.

[モータ正回転中にノイズが重畳した場合に生じるずれ量の発生態様]
ブラシレスモータ47の正回転中、例えば図6(a)に示すように、位置センサS4からの信号にノイズが重畳し、そのノイズが位置センサS5からのパルス信号の立ち下がりエッジと重なると、上記ノイズが発生しているタイミングA,B,Cでの位置センサS4,S5からの信号の出力パターンは、図7(a)に示すパターンとなる。
[Generation of deviation caused when noise is superimposed during normal motor rotation]
During forward rotation of the brushless motor 47, for example, as shown in FIG. 6A, when noise is superimposed on the signal from the position sensor S4 and the noise overlaps with the falling edge of the pulse signal from the position sensor S5, Output patterns of signals from the position sensors S4 and S5 at the timings A, B, and C where noise is generated are the patterns shown in FIG.

すなわち、タイミングAにおいては、位置センサS4の信号は立ち上がりエッジとなっており、位置センサS5の信号はハイ信号になっている。また、タイミングBにおいては、位置センサS4の信号はハイ信号となっており、位置センサS5の信号は立ち下がりエッジになっている。そして、タイミングCにおいては、位置センサS4の信号は立ち下がりエッジとなっており、位置センサS5の信号はロー信号になっている。   That is, at timing A, the signal from the position sensor S4 has a rising edge, and the signal from the position sensor S5 is a high signal. At timing B, the signal from the position sensor S4 is a high signal, and the signal from the position sensor S5 is a falling edge. At timing C, the signal from the position sensor S4 has a falling edge, and the signal from the position sensor S5 is a low signal.

その結果、タイミングA,B,Cにおいて、それぞれ位置カウンタPに「−1」が加算され、図6(d)のタイミングA,B,Cでは、同位置カウンタPが破線で示されるように「1」ずつ減少してゆく。一方、上記ノイズが発生していなければ、タイミングA,B,Cのうち、タイミングBで位置カウンタPに「1」が加算されるだけとなるはずである。このため、上記ノイズが発生したときの位置カウンタPは、タイミングC以降、ブラシレスモータ47の実際の回転角に対応する値(実線)に対し、二点鎖線で示されるように「4」だけ小さくなり、この場合のずれは「−4」となる。   As a result, at timings A, B, and C, “−1” is added to the position counter P, and at timings A, B, and C in FIG. Decrease by 1 ”. On the other hand, if the noise is not generated, among the timings A, B, and C, “1” should only be added to the position counter P at the timing B. Therefore, after the timing C, the position counter P when the noise is generated is smaller by “4” than the value corresponding to the actual rotation angle of the brushless motor 47 (solid line) as indicated by a two-dot chain line. In this case, the deviation is “−4”.

[モータ逆回転中にノイズが重畳した場合に生じるずれ量の発生態様]
ブラシレスモータ47の逆回転中、例えば図6(a)に示すように、位置センサS4からの信号にノイズが重畳し、そのノイズが位置センサS5からのパルス信号の立ち上がりエッジと重なると、上記ノイズの発生しているタイミングC,B,Aでの位置センサS4,S5からの信号の出力パターンは、図7(b)に示すパターンとなる。
[Generation of deviation caused when noise is superimposed during reverse motor rotation]
During reverse rotation of the brushless motor 47, for example, as shown in FIG. 6A, when noise is superimposed on the signal from the position sensor S4 and the noise overlaps with the rising edge of the pulse signal from the position sensor S5, the noise The output pattern of the signals from the position sensors S4 and S5 at the timings C, B, and A where the occurrence of the above becomes the pattern shown in FIG.

すなわち、タイミングCにおいては、位置センサS4の信号は立ち上がりエッジとなっており、位置センサS5の信号はハイ信号になっている。また、タイミングBにおいては、位置センサS4の信号はハイ信号となっており、位置センサS5の信号は立ち上がりエッジになっている。そして、タイミングAにおいては、位置センサS4の信号は立ち下がりエッジとなっており、位置センサS5の信号はハイ信号になっている。   That is, at timing C, the signal from the position sensor S4 is a rising edge, and the signal from the position sensor S5 is a high signal. At timing B, the signal from the position sensor S4 is a high signal, and the signal from the position sensor S5 is a rising edge. At timing A, the signal from the position sensor S4 has a falling edge, and the signal from the position sensor S5 is a high signal.

その結果、タイミングC,B,Aで、それぞれ位置カウンタPに「1」が加算され、図6(e)のタイミングC,B,Aでは、同位置カウンタPが破線で示されるように「1」ずつ増加してゆく。一方、上記ノイズが発生していなければ、タイミングC,B,Aのうち、タイミングBで位置カウンタPに「−1」が加算されるだけとなるはずである。このため、上記ノイズが発生したときの位置カウンタPは、タイミングA以降、ブラシレスモータ47の実際の回転角に対応する値(実線)に対し、二点鎖線で示されるように「4」だけ大きくなり、この場合のずれは「(+)4」となる。   As a result, “1” is added to the position counter P at each of timings C, B, and A. At timings C, B, and A in FIG. "It will increase gradually. On the other hand, if the noise is not generated, “−1” should be added to the position counter P at the timing B out of the timings C, B, and A. For this reason, the position counter P when the noise occurs is larger by “4” than the value (solid line) corresponding to the actual rotation angle of the brushless motor 47 after the timing A, as indicated by the two-dot chain line. Therefore, the deviation in this case is “(+) 4”.

[モータ正逆回転反転中にノイズが重畳した場合に生じるずれ量の発生態様]
ブラシレスモータ47の正逆回転反転中、例えば図8(b)に破線L1で示されるように、位置センサS5からの信号にノイズが重畳し、そのノイズが位置センサS4からのパルス信号の立ち上がりエッジと重なると、上記ノイズのエッジ及び上記パルス信号のエッジ毎に位置カウンタPが「1」ずつ減少してゆく。これは、上記ノイズの重畳によって位置センサS4,S5からの信号の出力パターンが、位置カウンタPを「−1」ずつ加算してゆくパターンとなるためである。一方、上記ノイズが発生していなければ、上記のように位置カウンタPが「1」ずつ減少する期間に対応する期間中には、位置カウンタPに「1」が加算されるはずである。このため、上記ノイズが発生したときの位置カウンタPは、ブラシレスモータ47の実際の回転角に対応する値(実線)に対し、破線L2で示されるように「4」だけ小さくなり、この場合のずれは「−4」となる。
[Generation of deviation caused when noise is superimposed during motor reverse rotation reverse]
During forward and reverse rotation reversal of the brushless motor 47, for example, as indicated by a broken line L1 in FIG. 8B, noise is superimposed on the signal from the position sensor S5, and the noise is a rising edge of the pulse signal from the position sensor S4. , The position counter P is decreased by “1” for each edge of the noise and the edge of the pulse signal. This is because the output pattern of the signals from the position sensors S4 and S5 becomes a pattern in which the position counter P is incremented by “−1” by the superposition of the noise. On the other hand, if the noise is not generated, “1” should be added to the position counter P during the period corresponding to the period in which the position counter P decreases by “1” as described above. For this reason, the position counter P when the noise occurs is smaller by “4” as shown by the broken line L2 than the value (solid line) corresponding to the actual rotation angle of the brushless motor 47. The deviation is “−4”.

また、ブラシレスモータ47の正逆回転反転中、例えば図8(b)に破線L3で示されるように、位置センサS5からの信号にノイズが重畳し、そのノイズが位置センサS4からのパルス信号の立ち下がりエッジと重なると、上記ノイズのエッジ及び上記パルス信号のエッジ毎に位置カウンタPが「1」ずつ増加してゆく。これは、上記ノイズの発生によって位置センサS4,S5からの信号の出力パターンが、位置カウンタPを「1」ずつ加算してゆくパターンとなるためである。一方、上記ノイズが発生していなければ、上記のように位置カウンタPが「1」ずつ増加する期間に対応する期間中には、位置カウンタPに「−1」が加算されるはずである。このため、上記ノイズが発生したときの位置カウンタPは、ブラシレスモータ47の実際の回転角に対応する値(実線)に対し、破線L4で示されるように「4」だけ大きくなり、この場合のずれは「(+)4」となる。   Further, during forward and reverse rotation reversal of the brushless motor 47, for example, as indicated by a broken line L3 in FIG. 8B, noise is superimposed on the signal from the position sensor S5, and the noise is the pulse signal from the position sensor S4. When overlapping with the falling edge, the position counter P is incremented by “1” for each edge of the noise and the edge of the pulse signal. This is because the output pattern of signals from the position sensors S4 and S5 becomes a pattern in which the position counter P is incremented by “1” by the generation of the noise. On the other hand, if the noise is not generated, “−1” should be added to the position counter P during the period corresponding to the period in which the position counter P increases by “1” as described above. For this reason, the position counter P when the noise is generated is increased by “4” as shown by the broken line L4 with respect to the value (solid line) corresponding to the actual rotation angle of the brushless motor 47. The deviation is “(+) 4”.

[位置センサS4が断線した場合にあってモータ正回転中に生じるずれ量の発生態様]
ブラシレスモータ47の正回転中にあって、位置センサS4が正常に動作していれば、図9(a)に実線にて示すように、その出力信号はパルス信号になっている。従って、図9(d)に実線にて示すように、位置カウンタPは、位置センサS4,S5からのパルス信号のエッジ毎に「1」ずつ加算されていく。
[Generation mode of deviation amount generated when the position sensor S4 is disconnected and during normal motor rotation]
If the position sensor S4 is operating normally during the forward rotation of the brushless motor 47, the output signal is a pulse signal as shown by the solid line in FIG. Therefore, as indicated by a solid line in FIG. 9D, the position counter P is incremented by “1” for each edge of the pulse signals from the position sensors S4 and S5.

一方、図9(a)に二点鎖線にて示すように、位置センサS4に断線が発生し、位置センサS4の信号がロー信号に張り付いた場合には、図9(d)に二点鎖線にて示すように、位置センサS5のパルス信号が立ち上がりエッジになったとき、位置カウンタPには「−1」が加算される。すなわち、位置カウンタPは「1」だけ減少される。その後、位置センサS5のパルス信号が立ち下がりエッジになると、図9(d)に二点鎖線にて示すように、位置カウンタPには「1」が加算される。従って、同位置カウンタPは、位置センサS5から出力されるパルス信号のエッジ毎に、「−1」の減少と「+1」の増大とを繰り返すことになり、ブラシレスモータ47が正回転していても、その値はほとんど変化しなくなる。このため、位置カウンタPにずれが発生し、ブラシレスモータ47の実際の回転角に対応するカウンタ値(実線)に対して、上記算出される位置カウンタPのずれは、マイナス側に大きくなっていく。   On the other hand, as shown by a two-dot chain line in FIG. 9A, when the disconnection occurs in the position sensor S4 and the signal of the position sensor S4 sticks to the low signal, two points are shown in FIG. As indicated by the chain line, when the pulse signal of the position sensor S5 becomes a rising edge, “−1” is added to the position counter P. That is, the position counter P is decreased by “1”. Thereafter, when the pulse signal of the position sensor S5 becomes a falling edge, “1” is added to the position counter P, as indicated by a two-dot chain line in FIG. Therefore, the same position counter P repeats the decrease of “−1” and the increase of “+1” for each edge of the pulse signal output from the position sensor S5, and the brushless motor 47 is rotating forward. However, its value hardly changes. For this reason, a deviation occurs in the position counter P, and the deviation of the calculated position counter P increases toward the minus side with respect to the counter value (solid line) corresponding to the actual rotation angle of the brushless motor 47. .

[位置センサS4が断線した場合にあってモータ逆回転中に生じるずれ量の発生態様]
ブラシレスモータ47の逆回転中にあって、位置センサS4が正常に動作していれば、図9(a)に実線にて示すように、その出力信号はパルス信号になっている。従って、図9(e)に実線にて示すように、位置カウンタPは、位置センサS4,S5からのパルス信号のエッジ毎に「−1」ずつ加算されていく。すなわち、位置カウンタPは「1」ずつ減少されていく。
[Generation mode of deviation amount generated during reverse rotation of motor when position sensor S4 is disconnected]
If the position sensor S4 is operating normally during the reverse rotation of the brushless motor 47, the output signal is a pulse signal as shown by the solid line in FIG. Accordingly, as indicated by a solid line in FIG. 9E, the position counter P is incremented by “−1” for each edge of the pulse signals from the position sensors S4 and S5. That is, the position counter P is decreased by “1”.

一方、図9(a)に二点鎖線にて示すように、位置センサS4に断線が発生し、位置センサS4の信号がロー信号に張り付いた場合には、図9(e)に二点鎖線にて示すように、位置センサS5のパルス信号が立ち上がりエッジになったとき、位置カウンタPには「−1」が加算される。すなわち、位置カウンタPは「1」だけ減少される。その後、位置センサS5のパルス信号が立ち下がりエッジになると、図9(e)に二点鎖線にて示すように、位置カウンタPには「1」が加算される。従って、同位置カウンタPは、位置センサS5から出力されるパルス信号のエッジ毎に、「−1」の減少と「+1」の増大とを繰り返すことになり、ブラシレスモータ47が逆回転していても、その値はほとんど変化しなくなる。このため、位置カウンタPにずれが発生し、ブラシレスモータ47の実際の回転角に対応するカウンタ値(実線)に対して、上記算出される位置カウンタPのずれは、プラス側に大きくなっていく。   On the other hand, when the disconnection occurs in the position sensor S4 and the signal of the position sensor S4 sticks to the low signal as shown by a two-dot chain line in FIG. 9A, two points are shown in FIG. As indicated by the chain line, when the pulse signal of the position sensor S5 becomes a rising edge, “−1” is added to the position counter P. That is, the position counter P is decreased by “1”. Thereafter, when the pulse signal of the position sensor S5 becomes a falling edge, “1” is added to the position counter P as shown by a two-dot chain line in FIG. Therefore, the same position counter P repeats the decrease of “−1” and the increase of “+1” for each edge of the pulse signal output from the position sensor S5, and the brushless motor 47 rotates in the reverse direction. However, its value hardly changes. For this reason, a deviation occurs in the position counter P, and the deviation of the calculated position counter P increases toward the plus side with respect to the counter value (solid line) corresponding to the actual rotation angle of the brushless motor 47. .

なお、図9には、位置センサS4が断線した場合の位置カウンタPの変化態様を示したが、同位置センサS4がショートしてその信号がハイ信号に張り付いた場合や、位置センサS5が断線した場合、あるいは位置センサS5がショートした場合にも、位置カウンタPは同様な態様にて変化する。従って、位置センサS4の断線のみならず、同位置センサS4のショートや、位置センサS5の断線及びショートといった異常発生時も、同様な態様にて位置カウンタPにはずれが発生する。ちなみに、本実施形態では、位置センサが2つ設けられているため、一方のセンサに異常が生じた場合、他方のセンサからのパルス信号によって位置カウンタPは「−1」の減少と「+1」の増大とを繰り返す。他方、位置センサが1つだけ設けられている場合には、そのセンサに異常が生じることでパルス信号が消えてしまい、その結果、位置カウンタPは全く変化しなくなる。従って、この場合にも、ずれは徐々に大きくなっていく。   FIG. 9 shows how the position counter P changes when the position sensor S4 is disconnected. However, when the position sensor S4 is short-circuited and the signal sticks to a high signal, the position sensor S5 The position counter P changes in the same manner when the wire breaks or when the position sensor S5 is short-circuited. Accordingly, not only the disconnection of the position sensor S4 but also an abnormality such as a short circuit of the position sensor S4 or a disconnection or short circuit of the position sensor S5 causes a shift in the position counter P in the same manner. Incidentally, in this embodiment, since two position sensors are provided, when an abnormality occurs in one sensor, the position counter P is decreased by “−1” and “+1” by a pulse signal from the other sensor. Repeat the increase. On the other hand, when only one position sensor is provided, the pulse signal disappears due to an abnormality in the sensor, and as a result, the position counter P does not change at all. Therefore, also in this case, the deviation gradually increases.

以上のように、位置センサS4,S5から出力されるパルス信号にノイズが重畳したり、位置センサS4や位置センサS5に異常が生じたりすると、位置カウンタPは、ブラシレスモータ47の実際の回転角と対応しなくなる。その結果、位置カウンタPに基づいて増減されるストロークカウンタSの値は、ブラシレスモータ47の実際の回転角と一致しなくなり、最大リフト量VL及び作用角INCAMといったバルブ特性を正確に検出することができなくなる。従って、検出されたバルブ特性が目標特性となるようブラシレスモータ47を駆動したとき、実際のバルブ特性は目標特性からずれてしまい、機関運転に対して悪影響を与えてしまうおそれがある。   As described above, when noise is superimposed on the pulse signals output from the position sensors S4 and S5, or when an abnormality occurs in the position sensor S4 or the position sensor S5, the position counter P detects the actual rotation angle of the brushless motor 47. And no longer correspond. As a result, the value of the stroke counter S that is increased or decreased based on the position counter P does not coincide with the actual rotation angle of the brushless motor 47, and the valve characteristics such as the maximum lift amount VL and the working angle INCAM can be accurately detected. become unable. Therefore, when the brushless motor 47 is driven so that the detected valve characteristic becomes the target characteristic, the actual valve characteristic may deviate from the target characteristic, which may adversely affect the engine operation.

そこで本実施形態では、ブラシレスモータ47の駆動に用いられる電気角センサS1〜S3からのパルス信号を利用して上記ずれ量を求め、そのずれ量に基づいて位置カウンタPを補正することにより、同位置カウンタPを実際のモータ回転角に対応する値へと戻すようにしている。   Therefore, in the present embodiment, the deviation amount is obtained by using the pulse signals from the electric angle sensors S1 to S3 used for driving the brushless motor 47, and the position counter P is corrected based on the deviation amount. The position counter P is returned to a value corresponding to the actual motor rotation angle.

まず、位置カウンタPのずれ量ΔPを算出して当該位置カウンタPを補正する処理について、その基本原理を説明する。
[1]各電気角センサS1〜S3から出力されるパルス信号のエッジ発生毎に、今回のエッジ発生時における位置カウンタPの値Pi と前回のエッジ発生時における位置カウンタPの値Pi-1 との差(Pi −Pi-1 )を算出する。
First, the basic principle of the process of calculating the displacement amount ΔP of the position counter P and correcting the position counter P will be described.
[1] Every time an edge of the pulse signal output from each of the electrical angle sensors S1 to S3 is generated, the value Pi of the position counter P when the current edge is generated and the value Pi-1 of the position counter P when the previous edge is generated The difference (Pi-Pi-1) is calculated.

[2]電気角カウンタEの変化に基づきブラシレスモータ47の回転状態が正回転中、逆回転中、及び正逆回転反転中のうちのいずれであるかを判断する。より詳しくは、各電気角センサS1〜S3からのパルス信号の前回のエッジ発生時と今回のエッジ発生時とにおける各々の電気角カウンタEの変化方向に基づき、ブラシレスモータ47が正回転中、逆回転中、及び正逆回転反転中のいずれであるかを判断する。すなわち、図10に示すように、前回のエッジ発生時と今回のエッジ発生時との電気角カウンタEの変化方向について、それらが共に順方向であればモータ正回転中である旨の判断を行い、それらが共に逆方向であればモータ逆回転中である旨の判断を行う。また、前回のエッジ発生時と今回のエッジ発生時との電気角カウンタEの変化方向が順方向と逆方向とで異なっていれば、モータ正逆回転反転中である旨の判断を行う。   [2] Based on the change of the electric angle counter E, it is determined whether the rotation state of the brushless motor 47 is normal rotation, reverse rotation, or normal / reverse rotation inversion. More specifically, based on the direction of change of each electrical angle counter E between the previous edge generation and the current edge generation of the pulse signals from the electrical angle sensors S1 to S3, the brushless motor 47 is rotating in the forward direction. It is determined whether the rotation is in progress or reverse rotation is in reverse. That is, as shown in FIG. 10, regarding the change direction of the electrical angle counter E between the previous edge occurrence and the current edge occurrence, if both are forward directions, it is determined that the motor is rotating forward. If they are both in the reverse direction, it is determined that the motor is rotating in reverse. Further, if the change direction of the electrical angle counter E between the occurrence of the previous edge and the occurrence of the current edge is different between the forward direction and the reverse direction, it is determined that the motor is rotating in the reverse direction.

そして、ブラシレスモータ47の回転状態に応じて差(Pi −Pi-1 )の正常時の値である正常値Jを可変設定する。この正常値Jの可変設定では、電気角センサS1〜S3からのパルス信号のエッジ間において位置センサS4,S5から出力されるパルス信号のエッジ数の適正値「n」が、本実施形態では「4」であるため、正常値Jがモータ正回転中であれば「n(=4)」とされ、モータ逆回転中であれば「−n(=−4)」とされる。そして、モータ正逆回転反転中であれば正常値Jは「0」とされる。   Then, a normal value J which is a normal value of the difference (Pi−Pi−1) is variably set according to the rotation state of the brushless motor 47. In the variable setting of the normal value J, an appropriate value “n” of the number of edges of the pulse signals output from the position sensors S4 and S5 between the edges of the pulse signals from the electrical angle sensors S1 to S3 is “ 4 ”, the normal value J is“ n (= 4) ”if the motor is rotating forward, and“ −n (= −4) ”if the motor is rotating backward. If the motor is rotating in the reverse direction, the normal value J is set to “0”.

[3]ブラシレスモータの回転状態に応じて設定される上記正常値Jに対して上記差(Pi −Pi-1 )が異なっている場合、位置カウンタPが、ブラシレスモータ47の実際の回転角に対応する値からずれており、同位置カウンタPは異常であると判定する。   [3] When the difference (Pi−Pi−1) is different from the normal value J set according to the rotation state of the brushless motor, the position counter P is set to the actual rotation angle of the brushless motor 47. It is deviated from the corresponding value, and it is determined that the same position counter P is abnormal.

[4]位置カウンタPがずれていると判定された場合には、上記正常値Jに対する差(Pi −Pi-1 )のずれ量「J−(Pi −Pi-1 )」を、ブラシレスモータ47の実際の回転角に対応する値に対するカウンタ値のずれ量ΔPとして算出し、当該ずれ量ΔP分の補正を位置カウンタPに加える。   [4] When it is determined that the position counter P is deviated, the deviation “J− (Pi−Pi−1)” of the difference (Pi−Pi−1) with respect to the normal value J is set to the brushless motor 47. Is calculated as a deviation amount ΔP of the counter value with respect to a value corresponding to the actual rotation angle, and a correction corresponding to the deviation amount ΔP is applied to the position counter P.

この場合、位置カウンタPが、ブラシレスモータ47の実際の回転角に対応しなくなり、その実際の回転角に対応する値からずれた状態になると、上記差(Pi −Pi-1 )には、実際の回転角に対応する値からの位置カウンタPのずれが反映される。すなわち、そのずれの分だけ上記差(Pi −Pi-1 )が正常値Jからずれることになる。従って、上記[4]の処理で算出されるずれ量ΔPを位置カウンタPに加えることで、ブラシレスモータ47の実際の回転角に対応する値からのずれを無くすことができる。そのため、位置カウンタPに基づき検出されるバルブ特性が目標特性となるようブラシレスモータ47を駆動したとき、実際のバルブ特性が目標特性からずれてしまい、機関運転に悪影響を与えてしまうといった不具合の発生が抑制される。   In this case, when the position counter P does not correspond to the actual rotation angle of the brushless motor 47 and deviates from a value corresponding to the actual rotation angle, the difference (Pi−Pi−1) is The deviation of the position counter P from the value corresponding to the rotation angle is reflected. That is, the difference (Pi-Pi-1) deviates from the normal value J by the amount of deviation. Therefore, by adding the deviation amount ΔP calculated in the process [4] to the position counter P, deviation from the value corresponding to the actual rotation angle of the brushless motor 47 can be eliminated. For this reason, when the brushless motor 47 is driven so that the valve characteristic detected based on the position counter P becomes the target characteristic, the actual valve characteristic deviates from the target characteristic, resulting in an adverse effect on engine operation. Is suppressed.

次に、ノイズの重畳によって発生する位置カウンタPの異常についてこれを検出するための処理、及びずれが生じている位置カウンタPをブラシレスモータ47の実際の回転角に対応したカウンタ値に戻すための補正処理について、ブラシレスモータ47の正回転中、逆回転中、及び正逆回転反転中に分けて説明する。   Next, a process for detecting an abnormality of the position counter P caused by noise superimposition, and a process for returning the position counter P where the deviation has occurred to a counter value corresponding to the actual rotation angle of the brushless motor 47. The correction process will be described separately for the brushless motor 47 during normal rotation, reverse rotation, and normal / reverse rotation inversion.

[モータ正回転中]
ブラシレスモータ47の正回転中、図6(a)に示されるようにノイズが発生すると、図6(d)に示されるように、位置カウンタPがブラシレスモータ47の実際の回転角に対応する値(実線)に対し、二点鎖線で示されるように「4」だけ小さくなることは上述したとおりである。この場合、電気角カウンタEが「2」から「3」に変化する電気角センサS1〜S3からのパルス信号のエッジ発生時、上記差(Pi −Pi-1 )が正常値J(この場合は「4」)に対し「−4」だけずれた「0」になる。
[During motor forward rotation]
When noise occurs as shown in FIG. 6A during the forward rotation of the brushless motor 47, the position counter P is a value corresponding to the actual rotation angle of the brushless motor 47 as shown in FIG. As described above, (solid line) is smaller by “4” as indicated by the two-dot chain line. In this case, when the edge of the pulse signal from the electric angle sensors S1 to S3 in which the electric angle counter E changes from “2” to “3”, the difference (Pi−Pi−1) is a normal value J (in this case). “4”) is shifted to “0” by “−4”.

このモータ正回転中に設定される上記差(Pi −Pi-1 )の正常値Jについては、電気角センサS1〜S3からのパルス信号のエッジ間において位置センサS4,S5から出力されるパルス信号のエッジ数nが設定される。   With respect to the normal value J of the difference (Pi-Pi-1) set during the forward rotation of the motor, the pulse signals output from the position sensors S4 and S5 between the edges of the pulse signals from the electrical angle sensors S1 to S3. The number of edges n is set.

この実施形態では、
・電気角センサS1〜S3からのパルス信号のエッジ間において位置センサS4,S5から出力されるパルス信号のエッジ数nは「4」である。
In this embodiment,
The number of edges n of the pulse signals output from the position sensors S4 and S5 between the edges of the pulse signals from the electrical angle sensors S1 to S3 is “4”.

・モータ正回転中、位置カウンタPが位置センサS4,S5からのパルス信号のエッジ毎に「1」ずつ増加する。
といったことから、モータ正回転中の上記正常値Jは「4」に設定される。
During the forward rotation of the motor, the position counter P is incremented by “1” for each edge of the pulse signal from the position sensors S4 and S5.
Therefore, the normal value J during the forward rotation of the motor is set to “4”.

そして、電気角カウンタEが「2」から「3」に変化する電気角センサS1〜S3からのパルス信号のエッジ発生時、上記差(Pi −Pi-1 )が正常値J(=4)でないことに基づき、位置カウンタPの異常発生が検出される。このように、位置カウンタPの異常発生が検出されると、正常値Jと上記差(Pi −Pi-1 )との差「J−(Pi −Pi-1 )」が上述したずれ量ΔPとして算出され(この場合、ずれ量ΔP=「4」)、このずれ量ΔP分の補正が位置カウンタP(二点鎖線)に加えられる。その結果、図6(d)に黒矢印で示されるように、位置カウンタPがブラシレスモータ47の実際の回転角に対応するカウンタ値(実線)へと変化する。これにより、位置カウンタPにおいて、モータの実際の回転角に対応する値(実線)からのずれが修正される。   When the edge of the pulse signal from the electrical angle sensors S1 to S3 in which the electrical angle counter E changes from “2” to “3”, the difference (Pi−Pi−1) is not the normal value J (= 4). Based on this, the occurrence of an abnormality in the position counter P is detected. As described above, when the occurrence of the abnormality of the position counter P is detected, the difference “J− (Pi−Pi−1)” between the normal value J and the difference (Pi−Pi−1) is set as the above-described deviation amount ΔP. It is calculated (in this case, the deviation amount ΔP = “4”), and the correction for the deviation amount ΔP is applied to the position counter P (two-dot chain line). As a result, the position counter P changes to a counter value (solid line) corresponding to the actual rotation angle of the brushless motor 47, as indicated by a black arrow in FIG. Thereby, in the position counter P, the deviation from the value (solid line) corresponding to the actual rotation angle of the motor is corrected.

[モータ逆回転中]
ブラシレスモータ47の逆回転中、図6(a)に示されるようにノイズが発生すると、図6(e)に示されるように、位置カウンタPがブラシレスモータ47の実際の回転角に対応する値(実線)に対し、二点鎖線で示されるように「4」だけ大きくなることは上述したとおりである。この場合、電気角カウンタEが「3」から「2」に変化する電気角センサS1〜S3からのパルス信号のエッジ発生時、上記差(Pi −Pi-1 )が正常値J(この場合は「−4」)に対し「+4」だけずれた「0」になる。
[Motor reverse rotation]
If noise occurs as shown in FIG. 6A during reverse rotation of the brushless motor 47, the position counter P is a value corresponding to the actual rotation angle of the brushless motor 47, as shown in FIG. As described above, it is increased by “4” as indicated by a two-dot chain line with respect to (solid line). In this case, when the edge of the pulse signal from the electrical angle sensors S1 to S3 in which the electrical angle counter E changes from “3” to “2”, the difference (Pi−Pi−1) is a normal value J (in this case). “−4”) is shifted to “0” by “+4”.

このモータ逆回転中に設定される差(Pi −Pi-1 )の正常値Jについては、
・電気角センサS1〜S3からのパルス信号のエッジ間において位置センサS4,S5から出力されるパルス信号のエッジ数nは「4」である。
Regarding the normal value J of the difference (Pi -Pi-1) set during the reverse rotation of the motor,
The number of edges n of the pulse signals output from the position sensors S4 and S5 between the edges of the pulse signals from the electrical angle sensors S1 to S3 is “4”.

・モータ逆回転中、位置カウンタPが位置センサS4,S5からのパルス信号のエッジ毎に「1」ずつ減少する。
といったことから、モータ逆回転中の上記正常値Jは「−4」に設定される。
During the reverse rotation of the motor, the position counter P decreases by “1” for each edge of the pulse signal from the position sensors S4 and S5.
Therefore, the normal value J during reverse rotation of the motor is set to “−4”.

そして、電気角カウンタEが「2」から「1」に変化する電気角センサS1〜S3からのパルス信号のエッジ発生時、上記差(Pi −Pi-1 )が正常値J(=−4)でないことに基づき、位置カウンタPの異常発生が検出される。このように、位置カウンタPの異常発生が検出されると、正常値Jと上記差(Pi −Pi-1 )との差「J−(Pi −Pi-1 )」がずれ量ΔPとして算出され(この場合、ずれ量ΔP=「−4」)、このずれ量ΔP分の補正が位置カウンタP(二点鎖線)に加えられる。その結果、図6(e)に黒矢印で示されるように、位置カウンタPがブラシレスモータ47の実際の回転角に対応するカウンタ値(実線)へと変化する。位置カウンタPにおいて、モータの実際の回転角に対応する値(実線)からのずれが修正される。   When the edge of the pulse signal from the electrical angle sensors S1 to S3 in which the electrical angle counter E changes from “2” to “1” is generated, the difference (Pi−Pi−1) is a normal value J (= −4). Therefore, the occurrence of an abnormality in the position counter P is detected. Thus, when the occurrence of an abnormality in the position counter P is detected, the difference “J− (Pi−Pi−1)” between the normal value J and the difference (Pi−Pi−1) is calculated as the deviation amount ΔP. (In this case, the deviation amount ΔP = “− 4”), and the correction corresponding to the deviation amount ΔP is applied to the position counter P (two-dot chain line). As a result, the position counter P changes to a counter value (solid line) corresponding to the actual rotation angle of the brushless motor 47, as indicated by a black arrow in FIG. In the position counter P, the deviation from the value (solid line) corresponding to the actual rotation angle of the motor is corrected.

[モータ正逆回転反転中]
ブラシレスモータ47の正逆回転反転中、例えば図8(b)に破線L1で示されるようにノイズが発生すると、図8(d)に破線L2で示されるように、位置カウンタPがブラシレスモータ47の実際の回転角に対応する値(実線)に対し、二点鎖線で示されるように「4」だけ小さくなることは上述したとおりである。この場合、電気角カウンタEが「3」から「2」に変化する電気角センサS1〜S3からのパルス信号のエッジ発生時、上記差(Pi −Pi-1 )が正常値J(この場合は「0」)に対し「−4」だけずれる。
[Motor forward / reverse rotation reverse]
For example, when noise is generated during reverse rotation of the brushless motor 47 as indicated by a broken line L1 in FIG. 8B, the position counter P is moved to the brushless motor 47 as indicated by a broken line L2 in FIG. As described above, the value corresponding to the actual rotation angle (solid line) becomes smaller by “4” as shown by the two-dot chain line. In this case, when the edge of the pulse signal from the electrical angle sensors S1 to S3 in which the electrical angle counter E changes from “3” to “2”, the difference (Pi−Pi−1) is a normal value J (in this case). "-0") is shifted by "-4".

このモータ正逆回転反転中に設定される上記差(Pi −Pi-1 )の正常値Jについては、
・モータ正回転中、位置カウンタPが位置センサS4,S5からのパルス信号のエッジ毎に「1」ずつ増加する。
About the normal value J of the difference (Pi -Pi-1) set during the reversal of the motor forward / reverse rotation,
During the forward rotation of the motor, the position counter P is incremented by “1” for each edge of the pulse signal from the position sensors S4 and S5.

・モータ逆回転中、位置カウンタPが位置センサS4,S5からのパルス信号のエッジ毎に「1」ずつ減少する。
といったことから、モータ逆回転中の上記正常値Jは「0」に設定される。
During the reverse rotation of the motor, the position counter P decreases by “1” for each edge of the pulse signal from the position sensors S4 and S5.
Therefore, the normal value J during reverse rotation of the motor is set to “0”.

そして、電気角カウンタEが「3」から「2」に変化する電気角センサS1〜S3からのパルス信号のエッジ発生時、上記差(Pi −Pi-1 )が正常値J(=0)でないことに基づき、位置カウンタPの異常発生が検出される。このように、位置カウンタPの異常発生が検出されると、正常値Jと上記差(Pi −Pi-1 )との差「J−(Pi −Pi-1 )」がずれ量ΔPとして算出され(この場合、ずれ量ΔP=「4」)、このずれ量ΔP分の補正が位置カウンタP(破線L2)に加えられる。その結果、図8(d)に上向きの黒矢印で示されるように、位置カウンタPがブラシレスモータ47の実際の回転角に対応する値(実線)へと変化する。これにより、位置カウンタPにおいて、モータの実際の回転角に対応する値(実線)からのずれが修正される。   When the edge of the pulse signal from the electrical angle sensors S1 to S3 in which the electrical angle counter E changes from “3” to “2” is generated, the difference (Pi−Pi−1) is not the normal value J (= 0). Based on this, the occurrence of an abnormality in the position counter P is detected. Thus, when the occurrence of an abnormality in the position counter P is detected, the difference “J− (Pi−Pi−1)” between the normal value J and the difference (Pi−Pi−1) is calculated as the deviation amount ΔP. (In this case, the deviation amount ΔP = “4”), the correction corresponding to the deviation amount ΔP is applied to the position counter P (broken line L2). As a result, the position counter P changes to a value (solid line) corresponding to the actual rotation angle of the brushless motor 47, as indicated by an upward black arrow in FIG. Thereby, in the position counter P, the deviation from the value (solid line) corresponding to the actual rotation angle of the motor is corrected.

また、上記ブラシレスモータの正逆回転反転中、例えば図8(b)に破線L3で示されるようにノイズが発生すると、図8(d)に破線L4で示されるように、位置カウンタPがブラシレスモータ47の実際の回転角に対応する値(実線)に対し、二点鎖線で示されるように「4」だけ大きくなることは上述したとおりである。この場合、電気角カウンタEが「3」から「2」に変化する電気角センサS1〜S3からのパルス信号のエッジ発生時、上記差(Pi −Pi-1 )が正常値J(この場合は「0」)に対し「+4」だけずれる。   Further, during the reverse rotation of the brushless motor, for example, when noise is generated as indicated by a broken line L3 in FIG. 8B, the position counter P is moved to a brushless state as indicated by a broken line L4 in FIG. 8D. As described above, the value (solid line) corresponding to the actual rotation angle of the motor 47 is increased by “4” as indicated by a two-dot chain line. In this case, when the edge of the pulse signal from the electrical angle sensors S1 to S3 in which the electrical angle counter E changes from “3” to “2”, the difference (Pi−Pi−1) is a normal value J (in this case). “0”) is shifted by “+4”.

この場合も、電気角カウンタEが「3」から「2」に変化する電気角センサS1〜S3からのパルス信号のエッジ発生時、上記差(Pi −Pi-1 )が正常値J(=0)でないことに基づき、位置カウンタPの異常発生が検出される。更に、正常値Jと上記差(Pi −Pi-1 )との差「J−(Pi −Pi-1 )」がずれ量ΔPとして算出され(この場合、ずれ量ΔP=「−4」)、このずれ量ΔP分の補正が位置カウンタP(破線L4)に加えられる。その結果、図8(d)に下向きの黒矢印で示されるように、位置カウンタPがブラシレスモータ47の実際の回転角に対応する値(実線)へと変化する。これにより、位置カウンタPにおいて、モータの実際の回転角に対応する値(実線)からのずれが修正される。   Also in this case, when the edge of the pulse signal from the electrical angle sensors S1 to S3 in which the electrical angle counter E changes from “3” to “2”, the difference (Pi−Pi−1) is the normal value J (= 0). ) Is not detected, the occurrence of an abnormality in the position counter P is detected. Further, the difference “J− (Pi−Pi−1)” between the normal value J and the difference (Pi−Pi−1) is calculated as the shift amount ΔP (in this case, the shift amount ΔP = “− 4”). Correction for this deviation amount ΔP is applied to the position counter P (broken line L4). As a result, the position counter P changes to a value (solid line) corresponding to the actual rotation angle of the brushless motor 47, as indicated by the downward black arrow in FIG. Thereby, in the position counter P, the deviation from the value (solid line) corresponding to the actual rotation angle of the motor is corrected.

ところで、各電気角センサS1〜S3から出力されるパルス信号のエッジは、ブラシレスモータ47が15°回転するごとに発生するため、ブラシレスモータ47の回転速度が高くなるほど、時間当たりのエッジ発生回数は多くなる。従って、同エッジ発生毎にずれ量ΔPの補正処理を実行すると、同補正処理について時間当たりの実行回数が過度に多くなり、電子制御装置50の演算部において演算負荷が高くなってしまうおそれがある。そこで、本実施形態では、ずれ量ΔPを算出して位置カウンタPを補正する処理について、ずれ量を算出する処理を第1の演算部で行い、ずれ量を補正する処理を第2の演算部でそれぞれ実行するようにしている。   By the way, the edge of the pulse signal output from each of the electric angle sensors S1 to S3 is generated every time the brushless motor 47 rotates by 15 °. Therefore, as the rotational speed of the brushless motor 47 increases, the number of edge generations per hour increases. Become more. Therefore, if the correction process of the deviation amount ΔP is executed every time the edge is generated, the number of executions per time for the correction process is excessively increased, and the calculation load of the calculation unit of the electronic control device 50 may increase. . Therefore, in the present embodiment, with respect to the process of calculating the shift amount ΔP and correcting the position counter P, the process of calculating the shift amount is performed by the first calculation unit, and the process of correcting the shift amount is performed by the second calculation unit. To run each.

より詳細には、第1の演算部では、各電気角センサS1〜S3から出力されるパルス信号のエッジ発生毎、換言すれば上記電気角カウンタEが変化する毎にずれ量ΔPを算出するとともに、そのずれ量ΔPが算出される毎に当該ずれ量ΔPを積算した積算値ΔPaを算出する処理を行う。   More specifically, the first calculation unit calculates the deviation amount ΔP every time the edge of the pulse signal output from each of the electrical angle sensors S1 to S3 occurs, in other words, every time the electrical angle counter E changes. Each time the deviation amount ΔP is calculated, a process of calculating an integrated value ΔPa obtained by integrating the deviation amount ΔP is performed.

図11及び図12に、第1の演算部にて行われる処理であって、上述した位置カウンタPの異常検出、ずれ量ΔPの算出、及び積算値ΔPaの算出を行うための処理(以下、ずれ量算出処理という)について、その手順を示す。   FIG. 11 and FIG. 12 show the processes performed by the first calculation unit for detecting the abnormality of the position counter P, calculating the deviation amount ΔP, and calculating the integrated value ΔPa (hereinafter referred to as the following). The procedure for the deviation amount calculation process) will be described.

このずれ量算出処理は、位置センサS4,S5からのパルス信号のエッジ間隔に対応する時間間隔よりも短い間隔にて周期的に実行される。
本処理では、まず、電気角センサS1〜S3からのパルス信号のエッジが発生したか否かが判定される(S201)。そして、パルス信号のエッジが発生していない場合には(S201:NO)、本処理は一旦終了される。
This deviation amount calculation process is periodically executed at intervals shorter than the time intervals corresponding to the edge intervals of the pulse signals from the position sensors S4 and S5.
In this process, first, it is determined whether or not an edge of the pulse signal from the electrical angle sensors S1 to S3 has occurred (S201). And when the edge of a pulse signal has not occurred (S201: NO), this processing is once ended.

一方、パルス信号のエッジが発生した場合には(S201:YES)、そのエッジ発生時における位置カウンタPの値が電子制御装置50内のメモリに記憶される(S202)。そして、今回のエッジ発生時のカウンタ値Pi と前回のエッジ発生時のカウンタ値Pi-1 との差(Pi −Pi-1 )が算出される(S203)。   On the other hand, when the edge of the pulse signal is generated (S201: YES), the value of the position counter P at the time of the edge generation is stored in the memory in the electronic control unit 50 (S202). Then, the difference (Pi-Pi-1) between the counter value Pi when the current edge is generated and the counter value Pi-1 when the previous edge is generated is calculated (S203).

続いて、ブラシレスモータ47の回転状態に応じて、上記差(Pi −Pi-1 )の正常値Jが可変設定される。具体的には、正常値Jは、モータ正回転中(図12のS204:YES)であれば「4」に設定され(S206)、モータ逆回転中(S205:YES)であれば「−4」に設定され(S207)、モータ正逆回転反転中(S205:NO)であれば「0」に設定される(S208)。   Subsequently, the normal value J of the difference (Pi−Pi−1) is variably set according to the rotation state of the brushless motor 47. Specifically, the normal value J is set to “4” if the motor is rotating forward (S204: YES in FIG. 12) (S206), and if the motor is rotating backward (S205: YES), “−4” is set. Is set (S207), and if the motor is rotating in the reverse direction (S205: NO), it is set to "0" (S208).

そして、上記差(Pi −Pi-1 )が正常値Jと等しいか否かに基づき、位置カウンタPに異常が発生しているか否かが判断される(S209)。そして、差(Pi −Pi-1 )が正常値Jに一致しない場合(S209:YES)、位置カウンタPにおける異常発生が検出される(S210)。   Then, based on whether the difference (Pi-Pi-1) is equal to the normal value J, it is determined whether or not an abnormality has occurred in the position counter P (S209). If the difference (Pi-Pi-1) does not match the normal value J (S209: YES), the occurrence of an abnormality in the position counter P is detected (S210).

このように位置カウンタPに異常ありとの判定がなされると、正常値Jと上記差(Pi −Pi-1 )との差「J−(Pi −Pi-1 )」がずれ量ΔPとして算出される(S211)。   When it is determined that the position counter P is abnormal as described above, the difference “J− (Pi−Pi−1)” between the normal value J and the difference (Pi−Pi−1) is calculated as the deviation amount ΔP. (S211).

また、先のステップS209にて、差(Pi −Pi-1 )が正常値Jと一致する場合には(S209:NO)、位置カウンタPは正常であると判定される(S212)。このときには、ずれ量ΔPが「0」に設定される(S213)。   If the difference (Pi-Pi-1) coincides with the normal value J in the previous step S209 (S209: NO), it is determined that the position counter P is normal (S212). At this time, the deviation amount ΔP is set to “0” (S213).

上記態様にてずれ量ΔPが算出されると、次にずれ量ΔPの積算値ΔPaが更新される(S214)。ここでは、前回の実行周期にて算出された積算値ΔPaに対して、今回の実行周期にて算出されたずれ量ΔPが加算されることにより、積算値ΔPaは更新される。そして、本処理は一旦終了される。   Once the deviation amount ΔP is calculated in the above manner, the integrated value ΔPa of the deviation amount ΔP is then updated (S214). Here, the integrated value ΔPa is updated by adding the deviation amount ΔP calculated in the current execution cycle to the integrated value ΔPa calculated in the previous execution cycle. And this process is once complete | finished.

一方、第2の演算部では、上記エッジの発生周期よりも長い時間に設定された実行時間毎(例えば2ms毎)に実施される処理であって、今回の実行タイミングにおける上記ずれ量ΔPの積算値ΔPaと前回の実行タイミングにおける上記ずれ量ΔPの積算値ΔPaとの差を算出する。この今回の実行タイミングにおける積算値ΔPaは、今回の実行タイミングにおけるずれ量ΔPの現状値を表しており、前回の実行タイミングにおける積算値ΔPaは、前回の実行タイミングにおけるずれ量ΔPの現状値を表している。そのため、そうして算出される積算値ΔPaの差、いわば補正処理の実行周期内における積算値ΔPaの変化量Hは、前回補正処理が実行されてから今回補正処理が実行されるまでの間に生じたずれ量ΔPに一致する。   On the other hand, the second calculation unit is a process executed every execution time (for example, every 2 ms) set to a time longer than the generation cycle of the edge, and integrates the deviation amount ΔP at the current execution timing. The difference between the value ΔPa and the integrated value ΔPa of the deviation amount ΔP at the previous execution timing is calculated. The integrated value ΔPa at the current execution timing represents the current value of the deviation amount ΔP at the current execution timing, and the integrated value ΔPa at the previous execution timing represents the current value of the deviation amount ΔP at the previous execution timing. ing. Therefore, the difference between the integrated values ΔPa calculated in this way, that is, the change amount H of the integrated value ΔPa within the execution period of the correction process is between the previous correction process and the current correction process. It coincides with the generated deviation amount ΔP.

例えば、図13に示すように、モータの正回転中、電気角カウンタEが「2」となっている状態で位置センサS4からの信号に1つめのノイズが重畳し、そのノイズが位置センサS5からのパルス信号の立ち下がりエッジに重なると、そのノイズが発生しているタイミングA,B,Cのそれぞれにおいて、位置カウンタPには「−1」が加算される。その結果、タイミングA,B,Cでは、位置カウンタPが破線で示されるように「1」ずつ減少していき、電気角カウンタEが「2」から「3」に変化するときには、算出されるずれ量ΔPは「4」となる。   For example, as shown in FIG. 13, during the forward rotation of the motor, the first noise is superimposed on the signal from the position sensor S4 while the electrical angle counter E is “2”, and the noise is detected by the position sensor S5. Is overlapped with the falling edge of the pulse signal from “1”, “−1” is added to the position counter P at each of the timings A, B, and C where the noise is generated. As a result, at timings A, B, and C, the position counter P is decremented by “1” as indicated by the broken line, and is calculated when the electrical angle counter E changes from “2” to “3”. The deviation amount ΔP is “4”.

そして、電気角カウンタEが「2」から「3」に変化した後の位置カウンタPは、ずれ量である「4」を維持したまま、ブラシレスモータ47の回転に同期してその値は増加していく。その後、電気角カウンタEが「3」となっている状態で位置センサS4からの信号に2つめのノイズが重畳し、そのノイズが位置センサS5からのパルス信号の立ち下がりエッジと重なると、そのノイズが発生しているタイミングE,F,Gのそれぞれにおいて、位置カウンタPには「−1」が加算される。その結果、タイミングE,F,Gでは、位置カウンタPが破線で示されるように「1」ずつ減少していき、電気角カウンタEが「3」から「4」に変化するときには、算出されるずれ量ΔPは「4」となる。そして、電気角カウンタEが「2」から「3」に変化したときに算出されたずれ量「4」に対して、電気角カウンタEが「3」から「4」に変化したときに算出されたずれ量「4」が加算され、そのように電気角カウンタEが「3」から「4」に変化したときには、積算値ΔPaは「8」になる。   Then, the position counter P after the electrical angle counter E changes from “2” to “3” increases its value in synchronization with the rotation of the brushless motor 47 while maintaining “4” which is the deviation amount. To go. Thereafter, when the electrical angle counter E is “3”, a second noise is superimposed on the signal from the position sensor S4, and when the noise overlaps the falling edge of the pulse signal from the position sensor S5, At each of the timings E, F, and G when noise is generated, “−1” is added to the position counter P. As a result, at timings E, F, and G, the position counter P is decremented by “1” as indicated by the broken line, and is calculated when the electrical angle counter E changes from “3” to “4”. The deviation amount ΔP is “4”. The deviation amount “4” calculated when the electrical angle counter E changes from “2” to “3” is calculated when the electrical angle counter E changes from “3” to “4”. When the deviation amount “4” is added and the electrical angle counter E changes from “3” to “4”, the integrated value ΔPa becomes “8”.

他方、電気角カウンタEが「2」となっている状態で、上記1つめのノイズが重畳する前の時刻t1において上記補正処理が実行された場合にあって、電気角カウンタEが「4」に変化した後の時刻t2において上記補正処理が実行されると、今回の実行タイミングにおける積算値ΔPaと前回の実行タイミングにおける積算値ΔPaとの差が算出される。このときには、時刻t1における積算値ΔPaは「0」、時刻t2における積算値ΔPaは「8」であるため、上記変化量Hは「8」となり、この変化量Hは、前回補正処理が実行されてから今回補正処理が実行されるまでの間に生じたずれ量ΔP(=8)に一致する。   On the other hand, in the state where the electrical angle counter E is “2”, the electrical angle counter E is “4” when the correction processing is executed at time t1 before the first noise is superimposed. When the correction process is executed at time t2 after the change to, the difference between the integrated value ΔPa at the current execution timing and the integrated value ΔPa at the previous execution timing is calculated. At this time, since the integrated value ΔPa at time t1 is “0” and the integrated value ΔPa at time t2 is “8”, the change amount H is “8”, and this change amount H is subjected to the previous correction process. And the amount of deviation ΔP (= 8) generated during the current correction process.

そこで、第2の演算部では、さらに、この変化量Hに基づいて補正値PHを設定し、同補正値PHに基づいて位置カウンタPの補正を行うようにしている。図13に示した場合であれば、時刻t2で実行される補正処理にて、変化量H(=「8」)を補正値PHとして設定し、計数されている位置カウンタPにその補正値PHを加算する。   Therefore, the second calculation unit further sets the correction value PH based on the change amount H, and corrects the position counter P based on the correction value PH. In the case shown in FIG. 13, the amount of change H (= “8”) is set as the correction value PH in the correction process executed at time t2, and the correction value PH is added to the counted position counter P. Is added.

こうした補正処理を実行することにより、予め設定された時間毎に補正処理を実行しても、位置カウンタPは適切に補正される。また、ずれ量ΔPを算出する処理と、ずれ量Δを補正する処理とが別々の演算部にて処理されるため、ずれ量ΔPの算出処理を行う第1の演算部において演算負荷が高くなった場合でも、ずれ量ΔPの補正処理を行う第2の演算部においては、その演算負荷に余裕を持たせておくことができる。   By executing such a correction process, the position counter P is appropriately corrected even if the correction process is executed every preset time. In addition, since the processing for calculating the deviation amount ΔP and the processing for correcting the deviation amount Δ are processed by separate arithmetic units, the calculation load increases in the first arithmetic unit that performs the processing for calculating the deviation amount ΔP. Even in this case, the second calculation unit that performs the correction process of the deviation amount ΔP can leave a margin for the calculation load.

ところで、上記ずれ量ΔPの積算値ΔPaは、電子制御装置50の演算部にて演算処理されるのであるが、同制御装置50では数値が二進法で処理される。そして、数値を処理するビット数によって処理可能な数値の範囲は制限され、例えば本実施形態では、積算値ΔPaを8ビットで処理するようにしているため、「256(=2^8)」通りの値を処理することができる。なお、上記態様にて計数される位置カウンタPは、同位置カウンタPの正しい値、すなわちブラシレスモータ47の実際の回転角に対応した値よりも小さくなる場合と大きくなる場合とがあり、小さくなる場合には積算値ΔPaが負の値に、大きくなる場合には積算値ΔPaが正の値になる。そのため、本実施形態では、ずれ量ΔPの上記積算値ΔPaを8ビットで処理するようにしているが、積算可能な数値の範囲としては、同範囲の上限値Rmaxを「(+)127」、下限値Rminを「−128」に設定している。   By the way, the integrated value ΔPa of the deviation amount ΔP is calculated by the calculation unit of the electronic control device 50. In the control device 50, the numerical value is processed in binary. The range of numerical values that can be processed is limited by the number of bits for processing numerical values. For example, in the present embodiment, the integrated value ΔPa is processed by 8 bits, so “256 (= 2 ^ 8)” Can be processed. Note that the position counter P counted in the above-described manner may be smaller or larger than the correct value of the position counter P, that is, a value corresponding to the actual rotation angle of the brushless motor 47, and becomes smaller. In this case, the integrated value ΔPa becomes a negative value, and when it becomes larger, the integrated value ΔPa becomes a positive value. Therefore, in the present embodiment, the integrated value ΔPa of the deviation amount ΔP is processed by 8 bits. However, as the range of numerical values that can be integrated, the upper limit value Rmax of the same range is set to “(+) 127”, The lower limit value Rmin is set to “−128”.

ここで、上述したようなずれ量ΔPが発生するたびに上記積算値ΔPaの絶対値は大きくなるため、ずれ量の発生回数が多くなると、積算されたずれ量が処理可能な数値の上限値や下限値(例えば「127」や「−128」)に達してしまい、その後の積算を行うことができなくなるおそれがある。そこで、こうした状態、いわゆるオーバーフロー状態を解消するべく、積算値ΔPaが上限値Rmaxを超えるときにはその超過分を下限値Rminに加算して新たに積算を開始する一方、積算値ΔPaが下限値Rminを超えるときにはその超過分を上限値Rmaxに加算して新たに積算を開始するといったオーバーフロー処理が行われる。   Here, since the absolute value of the integrated value ΔPa increases each time the deviation amount ΔP as described above occurs, if the number of occurrences of the deviation amount increases, an upper limit value of a numerical value that can be processed by the accumulated deviation amount or A lower limit value (for example, “127” or “−128”) may be reached, and subsequent integration may not be performed. Therefore, in order to eliminate such a state, the so-called overflow state, when the integrated value ΔPa exceeds the upper limit value Rmax, the excess is added to the lower limit value Rmin to start a new integration, while the integrated value ΔPa has a lower limit value Rmin. When exceeding, an overflow process is performed in which the excess is added to the upper limit value Rmax and integration is newly started.

このオーバーフロー処理についてその一例を、図14を参照して説明する。
例えば、図14の(A)に示すように、前回のずれ量算出処理で算出された積算値ΔPaが「125」であって、今回の実行タイミングにて、ずれ量ΔPの増加分として「5」を加算する場合には、積算後の積算値ΔPaが「130」となるため、上限値Rmaxの「127」に対して「3」が超過分となる。この場合には、オーバーフロー処理として、下限値Rminである「−128」に「3」を加算した「―125」が新たな積算値ΔPaとして設定される。
An example of this overflow processing will be described with reference to FIG.
For example, as shown in FIG. 14A, the integrated value ΔPa calculated by the previous deviation amount calculation process is “125”, and “5” is set as the increment of the deviation amount ΔP at the current execution timing. ”Is added, since the integrated value ΔPa after the integration is“ 130 ”,“ 3 ”exceeds the upper limit value Rmax“ 127 ”. In this case, as overflow processing, “−125” obtained by adding “3” to “−128” which is the lower limit value Rmin is set as a new integrated value ΔPa.

一方、図14の(B)に示すように、前回のずれ量算出処理で算出された積算値ΔPaが「−125」であって、今回の実行タイミングにて、ずれ量ΔPの増加分として「−5」を加算する場合には、積算後の積算値ΔPaが「−130」となるため、下限値Rminの「−128」に対して「−2」が超過分となる。この場合には、オーバーフロー処理として、上限値Rmaxである「127」に「−2」を加算した「125」が新たなずれ量として算出される。   On the other hand, as shown in FIG. 14B, the integrated value ΔPa calculated in the previous deviation amount calculation process is “−125”, and the increase amount of the deviation amount ΔP is “ In the case of adding “−5”, since the integrated value ΔPa after the integration is “−130”, “−2” exceeds the lower limit value Rmin “−128”. In this case, as an overflow process, “125” obtained by adding “−2” to “127” which is the upper limit value Rmax is calculated as a new deviation amount.

他方、上記ずれ量ΔPは、各位置センサS4,S5からの信号等に基づいて算出されるため、それら位置センサに異常が生じた場合には、その信号の信頼性が低下し、その結果、上記態様にて積算される積算値ΔPaの変化量Hは過度に大きくなることがある。そこで、上記変化量Hが、予め設定された閾値を超えた大きな値になっている場合、センサ異常が生じていると判定する。そして、センサ異常が生じていると判定された場合には、上記ずれ量算出処理や位置カウンタPに対する補正処理などを中止するようにすれば、位置カウンタPに対する補正精度の低下を抑えることができる。   On the other hand, since the deviation amount ΔP is calculated based on signals from the position sensors S4 and S5 and the like, when an abnormality occurs in the position sensors, the reliability of the signal decreases, and as a result, The amount of change H of the integrated value ΔPa integrated in the above manner may become excessively large. Therefore, when the change amount H is a large value exceeding a preset threshold value, it is determined that a sensor abnormality has occurred. If it is determined that a sensor abnormality has occurred, a decrease in correction accuracy for the position counter P can be suppressed by stopping the deviation amount calculation process and the correction process for the position counter P. .

ここで、上記変化量Hは、各位置センサS4,S5に異常が生じている場合のみならず、上記オーバーフロー処理が実行されたときにも大きくなる。すなわち、上記オーバーフロー処理が実行されると、上限値Rmaxに対する超過分を下限値Rminに加算した値が新たな積算値ΔPaとして設定されたり、下限値Rminに対する超過分を上限値Rmaxに加算した値が新たな積算値ΔPaとして設定される。従って、オーバーフロー処理の実行時期を挟んで変化量Hが算出されたときには、換言すればオーバーフロー処理の実行前における積算値ΔPaに対して、同処理の実行後における積算値ΔPaの変化量Hが算出されたときには、その変化量Hが非常に大きくなる。   Here, the change amount H becomes large not only when the position sensors S4 and S5 are abnormal, but also when the overflow process is executed. That is, when the overflow process is executed, a value obtained by adding an excess amount with respect to the upper limit value Rmax to the lower limit value Rmin is set as a new integrated value ΔPa, or a value obtained by adding an excess amount with respect to the lower limit value Rmin to the upper limit value Rmax. Is set as a new integrated value ΔPa. Therefore, when the change amount H is calculated across the execution timing of the overflow processing, in other words, the change amount H of the integration value ΔPa after execution of the processing is calculated with respect to the integration value ΔPa before execution of the overflow processing. When this is done, the amount of change H becomes very large.

そのため、変化量Hに基づいて位置センサの異常判定を行う場合にあって、オーバーフロー処理の実行が原因で変化量Hが大きくなっているときには、位置センサが正常であっても異常であると誤判定されてしまうおそれがあり、その判定精度が低下してしまう。   Therefore, when the abnormality determination of the position sensor is performed based on the change amount H, and the change amount H is large due to the execution of the overflow process, it is erroneously determined that the position sensor is normal even if it is normal. There is a risk of being judged, and the judgment accuracy is lowered.

また、変化量Hに基づいて補正値PHを設定し、その補正値分の補正を上記計数される位置カウンタPに対して行う場合にあって、上記オーバーフロー処理が実行される前、あるいは実行された後に算出された変化量Hであれば、その変化量Hは、前回補正処理が実行されてから今回補正処理が実行されるまでの間に生じたずれ量ΔPと一致する。そのため、その変化量Hに基づいて設定される補正値PHにて位置カウンタPの補正を行うことにより、同位置カウンタPのずれを適切に補正することができる。   Further, when the correction value PH is set based on the change amount H and the correction for the correction value is performed on the counted position counter P, the overflow processing is performed before or after the overflow process is performed. If the amount of change H is calculated after that, the amount of change H coincides with the amount of deviation ΔP generated between the time when the previous correction process is executed and the time when the current correction process is executed. Therefore, by correcting the position counter P with the correction value PH set based on the change amount H, the shift of the position counter P can be corrected appropriately.

一方、上記オーバーフロー処理が実行されたときには、上限値Rmaxに対する超過分を下限値Rminに加算した値が新たな積算値ΔPaとして設定されたり、下限値Rminに対する超過分を上限値Rmaxに加算した値が新たな積算値ΔPaとして設定される。従って、オーバーフロー処理の実行時期を挟んで変化量Hが算出されたときには、その算出された変化量Hが実際のずれ量ΔPの変化量に対して大きくなり、前回補正処理が実行されてから今回補正処理が実行されるまでの間に生じたずれ量ΔPと一致しなくなる。   On the other hand, when the overflow process is executed, a value obtained by adding an excess amount with respect to the upper limit value Rmax to the lower limit value Rmin is set as a new integrated value ΔPa, or a value obtained by adding an excess amount with respect to the lower limit value Rmin to the upper limit value Rmax. Is set as a new integrated value ΔPa. Therefore, when the change amount H is calculated across the execution timing of the overflow process, the calculated change amount H becomes larger than the actual change amount ΔP, and this time after the previous correction process is executed. The deviation amount ΔP generated before the correction process is executed does not match.

ここで、上記態様にて計数される位置カウンタPは、ブラシレスモータ47の回転角度に応じて変化するため、同位置カウンタPがブラシレスモータ47の能力を超えて変化することはない。従って、各位置センサS4,S5に異常が生じ、位置カウンタPが全く変化しない場合であっても、変化量Hはブラシレスモータ47の能力を超えた量になることはない。そのため、変化量Hがブラシレスモータ47の能力を超えた大きな量になっているときには、そうした変化量Hの大きな変化が、各位置センサS4,S5の異常によって起きたのではなく、積算値ΔPaに対して上記オーバーフロー処理が実行されたために起きたと判断することができる。   Here, since the position counter P counted in the above manner changes according to the rotation angle of the brushless motor 47, the position counter P does not change beyond the capability of the brushless motor 47. Accordingly, even when an abnormality occurs in each of the position sensors S4 and S5 and the position counter P does not change at all, the change amount H does not exceed the capability of the brushless motor 47. Therefore, when the change amount H is a large amount that exceeds the capability of the brushless motor 47, such a large change in the change amount H is not caused by the abnormality of each of the position sensors S4 and S5, but in the integrated value ΔPa. On the other hand, it can be determined that the overflow process has been executed.

そこで、本実施形態では、変化量Hがブラシレスモータ47の能力を超えた量である場合には、変化量Hの算出元となる積算値ΔPaに対してオーバーフロー処理がなされたと判定し、同変化量Hからオーバーフロー処理の実行による変化分を除去する修正処理を実行するようにしている。そして、その修正された変化量Hに基づいて位置センサの異常判定を行うとともに、同修正された変化量Hに基づいて補正値PHを設定するようにしている。   Therefore, in the present embodiment, when the amount of change H exceeds the capability of the brushless motor 47, it is determined that an overflow process has been performed on the integrated value ΔPa from which the amount of change H is calculated. The correction process for removing the change due to the execution of the overflow process from the amount H is executed. Then, an abnormality determination of the position sensor is performed based on the corrected change amount H, and a correction value PH is set based on the corrected change amount H.

図15に、上記第2の演算部にて行われる処理であって、変化量Hの算出、上記修正処理の実施、各位置センサS4,S5の異常判定、補正値PHの設定、及び位置カウンタPのずれ補正を行う処理(以下、異常判定・補正処理という)について、その手順を示す。この異常判定・補正処理は、予め設定された時間周期毎(本実施形態では、一例として2ms毎)に繰り返し実行される。   FIG. 15 shows the processing performed by the second calculation unit, including calculation of the amount of change H, execution of the correction processing, determination of abnormality of the position sensors S4 and S5, setting of the correction value PH, and position counter. The procedure for correcting the deviation of P (hereinafter referred to as abnormality determination / correction processing) will be described. This abnormality determination / correction process is repeatedly executed at preset time periods (in this embodiment, every 2 ms as an example).

本処理が開始されると、まず、現在の積算値ΔPaが読み込まれる(S300)。
次に、現在の積算値ΔPaと前回補正処理が実行されたときに読み込まれた積算値ΔPaとの差が算出され(S301)、これにより本処理の実行周期内における積算値ΔPaの変化量H、換言すれば本処理の実行周期内において発生したずれ量ΔPが算出される。
When this process is started, first, the current integrated value ΔPa is read (S300).
Next, the difference between the current integrated value ΔPa and the integrated value ΔPa read when the previous correction process is executed is calculated (S301), and thereby the change amount H of the integrated value ΔPa within the execution period of this process. In other words, the deviation amount ΔP generated within the execution cycle of this process is calculated.

次に、変化量Hがオーバーフロー判定値αを超えているか否かが判定される(S302)。このオーバーフロー判定値αは、変化量Hがブラシレスモータ47の能力を超えた量であるか否かを判定するための値であって、変化量Hが算出される時間周期内において、換言すれば、本処理が前回実行されてから今回実行されるまでの間においてブラシレスモータ47が最大回転速度で駆動されたときの位置カウンタPの変化量が設定されている。例えば、本実施形態において、ブラシレスモータ47の最高回転速度を10000r/minに設定した場合、位置カウンタPは2ms間で最大64カウント変化するため、この場合にはオーバーフロー判定値αとして「64」がされる。   Next, it is determined whether or not the change amount H exceeds the overflow determination value α (S302). This overflow determination value α is a value for determining whether or not the amount of change H exceeds the capability of the brushless motor 47, in other words, within the time period in which the amount of change H is calculated. The amount of change of the position counter P when the brushless motor 47 is driven at the maximum rotational speed is set between the time when this process is executed and the time when it is executed this time. For example, in this embodiment, when the maximum rotation speed of the brushless motor 47 is set to 10000 r / min, the position counter P changes by a maximum of 64 counts in 2 ms. In this case, “64” is set as the overflow determination value α. Is done.

そして、変化量Hがオーバーフロー判定値αを超えていない場合には(S302:NO)、上記オーバーフロー処理の実行による変化分が今回算出された変化量Hには含まれておらず、その値は、本処理の実行周期内において発生したずれ量ΔPと一致しているため、後述する修正処理を行うことなくステップS306以降の処理が行われる。   When the change amount H does not exceed the overflow determination value α (S302: NO), the change amount due to the execution of the overflow process is not included in the change amount H calculated this time, and the value is Since the amount of deviation ΔP generated within the execution cycle of this process is the same, the processes after step S306 are performed without performing the correction process described later.

一方、変化量Hがオーバーフロー判定値αを超えている場合には(S302:YES)、変化量Hがブラシレスモータ47の能力を超えた量となっており、同変化量Hには上記オーバーフロー処理の実行による変化分が含まれているため、そうした変化分を除去するための修正処理として、ステップS303〜ステップS305の処理が行われる。   On the other hand, when the change amount H exceeds the overflow determination value α (S302: YES), the change amount H exceeds the capability of the brushless motor 47, and the change amount H includes the above overflow process. Since the change due to the execution of is included, the processing from step S303 to step S305 is performed as a correction process for removing such a change.

まず、ステップS303では、積算値ΔPaが上述した上限値Rmax側でオーバーフローしたか否かが判定され、上限値Rmax側でオーバーフローした場合には(S303:YES)、算出された変化量Hが次式(1)に基づいて修正される(S304)。   First, in step S303, it is determined whether or not the integrated value ΔPa has overflowed on the above-described upper limit value Rmax side. If the integrated value ΔPa has overflowed on the upper limit value Rmax side (S303: YES), the calculated change amount H is the next. The correction is made based on the equation (1) (S304).


修正された変化量H←ステップS301にて算出された変化量H+255 …(1)

すなわち、算出された変化量Hに対して、積算値ΔPaを演算処理する際に処理可能な数値の範囲分の値(255(=127+128))を加算する処理が実行される。

Corrected change amount H ← Change amount H + 255 calculated in step S301 (1)

That is, a process of adding a value (255 (= 127 + 128)) in a range of numerical values that can be processed when calculating the integrated value ΔPa to the calculated change amount H is executed.

例えば、前回の本処理実行時における積算値ΔPaが「125」であって、今回の本処理実行時においてずれ量ΔPが「5」だけ加算されていた場合には、積算値ΔPaが「130」となり、上限値Rmax(=127)に対して「3」が超過分となる。この場合には、オーバーフロー処理として、下限値Rmin(=−128)に「3」を加算した「―125」が新たな積算値ΔPaとして設定される。こうしたオーバーフロー処理が実行されたときには、ステップS301で算出される変化量Hが、今回の本処理実行時における積算値ΔPaである「−125」から前回の本処理実行時における積算値ΔPaである「125」を減算した「−250」となる。そして、ステップS304では、この「−250」とされた変化量Hに対して「255」が加算される。その結果、修正された変化量Hは「5」となり、上述したずれ量ΔP(=5)と一致するようになる。このように積算値ΔPaが上限値Rmax側でオーバーフローした場合には、上記式(1)に基づいて変化量Hが修正されることにより、変化量Hからオーバーフロー処理の実行による変化分が除去される。   For example, if the integrated value ΔPa at the time of the previous main process execution is “125” and the deviation amount ΔP is added by “5” at the time of the current main process execution, the integrated value ΔPa is “130”. Thus, “3” is an excess of the upper limit value Rmax (= 127). In this case, as the overflow process, “−125” obtained by adding “3” to the lower limit value Rmin (= −128) is set as the new integrated value ΔPa. When such overflow processing is executed, the amount of change H calculated in step S301 is “-125”, which is the integrated value ΔPa at the time of the current main processing execution, to the integrated value ΔPa at the time of the previous main processing execution. “−250” is obtained by subtracting “125”. In step S304, “255” is added to the change amount H set to “−250”. As a result, the corrected change amount H becomes “5”, which coincides with the shift amount ΔP (= 5) described above. In this way, when the integrated value ΔPa overflows on the upper limit value Rmax side, the change amount H is corrected based on the above equation (1), whereby the change amount due to the execution of the overflow process is removed from the change amount H. The

一方、ステップS303にて、積算値ΔPaが上限値Rmax側でオーバーフローしていない旨判定された場合(S303:NO)、すなわち積算値ΔPaが下限値Rmin側でオーバーフローした場合には、算出された変化量Hが次式(2)に基づいて修正される(S305)。   On the other hand, if it is determined in step S303 that the integrated value ΔPa does not overflow on the upper limit value Rmax side (S303: NO), that is, if the integrated value ΔPa overflows on the lower limit value Rmin side, it is calculated. The change amount H is corrected based on the following equation (2) (S305).


修正された変化量H←ステップS301にて算出された変化量H−255 …(2)

すなわち、算出された変化量Hに対して、積算値ΔPaを演算処理する際に処理可能な数値の範囲分の値(=255)を減算する処理が実行される。

Corrected change amount H ← Change amount H-255 calculated in step S301 (2)

That is, a process of subtracting a value (= 255) for a range of numerical values that can be processed when calculating the integrated value ΔPa from the calculated change amount H is executed.

例えば、前回の本処理実行時における積算値ΔPaが「−125」であって、今回の本処理実行時においてずれ量ΔPが「−5」だけ加算されていた場合には、積算値ΔPaが「−130」となり、下限値Rmin(=−128)に対して「−2」が超過分となる。この場合には、オーバーフロー処理として、上限値Rmax(=127)に「−2」を加算した「125」が新たな積算値ΔPaとして設定される。こうしたオーバーフロー処理が実行されたときには、ステップS301で算出される変化量Hが、今回の本処理実行時における積算値ΔPaである「125」から前回の本処理実行時における積算値ΔPaである「−125」を減算した「250」となる。そして、ステップS305では、この「250」とされた変化量Hに対して「255」が減算される。その結果、修正された変化量Hは「−5」となり、上述したずれ量ΔP(=−5)と一致するようになる。このように積算値ΔPaが下限値Rmin側でオーバーフローした場合には、上記式(2)に基づいて変化量Hが修正されることにより、変化量Hからオーバーフロー処理の実行による変化分が除去される。   For example, if the integrated value ΔPa at the time of the previous main processing execution is “−125” and the deviation amount ΔP is added by “−5” at the time of the current main processing execution, the integrated value ΔPa is “ −130 ”, and“ −2 ”exceeds the lower limit Rmin (= −128). In this case, as the overflow process, “125” obtained by adding “−2” to the upper limit value Rmax (= 127) is set as the new integrated value ΔPa. When such an overflow process is executed, the amount of change H calculated in step S301 is “−”, which is the accumulated value ΔPa at the time of the last main process execution from “125” that is the accumulated value ΔPa at the time of the current main process execution. “250” is obtained by subtracting “125”. In step S305, “255” is subtracted from the change amount H set to “250”. As a result, the corrected change amount H becomes “−5”, which coincides with the shift amount ΔP (= −5) described above. In this way, when the integrated value ΔPa overflows on the lower limit value Rmin side, the change amount H is corrected based on the above equation (2), whereby the change amount due to the execution of the overflow process is removed from the change amount H. The

次に、各位置センサS4、S5に異常が生じているか否かの判定が行われる(S306)。ここでは、変化量Hが異常判定値β以上となっているか否かが判定され、上記ステップS302にて肯定判定されているときには、上記修正処理が行われた変化量Hを用いて異常判定が行われる。一方、同ステップS302にて否定判定されているときには、修正処理がなされていない変化量H、すなわち上記ステップS301にて算出された変化量Hを用いて異常判定が行われる。また、上記異常判定値βとしては、変化量Hの値が大きく、これにより位置センサS4や位置センサS5に異常が生じていると判定できる程度の値が予め設定されている。   Next, it is determined whether or not an abnormality has occurred in each of the position sensors S4 and S5 (S306). Here, it is determined whether or not the change amount H is equal to or greater than the abnormality determination value β, and when an affirmative determination is made in step S302, an abnormality determination is made using the change amount H for which the correction processing has been performed. Done. On the other hand, when a negative determination is made in step S302, abnormality determination is performed using the change amount H that has not been corrected, that is, the change amount H calculated in step S301. Further, the abnormality determination value β is set in advance to such a value that it can be determined that the position sensor S4 and the position sensor S5 are abnormal due to the large amount of change H.

そして、変化量Hが異常判定値β以上となっている場合に(S306:YES)、各位置センサS4、S5の少なくとも一方に異常が生じていると判定される(S308)。そして、このように位置センサS4や位置センサS5に異常が生じている場合には、ずれ量ΔPが変化量Hに正確に反映されていない可能性があるため、変化量Hに基づく位置カウンタPの補正を行うことなく、本処理は一旦終了される。   When the change amount H is equal to or greater than the abnormality determination value β (S306: YES), it is determined that an abnormality has occurred in at least one of the position sensors S4 and S5 (S308). When the position sensor S4 or the position sensor S5 is abnormal as described above, the shift amount ΔP may not be accurately reflected in the change amount H. Therefore, the position counter P based on the change amount H is used. This process is temporarily terminated without performing the correction.

一方、変化量Hが異常判定値βに満たない場合には(S306:NO)、各位置センサS4、S5がともに正常であると判定され、位置カウンタPのずれを補正するための補正値PHが設定される(S307)。ここでは、上記変化量Hが補正値PHとして設定される。なお、上記ステップS302にて肯定判定されているときには、上記修正処理が行われた変化量Hが補正値PHとして設定され、同ステップS302にて否定判定されているときには、修正処理がなされていない変化量H、すなわち上記ステップS301にて算出された変化量Hが補正値PHとして設定される。   On the other hand, when the change amount H is less than the abnormality determination value β (S306: NO), it is determined that each of the position sensors S4 and S5 is normal, and a correction value PH for correcting the shift of the position counter P. Is set (S307). Here, the change amount H is set as the correction value PH. When an affirmative determination is made in step S302, the amount of change H for which the correction process has been performed is set as a correction value PH. When a negative determination is made in step S302, no correction process is performed. The change amount H, that is, the change amount H calculated in step S301 is set as the correction value PH.

こうして補正値PHが設定されると、その補正値PHを用いて位置カウンタPが補正される(S309)。ここでは、現在の位置カウンタPに上記補正値PHが加算されることにより、当該位置カウンタPの補正が行われ、これにより位置カウンタPの値は、ブラシレスモータ47の実際の回転角に対応したカウンタ値に修正される。そして、本処理は一旦される。   When the correction value PH is set in this way, the position counter P is corrected using the correction value PH (S309). Here, the correction of the position counter P is performed by adding the correction value PH to the current position counter P, whereby the value of the position counter P corresponds to the actual rotation angle of the brushless motor 47. It is corrected to the counter value. And this process is once performed.

以上説明した本実施形態によれば、以下の作用効果を得ることができる。
(1)ずれ量ΔPを積算した積算値ΔPaの変化量Hに基づき、各位置センサS4,S5の異常判定を行うようにしている。ここで、同変化量Hがブラシレスモータ47の能力を超えた量である場合には、オーバーフロー処理の実行による変化分を当該変化量Hから除去する修正処理を実行し、その修正された変化量Hに基づいて各位置センサの異常判定を行うようにしている。従って、オーバーフロー処理の実行が原因で変化量Hが大きくなった場合でも、そのオーバーフロー処理の実行が変化量Hに与えた影響は上記修正処理にて除去され、実際のずれ量ΔPに対応した変化量Hが算出される。そしてこの実際のずれ量ΔPに対応した変化量Hに基づいて各位置センサS4,S5の異常判定が行われるため、オーバーフロー処理の実行によって変化量Hが大きくなったときに生じやすい不具合、すなわち各位置センサS4,S5が正常であっても異常であると誤判定されてしまうといった不具合の発生が抑えられる。従って、上記変化量Hに基づいて各位置センサS4,S5の異常判定を行う場合において、その判定精度を高めることができるようになる。
According to this embodiment described above, the following effects can be obtained.
(1) The abnormality determination of each of the position sensors S4 and S5 is performed based on the change amount H of the integrated value ΔPa obtained by integrating the deviation amount ΔP. Here, when the change amount H is an amount that exceeds the capability of the brushless motor 47, a correction process for removing a change due to the execution of the overflow process from the change amount H is executed, and the corrected change amount Based on H, the abnormality of each position sensor is determined. Therefore, even when the amount of change H increases due to the execution of the overflow process, the influence of the execution of the overflow process on the amount of change H is removed by the correction process, and the change corresponding to the actual deviation amount ΔP. A quantity H is calculated. Then, since the abnormality determination of each of the position sensors S4 and S5 is performed based on the change amount H corresponding to the actual deviation amount ΔP, there is a problem that is likely to occur when the change amount H becomes large due to the execution of the overflow process. Even if the position sensors S4 and S5 are normal, it is possible to suppress the occurrence of a problem that the position sensors S4 and S5 are erroneously determined to be abnormal. Therefore, when the abnormality determination of each of the position sensors S4 and S5 is performed based on the change amount H, the determination accuracy can be increased.

(2)変化量Hがブラシレスモータ47の能力を超えているか否かを判定する際には、次のようにしてその判定を行うようにしている。すなわち、変化量Hを算出する時間周期内においてブラシレスモータ47が最大回転速度で駆動されるときの位置カウンタPの変化量よりも、同時間周期内での変化量Hの方が大きいときに、その算出された変化量Hがブラシレスモータ47の能力を超えた量であると判定するようにしている。従って、変化量Hがブラシレスモータ47の能力を超えているか否かを適切に判定することができるようになる。   (2) When determining whether or not the change amount H exceeds the capability of the brushless motor 47, the determination is performed as follows. That is, when the change amount H in the same time period is larger than the change amount of the position counter P when the brushless motor 47 is driven at the maximum rotation speed within the time period for calculating the change amount H, The calculated change amount H is determined to be an amount exceeding the capability of the brushless motor 47. Therefore, it is possible to appropriately determine whether or not the change amount H exceeds the capability of the brushless motor 47.

(3)位置カウンタPのずれ量ΔPに対する補正値PHを上記変化量Hに基づいて設定し、その補正値PH分の補正を位置カウンタPに対して行うようにしている。さらに、同変化量Hがブラシレスモータ47の能力を超えた量である場合には、上述した修正処理にて修正された変化量Hに基づいて補正値PHを設定するようにしている。従って、変化量Hがブラシレスモータ47の能力を超えた量である場合、すなわち、ずれ量ΔPの積算値ΔPaに対して上記オーバーフロー処理が実行されたと判断可能な場合には、上記修正処理にて修正された変化量Hに基づいて補正値PHが設定される。そのため、実際のずれ量ΔPに対応した変化量Hに基づいて補正値PHを設定することができ、オーバーフロー処理の実行時期を挟んで変化量Hが算出されたときでも、位置カウンタPに対する補正値を適切に設定することができるようになる。   (3) The correction value PH for the deviation amount ΔP of the position counter P is set based on the change amount H, and the correction for the correction value PH is performed on the position counter P. Further, when the change amount H exceeds the capability of the brushless motor 47, the correction value PH is set based on the change amount H corrected by the correction process described above. Accordingly, when the amount of change H exceeds the capability of the brushless motor 47, that is, when it can be determined that the overflow process has been executed for the integrated value ΔPa of the deviation amount ΔP, the correction process is performed. A correction value PH is set based on the corrected change amount H. Therefore, the correction value PH can be set based on the change amount H corresponding to the actual deviation amount ΔP, and the correction value for the position counter P can be obtained even when the change amount H is calculated with the execution timing of the overflow process. Can be set appropriately.

(4)上記修正処理を次のような態様にて実行するようにしている。すなわち積算値ΔPaについて処理可能な数値の範囲の上限値Rmaxを当該積算値ΔPaが超えた場合には、算出された変化量Hに対して処理可能な数値の範囲分の値(=255)を加算する処理を実行するようにしている。また、積算値ΔPaが同範囲の下限値Rminを超えた場合には、算出された変化量Hに対して上記範囲分の値(=255)を減算する処理を実行するようにしており、上記変化量Hからオーバーフロー処理の実行による変化分を適切に除去することができるようになる。   (4) The correction process is executed in the following manner. That is, when the integrated value ΔPa exceeds the upper limit value Rmax of the numerical value range that can be processed with respect to the integrated value ΔPa, a value corresponding to the numerical value range that can be processed (= 255) with respect to the calculated change amount H. The process of adding is executed. Further, when the integrated value ΔPa exceeds the lower limit value Rmin of the same range, a process of subtracting the value (= 255) for the above range from the calculated change amount H is executed. The change due to the execution of the overflow process can be appropriately removed from the change amount H.

(5)電気角センサS1〜S3からのパルス信号のエッジ発生毎に、前回のエッジ発生時の位置カウンタの値Pi-1 と今回のエッジ発生時の位置カウンタPの値Pi との差(Pi −Pi-1 )を算出するようにしている。この差(Pi −Pi-1 )には、位置カウンタPがブラシレスモータ47の実際の回転角に対応する値からずれた状態になったとき、そのずれが反映される。すなわち、そのずれの分だけ上記差(Pi −Pi-1 )が上記正常値Jからずれることになる。従って、正常値Jに対する差(Pi −Pi-1 )のずれ量「J−(Pi −Pi-1 )」を、ブラシレスモータ47の実際の回転角に対応するカウンタ値と計数される位置カウンタPとのずれ量とする上記実施形態によれば、電気角センサS1〜S3からのパルス信号のエッジ発生時に位置カウンタPのずれ量ΔPを適切に算出することができるようになる。   (5) Every time the edge of the pulse signal from the electrical angle sensors S1 to S3 is generated, the difference (Pi) between the value Pi-1 of the position counter when the previous edge is generated and the value Pi of the position counter P when the current edge is generated -Pi-1) is calculated. This difference (Pi-Pi-1) reflects the deviation when the position counter P deviates from a value corresponding to the actual rotation angle of the brushless motor 47. That is, the difference (Pi-Pi-1) deviates from the normal value J by the amount of deviation. Therefore, the position counter P that counts the deviation “J− (Pi−Pi−1)” of the difference (Pi−Pi−1) from the normal value J as the counter value corresponding to the actual rotation angle of the brushless motor 47. According to the above-described embodiment, the deviation amount ΔP of the position counter P can be appropriately calculated when the edge of the pulse signal from the electrical angle sensors S1 to S3 is generated.

(6)位置カウンタPは、ブラシレスモータ47の正回転中には位置センサS4,S5からのパルス信号のエッジ毎に「1」ずつ増加してゆき、ブラシレスモータ47の逆回転中には位置センサS4,S5からのパルス信号のエッジ毎に「1」ずつ減少してゆく。このため、位置カウンタPが正常であるとき、上記差(Pi −Pi-1 )は、モータ正回転中であれば上記エッジ数n(=4)に対応して「4」となり、モータ逆回転中であれば「−4」となり、モータ正逆回転反転中であれば「0」となる。そこで本実施形態では、差(Pi −Pi-1 )の正常値Jを、ブラシレスモータ47の回転状態に応じて「4」、「−4」、及び「0」の間で切り換えるようにしている。従って、その正常値Jに対する上記差(Pi −Pi-1 )のずれ量「J−(Pi −Pi-1 )」を、ブラシレスモータ47の回転状態に関わらず適切に算出することができるようになる。   (6) The position counter P increases by “1” for each edge of the pulse signals from the position sensors S4 and S5 during the forward rotation of the brushless motor 47, and the position sensor P during the reverse rotation of the brushless motor 47. “1” is decreased for each edge of the pulse signal from S4 and S5. For this reason, when the position counter P is normal, the difference (Pi−Pi−1) is “4” corresponding to the number of edges n (= 4) if the motor is rotating forward, and the motor rotates backward. If it is in the middle, it will be “−4”, and if it is in the reverse rotation of the motor, it will be “0”. Therefore, in this embodiment, the normal value J of the difference (Pi−Pi−1) is switched between “4”, “−4”, and “0” according to the rotation state of the brushless motor 47. . Therefore, the deviation “J− (Pi−Pi−1)” of the difference (Pi−Pi−1) with respect to the normal value J can be calculated appropriately regardless of the rotational state of the brushless motor 47. Become.

(7)エンジン1の吸気バルブ9についてそのバルブ特性を可変とする可変動弁機構14を上記ブラシレスモータ47で駆動するようにしている。また、各位置センサS4,S5からの信号を計数した位置カウンタPに基づいてブラシレスモータ47の回転角を検出し、その検出された回転角が目標バルブ特性に対応した回転角となるようにブラシレスモータ47を駆動することで、吸気バルブ9のバルブ特性を機関運転状態に応じた適切な状態に変更するようにしている。従って、各位置センサS4,S5の異常判定を行うとともにその判定精度を高めたり、位置カウンタPのずれ量ΔPを適切に補正するといったことは、機関運転状態に応じて吸気バルブ9のバルブ特性を適切な状態に変更する上で重要なこととなる。この点、本実施形態によれば、そうした異常判定の判定精度を高めたり、位置カウンタPのずれ量を適切に補正することができるようになるため、吸気バルブ9のバルブ特性を適切に変更することができるようになる。   (7) The variable valve mechanism 14 that varies the valve characteristics of the intake valve 9 of the engine 1 is driven by the brushless motor 47. Further, the rotation angle of the brushless motor 47 is detected based on the position counter P that counts signals from the position sensors S4 and S5, and the brushless is set so that the detected rotation angle becomes a rotation angle corresponding to the target valve characteristic. By driving the motor 47, the valve characteristic of the intake valve 9 is changed to an appropriate state according to the engine operating state. Therefore, performing abnormality determination of each of the position sensors S4 and S5, increasing the determination accuracy, and appropriately correcting the deviation amount ΔP of the position counter P can change the valve characteristics of the intake valve 9 according to the engine operating state. This is important for changing to an appropriate state. In this respect, according to the present embodiment, it is possible to improve the determination accuracy of such abnormality determination and to appropriately correct the deviation amount of the position counter P, so that the valve characteristics of the intake valve 9 are appropriately changed. Will be able to.

なお、上記実施形態は以下のように変更して実施することもできる。
・積算値ΔPaに対し、演算処理可能な範囲として、上限値Rmaxを「127」、下限値Rminを「−127」に設定したが、この他の値を設定するようにしてもよい。この場合であっても、上記実施形態と同様な原理に基づき、上記ずれ量算出処理、オーバーフロー処理、及び異常判定・補正処理等を実行することにより、同様な作用効果を得ることができる。
In addition, the said embodiment can also be changed and implemented as follows.
Although the upper limit value Rmax is set to “127” and the lower limit value Rmin is set to “−127” as a range in which calculation processing can be performed for the integrated value ΔPa, other values may be set. Even in this case, the same operational effects can be obtained by executing the deviation amount calculation process, the overflow process, the abnormality determination / correction process, and the like based on the same principle as in the above embodiment.

・また、積算値ΔPaを8ビットで処理するようにしたが他のビット数で処理する場合でも、上記実施形態と同様な原理に基づき、上記ずれ量算出処理、オーバーフロー処理、及び異常判定・補正処理を実行することにより、同様な作用効果を得ることができる。   In addition, although the integrated value ΔPa is processed with 8 bits, even when processing with another number of bits, based on the same principle as in the above embodiment, the deviation calculation processing, overflow processing, and abnormality determination / correction are performed. By executing the processing, similar effects can be obtained.

・電気角センサの数の変更や同センサの検出対象である多極マグネットの極数の変更を通じて、各電気角センサからのパルス信号のエッジ間隔を変更することも可能である。
・位置センサ数の変更や同センサの検出対象である多極マグネットの極数の変更を通じて各位置センサからのパルス信号のエッジ間隔を変更することも可能である。
It is also possible to change the edge interval of the pulse signal from each electrical angle sensor through changing the number of electrical angle sensors or changing the number of poles of a multipolar magnet that is the detection target of the sensor.
It is also possible to change the edge interval of the pulse signal from each position sensor through changing the number of position sensors or changing the number of poles of a multipolar magnet that is a detection target of the sensors.

・ブラシレスモータ47と一体回転する多極マグネットの磁気に応じてパルス信号を出力する位置センサS4,S5を設ける代わりに、ブラシレスモータ47の回転に伴いパルス信号を出力する他のセンサ、例えば光学式のセンサを設けるようにしてもよい。この場合、ブラシレスモータ47と一体回転するスリット付円板の厚さ方向側方にそれぞれ発光素子と受光素子を備える光学式のセンサを周方向に複数設け、ブラシレスモータ47の回転時に当該各センサからパルス信号を出力させるようにする。そして、この場合の各センサからのパルス信号の出力パターンについては、スリット付円板におけるスリットのパターン、及び、光学式のセンサの数や位置によって調整することが可能である。   Instead of providing position sensors S4 and S5 that output a pulse signal according to the magnetism of a multipolar magnet that rotates integrally with the brushless motor 47, other sensors that output a pulse signal as the brushless motor 47 rotates, such as an optical type The sensor may be provided. In this case, a plurality of optical sensors each including a light emitting element and a light receiving element are provided in the circumferential direction on the side of the thickness direction of the disc with the slit that rotates integrally with the brushless motor 47, and each of the sensors is rotated when the brushless motor 47 rotates. A pulse signal is output. In this case, the output pattern of the pulse signal from each sensor can be adjusted according to the slit pattern in the disc with slits and the number and position of the optical sensors.

・上記実施形態では、可変動弁機構14にて吸気バルブ9のバルブ特性を変更するようにしたが、排気バルブ10のバルブ特性を変更する場合、あるいは吸気バルブ9及び排気バルブ10のバルブ特性を変更する場合にも同様に適用することができる。   In the above embodiment, the valve characteristics of the intake valve 9 are changed by the variable valve mechanism 14, but when the valve characteristics of the exhaust valve 10 are changed or the valve characteristics of the intake valve 9 and the exhaust valve 10 are changed. The same applies to a change.

・上記実施形態で説明した可変動弁機構14は一例であり、他の構成で吸気バルブ9や排気バルブ10といった機関バルブのバルブ特性(例えば、開時期、閉時期、開弁期間、あるいは最大リフト量等)を可変とする可変動弁機構であっても、本発明は同様に適用することができる。   The variable valve mechanism 14 described in the above embodiment is an example, and the valve characteristics (for example, opening timing, closing timing, valve opening period, or maximum lift) of the engine valves such as the intake valve 9 and the exhaust valve 10 in other configurations are examples. The present invention can be similarly applied even to a variable valve mechanism that makes the amount or the like variable.

・可変動弁機構14を駆動するブラシレスモータ47の制御装置に本発明を適用したが、それ以外の各種機構を駆動するブラシレスモータにも本発明を適用することもできる。
・上記実施形態では、差(Pi −Pi-1 )の正常値Jに対するずれ量を、位置カウンタPのずれ量ΔPとしたが、この他の態様でずれ量ΔPを求める場合でも、本発明は同様に適用することができる。
-Although this invention was applied to the control apparatus of the brushless motor 47 which drives the variable valve mechanism 14, this invention can also be applied to the brushless motor which drives other various mechanisms.
In the above embodiment, the deviation amount of the difference (Pi−Pi−1) with respect to the normal value J is the deviation amount ΔP of the position counter P. However, the present invention can be applied to the case where the deviation amount ΔP is obtained in another manner. The same can be applied.

・可変動弁機構14を駆動するアクチュエータとして、ブラシレスモータ47を用いるようにしたが、上記ずれ量ΔPを検出する、あるいは算出することが可能であれば、その他のモータを用いるようにしてもよい。   Although the brushless motor 47 is used as the actuator for driving the variable valve mechanism 14, other motors may be used as long as the deviation amount ΔP can be detected or calculated. .

本発明にかかるモータの制御装置を具体化した一実施形態にあって、これが適用されるエンジンのシリンダヘッド周りの構造を示す拡大断面図。1 is an enlarged cross-sectional view showing a structure around a cylinder head of an engine to which the motor control device according to the present invention is embodied, to which the motor control device is applied. 同実施形態において、可変動弁機構を駆動する駆動機構、及びその駆動機構を制御する制御装置を示す模式図。FIG. 3 is a schematic diagram showing a drive mechanism that drives a variable valve mechanism and a control device that controls the drive mechanism in the embodiment. (a)〜(h)は、ブラシレスモータの回転角の変化に対する電気角センサS1〜S3のパルス信号の波形、位置センサS4,S5のパルス信号の波形、電気角カウンタEの推移、位置カウンタPの推移、及びストロークカウンタSの推移を示すタイミングチャート。(A) to (h) are waveforms of pulse signals of the electric angle sensors S1 to S3 with respect to changes in the rotation angle of the brushless motor, waveforms of pulse signals of the position sensors S4 and S5, transition of the electric angle counter E, position counter P 4 is a timing chart showing the transition of the stroke counter S. 同実施形態において、電気角カウンタE、位置カウンタP、及びストロークカウンタSを変化させるカウント処理の手順を示すフローチャート。6 is a flowchart illustrating a procedure of count processing for changing an electrical angle counter E, a position counter P, and a stroke counter S in the embodiment. (a)は電気角センサS1〜S3からの信号に応じて変化する電気角カウンタEの変化態様を示す表、(b)は位置センサS4,S5からの信号に応じた位置カウンタPの加減算についてその態様を示す表。(A) is a table showing how the electrical angle counter E changes according to the signals from the electrical angle sensors S1 to S3, and (b) shows the addition / subtraction of the position counter P according to the signals from the position sensors S4 and S5. The table | surface which shows the aspect. (a)〜(e)は、ブラシレスモータの回転角の変化に対する位置センサS4,S5からのパルス信号の波形、電気角カウンタEの推移、及び位置カウンタPの推移について、同モータの正回転中及び逆回転中にノイズが重畳した場合の態様を示すタイミングチャート。(A)-(e) are about the waveform of the pulse signal from position sensor S4, S5 with respect to the change of the rotation angle of a brushless motor, the transition of the electrical angle counter E, and the transition of the position counter P during the forward rotation of the motor. And the timing chart which shows the aspect when noise is superimposed during reverse rotation. (a)は図6(d)のタイミングA,B,Cでの位置センサS4,S5からの信号に応じた位置カウンタPの加減算についてその態様を示す表、(b)は図6(e)のタイミングC,B,Aでの位置センサS4,S5からの信号に応じた位置カウンタPの加減算についてその態様を示す表。(A) is a table showing the mode of addition / subtraction of the position counter P according to the signals from the position sensors S4, S5 at the timings A, B, C in FIG. 6 (d), and (b) is a table showing the mode. The table | surface which shows the aspect about the addition / subtraction of the position counter P according to the signal from position sensor S4, S5 in the timings C, B, A. (a)〜(d)は、時間経過に対する位置センサS4,S5からのパルス信号の波形、電気角カウンタEの推移、及び位置カウンタPの推移について、ブラシレスモータの正逆回転反転中にノイズが重畳した場合の態様を示すタイムチャート。(A) to (d) show noises during the reverse rotation of the brushless motor with respect to the waveform of the pulse signal from the position sensors S4 and S5 with respect to time, the transition of the electrical angle counter E, and the transition of the position counter P. The time chart which shows the aspect at the time of superimposing. (a)〜(e)は、ブラシレスモータの回転角の変化に対する位置センサS4,S5からのパルス信号の波形、電気角カウンタEの推移、及び位置カウンタPの推移について、位置センサS4が断線した場合の態様を示すタイミングチャート。In (a) to (e), the position sensor S4 is disconnected with respect to the waveform of the pulse signal from the position sensors S4 and S5 with respect to the change in the rotation angle of the brushless motor, the transition of the electrical angle counter E, and the transition of the position counter P. The timing chart which shows the aspect of a case. 電気角センサS1〜S3からのパルス信号における前回のエッジ発生時と今回のエッジ発生時との電気角カウンタEの変化方向と、ブラシレスモータの回転状態との関係を示す表。The table | surface which shows the relationship between the change direction of the electrical angle counter E in the pulse signal from electrical angle sensor S1-S3 at the time of the last edge generation | occurrence | production, and the time of this edge generation, and the rotation state of a brushless motor. 同実施形態において実行されるずれ量算出処理の処理手順を示すフローチャート。6 is a flowchart showing a processing procedure of deviation amount calculation processing executed in the embodiment. 同実施形態において実行されるずれ量算出処理の処理手順を示すフローチャート。6 is a flowchart showing a processing procedure of deviation amount calculation processing executed in the embodiment. (a)〜(d)、(g)、(h)は、ブラシレスモータの回転角の変化に対する位置センサS4,S5からのパルス信号の波形、電気角カウンタEの推移、位置カウンタPの推移、ずれ量の積算値の推移、及び積算値の変化量の推移について、同モータの正回転中にノイズが重畳した場合の態様を示すタイミングチャート。(A) to (d), (g), and (h) are waveforms of pulse signals from the position sensors S4 and S5 with respect to changes in the rotation angle of the brushless motor, changes in the electrical angle counter E, changes in the position counter P, The timing chart which shows the aspect at the time of the noise superimposing during the normal rotation of the motor about the transition of the integrated value of deviation | shift amount, and the transition of the variation | change_quantity of an integrated value. (A)は、ずれ量の積算値が上限値側でオーバーフローしたときの積算値の処理態様について、その一例を示すグラフ。(B)は、ずれ量の積算値が下限値側でオーバーフローしたときの積算値の処理態様について、その一例を示すグラフ。(A) is a graph which shows the example about the processing mode of an integrated value when the integrated value of deviation | shift amount overflows on the upper limit side. (B) is a graph showing an example of an integrated value processing mode when the integrated value of the deviation amount overflows on the lower limit side. 同実施形態において実行される異常判定・補正処理の処理手順を示すフローチャート。7 is a flowchart showing a processing procedure of abnormality determination / correction processing executed in the embodiment.

符号の説明Explanation of symbols

1…エンジン、2…シリンダヘッド、3…シリンダブロック、5…ピストン、6…燃焼室、7…吸気通路、8…排気通路、9…吸気バルブ、10…排気バルブ、11…吸気カムシャフト、11a…吸気カム、12…排気カムシャフト、12a…排気カム、14…可変動弁機構、15…ロッカシャフト、16…コントロールシャフト、17…入力アーム、18…出力アーム、19…ローラ、20…コイルスプリング、21…ロッカアーム、22…ラッシュアジャスタ、23…ローラ、24…バルブスプリング、47…ブラシレスモータ、48…変換機構、50…電子制御装置、51…アクセルセンサ、52…スロットルセンサ、53…エアフロメータ、54…クランク角センサ、55…吸気温センサ、56…イグニッションスイッチ、S1〜S3:電気角センサ、S4、S5…位置センサ。   DESCRIPTION OF SYMBOLS 1 ... Engine, 2 ... Cylinder head, 3 ... Cylinder block, 5 ... Piston, 6 ... Combustion chamber, 7 ... Intake passage, 8 ... Exhaust passage, 9 ... Intake valve, 10 ... Exhaust valve, 11 ... Intake camshaft, 11a DESCRIPTION OF SYMBOLS ... Intake cam, 12 ... Exhaust cam shaft, 12a ... Exhaust cam, 14 ... Variable valve mechanism, 15 ... Rocker shaft, 16 ... Control shaft, 17 ... Input arm, 18 ... Output arm, 19 ... Roller, 20 ... Coil spring , 21 ... Rocker arm, 22 ... Rush adjuster, 23 ... Roller, 24 ... Valve spring, 47 ... Brushless motor, 48 ... Conversion mechanism, 50 ... Electronic control unit, 51 ... Accelerator sensor, 52 ... Throttle sensor, 53 ... Air flow meter, 54 ... Crank angle sensor, 55 ... Intake air temperature sensor, 56 ... Ignition switch, S1 to S : Electric angle sensors, S4, S5 ... position sensor.

Claims (7)

所定の回転角範囲内での回転駆動が行われるモータと、同モータの回転に伴いパルス信号を出力する位置センサとを備え、その位置センサからのパルス信号のエッジを計数したカウンタ値に基づいて前記モータの回転角を検出する検出手段と、前記モータの実際の回転角に対応するカウンタ値と前記計数されるカウンタ値とのずれ量を算出する算出手段と、処理可能な数値の範囲が設定されており、前記ずれ量の値が同範囲の上限値を超えるときにはその超過分を同範囲の下限値に加算した値を新たなずれ量として設定する一方、前記ずれ量の値が前記下限値を超えるときにはその超過分を前記上限値に加算した値を新たなずれ量として設定するオーバーフロー処理を実行するオーバーフロー手段と、予め設定された時間周期内での前記ずれ量の変化量に基づいて前記位置センサの異常判定を行う判定手段とを備えるモータの制御装置において、
前記変化量が前記モータの能力を超えた量である場合には、同変化量から前記オーバーフロー処理の実行による変化分を除去する修正処理を実行し、その修正された変化量に基づいて前記位置センサの異常判定を行う
ことを特徴とするモータの制御装置。
Based on a counter value obtained by counting the edges of the pulse signal from the position sensor, which includes a motor that is driven to rotate within a predetermined rotation angle range, and a position sensor that outputs a pulse signal as the motor rotates. A detection means for detecting the rotation angle of the motor, a calculation means for calculating a deviation amount between the counter value corresponding to the actual rotation angle of the motor and the counted counter value, and a range of numerical values that can be processed are set. When the deviation amount value exceeds the upper limit value of the same range, a value obtained by adding the excess amount to the lower limit value of the same range is set as a new deviation amount, while the deviation amount value is set to the lower limit value. Overflow means for executing an overflow process for setting a value obtained by adding the excess amount to the upper limit value as a new deviation amount, and the deviation within a preset time period. In the motor control device and a determination means for performing abnormality determination of the position sensor based on the amount of change,
When the amount of change exceeds the capacity of the motor, a correction process for removing a change due to the execution of the overflow process is performed from the amount of change, and the position is changed based on the corrected amount of change. A control apparatus for a motor, characterized in that a sensor abnormality is determined.
前記時間周期内において前記モータが最大回転速度で駆動されるときの前記カウンタ値の変化量よりも前記ずれ量の変化量の方が大きいときに、前記変化量が前記モータの能力を超えた量である旨判定する
請求項1に記載のモータの制御装置。
The amount by which the amount of change exceeds the capacity of the motor when the amount of change in the deviation amount is larger than the amount of change in the counter value when the motor is driven at the maximum rotation speed within the time period. The motor control device according to claim 1.
請求項1または2に記載のモータの制御装置において、
前記カウンタ値のずれ量に対する補正値を前記変化量に基づいて設定し、その補正値分の補正を前記カウンタ値に対して行うとともに、同変化量が前記モータの能力を超えた量である場合には、前記修正処理にて修正された変化量に基づいて前記補正値を設定する
ことを特徴とするモータの制御装置。
The motor control device according to claim 1 or 2,
When a correction value for the deviation amount of the counter value is set based on the change amount, correction for the correction value is performed on the counter value, and the change amount is an amount exceeding the capacity of the motor. In the motor control apparatus, the correction value is set based on the amount of change corrected in the correction process.
前記修正処理として、前記ずれ量が前記上限値を超えた場合には、前記変化量に対して処理可能な前記数値の範囲分の値を加算する処理を実行し、前記ずれ量が前記下限値を超えた場合には、前記変化量に対して処理可能な前記数値の範囲分の値を減算する処理を実行する
請求項1〜3のいずれか1項に記載のモータの制御装置。
As the correction process, when the deviation amount exceeds the upper limit value, a process of adding a value corresponding to the numerical value range that can be processed to the change amount is executed, and the deviation amount is the lower limit value. The motor control device according to any one of claims 1 to 3, wherein a process for subtracting a value corresponding to the range of numerical values that can be processed is executed with respect to the amount of change.
前記モータは、その回転時に同モータに設けられた複数の電気角センサから位相をずらして出力されるパルス信号の出力パターンに基づき通電相を切り換えることで駆動されるブラシレスモータであり、
前記位置センサは、各電気角センサからパルス信号のエッジ間隔よりも短いエッジ間隔のパルス信号を出力するものであり、
前記算出手段は、各電気角センサから出力されるパルス信号のエッジ発生毎に、今回のエッジ発生時におけるカウンタ値Pi と前回のエッジ発生時におけるカウンタ値Pi-1 との差(Pi −Pi-1 )を算出し、この差(Pi −Pi-1 )の正常時の値である正常値に対する当該差(Pi −Pi-1 )のずれ量を、前記モータの実際の回転角に対応するカウンタ値と前記計数されるカウンタ値とのずれ量とする
請求項1〜4のいずれか1項に記載のモータの制御装置。
The motor is a brushless motor that is driven by switching an energized phase based on an output pattern of a pulse signal that is output with a phase shifted from a plurality of electrical angle sensors provided in the motor at the time of rotation,
The position sensor outputs a pulse signal having an edge interval shorter than the edge interval of the pulse signal from each electrical angle sensor,
For each edge generation of the pulse signal output from each electrical angle sensor, the calculation means calculates the difference between the counter value Pi when the current edge is generated and the counter value Pi-1 when the previous edge is generated (Pi−Pi−). 1) is calculated, and the amount of deviation of the difference (Pi-Pi-1) from the normal value, which is the normal value of the difference (Pi-Pi-1), is calculated as a counter corresponding to the actual rotation angle of the motor. The motor control device according to any one of claims 1 to 4, wherein a deviation amount between the value and the counted counter value is set.
前記算出手段は、前記モータの回転状態が正回転中、逆回転中、及び正逆回転反転中のうちのいずれであるかを判断し、前記各電気角センサから出力されるパルス信号のエッジ間において前記位置センサから出力されるパルス信号のエッジ数の適正値が「n」であるとすると、前記正常値をモータ正回転中であれば「n」に設定し、モータ逆回転中であれば「−n」に設定し、モータ正逆回転反転中であれば「0」に設定する
請求項5に記載のモータの制御装置。
The calculation means determines whether the rotation state of the motor is normal rotation, reverse rotation, or normal / reverse rotation inversion, and between the edges of the pulse signals output from the electric angle sensors. If the appropriate value of the number of edges of the pulse signal output from the position sensor is “n”, the normal value is set to “n” if the motor is rotating forward, and if the motor is rotating backward The motor control device according to claim 5, wherein the motor control device is set to “−n” and is set to “0” when the motor is rotating in the normal direction.
前記モータは、内燃機関の機関バルブのバルブ特性を可変とする可変動弁機構の駆動に用いられるものである
請求項1〜6のいずれか1項に記載のモータの制御装置。
The motor control device according to claim 1, wherein the motor is used to drive a variable valve mechanism that varies a valve characteristic of an engine valve of an internal combustion engine.
JP2006137652A 2006-05-17 2006-05-17 Motor controller Pending JP2007312478A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006137652A JP2007312478A (en) 2006-05-17 2006-05-17 Motor controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006137652A JP2007312478A (en) 2006-05-17 2006-05-17 Motor controller

Publications (1)

Publication Number Publication Date
JP2007312478A true JP2007312478A (en) 2007-11-29

Family

ID=38844823

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006137652A Pending JP2007312478A (en) 2006-05-17 2006-05-17 Motor controller

Country Status (1)

Country Link
JP (1) JP2007312478A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014039770A (en) * 2012-08-24 2014-03-06 Olympia:Kk Game machine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014039770A (en) * 2012-08-24 2014-03-06 Olympia:Kk Game machine

Similar Documents

Publication Publication Date Title
JP4655036B2 (en) Control device for variable valve mechanism
US7921711B2 (en) Abnormality determination apparatus and abnormality determination method for valve characteristics change mechanism
JP4736601B2 (en) Motor control device
JP4797768B2 (en) Motor control device
JP5012963B2 (en) Actuator control device
JP4692339B2 (en) Control device for variable valve mechanism
JP2007043853A (en) Motor controller
JP4888160B2 (en) Variable valve operating device for internal combustion engine
JP2011157835A (en) Rotation angle detector and method for installing the same
JP4852992B2 (en) Control device for internal combustion engine
JP4816520B2 (en) Control device for variable valve mechanism
JP2007312478A (en) Motor controller
JP4645339B2 (en) Motor control device
JP2007085328A (en) Variable valve system for internal combustion engine
JP2009197768A (en) Abnormality determination device for variable operating angle mechanism
JP2007185046A (en) Motor controller
JP4858235B2 (en) Control device for variable valve mechanism
JP2009197766A (en) Abnormality determination device for variable operating angle mechanism
JP2007185006A (en) Controller of brushless motor
JP4715536B2 (en) Maximum lift control device for engine valves
JP2007037335A (en) Motor controller
JP2007051602A (en) Variable valve gear for internal combustion engine
JP5029730B2 (en) Control device for variable mechanism
JP2007162646A (en) Motor control device
JP4400648B2 (en) Diagnostic equipment