JP2019144056A - Rotation angle detector, motor controller, electric power steering device, and rotation angle detection method - Google Patents

Rotation angle detector, motor controller, electric power steering device, and rotation angle detection method Download PDF

Info

Publication number
JP2019144056A
JP2019144056A JP2018027270A JP2018027270A JP2019144056A JP 2019144056 A JP2019144056 A JP 2019144056A JP 2018027270 A JP2018027270 A JP 2018027270A JP 2018027270 A JP2018027270 A JP 2018027270A JP 2019144056 A JP2019144056 A JP 2019144056A
Authority
JP
Japan
Prior art keywords
wave signal
value
sine wave
cosine wave
cosine
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
JP2018027270A
Other languages
Japanese (ja)
Inventor
和哉 亀井
Kazuya Kamei
和哉 亀井
亮 皆木
Akira Minaki
亮 皆木
敬幸 小林
Atsuyuki Kobayashi
敬幸 小林
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.)
NSK Ltd
Original Assignee
NSK Ltd
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 NSK Ltd filed Critical NSK Ltd
Priority to JP2018027270A priority Critical patent/JP2019144056A/en
Publication of JP2019144056A publication Critical patent/JP2019144056A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a rotation angle detector, a motor controller, an electric power steering device, and a rotation angle detection method with which it is possible to maintain high detection accuracy.SOLUTION: The gain of a first sine wave signal is corrected to obtain a second sine wave signal on the basis of the maximum or minimum value of the first sine wave signal when the revolution speed of a motor is less than or equal to an upper-limit threshold. The gain of a first cosine wave signal is corrected to obtain a second cosine wave signal on the basis of the maximum or minimum value of the first cosine wave signal when the revolution speed of a motor is less than or equal to an upper-limit threshold. The gain of a third sine wave signal derived by adding the second cosine wave signal and the second sine wave signal is corrected to obtain a fourth sine wave signal on the basis of the maximum or minimum value of the third sine wave signal. The gain of a third cosine wave signal derived by subtracting the second sine wave signal from the second cosine wave signal is corrected to obtain a fourth cosine wave signal on the basis of the maximum or minimum value of the third cosine wave signal. The rotation angle of the motor is calculated on the basis of the fourth sine wave signal and the fourth cosine wave signal.SELECTED DRAWING: Figure 7

Description

本発明は、回転角検出装置、モータ制御装置、電動パワーステアリング装置、及び回転角検出方法に関する。   The present invention relates to a rotation angle detection device, a motor control device, an electric power steering device, and a rotation angle detection method.

乗用車やトラック等の車両の操舵力を軽減するため、モータによって操舵を補助する、いわゆる電動パワーステアリング(EPS:Electric Power Steering)装置がある。電動パワーステアリング装置は、車両のステアリング機構にモータが発生する補助操舵力を付与する操舵補助制御機能を有している。このような電動パワーステアリング装置において、ブラシレスモータの電流制御を行うためには、センサを用いてモータの位置(回転角)を高精度に検出する必要がある。例えば、外周面にN極とS極が交互に複数配置された着磁ローターの回転軸と平行な方向に所定間隔離れて配置され、直列接続された2つの磁気抵抗素子の接続点の電圧(差動出力電圧)を用いて位置検出を行う構成が開示されている(例えば、特許文献1)。   In order to reduce the steering force of vehicles such as passenger cars and trucks, there is a so-called electric power steering (EPS) device that assists steering by a motor. The electric power steering apparatus has a steering assist control function for applying an assist steering force generated by a motor to a vehicle steering mechanism. In such an electric power steering apparatus, in order to perform current control of the brushless motor, it is necessary to detect the position (rotation angle) of the motor with high accuracy using a sensor. For example, the voltage (at the connection point between two magnetoresistive elements connected in series at a predetermined interval in the direction parallel to the rotation axis of a magnetized rotor in which a plurality of N poles and S poles are alternately arranged on the outer peripheral surface. A configuration for performing position detection using a differential output voltage is disclosed (for example, Patent Document 1).

特開2015−87137号公報JP2015-87137A

磁気抵抗素子をセンサとして用いる場合、センサの出力には直流のオフセット成分が重畳する。また、回転磁石の取り付け誤差やセンサの製造誤差によって、センサのゲイン誤差や位相ズレが生じる場合がある。モータにセンサが組み込まれた状態で出荷前にオフセット電圧やゲイン誤差、位相ズレ等を補正するようにキャリブレーションを行うことが一般的である。しかしながら、センサの出力に生じるオフセット電圧やゲイン誤差は、温度ドリフトによって変化し、温度上昇に伴って増加する。このため、出荷前のキャリブレーション実施時とは異なる温度条件下では検出精度が低下する可能性がある。また、経時変化によってこれらの誤差が大きくなり検出精度が低下する場合がある。特に、磁気抵抗素子は、高感度の半導体素子であるため、このような温度特性や経年変化による出力変動が無視できない。   When using a magnetoresistive element as a sensor, a DC offset component is superimposed on the output of the sensor. Moreover, a gain error or a phase shift of the sensor may occur due to a mounting error of the rotating magnet or a manufacturing error of the sensor. In general, calibration is performed so as to correct an offset voltage, a gain error, a phase shift, and the like before shipment in a state where a sensor is incorporated in a motor. However, the offset voltage and gain error generated in the sensor output change due to temperature drift, and increase as the temperature rises. For this reason, there is a possibility that the detection accuracy is lowered under a temperature condition different from that at the time of calibration before shipment. In addition, these errors may increase due to changes over time, and the detection accuracy may decrease. In particular, since the magnetoresistive element is a highly sensitive semiconductor element, output fluctuation due to such temperature characteristics and aging cannot be ignored.

本発明は、上記の課題に鑑みてなされたものであって、高い検出精度を維持することができる回転角検出装置、モータ制御装置、電動パワーステアリング装置、及び回転角検出方法を提供すること、を目的としている。   The present invention has been made in view of the above problems, and provides a rotation angle detection device, a motor control device, an electric power steering device, and a rotation angle detection method capable of maintaining high detection accuracy. It is an object.

上記の目的を達成するため、本発明の一態様に係る回転角検出装置は、正相正弦波信号と当該正相正弦波信号を位相反転した逆相正弦波信号とを含む差動正弦波信号、及び、正相余弦波信号と当該正相余弦波信号を位相反転した逆相余弦波信号とを含む差動余弦波信号を、モータの位置検出信号として出力する位置検出センサと、前記位置検出信号に基づき、前記モータの位置を検出する位置検出部と、記憶部と、を備え、前記位置検出部は、前記正相正弦波信号と前記逆相正弦波信号との差分を第1正弦波信号として出力し、前記正相余弦波信号と前記逆相余弦波信号との差分を第1余弦波信号として出力する差分演算部と、前記記憶部に記憶された前記第1正弦波信号の最大値又は最小値に基づき、前記第1正弦波信号のゲインを補正した第2正弦波信号を出力すると共に、前記記憶部に記憶された前記第1余弦波信号の最大値又は最小値に基づき、前記第1余弦波信号のゲインを補正した第2余弦波信号を出力する第1ゲイン補正部と、前記第2余弦波信号と前記第2正弦波信号とを加算して第3正弦波信号を生成し、前記記憶部に記憶された前記第3正弦波信号の最大値又は最小値に基づき、前記第3正弦波信号のゲインを補正した第4正弦波信号を出力すると共に、前記第2余弦波信号から前記第2正弦波信号を減算して第3余弦波信号を生成し、前記記憶部に記憶された前記第3余弦波信号の最大値又は最小値に基づき、前記第3余弦波信号のゲインを補正した第4余弦波信号を出力する第2ゲイン補正部と、前記第4正弦波信号及び前記第4余弦波信号に基づき、前記モータの回転角を算出すると共に、前記モータの回転角に基づき、前記モータの回転数を算出する角度算出部と、を備え、前記第1ゲイン補正部は、少なくとも前記モータの回転数に応じて、前記第1正弦波信号の最大値及び最小値、並びに、前記第1余弦波信号の最大値及び最小値を更新する。   In order to achieve the above object, a rotation angle detection device according to an aspect of the present invention includes a differential sine wave signal including a positive phase sine wave signal and a negative phase sine wave signal obtained by inverting the phase of the positive phase sine wave signal. And a position detection sensor for outputting a differential cosine wave signal including a positive phase cosine wave signal and a negative phase cosine wave signal obtained by inverting the phase of the positive phase cosine wave signal as a position detection signal of the motor, and the position detection A position detection unit for detecting the position of the motor based on the signal; and a storage unit, wherein the position detection unit calculates a difference between the positive phase sine wave signal and the negative phase sine wave signal as a first sine wave. A difference calculation unit that outputs a difference between the positive-phase cosine wave signal and the negative-phase cosine wave signal as a first cosine wave signal; and a maximum of the first sine wave signal stored in the storage unit Based on the value or the minimum value, the gain of the first sine wave signal is corrected. Outputs a second sine wave signal and outputs a second cosine wave signal obtained by correcting the gain of the first cosine wave signal based on the maximum value or the minimum value of the first cosine wave signal stored in the storage unit. A first gain correction unit that adds the second cosine wave signal and the second sine wave signal to generate a third sine wave signal, and the maximum of the third sine wave signal stored in the storage unit A fourth sine wave signal in which the gain of the third sine wave signal is corrected based on the value or the minimum value, and a third cosine wave signal obtained by subtracting the second sine wave signal from the second cosine wave signal. And a second gain correction unit that outputs a fourth cosine wave signal obtained by correcting the gain of the third cosine wave signal based on the maximum value or the minimum value of the third cosine wave signal stored in the storage unit And based on the fourth sine wave signal and the fourth cosine wave signal, An angle calculation unit that calculates a rotation angle of the motor and calculates a rotation number of the motor based on the rotation angle of the motor, wherein the first gain correction unit corresponds to at least the rotation number of the motor The maximum value and the minimum value of the first sine wave signal and the maximum value and the minimum value of the first cosine wave signal are updated.

上記構成によれば、リアルタイムで検出された位置検出信号に基づき、回転角検出装置のキャリブレーションを実施することができる。これにより、温度ドリフトや経時変化によって検出精度が低下することを抑制することができ、高い検出精度を維持することができる。   According to the above configuration, the rotation angle detection device can be calibrated based on the position detection signal detected in real time. Thereby, it can suppress that detection accuracy falls by temperature drift or a time-dependent change, and can maintain high detection accuracy.

回転角検出装置の望ましい態様として、前記第1ゲイン補正部は、前記モータの回転数が、前記モータの回転数の上限閾値以下である場合に、前記記憶部に記憶された前記第1正弦波信号の最大値及び最小値、並びに、前記第1余弦波信号の最大値及び最小値を更新することが好ましい。   As a desirable mode of the rotation angle detection device, the first gain correction unit may be configured to store the first sine wave stored in the storage unit when the rotation speed of the motor is equal to or lower than an upper limit threshold value of the rotation speed of the motor. It is preferable to update the maximum and minimum values of the signal and the maximum and minimum values of the first cosine wave signal.

これにより、モータの回転数が上限閾値以下である場合に、第1正弦波信号及び第1余弦波信号のゲインを補正して第2正弦波信号及び第2余弦波信号を求める際に用いる第1正弦波信号の最大値及び最小値、並びに、第1余弦波信号の最大値及び最小値が更新される。   Thereby, when the rotation speed of the motor is equal to or lower than the upper limit threshold, the gains of the first sine wave signal and the first cosine wave signal are corrected to obtain the second sine wave signal and the second cosine wave signal. The maximum value and minimum value of the 1 sine wave signal and the maximum value and minimum value of the first cosine wave signal are updated.

回転角検出装置の望ましい態様として、前記第1ゲイン補正部は、前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0以上であるときの前記第1正弦波信号の値を前記第1正弦波信号の最大値として前記記憶部に記憶し、前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0未満であるときの前記第1正弦波信号の値を前記第1正弦波信号の最小値として前記記憶部に記憶し、前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0以上であるときの前記第1余弦波信号の値を前記第1余弦波信号の最大値として前記記憶部に記憶し、前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0未満であるときの前記第1余弦波信号の値を前記第1余弦波信号の最小値として前記記憶部に記憶する。   As a desirable mode of the rotation angle detection device, the first gain correction unit is configured to detect the first sine wave when the value of the first sine wave signal is 0 or more when the zero point of the first cosine wave signal is detected. The value of the signal is stored in the storage unit as the maximum value of the first sine wave signal, and when the zero point of the first cosine wave signal is detected, the value of the first sine wave signal is less than zero. The value of the first sine wave signal is stored in the storage unit as the minimum value of the first sine wave signal, and when the zero point of the first sine wave signal is detected, the value of the first cosine wave signal is 0 or more. The value of the first cosine wave signal at a certain time is stored in the storage unit as the maximum value of the first cosine wave signal, and when the zero point of the first sine wave signal is detected, the value of the first cosine wave signal is stored. The value of the first cosine wave signal when is less than 0 is the first cosine wave signal. Stored in the storage unit as the minimum value.

これにより、第1正弦波信号の最大値又は最小値、もしくは、第1余弦波信号の最大値又は最小値を検出する際のモータの回転数を上限閾値以下とすることで、より検出精度を高めることができる。   Thereby, by detecting the maximum value or the minimum value of the first sine wave signal or the maximum value or the minimum value of the first cosine wave signal, the number of rotations of the motor is set to be equal to or lower than the upper limit threshold value, thereby further improving the detection accuracy. Can be increased.

回転角検出装置の望ましい態様として、前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0以上であって、前記第1余弦波信号の値が、前記第1余弦波信号の最大値の下限値以上上限値以下である場合に、当該第1正弦波信号の値を前記第1正弦波信号の最大値として前記記憶部に記憶し、前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0未満であって、前記第1正弦波信号の値が、前記第1正弦波信号の最小値の下限値以上上限値以下である場合に、当該第1正弦波信号の値を前記第1正弦波信号の最小値として前記記憶部に記憶し、前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0以上であって、前記第1余弦波信号の値が、前記第1余弦波信号の最大値の下限値以上上限値以下である場合に、当該第1余弦波信号の値を前記第1余弦波信号の最大値として前記記憶部に記憶し、前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0未満であって、前記第1余弦波信号の値が、前記第1余弦波信号の最小値の下限値以上上限値以下である場合に、当該第1余弦波信号の値を前記第1余弦波信号の最小値として前記記憶部に記憶する。   As a desirable mode of the rotation angle detection device, when the zero point of the first cosine wave signal is detected, the value of the first sine wave signal is 0 or more, and the value of the first cosine wave signal is the first cosine wave signal. When the maximum value of the cosine wave signal is not less than the lower limit value and not more than the upper limit value, the value of the first sine wave signal is stored in the storage unit as the maximum value of the first sine wave signal, and the first cosine wave signal is stored. When the zero point is detected, the value of the first sine wave signal is less than 0, and the value of the first sine wave signal is not less than the lower limit value and not more than the upper limit value of the minimum value of the first sine wave signal. In this case, the value of the first sine wave signal is stored in the storage unit as the minimum value of the first sine wave signal, and the value of the first cosine wave signal is detected when the zero point of the first sine wave signal is detected. Is greater than or equal to 0, and the value of the first cosine wave signal is lower than the maximum value of the first cosine wave signal. When the value is not less than the upper limit value and not more than the upper limit value, the value of the first cosine wave signal is stored in the storage unit as the maximum value of the first cosine wave signal, and when the zero point of the first sine wave signal is detected, When the value of the first cosine wave signal is less than 0 and the value of the first cosine wave signal is not less than the lower limit value and not more than the upper limit value of the minimum value of the first cosine wave signal, the first cosine wave signal The value of the signal is stored in the storage unit as the minimum value of the first cosine wave signal.

これにより、モータの回転数を上限閾値以下とすることに加え、第1正弦波信号の最大値及び最小値、又は、第1余弦波信号の最大値及び最小値の上限値及び下限値を設けることで、異常値の学習を防止することができる。   Thereby, in addition to setting the number of revolutions of the motor to be equal to or lower than the upper limit threshold, the maximum value and minimum value of the first sine wave signal, or the upper limit value and lower limit value of the maximum value and minimum value of the first cosine wave signal are provided. Thus, learning of abnormal values can be prevented.

回転角検出装置の望ましい態様として、前記差分演算部は、前記正相正弦波信号が、前記正相正弦波信号の下限閾値未満であるか、又は、前記正相正弦波信号の上限閾値よりも大きい場合に、前記正相正弦波信号の入力値異常と判定し、前記逆相正弦波信号が、前記逆相正弦波信号の下限閾値未満であるか、又は、前記逆相正弦波信号の上限閾値よりも大きい場合に、前記逆相正弦波信号の入力値異常と判定し、前記正相余弦波信号が、前記正相余弦波信号の下限閾値未満であるか、又は、前記正相余弦波信号の上限閾値よりも大きい場合に、前記正相余弦波信号の入力値異常と判定し、前記逆相余弦波信号が、前記逆相余弦波信号の下限閾値未満であるか、又は、前記逆相余弦波信号の上限閾値よりも大きい場合に、前記逆相余弦波信号の入力値異常と判定することが好ましい。   As a desirable mode of the rotation angle detection device, the difference calculation unit may be configured such that the positive phase sine wave signal is less than a lower limit threshold value of the positive phase sine wave signal or an upper limit threshold value of the positive phase sine wave signal. If it is larger, it is determined that the input value of the positive phase sine wave signal is abnormal, and the negative phase sine wave signal is less than a lower limit threshold of the negative phase sine wave signal, or an upper limit of the negative phase sine wave signal When it is larger than the threshold value, it is determined that the input value of the negative-phase sine wave signal is abnormal, and the positive-phase cosine wave signal is less than a lower-limit threshold value of the positive-phase cosine wave signal, or the positive-phase cosine wave signal When the signal is larger than the upper limit threshold value of the signal, it is determined that the input value of the positive phase cosine wave signal is abnormal, and the negative phase cosine wave signal is less than the lower limit threshold value of the negative phase cosine wave signal, or When the phase cosine wave signal is larger than the upper threshold, the phase cosine wave signal It is preferable to determine that the force abnormalities.

これにより、正相正弦波信号の入力値異常、逆相正弦波信号の入力値異常、正相余弦波信号の入力値異常、及び逆相余弦波信号の入力値異常を検出することができる。   Thereby, an input value abnormality of the positive phase sine wave signal, an input value abnormality of the negative phase sine wave signal, an input value abnormality of the positive phase cosine wave signal, and an input value abnormality of the negative phase cosine wave signal can be detected.

回転角検出装置の望ましい態様として、前記差分演算部は、前記正弦波信号オフセット電圧が、前記正弦波信号オフセット電圧の下限閾値未満であるか、又は、前記正弦波信号オフセット電圧の上限閾値よりも大きい場合に、前記正弦波信号オフセット電圧のオフセット電圧値異常と判定し、前記余弦波信号オフセット電圧が、前記余弦波信号オフセット電圧の下限閾値未満であるか、又は、前記余弦波信号オフセット電圧の上限閾値よりも大きい場合に、前記余弦波信号オフセット電圧のオフセット電圧値異常と判定することが好ましい。   As a desirable mode of the rotation angle detection device, the difference calculation unit is configured such that the sine wave signal offset voltage is less than a lower limit threshold value of the sine wave signal offset voltage or is higher than an upper limit threshold value of the sine wave signal offset voltage. If it is larger, it is determined that the offset voltage value of the sine wave signal offset voltage is abnormal, and the cosine wave signal offset voltage is less than a lower limit threshold of the cosine wave signal offset voltage, or the cosine wave signal offset voltage When it is larger than the upper limit threshold value, it is preferable to determine that the offset voltage value of the cosine wave signal offset voltage is abnormal.

これにより、正弦波信号オフセット電圧のオフセット電圧値異常、及び余弦波信号オフセット電圧のオフセット電圧値異常を検出することができる。   Thereby, the offset voltage value abnormality of the sine wave signal offset voltage and the offset voltage value abnormality of the cosine wave signal offset voltage can be detected.

回転角検出装置の望ましい態様として、前記第1ゲイン補正部は、前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0以上であるときの前記第1正弦波信号の値が、前記第1正弦波信号の最大値の下限値未満であるか、又は、前記第1正弦波信号の最大値の上限値より大きい場合に、前記第1正弦波信号の最大値異常と判定し、前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0未満であるときの前記第1正弦波信号の値が、前記第1正弦波信号の最小値の下限値未満であるか、又は、前記第1正弦波信号の最小値の上限値より大きい場合に、前記第1正弦波信号の最小値異常と判定し、前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0以上であるときの前記第1余弦波信号の値が、前記第1余弦波信号の最大値の下限値未満であるか、又は、前記第1余弦波信号の最大値の上限値より大きい場合に、前記第1余弦波信号の最大値異常と判定し、前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0未満であるときの前記第1余弦波信号の値が、前記第1余弦波信号の最小値の下限値未満であるか、又は、前記第1余弦波信号の最小値の上限値より大きい場合に、前記第1余弦波信号の最小値異常と判定することが好ましい。   As a desirable mode of the rotation angle detection device, the first gain correction unit is configured to detect the first sine wave when the value of the first sine wave signal is 0 or more when the zero point of the first cosine wave signal is detected. The maximum value of the first sine wave signal when the value of the signal is less than the lower limit value of the maximum value of the first sine wave signal or greater than the upper limit value of the maximum value of the first sine wave signal. When the zero point of the first cosine wave signal is detected, the value of the first sine wave signal when the value of the first sine wave signal is less than 0 is the value of the first sine wave signal. When it is less than the lower limit value of the minimum value or larger than the upper limit value of the minimum value of the first sine wave signal, it is determined that the minimum value of the first sine wave signal is abnormal, The first cosine when the value of the first cosine wave signal is 0 or more when the zero point is detected. When the value of the wave signal is less than the lower limit value of the maximum value of the first cosine wave signal or greater than the upper limit value of the maximum value of the first cosine wave signal, the maximum value of the first cosine wave signal When the zero point of the first sine wave signal is detected, the value of the first cosine wave signal when the value of the first cosine wave signal is less than 0 is the first cosine wave signal. It is preferable to determine that the minimum value of the first cosine wave signal is abnormal when it is less than the lower limit value of the minimum value or larger than the upper limit value of the minimum value of the first cosine wave signal.

これにより、第1正弦波信号の最大値異常、第1正弦波信号の最小値異常、第1余弦波信号の最大値異常、及び第1余弦波信号の最小値異常を検出することができる。   Thereby, the maximum value abnormality of the first sine wave signal, the minimum value abnormality of the first sine wave signal, the maximum value abnormality of the first cosine wave signal, and the minimum value abnormality of the first cosine wave signal can be detected.

回転角検出装置の望ましい態様として、前記第2ゲイン補正部は、前記第3余弦波信号のゼロ点検出時において、前記第3正弦波信号の値が0以上であるとき、当該第3正弦波信号の値を前記第3正弦波信号の最大値として前記記憶部に記憶し、前記第3余弦波信号のゼロ点検出時において、前記第3正弦波信号の値が0未満であるとき、当該第3正弦波信号の値を前記第3正弦波信号の最小値として前記記憶部に記憶し、前記第3正弦波信号のゼロ点検出時において、前記第3余弦波信号の値が0以上であるとき、当該第3余弦波信号の値を前記第3余弦波信号の最大値として前記記憶部に記憶し、前記第3正弦波信号のゼロ点検出時において、前記第3余弦波信号の値が0未満であるとき、当該第3余弦波信号の値を前記第3余弦波信号の最小値として前記記憶部に記憶することが好ましい。   As a desirable mode of the rotation angle detection device, the second gain correction unit may detect the third sine wave when the value of the third sine wave signal is 0 or more when the zero point of the third cosine wave signal is detected. When the value of the third sine wave signal is less than 0 when the zero value of the third cosine wave signal is detected, the value of the signal is stored in the storage unit as the maximum value of the third sine wave signal. The value of the third sine wave signal is stored in the storage unit as the minimum value of the third sine wave signal, and when the zero point of the third sine wave signal is detected, the value of the third cosine wave signal is 0 or more. In some cases, the value of the third cosine wave signal is stored in the storage unit as the maximum value of the third cosine wave signal, and the value of the third cosine wave signal is detected when the zero point of the third sine wave signal is detected. Is less than 0, the value of the third cosine wave signal is set to the third cosine wave signal. It is preferably stored in the storage unit as the minimum value.

これにより、第4正弦波信号を得るための第3正弦波信号の最大値又は最小値をリアルタイムで取得することができる。また、第4余弦波信号を得るための第3余弦波信号の最大値又は最小値をリアルタイムで取得することができる。   Thereby, the maximum value or the minimum value of the third sine wave signal for obtaining the fourth sine wave signal can be acquired in real time. In addition, the maximum value or the minimum value of the third cosine wave signal for obtaining the fourth cosine wave signal can be acquired in real time.

上記の目的を達成するため、本発明の一態様に係るモータ制御装置は、上記回転角検出装置を備え、前記回転角を用いて、前記モータを駆動制御する。   In order to achieve the above object, a motor control device according to an aspect of the present invention includes the rotation angle detection device, and drives and controls the motor using the rotation angle.

これにより、モータを高精度に駆動制御することができる。   Thereby, it is possible to drive and control the motor with high accuracy.

上記の目的を達成するため、本発明の一態様に係る電動パワーステアリング装置は、上記モータ制御装置を備え、前記モータは、ステアリングのコラム軸又はラックに設けられ、前記ステアリングの操舵力をトルク制御する。   In order to achieve the above object, an electric power steering apparatus according to an aspect of the present invention includes the motor control apparatus, and the motor is provided on a column shaft or a rack of a steering, and torque control of the steering force of the steering is performed. To do.

これにより、電動パワーステアリング装置における操舵補助制御の精度を高めることができる。   Thereby, the accuracy of the steering assist control in the electric power steering apparatus can be increased.

これにより、電動パワーステアリング装置は、回転角検出装置の故障判定結果に応じた処理が可能となる。   Thereby, the electric power steering device can perform processing according to the failure determination result of the rotation angle detection device.

上記の目的を達成するため、本発明の一態様に係る回転角検出方法は、モータの位置検出信号として位置検出センサから出力される、正相正弦波信号と当該正相正弦波信号を位相反転した逆相正弦波信号とを含む差動正弦波信号、及び、正相余弦波信号と当該正相余弦波信号を位相反転した逆相余弦波信号とを含む差動余弦波信号に基づき、前記モータの位置を検出する回転角検出方法であって、前記正相正弦波信号と前記逆相正弦波信号との差分を第1正弦波信号とするステップと、前記正相余弦波信号と前記逆相余弦波信号との差分を第1余弦波信号とするステップと、前記モータの回転数が、前記モータの回転数の上限閾値以下であるときの前記第1正弦波信号の最大値又は最小値に基づき、前記第1正弦波信号のゲインを補正して第2正弦波信号とするステップと、前記モータの回転数が、前記モータの回転数の上限閾値以下であるときの前記第1余弦波信号の最大値又は最小値に基づき、前記第1余弦波信号のゲインを補正して第2余弦波信号とするステップと、前記第2余弦波信号と前記第2正弦波信号とを加算して第3正弦波信号とするステップと、前記第2余弦波信号から前記第2正弦波信号を減算して第3余弦波信号とするステップと、前記第3正弦波信号の最大値又は最小値に基づき、前記第3正弦波信号のゲインを補正して第4正弦波信号とするステップと、前記第3余弦波信号の最大値又は最小値に基づき、前記第3余弦波信号のゲインを補正して第4余弦波信号とするステップと、前記第4正弦波信号及び前記第4余弦波信号に基づき、前記モータの回転角を算出するステップと、を有する。   In order to achieve the above object, a rotation angle detection method according to one aspect of the present invention includes a positive phase sine wave signal output from a position detection sensor as a motor position detection signal and a phase inversion of the positive phase sine wave signal. A differential sine wave signal including a negative phase sine wave signal, and a differential cosine wave signal including a positive phase cosine wave signal and a negative phase cosine wave signal obtained by inverting the phase of the positive phase cosine wave signal, A rotation angle detection method for detecting a position of a motor, wherein a difference between the positive phase sine wave signal and the negative phase sine wave signal is a first sine wave signal, and the positive phase cosine wave signal and the reverse phase A step of setting a difference from the phase cosine wave signal as a first cosine wave signal, and a maximum value or a minimum value of the first sine wave signal when the rotation speed of the motor is equal to or lower than an upper limit threshold value of the rotation speed of the motor. To correct the gain of the first sine wave signal and Based on the maximum value or the minimum value of the first cosine wave signal when the rotation speed of the motor is equal to or less than the upper limit threshold value of the rotation speed of the motor, From the step of correcting the gain to obtain a second cosine wave signal, the step of adding the second cosine wave signal and the second sine wave signal to obtain a third sine wave signal, and the second cosine wave signal Subtracting the second sine wave signal to obtain a third cosine wave signal and correcting the gain of the third sine wave signal based on the maximum value or the minimum value of the third sine wave signal A step of making a wave signal, a step of correcting a gain of the third cosine wave signal based on the maximum value or the minimum value of the third cosine wave signal, and making a fourth cosine wave signal, and the fourth sine wave signal And the rotation of the motor based on the fourth cosine wave signal. A calculating a square, a.

これにより、リアルタイムで検出された位置検出信号に基づき、回転角検出装置のキャリブレーションを実施することができる。これにより、温度ドリフトや経時変化によって検出精度が低下することを抑制することができ、高い検出精度を維持することができる。また、第1正弦波信号及び第1余弦波信号のゲインを補正して第2正弦波信号及び第2余弦波信号を求める際に用いる第1正弦波信号の最大値及び最小値、又は、第1余弦波信号の最大値又は最小値を検出する際のモータの回転数を上限閾値以下とすることで、より検出精度を高めることができる。   As a result, the rotation angle detection device can be calibrated based on the position detection signal detected in real time. Thereby, it can suppress that detection accuracy falls by temperature drift or a time-dependent change, and can maintain high detection accuracy. Further, the maximum value and the minimum value of the first sine wave signal used when obtaining the second sine wave signal and the second cosine wave signal by correcting the gains of the first sine wave signal and the first cosine wave signal, or The detection accuracy can be further improved by setting the rotation speed of the motor when detecting the maximum value or the minimum value of one cosine wave signal to be equal to or lower than the upper limit threshold value.

本発明によれば、高い検出精度を維持することができる回転角検出装置、モータ制御装置、電動パワーステアリング装置、及び回転角検出方法を提供することができる。   According to the present invention, it is possible to provide a rotation angle detection device, a motor control device, an electric power steering device, and a rotation angle detection method that can maintain high detection accuracy.

図1は、実施形態に係る電動パワーステアリング装置の構成を示す図である。FIG. 1 is a diagram illustrating a configuration of an electric power steering apparatus according to an embodiment. 図2は、実施形態に係る電動パワーステアリング装置を制御するコントロールユニットのハードウェア構成を示す模式図である。FIG. 2 is a schematic diagram illustrating a hardware configuration of a control unit that controls the electric power steering apparatus according to the embodiment. 図3は、実施形態に係る電動パワーステアリング装置を制御するコントロールユニットの機能的な構成を示す機能ブロック図である。FIG. 3 is a functional block diagram illustrating a functional configuration of a control unit that controls the electric power steering apparatus according to the embodiment. 図4は、実施形態における位置検出センサの概略図である。FIG. 4 is a schematic diagram of a position detection sensor in the embodiment. 図5は、位置検出信号及び位相角の関係を示す図である。FIG. 5 is a diagram illustrating the relationship between the position detection signal and the phase angle. 図6は、3相ブラシレスモータにおいて、位置検出部によって検出された電気角を用いて、3相ブラシレスモータのU相電流、V相電流、及びW相電流を制御しているときのモータ制御電流と電気角との関係を示す図である。FIG. 6 shows the motor control current when the U-phase current, V-phase current, and W-phase current of the three-phase brushless motor are controlled in the three-phase brushless motor using the electrical angle detected by the position detector. It is a figure which shows the relationship between an electrical angle. 図7は、実施形態に係る回転角検出装置の概略ブロック構成の一例を示す図である。FIG. 7 is a diagram illustrating an example of a schematic block configuration of the rotation angle detection device according to the embodiment. 図8は、差動演算部の等価ブロックの一例を示す図である。FIG. 8 is a diagram illustrating an example of an equivalent block of the differential operation unit. 図9は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第1図である。FIG. 9 is a first diagram illustrating a difference calculation concept in the equivalent block shown in FIG. 8 of the differential calculation unit. 図10は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第2図である。FIG. 10 is a second diagram for explaining the concept of difference calculation in the equivalent block shown in FIG. 8 of the differential operation unit. 図11は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第3図である。FIG. 11 is a third diagram for explaining the concept of difference calculation in the equivalent block shown in FIG. 8 of the differential operation unit. 図12は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第4図である。FIG. 12 is a fourth diagram illustrating a difference calculation concept in the equivalent block shown in FIG. 8 of the differential calculation unit. 図13は、第1ゲイン補正部の等価ブロックの一例を示す図である。FIG. 13 is a diagram illustrating an example of an equivalent block of the first gain correction unit. 図14は、第1ゲイン補正部の図13に示す等価ブロックにおける第1正弦波信号及び第1余弦波信号の最大値又は最小値の検出概念を説明する図である。FIG. 14 is a diagram for explaining the concept of detecting the maximum value or the minimum value of the first sine wave signal and the first cosine wave signal in the equivalent block shown in FIG. 13 of the first gain correction unit. 図15は、第2正弦波信号及び第2余弦波信号に位相ずれが生じていない場合の位相変換処理後のベクトル図である。FIG. 15 is a vector diagram after the phase conversion process when no phase shift occurs in the second sine wave signal and the second cosine wave signal. 図16は、第2正弦波信号及び第2余弦波信号にαの位相ずれが生じている場合の位相変換処理後のベクトル図である。FIG. 16 is a vector diagram after the phase conversion process when a phase shift of α occurs in the second sine wave signal and the second cosine wave signal. 図17は、第2ゲイン補正部の等価ブロックの一例を示す図である。FIG. 17 is a diagram illustrating an example of an equivalent block of the second gain correction unit. 図18は、第2ゲイン補正部の図17に示す等価ブロックにおける第3正弦波信号及び第3余弦波信号の最大値又は最小値の検出概念を説明する図である。FIG. 18 is a diagram for explaining the concept of detecting the maximum value or the minimum value of the third sine wave signal and the third cosine wave signal in the equivalent block shown in FIG. 17 of the second gain correction unit. 図19は、実施形態に係る回転角検出装置における回転角検出処理手順の一例を示すフローチャートである。FIG. 19 is a flowchart illustrating an example of a rotation angle detection processing procedure in the rotation angle detection device according to the embodiment. 図20は、EEPROMに記憶される各情報の一例を示す図である。FIG. 20 is a diagram illustrating an example of each piece of information stored in the EEPROM. 図21は、入力異常判定処理の一例を示すフローチャートである。FIG. 21 is a flowchart illustrating an example of the input abnormality determination process. 図22は、第1正弦波信号及び第1余弦波信号の最大値検出処理及び最小値検出処理の一例を示すフローチャートである。FIG. 22 is a flowchart illustrating an example of the maximum value detection process and the minimum value detection process of the first sine wave signal and the first cosine wave signal. 図23は、第3正弦波信号及び第3余弦波信号の最大値検出処理及び最小値検出処理の一例を示すフローチャートである。FIG. 23 is a flowchart illustrating an example of the maximum value detection process and the minimum value detection process of the third sine wave signal and the third cosine wave signal. 図24は、位置検出センサのみを2つ設けた構成例を示す図である。FIG. 24 is a diagram illustrating a configuration example in which only two position detection sensors are provided. 図25は、モータ、位置検出センサ、及び位置検出部をそれぞれ2つ設けた構成例を示す図である。FIG. 25 is a diagram illustrating a configuration example in which two motors, two position detection sensors, and two position detection units are provided. 図26は、実施形態に係る回転角検出装置の故障判定処理手順の一例を示すフローチャートである。FIG. 26 is a flowchart illustrating an example of a failure determination processing procedure of the rotation angle detection device according to the embodiment. 図27は、異常検出処理の一例を示すフローチャートである。FIG. 27 is a flowchart illustrating an example of the abnormality detection process.

以下、発明を実施するための形態(以下、実施形態という)につき図面を参照しつつ詳細に説明する。なお、下記の実施形態により本発明が限定されるものではない。また、下記実施形態における構成要素には、当業者が容易に想定できるもの、実質的に同一のもの、いわゆる均等の範囲のものが含まれる。さらに、下記実施形態で開示した構成要素は適宜組み合わせることが可能である。   DESCRIPTION OF EMBODIMENTS Hereinafter, modes for carrying out the invention (hereinafter referred to as embodiments) will be described in detail with reference to the drawings. In addition, this invention is not limited by the following embodiment. In addition, constituent elements in the following embodiments include those that can be easily assumed by those skilled in the art, those that are substantially the same, and those in a so-called equivalent range. Furthermore, the constituent elements disclosed in the following embodiments can be appropriately combined.

図1は、実施形態に係る電動パワーステアリング装置の構成を示す図である。電動パワーステアリング装置100は、車両のステアリング機構に補助操舵力を付与するモータ20を有し、ステアリング機構に対する操舵トルクと車速とを少なくとも用いて演算した操舵補助指令値に基づき、モータ20を駆動制御する。   FIG. 1 is a diagram illustrating a configuration of an electric power steering apparatus according to an embodiment. The electric power steering apparatus 100 includes a motor 20 that applies an auxiliary steering force to the steering mechanism of the vehicle, and drives and controls the motor 20 based on a steering auxiliary command value calculated using at least a steering torque and a vehicle speed for the steering mechanism. To do.

このように、電動パワーステアリング装置100は、車両に搭載されて、車両の運転者によるハンドルホイール1(以下、「ステアリング」ともいう)の操作を補助するものである。ハンドルホイール1のコラム軸2は、減速ギヤ3、ユニバーサルジョイント4a、4b、ラックアンドピニオン機構5を介して、操舵輪のタイロッド6に連結されている。コラム軸2には、ハンドルホイール1の操舵トルクTを検出するトルクセンサ10が設けられている。また、コラム軸2には減速ギヤ3が取り付けられている。減速ギヤ3は、モータ20の発生するトルクを増加させてコラム軸2へ伝達する。このような構造によって、モータ20が発生するトルクにより、ハンドルホイール1の操舵力が補助される。   Thus, the electric power steering apparatus 100 is mounted on a vehicle and assists the operation of the handle wheel 1 (hereinafter also referred to as “steering”) by the driver of the vehicle. A column shaft 2 of the handle wheel 1 is connected to a tie rod 6 of a steered wheel via a reduction gear 3, universal joints 4a and 4b, and a rack and pinion mechanism 5. The column shaft 2 is provided with a torque sensor 10 that detects the steering torque T of the handle wheel 1. A reduction gear 3 is attached to the column shaft 2. The reduction gear 3 increases the torque generated by the motor 20 and transmits it to the column shaft 2. With such a structure, the steering force of the handle wheel 1 is assisted by the torque generated by the motor 20.

本実施形態において、電動パワーステアリング装置100は、コラム軸2にモータ20のトルクを伝達するコラムアシスト型の装置である。   In the present embodiment, the electric power steering apparatus 100 is a column assist type apparatus that transmits the torque of the motor 20 to the column shaft 2.

モータ20は、例えば、ブラシレスモータである。電動パワーステアリング装置100を制御するECU(Electronic Control Unit、以下コントロールユニットという)30は、自身に内蔵された電源リレー13を介してバッテリ14から電力の供給を受けるとともに、イグニッションスイッチ11から送信されたイグニッション信号を受信する。また、コントロールユニット30は、トルクセンサ10で検出された操舵トルクTと車速センサ12で検出された車両速度(車速)Vとに基づいて、モータ20の電流指令値を演算する。コントロールユニット30は、モータ20に供給される電流の値(電流検出値)と電流指令値とに基づいて、モータ20の電流検出値が電流指令値に追従するようにモータ20を駆動制御する。このように、コントロールユニット30は、電動パワーステアリング装置100を制御する装置(電動パワーステアリング装置の制御装置)である。   The motor 20 is, for example, a brushless motor. An ECU (Electronic Control Unit, hereinafter referred to as a control unit) 30 that controls the electric power steering apparatus 100 is supplied with electric power from the battery 14 via a power supply relay 13 incorporated therein, and is transmitted from the ignition switch 11. Receive the ignition signal. Further, the control unit 30 calculates a current command value of the motor 20 based on the steering torque T detected by the torque sensor 10 and the vehicle speed (vehicle speed) V detected by the vehicle speed sensor 12. The control unit 30 drives and controls the motor 20 so that the current detection value of the motor 20 follows the current command value based on the value of the current (current detection value) supplied to the motor 20 and the current command value. Thus, the control unit 30 is a device that controls the electric power steering device 100 (a control device for the electric power steering device).

図2は、実施形態に係る電動パワーステアリング装置を制御するコントロールユニットのハードウェア構成を示す模式図である。コントロールユニット30は、図2に示すように、電源リレー13と、制御用コンピュータ(MCU)110と、モータ駆動回路15と、モータ電流検出回路16と、位置検出部17等とを備えている。電動パワーステアリング装置100の制御用コンピュータ110は、CPU(Central Processing Unit)101、第1記憶装置としてのRAM(Random Access Memory)102、第2記憶装置としてのROM(Read Only Memory)103、EEPROM(Electrically Erasable Programmable ROM)104、インターフェース(I/F)105、A/D(Analog/Digital)変換器106、PWM(Pulse Width Modulation)コントローラ107等を備え、これらがバス108に接続されている。CPU101は処理装置に相当し、ROM103に記憶された電動パワーステアリング装置100の制御用コンピュータプログラム(以下、制御プログラムという)を実行して、電動パワーステアリング装置100を制御する。   FIG. 2 is a schematic diagram illustrating a hardware configuration of a control unit that controls the electric power steering apparatus according to the embodiment. As shown in FIG. 2, the control unit 30 includes a power relay 13, a control computer (MCU) 110, a motor drive circuit 15, a motor current detection circuit 16, a position detection unit 17, and the like. A control computer 110 of the electric power steering apparatus 100 includes a CPU (Central Processing Unit) 101, a RAM (Random Access Memory) 102 as a first storage device, a ROM (Read Only Memory) 103 as a second storage device, an EEPROM ( An Electrically Erasable Programmable ROM (ROM) 104, an interface (I / F) 105, an A / D (Analog / Digital) converter 106, a PWM (Pulse Width Modulation) controller 107, and the like are provided, and these are connected to a bus 108. The CPU 101 corresponds to a processing device, and controls the electric power steering device 100 by executing a computer program for control of the electric power steering device 100 (hereinafter referred to as a control program) stored in the ROM 103.

ROM103は、制御プログラム及び電動パワーステアリング装置100の制御に用いるデータを記憶する。また、RAM102は、制御プログラムを動作させるためのワークメモリとして使用される。EEPROM104は、制御プログラムが入出力する制御データ等を記憶する。制御データは、コントロールユニット30に電源が投入された後にRAM102に展開された制御プログラム上で使用され、所定のタイミングでEEPROM104に上書きされる。   The ROM 103 stores a control program and data used for control of the electric power steering apparatus 100. The RAM 102 is used as a work memory for operating the control program. The EEPROM 104 stores control data and the like input / output by the control program. The control data is used on the control program developed in the RAM 102 after the control unit 30 is turned on, and is overwritten in the EEPROM 104 at a predetermined timing.

ROM103、RAM102及びEEPROM104等は、情報を記憶する記憶装置であって、CPU101が直接アクセスできる記憶装置(一次記憶装置)である。   The ROM 103, the RAM 102, the EEPROM 104, and the like are storage devices that store information, and are storage devices (primary storage devices) that can be directly accessed by the CPU 101.

本実施形態において、EEPROM104は、後述する回転角検出処理における各種データの初期値を記憶する第1記憶部として機能する。   In the present embodiment, the EEPROM 104 functions as a first storage unit that stores initial values of various data in a rotation angle detection process described later.

また、本実施形態において、RAM102は、後述する回転角検出処理における各種データの更新値を記憶する第2記憶部として機能する。   Moreover, in this embodiment, RAM102 functions as a 2nd memory | storage part which memorize | stores the update value of the various data in the rotation angle detection process mentioned later.

A/D変換器106は、コントロールユニット30への各入力値をディジタル信号に変換する。インターフェース105は、CAN(Controller Area Network)等の車載ネットワークに接続されている。インターフェース105は、車速センサ12からの車速Vの信号(車速パルス)を受け付けるためのものである。   The A / D converter 106 converts each input value to the control unit 30 into a digital signal. The interface 105 is connected to an in-vehicle network such as a CAN (Controller Area Network). The interface 105 is for receiving a vehicle speed V signal (vehicle speed pulse) from the vehicle speed sensor 12.

PWMコントローラ107は、モータ20に対する電流指令値に基づいてUVW各相のPWM制御信号を出力する。モータ駆動回路15は、インバータ回路等により構成され、PWMコントローラ107から出力された信号に基づいてモータ20を駆動する。モータ電流検出回路16は、モータ20に供給される電流Imを検出してA/D変換器106に出力する。   The PWM controller 107 outputs a PWM control signal for each phase of UVW based on the current command value for the motor 20. The motor drive circuit 15 is configured by an inverter circuit or the like, and drives the motor 20 based on a signal output from the PWM controller 107. The motor current detection circuit 16 detects the current Im supplied to the motor 20 and outputs it to the A / D converter 106.

位置検出部17は、位置検出センサ25から出力される位置検出信号を読み取り、モータ20の回転角θ又は電気角θを出力する。本実施形態では、位置検出部17において、位置検出センサ25から出力される位置検出信号を補正し、補正後の信号に基づき、回転角検出処理を行う。なお、位置検出部17は、回路で構成される態様であっても良いし、図2に示す制御用コンピュータ110、より具体的にはCPU101によって実現される態様であっても良い。位置検出センサ25及び位置検出部17における位置検出信号の補正手法の詳細については後述する。 The position detection unit 17 reads the position detection signal output from the position detection sensor 25 and outputs the rotation angle θ 1 or the electrical angle θ 2 of the motor 20. In the present embodiment, the position detection unit 17 corrects the position detection signal output from the position detection sensor 25, and performs rotation angle detection processing based on the corrected signal. The position detection unit 17 may be configured by a circuit, or may be realized by the control computer 110 illustrated in FIG. 2, more specifically, the CPU 101. Details of the correction method of the position detection signal in the position detection sensor 25 and the position detection unit 17 will be described later.

図3は、実施形態に係る電動パワーステアリング装置を制御するコントロールユニットの機能的な構成を示す機能ブロック図である。図3を用いて、電動パワーステアリング装置100の制御を説明する。図3に示すように、コントロールユニット30は、アシスト機能部31を有する。   FIG. 3 is a functional block diagram illustrating a functional configuration of a control unit that controls the electric power steering apparatus according to the embodiment. The control of the electric power steering apparatus 100 will be described with reference to FIG. As shown in FIG. 3, the control unit 30 has an assist function unit 31.

アシスト機能部31は、電流指令値算出部31a、電流制御部31bを有する。電流指令値算出部31aは、操舵トルクT及び車速Vに対応した電流指令値Iを算出する。電流制御部31bは、位置検出部17から出力されるモータ20の電気角θに基づき、電流指令値Iと電流Imとの偏差が0に近づくように、比例制御と微分制御と積分制御とのうち少なくとも一つを実行し、電流指令値Iに近づくように制御された電流Imが生成されるように、モータ駆動回路15のゲート駆動信号のデューティ比Dを演算する。モータ駆動回路15は、電流制御部31bが演算したデューティ比DにしたがってPWM制御された電流をモータ20に出力する。モータ電流検出回路16は、モータ20に流れる電流Imを検出する。 The assist function unit 31 includes a current command value calculation unit 31a and a current control unit 31b. The current command value calculation unit 31a calculates a current command value I corresponding to the steering torque T and the vehicle speed V. The current control unit 31b, based on the electrical angle theta 2 of the motor 20 output from the position detection unit 17, so that the deviation between the current command value I and the current Im approaches 0, the integral control and derivative control and proportional control The duty ratio D of the gate drive signal of the motor drive circuit 15 is calculated so that the current Im controlled to approach the current command value I is generated. The motor drive circuit 15 outputs to the motor 20 a current subjected to PWM control according to the duty ratio D calculated by the current control unit 31b. The motor current detection circuit 16 detects the current Im flowing through the motor 20.

図3に示すアシスト機能部31は、図2に示す制御用コンピュータ110、より具体的にはCPU101によって実現される。位置検出部17については後述する。   The assist function unit 31 illustrated in FIG. 3 is realized by the control computer 110 illustrated in FIG. 2, more specifically, the CPU 101. The position detection unit 17 will be described later.

図4は、実施形態における位置検出センサの概略図である。本実施形態において、位置検出センサ25は、図4に示すように、モータシャフト(回転軸)20aの端部に設けられたN極及びS極からなる1極の回転磁石251と、この回転磁石251から軸方向(モータシャフト(回転軸)20aの軸心X方向)に所定間隔の空隙を介して配置されたMRセンサ252と、を備えている。   FIG. 4 is a schematic diagram of a position detection sensor in the embodiment. In the present embodiment, as shown in FIG. 4, the position detection sensor 25 includes a one-pole rotating magnet 251 having N and S poles provided at an end of a motor shaft (rotating shaft) 20 a, and the rotating magnet. And an MR sensor 252 that is disposed in the axial direction (in the direction of the axial center X of the motor shaft (rotating shaft) 20a) from 251 via a gap having a predetermined interval.

MRセンサ252は、MR(Magneto Resistance)素子(磁気抵抗素子)を用いて構成される。MRセンサ252としては、トンネル磁気抵抗効果(Tunnel Magneto Resistance Effect)を利用したTMRセンサが例示される。MRセンサ252は、TMRセンサの他、AMR(Anisotropic Magneto Resistive)センサやGMR(Giant Magnetoresistance Effect)センサであっても良い。MRセンサ252の種類により本開示が限定されるものではない。   The MR sensor 252 is configured using an MR (Magneto Resistance) element (magnetoresistance element). An example of the MR sensor 252 is a TMR sensor using a tunnel magnetoresistance effect (Tunnel Magneto Resistance Effect). In addition to the TMR sensor, the MR sensor 252 may be an AMR (Anisotropic Magneto Resistive) sensor or a GMR (Giant Magnetoresistive Effect) sensor. The present disclosure is not limited by the type of the MR sensor 252.

MRセンサ252は、回転磁石251がモータシャフト(回転軸)20aと共にモータシャフト(回転軸)20aの軸心Xを中心として回転することで生じる磁場の変化に応じた位置検出信号を出力する。   The MR sensor 252 outputs a position detection signal corresponding to a change in the magnetic field generated when the rotating magnet 251 rotates together with the motor shaft (rotating shaft) 20a about the axis X of the motor shaft (rotating shaft) 20a.

本実施形態において、MRセンサ252は、位置検出信号として、アナログ信号である差動正弦波信号及び差動余弦波信号を出力する。差動正弦波信号は、正相正弦波信号Sinθ+と、この正相正弦波信号Sinθ+を位相反転した逆相正弦波信号Sinθ−とを含む。差動余弦波信号は、正相余弦波信号Cosθ+と、この正相余弦波信号Cosθ+を位相反転した逆相余弦波信号Cosθ−とを含む。 In the present embodiment, the MR sensor 252 outputs a differential sine wave signal and a differential cosine wave signal, which are analog signals, as position detection signals. Differential sinusoidal signal, a positive-phase sine wave signal sin [theta 1 +, the positive phase sine wave signal sin [theta 1 + phase inverted reverse-phase sine wave signal sin [theta 1 - and a. Differential cosine wave signal, the positive-phase cosine wave signal Cos? 1 +, the positive phase cosine wave signal Cos? 1 + phase inverted reverse-phase cosine wave signal Cos? 1 - and a.

図5は、位置検出信号及び位相角の関係を示す図である。図5に示す(a)は、正相正弦波信号Sinθ+の理想的な波形を示し、図5に示す(b)は、逆相正弦波信号Sinθ−の理想的な波形を示している。また、図5に示す(c)は、正相余弦波信号Cosθ+の理想的な波形を示し、図5に示す(d)は、逆相余弦波信号Cosθ−の理想的な波形を示している。また、図5に示す(e)は、モータ20の回転角(機械角)θを示している。 FIG. 5 is a diagram illustrating the relationship between the position detection signal and the phase angle. 5A shows an ideal waveform of the positive-phase sine wave signal Sinθ 1 +, and FIG. 5B shows an ideal waveform of the negative-phase sine wave signal Sinθ 1 −. Yes. Further, (c) shown in FIG. 5 shows an ideal waveform of the positive phase cosine wave signal Cosθ 1 +, and (d) shown in FIG. 5 shows an ideal waveform of the negative phase cosine wave signal Cosθ 1 −. Show. Further, (e) shown in FIG. 5 shows the rotation angle (mechanical angle) θ 1 of the motor 20.

図5に示すように、本実施形態では、回転磁石251の磁極数が1であるので、モータ20の回転角(機械角)θの1周期Tmと、MRセンサ252の電気角の1周期Teとが一致する。すなわち、図4に示すMRセンサ252は、モータ20の回転角(機械角)θの1周期Tmにおいて、MRセンサ252の電気角の1周期Teを検出する。なお、位置検出センサ25は、差動正弦波信号及び差動余弦波信号を出力可能な構成であれば、上述した構成に限るものではなく、例えば、モータ20の回転角(機械角)θの1周期Tmに対し、電気角で複数周期分の差動正弦波信号及び差動余弦波信号を出力可能な構成であっても良い。 As shown in FIG. 5, in this embodiment, since the number of magnetic poles of the rotating magnet 251 is 1, one cycle Tm of the rotation angle (mechanical angle) θ 1 of the motor 20 and one cycle of the electrical angle of the MR sensor 252. Te matches. That is, the MR sensor 252 shown in FIG. 4 detects one cycle Te of the electrical angle of the MR sensor 252 in one cycle Tm of the rotation angle (mechanical angle) θ 1 of the motor 20. The position detection sensor 25 is not limited to the above-described configuration as long as it can output a differential sine wave signal and a differential cosine wave signal. For example, the rotation angle (mechanical angle) θ 1 of the motor 20 is not limited thereto. For one period Tm, a differential sine wave signal and a differential cosine wave signal for a plurality of periods in electrical angle may be output.

図6は、3相ブラシレスモータにおいて、位置検出部によって検出された電気角を用いて、3相ブラシレスモータのU相電流、V相電流、及びW相電流を制御しているときのモータ制御電流と電気角との関係を示す図である。   FIG. 6 shows the motor control current when the U-phase current, V-phase current, and W-phase current of the three-phase brushless motor are controlled in the three-phase brushless motor using the electrical angle detected by the position detector. It is a figure which shows the relationship between an electrical angle.

図6に示すように、3相ブラシレスモータのU相電流、V相電流、及びW相電流は、互いに120度位相のずれた波形となる。   As shown in FIG. 6, the U-phase current, V-phase current, and W-phase current of the three-phase brushless motor have waveforms that are 120 degrees out of phase with each other.

アシスト機能部31の電流制御部31bは、位置検出部17によって検出されたモータ20の電気角を用いて、モータ20の電流制御を行う。図6に示す例では、電気角の0[deg]を電流制御開始位置とし、U相の位相が0[deg]となるように制御する例を示している。   The current control unit 31 b of the assist function unit 31 performs current control of the motor 20 using the electrical angle of the motor 20 detected by the position detection unit 17. In the example shown in FIG. 6, an example is shown in which control is performed so that the electric angle 0 [deg] is the current control start position and the phase of the U phase is 0 [deg].

モータ20の電流制御では、モータ20の磁極対毎に、電気角が必要となる。モータ20の磁極対数が4である場合、位置検出部17は、モータ20の回転角を、モータ20の磁極対数に対応する電気角に分割して、アシスト機能部31の電流制御部31bに出力する。   In the current control of the motor 20, an electrical angle is required for each magnetic pole pair of the motor 20. When the number of magnetic pole pairs of the motor 20 is 4, the position detection unit 17 divides the rotation angle of the motor 20 into electrical angles corresponding to the number of magnetic pole pairs of the motor 20, and outputs the electric angle to the current control unit 31b of the assist function unit 31. To do.

図7は、実施形態に係る回転角検出装置の概略ブロック構成の一例を示す図である。図7に示すように、実施形態に係る回転角検出装置200は、位置検出センサ25と、位置検出部17とを含む。   FIG. 7 is a diagram illustrating an example of a schematic block configuration of the rotation angle detection device according to the embodiment. As illustrated in FIG. 7, the rotation angle detection device 200 according to the embodiment includes a position detection sensor 25 and a position detection unit 17.

図7に示すように、本実施形態において、位置検出部17は、差分演算部171と、第1ゲイン補正部172と、第2ゲイン補正部173と、角度算出部174と、を備えている。   As shown in FIG. 7, in the present embodiment, the position detection unit 17 includes a difference calculation unit 171, a first gain correction unit 172, a second gain correction unit 173, and an angle calculation unit 174. .

差分演算部171は、正弦波差分演算部1711と、余弦波差分演算部1712と、を備えている。   The difference calculation unit 171 includes a sine wave difference calculation unit 1711 and a cosine wave difference calculation unit 1712.

正弦波差分演算部1711は、正相正弦波信号Sinθ+と逆相正弦波信号Sinθ−との差分を演算して、第1正弦波信号Sinθ1fを出力する。また、正弦波差分演算部1711は、後述する正相正弦波信号入力値異常検知フラグERR1−1、逆相正弦波信号入力値異常検知フラグERR1−2、及び正弦波信号オフセット電圧値異常検知フラグERR3−1をセット又はリセットする機能を有している。 The sine wave difference calculation unit 1711 calculates a difference between the positive phase sine wave signal Sinθ 1 + and the negative phase sine wave signal Sinθ 1 −, and outputs a first sine wave signal Sinθ 1f . Further, the sine wave difference calculation unit 1711 includes a later-described normal phase sine wave signal input value abnormality detection flag ERR1-1, a negative phase sine wave signal input value abnormality detection flag ERR1-2, and a sine wave signal offset voltage value abnormality detection flag. It has a function of setting or resetting ERR3-1.

余弦波差分演算部1712は、正相余弦波信号Cosθ+と逆相余弦波信号Cosθ−との差分を演算して、第1余弦波信号Cosθ1fを出力する。また、余弦波差分演算部1712は、後述する正相余弦波信号入力値異常検知フラグERR2−1、逆相余弦波信号入力値異常検知フラグERR2−2、及び余弦波信号オフセット電圧値異常検知フラグERR3−2をセット又はリセットする機能を有している。 The cosine wave difference calculation unit 1712 calculates a difference between the positive phase cosine wave signal Cosθ 1 + and the negative phase cosine wave signal Cosθ 1 −, and outputs a first cosine wave signal Cosθ 1f . Further, the cosine wave difference calculation unit 1712 includes a positive phase cosine wave signal input value abnormality detection flag ERR2-1, a negative phase cosine wave signal input value abnormality detection flag ERR2-2, and a cosine wave signal offset voltage value abnormality detection flag which will be described later. It has a function of setting or resetting ERR3-2.

差分演算部171には、アナログ信号である差動正弦波信号及び差動余弦波信号がサンプリング処理されてA/D変換された離散値の差動正弦波信号及び差動余弦波信号が入力される。   The differential operation unit 171 receives the differential differential sine wave signal and differential cosine wave signal, which are analog signals and are subjected to A / D conversion by sampling the differential sine wave signal and differential cosine wave signal which are analog signals. The

図8は、差動演算部の等価ブロックの一例を示す図である。図9は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第1図である。図10は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第2図である。図11は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第3図である。図12は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第4図である。   FIG. 8 is a diagram illustrating an example of an equivalent block of the differential operation unit. FIG. 9 is a first diagram illustrating a difference calculation concept in the equivalent block shown in FIG. 8 of the differential calculation unit. FIG. 10 is a second diagram for explaining the concept of difference calculation in the equivalent block shown in FIG. 8 of the differential operation unit. FIG. 11 is a third diagram for explaining the concept of difference calculation in the equivalent block shown in FIG. 8 of the differential operation unit. FIG. 12 is a fourth diagram illustrating a difference calculation concept in the equivalent block shown in FIG. 8 of the differential calculation unit.

図9に示すように、差動正弦波信号である正相正弦波信号Sinθ+及び逆相正弦波信号Sinθ−には、正弦波信号オフセット電圧DifSin1が重畳している。また、図10に示すように、差動余弦波信号である正相余弦波信号Cosθ+及び逆相余弦波信号Cosθ−には、余弦波信号オフセット電圧DifCos1が重畳している。 As shown in FIG. 9, the positive phase sine wave signal which is a differential sinusoidal signal sin [theta 1 + and the negative phase sine wave signal sin [theta 1 -, the sinusoidal signal offset voltage Dif Sin1 superimposed. Further, as shown in FIG. 10, a cosine wave signal offset voltage Dif Cos1 is superimposed on the positive phase cosine wave signal Cosθ 1 + and the negative phase cosine wave signal Cosθ 1 − which are differential cosine wave signals.

正弦波信号オフセット電圧DifSin1は、下記(1)式に示すように、正相正弦波信号Sinθ+と逆相正弦波信号Sinθ−とを加算した値の半値で表される。 Sinusoidal signal offset voltage Dif Sin1, as shown in the following equation (1), positive-phase sine wave signal sin [theta 1 + and the negative-phase sine wave signal sin [theta 1 - is represented by the half of the value obtained by adding the.

(DifSin1)=((Sinθ+)+(Sinθ−))/2・・・(1) (Dif Sin1) = ((Sinθ 1 +) + (Sinθ 1 -)) / 2 ··· (1)

一方、正弦波信号オフセット電圧DifSin1を減算した正相正弦波信号Sinθ1d+は、以下の(2)式で表せ、正弦波信号オフセット電圧DifSin1を減算した逆相正弦波信号Sinθ1d−は、以下の(3)式で表せる。 On the other hand, the positive phase sine wave signals obtained by subtracting the sine wave signal offset voltage Dif Sin1 Sinθ 1d +, the following (2) expressed by the formula, a sinusoidal signal offset voltage Dif Sin1 reversed-phase sine wave signal sin [theta 1d obtained by subtracting the - is It can be expressed by the following equation (3).

(Sinθ1d+)=(Sinθ+)−DifSin1・・・(2) (Sinθ 1d +) = (Sinθ 1 +) - Dif Sin1 ··· (2)

(Sinθ1d−)=(Sinθ−)−DifSin1・・・(3) (Sinθ 1d -) = (Sinθ 1 -) - Dif Sin1 ··· (3)

上記(1)式を(2)式及び(3)式に代入すると、以下の(4)式及び(5)式が得られる。   Substituting the above expression (1) into the expressions (2) and (3), the following expressions (4) and (5) are obtained.

(Sinθ1d+)=(Sinθ+)/2−(Sinθ−)/2・・・(4) (Sinθ 1d +) = (Sinθ 1 +) / 2− (Sinθ 1 −) / 2 (4)

(Sinθ1d−)=−((Sinθ+)/2−(Sinθ−)/2)・・・(5) (Sinθ 1d −) = − ((Sinθ 1 +) / 2− (Sinθ 1 −) / 2) (5)

正相正弦波信号Sinθ1d+を基準として、第1正弦波信号Sinθ1f=(Sinθ1d+)=(−(Sinθ1d−))とし、上記(4)式から(5)式を減算すると、以下の(6)式が得られる。 Based on the positive phase sine wave signal Sinθ 1d +, the first sine wave signal Sinθ 1f = (Sinθ 1d +) = (− (Sinθ 1d −)), and subtracting equation (5) from equation (4) above, The following equation (6) is obtained.

(Sinθ1f)×2=(Sinθ+)−(Sinθ−)・・・(6) (Sinθ 1f ) × 2 = (Sinθ 1 +) − (Sinθ 1 −) (6)

また、余弦波信号オフセット電圧DifCos1は、下記(7)式に示すように、正相余弦波信号Cosθ+と逆相余弦波信号Cosθ−とを加算した値の半値で表される。 Further, the cosine wave signal offset voltage Dif Cos1 is expressed by a half value of a value obtained by adding the positive phase cosine wave signal Cosθ 1 + and the negative phase cosine wave signal Cosθ 1 − as shown in the following equation (7).

(DifCos1)=((Cosθ+)+(Cosθ−))/2・・・(7) (Dif Cos1 ) = ((Cosθ 1 +) + (Cosθ 1 −)) / 2 (7)

一方、余弦波信号オフセット電圧DifCos1を減算した正相余弦波信号Cosθ1d+は、以下の(8)式で表せ、余弦波信号オフセット電圧DifCos1を減算した逆相余弦波信号Cosθ1d−は、以下の(9)式で表せる。 On the other hand, the positive phase cosine wave signal Cos? 1d obtained by subtracting the cosine wave signal offset voltage Dif Cos 1 +, the following (8) expressed by the formula, the cosine wave signal offset voltage Dif Cos 1 reverse-phase cosine wave signal Cos? 1d obtained by subtracting the - is It can be expressed by the following equation (9).

(Cosθ1d+)=(Cosθ+)−DifCos1・・・(8) (Cosθ 1d +) = (Cosθ 1 +) − Dif Cos1 (8)

(Cosθ1d−)=(Cosθ−)−DifCos1・・・(9) (Cos θ 1d −) = (Cos θ 1 −) − Dif Cos 1 (9)

上記(7)式を(8)式及び(9)式に代入すると、以下の(10)式及び(11)式が得られる。   Substituting the above equation (7) into equations (8) and (9), the following equations (10) and (11) are obtained.

(Cosθ1d+)=(Cosθ+)/2−(Cosθ−)/2・・・(10) (Cos θ 1d +) = (Cos θ 1 +) / 2− (Cos θ 1 −) / 2 (10)

(Cosθ1d−)=−((Cosθ+)/2−(Cosθ−)/2)・・・(11) (Cos θ 1d −) = − ((Cos θ 1 +) / 2− (Cos θ 1 −) / 2) (11)

正相余弦波信号Cosθ1d+を基準として、第1余弦波信号Cosθ1f=(Cosθ1d+)=(−(Cosθ1d−))とし、上記(10)式から(11)式を減算すると、以下の(12)式が得られる。 The first cosine wave signal Cosθ 1f = (Cosθ 1d +) = (− (Cosθ 1d −)) with the positive phase cosine wave signal Cosθ 1d + as a reference, and subtracting the equation (11) from the above equation (10), The following equation (12) is obtained.

(Cosθ1f)×2=(Cosθ+)−(Cosθ−)・・・(12) (Cos θ 1f ) × 2 = (Cos θ 1 +) − (Cos θ 1 −) (12)

本実施形態では、差動正弦波信号及び差動余弦波信号をサンプリング処理する際に、差動正弦波信号である正相正弦波信号Sinθ+及び逆相正弦波信号Sinθ−、差動余弦波信号である正相余弦波信号Cosθ+及び逆相余弦波信号Cosθ−をそれぞれ2倍の分解能で取得する。これにより、下記(6’)式を用いて、正相正弦波信号Sinθ+から逆相正弦波信号Sinθ−を減算することで、第1正弦波信号Sinθ1fが得られる(図11参照)。また、下記(12’)式を用いて、正相余弦波信号Cosθ+から逆相余弦波信号Cosθ−を減算することで、第1余弦波信号Cosθ1fが得られる(図12参照)。 In the present embodiment, when the differential sine wave signal and the differential cosine wave signal are sampled, the positive phase sine wave signal Sinθ 1 + and the negative phase sine wave signal Sinθ 1 −, which are differential sine wave signals, and differential positive phase cosine wave signal Cos? 1 + and the negative phase cosine wave signal is a cosine wave signal Cos? 1 - to get on each double resolution. Accordingly, the first sine wave signal Sinθ 1f is obtained by subtracting the negative phase sine wave signal Sinθ 1 − from the normal phase sine wave signal Sinθ 1 + using the following equation (6 ′) (see FIG. 11). ). Further, the first cosine wave signal Cosθ 1f is obtained by subtracting the negative phase cosine wave signal Cosθ 1 − from the positive phase cosine wave signal Cosθ 1 + using the following equation (12 ′) (see FIG. 12). .

Sinθ1f=(Sinθ+)−(Sinθ−)・・・(6’) Sinθ 1f = (Sinθ 1 +) − (Sinθ 1 −) (6 ′)

Cosθ1f=(Cosθ+)−(Cosθ−)・・・(12’) Cos θ 1f = (Cos θ 1 +) − (Cos θ 1 −) (12 ′)

これにより、中点がゼロ電位、すなわち、オフセット電圧が除去された第1正弦波信号Sinθ1f及び第1余弦波信号Cosθ1fが得られる。 Thus, zero potential midpoint, i.e., the first sine-wave signal sin [theta 1f and the first cosine wave signal Cos? 1f the offset voltage is removed can be obtained.

また、正弦波差分演算部1711は、正相正弦波信号Sinθ+の入力値異常を検出する。 The sine wave difference calculation unit 1711 detects an input value abnormality of the positive phase sine wave signal Sinθ 1 +.

具体的に、正弦波差分演算部1711は、例えば、正相正弦波信号Sinθ+の値がアナログ値換算で下限閾値(例えば、0.3V)以上、且つ、上限閾値(例えば、4.7V)以下の範囲内であれば正常と判定し、正相正弦波信号Sinθ+の値がアナログ値換算で下限閾値未満であるか、又は、上限閾値よりも大きい場合には、正相正弦波信号Sinθ+の入力値異常と判定する。正弦波差分演算部1711は、正相正弦波信号Sinθ+の入力値異常を検知した場合に、正相正弦波信号入力値異常検知フラグERR1−1をセットする。 Specifically, the sine wave difference calculation unit 1711 has, for example, a value of the positive phase sine wave signal Sinθ 1 + equal to or higher than a lower limit threshold (eg, 0.3 V) in terms of an analog value and an upper limit threshold (eg, 4.7 V). ) If it is within the following range, it is determined to be normal, and if the value of the positive phase sine wave signal Sinθ 1 + is less than the lower limit threshold in terms of analog value or larger than the upper limit threshold, the positive phase sine wave It is determined that the input value of the signal Sinθ 1 + is abnormal. When the sine wave difference calculation unit 1711 detects an input value abnormality of the positive phase sine wave signal Sinθ 1 +, the positive phase sine wave signal input value abnormality detection flag ERR1-1 is set.

また、正弦波差分演算部1711は、逆相正弦波信号Sinθ−の入力値異常を検出する。 Further, the sine wave difference calculation unit 1711 detects an input value abnormality of the negative-phase sine wave signal Sinθ 1 −.

具体的に、正弦波差分演算部1711は、例えば、逆相正弦波信号Sinθ−の値がアナログ値換算で下限閾値(例えば、0.3V)以上、且つ、上限閾値(例えば、4.7V)以下の範囲内であれば正常と判定し、逆相正弦波信号Sinθ−の値がアナログ値換算で下限閾値未満であるか、又は、上限閾値よりも大きい場合には、逆相正弦波信号Sinθ−の入力値異常と判定する。正弦波差分演算部1711は、逆相正弦波信号Sinθ−の入力値異常を検知した場合に、逆相正弦波信号入力値異常検知フラグERR1−2をセットする。 Specifically, the sine wave difference calculation unit 1711 has, for example, the value of the anti-phase sine wave signal Sinθ 1 − equal to or higher than a lower limit threshold (eg, 0.3 V) in terms of analog value and an upper limit threshold (eg, 4.7 V). ) If it is within the following range, it is determined to be normal, and if the value of the anti-phase sine wave signal Sinθ 1 − is less than the lower limit threshold in terms of analog value or greater than the upper limit threshold, the anti-phase sine wave It is determined that the input value of the signal Sinθ 1 − is abnormal. When the sine wave difference calculation unit 1711 detects an input value abnormality of the negative phase sine wave signal Sinθ 1 −, the negative phase sine wave signal input value abnormality detection flag ERR1-2 is set.

また、正弦波差分演算部1711は、上記(1)式によって算出される正弦波信号オフセット電圧DifSin1の異常を検出する。 Further, sine wave difference calculation unit 1711 detects the abnormality of the sinusoidal signal offset voltage Dif Sin1 calculated by the above equation (1).

具体的に、正弦波差分演算部1711は、例えば、正弦波信号オフセット電圧DifSin1の値がアナログ値換算で5Vの中点理論値2.5Vに対し、下限閾値(例えば、2.3V)以上、且つ、上限閾値(例えば、2.7V)以下の範囲内であれば正常と判定し、正弦波信号オフセット電圧DifSin1の値がアナログ値換算で下限閾値未満であるか、又は、上限閾値よりも大きい場合には、正弦波信号オフセット電圧DifSin1のオフセット電圧値異常と判定する。正弦波差分演算部1711は、正弦波信号オフセット電圧DifSin1のオフセット電圧値異常を検知した場合に、正弦波信号オフセット電圧値異常検知フラグERR3−1をセットする。 Specifically, sinusoidal difference calculation unit 1711, for example, the value of the sine wave signal offset voltage Dif Sin1 Whereas midpoint theoretical 2.5V to 5V in analog value terms, the lower threshold (e.g., 2.3V) or more and the upper limit threshold (e.g., 2.7V) as long as it is within the range below were determined to be normal, if the value of the sine wave signal offset voltage Dif Sin1 is less than the lower threshold for an analog value terms, or, than the upper threshold value If also large, it is determined that the offset voltage abnormalities of the sinusoidal signal offset voltage Dif Sin1. Sinusoidal difference calculation unit 1711, when detecting the offset voltage abnormalities of the sinusoidal signal offset voltage Dif Sin1, sets the sine wave signal offset voltage abnormality detection flag ERR3-1.

また、余弦波差分演算部1712は、正相余弦波信号Cosθ+の入力値異常を検出する。 Further, the cosine wave difference calculation unit 1712 detects an input value abnormality of the positive phase cosine wave signal Cosθ 1 +.

具体的に、余弦波差分演算部1712は、例えば、正相余弦波信号Cosθ+の値がアナログ値換算で下限閾値(例えば、0.3V)以上、且つ、上限閾値(例えば、4.7V)以下の範囲内であれば正常と判定し、正相余弦波信号Cosθ+の値がアナログ値換算で下限閾値未満であるか、又は、上限閾値よりも大きい場合には、正相余弦波信号Cosθ+の入力値異常と判定する。余弦波差分演算部1712は、正相余弦波信号Cosθ+の入力値異常を検知した場合に、正相余弦波信号入力値異常検知フラグERR2−1をセットする。 Specifically, the cosine wave difference calculation unit 1712 has, for example, a value of the positive phase cosine wave signal Cosθ 1 + equal to or higher than a lower limit threshold (for example, 0.3 V) in analog value conversion, and an upper limit threshold (for example, 4.7 V). ) If it is within the following range, it is determined as normal, and if the value of the positive phase cosine wave signal Cosθ 1 + is less than the lower limit threshold value or converted to an analog value, or greater than the upper limit threshold value, the positive phase cosine wave It is determined that the input value of the signal Cosθ 1 + is abnormal. When detecting an input value abnormality of the positive phase cosine wave signal Cosθ 1 +, the cosine wave difference calculation unit 1712 sets a positive phase cosine wave signal input value abnormality detection flag ERR2-1.

また、余弦波差分演算部1712は、逆相余弦波信号Cosθ−の入力値異常を検出する。 Further, the cosine wave difference calculation unit 1712 detects an input value abnormality of the anti-phase cosine wave signal Cosθ 1 −.

具体的に、余弦波差分演算部1712は、例えば、逆相余弦波信号Cosθ−の値がアナログ値換算で下限閾値(例えば、0.3V)以上、且つ、上限閾値(例えば、4.7V)以下の範囲内であれば正常と判定し、逆相余弦波信号Cosθ−の値がアナログ値換算で下限閾値未満であるか、又は、上限閾値よりも大きい場合には、逆相余弦波信号Cosθ−の入力値異常と判定する。余弦波差分演算部1712は、逆相余弦波信号Cosθ−の入力値異常を検知した場合に、逆相余弦波信号入力値異常検知フラグERR2−2をセットする。 Specifically, the cosine wave difference calculation unit 1712 has, for example, the value of the anti-phase cosine wave signal Cosθ 1 − equal to or higher than the lower limit threshold (for example, 0.3 V) in terms of analog value and the upper limit threshold (for example, 4.7 V). ) If it is within the following range, it is determined to be normal, and if the value of the anti-phase cosine wave signal Cosθ 1 − is less than the lower limit threshold in terms of analog value or greater than the upper limit threshold, the anti-phase cosine wave It is determined that the input value of the signal Cosθ 1 − is abnormal. The cosine wave difference calculation unit 1712 sets an anti-phase cosine wave signal input value abnormality detection flag ERR2-2 when detecting an input value abnormality of the anti-phase cosine wave signal Cosθ 1 −.

また、余弦波差分演算部1712は、上記(7)式によって算出される余弦波信号オフセット電圧DifCos1の異常を検出する。 The cosine wave difference calculation unit 1712 detects an abnormality in the cosine wave signal offset voltage Dif Cos1 calculated by the above equation (7).

具体的に、余弦波差分演算部1712は、例えば、余弦波信号オフセット電圧DifCos1の値がアナログ値換算で5Vの中点理論値2.5Vに対し、下限閾値(例えば、2.3V)以上、且つ、上限閾値(例えば、2.7V)以下の範囲内であれば正常と判定し、余弦波信号オフセット電圧DifCos1の値がアナログ値換算で下限閾値未満であるか、又は、上限閾値よりも大きい場合には、余弦波信号オフセット電圧DifCos1のオフセット電圧値異常と判定する。余弦波差分演算部1712は、余弦波信号オフセット電圧DifCos1のオフセット電圧値異常を検知した場合に、余弦波信号オフセット電圧値異常検知フラグERR3−2をセットする。 Specifically, the cosine wave difference calculation unit 1712, for example, is equal to or higher than a lower threshold (for example, 2.3 V) with respect to a midpoint theoretical value of 2.5 V in terms of analog value when the value of the cosine wave signal offset voltage Dif Cos1 is 5 V. And, if it is within the range of the upper threshold (for example, 2.7 V) or less, it is determined as normal, and the value of the cosine wave signal offset voltage Dif Cos1 is less than the lower threshold in terms of analog value, or from the upper threshold Is larger, it is determined that the offset voltage value of the cosine wave signal offset voltage Dif Cos1 is abnormal. Cosine difference calculation unit 1712, when detecting the offset voltage abnormalities of the cosine wave signal offset voltage Dif Cos 1, sets the cosine wave signal offset voltage value anomaly detection flag ERR3-2.

第1ゲイン補正部172は、第1正弦波ゲイン補正部1721と、第1余弦波ゲイン補正部1722と、回転数閾値判定部1723と、を備えている。   The first gain correction unit 172 includes a first sine wave gain correction unit 1721, a first cosine wave gain correction unit 1722, and a rotation speed threshold value determination unit 1723.

第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fのゲインを補正した第2正弦波信号Sinθ1gを出力する。また、第1正弦波ゲイン補正部1721は、後述する正弦波信号最大値異常検知フラグERR4−1及び正弦波信号最小値異常検知フラグERR4−2をセット又はリセットする機能を有している。 The first sine wave gain correction unit 1721 outputs a second sine wave signal Sinθ 1g obtained by correcting the gain of the first sine wave signal Sinθ 1f . The first sine wave gain correction unit 1721 has a function of setting or resetting a sine wave signal maximum value abnormality detection flag ERR4-1 and a sine wave signal minimum value abnormality detection flag ERR4-2, which will be described later.

第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fのゲインを補正した第2余弦波信号Cosθ1gを出力する。また、第1余弦波ゲイン補正部1722は、後述する余弦波信号最大値異常検知フラグERR5−1及び余弦波信号最小値異常検知フラグERR5−2をセット又はリセットする機能を有している。 The first cosine wave gain correction unit 1722 outputs a second cosine wave signal Cosθ 1g obtained by correcting the gain of the first cosine wave signal Cosθ 1f . The first cosine wave gain correction unit 1722 has a function of setting or resetting a cosine wave signal maximum value abnormality detection flag ERR5-1 and a cosine wave signal minimum value abnormality detection flag ERR5-2, which will be described later.

回転数閾値判定部1723は、後述する角度算出部174の回転数演算部1744によって算出されたモータ20の回転数ωより、第1正弦波信号Sinθ1fの最大値及び最小値、並びに、第1余弦波信号Cosθ1fの最大値及び最小値の更新許可条件を判定する。 The rotation speed threshold determination unit 1723 determines the maximum value and minimum value of the first sine wave signal Sinθ 1f and the first value based on the rotation speed ω of the motor 20 calculated by a rotation number calculation unit 1744 of the angle calculation unit 174 described later. The update permission condition for the maximum value and the minimum value of the cosine wave signal Cosθ 1f is determined.

具体的に、第1ゲイン補正部172は、例えば、モータ20の回転数ωが上限閾値(例えば、200rpm)以下であれば、第1正弦波信号Sinθ1fの最大値及び最小値、並びに、第1余弦波信号Cosθ1fの最大値及び最小値の更新を許可し、モータ20の回転数ωが上限閾値よりも大きい場合には、第1正弦波信号Sinθ1fの最大値及び最小値、並びに、第1余弦波信号Cosθ1fの最大値及び最小値の更新を禁止する。 Specifically, for example, if the rotational speed ω of the motor 20 is equal to or lower than an upper limit threshold (for example, 200 rpm), the first gain correction unit 172 sets the maximum and minimum values of the first sine wave signal Sinθ 1f , and the first When updating of the maximum value and the minimum value of the 1 cosine wave signal Cosθ 1f is permitted and the rotational speed ω of the motor 20 is larger than the upper limit threshold, the maximum value and the minimum value of the first sine wave signal Sinθ 1f , and The updating of the maximum value and the minimum value of the first cosine wave signal Cosθ 1f is prohibited.

図13は、第1ゲイン補正部の等価ブロックの一例を示す図である。図14は、第1ゲイン補正部の図13に示す等価ブロックにおける第1正弦波信号及び第1余弦波信号の最大値又は最小値の検出概念を説明する図である。   FIG. 13 is a diagram illustrating an example of an equivalent block of the first gain correction unit. FIG. 14 is a diagram for explaining the concept of detecting the maximum value or the minimum value of the first sine wave signal and the first cosine wave signal in the equivalent block shown in FIG. 13 of the first gain correction unit.

第1ゲイン補正部172は、第1余弦波信号Cosθ1fがゼロ電位となる第1余弦波信号Cosθ1fのゼロ点を検出する。 The first gain correction portion 172 detects the zero point of the first cosine wave signal Cos? 1f first cosine wave signal Cos? 1f is zero potential.

第1正弦波ゲイン補正部1721は、第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるとき、当該第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)として検出し、第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0未満(Sinθ1f<0)であるとき、当該第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)として検出する(図14参照)。 The first sine wave gain correction unit 1721, when the value of the first sine-wave signal sin [theta 1f at the zero point detection of the first cosine wave signal Cos? 1f is 0 or more (sin [theta 1f ≧ 0), the first sine wave the value of the signal sin [theta 1f detects the maximum value MAX of the first sine-wave signal Sinθ 1f (Sinθ 1f), the value of the first sine-wave signal sin [theta 1f at the zero point detection of the first cosine wave signal Cos? 1f is less than 0 when a (Sinθ 1f <0), to detect the value of the first sine-wave signal sin [theta 1f as the minimum value MIN of the first sine-wave signal Sinθ 1f (Sinθ 1f) (see FIG. 14).

第1正弦波ゲイン補正部1721は、下記(13)式及び(14)式を用いて、第1正弦波信号Sinθ1fのゲイン補正を行い、正弦波信号Sinθ1gU及び正弦波信号Sinθ1gLを求める。 The first sine wave gain correction unit 1721 corrects the gain of the first sine wave signal Sinθ 1f using the following equations (13) and (14), and the sine wave signal Sinθ 1g U and the sine wave signal Sinθ 1g L Ask for.

Sinθ1gU=Sinθ1f×(1/(MAX(Sinθ1f)))・・・(13) Sinθ 1g U = Sinθ 1f × (1 / (MAX (Sinθ 1f ))) (13)

Sinθ1gL=Sinθ1f×((−1)/(MIN(Sinθ1f)))・・・(14) Sinθ 1g L = Sinθ 1f × ((− 1) / (MIN (Sinθ 1f ))) (14)

そして、第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fの値が0以上であるとき、正弦波信号Sinθ1gUを第2正弦波信号Sinθ1gとし、第1正弦波信号Sinθ1fの値が0未満であるとき、正弦波信号Sinθ1gLを第2正弦波信号Sinθ1gとする。 The first sine wave gain correction unit 1721 converts the sine wave signal Sinθ 1g U into the second sine wave signal Sinθ 1g and the first sine wave signal Sinθ 1g when the value of the first sine wave signal Sinθ 1f is 0 or more. When the value of 1f is less than 0, the sine wave signal Sinθ 1g L is set as the second sine wave signal Sinθ 1g .

すなわち、第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fの値が0以上であるとき、下記の(13’)式を用いて、第2正弦波信号Sinθ1gを算出し、第1正弦波信号Sinθ1fの値が0未満であるとき、下記の(14’)式を用いて、第2正弦波信号Sinθ1gを算出する。 That is, the first sine wave gain correction unit 1721 calculates the second sine wave signal Sinθ 1g using the following equation (13 ′) when the value of the first sine wave signal Sinθ 1f is 0 or more, When the value of the first sine wave signal Sinθ 1f is less than 0, the second sine wave signal Sinθ 1g is calculated using the following equation (14 ′).

Sinθ1g=Sinθ1f×(1/(MAX(Sinθ1f)))・・・(13’) Sinθ 1g = Sinθ 1f × (1 / (MAX (Sinθ 1f ))) (13 ′)

Sinθ1g=Sinθ1f×((−1)/(MIN(Sinθ1f)))・・・(14’) Sinθ 1g = Sinθ 1f × ((− 1) / (MIN (Sinθ 1f ))) (14 ′)

これにより、第1正弦波信号Sinθ1fのゲインが補正された第2正弦波信号Sinθ1gが得られる。 Thereby, the second sine wave signal Sinθ 1g in which the gain of the first sine wave signal Sinθ 1f is corrected is obtained.

また、第1ゲイン補正部172は、第1正弦波信号Sinθ1fがゼロ電位となる第1正弦波信号Sinθ1fのゼロ点を検出する。 The first gain correction portion 172 detects the zero point of the first sine-wave signal sin [theta 1f first sine-wave signal sin [theta 1f becomes zero potential.

第1余弦波ゲイン補正部1722は、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるとき、当該第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)として検出し、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0未満(Cosθ1f<0)であるとき、当該第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)として検出する(図14参照)。 First cosine-wave gain correction unit 1722, when the value of the first cosine wave signal Cos? 1f at the zero point detection of the first sine-wave signal sin [theta 1f is 0 or more (Cos? 1f ≧ 0), the first cosine wave the value of the signal Cos? 1f detects the maximum value MAX of the first cosine wave signal Cosθ 1f (Cosθ 1f), the value of the first cosine wave signal Cos? 1f at the zero point detection of the first sine-wave signal sin [theta 1f is less than 0 when a (Cosθ 1f <0), to detect the value of the first cosine wave signal Cos? 1f as the minimum value MIN of the first cosine wave signal Cosθ 1f (Cosθ 1f) (see Figure 14).

第1余弦波ゲイン補正部1722は、下記(15)式及び(16)式を用いて、第1余弦波信号Cosθ1fのゲイン補正を行い、余弦波信号Cosθ1gU及び余弦波信号Cosθ1gLを求める。 The first cosine wave gain correction unit 1722 performs gain correction of the first cosine wave signal Cosθ 1f using the following equations (15) and (16), and the cosine wave signal Cosθ 1g U and the cosine wave signal Cosθ 1g L: Ask for.

Cosθ1gU=Cosθ1f×(1/(MAX(Cosθ1f)))・・・(15) Cosθ 1g U = Cosθ 1f × (1 / (MAX (Cosθ 1f ))) (15)

Cosθ1gL=Cosθ1f×((−1)/(MIN(Cosθ1f)))・・・(16) Cos θ 1g L = Cos θ 1f × ((− 1) / (MIN (Cos θ 1f ))) (16)

そして、第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fの値が0以上であるとき、余弦波信号Cosθ1gUを第2余弦波信号Cosθ1gとし、第1余弦波信号Cosθ1fの値が0未満であるとき、余弦波信号Cosθ1gLを第2余弦波信号Cosθ1gとする。 Then, when the value of the first cosine wave signal Cosθ 1f is 0 or more, the first cosine wave gain correction unit 1722 sets the cosine wave signal Cosθ 1g U as the second cosine wave signal Cosθ 1g and the first cosine wave signal Cosθ. When the value of 1f is less than 0, the cosine wave signal Cosθ 1g L is set as the second cosine wave signal Cosθ 1g .

すなわち、第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fの値が0以上であるとき、下記の(15’)式を用いて、第2余弦波信号Cosθ1gを算出し、第1余弦波信号Cosθ1fの値が0未満であるとき、下記の(16’)式を用いて、第2余弦波信号Cosθ1gを算出する。 That is, the first cosine wave gain correction unit 1722 calculates the second cosine wave signal Cosθ 1g using the following equation (15 ′) when the value of the first cosine wave signal Cosθ 1f is 0 or more, When the value of the first cosine wave signal Cosθ 1f is less than 0, the second cosine wave signal Cosθ 1g is calculated using the following equation (16 ′).

Cosθ1g=Cosθ1f×(1/(MAX(Cosθ1f)))・・・(15’) Cos θ 1g = Cos θ 1f × (1 / (MAX (Cos θ 1f ))) (15 ′)

Cosθ1g=Cosθ1f×((−1)/(MIN(Cosθ1f)))・・・(16’) Cos θ 1g = Cos θ 1f × ((− 1) / (MIN (Cos θ 1f ))) (16 ′)

これにより、第1余弦波信号Cosθ1fのゲインが補正された第2余弦波信号Cosθ1gが得られる。 Thereby, the second cosine wave signal Cosθ 1g in which the gain of the first cosine wave signal Cosθ 1f is corrected is obtained.

また、第1正弦波ゲイン補正部1721は、第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるときの第1正弦波信号Sinθ1fの最大値の異常を検出する。 The first sine wave gain correction unit 1721, a first sine of the value of the first sine-wave signal sin [theta 1f at the zero point detection of the first cosine wave signal Cos? 1f is 0 or more (Sinθ 1f ≧ 0) The abnormality of the maximum value of the wave signal Sinθ 1f is detected.

具体的に、第1正弦波ゲイン補正部1721は、例えば、第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるときの第1正弦波信号Sinθ1fの最大値が下限値(例えば、3.2V)以上であり、且つ、上限値(例えば、4.4V)以下であれば正常と判定し、第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるときの第1正弦波信号Sinθ1fの最大値が下限値未満であるか、又は上限値よりも大きい場合には、第1正弦波信号Sinθ1fの最大値異常と判定する。第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fの最大値異常を検知した場合に、正弦波信号最大値異常検知フラグERR4−1をセットする。このとき、第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fの最大値を更新しない。 Specifically, the first sine wave gain correction unit 1721, for example, the value of the first sine-wave signal sin [theta 1f at the zero point detection of the first cosine wave signal Cos? 1f is 0 or more (Sinθ 1f ≧ 0) If the maximum value of the first sine wave signal Sinθ 1f is equal to or higher than the lower limit value (eg, 3.2 V) and equal to or lower than the upper limit value (eg, 4.4 V), the first cosine wave signal is determined to be normal. the value of the first sine-wave signal sin [theta 1f at the zero point detection of cos [theta] 1f is 0 or whether the maximum value of the first sine-wave signal sin [theta 1f when (Sinθ 1f ≧ 0) is is less than the lower limit, or upper If larger than the value, it is determined that the maximum value of the first sine wave signal Sinθ 1f is abnormal. The first sine wave gain correction unit 1721 sets the sine wave signal maximum value abnormality detection flag ERR4-1 when detecting the maximum value abnormality of the first sine wave signal Sinθ 1f . At this time, the first sine wave gain correction unit 1721 does not update the maximum value of the first sine wave signal Sinθ 1f .

また、第1正弦波ゲイン補正部1721は、第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0未満(Sinθ1f<0)であるときの第1正弦波信号Sinθ1fの最小値の異常を検出する。 The first sine wave gain correction unit 1721, a first sine of the value of the first sine-wave signal sin [theta 1f at the zero point detection of the first cosine wave signal Cos? 1f is smaller than 0 (Sinθ 1f <0) The abnormality of the minimum value of the wave signal Sinθ 1f is detected.

具体的に、第1正弦波ゲイン補正部1721は、例えば、第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0未満(Sinθ1f<0)であるときの第1正弦波信号Sinθ1fの最小値が下限値(例えば、−4.4V)以上であり、且つ、上限値(例えば、−3.2V)以下であれば正常と判定し、第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0未満(Sinθ1f<0)であるときの第1正弦波信号Sinθ1fの最小値が下限値未満であるか、又は上限値よりも大きい場合には、第1正弦波信号Sinθ1fの最小値異常と判定する。第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fの最小値異常を検知した場合に、正弦波信号最小値異常検知フラグERR4−2をセットする。このとき、第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fの最小値を更新しない。 Specifically, the first sine wave gain correction unit 1721, for example, the value of the first sine-wave signal sin [theta 1f at the zero point detection of the first cosine wave signal Cos? 1f is smaller than 0 (Sinθ 1f <0) If the minimum value of the first sine wave signal Sinθ 1f is equal to or higher than the lower limit value (for example, −4.4 V) and equal to or lower than the upper limit value (for example, −3.2 V), the first cosine is determined. less than the value of the first sine-wave signal sin [theta 1f at the zero point detection wave signal Cos? 1f is zero or a minimum value of the first sine-wave signal sin [theta 1f when a (sin [theta 1f <0) is less than the lower limit value, Or when larger than an upper limit, it determines with the minimum value abnormality of 1st sine wave signal Sin (theta) 1f . The first sine wave gain correction unit 1721 sets a sine wave signal minimum value abnormality detection flag ERR4-2 when detecting a minimum value abnormality of the first sine wave signal Sinθ 1f . At this time, the first sine wave gain correction unit 1721 does not update the minimum value of the first sine wave signal Sinθ 1f .

また、第1余弦波ゲイン補正部1722は、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるときの第1余弦波信号Cosθ1fの最大値の異常を検出する。 The first cosine wave gain correction unit 1722, the first cosine of the value of the first cosine wave signal Cos? 1f at the zero point detection of the first sine-wave signal sin [theta 1f is 0 or more (Cos? 1f ≧ 0) The abnormality of the maximum value of the wave signal Cosθ 1f is detected.

具体的に、第1余弦波ゲイン補正部1722は、例えば、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるときの第1余弦波信号Cosθ1fの最大値が下限値(例えば、3.2V)以上であり、且つ、上限値(例えば、4.4V)以下であれば正常と判定し、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるときの第1余弦波信号Cosθ1fの最大値が下限値未満であるか、又は上限値よりも大きい場合には、第1余弦波信号Cosθ1fの最大値異常と判定する。第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fの最大値異常を検知した場合に、余弦波信号最大値異常検知フラグERR5−1をセットする。このとき、第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fの最大値を更新しない。 Specifically, the first cosine-wave gain correction unit 1722, for example, the value of the first cosine wave signal Cos? 1f at the zero point detection of the first sine-wave signal sin [theta 1f is 0 or more (Cos? 1f ≧ 0) If the maximum value of the first cosine wave signal Cosθ 1f is not less than the lower limit (eg, 3.2 V) and not more than the upper limit (eg, 4.4 V), the first sine wave signal is determined to be normal. the value of the first cosine wave signal Cos? 1f at the zero point detection of sin [theta 1f is 0 or whether the maximum value of the first cosine wave signal Cos? 1f when (Cos? 1f ≧ 0) is is less than the lower limit, or upper If it is larger than the value, it is determined that the maximum value of the first cosine wave signal Cosθ 1f is abnormal. The first cosine wave gain correction unit 1722 sets the cosine wave signal maximum value abnormality detection flag ERR5-1 when detecting the maximum value abnormality of the first cosine wave signal Cosθ 1f . At this time, the first cosine wave gain correction unit 1722 does not update the maximum value of the first cosine wave signal Cosθ 1f .

また、第1余弦波ゲイン補正部1722は、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0未満(Cosθ1f<0)であるときの第1余弦波信号Cosθ1fの最小値の異常を検出する。 The first cosine wave gain correction unit 1722, the first cosine of the value of the first cosine wave signal Cos? 1f at the zero point detection of the first sine-wave signal sin [theta 1f is smaller than 0 (Cosθ 1f <0) The abnormality of the minimum value of the wave signal Cosθ 1f is detected.

具体的に、第1余弦波ゲイン補正部1722は、例えば、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0未満(Cosθ1f<0)であるときの第1余弦波信号Cosθ1fの最小値が下限値(例えば、−4.4V)以上であり、且つ、上限値(例えば、−3.2V)以下であれば正常と判定し、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0未満(Cosθ1f<0)であるときの第1余弦波信号Cosθ1fの最小値が下限値未満であるか、又は上限値よりも大きい場合には、第1余弦波信号Cosθ1fの最小値異常と判定する。第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fの最小値異常を検知した場合に、余弦波信号最小値異常検知フラグERR5−2をセットする。このとき、第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fの最小値を更新しない。 Specifically, the first cosine-wave gain correction unit 1722, for example, the value of the first cosine wave signal Cos? 1f at the zero point detection of the first sine-wave signal sin [theta 1f is smaller than 0 (Cosθ 1f <0) If the minimum value of the first cosine wave signal Cosθ 1f is equal to or higher than the lower limit value (for example, −4.4V) and equal to or lower than the upper limit value (for example, −3.2V), the first sine is determined. or minimum of the first cosine wave signal Cos? 1f when the value of the first cosine wave signal Cos? 1f is smaller than 0 (Cosθ 1f <0) at the time of the zero point detection wave signal sin [theta 1f is less than the lower limit, Alternatively, when the value is larger than the upper limit value, it is determined that the minimum value of the first cosine wave signal Cosθ 1f is abnormal. The first cosine wave gain correction unit 1722 sets the cosine wave signal minimum value abnormality detection flag ERR5-2 when detecting the minimum value abnormality of the first cosine wave signal Cosθ 1f . At this time, the first cosine wave gain correction unit 1722 does not update the minimum value of the first cosine wave signal Cosθ 1f .

第2ゲイン補正部173は、第2正弦波ゲイン補正部1731と、第2余弦波ゲイン補正部1732と、位相変換部1733と、を備えている。   The second gain correction unit 173 includes a second sine wave gain correction unit 1731, a second cosine wave gain correction unit 1732, and a phase conversion unit 1733.

位相変換部1733は、下記(17)式を用いて、第2正弦波信号Sinθ1gを位相変換した第3正弦波信号VC+Sを算出し、下記(18)式を用いて、第2余弦波信号Cosθ1gを位相変換した第3余弦波信号VC−Sを算出する。 The phase conversion unit 1733 calculates a third sine wave signal V C + S obtained by phase-converting the second sine wave signal Sinθ 1g using the following equation (17), and uses the following equation (18) to calculate the second cosine wave. A third cosine wave signal V C-S obtained by phase conversion of the signal Cosθ 1g is calculated.

C+S=Cosθ1g+Sinθ1g・・・(17) V C + S = Cosθ 1g + Sinθ 1g ··· (17)

C−S=Cosθ1g−Sinθ1g・・・(18) V C−S = Cosθ 1g −Sinθ 1g (18)

図15は、第2正弦波信号及び第2余弦波信号に位相ずれが生じていない場合の位相変換処理後のベクトル図である。図16は、第2正弦波信号及び第2余弦波信号にαの位相ずれが生じている場合の位相変換処理後のベクトル図である。   FIG. 15 is a vector diagram after the phase conversion process when no phase shift occurs in the second sine wave signal and the second cosine wave signal. FIG. 16 is a vector diagram after the phase conversion process when a phase shift of α occurs in the second sine wave signal and the second cosine wave signal.

第2正弦波信号Sinθ1gと第2余弦波信号Cosθ1gにαの位相ずれが生じている場合、図16に示すように、第3正弦波信号VC+Sは、第2正弦波信号Sinθ1gに対して+45−(α/2)deg位相が遅れ、第3余弦波信号VC−Sは、第2余弦波信号Cosθ1gに対して+45+(α/2)deg位相が遅れる。すなわち、第3正弦波信号VC+Sと第3余弦波信号VC−Sとは、90degの位相差となる。 When a phase shift of α occurs between the second sine wave signal Sinθ 1g and the second cosine wave signal Cosθ 1g , as shown in FIG. 16, the third sine wave signal V C + S is changed to the second sine wave signal Sinθ 1g . On the other hand, the + 45− (α / 2) deg phase is delayed, and the third cosine wave signal V C-S is delayed by +45+ (α / 2) deg phase with respect to the second cosine wave signal Cosθ 1g . That is, the third sine wave signal V C + S and the third cosine wave signal V C-S have a phase difference of 90 deg.

図15に示すように、第2正弦波信号Sinθ1gと第2余弦波信号Cosθ1gに位相ずれが生じていない場合には、上記の(17)式のベクトル(Cosθ1g+Sinθ1g)と、上記の(18)式のベクトル(Cosθ1g−Sinθ1g)との大きさは等しくなる。 As shown in FIG. 15, when there is no phase shift between the second sine wave signal Sinθ 1g and the second cosine wave signal Cosθ 1g , the vector (Cosθ 1g + Sinθ 1g ) of the above equation (17) and the above The size of the vector (Cosθ 1g −Sinθ 1g ) in the equation (18) is the same.

一方、図16に示すように、第2正弦波信号Sinθ1gと第2余弦波信号Cosθ1gにαの位相ずれが生じている場合には、上記の(17)式のベクトル(Cosθ1g+Sinθ1g)が、上記の(18)式のベクトル(Cosθ1g−Sinθ1g)よりも大きくなる。 On the other hand, as shown in FIG. 16, when the phase shift α in the second sine-wave signal sin [theta 1 g and the second cosine wave signal Cos? 1 g occurs, the above equation (17) of the vector (Cos? 1 g + sin [theta 1 g ) Becomes larger than the vector (Cos θ 1g −Sin θ 1g ) in the above equation (18).

本実施形態では、上記の(17)式の結果である第3正弦波信号VC+Sと、上記の(18)式の結果である第3余弦波信号VC−Sとに対し、ゲイン補正を行うことで、ゲイン補正後の第4正弦波信号V1C+Sのベクトルと第4余弦波信号V1C−Sのベクトルとの大きさが等しくなるように補正する。 In the present embodiment, gain correction is performed on the third sine wave signal V C + S that is the result of the above expression (17) and the third cosine wave signal V C−S that is the result of the above expression (18). By performing the correction, the vector of the fourth sine wave signal V1 C + S after the gain correction and the vector of the fourth cosine wave signal V1 C-S are corrected to be equal.

これにより、第2正弦波信号Sinθ1g及び第2余弦波信号Cosθ1gの位相ずれαが補正される。 Thus, the phase shift α of the second sine-wave signal sin [theta 1 g and the second cosine wave signal Cos? 1 g is corrected.

第2正弦波ゲイン補正部1731は、第3正弦波信号VC+Sのゲインを補正した第4正弦波信号V1C+Sを出力する。 The second sine wave gain correction unit 1731 outputs a fourth sine wave signal V1 C + S obtained by correcting the gain of the third sine wave signal V C + S.

第2余弦波ゲイン補正部1732は、第3余弦波信号VC−Sのゲインを補正した第4余弦波信号V1C−Sを出力する。 The second cosine wave gain correction unit 1732 outputs a fourth cosine wave signal V1 C-S obtained by correcting the gain of the third cosine wave signal V C-S .

図17は、第2ゲイン補正部の等価ブロックの一例を示す図である。図18は、第2ゲイン補正部の図17に示す等価ブロックにおける第3正弦波信号及び第3余弦波信号の最大値又は最小値の検出概念を説明する図である。   FIG. 17 is a diagram illustrating an example of an equivalent block of the second gain correction unit. FIG. 18 is a diagram for explaining the concept of detecting the maximum value or the minimum value of the third sine wave signal and the third cosine wave signal in the equivalent block shown in FIG. 17 of the second gain correction unit.

第2ゲイン補正部173は、第3余弦波信号VC−Sがゼロ電位となる第3余弦波信号VC−Sのゼロ点を検出する。 The second gain correction unit 173 detects the zero point of the third cosine wave signal V C-S in which the third cosine wave signal V C-S becomes zero potential.

第2正弦波ゲイン補正部1731は、第3余弦波信号VC−Sのゼロ点検出時における第3正弦波信号VC+Sの値が0以上(VC+S≧0)であるとき、当該第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最大値MAX(VC+S)として検出し、第3余弦波信号VC−Sのゼロ点検出時における第3正弦波信号VC+Sの値が0未満(VC+S<0)であるとき、当該第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最小値MIN(VC+S)として検出する(図18参照)。 When the value of the third sine wave signal V C + S when the zero point of the third cosine wave signal V C-S is detected is 0 or more (V C + S ≧ 0), the second sine wave gain correction unit 1731 detecting the value of the sine wave signal V C + S as the maximum value MAX of the third sinusoidal signal V C + S (V C + S), the third sinusoidal signal V C + S at the zero point detection of the third cosine wave signal V C-S when the value is less than 0 (V C + S <0 ), to detect the value of the third sine wave signal V C + S as the minimum value MIN of the third sinusoidal signal V C + S (V C + S) ( see Figure 18).

第2正弦波ゲイン補正部1731は、下記(19)式及び(20)式を用いて、第3正弦波信号VC+Sのゲイン補正を行い、正弦波信号V1C+SU及び正弦波信号V1C+SLを求める。 The second sine wave gain correction unit 1731 corrects the gain of the third sine wave signal V C + S using the following equations (19) and (20), and the sine wave signal V1 C + SU and the sine wave signal V1 C + S L Ask for.

V1C+SU=VC+S×(1/(MAX(VC+S)))・・・(19) V1 C + S U = V C + S × (1 / (MAX (V C + S ))) (19)

V1C+SL=VC+S×((−1)/(MIN(VC+S)))・・・(20) V1 C + S L = V C + S × ((− 1) / (MIN (V C + S ))) (20)

そして、第2正弦波ゲイン補正部1731は、第3正弦波信号VC+Sの値が0以上であるとき、正弦波信号V1C+SUを第4正弦波信号V1C+Sとし、第3正弦波信号VC+Sの値が0未満であるとき、正弦波信号V1C+SLを第4正弦波信号V1C+Sとする。 Then, when the value of the third sine wave signal V C + S is equal to or greater than 0, the second sine wave gain correction unit 1731 converts the sine wave signal V1 C + S U into the fourth sine wave signal V1 C + S, and the third sine wave signal V 1 When the value of C + S is less than 0, the sine wave signal V1 C + S L is set as the fourth sine wave signal V1 C + S.

すなわち、第2正弦波ゲイン補正部1731は、第3正弦波信号VC+Sの値が0以上であるとき、下記の(19’)式を用いて、第4正弦波信号V1C+Sを算出し、第3正弦波信号VC+Sの値が0未満であるとき、下記の(20’)式を用いて、第4正弦波信号V1C+Sを算出する。 That is, the second sine wave gain correction unit 1731 calculates the fourth sine wave signal V1 C + S using the following equation (19 ′) when the value of the third sine wave signal V C + S is 0 or more, When the value of the third sine wave signal V C + S is less than 0, the fourth sine wave signal V1 C + S is calculated using the following equation (20 ′).

V1C+S=VC+S×(1/(MAX(VC+S)))・・・(19’) V1 C + S = V C + S × (1 / (MAX (V C + S ))) (19 ′)

V1C+S=VC+S×((−1)/(MIN(VC+S)))・・・(20’) V1 C + S = V C + S × ((− 1) / (MIN (V C + S ))) (20 ′)

これにより、第3正弦波信号VC+Sのゲインが補正された第4正弦波信号V1C+Sが得られる。 Thereby, the fourth sine wave signal V1 C + S in which the gain of the third sine wave signal V C + S is corrected is obtained.

また、第2ゲイン補正部173は、第3正弦波信号VC+Sがゼロ電位となる第3正弦波信号VC+Sのゼロ点を検出する。 The second gain correction unit 173 detects the zero point of the third sinusoidal signal V C + S of the third sinusoidal signal V C + S becomes zero potential.

第2余弦波ゲイン補正部1732は、第3正弦波信号VC+Sのゼロ点検出時における第3余弦波信号VC−Sの値が0以上(VC−S≧0)であるとき、当該第3余弦波信号VC−Sの値を第3余弦波信号VC−Sの最大値MAX(VC−S)として検出し、第3正弦波信号VC+Sのゼロ点検出時における第3余弦波信号VC−Sの値が0未満(VC−S<0)であるとき、当該第3余弦波信号VC−Sの値を第3余弦波信号VC−Sの最小値MIN(VC−S)として検出する(図18参照)。 When the value of the third cosine wave signal V C-S when the zero point of the third sine wave signal V C + S is detected is 0 or more (V C−S ≧ 0), third detects the value of the cosine wave signal V C-S as the maximum value MAX of the third cosine wave signal V C-S (V C- S), the third at the zero point detection of the third sinusoidal signal V C + S when the value of the cosine wave signal V C-S is less than 0 (V C-S <0 ), the minimum value MIN of values of the third cosine wave signal V C-S third cosine wave signal V C-S It is detected as (V C-S ) (see FIG. 18).

第2余弦波ゲイン補正部1732は、下記(21)式及び(22)式を用いて、第3余弦波信号VC−Sのゲイン補正を行い、余弦波信号V1C−SU及び余弦波信号V1C−SLを求める。 The second cosine wave gain correction unit 1732 performs gain correction of the third cosine wave signal V C-S using the following equations (21) and (22), and the cosine wave signal V1 C-S U and the cosine wave. The signal V1 C-S L is obtained.

V1C−SU=VC−S×(1/(MAX(VC−S)))・・・(21) V1 C−S U = V C−S × (1 / (MAX (V C−S ))) (21)

V1C−SL=VC−S×((−1)/(MIN(VC−S)))・・・(22) V1 C−S L = V C−S × ((− 1) / (MIN (V C−S ))) (22)

そして、第2余弦波ゲイン補正部1732は、第3余弦波信号VC−Sの値が0以上であるとき、余弦波信号V1C−SUを第4余弦波信号V1C−Sとし、第3余弦波信号VC−Sの値が0未満であるとき、余弦波信号V1C−SLを第4余弦波信号V1C−Sとする。 The second cosine wave gain correction unit 1732 sets the cosine wave signal V1 C-S U as the fourth cosine wave signal V1 C-S when the value of the third cosine wave signal V C-S is 0 or more, When the value of the third cosine wave signal V C-S is less than 0, the cosine wave signal V1 C-S L is set as the fourth cosine wave signal V1 C-S .

すなわち、第2余弦波ゲイン補正部1732は、第3余弦波信号VC−Sの値が0以上であるとき、下記の(21’)式を用いて、第4余弦波信号V1C−Sを算出し、第3余弦波信号VC−Sの値が0未満であるとき、下記の(22’)式を用いて、第4余弦波信号V1C−Sを算出する。 That is, when the value of the third cosine wave signal V C-S is equal to or greater than 0, the second cosine wave gain correction unit 1732 uses the following equation (21 ′) to calculate the fourth cosine wave signal V1 C-S. When the value of the third cosine wave signal V C-S is less than 0, the fourth cosine wave signal V1 C-S is calculated using the following equation (22 ′).

V1C−S=VC−S×(1/(MAX(VC−S)))・・・(21’) V1 C−S = V C−S × (1 / (MAX (V C−S ))) (21 ′)

V1C−S=VC−S×((−1)/(MIN(VC−S)))・・・(22’) V1 C−S = V C−S × ((− 1) / (MIN (V C−S ))) (22 ′)

これにより、第3余弦波信号VC−Sのゲインが補正された第4余弦波信号V1C−Sが得られる。 Thereby, the fourth cosine wave signal V1 C-S in which the gain of the third cosine wave signal V C-S is corrected is obtained.

角度算出部174は、逆正接演算部1741と、象限判定部1742と、モータ電気角演算部1743と、回転数演算部1744と、を備えている。   The angle calculation unit 174 includes an arctangent calculation unit 1741, a quadrant determination unit 1742, a motor electrical angle calculation unit 1743, and a rotation number calculation unit 1744.

逆正接演算部1741は、下記(23)式を用いて、−90deg<θ1h<+90degの範囲内における角度θ1hを算出する。 The arc tangent calculation unit 1741 calculates an angle θ 1h within a range of −90 deg <θ 1h <+90 deg using the following equation (23).

θ1h=arctan(V1C+S/V1C−S)・・・(23) θ 1h = arctan (V1 C + S / V1 C−S ) (23)

象限判定部1742は、逆正接演算部1741によって算出された−90deg<θ1h<+90degの範囲内における角度θ1hを、0deg<θ<360degの範囲内におけるモータ20の回転角θに変換する。また、象限判定部1742は、第2ゲイン補正部173によって遅れた位相45degだけ進ませる。 Quadrant determination unit 1742, converts the angle theta 1h within the scope of -90deg <θ 1h <+ 90deg calculated by arctangent calculation unit 1741, the rotation angle theta 1 of the motor 20 in the 0 deg <theta 1 <range of 360deg To do. Further, the quadrant determination unit 1742 advances the phase by 45 degrees delayed by the second gain correction unit 173.

象限判定部1742は、第4余弦波信号V1C−Sが0以上(V1C−S≧0)であるとき、下記(24)式を用いて、0deg<θ<360degの範囲内におけるモータ20の回転角θを算出する。 When the fourth cosine wave signal V1 C−S is equal to or greater than 0 (V1 C−S ≧ 0), the quadrant determination unit 1742 uses the following equation (24) to calculate the motor within the range of 0 deg <θ 1 <360 deg. A rotation angle θ 1 of 20 is calculated.

θ=θ1h−45deg・・・(24) θ 1 = θ 1h −45 deg (24)

また、象限判定部1742は、第4余弦波信号V1C−Sが0未満(V1C−S<0)であるとき、下記(25)式を用いて、0deg<θ<360degの範囲内におけるモータ20の回転角θを算出する。 Further, when the fourth cosine wave signal V1 C-S is less than 0 (V1 C-S <0), the quadrant determination unit 1742 uses the following equation (25) to satisfy the range of 0 deg <θ 1 <360 deg. It calculates a rotation angle theta 1 of the motor 20 in.

θ=(θ1h+180deg)−45deg・・・(25) θ 1 = (θ 1h +180 deg) −45 deg (25)

モータ電気角演算部1743は、象限判定部1742によって算出されたモータ20の回転角θに基づき、モータ20の磁極対数に対応する電気角θを算出する。モータ20の磁極対数が4つである場合、回転角θを4分割して、電流制御開始位置との差分を補正し4周期分の電気角θを算出する。 The motor electrical angle calculation unit 1743 calculates an electrical angle θ 2 corresponding to the number of magnetic pole pairs of the motor 20 based on the rotation angle θ 1 of the motor 20 calculated by the quadrant determination unit 1742. When the number of magnetic pole pairs of the motor 20 is four, the rotation angle θ 1 is divided into four, the difference from the current control start position is corrected, and the electric angle θ 2 for four cycles is calculated.

回転数演算部1744は、モータ20の回転角θに基づき、モータ20の回転数ωを算出する。具体的に、回転数演算部1744は、例えば、モータ20の回転角θの1ms単位の変化量を参照して、モータ20の回転数ωを算出する。このとき、例えば、後述する回転角検出処理における処理周期、換言すれば、差分演算部171の前段におけるA/D変換処理のサンプリング周期が250μsである場合、4周期分のモータ20の回転角θを参照する。モータ20の回転数ωを算出する際の単位時間は、1ms単位に限定されない。 The rotation speed calculation unit 1744 calculates the rotation speed ω of the motor 20 based on the rotation angle θ 1 of the motor 20. Specifically, the rotational speed calculation unit 1744 calculates the rotational speed ω of the motor 20 with reference to, for example, the amount of change in 1 ms units of the rotational angle θ 1 of the motor 20. At this time, for example, when the processing period in the rotation angle detection process described later, in other words, the sampling period of the A / D conversion process in the previous stage of the difference calculation unit 171 is 250 μs, the rotation angle θ of the motor 20 for four periods. 1 is referred to. The unit time for calculating the rotation speed ω of the motor 20 is not limited to 1 ms.

次に、本実施形態に係る回転角検出装置200における回転角検出処理について説明する。図19は、実施形態に係る回転角検出装置における回転角検出処理手順の一例を示すフローチャートである。   Next, the rotation angle detection process in the rotation angle detection apparatus 200 according to the present embodiment will be described. FIG. 19 is a flowchart illustrating an example of a rotation angle detection processing procedure in the rotation angle detection device according to the embodiment.

本実施形態では、車両を実際に走行させる実運用時にリアルタイムで回転角検出装置200のキャリブレーションを行う。これにより、温度ドリフトや経時変化によって検出精度が低下することを抑制することができ、高い検出精度を維持することができる。以下、上述した実運用時におけるリアルタイムキャリブレーションについて説明する。   In the present embodiment, the rotation angle detection device 200 is calibrated in real time during actual operation of actually running the vehicle. Thereby, it can suppress that detection accuracy falls by temperature drift or a time-dependent change, and can maintain high detection accuracy. Hereinafter, real-time calibration at the time of actual operation described above will be described.

図20は、EEPROMに記憶される各情報の一例を示す図である。   FIG. 20 is a diagram illustrating an example of each piece of information stored in the EEPROM.

EEPROM104(第1記憶部)には、例えば常温(例えば、25度)における、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の初期値MAX1Ref、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)及び第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の初期値MIN1Ref、第3正弦波信号VC+Sの最大値MAX(VC+S)及び第3余弦波信号VC−Sの最大値MAX(VC−S)の初期値MAX2Ref、第3正弦波信号VC+Sの最小値MIN(VC+S)及び第3余弦波信号VC−Sの最小値MIN(VC−S)の初期値MIN2Refが記憶されている。 EEPROM104 The (first storage unit), for example, room temperature (e.g., 25 degrees) in the maximum value MAX (Cos? 1f of the maximum value MAX (sin [theta 1f) and the first cosine wave signal Cos? 1f of the first sine-wave signal sin [theta 1f the initial value MAX1Ref of), the initial value of the minimum value MIN of the first sine-wave signal Sinθ 1f (Sinθ 1f) and the minimum value MIN (Cos? 1f of the first cosine wave signal Cosθ 1f) MIN1Ref, the third sinusoidal signal V C + S The maximum value MAX (V C + S ) and the initial value MAX2Ref of the maximum value MAX (V C−S ) of the third cosine wave signal V C−S , the minimum value MIN (V C + S ) of the third sine wave signal V C + S and the third value The initial value MIN2Ref of the minimum value MIN (V C-S ) of the cosine wave signal V C-S is stored.

また、EEPROM104(第1記憶部)には、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の上限値MAX1Lim_H及び下限値MAX1Lim_L、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)及び第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の上限値MIN1Lim_H及び下限値MIN1Lim_Lが記憶されている。 Moreover, EEPROM 104 in the (first storage unit), an upper limit value MAX1Lim_H and the lower limit value of the maximum value MAX of the first sine-wave signal sin [theta 1f (sin [theta 1f) and a maximum value MAX (Cos? 1f) of the first cosine wave signal Cos? 1f MAX1Lim_L, the upper limit MIN1Lim_H and the lower limit value MIN1Lim_L the minimum value MIN of the first sine-wave signal Sinθ 1f (Sinθ 1f) and the minimum value MIN (Cos? 1f) of the first cosine wave signal Cos? 1f are stored.

また、EEPROM104(第1記憶部)には、正相正弦波信号Sinθ+、逆相正弦波信号Sinθ−、正相余弦波信号Cosθ+、及び逆相余弦波信号Cosθ−の上限閾値Lim_H及び下限閾値Lim_L、正弦波信号オフセット電圧DifSin1及び余弦波信号オフセット電圧DifCos1の上限閾値DifLim_H及び下限閾値DifLim_L、モータ20の回転数ωの上限閾値RS_Hが記憶されている。 Moreover, EEPROM 104 in the (first storage unit), positive-phase sine wave signal sin [theta 1 +, reverse-phase sine wave signal sin [theta 1 -, positive phase cosine wave signal Cos? 1 +, and the negative phase cosine wave signal Cos? 1 - maximum threshold Lim_H and lower threshold Lim_L, upper threshold DifLim_H and lower threshold DifLim_L sinusoidal signals offset voltage Dif Sin1 and cosine-wave signal offset voltage Dif Cos 1, upper threshold RS_H the rotational speed ω of the motor 20 is stored.

なお、EEPROM104に記憶される各情報は、数値データであっても良いし、デジタルデータ等の離散値であっても良い。   Each information stored in the EEPROM 104 may be numerical data or may be a discrete value such as digital data.

実運用時において、CPU101は、イグニッションスイッチ11から送信されたイグニッション信号を受信すると、EEPROM104(第1記憶部)に記憶されたMAX1Ref、MIN1Ref、MAX2Ref、MIN2Refを読み出し、RAM102(第2記憶部)に書き込む。このとき、RAM102(第2記憶部)には、MAX1Refがそれぞれ第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の値として書き込まれ、MIN1Refがそれぞれ第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)及び第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の値として書き込まれ、MAX2Refがそれぞれ第3正弦波信号VC+Sの最大値MAX(VC+S)及び第3余弦波信号VC−Sの最大値MAX(VC−S)の値として書き込まれ、MIN2Refがそれぞれ第3正弦波信号VC+Sの最小値MIN(VC+S)及び第3余弦波信号VC−Sの最小値MIN(VC−S)の値として書き込まれる。 In actual operation, upon receiving the ignition signal transmitted from the ignition switch 11, the CPU 101 reads MAX1Ref, MIN1Ref, MAX2Ref, MIN2Ref stored in the EEPROM 104 (first storage unit), and stores it in the RAM 102 (second storage unit). Write. At this time, RAM 102 in the (second storage section), as the value of the maximum value MAX of the first sine-wave signal Sinθ 1f MAX1Ref respectively (sin [theta 1f) and a maximum value MAX (Cos? 1f) of the first cosine wave signal Cos? 1f written, MIN1Ref is written as the value of the minimum value MIN of the first sine-wave signal sin [theta 1f respectively (sin [theta 1f) and the minimum value MIN (Cos? 1f) of the first cosine wave signal Cos? 1f, third sine wave MAX2Ref each It is written as the value of the maximum value of the signal V C + S MAX (V C + S) and a maximum value MAX of the third cosine wave signal V C-S (V C- S), MIN2Ref minimum value of the third sinusoidal signal V C + S, respectively Written as the value of MIN (V C + S ) and the minimum value MIN (V C−S ) of the third cosine wave signal V C-S The

本実施形態において、回転角検出装置200における回転角検出処理は、例えば、250μs毎に実施される。すなわち、差分演算部171の前段におけるA/D変換処理のサンプリング周期は250μsである。なお、差分演算部171の前段におけるA/D変換処理のサンプリング周期は一例であって、250μsに限定されない。   In the present embodiment, the rotation angle detection process in the rotation angle detection device 200 is performed every 250 μs, for example. That is, the sampling period of the A / D conversion process in the previous stage of the difference calculation unit 171 is 250 μs. Note that the sampling period of the A / D conversion process in the previous stage of the difference calculation unit 171 is an example, and is not limited to 250 μs.

図19に示す回転角検出処理において、位置検出部17は、まず、入力異常判定処理を行う(ステップS1)。図21は、入力異常判定処理の一例を示すフローチャートである。   In the rotation angle detection process shown in FIG. 19, the position detection unit 17 first performs an input abnormality determination process (step S1). FIG. 21 is a flowchart illustrating an example of the input abnormality determination process.

位置検出部17は、位置検出センサ25から出力される差動正弦波信号(正相正弦波信号Sinθ+、逆相正弦波信号Sinθ−)及び差動余弦波信号(正相余弦波信号Cosθ+、逆相余弦波信号Cosθ−)をサンプリング処理して取得する(ステップS10)。 The position detection unit 17 outputs a differential sine wave signal (positive phase sine wave signal Sinθ 1 +, a negative phase sine wave signal Sinθ 1 −) and a differential cosine wave signal (positive phase cosine wave signal) output from the position detection sensor 25. Cos θ 1 + and anti-phase cosine wave signal Cos θ 1 −) are acquired by sampling (step S10).

差分演算部171は、EEPROM104から正相正弦波信号Sinθ+、逆相正弦波信号Sinθ−、正相余弦波信号Cosθ+、及び逆相余弦波信号Cosθ−の上限閾値Lim_H及び下限閾値Lim_Lを読み出す。 Difference calculation unit 171, a positive-phase sine wave signal sin [theta 1 + from EEPROM 104, reverse-phase sine wave signal sin [theta 1 -, positive phase cosine wave signal Cos? 1 +, and the negative phase cosine wave signal Cos? 1 - upper threshold Lim_H and lower Read the threshold value Lim_L.

正弦波差分演算部1711は、正相正弦波信号Sinθ+の入力値が、下限閾値Lim_L以上であり、且つ、上限閾値Lim_H以下(Lim_L≦Sinθ+≦Lim_H)であるか否かを判定する(ステップS11)。 The sine wave difference calculation unit 1711 determines whether or not the input value of the positive phase sine wave signal Sinθ 1 + is equal to or higher than the lower limit threshold Lim_L and lower than the upper limit threshold Lim_H (Lim_L ≦ Sinθ 1 + ≦ Lim_H). (Step S11).

正相正弦波信号Sinθ+の入力値が、下限閾値Lim_L以上であり、且つ、上限閾値Lim_H以下(Lim_L≦Sinθ+≦Lim_H)であるとき(ステップS11;Yes)、正弦波差分演算部1711は、正相正弦波信号Sinθ+の入力値が正常と判定し、正相正弦波信号入力値異常検知フラグERR1−1をリセットする(ステップS11a)。 When the input value of the positive phase sine wave signal Sinθ 1 + is equal to or higher than the lower limit threshold Lim_L and equal to or lower than the upper limit threshold Lim_H (Lim_L ≦ Sinθ 1 + ≦ Lim_H) (step S11; Yes), a sine wave difference calculation unit 1711 determines that the input value of the positive phase sine wave signal Sinθ 1 + is normal, and resets the positive phase sine wave signal input value abnormality detection flag ERR1-1 (step S11a).

正相正弦波信号Sinθ+の入力値が、下限閾値Lim_L未満であるか、又は、上限閾値Lim_Hよりも大きいとき(ステップS11;No)、正弦波差分演算部1711は、正相正弦波信号Sinθ+の入力値異常と判定し、正相正弦波信号入力値異常検知フラグERR1−1をセットする(ステップS11b)。 When the input value of the positive phase sine wave signal Sinθ 1 + is less than the lower limit threshold Lim_L or larger than the upper limit threshold Lim_H (step S11; No), the sine wave difference calculation unit 1711 outputs the positive phase sine wave signal. It is determined that the input value of Sinθ 1 + is abnormal, and the positive phase sine wave signal input value abnormality detection flag ERR1-1 is set (step S11b).

続いて、正弦波差分演算部1711は、逆相正弦波信号Sinθ−の入力値が、下限閾値Lim_L以上であり、且つ、上限閾値Lim_H以下(Lim_L≦Sinθ−≦Lim_H)であるか否かを判定する(ステップS12)。 Subsequently, the sine wave difference calculation unit 1711 determines whether or not the input value of the negative-phase sine wave signal Sinθ 1 − is equal to or greater than the lower limit threshold Lim_L and equal to or less than the upper limit threshold Lim_H (Lim_L ≦ Sinθ 1 − ≦ Lim_H). Is determined (step S12).

逆相正弦波信号Sinθ−の入力値が、下限閾値Lim_L以上であり、且つ、上限閾値Lim_H以下(Lim_L≦Sinθ−≦Lim_H)であるとき(ステップS12;Yes)、正弦波差分演算部1711は、逆相正弦波信号Sinθ−の入力値が正常と判定し、逆相正弦波信号入力値異常検知フラグERR1−2をリセットする(ステップS12a)。 When the input value of the negative-phase sine wave signal Sinθ 1 − is greater than or equal to the lower limit threshold Lim_L and less than or equal to the upper limit threshold Lim_H (Lim_L ≦ Sinθ 1 − ≦ Lim_H) (step S12; Yes), the sine wave difference calculation unit 1711 determines that the input value of the negative-phase sine wave signal Sinθ 1 − is normal, and resets the negative-phase sine wave signal input value abnormality detection flag ERR1-2 (step S12a).

逆相正弦波信号Sinθ−の入力値が、下限閾値Lim_L未満であるか、又は、上限閾値Lim_Hよりも大きいとき(ステップS12;No)、正弦波差分演算部1711は、逆相正弦波信号Sinθ−の入力値異常と判定し、逆相正弦波信号入力値異常検知フラグERR1−2をセットする(ステップS12b)。 When the input value of the negative phase sine wave signal Sinθ 1 − is less than the lower limit threshold Lim_L or larger than the upper limit threshold Lim_H (step S12; No), the sine wave difference calculation unit 1711 outputs the negative phase sine wave signal. It is determined that the input value of Sinθ 1 − is abnormal, and the negative phase sine wave signal input value abnormality detection flag ERR1-2 is set (step S12b).

続いて、余弦波差分演算部1712は、正相余弦波信号Cosθ+の値が、下限閾値Lim_L以上であり、且つ、上限閾値Lim_H以下(Lim_L≦Cosθ+≦Lim_H)であるか否かを判定する(ステップS13)。 Subsequently, the cosine wave difference calculation unit 1712 determines whether or not the value of the positive phase cosine wave signal Cosθ 1 + is equal to or greater than the lower limit threshold Lim_L and equal to or less than the upper limit threshold Lim_H (Lim_L ≦ Cosθ 1 + ≦ Lim_H). Is determined (step S13).

正相余弦波信号Cosθ+の値が、下限閾値Lim_L以上であり、且つ、上限閾値Lim_H以下(Lim_L≦Cosθ+≦Lim_H)であるとき(ステップS13;Yes)、余弦波差分演算部1712は、正相余弦波信号Cosθ+の入力値が正常と判定し、正相余弦波信号入力値異常検知フラグERR2−1をリセットする(ステップS13a)。 When the value of the positive phase cosine wave signal Cosθ 1 + is not less than the lower limit threshold Lim_L and not more than the upper limit threshold Lim_H (Lim_L ≦ Cosθ 1 + ≦ Lim_H) (step S13; Yes), the cosine wave difference calculation unit 1712 Determines that the input value of the positive phase cosine wave signal Cosθ 1 + is normal, and resets the positive phase cosine wave signal input value abnormality detection flag ERR2-1 (step S13a).

正相余弦波信号Cosθ+の値が、下限閾値Lim_L未満であるか、又は、上限閾値Lim_Hよりも大きいとき(ステップS13;No)、余弦波差分演算部1712は、正相余弦波信号Cosθ+の入力値異常と判定し、正相余弦波信号入力値異常検知フラグERR2−1をセットする(ステップS13b)。 When the value of the positive phase cosine wave signal Cosθ 1 + is less than the lower limit threshold Lim_L or larger than the upper limit threshold Lim_H (step S13; No), the cosine wave difference calculation unit 1712 outputs the positive phase cosine wave signal Cosθ. 1 + a is determined as an input value abnormality, setting the positive-phase cosine wave signal input value abnormality detection flag ERR2-1 (step S13b).

続いて、余弦波差分演算部1712は、逆相余弦波信号Cosθ−の値が、下限閾値Lim_L以上であり、且つ、上限閾値Lim_H以下(Lim_L≦Cosθ−≦Lim_H)であるか否かを判定する(ステップS14)。 Subsequently, the cosine wave difference calculation unit 1712 determines whether or not the value of the anti-phase cosine wave signal Cosθ 1 − is equal to or higher than the lower limit threshold Lim_L and lower than or equal to the upper limit threshold Lim_H (Lim_L ≦ Cosθ 1 − ≦ Lim_H). Is determined (step S14).

逆相余弦波信号Cosθ−の値が、下限閾値Lim_L以上であり、且つ、上限閾値Lim_H以下(Lim_L≦Cosθ−≦Lim_H)であるとき(ステップS14;Yes)、余弦波差分演算部1712は、逆相余弦波信号Cosθ−の入力値が正常と判定し、逆相余弦波信号入力値異常検知フラグERR2−2をリセットする(ステップS14a)。 When the value of the negative-phase cosine wave signal Cosθ 1 − is equal to or higher than the lower limit threshold Lim_L and equal to or lower than the upper limit threshold Lim_H (Lim_L ≦ Cosθ 1 − ≦ Lim_H) (step S14; Yes), the cosine wave difference calculation unit 1712 Determines that the input value of the anti-phase cosine wave signal Cosθ 1 − is normal, and resets the anti-phase cosine wave signal input value abnormality detection flag ERR2-2 (step S14a).

逆相余弦波信号Cosθ−の値が、下限閾値Lim_L未満であるか、又は、上限閾値Lim_Hよりも大きいとき(ステップS14;No)、余弦波差分演算部1712は、逆相余弦波信号Cosθ−の入力値異常と判定し、逆相余弦波信号入力値異常検知フラグERR2−2をセットする(ステップS14b)。 When the value of the anti-phase cosine wave signal Cosθ 1 − is less than the lower limit threshold Lim_L or larger than the upper limit threshold Lim_H (step S14; No), the cosine wave difference calculation unit 1712 outputs the anti-phase cosine wave signal Cosθ. It is determined that the input value is abnormal as 1- , and the anti-phase cosine wave signal input value abnormality detection flag ERR2-2 is set (step S14b).

続いて、差分演算部171は、EEPROM104から正弦波信号オフセット電圧DifSin1及び余弦波信号オフセット電圧DifCos1の上限閾値DifLim_H及び下限閾値DifLim_Lを読み出す。正弦波差分演算部1711は、上記(1)式を用いて、正弦波信号オフセット電圧DifSin1を算出する(ステップS15)。 Then, the difference calculation unit 171 reads the upper threshold DifLim_H and lower threshold DifLim_L sinusoidal signals offset voltage Dif Sin1 and cosine-wave signal offset voltage Dif Cos 1 from EEPROM 104. Sinusoidal difference calculation unit 1711, using the above equation (1), to calculate a sinusoidal signal offset voltage Dif Sin1 (step S15).

正弦波差分演算部1711は、正弦波信号オフセット電圧DifSin1の値が、下限閾値DifLim_L以上であり、且つ、上限閾値DifLim_H以下(DifLim_L≦DifSin1≦DifLim_H)であるか否かを判定する(ステップS16)。 Sinusoidal difference calculation unit 1711 determines the value of the sine wave signal offset voltage Dif Sin1 is, is at the lower threshold DifLim_L above, and, whether the upper limit threshold DifLim_H below (DifLim_L ≦ Dif Sin1 ≦ DifLim_H) ( step S16).

正弦波信号オフセット電圧DifSin1の値が、下限閾値DifLim_L以上であり、且つ、上限閾値DifLim_H以下(DifLim_L≦DifSin1≦DifLim_H)であるとき(ステップS16;Yes)、正弦波差分演算部1711は、正弦波信号オフセット電圧DifSin1のオフセット電圧値が正常と判定し、正弦波信号オフセット電圧値異常検知フラグERR3−1をリセットする(ステップS16a)。 The value of the sine wave signal offset voltage Dif Sin1 is, is at the lower threshold DifLim_L above, and, when it is less than the upper limit threshold DifLim_H (DifLim_L ≦ Dif Sin1 ≦ DifLim_H ) ( step S16; Yes), the sinusoidal difference calculation unit 1711, offset voltage value of the sine wave signal offset voltage Dif Sin1 is determined to be normal, and resets the sinusoidal signal offset voltage abnormality detection flag ERR3-1 (step S16a).

正弦波信号オフセット電圧DifSin1の値が、下限閾値DifLim_L未満であるか、又は、上限閾値DifLim_Hよりも大きいとき(ステップS16;No)、正弦波差分演算部1711は、正弦波信号オフセット電圧DifSin1のオフセット電圧値異常と判定し、正弦波信号オフセット電圧値異常検知フラグERR3−1をセットする(ステップS16b)。 The value of the sine wave signal offset voltage Dif Sin1 is either less than the lower threshold DifLim_L, or, when larger than the upper threshold DifLim_H (step S16; No), the sinusoidal difference calculation unit 1711, the sine wave signal offset voltage Dif Sin1 And the sine wave signal offset voltage value abnormality detection flag ERR3-1 is set (step S16b).

続いて、余弦波差分演算部1712は、上記(7)式を用いて、余弦波信号オフセット電圧DifCos1を算出する(ステップS17)。 Subsequently, the cosine wave difference calculation unit 1712 calculates the cosine wave signal offset voltage Dif Cos1 using the above equation (7) (step S17).

余弦波差分演算部1712は、余弦波信号オフセット電圧DifCos1の値が、下限閾値DifLim_L以上であり、且つ、上限閾値DifLim_H以下(DifLim_L≦DifCos1≦DifLim_H)であるか否かを判定する(ステップS18)。 The cosine wave difference calculation unit 1712 determines whether or not the value of the cosine wave signal offset voltage Dif Cos1 is equal to or higher than the lower limit threshold DifLim_L and equal to or lower than the upper limit threshold DifLim_H (DifLim_L ≦ Dif Cos1 ≦ DifLim_H) (step) S18).

余弦波信号オフセット電圧DifCos1の値が、下限閾値DifLim_L以上であり、且つ、上限閾値DifLim_H以下(DifLim_L≦DifCos1≦DifLim_H)であるとき(ステップS18;Yes)、余弦波差分演算部1712は、余弦波信号オフセット電圧DifCos1のオフセット電圧値が正常と判定し、余弦波信号オフセット電圧値異常検知フラグERR3−2をリセットし(ステップS18a)、図19に示す回転角検出処理手順に戻る。 When the value of the cosine wave signal offset voltage Dif Cos1 is equal to or higher than the lower limit threshold DifLim_L and equal to or lower than the upper limit threshold DifLim_H (DifLim_L ≦ Dif Cos 1 ≦ DifLim_H) (step S18; Yes), the cosine wave difference calculation unit 1712 It is determined that the offset voltage value of the cosine wave signal offset voltage Dif Cos1 is normal, the cosine wave signal offset voltage value abnormality detection flag ERR3-2 is reset (step S18a), and the process returns to the rotation angle detection processing procedure shown in FIG.

余弦波信号オフセット電圧DifCos1の値が、下限閾値DifLim_L未満であるか、又は、上限閾値DifLim_Hよりも大きいとき(ステップS18;No)、余弦波差分演算部1712は、余弦波信号オフセット電圧DifCos1のオフセット電圧値異常と判定し、余弦波信号オフセット電圧値異常検知フラグERR3−2をセットし(ステップS18b)、図19に示す回転角検出処理手順に戻る。 When the value of the cosine wave signal offset voltage Dif Cos1 is less than the lower limit threshold value DifLim_L or larger than the upper limit threshold value DifLim_H (step S18; No), the cosine wave difference calculation unit 1712 outputs the cosine wave signal offset voltage Dif Cos1. , The cosine wave signal offset voltage value abnormality detection flag ERR3-2 is set (step S18b), and the process returns to the rotation angle detection processing procedure shown in FIG.

差分演算部171の正弦波差分演算部1711は、上述した(6’)式を用いて、第1正弦波信号Sinθ1fを算出し、差分演算部171の余弦波差分演算部1712は、上述した(12’)式を用いて、第1余弦波信号Cosθ1fを算出する(ステップS101)。 The sine wave difference calculation unit 1711 of the difference calculation unit 171 calculates the first sine wave signal Sinθ 1f using the above-described equation (6 ′), and the cosine wave difference calculation unit 1712 of the difference calculation unit 171 described above. The first cosine wave signal Cosθ 1f is calculated using equation (12 ′) (step S101).

続いて、位置検出部17は、第1正弦波信号Sinθ1f及び第1余弦波信号Cosθ1fの最大値検出処理及び最小値検出処理を行う(ステップS2)。図22は、第1正弦波信号及び第1余弦波信号の最大値検出処理及び最小値検出処理の一例を示すフローチャートである。 Next, the position detection unit 17 performs the maximum value detection process and a minimum value detection process of the first sine-wave signal sin [theta 1f and the first cosine wave signal Cos? 1f (step S2). FIG. 22 is a flowchart illustrating an example of the maximum value detection process and the minimum value detection process of the first sine wave signal and the first cosine wave signal.

第1ゲイン補正部172は、EEPROM104からモータ20の回転数ωの上限閾値RS_Hを読み出す。第1ゲイン補正部172の回転数閾値判定部1723は、モータ20の回転数ωが上限閾値RS_H以下(ω≦RS_H)であるか否かを判定する(ステップS20)。   The first gain correction unit 172 reads the upper limit threshold value RS_H of the rotational speed ω of the motor 20 from the EEPROM 104. The rotation speed threshold determination unit 1723 of the first gain correction unit 172 determines whether the rotation speed ω of the motor 20 is equal to or lower than the upper limit threshold RS_H (ω ≦ RS_H) (step S20).

モータ20の回転数ωが上限閾値RS_Hよりも大きいとき(ステップS20;No)、回転数閾値判定部1723は、モータ20の回転数ωが第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び最小値MIN(Sinθ1f)、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)及び最小値MIN(Cosθ1f)の更新条件外と判定し、図19に示す回転角検出処理手順に戻る。すなわち、モータ20の回転数が第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び最小値MIN(Sinθ1f)、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)及び最小値MIN(Cosθ1f)の更新条件外と判定した場合には、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び最小値MIN(Sinθ1f)、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)及び最小値MIN(Cosθ1f)の更新を行わない。 When the rotation speed ω of the motor 20 is greater than the upper threshold RS_H (step S20; No), the rotational speed threshold value determination unit 1723, rotational speed ω of the motor 20 is the maximum value MAX (sin [theta 1f of the first sine-wave signal sin [theta 1f ) and the minimum value MIN (Sinθ 1f), determines that the update condition outside of the maximum value MAX of the first cosine wave signal Cos? 1f (Cos? 1f) and the minimum value MIN (Cos? 1f), the rotation angle detection processing procedure shown in FIG. 19 Return to. That is, the maximum value MAX (Sinθ 1f) and the minimum value MIN (Sinθ 1f) of the rotational speed of the motor 20 is first sine-wave signal sin [theta 1f, the maximum value MAX (Cos? 1f) and the minimum value of the first cosine wave signal Cos? 1f MIN when it is determined that the update condition outside (Cos? 1f), the maximum value MAX (Sinθ 1f) and the minimum value MIN of the first sine-wave signal Sinθ 1f (Sinθ 1f), the maximum value of the first cosine wave signal Cos? 1f The MAX (Cos θ 1f ) and the minimum value MIN (Cos θ 1f ) are not updated.

モータ20の回転数ωが上限閾値RS_H以下(ω≦RS_H)であるとき(ステップS20;Yes)、回転数閾値判定部1723は、モータ20の回転数ωが第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び最小値MIN(Sinθ1f)、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)及び最小値MIN(Cosθ1f)の更新条件を満たすと判定し、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び最小値MIN(Sinθ1f)、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)及び最小値MIN(Cosθ1f)の更新を許可する。 When the rotational speed ω of the motor 20 is equal to or lower than the upper limit threshold RS_H (ω ≦ RS_H) (step S20; Yes), the rotational speed threshold determination unit 1723 indicates that the rotational speed ω of the motor 20 is the maximum of the first sine wave signal Sinθ 1f . the value MAX (sin [theta 1f) and the minimum value MIN (Sinθ 1f), determines that the update condition is satisfied of the maximum value MAX of the first cosine wave signal Cosθ 1f (Cosθ 1f) and the minimum value MIN (Cos? 1f), and the first sine maximum value MAX wave signal Sinθ 1f (Sinθ 1f) and the minimum value MIN (Sinθ 1f), to allow updating of the maximum value MAX (Cos? 1f) and the minimum value MIN of the first cosine wave signal Cosθ 1f (Cosθ 1f).

続いて、第1ゲイン補正部172は、第1余弦波信号Cosθ1fのゼロ点(Cosθ1f=0)を検知する(ステップS21)。第1余弦波信号Cosθ1fのゼロ点を検知していない場合(ステップS21;No)、ステップS25の処理に移行する。 Subsequently, the first gain correction unit 172 detects the zero point (Cos θ 1f = 0) of the first cosine wave signal Cos θ 1f (step S21). When the zero point of the first cosine wave signal Cosθ 1f is not detected (step S21; No), the process proceeds to step S25.

第1余弦波信号Cosθ1fのゼロ点を検知すると(ステップS21;Yes)、第1ゲイン補正部172は、第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるか否かを判定する(ステップS22)。 Upon detecting the zero point of the first cosine wave signal Cos? 1f (step S21; Yes), the first gain correction portion 172, the value of the first sine-wave signal sin [theta 1f at the zero point detection of the first cosine wave signal Cos? 1f Is greater than or equal to 0 (Sinθ 1f ≧ 0) (step S22).

第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるとき(ステップS22;Yes)、第1ゲイン補正部172は、EEPROM104から第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の上限値MAX1Lim_H及び下限値MAX1Lim_Lを読み出し、第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最大値の下限値MAX1Lim_L以上であり、且つ、第1正弦波信号Sinθ1fの最大値の上限値MAX1Lim_H以下(MAX1Lim_L≦Sinθ1f≦MAX1Lim_H)であるか否かを判定する(ステップS22a)。 When the value of the first sine-wave signal sin [theta 1f at the zero point detection of the first cosine wave signal Cos? 1f is 0 or more (Sinθ 1f ≧ 0) (step S22; Yes), the first gain correction unit 172, EEPROM 104 from reading the upper limit value MAX1Lim_H and the lower limit value MAX1Lim_L of the maximum value MAX of the first sine-wave signal Sinθ 1f (Sinθ 1f) and a maximum value MAX (Cos? 1f) of the first cosine wave signal Cos? 1f, a first sine-wave signal sin [theta 1f or values, and the lower limit value MAX1Lim_L or more of the maximum value of the first sine-wave signal sin [theta 1f, and an upper limit value of the maximum value of the first sine-wave signal Sinθ 1f MAX1Lim_H below (MAX1Lim_L ≦ Sinθ 1f ≦ MAX1Lim_H) It is determined whether or not (step S22a).

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最大値の下限値MAX1Lim_L以上であり、且つ、第1正弦波信号Sinθ1fの最大値の上限値MAX1Lim_H以下(MAX1Lim_L≦Sinθ1f≦MAX1Lim_H)であるとき(ステップS22a;Yes)、第1ゲイン補正部172は、第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)としてRAM102上のデータを更新し(ステップS23a)、ステップS25の処理に移行する。 The value of the first sine-wave signal sin [theta 1f is, and the lower limit value MAX1Lim_L or more of the maximum value of the first sine-wave signal sin [theta 1f, and the upper limit value of the maximum value of the first sine-wave signal Sinθ 1f MAX1Lim_H below (MAX1Lim_L ≦ Sinθ when 1f ≦ MAX1Lim_H) is (step S22a; Yes), the first gain correction portion 172, the value of the first sine-wave signal sin [theta 1f maximum value MAX of the first sine-wave signal Sinθ 1f (Sinθ 1f) as the upper RAM102 Is updated (step S23a), and the process proceeds to step S25.

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最大値の下限値MAX1Lim_L未満であるか、又は、第1正弦波信号Sinθ1fの最大値の上限値MAX1Lim_Hよりも大きいとき(ステップS22a;No)、第1ゲイン補正部172の第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fの最大値異常と判定して正弦波信号最大値異常検知フラグERR4−1をセットし(ステップS24a)、ステップS25の処理に移行する。すなわち、第1正弦波信号Sinθ1fの最大値異常と判定した場合には、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)の更新を行わない。 The value of the first sine-wave signal sin [theta 1f is, the maximum value of either less than the lower limit MAX1Lim_L the first sine-wave signal sin [theta 1f, or, when larger than the upper limit value MAX1Lim_H of the maximum value of the first sine-wave signal sin [theta 1f (Step S22a; No), the first sine wave gain correction unit 1721 of the first gain correction unit 172 determines that the maximum value of the first sine wave signal Sinθ 1f is abnormal, and detects a sine wave signal maximum value abnormality detection flag ERR4-1. Is set (step S24a), and the process proceeds to step S25. That is, when it is determined that the maximum value of the first sine wave signal Sinθ 1f is abnormal, the maximum value MAX (Sinθ 1f ) of the first sine wave signal Sinθ 1f is not updated.

第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0未満(Sinθ1f<0)であるとき(ステップS22;No)、第1ゲイン補正部172は、EEPROM104から第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)及び第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の上限値MIN1Lim_H及び下限値MIN1Lim_Lを読み出し、第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最小値の下限値MIN1Lim_L以上であり、且つ、第1正弦波信号Sinθ1fの最小値の上限値MIN1Lim_H以下(MIN1Lim_L≦Sinθ1f≦MIN1Lim_H)であるか否かを判定する(ステップS22b)。 When the value of the first sine-wave signal sin [theta 1f at the zero point detection of the first cosine wave signal Cos? 1f is smaller than 0 (Sinθ 1f <0) (step S22; No), the first gain correction unit 172, EEPROM 104 from reading the upper limit value MIN1Lim_H and the lower limit value MIN1Lim_L the minimum value MIN of the first sine-wave signal Sinθ 1f (Sinθ 1f) and the minimum value MIN (Cos? 1f) of the first cosine wave signal Cos? 1f, a first sine-wave signal sin [theta 1f or values, and the lower limit value MIN1Lim_L than the minimum value of the first sine-wave signal sin [theta 1f, and an upper limit value of the minimum value of the first sine-wave signal Sinθ 1f MIN1Lim_H below (MIN1Lim_L ≦ Sinθ 1f ≦ MIN1Lim_H) It is determined whether or not (step S22b).

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最小値の下限値MIN1Lim_L以上であり、且つ、第1正弦波信号Sinθ1fの最小値の上限値MIN1Lim_H以下(MIN1Lim_L≦Sinθ1f≦MIN1Lim_H)であるとき(ステップS22b;Yes)、第1ゲイン補正部172は、第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)としてRAM102上のデータを更新し(ステップS23b)、ステップS25の処理に移行する。 The value of the first sine-wave signal sin [theta 1f is, and the lower limit value MIN1Lim_L than the minimum value of the first sine-wave signal sin [theta 1f, and the upper limit value of the minimum value of the first sine-wave signal Sinθ 1f MIN1Lim_H below (MIN1Lim_L ≦ Sinθ when 1f ≦ MIN1Lim_H) is (step S22b; Yes), the first gain correction portion 172, the value of the first sine-wave signal sin [theta 1f minimum value MIN of the first sine-wave signal Sinθ 1f (Sinθ 1f) as the upper RAM102 Is updated (step S23b), and the process proceeds to step S25.

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最小値の下限値MIN1Lim_L未満であるか、又は、第1正弦波信号Sinθ1fの最小値の上限値MIN1Lim_Hよりも大きいとき(ステップS22b;No)、第1ゲイン補正部172の第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fの最小値異常と判定して正弦波信号最小値異常検知フラグERR4−2をセットし(ステップS24b)、ステップS25の処理に移行する。すなわち、第1正弦波信号Sinθ1fの最小値異常と判定した場合には、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)の更新を行わない。 The value of the first sine-wave signal sin [theta 1f is, the minimum value of either less than the lower limit MIN1Lim_L the first sine-wave signal sin [theta 1f, or, when larger than the upper limit value MIN1Lim_H the minimum value of the first sine-wave signal sin [theta 1f (Step S22b; No), the first sine wave gain correction unit 1721 of the first gain correction unit 172 determines that the minimum value of the first sine wave signal Sinθ 1f is abnormal and detects a sine wave signal minimum value abnormality detection flag ERR4-2. Is set (step S24b), and the process proceeds to step S25. That is, when it is determined that the minimum value of the first sine wave signal Sinθ 1f is abnormal, the minimum value MIN (Sinθ 1f ) of the first sine wave signal Sinθ 1f is not updated.

続いて、第1ゲイン補正部172は、第1正弦波信号Sinθ1fのゼロ点(Sinθ1f=0)を検知する(ステップS25)。第1正弦波信号Sinθ1fのゼロ点を検知していない場合(ステップS25;No)、図19に示す回転角検出処理手順に戻る。 Subsequently, the first gain correction unit 172 detects the zero point (Sinθ 1f = 0) of the first sine wave signal Sinθ 1f (step S25). When the zero point of the first sine wave signal Sinθ 1f is not detected (step S25; No), the process returns to the rotation angle detection processing procedure shown in FIG.

第1正弦波信号Sinθ1fのゼロ点を検知すると(ステップS25;Yes)、第1ゲイン補正部172は、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるか否かを判定する(ステップS26)。 Upon detecting the zero point of the first sine-wave signal sin [theta 1f (step S25; Yes), the first gain correction portion 172, the value of the first cosine wave signal Cos? 1f at the zero point detection of the first sine-wave signal sin [theta 1f Is greater than or equal to 0 (Cos θ 1f ≧ 0) (step S26).

第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるとき(ステップS26;Yes)、第1ゲイン補正部172は、EEPROM104から第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の上限値MAX1Lim_H及び下限値MAX1Lim_Lを読み出し、第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最大値の下限値MAX1Lim_L以上であり、且つ、第1余弦波信号Cosθ1fの最大値の上限値MAX1Lim_H以下(MAX1Lim_L≦Cosθ1f≦MAX1Lim_H)であるか否かを判定する(ステップS26a)。 When the value of the first cosine wave signal Cos? 1f at the zero point detection of the first sine-wave signal sin [theta 1f is 0 or more (Cosθ 1f ≧ 0) (step S26; Yes), the first gain correction unit 172, EEPROM 104 from reading the upper limit value MAX1Lim_H and the lower limit value MAX1Lim_L of the maximum value MAX of the first sine-wave signal Sinθ 1f (Sinθ 1f) and a maximum value MAX (Cos? 1f) of the first cosine wave signal Cos? 1f, the first cosine wave signal Cos? 1f or values, and the lower limit value MAX1Lim_L or more of the maximum value of the first cosine wave signal Cos? 1f, and an upper limit value of the maximum value of the first cosine wave signal Cosθ 1f MAX1Lim_H below (MAX1Lim_L ≦ Cosθ 1f ≦ MAX1Lim_H) It is determined whether or not (step S26a).

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最大値の下限値MAX1Lim_L以上であり、且つ、第1余弦波信号Cosθ1fの最大値の上限値MAX1Lim_H以下(MAX1Lim_L≦Cosθ1f≦MAX1Lim_H)であるとき(ステップS26a;Yes)、第1ゲイン補正部172は、第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)としてRAM102上のデータを更新し(ステップS27a)、図19に示す回転角検出処理手順に戻る。 The value of the first cosine wave signal Cos? 1f is, and the lower limit value MAX1Lim_L or more of the maximum value of the first cosine wave signal Cos? 1f, and the upper limit value of the maximum value of the first cosine wave signal Cosθ 1f MAX1Lim_H below (MAX1Lim_L ≦ Cosθ when 1f ≦ MAX1Lim_H) is (step S26a; Yes), the first gain correction portion 172, the value of the first cosine wave signal Cos? 1f maximum value MAX of the first cosine wave signal Cos? 1f (Cos? 1f) as the upper RAM102 Is updated (step S27a), and the process returns to the rotation angle detection processing procedure shown in FIG.

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最大値の下限値MAX1Lim_L未満であるか、又は、第1余弦波信号Cosθ1fの最大値の上限値MAX1Lim_Hよりも大きいとき(ステップS26a;No)、第1ゲイン補正部172の第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fの最大値異常と判定して余弦波信号最大値異常検知フラグERR5−1をセットし(ステップS28a)、図19に示す回転角検出処理手順に戻る。すなわち、第1余弦波信号Cosθ1fの最大値異常と判定した場合には、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の更新を行わない。 The value of the first cosine wave signal Cos? 1f is either less than the lower limit MAX1Lim_L of the maximum value of the first cosine wave signal Cos? 1f, or, when larger than the upper limit value MAX1Lim_H of the maximum value of the first cosine wave signal Cos? 1f (Step S26a; No), the first cosine wave gain correction unit 1722 of the first gain correction unit 172 determines that the maximum value of the first cosine wave signal Cosθ 1f is abnormal and detects the cosine wave signal maximum value abnormality detection flag ERR5-1. Is set (step S28a), and the process returns to the rotation angle detection processing procedure shown in FIG. That is, when it is determined that the maximum value of the first cosine wave signal Cosθ 1f is abnormal, the maximum value MAX (Cosθ 1f ) of the first cosine wave signal Cosθ 1f is not updated.

第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0未満(Cosθ1f<0)であるとき(ステップS26;No)、第1ゲイン補正部172は、EEPROM104から第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)及び第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の上限値MIN1Lim_H及び下限値MIN1Lim_Lを読み出し、第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最小値の下限値MIN1Lim_L以上であり、且つ、第1余弦波信号Cosθ1fの最小値の上限値MIN1Lim_H以下(MIN1Lim_L≦Cosθ1f≦MIN1Lim_H)であるか否かを判定する(ステップS26b)。 When the value of the first cosine wave signal Cos? 1f at the zero point detection of the first sine-wave signal sin [theta 1f is smaller than 0 (Cosθ 1f <0) (step S26; No), the first gain correction unit 172, EEPROM 104 from reading the upper limit value MIN1Lim_H and the lower limit value MIN1Lim_L the minimum value MIN of the first sine-wave signal Sinθ 1f (Sinθ 1f) and the minimum value MIN (Cos? 1f) of the first cosine wave signal Cos? 1f, the first cosine wave signal Cos? 1f or values, and the lower limit value MIN1Lim_L than the minimum value of the first cosine wave signal Cos? 1f, and an upper limit value of the minimum value of the first cosine wave signal Cosθ 1f MIN1Lim_H below (MIN1Lim_L ≦ Cosθ 1f ≦ MIN1Lim_H) It is determined whether or not (step S26b).

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最小値の下限値MIN1Lim_L以上であり、且つ、第1余弦波信号Cosθ1fの最小値の上限値MIN1Lim_H以下(MIN1Lim_L≦Cosθ1f≦MIN1Lim_H)であるとき(ステップS26b;Yes)、第1ゲイン補正部172は、第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)としてRAM102上のデータを更新し(ステップS27b)、図19に示す回転角検出処理手順に戻る。 The value of the first cosine wave signal Cos? 1f is, and the lower limit value MIN1Lim_L than the minimum value of the first cosine wave signal Cos? 1f, and the upper limit value of the minimum value of the first cosine wave signal Cosθ 1f MIN1Lim_H below (MIN1Lim_L ≦ Cosθ when 1f ≦ MIN1Lim_H) is (step S26b; Yes), the first gain correction portion 172, the value of the first cosine wave signal Cos? 1f minimum value MIN of the first cosine wave signal Cos? 1f (Cos? 1f) as the upper RAM102 Is updated (step S27b), and the process returns to the rotation angle detection processing procedure shown in FIG.

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最小値の下限値MIN1Lim_L未満であるか、又は、第1余弦波信号Cosθ1fの最小値の上限値MIN1Lim_Hよりも大きいとき(ステップS26b;No)、第1ゲイン補正部172の第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fの最小値異常と判定して余弦波信号最小値異常検知フラグERR5−2をセットし(ステップS28b)、図19に示す回転角検出処理手順に戻る。すなわち、第1余弦波信号Cosθ1fの最小値異常と判定した場合には、第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の更新を行わない。 The value of the first cosine wave signal Cos? 1f is either less than the lower limit MIN1Lim_L the minimum value of the first cosine wave signal Cos? 1f, or, when larger than the upper limit value MIN1Lim_H the minimum value of the first cosine wave signal Cos? 1f (Step S26b; No), the first cosine wave gain correction unit 1722 of the first gain correction unit 172 determines that the minimum value of the first cosine wave signal Cosθ 1f is abnormal and detects the cosine wave signal minimum value abnormality detection flag ERR5-2. Is set (step S28b), and the process returns to the rotation angle detection processing procedure shown in FIG. That is, when it is determined that the minimum value of the first cosine wave signal Cosθ 1f is abnormal, the minimum value MIN (Cosθ 1f ) of the first cosine wave signal Cosθ 1f is not updated.

図19に示す回転角検出処理手順に戻り、第1ゲイン補正部172の第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるか否かを判定する(ステップS102a)。 Returning to the rotation angle detection processing procedure shown in FIG. 19, the first sine wave gain correction unit 1721 of the first gain correction unit 172 determines whether the value of the first sine wave signal Sinθ 1f is 0 or more (Sinθ 1f ≧ 0). It is determined whether or not (step S102a).

第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるとき(ステップS102a;Yes)、第1正弦波ゲイン補正部1721は、上述した(13’)式を用いて、第2正弦波信号Sinθ1gを算出する(ステップS103a)。 When the value of the first sine wave signal Sinθ 1f is greater than or equal to 0 (Sinθ 1f ≧ 0) (step S102a; Yes), the first sine wave gain correction unit 1721 uses the equation (13 ′) described above to calculate A 2-sine wave signal Sinθ 1g is calculated (step S103a).

第1正弦波信号Sinθ1fの値が0未満(Sinθ1f<0)であるとき(ステップS102a;No)、第1正弦波ゲイン補正部1721は、上述した(14’)式を用いて、第2正弦波信号Sinθ1gを算出する(ステップS104a)。 When the value of the first sine wave signal Sinθ 1f is less than 0 (Sinθ 1f <0) (step S102a; No), the first sine wave gain correction unit 1721 uses the equation (14 ′) described above to calculate A two sine wave signal Sinθ 1g is calculated (step S104a).

第1ゲイン補正部172の第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるか否かを判定する(ステップS102b)。 The first cosine wave gain correction unit 1722 of the first gain correction unit 172 determines whether or not the value of the first cosine wave signal Cosθ 1f is greater than or equal to 0 (Cosθ 1f ≧ 0) (step S102b).

第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるとき(ステップS102b;Yes)、第1余弦波ゲイン補正部1722は、上述した(15’)式を用いて、第2余弦波信号Cosθ1gを算出する(ステップS103b)。 When the value of the first cosine wave signal Cosθ 1f is equal to or greater than 0 (Cosθ 1f ≧ 0) (step S102b; Yes), the first cosine wave gain correction unit 1722 uses the equation (15 ′) described above to The two cosine wave signal Cosθ 1g is calculated (step S103b).

第1余弦波信号Cosθ1fの値が0未満(Cosθ1f<0)であるとき(ステップS102b;No)、第1余弦波ゲイン補正部1722は、上述した(16’)式を用いて、第2余弦波信号Cosθ1gを算出する(ステップS104b)。 When the value of the first cosine wave signal Cosθ 1f is less than 0 (Cosθ 1f <0) (step S102b; No), the first cosine wave gain correction unit 1722 uses the equation (16 ′) described above to calculate The two cosine wave signal Cosθ 1g is calculated (step S104b).

第2ゲイン補正部173の位相変換部1733は、上述した(17)式を用いて、第2正弦波信号Sinθ1gを位相変換した第3正弦波信号VC+Sを算出すると共に、上述した(18)式を用いて、第2余弦波信号Cosθ1gを位相変換した第3余弦波信号VC−Sを算出する(ステップS105)。 The phase conversion unit 1733 of the second gain correction unit 173 calculates the third sine wave signal V C + S obtained by phase-converting the second sine wave signal Sinθ 1g using the above-described equation (17), and also described above (18 ) Is used to calculate a third cosine wave signal V C-S obtained by phase conversion of the second cosine wave signal Cosθ 1g (step S105).

続いて、位置検出部17は、第3正弦波信号VC+S及び第3余弦波信号VC−Sの最大値検出処理及び最小値検出処理を行う(ステップS3)。図23は、第3正弦波信号及び第3余弦波信号の最大値検出処理及び最小値検出処理の一例を示すフローチャートである。 Subsequently, the position detection unit 17 performs maximum value detection processing and minimum value detection processing of the third sine wave signal V C + S and the third cosine wave signal V C-S (step S3). FIG. 23 is a flowchart illustrating an example of the maximum value detection process and the minimum value detection process of the third sine wave signal and the third cosine wave signal.

第2ゲイン補正部173は、第3余弦波信号VC−Sのゼロ点(VC−S=0)を検知する(ステップS31)。第3余弦波信号VC−Sのゼロ点を検知していない場合(ステップS31;No)、ステップS35の処理に移行する。 The second gain correction unit 173 detects the zero point (V C−S = 0) of the third cosine wave signal V C−S (step S31). If not detected zero point of the third cosine wave signal V C-S (step S31; No), the process proceeds to step S35.

第3余弦波信号VC−Sのゼロ点を検知すると(ステップS31;Yes)、第2ゲイン補正部173は、第3余弦波信号VC−Sのゼロ点検出時における第3正弦波信号VC+Sの値が0以上(VC+S≧0)であるか否かを判定する(ステップS32)。 When the zero point of the third cosine wave signal V C-S is detected (step S31; Yes), the second gain correction unit 173 detects the third sine wave signal when the zero point of the third cosine wave signal V C-S is detected. It is determined whether or not the value of V C + S is 0 or more (V C + S ≧ 0) (step S32).

第3余弦波信号VC−Sのゼロ点検出時における第3正弦波信号VC+Sの値が0以上(VC+S≧0)であるとき(ステップS32;Yes)、第2ゲイン補正部173は、第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最大値MAX(VC+S)としてRAM102上のデータを更新し(ステップS33)、ステップS35の処理に移行する。 When the value of the third sine wave signal V C + S at the time of detecting the zero point of the third cosine wave signal V C-S is 0 or more (V C + S ≧ 0) (step S32; Yes), the second gain correction unit 173 , the value of the third sinusoidal signal V C + S updates the data on the RAM102 as the maximum value MAX of the third sinusoidal signal V C + S (V C + S) ( step S33), and the process proceeds to step S35.

第3余弦波信号VC−Sのゼロ点検出時における第3正弦波信号VC+Sの値が0未満(VC+S<0)であるとき(ステップS32;No)、第2ゲイン補正部173は、第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最小値MIN(VC+S)としてRAM102上のデータを更新し(ステップS34)、ステップS35の処理に移行する。 When the value of the third sine wave signal V C + S at the time of detecting the zero point of the third cosine wave signal V C-S is less than 0 (V C + S <0) (step S32; No), the second gain correction unit 173 , the value of the third sinusoidal signal V C + S updates the data on the RAM102 as the minimum value MIN of the third sinusoidal signal V C + S (V C + S) ( step S34), and the process proceeds to step S35.

続いて、第2ゲイン補正部173は、第3正弦波信号VC+Sのゼロ点(VC+S=0)を検知する(ステップS35)。第3正弦波信号VC+Sのゼロ点を検知していない場合(ステップS35;No)、図19に示す回転角検出処理手順に戻る。 Subsequently, the second gain correction unit 173 detects the zero point (V C + S = 0) of the third sine wave signal V C + S (step S35). When the zero point of the third sine wave signal V C + S is not detected (step S35; No), the process returns to the rotation angle detection processing procedure shown in FIG.

第3正弦波信号VC+Sのゼロ点を検知すると(ステップS35;Yes)、第2ゲイン補正部173は、第3正弦波信号VC+Sのゼロ点検出時における第3余弦波信号VC−Sの値が0以上(VC−S≧0)であるか否かを判定する(ステップS36)。 When the zero point of the third sine wave signal V C + S is detected (step S35; Yes), the second gain correction unit 173 detects the third cosine wave signal V C-S when the zero point of the third sine wave signal V C + S is detected. It is determined whether or not the value of is greater than or equal to 0 (V C−S ≧ 0) (step S36).

第3正弦波信号VC+Sのゼロ点検出時における第3余弦波信号VC−Sの値が0以上(VC−S≧0)であるとき(ステップS36;Yes)、第2ゲイン補正部173は、第3余弦波信号VC−Sの値を第3余弦波信号VC−Sの最大値MAX(VC−S)としてRAM102上のデータを更新し(ステップS37)、図19に示す回転角検出処理手順に戻る。 When the value of the third cosine wave signal V C-S when the zero point of the third sine wave signal V C + S is detected is 0 or more (V C-S ≧ 0) (step S36; Yes), the second gain correction unit 173, the value of the third cosine wave signal V C-S and updates the data in the RAM102 as the maximum value MAX of the third cosine wave signal V C-S (V C- S) ( step S37), FIG. 19 The procedure returns to the rotation angle detection processing procedure shown.

第3正弦波信号VC+Sのゼロ点検出時における第3余弦波信号VC−Sの値が0未満(VC−S<0)であるとき(ステップS36;No)、第2ゲイン補正部173は、第3余弦波信号VC−Sの値を第3余弦波信号VC−Sの最小値MIN(VC−S)としてRAM102上のデータを更新し(ステップS38)、図19に示す回転角検出処理手順に戻る。 When the value of the third cosine wave signal V C-S when the zero point of the third sine wave signal V C + S is detected is less than 0 (V C-S <0) (step S36; No), the second gain correction unit 173, the value of the third cosine wave signal V C-S and updates the data in the RAM102 as the minimum value MIN of the third cosine wave signal V C-S (V C- S) ( step S38), FIG. 19 The procedure returns to the rotation angle detection processing procedure shown.

なお、上記のステップS3では、第3正弦波信号VC+Sの最大値MAX(VC+S)、第3正弦波信号VC+Sの最小値MIN(VC+S)、第3余弦波信号VC−Sの最大値MAX(VC−S)、及び第3余弦波信号VC−Sの最小値MIN(VC−S)を更新する例を示したが、第3正弦波信号VC+Sの最大値MAX(VC+S)、第3正弦波信号VC+Sの最小値MIN(VC+S)、第3余弦波信号VC−Sの最大値MAX(VC−S)、及び第3余弦波信号VC−Sの最小値MIN(VC−S)の値は、位相差の変化で変わるが、これは温度依存性が低く、経年変化も少ない。このため、第3正弦波信号VC+Sの最大値MAX(VC+S)及び第3余弦波信号VC−Sの最大値MAX(VC−S)を初期値MAX2Refとし、第3正弦波信号VC+Sの最小値MIN(VC+S)及び第3余弦波信号VC−Sの最大値MAX(VC−S)を初期値MIN2Refとして更新しない態様であっても良い。 In the above step S3, the maximum value of the third sinusoidal signal V C + S MAX (V C + S), the minimum value MIN (V C + S) of the third sinusoidal signal V C + S, the third cosine wave signal V C-S Although an example in which the maximum value MAX (V C-S ) and the minimum value MIN (V C-S ) of the third cosine wave signal V C-S are updated is shown, the maximum value MAX of the third sine wave signal V C + S is shown. (V C + S), the minimum value MIN of the third sinusoidal signal V C + S (V C + S), the maximum value of the third cosine wave signal V C-S MAX (V C -S), and the third cosine wave signal V C- the value of S the minimum value MIN of (V C-S) will vary with change in the phase difference, which has a low temperature dependence, less secular change. Therefore, the third sinusoidal signal V C + maximum value MAX (V C + S) of S and the maximum value MAX of the third cosine wave signal V C-S and (V C-S) as the initial value MAX2Ref, third sine wave signal V C + minimum value MIN of S (V C + S) and a maximum value MAX of the third cosine wave signal V C-S and (V C-S) may be a mode that does not update the initial value MIN2Ref.

図19に示す回転角検出処理手順に戻り、第2ゲイン補正部173の第2正弦波ゲイン補正部1731は、第3正弦波信号VC+Sの値が0以上(VC+S≧0)であるか否かを判定する(ステップS106a)。 Returning to the rotation angle detection processing procedure shown in FIG. 19, the second sine wave gain correction unit 1731 of the second gain correction unit 173 determines whether the value of the third sine wave signal V C + S is 0 or more (V C + S ≧ 0). It is determined whether or not (step S106a).

第3正弦波信号VC+Sの値が0以上(VC+S≧0)であるとき(ステップS106a;Yes)、第2正弦波ゲイン補正部1731は、上述した(19’)式を用いて、第4正弦波信号V1C+Sを算出する(ステップS107a)。 When the value of the third sine wave signal V C + S is equal to or greater than 0 (V C + S ≧ 0) (step S106a; Yes), the second sine wave gain correction unit 1731 uses the equation (19 ′) described above to calculate A 4-sine wave signal V1 C + S is calculated (step S107a).

第3正弦波信号VC+Sの値が0未満(VC+S<0)であるとき(ステップS106a;No)、第2正弦波ゲイン補正部1731は、上述した(20’)式を用いて、第4正弦波信号V1C+Sを算出する(ステップS108a)。 When the value of the third sine wave signal V C + S is less than 0 (V C + S <0) (step S106a; No), the second sine wave gain correction unit 1731 uses the equation (20 ′) described above to calculate A 4-sine wave signal V1 C + S is calculated (step S108a).

第2ゲイン補正部173の第2余弦波ゲイン補正部1732は、第3余弦波信号VC−Sの値が0以上(VC−S≧0)であるか否かを判定する(ステップS106b)。 The second cosine wave gain correction unit 1732 of the second gain correction unit 173 determines whether or not the value of the third cosine wave signal V C-S is 0 or more (V C−S ≧ 0) (step S106b). ).

第3余弦波信号VC−Sの値が0以上(VC−S≧0)であるとき(ステップS106b;Yes)、第2余弦波ゲイン補正部1732は、上述した(21’)式を用いて、第4余弦波信号V1C−Sを算出する(ステップS107b)。 When the value of the third cosine wave signal V C-S is equal to or greater than 0 (V C−S ≧ 0) (step S106b; Yes), the second cosine wave gain correction unit 1732 calculates the above-described equation (21 ′). The fourth cosine wave signal V1C -S is calculated by using (Step S107b).

第3余弦波信号VC−Sの値が0未満(VC−S<0)であるとき(ステップS106b;No)、第2余弦波ゲイン補正部1732は、上述した(22’)式を用いて、第4余弦波信号V1C−Sを算出する(ステップS108b)。 When the value of the third cosine wave signal V C-S is less than 0 (V C-S <0) (step S106b; No), the second cosine wave gain correction unit 1732 uses the expression (22 ′) described above. The fourth cosine wave signal V1C -S is calculated by using (Step S108b).

角度算出部174の逆正接演算部1741は、上述した(23)式を用いて、−90deg<θ1h<+90degの範囲内における角度θ1hを算出する(ステップS109)。 The arc tangent calculation unit 1741 of the angle calculation unit 174 calculates the angle θ 1h within the range of −90 deg <θ 1h <+90 deg using the above-described equation (23) (step S109).

角度算出部174の象限判定部1742は、第4余弦波信号V1C−Sが0以上(V1C−S≧0)であるか否かを判定する(ステップS110)。 The quadrant determination unit 1742 of the angle calculation unit 174 determines whether or not the fourth cosine wave signal V1 C-S is 0 or more (V1 C−S ≧ 0) (step S110).

第4余弦波信号V1C−Sが0以上(V1C−S≧0)であるとき(ステップS110;Yes)、象限判定部1742は、上述した(24)式を用いて、0deg<θ<360degの範囲内におけるモータ20の回転角θを算出する(ステップS111)。 When the fourth cosine wave signal V1 C-S is equal to or greater than 0 (V1 C-S ≧ 0) (step S110; Yes), the quadrant determination unit 1742 uses the above-described equation (24), and 0 deg <θ 1 The rotation angle θ 1 of the motor 20 within the range of <360 deg is calculated (step S111).

第4余弦波信号V1C−Sが0未満(V1C−S<0)であるとき(ステップS110;No)、象限判定部1742は、上述した(25)式を用いて、0deg<θ<360degの範囲内におけるモータ20の回転角θを算出する(ステップS112)。 When the fourth cosine wave signal V1 C-S is less than 0 (V1 C-S <0) (step S110; No), the quadrant determination unit 1742 uses the above-described equation (25), and 0 deg <θ 1 The rotation angle θ 1 of the motor 20 within the range of <360 deg is calculated (step S112).

モータ電気角演算部1743は、象限判定部1742によって算出されたモータ20の回転角θに基づき、モータ20の磁極対数に対応し、電流制御の基準点にオフセット調整した電気角θを算出する(ステップS113)。 Based on the rotation angle θ 1 of the motor 20 calculated by the quadrant determination unit 1742, the motor electrical angle calculation unit 1743 calculates an electrical angle θ 2 corresponding to the number of magnetic pole pairs of the motor 20 and offset adjusted to the reference point for current control. (Step S113).

以上のステップS1からS113までの処理を、所定のサンプリング周期(例えば、250μs)で繰り返し実行することで、リアルタイムでモータ20の磁極対数に対応する電気角θが補正されるので、温度ドリフトや経時変化によって検出精度が低下することを抑制することができ、高い検出精度を維持することができる。 The processing up to S113 above steps S1, a predetermined sampling period (e.g., 250 [mu] s) by repeatedly executing, since electrical angle theta 2 which corresponds to the magnetic pole logarithm of the motor 20 in real time is corrected, Ya temperature drift A decrease in detection accuracy due to a change with time can be suppressed, and high detection accuracy can be maintained.

なお、上述した例において、回転角検出装置200は、モータ20の電気角θを出力する態様について説明したが、図2及び図7に示すように、モータ20の回転角θを出力する態様であっても良い。 In addition, in the example mentioned above, although the rotation angle detection apparatus 200 demonstrated the aspect which outputs the electrical angle (theta) 2 of the motor 20, as shown in FIG.2 and FIG.7, the rotation angle (theta) 1 of the motor 20 is output. An aspect may be sufficient.

次に、実施形態に係る回転角検出装置200を用いた電動パワーステアリング装置100における回転角検出装置200の故障判定処理について説明する。   Next, a failure determination process of the rotation angle detection device 200 in the electric power steering apparatus 100 using the rotation angle detection device 200 according to the embodiment will be described.

制御用コンピュータ110は、差分演算部171の正弦波差分演算部1711によってセット又はリセットされる正相正弦波信号入力値異常検知フラグERR1−1、逆相正弦波信号入力値異常検知フラグERR1−2、及び正弦波信号オフセット電圧値異常検知フラグERR3−1、を監視し、各異常検知フラグのセット検出回数をカウントすることによって、回転角検出装置200の故障を検知し、所定のエラー処理を行う機能を有している。   The control computer 110 includes a positive phase sine wave signal input value abnormality detection flag ERR1-1 and a negative phase sine wave signal input value abnormality detection flag ERR1-2 that are set or reset by the sine wave difference calculation unit 1711 of the difference calculation unit 171. And the sine wave signal offset voltage value abnormality detection flag ERR3-1, and by detecting the number of times of detection detection of each abnormality detection flag, a failure of the rotation angle detection device 200 is detected and predetermined error processing is performed. It has a function.

また、制御用コンピュータ110は、差分演算部171の余弦波差分演算部1712によってセット又はリセットされる正相余弦波信号入力値異常検知フラグERR2−1、逆相余弦波信号入力値異常検知フラグERR2−2、及び余弦波信号オフセット電圧値異常検知フラグERR3−2、を監視し、各異常検知フラグのセット検出回数をカウントすることによって、回転角検出装置200の故障を検知し、所定のエラー処理を行う機能を有している。   Further, the control computer 110 includes a positive phase cosine wave signal input value abnormality detection flag ERR2-1 and a negative phase cosine wave signal input value abnormality detection flag ERR2 that are set or reset by the cosine wave difference calculation unit 1712 of the difference calculation unit 171. -2 and cosine wave signal offset voltage value abnormality detection flag ERR3-2, and by detecting the number of times of detection detection of each abnormality detection flag, a failure of rotation angle detection device 200 is detected, and predetermined error processing is performed. It has a function to perform.

また、制御用コンピュータ110は、第1ゲイン補正部172の第1正弦波ゲイン補正部1721によってセット又はリセットされる正弦波信号最大値異常検知フラグERR4−1及び正弦波信号最小値異常検知フラグERR4−2、を監視し、各異常検知フラグのセット検出回数をカウントすることによって、回転角検出装置200の故障を検知し、所定のエラー処理を行う機能を有している。   The control computer 110 also sets the sine wave signal maximum value abnormality detection flag ERR4-1 and the sine wave signal minimum value abnormality detection flag ERR4 that are set or reset by the first sine wave gain correction unit 1721 of the first gain correction unit 172. 2 is monitored, and the failure detection of the rotation angle detection device 200 is detected by counting the number of times the abnormality detection flag is set, and a predetermined error process is performed.

また、制御用コンピュータ110は、第1ゲイン補正部172の第1余弦波ゲイン補正部1722によってセット又はリセットされる余弦波信号最大値異常検知フラグERR5−1及び余弦波信号最小値異常検知フラグERR5−2を監視し、各異常検知フラグのセット検出回数をカウントすることによって、回転角検出装置200の故障を検知し、所定のエラー処理を行う機能を有している。   Further, the control computer 110 sets the cosine wave signal maximum value abnormality detection flag ERR5-1 and the cosine wave signal minimum value abnormality detection flag ERR5 that are set or reset by the first cosine wave gain correction unit 1722 of the first gain correction unit 172. -2 is monitored, and the malfunction detection flag is detected by counting the number of times the abnormality detection flag is set, and a predetermined error process is performed.

図24は、位置検出センサのみを2つ設けた構成例を示す図である。図25は、モータ、位置検出センサ、及び位置検出部をそれぞれ2つ設けた構成例を示す図である。   FIG. 24 is a diagram illustrating a configuration example in which only two position detection sensors are provided. FIG. 25 is a diagram illustrating a configuration example in which two motors, two position detection sensors, and two position detection units are provided.

制御用コンピュータ110が行うエラー処理としては、例えば、図24に示すように、2つの位置検出センサ25−1,25−2を設けた構成において、位置検出センサ25−1を用いて上述した回転角検出処理を実施しているときに故障判定した場合に、位置検出センサ25−2を用いて回転角検出処理を継続して行うことが考えられる。   As the error processing performed by the control computer 110, for example, as shown in FIG. 24, in the configuration in which the two position detection sensors 25-1 and 25-2 are provided, the rotation described above using the position detection sensor 25-1. If a failure is determined while the angle detection process is being performed, the rotation angle detection process may be continued using the position detection sensor 25-2.

また、例えば、図25に示すように、モータ20−1と位置検出センサ25−1と位置検出部17−1とを含めた駆動系300−1と、モータ20−2と位置検出センサ25−2と位置検出部17−2とを含めた駆動系300−2とを設けた構成において、通常は、駆動系300−1と駆動系300−2との両方で100%のアシスト制御を行っているが、駆動系300−1の回転角検出装置200−1において故障を検知した場合に、駆動系300−1での位置検出を停止し、駆動系300−2のみで50%のアシスト制御を継続することが考えられる。また、同様に、駆動系300−2の回転角検出装置200−2において故障を検知した場合に、駆動系300−2での位置検出を停止し、駆動系300−1のみで50%のアシスト制御を継続することが考えられる。   For example, as shown in FIG. 25, the drive system 300-1, including the motor 20-1, the position detection sensor 25-1, and the position detection unit 17-1, the motor 20-2, and the position detection sensor 25-. 2 and the drive system 300-2 including the position detection unit 17-2, normally 100% assist control is performed in both the drive system 300-1 and the drive system 300-2. However, when a failure is detected in the rotation angle detection device 200-1 of the drive system 300-1, position detection in the drive system 300-1 is stopped, and 50% assist control is performed only by the drive system 300-2. It is possible to continue. Similarly, when a failure is detected in the rotation angle detection device 200-2 of the drive system 300-2, position detection in the drive system 300-2 is stopped, and 50% assist is provided only in the drive system 300-1. It is conceivable to continue the control.

また、回転角検出処理が実施できなくなった場合に、アシスト制御を停止させることも考えられる。   It is also conceivable to stop the assist control when the rotation angle detection process cannot be performed.

なお、上述したエラー処理は一例であり、これらに限定されない。   The error processing described above is an example, and the present invention is not limited to these.

以下、本実施形態に係る回転角検出装置200の故障判定処理について説明する。図26は、実施形態に係る回転角検出装置の故障判定処理手順の一例を示すフローチャートである。   Hereinafter, the failure determination process of the rotation angle detection device 200 according to the present embodiment will be described. FIG. 26 is a flowchart illustrating an example of a failure determination processing procedure of the rotation angle detection device according to the embodiment.

以下の説明では、上述した正相正弦波信号入力値異常検知フラグERR1−1、逆相正弦波信号入力値異常検知フラグERR1−2、正弦波信号オフセット電圧値異常検知フラグERR3−1、正相余弦波信号入力値異常検知フラグERR2−1、逆相余弦波信号入力値異常検知フラグERR2−2、余弦波信号オフセット電圧値異常検知フラグERR3−2、正弦波信号最大値異常検知フラグERR4−1、正弦波信号最小値異常検知フラグERR4−2、余弦波信号最大値異常検知フラグERR5−1、及び、余弦波信号最小値異常検知フラグERR5−2を、「異常検知フラグERRx」と総称する。xは、異常検知フラグの数を示し、1からnまでの整数である。本実施形態では、上述した10個の異常検知フラグについて説明したが、回転角検出装置200の故障を示す他の異常検知フラグを含んでいても良い。また、異常検知フラグERRxのうちの何れか1つを示す場合には、「異常検知フラグERRp」と称する。pは1からnまでの整数である。   In the following description, the above-described normal phase sine wave signal input value abnormality detection flag ERR1-1, negative phase sine wave signal input value abnormality detection flag ERR1-2, sine wave signal offset voltage value abnormality detection flag ERR3-1, positive phase Cosine wave signal input value abnormality detection flag ERR2-1, reverse phase cosine wave signal input value abnormality detection flag ERR2-2, cosine wave signal offset voltage value abnormality detection flag ERR3-2, sine wave signal maximum value abnormality detection flag ERR4-1 The sine wave signal minimum value abnormality detection flag ERR4-2, the cosine wave signal maximum value abnormality detection flag ERR5-1, and the cosine wave signal minimum value abnormality detection flag ERR5-2 are collectively referred to as “abnormality detection flag ERRx”. x represents the number of abnormality detection flags, and is an integer from 1 to n. Although the ten abnormality detection flags described above have been described in the present embodiment, other abnormality detection flags indicating a failure of the rotation angle detection device 200 may be included. Further, when any one of the abnormality detection flags ERRx is indicated, it is referred to as “abnormality detection flag ERRp”. p is an integer from 1 to n.

図26に示す故障判定処理において、制御用コンピュータ110は、まず、各異常検知フラグERRpを監視して回転角検出装置200の異常を検出する異常検出処理を行う(ステップS4)。図27は、異常検出処理の一例を示すフローチャートである。   In the failure determination process shown in FIG. 26, the control computer 110 first performs an abnormality detection process of monitoring each abnormality detection flag ERRp and detecting an abnormality of the rotation angle detection device 200 (step S4). FIG. 27 is a flowchart illustrating an example of the abnormality detection process.

制御用コンピュータ110は、異常検知フラグERRp毎に、図27に示す異常検出処理を実施する。制御用コンピュータ110のEEPROM104には、異常検知フラグERRp毎の連続発生回数Npの上限値(以下、単に「異常検知フラグERRp連続発生回数上限値」と称する)Npthが格納されている。   The control computer 110 performs the abnormality detection process shown in FIG. 27 for each abnormality detection flag ERRp. The EEPROM 104 of the control computer 110 stores an upper limit value Npth of the consecutive occurrence count Np for each abnormality detection flag ERRp (hereinafter, simply referred to as “anomaly detection flag ERRp consecutive occurrence count upper limit value”).

制御用コンピュータ110は、異常検知フラグERRpを監視し、異常検知フラグERRpがセットされたか否かを判定する(ステップS41)。   The control computer 110 monitors the abnormality detection flag ERRp and determines whether or not the abnormality detection flag ERRp has been set (step S41).

異常検知フラグERRpがセットされていなければ(ステップS41;No)、制御用コンピュータ110は、異常検知フラグERRpの連続発生回数Npをリセット(Np=0)すると共に、異常検知フラグERRpの連続発生フラグ(以下、単に「ERRp連続発生フラグ」と称する)をリセットし(ステップS42)、ステップS41の処理を繰り返し行う。   If the abnormality detection flag ERRp is not set (step S41; No), the control computer 110 resets the number Np of consecutive occurrences of the abnormality detection flag ERRp (Np = 0), and continuously generates the abnormality detection flag ERRp. (Hereinafter simply referred to as “ERRp continuous occurrence flag”) is reset (step S42), and the process of step S41 is repeated.

異常検知フラグERRpがセットされていれば(ステップS41;Yes)、制御用コンピュータ110は、異常検知フラグERRpの連続発生回数Npをインクリメント(Np=Np+1)し(ステップS43)、続いて、異常検知フラグERRpの連続発生回数Npが異常検知フラグERRp連続発生回数上限値Npth以上(Np≧Npth)であるか否かを判定する(ステップS44)。   If the abnormality detection flag ERRp is set (step S41; Yes), the control computer 110 increments the number Np of consecutive occurrences of the abnormality detection flag ERRp (Np = Np + 1) (step S43), and then detects abnormality. It is determined whether or not the number of consecutive occurrences Np of the flag ERRp is equal to or greater than the upper limit Npth of the abnormality detection flag ERRp (Np ≧ Npth) (step S44).

異常検知フラグERRpの連続発生回数Npが異常検知フラグERRp連続発生回数上限値Npth未満(Np<Npth)であれば(ステップS44;No)、ステップS41の処理に戻る。   If the abnormality detection flag ERRp continuous occurrence count Np is less than the abnormality detection flag ERRp continuous occurrence count upper limit Npth (Np <Npth) (step S44; No), the processing returns to step S41.

異常検知フラグERRpの連続発生回数Npが異常検知フラグERRp連続発生回数上限値Npth以上(Np≧Npth)であれば(ステップS44;Yes)、制御用コンピュータ110は、ERRp連続発生フラグをセットし(ステップS45)、図26に示す故障判定処理手順に戻る。   If the abnormality detection flag ERRp continuous occurrence count Np is equal to or greater than the abnormality detection flag ERRp continuous occurrence count upper limit Npth (Np ≧ Npth) (step S44; Yes), the control computer 110 sets the ERRp continuous occurrence flag ( Step S45) and the process returns to the failure determination processing procedure shown in FIG.

制御用コンピュータ110は、異常検知フラグERRxのうちの何れか1つ以上において、ERRp連続発生フラグがセットされたか否かを判定する(ステップS201)。ERRp連続発生フラグがセットされていなければ(ステップS201;No)、ステップS4の処理を繰り返し行う。   The control computer 110 determines whether or not the ERRp continuous occurrence flag is set in any one or more of the abnormality detection flags ERRx (step S201). If the ERRp continuous occurrence flag is not set (step S201; No), the process of step S4 is repeated.

ERRp連続発生フラグがセットされていれば(ステップS201;Yes)、制御用コンピュータ110は、上述した所定のエラー処理を行い(ステップS202)、当該故障判定処理を終了する。   If the ERRp continuous occurrence flag is set (step S201; Yes), the control computer 110 performs the predetermined error process described above (step S202), and ends the failure determination process.

なお、異常検知フラグERRp連続発生回数上限値Npthの値は、異常検知フラグERRp毎に異なる値が設定されていても良いし、複数種の異常検知フラグERRpで同一の値を共有する態様であっても良い。   Note that the value of the abnormality detection flag ERRp continuous occurrence count upper limit value Npth may be set differently for each abnormality detection flag ERRp, or a plurality of types of abnormality detection flags ERRp share the same value. May be.

なお、上述した実施形態では、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)、第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)、及び第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の上限値、初期値、下限値、並びに、第3正弦波信号VC+Sの最大値MAX(VC+S)、第3正弦波信号VC+Sの最小値MIN(VC+S)、第3余弦波信号VC−Sの最大値MAX(VC−S)、第3余弦波信号VC−Sの最小値MIN(VC−S)の初期値、及び各異常検知フラグERRp連続発生回数上限値Npthの値は、EEPROM104(第1記憶部)に記憶される例を示したが、EEPROM104以外に第1記憶部を設け、この第1記憶部に記憶される態様であっても良い。第1記憶部の構成により本開示が限定されるものではない。 In the embodiment described above, the maximum value MAX of the first sine-wave signal Sinθ 1f (Sinθ 1f), the minimum value MIN (Cos? 1f), the minimum value of the first sine-wave signal sin [theta 1f of the first cosine wave signal Cos? 1f MIN (Sinθ 1f), and the upper limit value, the initial value, the lower limit value, and the maximum value MAX (V C + S) of the third sinusoidal signal V C + S of the maximum value MAX (Cos? 1f) of the first cosine wave signal Cos? 1f, minimum value MIN of the third sinusoidal signal V C + S (V C + S), the maximum value of the third cosine wave signal V C-S MAX (V C -S), the minimum value MIN of the third cosine wave signal V C-S ( The initial value of V C-S ) and the value of each abnormality detection flag ERRp continuous occurrence count upper limit value Npth are shown as being stored in the EEPROM 104 (first storage unit). A mode may be provided in which the first storage unit is stored. The present disclosure is not limited by the configuration of the first storage unit.

また、上述した実施形態では、上述した回転角検出処理において、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)、第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)、第3正弦波信号Vの最大値MAX(VC+S)、第3正弦波信号VC+Sの最小値MIN(VC+S)、第3余弦波信号Vの最大値MAX(VC−S)、第3余弦波信号VC−Sの最小値MIN(VC−S)は、RAM102(第2記憶部)に記憶される例を示したが、RAM102以外に第2記憶部を設け、この第2記憶部に記憶される態様であっても良い。第2記憶部の構成により本開示が限定されるものではない。 Further, in the above embodiment, the rotation angle detection process described above, the maximum value MAX (Sinθ 1f) of the first sine-wave signal sin [theta 1f, the minimum value MIN (Cos? 1f) of the first cosine wave signal Cos? 1f, first minimum value MIN of the sine wave signal Sinθ 1f (Sinθ 1f), the maximum value MAX of the first cosine wave signal Cosθ 1f (Cosθ 1f), the maximum value of the third sine wave signal V S MAX (V C + S ), the third sine wave signal V C + S minimum value MIN of (V C + S), the maximum value MAX of the third cosine wave signal V C (V C-S) , the minimum value MIN of the third cosine wave signal V C-S (V C- S) is Although an example of storing in the RAM 102 (second storage unit) is shown, a mode in which a second storage unit is provided in addition to the RAM 102 and stored in the second storage unit may be used. The present disclosure is not limited by the configuration of the second storage unit.

また、上述した実施形態では、車両を実際に走行させる実運用時にリアルタイムで回転角検出装置200のキャリブレーションを行う例を示したが、これに併せて、電動パワーステアリング装置100の出荷前に、モータ20に位置検出センサ25が組み込まれた状態で、回転角検出装置200の初期キャリブレーションを行う構成であっても良い。   Further, in the above-described embodiment, an example in which the rotation angle detection device 200 is calibrated in real time during actual operation in which the vehicle actually travels has been shown, but in conjunction with this, before shipping the electric power steering device 100, A configuration in which initial calibration of the rotation angle detection device 200 is performed in a state where the position detection sensor 25 is incorporated in the motor 20 may be employed.

1 ハンドルホイール(ステアリング)
2 コラム軸
3 減速ギヤ
4a、4b ユニバーサルジョイント
10 トルクセンサ
11 イグニッションスイッチ
12 車速センサ
14 バッテリ
15 モータ駆動回路
16 モータ電流検出回路
17,17−1,17−2 位置検出部
20,20−1,20−2 モータ
20a モータシャフト
25,25−1,25−2 位置検出センサ
30 コントロールユニット(ECU)
31 アシスト機能部
31a 電流指令値算出部
31b 電流制御部
100 電動パワーステアリング(EPS)装置
101 CPU
102 RAM(第2記憶部)
103 ROM
104 EEPROM(第1記憶部)
105 インターフェース
106 A/D変換器
107 PWMコントローラ
110 制御用コンピュータ(MCU)
171 差分演算部
172 第1ゲイン補正部
173 第2ゲイン補正部
174 角度算出部
200,200−1,200−2 回転角検出装置
251 回転磁石
252 MRセンサ
300−1,300−2 駆動系
1711 正弦波差分演算部
1712 余弦波差分演算部
1721 第1正弦波ゲイン補正部
1722 第1余弦波ゲイン補正部
1723 回転数閾値判定部
1731 第2正弦波ゲイン補正部
1732 第2余弦波ゲイン補正部
1733 位相変換部
1741 逆正接演算部
1742 象限判定部
1 Handle wheel (steering)
2 Column shaft 3 Reduction gear 4a, 4b Universal joint 10 Torque sensor 11 Ignition switch 12 Vehicle speed sensor 14 Battery 15 Motor drive circuit 16 Motor current detection circuit 17, 17-1, 17-2 Position detection unit 20, 20-1, 20 -2 Motor 20a Motor shaft 25, 25-1, 25-2 Position detection sensor 30 Control unit (ECU)
31 Assist Function Unit 31a Current Command Value Calculation Unit 31b Current Control Unit 100 Electric Power Steering (EPS) Device 101 CPU
102 RAM (second storage unit)
103 ROM
104 EEPROM (first storage unit)
105 Interface 106 A / D Converter 107 PWM Controller 110 Computer for Control (MCU)
171 Difference calculation unit 172 First gain correction unit 173 Second gain correction unit 174 Angle calculation unit 200, 200-1, 200-2 Rotation angle detection device 251 Rotating magnet 252 MR sensor 300-1, 300-2 Drive system 1711 Sine Wave difference calculation unit 1712 Cosine wave difference calculation unit 1721 First sine wave gain correction unit 1722 First cosine wave gain correction unit 1723 Rotational speed threshold determination unit 1731 Second sine wave gain correction unit 1732 Second cosine wave gain correction unit 1733 Phase Conversion unit 1741 Inverse tangent calculation unit 1742 Quadrant determination unit

Claims (11)

正相正弦波信号と当該正相正弦波信号を位相反転した逆相正弦波信号とを含む差動正弦波信号、及び、正相余弦波信号と当該正相余弦波信号を位相反転した逆相余弦波信号とを含む差動余弦波信号を、モータの位置検出信号として出力する位置検出センサと、
前記位置検出信号に基づき、前記モータの位置を検出する位置検出部と、
記憶部と、
を備え、
前記位置検出部は、
前記正相正弦波信号と前記逆相正弦波信号との差分を第1正弦波信号として出力し、前記正相余弦波信号と前記逆相余弦波信号との差分を第1余弦波信号として出力する差分演算部と、
前記記憶部に記憶された前記第1正弦波信号の最大値又は最小値に基づき、前記第1正弦波信号のゲインを補正した第2正弦波信号を出力すると共に、前記記憶部に記憶された前記第1余弦波信号の最大値又は最小値に基づき、前記第1余弦波信号のゲインを補正した第2余弦波信号を出力する第1ゲイン補正部と、
前記第2余弦波信号と前記第2正弦波信号とを加算して第3正弦波信号を生成し、前記記憶部に記憶された前記第3正弦波信号の最大値又は最小値に基づき、前記第3正弦波信号のゲインを補正した第4正弦波信号を出力すると共に、前記第2余弦波信号から前記第2正弦波信号を減算して第3余弦波信号を生成し、前記記憶部に記憶された前記第3余弦波信号の最大値又は最小値に基づき、前記第3余弦波信号のゲインを補正した第4余弦波信号を出力する第2ゲイン補正部と、
前記第4正弦波信号及び前記第4余弦波信号に基づき、前記モータの回転角を算出すると共に、前記モータの回転角に基づき、前記モータの回転数を算出する角度算出部と、
を備え、
前記第1ゲイン補正部は、少なくとも前記モータの回転数に応じて、前記第1正弦波信号の最大値及び最小値、並びに、前記第1余弦波信号の最大値及び最小値を更新する
回転角検出装置。
A differential sine wave signal including a positive phase sine wave signal and a negative phase sine wave signal obtained by inverting the phase of the positive phase sine wave signal, and a negative phase obtained by inverting the phase of the positive phase cosine wave signal and the positive phase cosine wave signal. A position detection sensor that outputs a differential cosine wave signal including a cosine wave signal as a motor position detection signal;
A position detection unit for detecting the position of the motor based on the position detection signal;
A storage unit;
With
The position detector is
The difference between the positive phase sine wave signal and the negative phase sine wave signal is output as a first sine wave signal, and the difference between the positive phase cosine wave signal and the negative phase cosine wave signal is output as a first cosine wave signal. A difference calculation unit to
Based on the maximum value or the minimum value of the first sine wave signal stored in the storage unit, a second sine wave signal obtained by correcting the gain of the first sine wave signal is output and stored in the storage unit A first gain correction unit that outputs a second cosine wave signal obtained by correcting a gain of the first cosine wave signal based on a maximum value or a minimum value of the first cosine wave signal;
Adding the second cosine wave signal and the second sine wave signal to generate a third sine wave signal, based on the maximum value or the minimum value of the third sine wave signal stored in the storage unit, A fourth sine wave signal obtained by correcting the gain of the third sine wave signal is output, and a third cosine wave signal is generated by subtracting the second sine wave signal from the second cosine wave signal. A second gain correction unit for outputting a fourth cosine wave signal obtained by correcting the gain of the third cosine wave signal based on the stored maximum value or minimum value of the third cosine wave signal;
An angle calculation unit that calculates a rotation angle of the motor based on the fourth sine wave signal and the fourth cosine wave signal, and calculates a rotation speed of the motor based on the rotation angle of the motor;
With
The first gain correction unit updates the maximum value and the minimum value of the first sine wave signal and the maximum value and the minimum value of the first cosine wave signal according to at least the rotational speed of the motor. Detection device.
前記第1ゲイン補正部は、
前記モータの回転数が、前記モータの回転数の上限閾値以下である場合に、前記記憶部に記憶された前記第1正弦波信号の最大値及び最小値、並びに、前記第1余弦波信号の最大値及び最小値を更新する
請求項1に記載の回転角検出装置。
The first gain correction unit includes:
When the rotation speed of the motor is equal to or lower than the upper limit threshold of the rotation speed of the motor, the maximum value and the minimum value of the first sine wave signal stored in the storage unit, and the first cosine wave signal The rotation angle detection device according to claim 1, wherein the maximum value and the minimum value are updated.
前記第1ゲイン補正部は、
前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0以上であるときの前記第1正弦波信号の値を前記第1正弦波信号の最大値として前記記憶部に記憶し、
前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0未満であるときの前記第1正弦波信号の値を前記第1正弦波信号の最小値として前記記憶部に記憶し、
前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0以上であるときの前記第1余弦波信号の値を前記第1余弦波信号の最大値として前記記憶部に記憶し、
前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0未満であるときの前記第1余弦波信号の値を前記第1余弦波信号の最小値として前記記憶部に記憶する
請求項2に記載の回転角検出装置。
The first gain correction unit includes:
When the zero point of the first cosine wave signal is detected, the value of the first sine wave signal when the value of the first sine wave signal is 0 or more is set as the maximum value of the first sine wave signal. Remember
When the zero point of the first cosine wave signal is detected, the value of the first sine wave signal when the value of the first sine wave signal is less than 0 is set as the minimum value of the first sine wave signal. Remember
When the zero point of the first sine wave signal is detected, the value of the first cosine wave signal when the value of the first cosine wave signal is 0 or more is set as the maximum value of the first cosine wave signal as the storage unit. Remember
When the zero point of the first sine wave signal is detected, the value of the first cosine wave signal when the value of the first cosine wave signal is less than 0 is set as the minimum value of the first cosine wave signal as the storage unit. The rotation angle detection device according to claim 2.
前記第1ゲイン補正部は、
前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0以上であって、前記第1余弦波信号の値が、前記第1余弦波信号の最大値の下限値以上上限値以下である場合に、当該第1正弦波信号の値を前記第1正弦波信号の最大値として前記記憶部に記憶し、
前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0未満であって、前記第1正弦波信号の値が、前記第1正弦波信号の最小値の下限値以上上限値以下である場合に、当該第1正弦波信号の値を前記第1正弦波信号の最小値として前記記憶部に記憶し、
前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0以上であって、前記第1余弦波信号の値が、前記第1余弦波信号の最大値の下限値以上上限値以下である場合に、当該第1余弦波信号の値を前記第1余弦波信号の最大値として前記記憶部に記憶し、
前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0未満であって、前記第1余弦波信号の値が、前記第1余弦波信号の最小値の下限値以上上限値以下である場合に、当該第1余弦波信号の値を前記第1余弦波信号の最小値として前記記憶部に記憶する
請求項2に記載の回転角検出装置。
The first gain correction unit includes:
When the zero point of the first cosine wave signal is detected, the value of the first sine wave signal is 0 or more, and the value of the first cosine wave signal is a lower limit value of the maximum value of the first cosine wave signal. When the value is not more than the upper limit value, the value of the first sine wave signal is stored in the storage unit as the maximum value of the first sine wave signal,
When the zero point of the first cosine wave signal is detected, the value of the first sine wave signal is less than 0, and the value of the first sine wave signal is the lower limit of the minimum value of the first sine wave signal. When the value is not more than the upper limit value, the value of the first sine wave signal is stored in the storage unit as the minimum value of the first sine wave signal,
When the zero point of the first sine wave signal is detected, the value of the first cosine wave signal is 0 or more, and the value of the first cosine wave signal is a lower limit value of the maximum value of the first cosine wave signal. When the value is not more than the upper limit, the value of the first cosine wave signal is stored in the storage unit as the maximum value of the first cosine wave signal,
When the zero point of the first sine wave signal is detected, the value of the first cosine wave signal is less than 0, and the value of the first cosine wave signal is a lower limit value of the minimum value of the first cosine wave signal. The rotation angle detection device according to claim 2, wherein the value of the first cosine wave signal is stored in the storage unit as the minimum value of the first cosine wave signal when the value is not more than the upper limit value.
前記差分演算部は、
前記正相正弦波信号が、前記正相正弦波信号の下限閾値未満であるか、又は、前記正相正弦波信号の上限閾値よりも大きい場合に、前記正相正弦波信号の入力値異常と判定し、
前記逆相正弦波信号が、前記逆相正弦波信号の下限閾値未満であるか、又は、前記逆相正弦波信号の上限閾値よりも大きい場合に、前記逆相正弦波信号の入力値異常と判定し、
前記正相余弦波信号が、前記正相余弦波信号の下限閾値未満であるか、又は、前記正相余弦波信号の上限閾値よりも大きい場合に、前記正相余弦波信号の入力値異常と判定し、
前記逆相余弦波信号が、前記逆相余弦波信号の下限閾値未満であるか、又は、前記逆相余弦波信号の上限閾値よりも大きい場合に、前記逆相余弦波信号の入力値異常と判定する
請求項1から請求項4の何れか一項に記載の回転角検出装置。
The difference calculator is
When the positive phase sine wave signal is less than the lower limit threshold value of the positive phase sine wave signal or larger than the upper limit threshold value of the positive phase sine wave signal, Judgment,
When the negative phase sine wave signal is less than the lower limit threshold value of the negative phase sine wave signal or larger than the upper limit threshold value of the negative phase sine wave signal, Judgment,
When the positive phase cosine wave signal is less than the lower limit threshold value of the positive phase cosine wave signal or larger than the upper limit threshold value of the positive phase cosine wave signal, the input value abnormality of the positive phase cosine wave signal is Judgment,
When the negative-phase cosine wave signal is less than the lower-limit threshold value of the negative-phase cosine wave signal or greater than the upper-limit threshold value of the negative-phase cosine wave signal, The rotation angle detection device according to any one of claims 1 to 4, wherein the determination is made.
前記差分演算部は、
前記正相正弦波信号と前記逆相正弦波信号との加算値の半値である正弦波信号オフセット電圧が、前記正弦波信号オフセット電圧の下限閾値未満であるか、又は、前記正弦波信号オフセット電圧の上限閾値よりも大きい場合に、前記正弦波信号オフセット電圧のオフセット電圧値異常と判定し、
前記正相余弦波信号と前記逆相余弦波信号との加算値の半値である余弦波信号オフセット電圧が、前記余弦波信号オフセット電圧の下限閾値未満であるか、又は、前記余弦波信号オフセット電圧の上限閾値よりも大きい場合に、前記余弦波信号オフセット電圧のオフセット電圧値異常と判定する
請求項1から請求項5の何れか一項に記載の回転角検出装置。
The difference calculator is
A sine wave signal offset voltage, which is half the sum of the positive phase sine wave signal and the negative phase sine wave signal, is less than a lower limit threshold of the sine wave signal offset voltage, or the sine wave signal offset voltage Is determined to be an offset voltage value abnormality of the sine wave signal offset voltage,
A cosine wave signal offset voltage which is a half value of the sum of the positive phase cosine wave signal and the negative phase cosine wave signal is less than a lower limit threshold of the cosine wave signal offset voltage, or the cosine wave signal offset voltage. The rotation angle detection device according to any one of claims 1 to 5, wherein an offset voltage value abnormality of the cosine wave signal offset voltage is determined when the value is larger than an upper limit threshold value.
前記第1ゲイン補正部は、
前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0以上であるときの前記第1正弦波信号の値が、前記第1正弦波信号の最大値の下限値未満であるか、又は、前記第1正弦波信号の最大値の上限値より大きい場合に、前記第1正弦波信号の最大値異常と判定し、
前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0未満であるときの前記第1正弦波信号の値が、前記第1正弦波信号の最小値の下限値未満であるか、又は、前記第1正弦波信号の最小値の上限値より大きい場合に、前記第1正弦波信号の最小値異常と判定し、
前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0以上であるときの前記第1余弦波信号の値が、前記第1余弦波信号の最大値の下限値未満であるか、又は、前記第1余弦波信号の最大値の上限値より大きい場合に、前記第1余弦波信号の最大値異常と判定し、
前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0未満であるときの前記第1余弦波信号の値が、前記第1余弦波信号の最小値の下限値未満であるか、又は、前記第1余弦波信号の最小値の上限値より大きい場合に、前記第1余弦波信号の最小値異常と判定する
請求項1から請求項6の何れか一項に記載の回転角検出装置。
The first gain correction unit includes:
When the zero point of the first cosine wave signal is detected, the value of the first sine wave signal when the value of the first sine wave signal is 0 or more is the lower limit value of the maximum value of the first sine wave signal. If it is less than or greater than the upper limit of the maximum value of the first sine wave signal, it is determined that the maximum value of the first sine wave signal is abnormal,
When the zero point of the first cosine wave signal is detected, the value of the first sine wave signal when the value of the first sine wave signal is less than 0 is the lower limit value of the minimum value of the first sine wave signal. If it is less than or greater than the upper limit of the minimum value of the first sine wave signal, determine that the minimum value of the first sine wave signal is abnormal,
When the zero point of the first sine wave signal is detected, the value of the first cosine wave signal when the value of the first cosine wave signal is 0 or more is the lower limit value of the maximum value of the first cosine wave signal. Or less than the upper limit value of the maximum value of the first cosine wave signal, it is determined that the maximum value of the first cosine wave signal is abnormal,
When the zero point of the first sine wave signal is detected, the value of the first cosine wave signal when the value of the first cosine wave signal is less than 0 is the lower limit value of the minimum value of the first cosine wave signal. It is determined that the minimum value of the first cosine wave signal is abnormal when it is less than or greater than the upper limit value of the minimum value of the first cosine wave signal. The rotation angle detection device described.
前記第2ゲイン補正部は、
前記第3余弦波信号のゼロ点検出時において、前記第3正弦波信号の値が0以上であるとき、当該第3正弦波信号の値を前記第3正弦波信号の最大値として前記記憶部に記憶し、
前記第3余弦波信号のゼロ点検出時において、前記第3正弦波信号の値が0未満であるとき、当該第3正弦波信号の値を前記第3正弦波信号の最小値として前記記憶部に記憶し、
前記第3正弦波信号のゼロ点検出時において、前記第3余弦波信号の値が0以上であるとき、当該第3余弦波信号の値を前記第3余弦波信号の最大値として前記記憶部に記憶し、
前記第3正弦波信号のゼロ点検出時において、前記第3余弦波信号の値が0未満であるとき、当該第3余弦波信号の値を前記第3余弦波信号の最小値として前記記憶部に記憶する
請求項1から請求項7の何れか一項に記載の回転角検出装置。
The second gain correction unit is
When the zero point of the third cosine wave signal is detected and the value of the third sine wave signal is 0 or more, the value of the third sine wave signal is set as the maximum value of the third sine wave signal. Remember
When the zero point of the third cosine wave signal is detected and the value of the third sine wave signal is less than 0, the value of the third sine wave signal is set as the minimum value of the third sine wave signal. Remember
When the zero point of the third sine wave signal is detected, and the value of the third cosine wave signal is 0 or more, the value of the third cosine wave signal is set as the maximum value of the third cosine wave signal. Remember
When the zero point of the third sine wave signal is detected, if the value of the third cosine wave signal is less than 0, the value of the third cosine wave signal is set as the minimum value of the third cosine wave signal as the storage unit. The rotation angle detection device according to any one of claims 1 to 7.
請求項1から請求項8の何れか一項に記載の回転角検出装置を備え、
前記回転角を用いて、前記モータを駆動制御する
モータ制御装置。
A rotation angle detection device according to any one of claims 1 to 8, comprising:
A motor control device that drives and controls the motor using the rotation angle.
請求項9に記載のモータ制御装置を備え、
前記モータは、ステアリングのコラム軸又はラックに設けられ、前記ステアリングの操舵力をトルク制御する
電動パワーステアリング装置。
A motor control device according to claim 9,
The electric power steering device, wherein the motor is provided on a column shaft or a rack of the steering and torque-controls the steering force of the steering.
モータの位置検出信号として位置検出センサから出力される、正相正弦波信号と当該正相正弦波信号を位相反転した逆相正弦波信号とを含む差動正弦波信号、及び、正相余弦波信号と当該正相余弦波信号を位相反転した逆相余弦波信号とを含む差動余弦波信号に基づき、前記モータの位置を検出する回転角検出方法であって、
前記正相正弦波信号と前記逆相正弦波信号との差分を第1正弦波信号とするステップと、
前記正相余弦波信号と前記逆相余弦波信号との差分を第1余弦波信号とするステップと、
前記モータの回転数が、前記モータの回転数の上限閾値以下であるときの前記第1正弦波信号の最大値又は最小値に基づき、前記第1正弦波信号のゲインを補正して第2正弦波信号とするステップと、
前記モータの回転数が、前記モータの回転数の上限閾値以下であるときの前記第1余弦波信号の最大値又は最小値に基づき、前記第1余弦波信号のゲインを補正して第2余弦波信号とするステップと、
前記第2余弦波信号と前記第2正弦波信号とを加算して第3正弦波信号とするステップと、
前記第2余弦波信号から前記第2正弦波信号を減算して第3余弦波信号とするステップと、
前記第3正弦波信号の最大値又は最小値に基づき、前記第3正弦波信号のゲインを補正して第4正弦波信号とするステップと、
前記第3余弦波信号の最大値又は最小値に基づき、前記第3余弦波信号のゲインを補正して第4余弦波信号とするステップと、
前記第4正弦波信号及び前記第4余弦波信号に基づき、前記モータの回転角を算出するステップと、
を有する
回転角検出方法。
A differential sine wave signal including a positive phase sine wave signal and a negative phase sine wave signal obtained by inverting the phase of the positive phase sine wave signal, and a positive phase cosine wave output from the position detection sensor as a motor position detection signal A rotation angle detection method for detecting a position of the motor based on a differential cosine wave signal including a signal and a negative cosine wave signal obtained by inverting the phase of the positive phase cosine wave signal,
A difference between the positive phase sine wave signal and the negative phase sine wave signal as a first sine wave signal;
A difference between the positive phase cosine wave signal and the negative phase cosine wave signal as a first cosine wave signal;
Based on the maximum value or the minimum value of the first sine wave signal when the rotation speed of the motor is equal to or lower than the upper limit threshold value of the rotation speed of the motor, the gain of the first sine wave signal is corrected and the second sine wave is corrected. A step of making a wave signal;
Based on the maximum value or the minimum value of the first cosine wave signal when the rotation speed of the motor is equal to or lower than the upper limit threshold value of the rotation speed of the motor, the gain of the first cosine wave signal is corrected and the second cosine wave is corrected. A step of making a wave signal;
Adding the second cosine wave signal and the second sine wave signal to form a third sine wave signal;
Subtracting the second sine wave signal from the second cosine wave signal to obtain a third cosine wave signal;
Correcting the gain of the third sine wave signal based on the maximum value or the minimum value of the third sine wave signal to obtain a fourth sine wave signal;
Correcting a gain of the third cosine wave signal based on a maximum value or a minimum value of the third cosine wave signal to obtain a fourth cosine wave signal;
Calculating a rotation angle of the motor based on the fourth sine wave signal and the fourth cosine wave signal;
A rotation angle detection method.
JP2018027270A 2018-02-19 2018-02-19 Rotation angle detector, motor controller, electric power steering device, and rotation angle detection method Pending JP2019144056A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018027270A JP2019144056A (en) 2018-02-19 2018-02-19 Rotation angle detector, motor controller, electric power steering device, and rotation angle detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018027270A JP2019144056A (en) 2018-02-19 2018-02-19 Rotation angle detector, motor controller, electric power steering device, and rotation angle detection method

Publications (1)

Publication Number Publication Date
JP2019144056A true JP2019144056A (en) 2019-08-29

Family

ID=67772145

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018027270A Pending JP2019144056A (en) 2018-02-19 2018-02-19 Rotation angle detector, motor controller, electric power steering device, and rotation angle detection method

Country Status (1)

Country Link
JP (1) JP2019144056A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021250917A1 (en) 2020-06-08 2021-12-16 日本精工株式会社 Detection signal correction method, motor control device, and electric power steering device
EP3957547A4 (en) * 2020-06-08 2022-02-23 NSK Ltd. Detection signal correction method, motor control device, and electric power steering device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021250917A1 (en) 2020-06-08 2021-12-16 日本精工株式会社 Detection signal correction method, motor control device, and electric power steering device
EP3957547A4 (en) * 2020-06-08 2022-02-23 NSK Ltd. Detection signal correction method, motor control device, and electric power steering device
CN114096324A (en) * 2020-06-08 2022-02-25 日本精工株式会社 Detection signal correction method, motor control device, and electric power steering device
US11338846B2 (en) 2020-06-08 2022-05-24 Nsk Ltd. Detection signal correction method, motor control device, and electric power steering device

Similar Documents

Publication Publication Date Title
JP6455111B2 (en) Rotation angle detector
CN100522721C (en) Electric power steering apparatus, and method for detecting abnormality of angle detector thereof
JP5789911B2 (en) Rotation angle detection device and electric power steering device
JP6086205B2 (en) Phase difference detection device and rotation angle detection device including the same
US10946894B2 (en) Driver warning in electric power steering systems
US10298157B2 (en) Brushless motor and electric power steering apparatus
JP5092760B2 (en) Motor control device and electric power steering device
JP6024969B2 (en) Rotation angle detection device and electric power steering device having the same
JP2010029028A (en) Motor controller
JP6024971B2 (en) Rotation angle detector
US20220089216A1 (en) Rotation angle detection device, electric power steering device and method of controlling electric power steering device
JP2019144056A (en) Rotation angle detector, motor controller, electric power steering device, and rotation angle detection method
JP6024970B2 (en) Rotation angle detection device and electric power steering device having the same
JP2014219364A (en) Rotation angle detection apparatus
JP4269278B2 (en) Rotation torque direction detection device for brushless motor
JP5470968B2 (en) Motor control device and electric power steering device
JP2019124670A (en) Rotation angle detection device, motor control device, electric power steering device, and rotation angle detection method
CN112534706A (en) Position estimation method, motor control device, and motor system
CN112514238A (en) Position estimation method, motor control device, and motor system
JP6202302B2 (en) Rotation angle detector
JP2014139054A (en) Electric power steering system
JP2014142322A (en) Rotation angle detection device
CN112544034A (en) Position estimation method, motor control device, and motor system
CN112534707A (en) Position estimation method, motor control device, and motor system
CN112514237A (en) Position estimation method, motor control device, and motor system