JP2019124670A - Rotation angle detection device, motor control device, electric power steering device, and rotation angle detection method - Google Patents

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

Info

Publication number
JP2019124670A
JP2019124670A JP2018007475A JP2018007475A JP2019124670A JP 2019124670 A JP2019124670 A JP 2019124670A JP 2018007475 A JP2018007475 A JP 2018007475A JP 2018007475 A JP2018007475 A JP 2018007475A JP 2019124670 A JP2019124670 A JP 2019124670A
Authority
JP
Japan
Prior art keywords
wave signal
value
cosine wave
sine 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
JP2018007475A
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 JP2018007475A priority Critical patent/JP2019124670A/en
Publication of JP2019124670A publication Critical patent/JP2019124670A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a rotation angle detection device, motor control device, electric power steering device and rotation angle detection method that can maintain high detection accuracy.SOLUTION: On the basis of a maximum value or a minimum value of a first sinusoidal signal serving a differential between a positive phase sinusoidal signal and a reversed phase sinusoidal signal, a second sinusoidal signal is obtained that has a gain of the first sinusoidal signal corrected. On the basis of a maximum value or a minimum value of a first cosine wave signal serving a differential between a positive phase cosine wave signal and a reversed phase cosine wave, a second cosine wave signal is obtained that has a gain of the first cosine wave signal corrected. On he basis of a maximum value or a minimum value of a third sinusoidal signal adding the second cosine wave signal and the second sinusoidal signal, a fourth sinusoidal signal is obtained that has a gain of the third sinusoidal signal corrected. On the basis of a maximum value or a minimum value of a third cosine wave signal subtracting the second sinusoidal signal from the second cosine wave signal, a fourth cosine wave signal is obtained that has a gain of the third cosine wave signal corrected. On the basis of the fourth sinusoidal signal and the fourth cosine wave signal, a rotation angle of a motor is calculated.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)。   There is a so-called electric power steering (EPS) device that assists steering with a motor in order to reduce the steering force of vehicles such as passenger cars and trucks. The electric power steering apparatus has a steering assist control function of applying an assist steering force generated by a motor to a steering mechanism of a vehicle. In such an electric power steering apparatus, in order to perform current control of a 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 series-connected magnetoresistive elements arranged at predetermined intervals in a direction parallel to the rotation axis of the magnetizing 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号公報JP, 2015-87137, A

磁気抵抗素子をセンサとして用いる場合、センサの出力には直流のオフセット成分が重畳する。また、回転磁石の取り付け誤差やセンサの製造誤差によって、センサのゲイン誤差や位相ズレが生じる場合がある。モータにセンサが組み込まれた状態で出荷前にオフセット電圧やゲイン誤差、位相ズレ等を補正するようにキャリブレーションを行うことが一般的である。しかしながら、センサの出力に生じるオフセット電圧やゲイン誤差は、温度ドリフトによって変化し、温度上昇に伴って増加する。このため、出荷前のキャリブレーション実施時とは異なる温度条件下では検出精度が低下する可能性がある。また、経時変化によってこれらの誤差が大きくなり検出精度が低下する場合がある。特に、磁気抵抗素子は、高感度の半導体素子であるため、このような温度特性や経年変化による出力変動が無視できない。   When the magnetoresistive element is used as a sensor, a DC offset component is superimposed on the output of the sensor. In addition, 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. It is general to perform calibration so as to correct offset voltage, gain error, phase shift and the like before shipping in a state where the sensor is incorporated in the motor. However, the offset voltage or gain error occurring at the output of the sensor changes due to temperature drift and increases as the temperature rises. For this reason, detection accuracy may decrease under temperature conditions different from those at the time of calibration before shipping. In addition, these errors may increase due to the change with time, and the detection accuracy may decrease. In particular, since the magnetoresistive element is a highly sensitive semiconductor element, the output fluctuation due to such temperature characteristics and aging can not 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 that can maintain 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余弦波信号に基づき、前記モータの回転角を算出する角度算出部と、を備える。   In order to achieve the above object, a rotation angle detection device according to one aspect of the present invention is 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 that outputs, as a motor position detection signal, a differential cosine wave signal including a positive phase cosine wave signal and an antiphase cosine wave signal obtained by inverting the phase of the positive phase cosine wave signal, and the position detection A position detection unit that detects the position of the motor based on a signal, and the position detection unit outputs a difference between the positive phase sine wave signal and the negative phase sine wave signal as a first sine wave signal A difference calculating 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 the first sine based on a maximum value or a minimum value of the first sine wave signal. Output a second sine wave signal with the gain of the wave signal corrected A first gain correction unit that outputs a second cosine wave signal in which a gain of the first cosine wave signal is corrected based on a maximum value or a minimum value of the first cosine wave signal; a second cosine wave signal; A second sine wave signal is added to generate a third sine wave signal, and a gain of the third sine wave signal is corrected based on the maximum value or the minimum value of the third sine wave signal. And outputting a third cosine wave signal by subtracting the second sine wave signal from the second cosine wave signal, and generating the third cosine wave based on the maximum value or the minimum value of the third cosine wave signal. A second gain correction unit that outputs a fourth cosine wave signal obtained by correcting the gain of the signal; and 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; Equipped with

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

回転角検出装置の望ましい態様として、前記第1正弦波信号の最大値及び最小値、前記第1余弦波信号の最大値及び最小値、前記第3正弦波信号の最大値及び最小値、並びに、前記第3余弦波信号の最大値及び最小値を記憶する記憶部を備えることが好ましい。   As a desirable mode of the rotation angle detection device, the maximum value and the minimum value of the first sine wave signal, the maximum value and the minimum value of the first cosine wave signal, the maximum value and the minimum value of the third sine wave signal, and It is preferable to provide a storage unit that stores the maximum value and the minimum value of the third cosine wave signal.

これにより、リアルタイムで検出された最新のデータを用いて、回転角検出処理を行うことができる。   Thereby, the rotation angle detection process can be performed using the latest data detected in real time.

回転角検出装置の望ましい態様として、前記第1ゲイン補正部は、前記第1余弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第1正弦波信号の値が0以上であるとき、当該第1正弦波信号の値を前記第1正弦波信号の最大値として前記記憶部に記憶し、前記第1正弦波信号の値が0未満であるとき、当該第1正弦波信号の値を前記第1正弦波信号の最小値として前記記憶部に記憶し、前記第1正弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第1余弦波信号の値が0以上であるとき、当該第1余弦波信号の値を前記第1余弦波信号の最大値として前記記憶部に記憶し、前記第1余弦波信号の値が0未満であるとき、当該第1余弦波信号の値を前記第1余弦波信号の最小値として前記記憶部に記憶することが好ましい。   As a desirable mode of the rotation angle detection device, the first gain correction unit detects a zero point of the first cosine wave signal, and the value of the first sine wave signal is 0 or more at the time of the zero point detection. When 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 when the value of the first sine wave signal is less than 0, the value of the first sine wave signal A value is stored in the storage unit as the minimum value of the first sine wave signal, and the zero point of the first sine wave signal is detected, and the value of the first cosine wave signal is zero or more at the time of the zero point detection. When 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 value of the first cosine wave signal is less than 0, the first cosine wave Preferably, the value of the signal is stored in the storage unit as the minimum value of the first cosine wave signal. There.

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

回転角検出装置の望ましい態様として、前記記憶部は、前記第1正弦波信号及び前記第1余弦波信号の最大値の上限値及び下限値、並びに、前記第1正弦波信号及び前記第1余弦波信号の最小値の上限値及び下限値が記憶され、前記第1ゲイン補正部は、前記第1余弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第1正弦波信号の値が0以上であるとき、前記第1正弦波信号の値が、前記第1正弦波信号の最大値の下限値以上であり、且つ、前記第1正弦波信号の最大値の上限値以下である場合に、当該第1正弦波信号の値を前記第1正弦波信号の最大値として前記記憶部に記憶し、前記第1正弦波信号の値が0未満であるとき、前記第1正弦波信号の値が、前記第1正弦波信号の最小値の下限値以上であり、且つ、前記第1正弦波信号の最小値の上限値以下である場合に、当該第1正弦波信号の値を前記第1正弦波信号の最小値として前記記憶部に記憶し、前記第1正弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第1余弦波信号の値が0以上であるとき、前記第1余弦波信号の値が、前記第1余弦波信号の最大値の下限値以上であり、且つ、前記第1余弦波信号の最大値の上限値以下である場合に、当該第1余弦波信号の値を前記第1余弦波信号の最大値として前記記憶部に記憶し、前記第1余弦波信号の値が0未満であるとき、前記第1余弦波信号の値が、前記第1余弦波信号の最小値の下限値以上であり、且つ、前記第1余弦波信号の最小値の上限値以下である場合に、当該第1余弦波信号の値を前記第1余弦波信号の最小値として前記記憶部に記憶することが好ましい。   As a desirable mode of the rotation angle detection device, the storage unit may be configured to set the upper limit value and the lower limit value of the maximum value of the first sine wave signal and the first cosine wave signal, and the first sine wave signal and the first cosine. The upper limit value and the lower limit value of the minimum value of the wave signal are stored, and the first gain correction unit detects the zero point of the first cosine wave signal, and the zero point of the first sine wave signal is detected. When the value is 0 or more, the value of the first sine wave signal is not less than the lower limit value of the maximum value of the first sine wave signal and not more than the upper limit value of the maximum value of the first sine wave signal. In one case, the value of the first sine wave signal is stored as the maximum value of the first sine wave signal in the storage unit, and when the value of the first sine wave signal is less than 0, the first sine wave is stored. The value of the signal is equal to or greater than the lower limit value of the minimum value of the first sine wave signal; The value of the first sine wave signal is stored as the minimum value of the first sine wave signal in the storage unit when the value is equal to or less than the upper limit value of the minimum value of the sine wave signal, and the zero point of the first sine wave signal is stored. When the value of the first cosine wave signal is 0 or more at the time of detecting the zero point, the value of the first cosine wave signal is equal to or more than the lower limit value of the maximum value of the first cosine wave signal. And the value of the first cosine wave signal is stored as the maximum value of the first cosine wave signal in the storage unit when the first cosine wave signal is equal to or less than the upper limit value of the maximum value of the first cosine wave signal; When the value of the 1 cosine wave signal is less than 0, the value of the first cosine wave signal is not less than the lower limit value of the minimum value of the first cosine wave signal, and the minimum value of the first cosine wave signal And storing the value of the first cosine wave signal as the minimum value of the first cosine wave signal when the value is equal to or less than the upper limit value of It is preferably stored in.

これにより、第1正弦波信号の値が、第1正弦波信号の最大値の上限値及び下限値を逸脱していない状態で、第1正弦波信号の最大値を取得することができる。また、第1正弦波信号の値が、第1正弦波信号の最小値の上限値及び下限値を逸脱していない状態で、第1正弦波信号の最小値を取得することができる。また、第1余弦波信号の値が、第1余弦波信号の最大値の上限値及び下限値を逸脱していない状態で、第1余弦波信号の最大値を取得することができる。また、第1余弦波信号の値が、第1余弦波信号の最小値の上限値及び下限値を逸脱していない状態で、第1余弦波信号の最小値を取得することができる。これにより、第1正弦波信号又は第1余弦波信号の値がノイズ等によって異常値となった場合でも、正常に回転角検出処理を行うことができる。   Thereby, the maximum value of the first sine wave signal can be acquired in a state where the value of the first sine wave signal does not deviate from the upper limit value and the lower limit value of the maximum value of the first sine wave signal. In addition, the minimum value of the first sine wave signal can be acquired in a state where the value of the first sine wave signal does not deviate from the upper limit value and the lower limit value of the minimum value of the first sine wave signal. Further, the maximum value of the first cosine wave signal can be obtained in a state where the value of the first cosine wave signal does not deviate from the upper limit value and the lower limit value of the maximum value of the first cosine wave signal. Further, the minimum value of the first cosine wave signal can be obtained in a state where the value of the first cosine wave signal does not deviate from the upper limit value and the lower limit value of the minimum value of the first cosine wave signal. Thus, even when the value of the first sine wave signal or the first cosine wave signal becomes an abnormal value due to noise or the like, the rotation angle detection processing can be performed normally.

回転角検出装置の望ましい態様として、前記記憶部は、前記第1正弦波信号及び前記第1余弦波信号の最大値の初期値と前記第1正弦波信号及び前記第1余弦波信号の最小値の初期値とがさらに記憶され、前記第1ゲイン補正部は、前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0以上であるとき、前記第1正弦波信号の値が、前記第1正弦波信号の最大値の下限値未満であるか、又は、前記第1正弦波信号の最大値の上限値よりも大きい場合に、前記第1正弦波信号の最大値の初期値を前記第1正弦波信号の最大値として前記記憶部に記憶し、前記第1正弦波信号の値が0未満であるとき、前記第1正弦波信号の値が、前記第1正弦波信号の最小値の下限値未満であるか、又は、前記第1正弦波信号の最小値の上限値よりも大きい場合に、前記第1正弦波信号の最小値の初期値を前記第1正弦波信号の最小値として前記記憶部に記憶し、前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0以上であるとき、前記第1余弦波信号の値が、前記第1余弦波信号の最大値の下限値未満であるか、又は、前記第1余弦波信号の最大値の上限値よりも大きい場合に、前記第1余弦波信号の最大値の初期値を前記第1余弦波信号の最大値として前記記憶部に記憶し、前記第1余弦波信号の値が0未満であるとき、前記第1余弦波信号の値が、前記第1余弦波信号の最小値の下限値未満であるか、又は、前記第1余弦波信号の最小値の上限値よりも大きい場合に、前記第1余弦波信号の最小値の初期値を前記第1余弦波信号の最小値として前記記憶部に記憶することが好ましい。   As a desirable mode of the rotation angle detection device, the storage unit is configured to receive an initial value of the maximum value of the first sine wave signal and the first cosine wave signal and a minimum value of the first sine wave signal and the first cosine wave signal. The first gain correction unit further stores the first sine wave when the value of the first sine wave signal is 0 or more at the time of detecting the zero point of the first cosine 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 larger than the upper limit value of the maximum value of the first sine wave signal, the maximum value of the first sine wave signal The initial value of the value is stored as the maximum value of the first sine wave signal in the storage unit, and when the value of the first sine wave signal is less than 0, the value of the first sine wave signal is the first value. Less than the lower limit value of the minimum value of the sine wave signal, or above the minimum value of the first sine wave signal If larger than the value, the initial value of the minimum 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 zero point of the first sine wave signal is detected; When the value of the first cosine wave signal is 0 or more, the value of the first cosine wave signal is less than the lower limit value of the maximum value of the first cosine wave signal, or the first cosine wave signal And storing the initial value of the maximum value of the first cosine wave signal as the maximum value of the first cosine wave signal in the storage unit when the value is larger than the upper limit value of the maximum value of the first cosine wave signal; Is less than 0, the value of the first cosine wave signal is less than the lower limit value of the minimum value of the first cosine wave signal, or higher than the upper limit value of the minimum value of the first cosine wave signal When it is large, the initial value of the minimum value of the first cosine wave signal is taken as the minimum value of the first cosine wave signal. It is preferably stored in 憶部.

これにより、第1正弦波信号の値が、第1正弦波信号の最大値の上限値及び下限値を逸脱している場合には、第1正弦波信号の最大値の初期値を第1正弦波信号の最大値として適用することができる。また、第1正弦波信号の値が、第1正弦波信号の最小値の上限値及び下限値を逸脱している場合には、第1正弦波信号の最小値の初期値を第1正弦波信号の最小値として適用することができる。また、第1余弦波信号の値が、第1余弦波信号の最大値の上限値及び下限値を逸脱している場合には、第1余弦波信号の最大値の初期値を第1余弦波信号の最大値として適用することができる。また、第1余弦波信号の値が、第1余弦波信号の最小値の上限値及び下限値を逸脱している場合には、第1余弦波信号の最小値の初期値を第1余弦波信号の最小値として適用することができる。これにより、第1正弦波信号又は第1余弦波信号の値がノイズ等によって異常値となった場合でも、正常に回転角検出処理を行うことができる。   Thus, when the value of the first sine wave signal deviates from the upper limit value and the lower limit value of the maximum value of the first sine wave signal, the initial value of the maximum value of the first sine wave signal is set to the first sine wave. It can be applied as the maximum value of the wave signal. When the value of the first sine wave signal deviates from the upper limit value and the lower limit value of the minimum value of the first sine wave signal, the initial value of the minimum value of the first sine wave signal is set to the first sine wave It can be applied as the minimum value of the signal. When the value of the first cosine wave signal deviates from the upper limit value and the lower limit value of the maximum value of the first cosine wave signal, the initial value of the maximum value of the first cosine wave signal is set to the first cosine wave It can be applied as the maximum value of the signal. When the value of the first cosine wave signal deviates from the upper limit value and the lower limit value of the minimum value of the first cosine wave signal, the initial value of the minimum value of the first cosine wave signal is set to the first cosine wave It can be applied as the minimum value of the signal. Thus, even when the value of the first sine wave signal or the first cosine wave signal becomes an abnormal value due to noise or the like, the rotation angle detection processing can be performed normally.

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

これにより、第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 obtained in real time. Also, the maximum value or the minimum value of the third cosine wave signal for obtaining the fourth cosine wave signal can be obtained in real time.

回転角検出装置の望ましい態様として、前記記憶部は、前記第3正弦波信号及び前記第3余弦波信号の最大値の上限値及び下限値、並びに、前記第3正弦波信号及び前記第3余弦波信号の最小値の上限値及び下限値が記憶され、前記第2ゲイン補正部は、前記第3余弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第3正弦波信号の値が0以上であるとき、前記第3正弦波信号の値が、前記第3正弦波信号の最大値の下限値以上であり、且つ、前記第3正弦波信号の最大値の上限値以下である場合に、当該第3正弦波信号の値を前記第3正弦波信号の最大値として前記記憶部に記憶し、前記第3正弦波信号の値が0未満であるとき、前記第3正弦波信号の値が、前記第3正弦波信号の最小値の下限値以上であり、且つ、前記第3正弦波信号の最小値の上限値以下である場合に、当該第3正弦波信号の値を前記第3正弦波信号の最小値として前記記憶部に記憶し、前記第3正弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第3余弦波信号の値が0以上であるとき、前記第3余弦波信号の値が、前記第3余弦波信号の最大値の下限値以上であり、且つ、前記第3余弦波信号の最大値の上限値以下である場合に、当該第3余弦波信号の値を前記第3余弦波信号の最大値として前記記憶部に記憶し、前記第3余弦波信号の値が0未満であるとき、前記第3余弦波信号の値が、前記第3余弦波信号の最小値の下限値以上であり、且つ、前記第3余弦波信号の最小値の上限値以下である場合に、当該第3余弦波信号の値を前記第3余弦波信号の最小値として前記記憶部に記憶することが好ましい。   As a desirable mode of the rotation angle detection device, the storage unit may be configured to set the upper limit value and the lower limit value of the maximum value of the third sine wave signal and the third cosine wave signal, and the third sine wave signal and the third cosine wave. The upper limit value and the lower limit value of the minimum value of the wave signal are stored, and the second gain correction unit detects the zero point of the third cosine wave signal, and at the time of the detection of the zero point, the third sine wave signal When the value is 0 or more, the value of the third sine wave signal is not less than the lower limit value of the maximum value of the third sine wave signal, and not more than the upper limit value of the maximum value of the third sine wave signal. In some cases, the value of the third sine wave signal is stored in the storage unit as the maximum value of the third sine wave signal, and the value of the third sine wave signal is less than 0, the third sine wave The value of the signal is equal to or greater than the lower limit value of the minimum value of the third sine wave signal, and the third value The value of the third sine wave signal is stored as the minimum value of the third sine wave signal in the storage unit when the value is equal to or less than the upper limit value of the minimum value of the sine wave signal, and the zero point of the third sine wave signal is stored. Is detected, and the value of the third cosine wave signal is equal to or greater than the lower limit value of the maximum value of the third cosine wave signal when the value of the third cosine wave signal is 0 or more at the time of detecting the zero point. And the value of the third cosine wave signal is stored as the maximum value of the third cosine wave signal in the storage unit when the value of the third cosine wave signal is equal to or less than the upper limit value of the maximum value of the third cosine wave signal; When the value of the 3 cosine wave signal is less than 0, the value of the third cosine wave signal is not less than the lower limit value of the minimum value of the third cosine wave signal, and the minimum value of the third cosine wave signal And storing the value of the third cosine wave signal as the minimum value of the third cosine wave signal when the value is equal to or less than the upper limit value of It is preferably stored in.

これにより、第3正弦波信号の値が、第3正弦波信号の最大値の上限値及び下限値を逸脱していない状態で、第3正弦波信号の最大値を取得することができる。また、第3正弦波信号の値が、第3正弦波信号の最小値の上限値及び下限値を逸脱していない状態で、第3正弦波信号の最小値を取得することができる。また、第3余弦波信号の値が、第3余弦波信号の最大値の上限値及び下限値を逸脱していない状態で、第3余弦波信号の最大値を取得することができる。また、第3余弦波信号の値が、第3余弦波信号の最小値の上限値及び下限値を逸脱していない状態で、第3余弦波信号の最小値を取得することができる。これにより、第3正弦波信号又は第3余弦波信号の値がノイズ等によって異常値となった場合でも、正常に回転角検出処理を行うことができる。   Thus, the maximum value of the third sine wave signal can be obtained in a state where the value of the third sine wave signal does not deviate from the upper limit value and the lower limit value of the maximum value of the third sine wave signal. In addition, the minimum value of the third sine wave signal can be obtained in a state where the value of the third sine wave signal does not deviate from the upper limit value and the lower limit value of the minimum value of the third sine wave signal. Further, the maximum value of the third cosine wave signal can be acquired in a state where the value of the third cosine wave signal does not deviate from the upper limit value and the lower limit value of the maximum value of the third cosine wave signal. Further, the minimum value of the third cosine wave signal can be acquired in a state where the value of the third cosine wave signal does not deviate from the upper limit value and the lower limit value of the minimum value of the third cosine wave signal. Thus, even when the value of the third sine wave signal or the third cosine wave signal becomes an abnormal value due to noise or the like, the rotation angle detection processing can be performed normally.

回転角検出装置の望ましい態様として、前記記憶部は、前記第3正弦波信号及び前記第3余弦波信号の最大値の初期値と前記第3正弦波信号及び前記第3余弦波信号の最小値の初期値とがさらに記憶され、前記第2ゲイン補正部は、前記第3余弦波信号のゼロ点検出時において、前記第3正弦波信号の値が0以上であるとき、前記第3正弦波信号の値が、前記第3正弦波信号の最大値の下限値未満であるか、又は、前記第3正弦波信号の最大値の上限値よりも大きい場合に、前記第3正弦波信号の最大値の初期値を前記第3正弦波信号の最大値として前記記憶部に記憶し、前記第3正弦波信号の値が0未満であるとき、前記第3正弦波信号の値が、前記第3正弦波信号の最小値の下限値未満であるか、又は、前記第3正弦波信号の最小値の上限値よりも大きい場合に、前記第3正弦波信号の最小値の初期値を前記第3正弦波信号の最小値として前記記憶部に記憶し、前記第3正弦波信号のゼロ点検出時において、前記第3余弦波信号の値が0以上であるとき、前記第3余弦波信号の値が、前記第3余弦波信号の最大値の下限値未満であるか、又は、前記第3余弦波信号の最大値の上限値よりも大きい場合に、前記第3余弦波信号の最大値の初期値を前記第3余弦波信号の最大値として前記記憶部に記憶し、前記第3余弦波信号の値が0未満であるとき、前記第3余弦波信号の値が、前記第3余弦波信号の最小値の下限値未満であるか、又は、前記第3余弦波信号の最小値の上限値よりも大きい場合に、前記第3余弦波信号の最小値の初期値を前記第3余弦波信号の最小値として前記記憶部に記憶することが好ましい。   As a desirable mode of the rotation angle detection device, the storage unit is configured to receive an initial value of maximum values of the third sine wave signal and the third cosine wave signal, and a minimum value of the third sine wave signal and the third cosine wave signal. And the second gain correction unit, when the zero point of the third cosine wave signal is detected, when the value of the third sine wave signal is 0 or more, the third sine wave is stored. When the value of the signal is less than the lower limit value of the maximum value of the third sine wave signal or larger than the upper limit value of the maximum value of the third sine wave signal, the maximum value of the third sine wave signal The initial value of the value is stored in the storage unit as the maximum value of the third sine wave signal, and when the value of the third sine wave signal is less than 0, the value of the third sine wave signal is the third value. Less than the lower limit value of the minimum value of the sine wave signal, or above the minimum value of the third sine wave signal If larger than the value, the initial value of the minimum value of the third sine wave signal is stored in the storage unit as the minimum value of the third sine wave signal, and the zero point of the third sine wave signal is detected; When the value of the third cosine wave signal is 0 or more, the value of the third cosine wave signal is less than the lower limit value of the maximum value of the third cosine wave signal, or the third cosine wave signal And storing the initial value of the maximum value of the third cosine wave signal as the maximum value of the third cosine wave signal in the storage section when the value is larger than the upper limit value of the maximum value of the third cosine wave signal; Is less than 0, the value of the third cosine wave signal is less than the lower limit value of the minimum value of the third cosine wave signal, or higher than the upper limit value of the minimum value of the third cosine wave signal When it is large, the initial value of the minimum value of the third cosine wave signal is set as the minimum value of the third cosine wave signal. It is preferably stored in 憶部.

これにより、第3正弦波信号の値が、第3正弦波信号の最大値の上限値及び下限値を逸脱している場合には、第3正弦波信号の最大値の初期値を第3正弦波信号の最大値として適用することができる。また、第3正弦波信号の値が、第3正弦波信号の最小値の上限値及び下限値を逸脱している場合には、第3正弦波信号の最小値の初期値を第3正弦波信号の最小値として適用することができる。また、第3余弦波信号の値が、第3余弦波信号の最大値の上限値及び下限値を逸脱している場合には、第3余弦波信号の最大値の初期値を第3余弦波信号の最大値として適用することができる。また、第3余弦波信号の値が、第3余弦波信号の最小値の上限値及び下限値を逸脱している場合には、第3余弦波信号の最小値の初期値を第3余弦波信号の最小値として適用することができる。これにより、第3正弦波信号又は第3余弦波信号の値がノイズ等によって異常値となった場合でも、正常に回転角検出処理を行うことができる。   Thus, when the value of the third sine wave signal deviates from the upper limit value and the lower limit value of the maximum value of the third sine wave signal, the initial value of the maximum value of the third sine wave signal is the third sine wave. It can be applied as the maximum value of the wave signal. When the value of the third sine wave signal deviates from the upper limit value and the lower limit value of the minimum value of the third sine wave signal, the initial value of the minimum value of the third sine wave signal is set to the third sine wave It can be applied as the minimum value of the signal. When the value of the third cosine wave signal deviates from the upper limit value and the lower limit value of the maximum value of the third cosine wave signal, the initial value of the maximum value of the third cosine wave signal is set to the third cosine wave It can be applied as the maximum value of the signal. When the value of the third cosine wave signal deviates from the upper limit value and the lower limit value of the minimum value of the third cosine wave signal, the initial value of the minimum value of the third cosine wave signal is set to the third cosine wave It can be applied as the minimum value of the signal. Thus, even when the value of the third sine wave signal or the third cosine wave signal becomes an abnormal value due to noise or the like, the rotation angle detection processing can be performed normally.

回転角検出装置の望ましい態様として、前記差分演算部は、前記正相正弦波信号をSinθ+、前記逆相正弦波信号をSinθ−、前記第1正弦波信号をSinθ1fとしたとき、下記式(1)を用いて、前記第1正弦波信号Sinθ1fを算出し、前記正相余弦波信号をCosθ+、前記逆相余弦波信号をCosθ−、前記第1余弦波信号をCosθ1fとしたとき、下記式(2)を用いて、前記第1余弦波信号Cosθ1fを算出することが好ましい。 As a desirable mode of the rotation angle detection device, when the difference operation unit sets the positive phase sine wave signal as Sinθ 1 +, the negative phase sine wave signal as Sin θ 1 −, and the first sine wave signal as Sin θ 1f , The first sine wave signal Sinθ 1f is calculated using the following equation (1), the positive phase cosine wave signal is Cosθ 1 +, the negative phase cosine wave signal is Cosθ 1 −, the first cosine wave signal is when the cos [theta] 1f, using the following equation (2), it is preferable to calculate the first cosine wave signal cos [theta] 1f.

Sinθ1f=(Sinθ+)−(Sinθ−)・・・(1) Sin θ 1f = (Sin θ 1 +)-(Sin θ 1- ) (1)

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

これにより、中点がゼロ電位、すなわち、オフセット電圧が除去された第1正弦波信号及び第1余弦波信号が得られる。   As a result, the first sine wave signal and the first cosine wave signal in which the middle point is zero potential, that is, the offset voltage is removed are obtained.

回転角検出装置の望ましい態様として、前記第1ゲイン補正部は、前記第1正弦波信号Sinθ1fの最大値をMAX(Sinθ1f)、前記第2正弦波信号をSinθ1gとし、前記第1正弦波信号Sinθ1fの値が0以上であるとき、下記式(3)を用いて、前記第2正弦波信号Sinθ1gを算出し、前記第1正弦波信号Sinθ1fの値が0未満であるとき、下記式(4)を用いて、前記第2正弦波信号Sinθ1gを算出することが好ましい。 As a desirable mode of the rotation angle detection device, the first gain correction unit sets the maximum value of the first sine wave signal Sinθ 1f to MAX (Sinθ 1f ), sets the second sine wave signal to Sinθ 1g, and the first sine when the value of the wave signal sin [theta 1f is 0 or more, using the following equation (3), it calculates the second sine-wave signal sin [theta 1 g, when the value of the first sine-wave signal sin [theta 1f is less than 0 Preferably, the second sine wave signal Sinθ 1 g is calculated using the following equation (4).

Sinθ1g=Sinθ1f×(1/(MAX(Sinθ1f)))・・・(3) Sinθ 1g = Sinθ 1f × (1 / (MAX (Sinθ 1f ))) (3)

Sinθ1g=Sinθ1f×((−1)/(MIN(Sinθ1f)))・・・(4) Sinθ 1g = Sinθ 1f × ((-1) / (MIN (Sinθ 1f ))) (4)

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

回転角検出装置の望ましい態様として、前記第1ゲイン補正部は、前記第1余弦波信号Cosθ1fの最大値をMAX(Cosθ1f)、前記第2余弦波信号をCosθ1gとし、前記第1余弦波信号Cosθ1fの値が0以上であるとき、下記式(5)を用いて、前記第2余弦波信号Cosθ1gを算出し、前記第1余弦波信号Cosθ1fの値が0未満であるとき、下記式(6)を用いて、前記第2余弦波信号Cosθ1gを算出することが好ましい。 As a desirable mode of the rotation angle detection device, the first gain correction unit may set the maximum value of the first cosine wave signal Cosθ 1 f to MAX (Cos θ 1f ), the second cosine wave signal to Cos θ 1g, and the first cosine when the value of the wave signal Cos? 1f is 0 or more, using the following equation (5), calculates the second cosine wave signal Cos? 1 g, when the value of the first cosine wave signal Cos? 1f is less than 0 It is preferable to calculate the second cosine wave signal Cosθ 1 g using the following equation (6).

Cosθ1g=Cosθ1f×(1/(MAX(Cosθ1f)))・・・(5) Cosθ 1g = Cosθ 1f × (1 / (MAX (Cosθ 1f ))) (5)

Cosθ1g=Cosθ1f×((−1)/(MIN(Cosθ1f)))・・・(6) Cosθ 1g = Cosθ 1f × ((-1) / (MIN (Cosθ 1f ))) (6)

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

回転角検出装置の望ましい態様として、前記第2ゲイン補正部は、前記第3正弦波信号をVC+Sとしたとき、下記(7)式を用いて、前記第3正弦波信号VC+Sを算出し、前記第3余弦波信号をVC−Sとしたとき、下記(8)式を用いて、前記第3余弦波信号VC−Sを算出することが好ましい。 As a desirable mode of the rotation angle detection device, when the third sine wave signal is V C + S , the second gain correction unit calculates the third sine wave signal V C + S using the following equation (7). When the third cosine wave signal is V C -S , it is preferable to calculate the third cosine wave signal V C -S using the following equation (8).

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

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

これにより、第2正弦波信号及び第2余弦波信号の位相ずれが補正される。   Thereby, the phase shift of the second sine wave signal and the second cosine wave signal is corrected.

回転角検出装置の望ましい態様として、前記第2ゲイン補正部は、前記第3正弦波信号VC+Sの最大値をMAX(VC+S)、前記第4正弦波信号をV1C+Sとし、前記第3正弦波信号VC+Sの値が0以上であるとき、下記式(9)を用いて、前記第4正弦波信号V1C+Sを算出し、前記第3正弦波信号VC+Sの値が0未満であるとき、下記式(10)を用いて、前記第4正弦波信号V1C+Sを算出することが好ましい。 As a desirable mode of the rotation angle detection device, the second gain correction unit may set the maximum value of the third sine wave signal V C + S to MAX (V C + S 2 ), the fourth sine wave signal to V 1 C + S, and the third sine wave. When the value of the wave signal V C + S is 0 or more, the fourth sine wave signal V 1 C + S is calculated using the following equation (9), and the value of the third sine wave signal V C + S is less than 0 Preferably, the fourth sine wave signal V1 C + S is calculated using the following equation (10).

V1C+S=VC+S×(1/(MAX(VC+S)))・・・(9) V1 C + S = V C + S x (1 / (MAX (V C + S ))) (9)

V1C+S=VC+S×((−1)/(MIN(VC+S)))・・・(10) V1 C + S = V C + S x ((-1) / (MIN (V C + S ))) (10)

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

回転角検出装置の望ましい態様として、前記第2ゲイン補正部は、前記第3余弦波信号VC−Sの最大値をMAX(VC−S)、前記第4余弦波信号をV1C−Sとし、前記第3余弦波信号VC−Sの値が0以上であるとき、下記式(11)を用いて、前記第4余弦波信号V1C−Sを算出し、前記第3余弦波信号VC−Sの値が0未満であるとき、下記式(12)を用いて、前記第4余弦波信号V1C−Sを算出することが好ましい。 As a desirable mode of the rotation angle detection device, the second gain correction unit may set the maximum value of the third cosine wave signal V C-S to MAX (V C-S ) and the fourth cosine wave signal to V 1 C-S. When the value of the third cosine wave signal V C-S is 0 or more, the fourth cosine wave signal V 1 C-S is calculated using the following equation (11), and the third cosine wave signal When the value of V C-S is less than 0, it is preferable to calculate the fourth cosine wave signal V 1 C-S using the following equation (12).

V1C−S=VC−S×(1/(MAX(VC−S)))・・・(11) V1 C-S = V C-S x (1 / (MAX (V C-S ))) (11)

V1C−S=VC−S×((−1)/(MIN(VC−S)))・・・(12) V1C -S = VC -S * ((-1) / (MIN (VC -S ))) (12)

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

回転角検出装置の望ましい態様として、前記角度算出部は、−90deg<θ1h<+90degの範囲内における角度をθ1hとしたとき、下記式(13)式を用いて、角度θ1hを算出し、0deg<θ<360degの範囲内における前記モータの回転角をθとし、前記第4余弦波信号V1C−Sが0以上であるとき、下記式(14)式を用いて、前記モータの回転角θを算出し、前記第4余弦波信号V1C−Sが0未満であるとき、下記式(15)式を用いて、前記モータの回転角θを算出することが好ましい。 As a desirable mode of the rotation angle detection device, the angle calculation unit calculates the angle θ 1 h using the following equation (13), assuming that the angle within the range of −90 deg <θ 1 h <+90 deg is θ 1 h. The rotational angle of the motor within the range of 0 deg <θ 1 <360 deg is θ 1, and the fourth cosine wave signal V 1 C-S is 0 or more, the motor using the following equation (14) calculating a rotation angle theta 1 of, when the fourth cosine wave signal V1 C-S is less than 0, using the following equation (15), it is preferable to calculate the rotation angle theta 1 of the motor.

θ1h=arctan(VC+S/V1C−S)・・・(13) θ 1h = arctan (V C + S / V 1 C-S ) (13)

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

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

これにより、モータの回転角を第2ゲイン補正部によって遅れた位相45degだけ進ませることができる。   Thereby, the rotation angle of the motor can be advanced by the phase 45 deg delayed by the second gain correction unit.

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

これにより、モータを高精度に駆動制御することができる。   Thereby, the drive control of the motor can be performed 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, wherein the motor is provided on a column axis or a rack of steering, and torque control of steering power of the steering is performed. Do.

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

上記の目的を達成するため、本発明の一態様に係る回転角検出方法は、モータの位置検出信号として位置検出センサから出力される、正相正弦波信号と当該正相正弦波信号を位相反転した逆相正弦波信号とを含む差動正弦波信号、及び、正相余弦波信号と当該正相余弦波信号を位相反転した逆相余弦波信号とを含む差動余弦波信号に基づき、前記モータの位置を検出する回転角検出方法であって、前記正相正弦波信号と前記逆相正弦波信号との差分を第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, according to one aspect of the present invention, there is provided a rotation angle detection method comprising: inverting a positive-phase sinusoidal signal and a positive-phase sinusoidal signal output from a position detection sensor as a position detection signal of a motor. A differential sine wave signal including a reversed phase sine wave signal, and a differential cosine wave signal including a positive phase cosine wave signal and an antiphase 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, comprising: setting a difference between the positive phase sine wave signal and the negative phase sine wave signal as a first sine wave signal; and inverting the positive phase cosine wave signal and the reverse phase The second sine wave signal is corrected by correcting the gain of the first sine wave signal based on the step of setting the difference from the cosine wave signal as the first cosine wave signal and the maximum value or the minimum value of the first sine wave signal. And the maximum value or the minimum value of the first cosine wave signal And correcting the gain of the first cosine wave signal to obtain a second cosine wave signal, and adding the second cosine wave signal and the second sine wave signal to generate a third sine wave signal. And subtracting the second sine wave signal from the second cosine wave signal to obtain a third cosine wave signal, and the third sine wave signal based on the maximum value or the minimum value of the third sine wave signal. Correcting the gain of the third cosine wave signal based on the step of correcting the gain of the second sine wave signal and the maximum value or the minimum value of the third cosine wave signal to obtain the fourth cosine wave signal Calculating the rotation angle of the motor based on the fourth sine wave signal and the fourth cosine wave signal.

これにより、リアルタイムで検出された位置検出信号に基づき、回転角検出装置のキャリブレーションを実施することができる。これにより、温度ドリフトや経時変化によって検出精度が低下することを抑制することができ、高い検出精度を維持することができる。   Thereby, based on the position detection signal detected in real time, calibration of a rotation angle detection apparatus can be implemented. As a result, reduction in detection accuracy due to temperature drift or temporal change can be suppressed, and high detection accuracy can be maintained.

本発明によれば、高い検出精度を維持することができる回転角検出装置、モータ制御装置、電動パワーステアリング装置、及び回転角検出方法を提供することができる。   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 capable of maintaining high detection accuracy.

図1は、実施形態1に係る電動パワーステアリング装置の構成を示す図である。FIG. 1 is a diagram showing the configuration of the electric power steering apparatus according to the first embodiment. 図2は、実施形態1に係る電動パワーステアリング装置を制御するコントロールユニットのハードウェア構成を示す模式図である。FIG. 2 is a schematic view showing a hardware configuration of a control unit that controls the electric power steering apparatus according to the first embodiment. 図3は、実施形態1に係る電動パワーステアリング装置を制御するコントロールユニットの機能的な構成を示す機能ブロック図である。FIG. 3 is a functional block diagram showing a functional configuration of a control unit that controls the electric power steering apparatus according to the first embodiment. 図4は、実施形態1における位置検出センサの概略図である。FIG. 4 is a schematic view of the position detection sensor in the first embodiment. 図5は、位置検出信号及び位相角の関係を示す図である。FIG. 5 is a diagram showing the relationship between the position detection signal and the phase angle. 図6は、3相ブラシレスモータにおいて、位置検出部によって検出された電気角を用いて、3相ブラシレスモータのU相電流、V相電流、及びW相電流を制御しているときのモータ制御電流と電気角との関係を示す図である。FIG. 6 shows a motor control current when controlling the U-phase current, V-phase current and W-phase current of the 3-phase brushless motor using the electrical angle detected by the position detection unit in the 3-phase brushless motor It is a figure which shows the relationship between and an electrical angle. 図7は、実施形態1に係る回転角検出装置の概略ブロック構成の一例を示す図である。FIG. 7 is a diagram showing an example of a schematic block configuration of the rotation angle detection device according to the first embodiment. 図8は、差動演算部の等価ブロックの一例を示す図である。FIG. 8 is a diagram showing an example of an equivalent block of the differential operation unit. 図9は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第1図である。FIG. 9 is a first diagram for explaining the concept of difference calculation 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 the difference operation 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 the difference operation in the equivalent block shown in FIG. 8 of the differential operation unit. 図12は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第4図である。FIG. 12 is a fourth diagram for explaining the concept of difference calculation 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 detection concept of 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 phase conversion processing 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 phase conversion processing 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 showing 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 detection concept of 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は、実施形態1に係る回転角検出装置における回転角検出処理手順の一例を示すフローチャートである。FIG. 19 is a flowchart illustrating an example of a rotation angle detection processing procedure in the rotation angle detection device according to the first embodiment. 図20は、実施形態1に係る回転角検出装置における第1正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 20 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first sine wave signal in the rotation angle detection device according to the first embodiment. 図21は、実施形態1に係る回転角検出装置における第1余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 21 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first cosine wave signal in the rotation angle detection device according to the first embodiment. 図22は、実施形態1に係る回転角検出装置における第3正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 22 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third sine wave signal in the rotation angle detection device according to the first embodiment. 図23は、実施形態1に係る回転角検出装置における第3余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 23 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third cosine wave signal in the rotation angle detection device according to the first embodiment. 図24は、EEPROMに記憶される第1正弦波信号及び第1余弦波信号の最大値の上限値、初期値、下限値の一例を示す図である。FIG. 24 is a diagram showing an example of the upper limit value, the initial value, and the lower limit value of the maximum value of the first sine wave signal and the first cosine wave signal stored in the EEPROM. 図25は、EEPROMに記憶される第1正弦波信号及び第1余弦波信号の最小値の上限値、初期値、下限値の一例を示す図である。FIG. 25 is a diagram showing an example of the upper limit value, the initial value, and the lower limit value of the minimum value of the first sine wave signal and the first cosine wave signal stored in the EEPROM. 図26は、EEPROMに記憶される第3正弦波信号及び第3余弦波信号の最大値の上限値、初期値、下限値の一例を示す図である。FIG. 26 is a diagram showing an example of the upper limit value, the initial value, and the lower limit value of the maximum values of the third sine wave signal and the third cosine wave signal stored in the EEPROM. 図27は、EEPROMに記憶される第3正弦波信号及び第3余弦波信号の最小値の上限値、初期値、下限値の一例を示す図である。FIG. 27 is a diagram showing an example of the upper limit value, the initial value, and the lower limit value of the minimum value of the third sine wave signal and the third cosine wave signal stored in the EEPROM. 図28は、実施形態2に係る回転角検出装置における第1正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 28 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first sine wave signal in the rotation angle detection device according to the second embodiment. 図29は、実施形態2に係る回転角検出装置における第1余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 29 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first cosine wave signal in the rotation angle detection device according to the second embodiment. 図30は、実施形態2に係る回転角検出装置における第3正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 30 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third sine wave signal in the rotation angle detection device according to the second embodiment. 図31は、実施形態2に係る回転角検出装置における第3余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 31 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third cosine wave signal in the rotation angle detection device according to the second embodiment. 図32は、実施形態2の変形例に係る回転角検出装置における第1正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 32 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first sine wave signal in the rotation angle detection device according to the modification of the second embodiment. 図33は、実施形態2の変形例に係る回転角検出装置における第1余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 33 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first cosine wave signal in the rotation angle detection device according to the modification of the second embodiment. 図34は、実施形態2の変形例に係る回転角検出装置における第3正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 34 is a flowchart showing an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third sine wave signal in the rotation angle detection device according to the modification of the second embodiment. 図35は、実施形態2の変形例に係る回転角検出装置における第3余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。FIG. 35 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third cosine wave signal in the rotation angle detection device according to the modification of the second embodiment.

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

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

このように、電動パワーステアリング装置100は、車両に搭載されて、車両の運転者によるハンドルホイール1(以下、「ステアリング」ともいう)の操作を補助するものである。ハンドルホイール1のコラム軸2は、減速ギヤ3、ユニバーサルジョイント4a、4b、ラックアンドピニオン機構5を介して、操舵輪のタイロッド6に連結されている。コラム軸2には、ハンドルホイール1の操舵トルクTを検出するトルクセンサ10が設けられている。また、コラム軸2には減速ギヤ3が取り付けられている。減速ギヤ3は、モータ20の発生するトルクを増加させてコラム軸2へ伝達する。このような構造によって、モータ20が発生するトルクにより、ハンドルホイール1の操舵力が補助される。   As described above, the electric power steering apparatus 100 is mounted on a vehicle to assist the driver of the vehicle to operate the steering wheel 1 (hereinafter, also referred to as “steering”). A column shaft 2 of the steering wheel 1 is connected to a tie rod 6 of a steered wheel via a reduction gear 3, universal joints 4 a and 4 b, and a rack and pinion mechanism 5. The column shaft 2 is provided with a torque sensor 10 for detecting the steering torque T of the steering wheel 1. Further, 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 steering 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 for controlling the electric power steering apparatus 100 receives supply of power from the battery 14 via a power supply relay 13 built therein, and is transmitted from the ignition switch 11 Receive an ignition signal. The control unit 30 also 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 based on the value (current detection value) of the current supplied to the motor 20 and the current command value so that the current detection value of the motor 20 follows the current command value. As described above, the control unit 30 is a device that controls the electric power steering device 100 (a control device of the electric power steering device).

図2は、実施形態1に係る電動パワーステアリング装置を制御するコントロールユニットのハードウェア構成を示す模式図である。コントロールユニット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 view showing a hardware configuration of a control unit that controls the electric power steering apparatus according to the first embodiment. As shown in FIG. 2, the control unit 30 includes a power supply 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 central processing unit (CPU) 101, a random access memory (RAM) 102 as a first storage device, a read only memory (ROM) 103 as a second storage device, and an EEPROM (read only memory). 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 connected to the bus 108. The CPU 101 corresponds to a processing device and executes the computer program for control of the electric power steering apparatus 100 stored in the ROM 103 (hereinafter referred to as a control program) to control the electric power steering apparatus 100.

ROM103は、制御プログラム及び電動パワーステアリング装置100の制御に用いるデータを記憶する。また、RAM102は、制御プログラムを動作させるためのワークメモリとして使用される。EEPROM104は、制御プログラムが入出力する制御データ等を記憶する。制御データは、コントロールユニット30に電源が投入された後にRAM102に展開された制御プログラム上で使用され、所定のタイミングでEEPROM104に上書きされる。   The ROM 103 stores control programs and data used to control the electric power steering apparatus 100. The RAM 102 is also used as a work memory for operating the control program. The EEPROM 104 stores control data and the like input and 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 powered on, and is overwritten on 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 for storing information, and are storage devices (primary storage devices) to which the CPU 101 can directly access.

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

また、本実施形態において、RAM102は、後述する回転角検出処理における各種データの更新値を記憶する第2記憶部として機能する。   Further, in the present embodiment, the RAM 102 functions as a second storage unit that stores update values of various data in a rotation angle detection process described later.

A/D変換器106は、トルクセンサ10からの操舵トルクT、モータ電流検出回路16からのモータ20の電流検出値Im及び位置検出部17からのモータ20の回転角θの信号等を入力し、ディジタル信号に変換する。インターフェース105は、CAN(Controller Area Network)等の車載ネットワークに接続されている。インターフェース105は、車速センサ12からの車速Vの信号(車速パルス)を受け付けるためのものである。 A / D converter 106, inputs the steering torque T, the rotation angle theta 1 of the signal of the motor 20 from the current detection value Im and the position detection unit 17 of the motor 20 from the motor current detecting circuit 16 and the like from the torque sensor 10 And convert it 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 signal (vehicle speed pulse) of the vehicle speed V 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 of each phase of UVW based on the current command value to 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 value (current detection value) Im of the current supplied to the motor 20 and outputs it to the A / D converter 106.

位置検出部17は、位置検出センサ25から出力される位置検出信号から、モータ20の回転角θを求める回転角検出処理を行い、A/D変換器106に出力する。本実施形態では、位置検出部17において、位置検出センサ25から出力される位置検出信号を補正し、補正後の信号に基づき、回転角検出処理を行う。なお、位置検出部17は、回路で構成される態様であっても良いし、図2に示す制御用コンピュータ110、より具体的にはCPU101によって実現される態様であっても良い。位置センサ25及び位置検出部17における位置検出信号の補正手法の詳細については後述する。 Position detecting section 17, the position detection signal output from the position detection sensor 25, performs a rotation angle detection process for obtaining the rotation angle theta 1 of the motor 20, and outputs it to the A / D converter 106. 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 as a circuit, or may be implemented as the control computer 110 shown in FIG. 2, more specifically, the CPU 101. Details of the correction method of the position detection signal in the position sensor 25 and the position detection unit 17 will be described later.

図3は、実施形態1に係る電動パワーステアリング装置を制御するコントロールユニットの機能的な構成を示す機能ブロック図である。図3を用いて、電動パワーステアリング装置100の制御を説明する。図3に示すように、コントロールユニット30は、アシスト機能部31を有する。   FIG. 3 is a functional block diagram showing a functional configuration of a control unit that controls the electric power steering apparatus according to the first embodiment. 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 has 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 detection value Im approaches zero, proportional control and differential control and integral At least one of the control is performed, and 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 in accordance with the duty ratio D calculated by the current control unit 31b. The motor current detection circuit 16 detects the current Im flowing in the motor 20.

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

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

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 (a magnetoresistive element). An example of the MR sensor 252 is a TMR sensor using a tunnel magnetoresistive effect (Tunnel Magneto Resistance Effect). The MR sensor 252 may be an AMR (Anisotropic Magneto Resistive) sensor or a GMR (Giant Magnetoresistance Effect) sensor other than a TMR 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 according to the change of the magnetic field generated when the rotary magnet 251 rotates around the axial center X of the motor shaft (rotational shaft) 20a together with the motor shaft (rotational 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 a position detection signal. 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 showing the relationship between the position detection signal and the phase angle. (A) shown in FIG. 5 shows an ideal waveform of the positive phase sine wave signal Sinθ 1 +, and (b) shown in FIG. 5 shows an ideal waveform of the antiphase sine wave signal Sinθ 1 − There is. Also, (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 − It shows. Also, shown in FIG. 5 (e) shows the rotation angle (mechanical angle) theta 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 the present embodiment, since the number of poles of the rotating magnet 251 is 1, and 1 cycle Tm of mechanical angle theta 1 of the motor 20, and one period Te of the electrical angle of the MR sensor 252 matches Do. That, MR sensor 252 shown in Figure 4, in one cycle Tm of mechanical angle theta 1 of the motor 20, to detect one cycle Te of the electrical angle of the MR sensor 252. The position detecting sensor 25, if the output can be a differential sine wave signal and the differential cosine wave signal is not limited to the above-described configuration, for example, one period Tm of mechanical angle theta 1 of the motor 20 On the other hand, a configuration capable of outputting a differential sine wave signal and a differential cosine wave signal for a plurality of periods in electrical angle may be employed.

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

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

アシスト機能部31の電流制御部31bは、位置検出部17によって検出された電気角を用いて、モータ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 detected by the position detection unit 17. The example shown in FIG. 6 shows an example in which 0 [deg] of the electrical angle is set as the current control start position, and control is performed so that the phase of the U phase becomes 0 [deg].

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

図7は、実施形態1に係る回転角検出装置の概略ブロック構成の一例を示す図である。図7に示すように、実施形態1に係る回転角検出装置200は、位置検出センサ25と、位置検出部17とを含む。   FIG. 7 is a diagram showing an example of a schematic block configuration of the rotation angle detection device according to the first embodiment. As shown in FIG. 7, the rotation angle detection device 200 according to the first 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を出力する。 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 − to output a first sine wave signal Sinθ 1 f .

余弦波差分演算部1712は、正相余弦波信号Cosθ+と逆相余弦波信号Cosθ−との差分を演算して、第1余弦波信号Cosθ1fを出力する。 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 − to output a first cosine wave signal Cosθ 1f .

差分演算部171には、アナログ信号である差動正弦波信号及び差動余弦波信号がサンプリング処理されてA/D変換された離散値の差動正弦波信号及び差動余弦波信号が入力される。   The differential computing unit 171 receives differential sine wave signals and differential cosine wave signals of discrete values obtained by sampling and processing A / D converted differential sine wave signals and differential cosine wave signals as analog signals. Ru.

図8は、差動演算部の等価ブロックの一例を示す図である。図9は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第1図である。図10は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第2図である。図11は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第3図である。図12は、差動演算部の図8に示す等価ブロックにおける差分演算概念を説明する第4図である。   FIG. 8 is a diagram showing an example of an equivalent block of the differential operation unit. FIG. 9 is a first diagram for explaining the concept of difference calculation in the equivalent block shown in FIG. 8 of the differential calculation unit. FIG. 10 is a second diagram for explaining the concept of the difference operation in the equivalent block shown in FIG. 8 of the differential operation unit. FIG. 11 is a third diagram for explaining the concept of the difference operation in the equivalent block shown in FIG. 8 of the differential operation unit. FIG. 12 is a fourth diagram for explaining the concept of difference calculation 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 offset voltage Dif Sin1 is superimposed. Further, as shown in FIG. 10, the 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θ−とを加算した値の半値で表される。 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 offset voltage Dif positive phase sine wave signal sin [theta 1d + is obtained by subtracting the Sin1, represented by the following equation (2), reversed-phase sine wave signal sin [theta 1d obtained by subtracting the offset voltage Dif Sin1 - the following (3) It can be expressed by a formula.

(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 equation (1) into the equations (2) and (3), the following equations (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)式が得られる。 Assuming that the first sine wave signal Sinθ 1f = (Sinθ 1d +) = (− (Sinθ 1d −)) with the positive phase sine wave signal Sinθ 1d + as a reference, and the equation (5) is subtracted from the equation (4), 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 offset voltage Dif Cos1 is represented 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 offset voltage Dif positive phase sine wave signal Cos? 1d + is obtained by subtracting the Cos 1, represented by the following equation (8), reversed-phase cosine wave signal Cos? 1d obtained by subtracting the offset voltage Dif Cos 1 - the following (9) It can be expressed by a formula.

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

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

上記(7)式を(8)式及び(9)式に代入すると、以下の(10)式及び(11)式が得られる。   By substituting the equation (7) into the 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)式が得られる。 Assuming that the first cosine wave signal Cosθ 1f = (Cosθ 1d +) = (− (Cosθ 1d −)) with the positive phase cosine wave signal Cosθ 1d + as a reference, and the equation (11) is subtracted from the 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 this 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, are differentially processed. The positive phase cosine wave signal Cosθ 1 + and the negative phase cosine wave signal Cosθ 1 − which are cosine wave signals are acquired with a resolution of 2 times. Thereby, the first sine wave signal Sinθ 1f is obtained by subtracting the antiphase sine wave signal Sinθ 1 − from the positive phase sine wave signal Sinθ 1 + using the following equation (6 ′) (see FIG. 11). ). Further, the first cosine wave signal Cosθ 1 f is obtained by subtracting the antiphase 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.

第1ゲイン補正部172は、第1正弦波ゲイン補正部1721と、第1余弦波ゲイン補正部1722と、を備えている。   The first gain correction unit 172 includes a first sine wave gain correction unit 1721 and a first cosine wave gain correction unit 1722.

第1正弦波ゲイン補正部1721は、第1正弦波信号Sinθ1fのゲインを補正した第2正弦波信号Sinθ1gを出力する。 The first sine wave gain correction unit 1721 outputs the second sine-wave signal sin [theta 1 g obtained by correcting the gain of the first sine-wave signal sin [theta 1f.

第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fのゲインを補正した第2余弦波信号Cosθ1gを出力する。 First cosine-wave gain correction unit 1722 outputs the second cosine wave signal Cos? 1 g obtained by correcting the gain of the first cosine wave signal Cos? 1f.

図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 detection concept of 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 performs gain correction 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, when the value of the first sine-wave signal sin [theta 1f is greater than or equal to 0, the sine wave signal sin [theta 1 g U and the second sine-wave signal sin [theta 1 g, the first sine-wave signal sin [theta 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, when the value of the first sine wave signal Sinθ 1f is 0 or more, 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 [theta 1f is less than 0, with (14 ') below, it calculates a second sine-wave signal sin [theta 1 g.

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が得られる。 Thus, the second sine-wave signal sin [theta 1 g the gain of the first sine-wave signal sin [theta 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 FIG. 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 θ 1 g U = Cos θ 1 f × (1 / (MAX (Cos θ 1 f ))) (15)

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

そして、第1余弦波ゲイン補正部1722は、第1余弦波信号Cosθ1fの値が0以上であるとき、余弦波信号Cosθ1gUを第2余弦波信号Cosθ1gとし、第1余弦波信号Cosθ1fの値が0未満であるとき、余弦波信号Cosθ1gLを第2余弦波信号Cosθ1gとする。 The first cosine wave gain correction unit 1722, when the value of the first cosine wave signal Cos? 1f is greater than or equal to 0, the cosine wave signal Cos? 1 g U as the second cosine wave signal Cos? 1 g, 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, when the value of the first cosine wave signal Cosθ 1f is 0 or more, 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 less than 0, with (16 ') below, calculates a second cosine wave signal Cos? 1 g.

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が得られる。 Thus, the second cosine wave signal Cos? 1 g the gain of the first cosine wave signal Cos? 1f is corrected is obtained.

第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 the 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 obtain the second cosine wave A third cosine wave signal V C-S obtained by phase-converting the signal Cosθ 1 g 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 phase conversion processing when no phase shift occurs in the second sine wave signal and the second cosine wave signal. FIG. 16 is a vector diagram after phase conversion processing 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 becomes 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 +45+ (α / 2) deg phase with respect to the second cosine wave signal Cos θ 1 g . 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 degrees.

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

一方、図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 occurring a phase shift of α to the second sine-wave signal sin [theta 1 g and the second cosine wave signal Cos? 1 g, the above equation (17) of the vector (Cos? 1 g + sin [theta 1 g ) Becomes larger than the vector (Cosθ 1g −Sinθ 1g ) of the above equation (18).

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

これにより、第2正弦波信号Sinθ1g及び第2余弦波信号Cosθ1gの位相ずれαが補正される。 Thereby, the phase shift α of the second sine wave signal Sinθ 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 showing an example of an equivalent block of the second gain correction unit. FIG. 18 is a diagram for explaining the detection concept of 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参照)。 The second sine wave gain correction unit 1731, when the value of the third sinusoidal signal V C + S at the zero point detection of the third cosine wave signal V C-S is 0 or more (V C + S ≧ 0) , the third 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 performs gain correction of the third sine wave signal V C + S using the following equations (19) and (20), and the sine wave signal V 1 C + S U and the sine wave signal V 1 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 0 or more, the second sine wave gain correction unit 1731 sets the sine wave signal V 1 C + S U as the fourth sine wave signal V 1 C + S, and the third sine wave signal V When the value of C + S is less than 0, the sine wave signal V1 C + SL 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, when the value of the third sine wave signal V C + S is 0 or more, the second sine wave gain correction unit 1731 calculates the fourth sine wave signal V 1 C + S using the following equation (19 ′), When the value of the third sine wave signal V C + S is less than 0, the fourth sine wave signal V 1 C + S is calculated using the following equation (20 ′).

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

V1C+S=VC+S×((−1)/(MIN(VC+S)))・・・(20’) V1 C + S = V C + S x ((-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 at the time of detecting the zero point of the third sine wave signal V C + S is 0 or more (V C -S 00), the second cosine wave gain correction unit 1732 is relevant. 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 V 1 C-S U and the cosine wave The signals V1 C-S L are determined.

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

V1C−SL=VC−S×((−1)/(MIN(VC−S)))・・・(22) V1 C-S L = V C-S x ((-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とする。 Then, when the value of the third cosine wave signal V C-S is 0 or more, the second cosine wave gain correction unit 1732 sets the cosine wave signal V 1 C-S U as the fourth cosine wave signal V 1 C-S , When the value of the third cosine wave signal V C-S is less than 0, the cosine wave signal V 1 C-S L is made the fourth cosine wave signal V 1 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 0 or more, the second cosine wave gain correction unit 1732 uses the following equation (21 ') to calculate the fourth cosine wave signal V 1 C-S When the value of the third cosine wave signal V C-S is less than 0, the fourth cosine wave signal V 1 C-S is calculated using the following equation (22 ′).

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

V1C−S=VC−S×((−1)/(MIN(VC−S)))・・・(22’) V1C -S = VC -S * ((-1) / (MIN (VC -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と、を備えている。   The angle calculation unit 174 includes an arctangent calculation unit 1741, a quadrant determination unit 1742, and a motor electrical angle calculation unit 1743.

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

θ1h=arctan(V1C+S/V1C−S)・・・(23) θ 1 h = arctan (V 1 C + S / V 1 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 Do. Further, the quadrant determination unit 1742 causes the second gain correction unit 173 to advance the phase 45 deg delayed.

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

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

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

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

モータ電気角演算部1743は、象限判定部1742によって算出されたモータ20の回転角θに基づき、モータ20の磁極対数に対応する電気角θを算出する。モータ20の磁極対数が4つである場合、回転角θを4分割して、4周期分の電気角θを算出する。 Motor electric angle calculating unit 1743, based on the rotational angle theta 1 of the motor 20 calculated by the quadrant determining unit 1742, calculates the electric angle theta 2 which corresponds to the magnetic pole logarithm of the motor 20. If the pole logarithm of the motor 20 is four, the rotation angle theta 1 4 divided and calculates an electrical angle theta 2 of the 4 cycles.

次に、本実施形態に係る回転角検出装置200における回転角検出処理について説明する。図19は、実施形態1に係る回転角検出装置における回転角検出処理手順の一例を示すフローチャートである。図20は、実施形態1に係る回転角検出装置における第1正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。図21は、実施形態1に係る回転角検出装置における第1余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。図22は、実施形態1に係る回転角検出装置における第3正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。図23は、実施形態1に係る回転角検出装置における第3余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。   Next, rotation angle detection processing in the rotation angle detection device 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 first embodiment. FIG. 20 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first sine wave signal in the rotation angle detection device according to the first embodiment. FIG. 21 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first cosine wave signal in the rotation angle detection device according to the first embodiment. FIG. 22 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third sine wave signal in the rotation angle detection device according to the first embodiment. FIG. 23 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third cosine wave signal in the rotation angle detection device according to the first embodiment.

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

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 a first cosine wave signal Cos? 1f of the first sine-wave signal sin [theta 1f the initial value of) MAX1ref, the minimum value MIN (sin [theta 1f) and the initial value MIN1ref, the maximum value of the third sine wave signal of the minimum value MIN of the first cosine wave signal Cosθ 1f (Cosθ 1f) of the first sine-wave signal sin [theta 1f V C + initial value MAX2ref of the maximum value MAX of S (V C + S) and a maximum value MAX (V C-S) of the third cosine wave signal V C-S, the minimum value MIN of the maximum value V C + S of the third sinusoidal signal ( V C + S), and a third initial value MIN2ref of the minimum value MIN of the cosine wave signal V C-S (V C- S) are stored.

実運用時において、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)の値として書き込まれる。 At the time of actual operation, when the CPU 101 receives the ignition signal transmitted from the ignition switch 11, it reads MAX1ref, MIN1ref, MAX2ref, MIN2ref stored in the EEPROM 104 (first storage unit), and sends it to 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 written as the value of the maximum value MAX of the maximum value V C + S of the signal (V C + S) and a maximum value MAX of the third cosine wave signal V C-S (V C- S), the maximum of the third sine wave signal MIN2ref respectively values of V C + minimum value MIN (V C + S) of S and the third cosine wave signal V C-S minimum value MIN of (V C-S) Written as

位置検出部17は、位置検出センサ25から出力される差動正弦波信号(正相正弦波信号Sinθ+、逆相正弦波信号Sinθ−)及び差動余弦波信号(正相余弦波信号Cosθ+、逆相余弦波信号Cosθ−)をサンプリング処理して取得する(ステップS100)。差分演算部171の正弦波差分演算部1711は、上述した(6’)式を用いて、第1正弦波信号Sinθ1fを算出する(ステップS101a)。また、差分演算部171の余弦波差分演算部1712は、上述した(12’)式を用いて、第1余弦波信号Cosθ1fを算出する(ステップS101b)。 The position detection unit 17 detects differential sine wave signals (positive-phase sine wave signal Sinθ 1 +, reverse-phase sine wave signal Sinθ 1 −) and differential cosine wave signals (positive-phase cosine wave signal) output from the position detection sensor 25. The cos θ 1 +, anti-phase cosine wave signal Cos θ 1 −) is sampled and acquired (step S100). The sine wave difference calculation unit 1711 of the difference calculation unit 171 calculates the first sine wave signal Sinθ 1 f using the above-described equation (6 ′) (step S101 a). Further, the cosine wave difference calculation unit 1712 of the difference calculation unit 171 calculates the first cosine wave signal Cosθ 1 f using the above-described equation (12 ′) (step S101 b).

第1ゲイン補正部172は、回転角検出処理を行っている間、常時、図20に示す割り込み処理手順を実施する。   While performing the rotation angle detection process, the first gain correction unit 172 always carries out the interrupt processing procedure shown in FIG.

第1ゲイン補正部172は、第1余弦波信号Cosθ1fのゼロ点(Cosθ1f=0)を検知する(ステップS201)。第1余弦波信号Cosθ1fのゼロ点を検知していない場合(ステップS201;No)、第1余弦波信号Cosθ1fのゼロ点を検知するまで、ステップS201の処理を繰り返す。 The first gain correction portion 172 detects the zero point of the first cosine wave signal Cos? 1f the (Cosθ 1f = 0) (step S201). If not detected zero point of the first cosine wave signal Cos? 1f (step S201; No), until detection of the zero point of the first cosine wave signal Cos? 1f, repeats the processing of step S201.

第1余弦波信号Cosθ1fのゼロ点を検知すると(ステップS201;Yes)、第1ゲイン補正部172は、第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるか否かを判定する(ステップS202)。 Upon detecting the zero point of the first cosine wave signal Cos? 1f (step S201; 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 Whether or not 0 or more (Sin θ 1f 0 0) is determined (step S202).

第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるとき(ステップS202;Yes)、第1ゲイン補正部172は、第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)としてRAM102上のデータを更新し(ステップS203)、ステップS201の処理に戻る。 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 S202; Yes), the first gain correction portion 172, the the value of 1 sine wave signal sin [theta 1f updates the maximum value MAX data on RAM102 as (sin [theta 1f) of the first sine-wave signal sin [theta 1f (step S203), the process returns to step S201.

第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0未満(Sinθ1f<0)であるとき(ステップS202;No)、第1ゲイン補正部172は、第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)としてRAM102上のデータを更新し(ステップS204)、ステップS201の処理に戻る。 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 S202; No), the first gain correction portion 172, the the value of 1 sine wave signal sin [theta 1f updates the minimum value MIN data on RAM102 as (sin [theta 1f) of the first sine-wave signal sin [theta 1f (step S204), the process returns to step S201.

第1ゲイン補正部172は、回転角検出処理を行っている間、常時、図21に示す割り込み処理手順を実施する。   The first gain correction unit 172 always carries out the interrupt processing procedure shown in FIG. 21 while performing the rotation angle detection processing.

第1ゲイン補正部172は、第1正弦波信号Sinθ1fのゼロ点(Sinθ1f=0)を検知する(ステップS301)。第1正弦波信号Sinθ1fのゼロ点を検知していない場合(ステップS301;No)、第1正弦波信号Sinθ1fのゼロ点を検知するまで、ステップS301の処理を繰り返す。 The first gain correction portion 172 detects the zero point of the first sine-wave signal sin [theta 1f the (Sinθ 1f = 0) (step S301). If not detected zero point of the first sine-wave signal sin [theta 1f (step S301; No), until detection of the zero point of the first sine-wave signal sin [theta 1f, it repeats the processing of step S301.

第1正弦波信号Sinθ1fのゼロ点を検知すると(ステップS301;Yes)、第1ゲイン補正部172は、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるか否かを判定する(ステップS302)。 Upon detecting the zero point of the first sine-wave signal sin [theta 1f (step S301; 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 It is determined whether or not 0 or more (Cos θ 1f 0 0) (step S302).

第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるとき(ステップS302;Yes)、第1ゲイン補正部172は、第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)としてRAM102上のデータを更新し(ステップS303)、ステップS301の処理に戻る。 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 S302; Yes), the first gain correction portion 172, the the value of 1 cosine wave signal Cos? 1f maximum value MAX of the first cosine wave signal Cosθ 1f (Cosθ 1f) as to update the data in the RAM 102 (step S303), the process returns to step S301.

第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0未満(Cosθ1f<0)であるとき(ステップS302;No)、第1ゲイン補正部172は、第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)としてRAM102上のデータを更新し(ステップS304)、ステップS301の処理に戻る。 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 S302; No), the first gain correction portion 172, the the value of 1 cosine wave signal Cos? 1f minimum value MIN of the first cosine wave signal Cosθ 1f (Cosθ 1f) as to update the data in the RAM 102 (step S304), the process returns to step S301.

図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 00) It is determined whether or not it is (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 [theta 1f is 0 or more (sin [theta 1f ≧ 0) (step S102a; Yes), the first sine wave gain correction unit 1721, using the above-described (13 ') below, the A two-sinusoidal 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 [theta 1f is smaller than 0 (sin [theta 1f <0) (step S102a; No), the first sine wave gain correction unit 1721, using the above-described (14 ') where the A two-sinusoidal 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 the value of the first cosine wave signal Cos θ 1 f is 0 or more (Cos θ 1 f f 0) (step S102 b).

第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θ 1 f is 0 or more (Cos θ 1f 0 0) (step S102 b; Yes), the first cosine wave gain correction unit 1722 uses the above-mentioned equation (15 ′) to calculate The 2 cosine wave signal Cosθ 1g is calculated (step S103 b).

第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 S102 b; No), the first cosine wave gain correction unit 1722 uses the above-mentioned equation (16 ′) to calculate The two cosine wave signal Cosθ 1g is calculated (step S104 b).

第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-mentioned equation (17), and (18 The third cosine wave signal V C-S obtained by phase-converting the second cosine wave signal Cosθ 1 g is calculated using the equation (step S105).

第2ゲイン補正部173は、回転角検出処理を行っている間、常時、図22に示す割り込み処理手順を実施する。   While performing the rotation angle detection process, the second gain correction unit 173 always carries out the interrupt processing procedure shown in FIG.

第2ゲイン補正部173は、第3余弦波信号VC−Sのゼロ点(VC−S=0)を検知する(ステップS401)。第3余弦波信号VC−Sのゼロ点を検知していない場合(ステップS401;No)、第3余弦波信号VC−Sのゼロ点を検知するまで、ステップS401の処理を繰り返す。 The second gain correction unit 173 detects the zero point (V C -S = 0) of the third cosine wave signal V C -S (step S401). When the zero point of the third cosine wave signal V C-S is not detected (step S401; No), the process of step S401 is repeated until the zero point of the third cosine wave signal V C-S is detected.

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

第3余弦波信号VC−Sのゼロ点検出時における第3正弦波信号VC+Sの値が0以上(VC+S≧0)であるとき(ステップS402;Yes)、第2ゲイン補正部173は、第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最大値MAX(VC+S)としてRAM102上のデータを更新し(ステップS403)、ステップS401の処理に戻る。 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 0) (step S402; 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 S403), the process returns to step S401.

第3余弦波信号VC−Sのゼロ点検出時における第3正弦波信号VC+Sの値が0未満(VC+S<0)であるとき(ステップS402;No)、第2ゲイン補正部173は、第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最小値MIN(VC+S)としてRAM102上のデータを更新し(ステップS404)、ステップS401の処理に戻る。 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 S402; 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 S404), the process returns to step S401.

第2ゲイン補正部173は、回転角検出処理を行っている間、常時、図23に示す割り込み処理手順を実施する。   While performing the rotation angle detection process, the second gain correction unit 173 always carries out the interrupt processing procedure shown in FIG.

第2ゲイン補正部173は、第3正弦波信号VC+Sのゼロ点(VC+S=0)を検知する(ステップS501)。第3正弦波信号VC+Sのゼロ点を検知していない場合(ステップS501;No)、第3正弦波信号VC+Sのゼロ点を検知するまで、ステップS501の処理を繰り返す。 The second gain correction unit 173 detects the zero point (V C + S = 0) of the third sine wave signal V C + S (step S 501). When the zero point of the third sine wave signal V C + S is not detected (step S501; No), the process of step S501 is repeated until the zero point of the third sine wave signal V C + S is detected.

第3正弦波信号VC+Sのゼロ点を検知すると(ステップS501;Yes)、第2ゲイン補正部173は、第3正弦波信号VC+Sのゼロ点検出時における第3余弦波信号VC−Sの値が0以上(VC−S≧0)であるか否かを判定する(ステップS502)。 When the zero point of the third sine wave signal V C + S is detected (step S501; 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 V is 0 or more (V C -S 0 0) (step S502).

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

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

図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 0) It is determined whether or not it is (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 0 or more (V C + S 0 0) (step S106 a; Yes), the second sine wave gain correction unit 1731 uses the equation (19 ′) described above to The four sine wave signals V1 C + S are 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 S106 a; No), the second sine wave gain correction unit 1731 uses the above equation (20 ′) to calculate The four sine wave signals V1 C + S are 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 the value of the third cosine wave signal V C-S is 0 or more (V C-S S 0) (step S106 b ).

第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 0 or more (V C-S 0 0) (step S106 b; Yes), the second cosine wave gain correction unit 1732 calculates the above-mentioned equation (21 ') The fourth cosine wave signal V1 C-S is calculated using (step S107 b).

第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 S106 b; No), the second cosine wave gain correction unit 1732 calculates the above-mentioned equation (22 ') The fourth cosine wave signal V1 C-S is calculated using (step S108 b).

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

角度算出部174の象限判定部1742は、第4余弦波信号V1C−Sが0以上(V1C−S≧0)であるか否かを判定する(ステップS110)。 The quadrant determining unit 1742 of the angle calculating unit 174 determines whether the fourth cosine wave signal V1C -S is 0 or more (V1C -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 V1C -S is 0 or more (V1C -S ≧ 0) (step S110; Yes), the quadrant determining unit 1742 uses the above-mentioned equation (24) to satisfy 0deg <θ 1. <calculates a rotation angle theta 1 of the motor 20 in the range of 360 deg (step S111).

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

そして、位置検出部17は、求めたモータ20の回転角θ1を出力して(ステップS113)、ステップS100の処理に戻り、ステップS100からステップS113の処理を繰り返し行う。   Then, the position detection unit 17 outputs the calculated rotation angle θ1 of the motor 20 (Step S113), returns to the process of Step S100, and repeats the processes of Step S100 to Step S113.

上述した回転角検出処理手順により、リアルタイムでモータ20の回転角θが補正されるので、温度ドリフトや経時変化によって検出精度が低下することを抑制することができ、高い検出精度を維持することができる。 By the rotation angle detection process procedure described above, the rotation angle theta 1 of the motor 20 in real time is corrected, can be detected accurately by the temperature drift or aging to suppress the decrease, maintain a high detection accuracy can Can.

なお、回転角検出装置200は、モータ20を駆動制御するモータ制御装置を構成する。   The rotation angle detection device 200 constitutes a motor control device that drives and controls the motor 20.

また、モータ制御装置は、電動パワーステアリング装置100を構成する。   Further, the motor control device constitutes an electric power steering device 100.

以上説明したように、実施形態1に係る回転角検出装置200、モータ制御装置、及び電動パワーステアリング装置100は、正相正弦波信号Sinθ+と逆相正弦波信号Sinθ−とを含む差動正弦波信号、及び、正相余弦波信号Cosθ+と逆相余弦波信号Cosθ−とを含む差動余弦波信号を、モータ20の位置検出信号として出力する位置検出センサ25と、位置検出信号に基づき、モータ20の位置を検出する位置検出部17と、第1記憶部(EEPROM104)及び第2記憶部(RAM102)と、を備える。位置検出部17は、正相正弦波信号Sinθ+と逆相正弦波信号Sinθ−との差分を第1正弦波信号Sinθ1fとして出力し、正相余弦波信号Cosθ+と逆相余弦波信号Cosθ−との差分を第1余弦波信号Cosθ1fとして出力する差分演算部171と、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)又は最小値MIN(Sinθ1f)に基づき、第1正弦波信号Sinθ1fのゲインを補正した第2正弦波信号Sinθ1gを出力すると共に、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)又は最小値MIN(Cosθ1f)に基づき、第1余弦波信号Cosθ1fのゲインを補正した第2余弦波信号Cosθ1gを出力する第1ゲイン補正部172と、
第2余弦波信号Cosθ1gと第2正弦波信号Sinθ1gとを加算して第3正弦波信号VC+Sを生成し、第3正弦波信号VC+Sの最大値MAX(VC+S)又は最小値MIN(VC+S)に基づき、第3正弦波信号VC+Sのゲインを補正した第4正弦波信号V1C+Sを出力すると共に、第2余弦波信号Cosθ1gから第2正弦波信号Sinθ1gを減算して第3余弦波信号VC−Sを生成し、第3余弦波信号VC−Sの最大値MAX(VC−S)又は最小値MIN(VC−S)に基づき、第3余弦波信号VC−Sのゲインを補正した第4余弦波信号V1C−Sを出力する第2ゲイン補正部173と、第4正弦波信号V1C+S及び第4余弦波信号V1C−Sに基づき、モータ20の回転角θを算出する角度算出部174と、を備える。
As described above, the rotation angle detection apparatus 200, the motor control apparatus, and the electric power steering apparatus 100 according to the first embodiment include the difference including the positive phase sine wave signal Sinθ 1 + and the negative phase sine wave signal Sinθ 1 − A position detection sensor 25 which outputs a differential cosine wave signal including a moving sine wave signal, a positive phase cosine wave signal Cosθ 1 + and a negative phase cosine wave signal Cosθ 1 − as a position detection signal of the motor 20; A position detection unit 17 that detects the position of the motor 20 based on the detection signal, and a first storage unit (EEPROM 104) and a second storage unit (RAM 102) are provided. Position detecting unit 17 includes a positive-phase sine wave signal sin [theta 1 + and the negative-phase sine wave signal sin [theta 1 - outputting the difference between the first sine-wave signal sin [theta 1f, positive phase cosine wave signal Cos? 1 + anti-phase cosine wave signal Cos? 1 - the difference calculation unit 171 for outputting the difference as the first cosine wave signal Cos? 1f and, based on the maximum value of the first sine-wave signal Sinθ 1f MAX (Sinθ 1f) or the minimum value MIN (Sinθ 1f) outputs a second sine-wave signal sin [theta 1 g obtained by correcting the gain of the first sine-wave signal sin [theta 1f, based on the maximum value of the first cosine wave signal Cosθ 1f MAX (Cosθ 1f) or the minimum value MIN (Cos? 1f) A first gain correction unit 172 that outputs a second cosine wave signal Cosθ 1g obtained by correcting the gain of the first cosine wave signal Cosθ 1f ;
By adding a second cosine wave signal Cos? 1 g and the second sine-wave signal sin [theta 1 g to generate a third sinusoidal signal V C + S, the maximum value MAX (V C + S) or the minimum value MIN of the third sinusoidal signal V C + S Based on (V C + S ), the fourth sine wave signal V 1 C + S obtained by correcting the gain of the third sine wave signal V C + S is output, and the second sine wave signal S in θ 1 g is subtracted from the second cosine wave signal Cos θ 1 g . generating a third cosine wave signal V C-S, based on the maximum value of the third cosine wave signal V C-S MAX (V C -S) or the minimum value MIN (V C-S), the third cosine wave signal a second gain correction portion 173 for outputting a fourth cosine wave signal V1 C-S obtained by correcting the gain of V C-S, based on the fourth sine wave signal V1 C + S, and the fourth cosine wave signal V1 C-S, the motor angle calculating part for calculating a rotation angle theta 1 of 20 It includes a 74, a.

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

具体的に、第1ゲイン補正部172は、第1余弦波信号Cosθ1fのゼロ点を検出し、当該ゼロ点検出時において、第1正弦波信号Sinθ1fの値が0以上であるとき、当該第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)として第2記憶部(RAM102)に記憶し、第1正弦波信号Sinθ1fの値が0未満であるとき、当該第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)として第2記憶部(RAM102)に記憶する。また、第1ゲイン補正部172は、第1正弦波信号Sinθ1fのゼロ点を検出し、当該ゼロ点検出時において、第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0以上であるとき、当該第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)として第2記憶部(RAM102)に記憶し、第1余弦波信号Cosθ1fの値が0未満であるとき、当該第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)として第2記憶部(RAM102)に記憶する。 Specifically, the first gain correction unit 172 detects the zero point of the first cosine wave signal Cosθ 1 f , and when the value of the first sine wave signal Sinθ 1 f is 0 or more at the time of the detection of the zero point. the value of the first sine-wave signal sin [theta 1f stores the maximum value MAX of the first sine-wave signal sin [theta 1f second storage section as (Sinθ 1f) (RAM102), the value of the first sine-wave signal sin [theta 1f is less than 0 sometimes, it stores the value of the first sine-wave signal sin [theta 1f to the minimum value MIN (Sinθ 1f) as a second storage unit of the first sine-wave signal Sinθ 1f (RAM102). The first gain correction portion 172 detects the zero point of the first sine-wave signal sin [theta 1f, during the zero-point detection, the first cosine wave signal at the zero point detection of the first sine-wave signal sin [theta 1f Cos? when the value of 1f is 0 or more, storing the value of the first cosine wave signal Cos? 1f the maximum value MAX (Cos? 1f) as a second storage unit of the first cosine wave signal Cos? 1f (RAM 102), first when the value of the cosine wave signal Cos? 1f is less than 0, stores the value of the first cosine wave signal Cos? 1f to the minimum value MIN (Cos? 1f) as a second storage unit of the first cosine wave signal Cos? 1f (RAM 102) Do.

これにより、第2正弦波信号Sinθ1gを得るための第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)又は最小値MIN(Sinθ1f)をリアルタイムで取得することができる。また、第2余弦波信号Cosθ1gを得るための第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)又は最小値MIN(Cosθ1f)をリアルタイムで取得することができる。 Thereby, the maximum value MAX (Sinθ 1f ) or the minimum value MIN (Sinθ 1f ) of the first sine wave signal Sinθ 1f for obtaining the second sine wave signal Sinθ 1g can be acquired in real time. Further, the maximum value MAX (Cosθ 1f ) or the minimum value MIN (Cosθ 1f ) of the first cosine wave signal Cosθ 1f for obtaining the second cosine wave signal Cosθ 1g can be acquired in real time.

また、具体的に、第2ゲイン補正部173は、第3余弦波信号VC−Sのゼロ点を検出し、当該ゼロ点検出時において、第3正弦波信号VC+Sの値が0以上であるとき、当該第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最大値MAX(VC+S)として第2記憶部(RAM102)に記憶し、第3余弦波信号VC−Sのゼロ点検出時における第3正弦波信号VC+Sの値が0未満であるとき、当該第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最小値MIN(VC+S)として第2記憶部(RAM102)に記憶する。また、第2ゲイン補正部173は、第3正弦波信号VC+Sのゼロ点を検出し、当該ゼロ点検出時において、第3余弦波信号VC−Sの値が0以上であるとき、当該第3余弦波信号VC−Sの値を第3余弦波信号VC−Sの最大値MAX(VC−S)として第2記憶部(RAM102)に記憶し、第3正弦波信号VC+Sのゼロ点検出時における第3余弦波信号VC−Sの値が0未満であるとき、当該第3余弦波信号VC−Sの値を第3余弦波信号VC−Sの最小値MIN(VC−S)として第2記憶部(RAM102)に記憶する。 Further, specifically, the second gain correction portion 173, in detecting the zero point of the third cosine wave signal V C-S, at the time of the zero-point detection, the value of the third sinusoidal signal V C + S is 0 or more At one point, and stores the value of the third sine wave signal V C + S in the second storage unit as the maximum value MAX (V C + S) of the third sinusoidal signal V C + S (RAM102), third cosine wave signal V C-S when the value of the third sinusoidal signal V C + S at the zero point detection is less than 0, 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) 2) Store in the storage unit (RAM 102). In addition, the second gain correction unit 173 detects the zero point of the third sine wave signal V C + S , and when the value of the third cosine wave signal V C-S is 0 or more at the time of the zero point detection, the value of the third cosine wave signal V C-S stored in the second memory as the maximum value MAX of the third cosine wave signal V C-S (V C- S) (RAM102), third sinusoidal signal V C + S minimum value MIN when the values of the third cosine wave signal V C-S at the zero point detection is less than 0, the value of the third cosine wave signal V C-S of the third cosine wave signal V C-S It stores in the second storage unit (RAM 102) as (V C−S ).

これにより、第4正弦波信号V1C+Sを得るための第3正弦波信号VC+Sの最大値MAX(VC+S)又は最小値MIN(VC+S)をリアルタイムで取得することができる。また、第4余弦波信号V1C−Sを得るための第3余弦波信号VC−Sの最大値MAX(VC−S)又は最小値MIN(VC−S)をリアルタイムで取得することができる。 As a result, it is possible to obtain the maximum value MAX (V C + S ) or the minimum value MIN (V C + S ) of the third sine wave signal V C + S for obtaining the fourth sine wave signal V 1 C + S in real time. Also, to obtain the maximum value MAX (V C-S ) or the minimum value MIN (V C-S ) of the third cosine wave signal V C-S for obtaining the fourth cosine wave signal V 1 C-S in real time Can.

また、実施形態1に係るモータ制御装置は、高精度に算出されたモータ20の回転角を用いてモータ20を駆動制御することで、モータ20を高精度に駆動制御することができる。   The motor control device according to the first embodiment can drive and control the motor 20 with high accuracy by controlling the drive of the motor 20 using the rotation angle of the motor 20 calculated with high accuracy.

また、実施形態1に係る電動パワーステアリング装置100は、実施形態1に係るモータ制御装置によって駆動制御されるモータ20がステアリング1のコラム軸2に設けられることで、電動パワーステアリング装置100における操舵補助制御の精度を高めることができる。   In the electric power steering apparatus 100 according to the first embodiment, the motor 20 controlled by the motor control apparatus according to the first embodiment is provided on the column shaft 2 of the steering 1 so that the steering assist of the electric power steering apparatus 100 is performed. Control accuracy can be increased.

また、実施形態1に係る回転角検出方法は、モータの位置検出信号として位置検出センサ25から出力される、正相正弦波信号Sinθ+と逆相正弦波信号Sinθ−とを含む差動正弦波信号、及び、正相余弦波信号Cosθ+と逆相余弦波信号Cosθ−とを含む差動余弦波信号に基づき、モータ20の位置を検出する回転角検出方法であって、正相正弦波信号Sinθ+と逆相正弦波信号Sinθ−との差分を第1正弦波信号Sinθ1fとするステップと、正相余弦波信号Cosθ+と逆相余弦波信号Cosθ−との差分を第1余弦波信号Cosθ1fとするステップと、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)又は最小値MIN(Sinθ1f)に基づき、第1正弦波信号Sinθ1fのゲインを補正して第2正弦波信号Sinθ1gとするステップと、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)又は最小値MIN(Cosθ1f)に基づき、第1余弦波信号Cosθ1fのゲインを補正して第2余弦波信号Cosθ1gとするステップと、第2余弦波信号Cosθ1gと第2正弦波信号Sinθ1gとを加算して第3正弦波信号VC+Sとするステップと、第2余弦波信号Cosθ1gから第2正弦波信号Sinθ1gを減算して第3余弦波信号VC−Sとするステップと、第3正弦波信号VC+Sの最大値MAX(VC+S)又は最小値MIN(VC+S)に基づき、第3正弦波信号VC+Sのゲインを補正して第4正弦波信号V1C+Sとするステップと、第3余弦波信号VC−Sの最大値MAX(VC−S)又は最小値MIN(VC−S)に基づき、第3余弦波信号VC−Sのゲインを補正して第4余弦波信号V1C−Sとするステップと、第4正弦波信号V1C+S及び第4余弦波信号V1C−Sに基づき、モータ20の回転角θを算出するステップと、を有する。 The rotation angle detecting method according to the first embodiment, output from the position detection sensor 25 as a position detection signal of the motor, the positive-phase sine wave signal sin [theta 1 + and the negative-phase sine wave signal sin [theta 1 - and the differential comprising sine wave signal, and the positive-phase cosine wave signal Cos? 1 + and the negative-phase cosine wave signal Cos? 1 - based on differential cosine wave signal and a, a rotation angle detecting method for detecting the position of the motor 20, a positive comprising the steps of a difference between the first sine-wave signal sin [theta 1f, positive phase cosine wave signal Cos? 1 + and the negative-phase cosine wave signal Cos? 1 - - phase sine wave signal sin [theta 1 + and the negative-phase sine wave signal sin [theta 1 and the method comprising the difference between the first cosine wave signal Cos? 1f, based on the maximum value MAX (Sinθ 1f) or the minimum value MIN of the first sine-wave signal Sinθ 1f (Sinθ 1f), the first sine-wave signal sin [theta 1f A step of the second sine-wave signal sin [theta 1 g of the gain is corrected on the basis of the maximum value of the first cosine wave signal Cosθ 1f MAX (Cosθ 1f) or the minimum value MIN (Cos? 1f), the first cosine wave signal Cos? a step of the second cosine wave signal Cos? 1 g by correcting the gain of 1f, a step of the second cosine wave signal Cos? 1 g by adding the second sinusoidal signal sin [theta 1 g third sinusoidal signal V C + S the steps of the third cosine wave signal V C-S from the second cosine wave signal Cos? 1 g by subtracting the second sine-wave signal sin [theta 1 g, the maximum value of the third sinusoidal signal V C + S MAX (V C + S) , or based on the minimum value MIN (V C + S), the steps of the fourth sine wave signal V1 C + S to correct the gain of the third sinusoidal signal V C + S, the maximum value of the third cosine wave signal V C-S Based on AX (V C-S) or the minimum value MIN (V C-S), the steps of the fourth cosine wave signal V1 C-S to correct the gain of the third cosine wave signal V C-S, the 4 based on the sine wave signal V1 C + S, and the fourth cosine wave signal V1 C-S, having a step of calculating a rotation angle theta 1 of the motor 20.

これにより、リアルタイムで検出された位置検出信号に基づき、回転角検出装置200のキャリブレーションを実施することができる。これにより、温度ドリフトや経時変化によって検出精度が低下することを抑制することができ、高い検出精度を維持することができる。   Thus, calibration of the rotation angle detection device 200 can be performed based on the position detection signal detected in real time. As a result, reduction in detection accuracy due to temperature drift or temporal change can be suppressed, and high detection accuracy can be maintained.

(実施形態2)
本実施形態では、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)及び第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)、第3正弦波信号VC+Sの最大値MAX(VC+S)及び第3余弦波信号VC−Sの最大値MAX(VC−S)、第3正弦波信号VC+Sの最小値MIN(VC+S)及び第3余弦波信号VC−Sの最小値MIN(VC−S)、について、それぞれ上限値と下限値とを設け、各値が上限値又は下限値を超える場合には、RAM102上の各値の更新を行わない例について説明する。
Second Embodiment
In the present embodiment, 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 minimum value MIN of the first sine-wave signal sin [theta 1f (sin [theta 1f) and the minimum value MIN of the first cosine wave signal Cos? 1f (Cos? 1f), 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 (V C-S), the minimum value MIN of the minimum value MIN (V C + S), and the third cosine wave signal V C-S of the third sinusoidal signal V C + S (V C- S), for, respectively upper and lower limit values An example will be described in which each value on the RAM 102 is not updated when each value exceeds the upper limit value or the lower limit value.

図24は、EEPROMに記憶される第1正弦波信号及び第1余弦波信号の最大値の上限値、初期値、下限値の一例を示す図である。図25は、EEPROMに記憶される第1正弦波信号及び第1余弦波信号の最小値の上限値、初期値、下限値の一例を示す図である。図26は、EEPROMに記憶される第3正弦波信号及び第3余弦波信号の最大値の上限値、初期値、下限値の一例を示す図である。図27は、EEPROMに記憶される第3正弦波信号及び第3余弦波信号の最小値の上限値、初期値、下限値の一例を示す図である。なお、EEPROM104に記憶される各値の上限値、初期値、下限値は、数値データであっても良いし、デジタルデータ等の離散値であっても良い。   FIG. 24 is a diagram showing an example of the upper limit value, the initial value, and the lower limit value of the maximum value of the first sine wave signal and the first cosine wave signal stored in the EEPROM. FIG. 25 is a diagram showing an example of the upper limit value, the initial value, and the lower limit value of the minimum value of the first sine wave signal and the first cosine wave signal stored in the EEPROM. FIG. 26 is a diagram showing an example of the upper limit value, the initial value, and the lower limit value of the maximum values of the third sine wave signal and the third cosine wave signal stored in the EEPROM. FIG. 27 is a diagram showing an example of the upper limit value, the initial value, and the lower limit value of the minimum value of the third sine wave signal and the third cosine wave signal stored in the EEPROM. The upper limit value, the initial value, and the lower limit value of each value stored in the EEPROM 104 may be numerical data or discrete values such as digital data.

図28は、実施形態2に係る回転角検出装置における第1正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。図29は、実施形態2に係る回転角検出装置における第1余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。図30は、実施形態2に係る回転角検出装置における第3正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。図31は、実施形態2に係る回転角検出装置における第3余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。なお、本実施形態に係る回転角検出装置の構成及び回転角検出処理手順は、実施形態1と同様であるので、ここでは説明を省略する。また、実施形態1と同一の処理については、説明を省略する。   FIG. 28 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first sine wave signal in the rotation angle detection device according to the second embodiment. FIG. 29 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first cosine wave signal in the rotation angle detection device according to the second embodiment. FIG. 30 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third sine wave signal in the rotation angle detection device according to the second embodiment. FIG. 31 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third cosine wave signal in the rotation angle detection device according to the second embodiment. The configuration of the rotation angle detection device according to the present embodiment and the rotation angle detection processing procedure are the same as in the first embodiment, and thus the description thereof is omitted here. The description of the same processing as that of the first embodiment is omitted.

第1ゲイン補正部172は、上述した回転角検出処理を行っている間、常時、図28に示す割り込み処理手順を実施する。   The first gain correction unit 172 always carries out the interrupt processing procedure shown in FIG. 28 while performing the above-described rotation angle detection processing.

第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0以上(Sinθ1f≧0)であるとき(ステップS202;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)であるか否かを判定する(ステップS202−1)。 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 S202; 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 S202-1).

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最大値の下限値MAX1Lim_L以上であり、且つ、第1正弦波信号Sinθ1fの最大値の上限値MAX1Lim_H以下(MAX1Lim_L≦Sinθ1f≦MAX1Lim_H)であるとき(ステップS202−1;Yes)、第1ゲイン補正部172は、第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)としてRAM102上のデータを更新し(ステップS203)、ステップS201の処理に戻る。 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 S202-1; Yes), the first gain correction portion 172, the value of the first sine-wave signal sin [theta 1f as the maximum value MAX of the first sine-wave signal Sinθ 1f (Sinθ 1f) The data on the RAM 102 is updated (step S203), and the process returns to step S201.

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最大値の下限値MAX1Lim_L未満であるか、又は、第1正弦波信号Sinθ1fの最大値の上限値MAX1Lim_Hよりも大きいとき(ステップS202−1;No)、第1ゲイン補正部172は、RAM102上の第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)の値を更新せず、ステップS201の処理に戻る。 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 Sinshita1f ( Step S202-1: No) The first gain correction unit 172 does not update the value of the maximum value MAX (Sinθ 1f ) of the first sine wave signal Sinθ 1f on the RAM 102, and returns to the process of step S201.

第1余弦波信号Cosθ1fのゼロ点検出時における第1正弦波信号Sinθ1fの値が0未満(Sinθ1f<0)であるとき(ステップS202;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)であるか否かを判定する(ステップS202−2)。 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 S202; 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 it is (step S202-2).

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最小値の下限値MIN1Lim_L以上であり、且つ、第1正弦波信号Sinθ1fの最小値の上限値MIN1Lim_H以下(MIN1Lim_L≦Sinθ1f≦MIN1Lim_H)であるとき(ステップS202−2;Yes)、第1ゲイン補正部172は、第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)としてRAM102上のデータを更新し(ステップS204)、ステップS201の処理に戻る。 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 S202-2; Yes), the first gain correction portion 172, 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) The data on the RAM 102 is updated (step S204), and the process returns to step S201.

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最小値の下限値MIN1Lim_L未満であるか、又は、第1正弦波信号Sinθ1fの最小値の上限値MIN1Lim_Hよりも大きいとき(ステップS202−2;No)、第1ゲイン補正部172は、RAM102上の第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)の値を更新せず、ステップS201の処理に戻る。 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 S202-2; No), the first gain correction unit 172 does not update the value of the minimum value MIN (Sinθ 1f ) of the first sine wave signal Sinθ 1f on the RAM 102, and returns to the process of step S201.

第1ゲイン補正部172は、上述した回転角検出処理を行っている間、常時、図29に示す割り込み処理手順を実施する。   While performing the above-described rotation angle detection process, the first gain correction unit 172 always carries out the interrupt processing procedure shown in FIG.

第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0以上(Cosθ1f≧0)であるとき(ステップS302;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)であるか否かを判定する(ステップS302−1)。 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 S302; 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 S302-1).

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最大値の下限値MAX1Lim_L以上であり、且つ、第1余弦波信号Cosθ1fの最大値の上限値MAX1Lim_H以下(MAX1Lim_L≦Cosθ1f≦MAX1Lim_H)であるとき(ステップS302−1;Yes)、第1ゲイン補正部172は、第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)としてRAM102上のデータを更新し(ステップS303)、ステップS301の処理に戻る。 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 S302-1; Yes), the first gain correction portion 172, the value of the first cosine wave signal Cos? 1f as the maximum value MAX of the first cosine wave signal Cos? 1f (Cos? 1f) The data on the RAM 102 is updated (step S303), and the process returns to step S301.

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最大値の下限値MAX1Lim_L未満であるか、又は、第1余弦波信号Cosθ1fの最大値の上限値MAX1Lim_Hよりも大きいとき(ステップS302−1;No)、第1ゲイン補正部172は、RAM102上の第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の値を更新せず、ステップS301の処理に戻る。 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 S302-1; No), the first gain correction unit 172 does not update the value of the maximum value MAX of the first cosine wave signal Cos? 1f on RAM 102 (Cos? 1f), the process returns to step S301.

第1正弦波信号Sinθ1fのゼロ点検出時における第1余弦波信号Cosθ1fの値が0未満(Cosθ1f<0)であるとき(ステップS302;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)であるか否かを判定する(ステップS302−2)。 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 S302; 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 it is (step S302-2).

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最小値の下限値MIN1Lim_L以上であり、且つ、第1余弦波信号Cosθ1fの最小値の上限値MIN1Lim_H以下(MIN1Lim_L≦Cosθ1f≦MIN1Lim_H)であるとき(ステップS302−2;Yes)、第1ゲイン補正部172は、第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)としてRAM102上のデータを更新し(ステップS304)、ステップS301の処理に戻る。 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 S302-2; Yes), the first gain correction portion 172, 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) The data on the RAM 102 is updated (step S304), and the process returns to step S301.

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最小値の下限値MIN1Lim_L未満であるか、又は、第1余弦波信号Cosθ1fの最小値の上限値MIN1Lim_Hよりも大きいとき(ステップS302−2;No)、第1ゲイン補正部172は、RAM102上の第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の値を更新せず、ステップS301の処理に戻る。 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 S302-2; No), the first gain correction unit 172 does not update the value of the minimum value MIN of the first cosine wave signal Cos? 1f on RAM 102 (Cos? 1f), the process returns to step S301.

第2ゲイン補正部173は、上述した回転角検出処理を行っている間、常時、図30に示す割り込み処理手順を実施する。   While performing the above-described rotation angle detection processing, the second gain correction unit 173 always carries out the interrupt processing procedure shown in FIG.

第3余弦波信号VC−Sのゼロ点検出時における第3正弦波信号VC+Sの値が0以上(VC+S≧0)であるとき(ステップS402;Yes)、第2ゲイン補正部173は、EEPROM104から第3正弦波信号VC+Sの最大値MAX(VC+S)及び第3余弦波信号VC−Sの最大値MAX(VC−S)の上限値MAX2Lim_H及び下限値MAX2Lim_Lを読み出し、第3正弦波信号VC+Sの値が、第3正弦波信号VC+Sの最大値の下限値MAX2Lim_L以上であり、且つ、第3正弦波信号VC+Sの最大値の上限値MAX2Lim_H以下(MAX2Lim_L≦VC+S≦MAX2Lim_H)であるか否かを判定する(ステップS402−1)。 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 0) (step S402; Yes), the second gain correction unit 173 reads the upper limit value MAX2Lim_H and the lower limit value MAX2Lim_L of the maximum value MAX of the third sinusoidal signal V C + S from EEPROM104 (V C + S) and a maximum value MAX of the third cosine wave signal V C-S (V C- S), the 3 the value of the sine wave signal V C + S is, and the third lower limit value of the maximum value of the sine wave signal V C + S MAX2Lim_L or more and the upper limit value of the maximum value of the third sinusoidal signal V C + S MAX2Lim_H below (MAX2Lim_L ≦ V C + S It is determined whether or not ≦ MAX2Lim_H (step S402-1).

第3正弦波信号VC+Sの値が、第3正弦波信号VC+Sの最大値の下限値MAX2Lim_L以上であり、且つ、第3正弦波信号VC+Sの最大値の上限値MAX2Lim_H以下(MAX2Lim_L≦VC+S≦MAX2Lim_H)であるとき(ステップS402−1;Yes)、第2ゲイン補正部173は、第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最大値MAX(VC+S)としてRAM102上のデータを更新し(ステップS403)、ステップS401の処理に戻る。 The value of the third sinusoidal signal V C + S is, and the third lower limit value of the maximum value of the sine wave signal V C + S MAX2Lim_L or more and the upper limit value of the maximum value of the third sinusoidal signal V C + S MAX2Lim_H below (MAX2Lim_L ≦ V C + S ≦ MAX2Lim_H) is when a (step S402-1; Yes), the second gain correction unit 173, the value of the third sinusoidal signal V C + S as a third sine wave signal V C + the maximum value of S MAX (V C + S) The data on the RAM 102 is updated (step S403), and the process returns to step S401.

第3正弦波信号VC+Sの値が、第3正弦波信号VC+Sの最大値の下限値MAX2Lim_L未満であるか、又は、第3正弦波信号VC+Sの最大値の上限値MAX2Lim_Hよりも大きいとき(ステップS402−1;No)、第2ゲイン補正部173は、RAM102上の第3正弦波信号VC+Sの最大値MAX(VC+S)の値を更新せず、ステップS401の処理に戻る。 The value of the third sinusoidal signal V C + S is either less than the lower limit MAX2Lim_L of the maximum value of the third sinusoidal signal V C + S, or, when larger than the upper limit value MAX2Lim_H of the maximum value of the third sinusoidal signal V C + S (Step S402-1; No), the second gain correction unit 173 does not update the value of the maximum value MAX (V C + S ) of the third sine wave signal V C + S on the RAM 102, and returns to the process of step S401.

第3余弦波信号VC−Sのゼロ点検出時における第3正弦波信号VC+Sの値が0未満(VC+S<0)であるとき(ステップS402;No)、第2ゲイン補正部173は、EEPROM104から第3正弦波信号VC+Sの最小値MIN(VC+S)及び第3余弦波信号VC−Sの最小値MIN(VC−S)の上限値MIN2Lim_H及び下限値MIN2Lim_Lを読み出し、第3正弦波信号VC+Sの値が、第3正弦波信号VC+Sの最小値の下限値MIN2Lim_L以上であり、且つ、第3正弦波信号VC+Sの最小値の上限値MIN2Lim_H以下(MIN2Lim_L≦VC+S≦MIN2LimH)であるか否かを判定する(ステップS402−2)。 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 S402; No), the second gain correction unit 173 reads the upper limit value MIN2Lim_H and the lower limit value MIN2Lim_L the minimum value MIN of the third sinusoidal signal V C + S from EEPROM104 (V C + S) and the minimum value MIN of the third cosine wave signal V C-S (V C- S), the 3 the value of the sine wave signal V C + S is, and the third lower limit value of the minimum value of the sine wave signal V C + S MIN2Lim_L or more and the upper limit value of the minimum value of the third sinusoidal signal V C + S MIN2Lim_H below (MIN2Lim_L ≦ V C + S It is determined whether or not MIN MIN2LimH) (step S402-2).

第3正弦波信号VC+Sの値が、第3正弦波信号VC+Sの最小値の下限値MIN2Lim_L以上であり、且つ、第3正弦波信号VC+Sの最小値の上限値MIN2Lim_H以下(MIN2Lim_L≦VC+S≦MIN2Lim_H)であるとき(ステップS402−2;Yes)、第2ゲイン補正部173は、第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最小値MIN(VC+S)としてRAM102上のデータを更新し(ステップS404)、ステップS401の処理に戻る。 The value of the third sinusoidal signal V C + S is, and the third lower limit value of the minimum value of the sine wave signal V C + S MIN2Lim_L or more and the upper limit value of the minimum value of the third sinusoidal signal V C + S MIN2Lim_H below (MIN2Lim_L ≦ V C + S ≦ MIN2Lim_H) is when a (step S402-2; Yes), the second gain correction unit 173, the minimum value MIN of values of the third sinusoidal signal V C + S third sinusoidal signal V C + S (V C + S) The data on the RAM 102 is updated (step S404), and the process returns to step S401.

第3正弦波信号VC+Sの値が、第3正弦波信号VC+Sの最小値の下限値MIN2Lim_L未満であるか、又は、第3正弦波信号VC+Sの最小値の上限値MIN2Lim_Hよりも大きいとき(ステップS402−2;No)、第2ゲイン補正部173は、RAM102上の第3正弦波信号VC+Sの最小値MIN(VC+S)の値を更新せず、ステップS401の処理に戻る。 The value of the third sinusoidal signal V C + S is either less than the lower limit MIN2Lim_L the minimum value of the third sinusoidal signal V C + S, or, when larger than the upper limit value MIN2Lim_H the minimum value of the third sinusoidal signal V C + S (Step S402-2; No), the second gain correction unit 173 does not update the value of the minimum value MIN (V C + S ) of the third sine wave signal V C + S on the RAM 102, and returns to the process of step S401.

第2ゲイン補正部173は、上述した回転角検出処理を行っている間、常時、図31に示す割り込み処理手順を実施する。   The second gain correction unit 173 constantly executes the interrupt processing procedure shown in FIG. 31 while performing the above-described rotation angle detection processing.

第3正弦波信号VC+Sのゼロ点検出時における第3余弦波信号VC−Sの値が0以上(VC−S≧0)であるとき(ステップS502;Yes)、第2ゲイン補正部173は、EEPROM104から第3正弦波信号VC+Sの最大値MAX(VC+S)及び第3余弦波信号VC−Sの最大値MAX(VC−S)の上限値MAX2Lim_H及び下限値MAX2Lim_Lを読み出し、第3余弦波信号VC−Sの値が、第3余弦波信号VC−Sの最大値の下限値MAX2Lim_L以上であり、且つ、第3余弦波信号VC−Sの最大値の上限値MAX2Lim_H以下(MAX2Lim_L≦VC−S≦MAX2Lim_H)であるか否かを判定する(ステップS502−1)。 When the value of the third cosine wave signal V C-S at the time of detecting the zero point of the third sine wave signal V C + S is 0 or more (V C -S ≧ 0) (step S502; Yes), the second gain correction unit 173 reads the upper limit value MAX2Lim_H and the lower limit value MAX2Lim_L of the maximum value MAX of the third sinusoidal signal V C + S from EEPROM104 (V C + S) and a maximum value MAX of the third cosine wave signal V C-S (V C- S) , the value of the third cosine wave signal V C-S is, and the lower limit value MAX2Lim_L or more of the maximum value of the third cosine wave signal V C-S, and the upper limit of the maximum value of the third cosine wave signal V C-S It is determined whether the value is less than or equal to MAX2Lim_H (MAX2Lim_L CVC -S ≦ MAX2Lim_H) (step S502-1).

第3余弦波信号VC−Sの値が、第3余弦波信号VC−Sの最大値の下限値MAX2Lim_L以上であり、且つ、第3余弦波信号VC−Sの最大値の上限値MAX2Lim_H以下(MAX2Lim_L≦VC−S≦MAX2Lim_H)であるとき(ステップS502−1;Yes)、第2ゲイン補正部173は、第3余弦波信号VC−Sの値を第3余弦波信号VC−Sの最大値MAX(VC−S)としてRAM102上のデータを更新し(ステップS503)、ステップS501の処理に戻る。 The third value of the cosine wave signal V C-S is, and the lower limit value MAX2Lim_L or more of the maximum value of the third cosine wave signal V C-S, and the upper limit value of the maximum value of the third cosine wave signal V C-S When MAX2Lim_H or less (MAX2Lim_L ≦ VC -S ≦ MAX2Lim_H) (step S502-1; Yes), the second gain correction unit 173 determines the value of the third cosine wave signal V C-S as the third cosine wave signal V the maximum value of the C-S MAX (V C- S) as to update the data in the RAM 102 (step S503), the process returns to step S501.

第3余弦波信号VC−Sの値が、第3余弦波信号VC−Sの最大値の下限値MAX2Lim_L未満であるか、又は、第3余弦波信号VC−Sの最大値の上限値MAX2Lim_Hよりも大きいとき(ステップS502−1;No)、第2ゲイン補正部173は、RAM102上の第3余弦波信号VC−Sの最大値MAX(VC−S)の値を更新せず、ステップS501の処理に戻る。 The third value of the cosine wave signal V C-S is either less than the lower limit MAX2Lim_L of the maximum value of the third cosine wave signal V C-S, or the upper limit of the maximum value of the third cosine wave signal V C-S When the value is larger than the value MAX2Lim_H (step S502-1; No), the second gain correction unit 173 updates the value of the maximum value MAX (V C -S ) of the third cosine wave signal V C -S on the RAM 102. Then, the process returns to the process of step S501.

第3正弦波信号VC+Sのゼロ点検出時における第3余弦波信号VC−Sの値が0未満(VC−S<0)であるとき(ステップS502;No)、第2ゲイン補正部173は、EEPROM104から第3正弦波信号VC+Sの最小値MIN(VC+S)及び第3余弦波信号VC−Sの最小値MIN(VC−S)の上限値MIN2Lim_H及び下限値MIN2Lim_Lを読み出し、第3余弦波信号VC−Sの値が、第3余弦波信号VC−Sの最小値の下限値MIN2Lim_L以上であり、且つ、第3余弦波信号VC−Sの最小値の上限値MIN2Lim_H以下(MIN2Lim_L≦VC−S≦MIN2Lim_H)であるか否かを判定する(ステップS502−2)。 When the value of the third cosine wave signal V C-S at the time of detecting the zero point of the third sine wave signal V C + S is less than 0 (V C -S <0) (step S502; No), the second gain correction unit 173 reads the upper limit value MIN2Lim_H and the lower limit value MIN2Lim_L the minimum value MIN of the third sinusoidal signal V C + S from EEPROM104 (V C + S) and the minimum value MIN of the third cosine wave signal V C-S (V C- S) , the value of the third cosine wave signal V C-S is, and the lower limit value MIN2Lim_L than the minimum value of the third cosine wave signal V C-S, and the upper limit of the minimum value of the third cosine wave signal V C-S It is determined whether or not the value is less than or equal to the value MIN2Lim_H (MIN2Lim_L ≦ VC -S ≦ MIN2Lim_H) (step S502-2).

第3余弦波信号VC−Sの値が、第3余弦波信号VC−Sの最小値の下限値MIN2Lim_L以上であり、且つ、第3余弦波信号VC−Sの最小値の上限値MIN2Lim_H以下(MIN2Lim_L≦VC−S≦MIN2Lim_H)であるとき(ステップS502−2;Yes)、第2ゲイン補正部173は、第3余弦波信号VC−Sの値を第3余弦波信号VC−Sの最小値MIN(VC−S)としてRAM102上のデータを更新し(ステップS504)、ステップS501の処理に戻る。 The third value of the cosine wave signal V C-S is, and the lower limit value MIN2Lim_L than the minimum value of the third cosine wave signal V C-S, and the upper limit value of the minimum value of the third cosine wave signal V C-S When MIN2Lim_H or less (MIN2Lim_L ≦ VC -S ≦ MIN2Lim_H) (step S502-2; Yes), the second gain correction unit 173 calculates the value of the third cosine wave signal V C-S as the third cosine wave signal V minimum value MIN of the C-S (V C-S ) as to update the data in the RAM 102 (step S504), the process returns to step S501.

第3余弦波信号VC−Sの値が、第3余弦波信号VC−Sの最小値の下限値MIN2Lim_L未満であるか、又は、第3余弦波信号VC−Sの最小値の上限値MIN2Lim_Hよりも大きいとき(ステップS502−2;No)、第2ゲイン補正部173は、RAM102上の第3余弦波信号VC−Sの最小値MIN(VC−S)の値を更新せず、ステップS501の処理に戻る。 The third value of the cosine wave signal V C-S is either less than the lower limit MIN2Lim_L the minimum value of the third cosine wave signal V C-S, or the upper limit of the minimum value of the third cosine wave signal V C-S When the value is larger than the value MIN2Lim_H (step S502-2; No), the second gain correction unit 173 updates the value of the minimum value MIN (V C -S ) of the third cosine wave signal V C -S on the RAM 102. Then, the process returns to the process of step S501.

上述した図28、図29、図30、図31に示した割り込み処理手順により、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)、第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)、第3正弦波信号VC+Sの最大値MAX(VC+S)、第3余弦波信号VC−Sの最大値MAX(VC−S)、第3正弦波信号VC+Sの最小値MIN(VC+S)、第3余弦波信号VC−Sの最小値MIN(VC−S)の各値が、ノイズ等によって異常値となった場合でも、正常に回転角検出処理を行うことができる。 28, 29 described above, FIG. 30, the interrupt processing procedure shown in FIG. 31, the maximum value MAX (sin [theta 1f) of the first sine-wave signal sin [theta 1f, the maximum value MAX of the first cosine wave signal Cos? 1f (Cos? 1f), the minimum value MIN (sin [theta 1f of the first sine-wave signal sin [theta 1f), the minimum value MIN (Cos? 1f of the first cosine wave signal Cos? 1f), the maximum value of the third sinusoidal signal V C + S MAX (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 minimum value MIN (V C + S), the third cosine wave signal V C-S of the third sinusoidal signal V C + S Even when each value of (V C−S ) becomes an abnormal value due to noise or the like, the rotation angle detection processing can be performed normally.

(変形例)
実施形態2の変形例では、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)、第1余弦波信号Cosθ1fの最小値MIN(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)の各値が上限値又は下限値を超える場合には、各値の初期値を適用する例について説明する。
(Modification)
In a variation of the second embodiment, the maximum value MAX of the first sine-wave signal Sinθ 1f (Sinθ 1f), the minimum value MIN (Sinθ 1f), the maximum value of the first cosine wave signal Cos? 1f of the first sine-wave signal sin [theta 1f MAX (Cosθ 1f ), the minimum value MIN (Cosθ 1f ) of the first cosine wave signal Cosθ 1f , the maximum value MAX (V C + S ) of the third sine wave signal V C + S , the minimum value MIN (third Q) of the third sine wave signal V C + S V C + S), the maximum value of the third cosine wave signal V C-S MAX (V C -S), the upper limit value is the value of the minimum value MIN of the third cosine wave signal V C-S (V C- S) or When the lower limit value is exceeded, an example in which the initial value of each value is applied will be described.

図32は、実施形態2の変形例に係る回転角検出装置における第1正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。図33は、実施形態2の変形例に係る回転角検出装置における第1余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。図34は、実施形態2の変形例に係る回転角検出装置における第3正弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。図35は、実施形態2の変形例に係る回転角検出装置における第3余弦波信号の最大値又は最小値を検出する割り込み処理手順の一例を示すフローチャートである。   FIG. 32 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first sine wave signal in the rotation angle detection device according to the modification of the second embodiment. FIG. 33 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the first cosine wave signal in the rotation angle detection device according to the modification of the second embodiment. FIG. 34 is a flowchart showing an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third sine wave signal in the rotation angle detection device according to the modification of the second embodiment. FIG. 35 is a flowchart illustrating an example of an interrupt processing procedure for detecting the maximum value or the minimum value of the third cosine wave signal in the rotation angle detection device according to the modification of the second embodiment.

第1ゲイン補正部172は、上述した回転角検出処理を行っている間、常時、図32に示す割り込み処理手順を実施する。   The first gain correction unit 172 always carries out the interrupt processing procedure shown in FIG. 32 while performing the above-described rotation angle detection processing.

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)の下限値MAX1Lim_L以上であり、且つ、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)の上限値MAX1Lim_H以下(MAX1Lim_L≦Sinθ1f≦MAX1Lim_H)であるとき(ステップS202−1;Yes)、第1ゲイン補正部172は、第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)としてRAM102上のデータを更新し(ステップS203a)、ステップS201の処理に戻る。 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 MAX of the first sine-wave signal Sinθ 1f (Sinθ 1f), and the maximum value MAX (sin [theta 1f of the first sine-wave signal sin [theta 1f ) limit MAX1Lim_H follows (when a MAX1Lim_L ≦ Sinθ 1f ≦ MAX1Lim_H) (step S202-1; Yes), the first gain correction portion 172, the value of the first sine-wave signal sin [theta 1f first sine-wave signal sin [theta maximum value MAX of 1f (Sinθ 1f) as to update the data in the RAM 102 (step S203a), the process returns to step S201.

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)の下限値MAX1Lim_L未満であるか、又は、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)の上限値MAX1Lim_Hよりも大きいとき(ステップS202−1;No)、第1ゲイン補正部172は、EEPROM104から第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の初期値MAX1refを読み出して第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)としてRAM102上のデータを更新し(ステップS203b)、ステップS201の処理に戻る。 The value of the first sine-wave signal sin [theta 1f is, the maximum value MAX or less than the lower limit value MAX1Lim_L of (sin [theta 1f) of the first sine-wave signal sin [theta 1f, or the maximum value MAX of the first sine-wave signal sin [theta 1f (sin [theta when greater than the upper limit value MAX1Lim_H of 1f) (step S202-1; No), the first gain correction portion 172, the maximum value MAX (sin [theta 1f of the first sine-wave signal sin [theta 1f from EEPROM 104) and a first cosine wave signal cos [theta] 1f maximum value MAX (cos [theta] 1f) initial value and updates the data on the RAM102 as read by the maximum value MAX of the first sine-wave signal Sinθ 1f (Sinθ 1f) MAX1ref of (step S203b), the process of step S201 Return.

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)の下限値MIN1Lim_L以上であり、且つ、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)の上限値MIN1Lim_H以下(MIN1Lim_L≦Sinθ1f≦MIN1Lim_H)であるとき(ステップS202−2;Yes)、第1ゲイン補正部172は、第1正弦波信号Sinθ1fの値を第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)としてRAM102上のデータを更新し(ステップS204a)、ステップS201の処理に戻る。 The first value of the sine wave signal sin [theta 1f is not less than 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 (sin [theta 1f of the first sine-wave signal sin [theta 1f ) limit MIN1Lim_H follows (when a MIN1Lim_L ≦ Sinθ 1f ≦ MIN1Lim_H) (step S202-2; Yes), the first gain correction portion 172, the value of the first sine-wave signal sin [theta 1f first sine-wave signal sin [theta 1f minimum value MIN of the (sin [theta 1f) as to update the data in the RAM 102 (step S204a), the process returns to step S201.

第1正弦波信号Sinθ1fの値が、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)の下限値MIN1Lim_L未満であるか、又は、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)の上限値MIN1Lim_Hよりも大きいとき(ステップS202−2;No)、第1ゲイン補正部172は、EEPROM104から第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)及び第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の初期値MIN1refを読み出して第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)としてRAM102上のデータを更新し(ステップS204b)、ステップS201の処理に戻る。 The value of the first sine-wave signal sin [theta 1f is, the minimum value MIN or less than the lower limit value MIN1Lim_L of (sin [theta 1f) of the first sine-wave signal sin [theta 1f, or the minimum value MIN of the first sine-wave signal sin [theta 1f (sin [theta when greater than the upper limit value MIN1Lim_H of 1f) (step S202-2; No), the first gain correction portion 172, the minimum value MIN (sin [theta 1f of the first sine-wave signal sin [theta 1f from EEPROM 104) and a first cosine wave signal cos [theta] 1f minimum value MIN (cos [theta] 1f) initial value and updates the data in the RAM102 as the minimum value MIN of the first sine-wave signal sin [theta 1f reads (Sinθ 1f) MIN1ref of (step S204b), the process of step S201 Return.

第1ゲイン補正部172は、上述した回転角検出処理を行っている間、常時、図33に示す割り込み処理手順を実施する。   While performing the above-described rotation angle detection process, the first gain correction unit 172 always carries out the interrupt processing procedure shown in FIG.

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の下限値MAX1Lim_L以上であり、且つ、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の上限値MAX1Lim_H以下(MAX1Lim_L≦Cosθ1f≦MAX1Lim_H)であるとき(ステップS302−1;Yes)、第1ゲイン補正部172は、第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)としてRAM102上のデータを更新し(ステップS303a)、ステップS301の処理に戻る。 The value of the first cosine wave signal Cos? 1f is, and the lower limit value MAX1Lim_L or more of the maximum value MAX of the first cosine wave signal Cosθ 1f (Cosθ 1f), and the maximum value MAX (Cos? 1f of the first cosine wave signal Cos? 1f ) limit MAX1Lim_H follows (when a MAX1Lim_L ≦ Cosθ 1f ≦ MAX1Lim_H) (step S302-1; Yes), the first gain correction portion 172, the value of the first cosine wave signal Cos? 1f first cosine wave signal Cos? maximum value MAX of 1f (Cos? 1f) as to update the data in the RAM 102 (step S 303 a), the process returns to step S301.

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の下限値MAX1Lim_L未満であるか、又は、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の上限値MAX1Lim_Hよりも大きいとき(ステップS302−1;No)、第1ゲイン補正部172は、EEPROM104から第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)及び第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)の初期値MAX1refを読み出して第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)としてRAM102上のデータを更新し(ステップS303b)、ステップS301の処理に戻る。 The value of the first cosine wave signal Cos? 1f is, the maximum value MAX or less than the lower limit value MAX1Lim_L of (Cos? 1f) of the first cosine wave signal Cos? 1f, or the maximum value MAX of the first cosine wave signal Cos? 1f (Cos? when greater than the upper limit value MAX1Lim_H of 1f) (step S302-1; No), the first gain correction portion 172, the maximum value MAX (sin [theta 1f of the first sine-wave signal sin [theta 1f from EEPROM 104) and a first cosine wave signal cos [theta] 1f maximum value MAX (cos [theta] 1f) initial value and updates the data on the RAM102 as read by the maximum value MAX of the first cosine wave signal Cosθ 1f (Cosθ 1f) MAX1ref of (step S303b), the process of step S301 Return.

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の下限値MIN1Lim_L以上であり、且つ、第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の上限値MIN1Lim_H以下(MIN1Lim_L≦Cosθ1f≦MIN1Lim_H)であるとき(ステップS302−2;Yes)、第1ゲイン補正部172は、第1余弦波信号Cosθ1fの値を第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)としてRAM102上のデータを更新し(ステップS304a)、ステップS301の処理に戻る。 The first value of the cosine wave signal Cos? 1f is, and the lower limit value MIN1Lim_L more minimum value MIN of the first cosine wave signal Cosθ 1f (Cosθ 1f), and the minimum value MIN (Cos? 1f of the first cosine wave signal Cos? 1f ) limit MIN1Lim_H follows (when a MIN1Lim_L ≦ Cosθ 1f ≦ MIN1Lim_H) (step S302-2; Yes), the first gain correction portion 172, the value of the first cosine wave signal Cos? 1f first cosine wave signal Cos? 1f minimum value MIN of (Cos? 1f) as to update the data in the RAM 102 (step S304a), the process returns to step S301.

第1余弦波信号Cosθ1fの値が、第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の下限値MIN1Lim_L未満であるか、又は、第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の上限値MIN1Lim_Hよりも大きいとき(ステップS302−2;No)、第1ゲイン補正部172は、EEPROM104から第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)及び第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)の初期値MIN1refを読み出して第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)としてRAM102上のデータを更新し(ステップS304b)、ステップS301の処理に戻る。 The value of the first cosine wave signal Cos? 1f is, the minimum value MIN or less than the lower limit value MIN1Lim_L of (Cos? 1f) of the first cosine wave signal Cos? 1f, or the minimum value MIN of the first cosine wave signal Cos? 1f (Cos? when greater than the upper limit value MIN1Lim_H of 1f) (step S302-2; No), the first gain correction portion 172, the minimum value MIN (sin [theta 1f of the first sine-wave signal sin [theta 1f from EEPROM 104) and a first cosine wave signal cos [theta] 1f minimum value MIN (cos [theta] 1f) initial value and updates the data on the RAM102 as read by the minimum value MIN of the first cosine wave signal Cosθ 1f (Cosθ 1f) MIN1ref of (step S304b), the process of step S301 Return.

第2ゲイン補正部173は、上述した回転角検出処理を行っている間、常時、図34に示す割り込み処理手順を実施する。   The second gain correction unit 173 constantly executes the interrupt processing procedure shown in FIG. 34 while performing the above-described rotation angle detection processing.

第3正弦波信号VC+Sの値が、第3正弦波信号VC+Sの最大値MAX(VC+S)の下限値MAX2Lim_L以上であり、且つ、第3正弦波信号VC+Sの最大値MAX(VC+S)の上限値MAX2Lim_H以下(MAX2Lim_L≦VC+S≦MAX2Lim_H)であるとき(ステップS402−1;Yes)、第2ゲイン補正部173は、第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最大値MAX(VC+S)としてRAM102上のデータを更新し(ステップS403a)、ステップS401の処理に戻る。 The third value of the sine wave signal V C + S is, and the third maximum value MAX (V C + S) of the sine wave signal V C + S lower limit MAX2Lim_L more, and the maximum value of the third sinusoidal signal V C + S MAX (V C + S Is equal to or less than the upper limit value MAX2Lim_H (MAX2Lim_L ≦ VC + S ≦ MAX2Lim_H) (step S402-1; Yes), the second gain correction unit 173 sets the value of the third sine wave signal VC + S to the third sine wave signal V C + S maximum value MAX of (V C + S) as to update the data in the RAM 102 (step S403a), the process returns to step S401.

第3正弦波信号VC+Sの値が、第3正弦波信号VC+Sの最大値MAX(VC+S)の下限値MAX2Lim_L未満であるか、又は、第3正弦波信号VC+Sの最大値MAX(VC+S)の上限値MAX2Lim_Hよりも大きいとき(ステップS402−1;No)、第2ゲイン補正部173は、EEPROM104から第3正弦波信号VC+Sの最大値MAX(VC+S)及び第3余弦波信号VC−Sの最大値MAX(VC−S)の初期値MAX2refを読み出して第3正弦波信号VC+Sの最大値MAX(VC+S)としてRAM102上のデータを更新し(ステップS403b)、ステップS401の処理に戻る。 The value of the third sinusoidal signal V C + S is a third or less than the lower limit value MAX2Lim_L sinusoidal signal V C + S maximum value MAX of (V C + S), or the maximum value MAX (V third sinusoidal signal V C + S when greater than the upper limit value MAX2Lim_H of C + S) (step S402-1; No), the second gain correction unit 173 from EEPROM104 maximum value MAX of the third sinusoidal signal V C + S (V C + S) , and the third cosine wave signal update the V C-S maximum value MAX (V C-S) of the initial value data on RAM102 as the maximum value of the third sinusoidal signal V C + S reads MAX2ref MAX (V C + S) in (step S403b), step It returns to the process of S401.

第3正弦波信号VC+Sの値が、第3正弦波信号VC+Sの最小値MIN(VC+S)の下限値MIN2Lim_L以上であり、且つ、第3正弦波信号VC+Sの最小値MIN(VC+S)の上限値MIN2Lim_H以下(MIN2Lim_L≦VC+S≦MIN2Lim_H)であるとき(ステップS402−2;Yes)、第2ゲイン補正部173は、第3正弦波信号VC+Sの値を第3正弦波信号VC+Sの最小値MIN(VC+S)としてRAM102上のデータを更新し(ステップS404a)、ステップS401の処理に戻る。 The value of the third sinusoidal signal V C + S is, and the third lower limit MIN2Lim_L more sinusoidal signal V C + S minimum value MIN of (V C + S), and the minimum value MIN of the third sinusoidal signal V C + S (V C + S If the second gain correction unit 173 determines that the value of the third sine wave signal V C + S is equal to or less than the upper limit value MIN2Lim_H (MIN2Lim_L ≦ Vc + S ≦ MIN2Lim_H) (step S402-2; Yes) minimum value MIN of C + S (V C + S ) as to update the data in the RAM 102 (step S404a), the process returns to step S401.

第3正弦波信号VC+Sの値が、第3正弦波信号VC+Sの最小値MIN(VC+S)の下限値MIN2Lim_L未満であるか、又は、第3正弦波信号VC+Sの最小値MIN(VC+S)の上限値MIN2Lim_Hよりも大きいとき(ステップS402−2;No)、第2ゲイン補正部173は、EEPROM104から第3正弦波信号VC+Sの最小値MIN(VC+S)及び第3余弦波信号VC−Sの最小値MIN(VC−S)の初期値MIN2refを読み出して第3正弦波信号VC+Sの最小値MIN(VC+S)としてRAM102上のデータを更新し(ステップS404b)、ステップS401の処理に戻る。 The value of the third sinusoidal signal V C + S is either less than the lower limit MIN2Lim_L the minimum value MIN of the third sinusoidal signal V C + S (V C + S), or the minimum value MIN (V third sinusoidal signal V C + S when greater than the upper limit value MIN2Lim_H of C + S) (step S402-2; No), the second gain correction unit 173 from EEPROM104 minimum value MIN of the third sinusoidal signal V C + S (V C + S) , and the third cosine wave signal update the V C-S minimum value MIN (V C-S) of the initial value data on RAM102 as the minimum value of the third sinusoidal signal V C + S reads MIN2ref MIN (V C + S) in (step S404b), step It returns to the process of S401.

第2ゲイン補正部173は、上述した回転角検出処理を行っている間、常時、図35に示す割り込み処理手順を実施する。   The second gain correction unit 173 always carries out the interrupt processing procedure shown in FIG. 35 while performing the above-described rotation angle detection processing.

第3余弦波信号VC−Sの値が、第3余弦波信号VC−Sの最大値MAX(VC−S)の下限値MAX2Lim_L以上であり、且つ、第3余弦波信号VC−Sの最大値MAX(VC−S)の上限値MAX2Lim_H以下(MAX2Lim_L≦VC−S≦MAX2Lim_H)であるとき(ステップS502−1;Yes)、第2ゲイン補正部173は、第3余弦波信号VC−Sの値を第3余弦波信号VC−Sの最大値MAX(VC−S)としてRAM102上のデータを更新し(ステップS503a)、ステップS501の処理に戻る。 The value of the third cosine wave signal V C-S is, and the third lower limit MAX2Lim_L or more of the maximum value MAX of the cosine wave signal V C-S (V C- S), and the third cosine wave signal V C- when S is a maximum value MAX of (V C-S) upper limit MAX2Lim_H follows (MAX2Lim_L ≦ V C-S ≦ MAX2Lim_H) ( step S502-1; Yes), the second gain correction portion 173, a third cosine wave signal V value of C-S the third cosine wave signal V C-S maximum value MAX of (V C-S) as to update the data in the RAM 102 (step S503a), the process returns to step S501.

第3余弦波信号VC−Sの値が、第3余弦波信号VC−Sの最大値MAX(VC−S)の下限値MAX2Lim_L未満であるか、又は、第3余弦波信号VC−Sの最大値MAX(VC−S)の上限値MAX2Lim_Hよりも大きいとき(ステップS502−1;No)、第2ゲイン補正部173は、EEPROM104から第3正弦波信号VC+Sの最大値MAX(VC+S)及び第3余弦波信号VC−Sの最大値MAX(VC−S)の初期値MAX2refを読み出して第3余弦波信号VC−Sの最大値MAX(VC−S)としてRAM102上のデータを更新し(ステップS503b)、ステップS501の処理に戻る。 If the value of the third cosine wave signal V C-S is less than the lower limit value MAX2Lim_L of the maximum value of the third cosine wave signal V C-S MAX (V C -S), or the third cosine wave signal V C When it is larger than the upper limit value MAX2Lim_H of the maximum value MAX (Vc -S ) of -S (step S502-1; No), the second gain correction unit 173 determines the maximum value MAX of the third sine wave signal Vc + S from the EEPROM 104. (V C + S), and the third cosine wave signal V C-S maximum value MAX (V C-S) reads out the initial value MAX2ref the third cosine wave signal V C-S maximum value MAX of (V C-S) Then, the data on the RAM 102 is updated as (step S503 b), and the process returns to step S501.

第3余弦波信号VC−Sの値が、第3余弦波信号VC−Sの最小値MIN(VC−S)の下限値MIN2Lim_L以上であり、且つ、第3余弦波信号VC−Sの最小値MIN(VC−S)の上限値MIN2Lim_H以下(MIN2Lim_L≦VC−S≦MIN2Lim_H)であるとき(ステップS502−2;Yes)、第2ゲイン補正部173は、第3余弦波信号VC−Sの値を第3余弦波信号VC−Sの最小値MIN(VC−S)としてRAM102上のデータを更新し(ステップS504a)、ステップS501の処理に戻る。 The value of the third cosine wave signal V C-S is, and the third cosine wave signal V C-S minimum value MIN of (V C-S) lower limit MIN2Lim_L above, and, third cosine wave signal V C- If the upper limit value MIN2Lim_H of the minimum value MIN (V C−S ) of S is equal to or less than MIN2Lim_L ≦ V C−S ≦ MIN2Lim_H (step S502-2; Yes), the second gain correction unit 173 calculates the third cosine wave signal V value of C-S the third cosine wave signal V C-S minimum value MIN of (V C-S) as to update the data in the RAM 102 (step S504a), the process returns to step S501.

第3余弦波信号VC−Sの値が、第3余弦波信号VC−Sの最小値MIN(VC−S)の下限値MIN2Lim_L未満であるか、又は、第3余弦波信号VC−Sの最小値MIN(VC−S)の上限値MIN2Lim_Hよりも大きいとき(ステップS502−2;No)、第2ゲイン補正部173は、EEPROM104から第3正弦波信号VC+Sの最小値MIN(VC+S)及び第3余弦波信号VC−Sの最小値MIN(VC−S)の初期値MIN2refを読み出して第3余弦波信号VC−Sの最小値MIN(VC−S)としてRAM102上のデータを更新し(ステップS504b)、ステップS501の処理に戻る。 If the value of the third cosine wave signal V C-S is less than the lower limit value MIN2Lim_L the minimum value MIN of the third cosine wave signal V C-S (V C- S), or the third cosine wave signal V C When it is larger than the upper limit value MIN2Lim_H of the minimum value MIN (Vc -S ) of -S (step S502-2; No), the second gain correction unit 173 determines the minimum value MIN of the third sine wave signal Vc + S from the EEPROM 104. (V C + S), and the third cosine wave signal V C-S minimum value MIN (V C-S) reads out the initial value MIN2ref the third cosine wave signal V C-S minimum value MIN of (V C-S) Then, the data on the RAM 102 is updated as (step S504 b), and the process returns to step S501.

上述した図32、図33、図34、図35に示した割り込み処理手順においても、上述した図28、図29、図30、図31に示した割り込み処理手順と同様に、第1正弦波信号Sinθ1fの最大値MAX(Sinθ1f)、第1余弦波信号Cosθ1fの最大値MAX(Cosθ1f)、第1正弦波信号Sinθ1fの最小値MIN(Sinθ1f)、第1余弦波信号Cosθ1fの最小値MIN(Cosθ1f)、第3正弦波信号VC+Sの最大値MAX(VC+S)、第3余弦波信号VC−Sの最大値MAX(VC−S)、第3正弦波信号VC+Sの最小値MIN(VC+S)、第3余弦波信号VC−Sの最小値MIN(VC−S)の各値が、ノイズ等によって異常値となった場合でも、正常に回転角検出処理を行うことができる。 Also in the interrupt processing procedure shown in FIG. 32, FIG. 33, FIG. 34, and FIG. 35, similarly to the interrupt processing procedure shown in FIG. 28, FIG. 29, FIG. sin [theta maximum value MAX (sin [theta 1f) of 1f, the maximum value MAX of the first cosine wave signal Cosθ 1f (Cosθ 1f), the minimum value MIN (Sinθ 1f) of the first sine-wave signal sin [theta 1f, the first cosine wave signal Cos? 1f the minimum value MIN of (Cos? 1f), the maximum value of the third sinusoidal signal V C + S MAX (V C + S), the maximum value MAX (V C-S) of the third cosine wave signal V C-S, the third sine wave signal V C + S minimum value MIN of (V C + S), the minimum value the values of MIN (V C-S) of the third cosine wave signal V C-S is, even when an abnormal value due to noise or the like, the rotation angle normally Perform detection processing Can.

なお、上述した実施形態では、第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)の上限値、初期値、下限値は、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), the maximum value MAX (Cos? 1f) of the first cosine wave signal Cos? 1f, the maximum value MAX (V C + S) of the third sinusoidal signal V C + S, the minimum value MIN of the third sinusoidal signal V C + S ( V C + S), the upper limit of the third cosine wave signal V maximum value MAX (V C-S of the C-S), and the minimum value MIN of the third cosine wave signal V C-S (V C- S), the initial value Although the lower limit value is an example stored in the EEPROM 104 (first storage unit), the first storage unit may be provided in addition to the EEPROM 104 and may be stored in the first storage unit. 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正弦波信号Vの最小値MIN(VC+S)、第3余弦波信号Vの最大値MAX(VC−S)、第3余弦波信号Vの最小値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 minimum value MIN of the signal V S (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 (V C-S) is, RAM 102 Although the example stored in (the second storage unit) has been shown, a second storage unit may be provided in addition to the RAM 102 and may be stored in the second storage unit. The present disclosure is not limited by the configuration of the second storage unit.

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

1 ハンドルホイール(ステアリング)
2 コラム軸
3 減速ギヤ
4a、4b ユニバーサルジョイント
10 トルクセンサ
11 イグニッションスイッチ
12 車速センサ
14 バッテリ
15 モータ駆動回路
16 モータ電流検出回路
17 位置検出部
20 モータ
20a モータシャフト
25 位置検出センサ
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 回転角検出装置
251 回転磁石
252 MRセンサ
1711 正弦波差分演算部
1712 余弦波差分演算部
1721 第1正弦波ゲイン補正部
1722 第1余弦波ゲイン補正部
1731 第2正弦波ゲイン補正部
1732 第2余弦波ゲイン補正部
1733 位相変換部
1741 逆正接演算部
1742 象限判定部
1 steering wheel (steering)
Reference Signs List 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 position detection unit 20 motor 20a motor shaft 25 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 control computer (MCU)
171 difference calculation unit 172 first gain correction unit 173 second gain correction unit 174 angle calculation unit 200 rotation angle detection device 251 rotary magnet 252 MR sensor 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 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 judgment unit

Claims (18)

正相正弦波信号と当該正相正弦波信号を位相反転した逆相正弦波信号とを含む差動正弦波信号、及び、正相余弦波信号と当該正相余弦波信号を位相反転した逆相余弦波信号とを含む差動余弦波信号を、モータの位置検出信号として出力する位置検出センサと、
前記位置検出信号に基づき、前記モータの位置を検出する位置検出部と、
を備え、
前記位置検出部は、
前記正相正弦波信号と前記逆相正弦波信号との差分を第1正弦波信号として出力し、前記正相余弦波信号と前記逆相余弦波信号との差分を第1余弦波信号として出力する差分演算部と、
前記第1正弦波信号の最大値又は最小値に基づき、前記第1正弦波信号のゲインを補正した第2正弦波信号を出力すると共に、前記第1余弦波信号の最大値又は最小値に基づき、前記第1余弦波信号のゲインを補正した第2余弦波信号を出力する第1ゲイン補正部と、
前記第2余弦波信号と前記第2正弦波信号とを加算して第3正弦波信号を生成し、前記第3正弦波信号の最大値又は最小値に基づき、前記第3正弦波信号のゲインを補正した第4正弦波信号を出力すると共に、前記第2余弦波信号から前記第2正弦波信号を減算して第3余弦波信号を生成し、前記第3余弦波信号の最大値又は最小値に基づき、前記第3余弦波信号のゲインを補正した第4余弦波信号を出力する第2ゲイン補正部と、
前記第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 signal and a negative phase obtained by inverting the positive phase cosine wave signal A position detection sensor that outputs a differential cosine wave signal including a cosine wave signal as a position detection signal of a motor;
A position detection unit that detects the position of the motor based on the position detection signal;
Equipped with
The position detection unit 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 The difference calculation unit to
While outputting the 2nd sine wave signal which corrected the gain of the 1st sine wave signal based on the maximum value or the minimum value of the 1st sine wave signal, based on the maximum value or the minimum value of the 1st cosine wave signal A first gain correction unit that outputs a second cosine wave signal obtained by correcting the gain of the first cosine wave signal;
The second cosine wave signal and the second sine wave signal are added to generate a third sine wave signal, and the gain of the third sine wave signal is generated based on the maximum value or the minimum value of the third sine wave signal. To generate a third cosine wave signal by subtracting the second sine wave signal from the second cosine wave signal and generating a third cosine wave signal; 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 a value;
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;
Rotation angle detection device.
前記第1正弦波信号の最大値及び最小値、前記第1余弦波信号の最大値及び最小値、前記第3正弦波信号の最大値及び最小値、並びに、前記第3余弦波信号の最大値及び最小値を記憶する記憶部を備える
請求項1に記載の回転角検出装置。
Maximum value and minimum value of the first sine wave signal, maximum value and minimum value of the first cosine wave signal, maximum value and minimum value of the third sine wave signal, and maximum value of the third cosine wave signal The rotation angle detection device according to claim 1, further comprising a storage unit that stores the minimum value and the minimum value.
前記第1ゲイン補正部は、
前記第1余弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第1正弦波信号の値が0以上であるとき、当該第1正弦波信号の値を前記第1正弦波信号の最大値として前記記憶部に記憶し、前記第1正弦波信号の値が0未満であるとき、当該第1正弦波信号の値を前記第1正弦波信号の最小値として前記記憶部に記憶し、
前記第1正弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第1余弦波信号の値が0以上であるとき、当該第1余弦波信号の値を前記第1余弦波信号の最大値として前記記憶部に記憶し、前記第1余弦波信号の値が0未満であるとき、当該第1余弦波信号の値を前記第1余弦波信号の最小値として前記記憶部に記憶する
請求項2に記載の回転角検出装置。
The first gain correction unit
The zero point of the first cosine wave signal is detected, and when the zero point is detected, when the value of the first sine wave signal is 0 or more, the value of the first sine wave signal is detected as the first sine wave signal. Of the first sine wave signal is stored as the minimum value of the first sine wave signal when the value of the first sine wave signal is less than 0. And
The zero point of the first sine wave signal is detected, and when the value of the first cosine wave signal is 0 or more when the zero point is detected, the value of the first cosine wave signal is set to the first cosine wave signal. Is stored in the storage unit as the maximum value of the first cosine wave signal, and when the value of the first cosine wave signal is less than 0, the value of the first cosine wave signal is stored in the storage unit as the minimum value of the first cosine wave signal The rotation angle detection device according to claim 2.
前記記憶部は、
前記第1正弦波信号及び前記第1余弦波信号の最大値の上限値及び下限値、並びに、前記第1正弦波信号及び前記第1余弦波信号の最小値の上限値及び下限値が記憶され、
前記第1ゲイン補正部は、
前記第1余弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第1正弦波信号の値が0以上であるとき、前記第1正弦波信号の値が、前記第1正弦波信号の最大値の下限値以上であり、且つ、前記第1正弦波信号の最大値の上限値以下である場合に、当該第1正弦波信号の値を前記第1正弦波信号の最大値として前記記憶部に記憶し、前記第1正弦波信号の値が0未満であるとき、前記第1正弦波信号の値が、前記第1正弦波信号の最小値の下限値以上であり、且つ、前記第1正弦波信号の最小値の上限値以下である場合に、当該第1正弦波信号の値を前記第1正弦波信号の最小値として前記記憶部に記憶し、
前記第1正弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第1余弦波信号の値が0以上であるとき、前記第1余弦波信号の値が、前記第1余弦波信号の最大値の下限値以上であり、且つ、前記第1余弦波信号の最大値の上限値以下である場合に、当該第1余弦波信号の値を前記第1余弦波信号の最大値として前記記憶部に記憶し、前記第1余弦波信号の値が0未満であるとき、前記第1余弦波信号の値が、前記第1余弦波信号の最小値の下限値以上であり、且つ、前記第1余弦波信号の最小値の上限値以下である場合に、当該第1余弦波信号の値を前記第1余弦波信号の最小値として前記記憶部に記憶する
請求項2に記載の回転角検出装置。
The storage unit is
The upper limit value and the lower limit value of the maximum value of the first sine wave signal and the first cosine wave signal, and the upper limit value and the lower limit value of the minimum value of the first sine wave signal and the first cosine wave signal are stored. ,
The first gain correction unit
The zero point of the first cosine wave signal is detected, and when the value of the first sine wave signal is 0 or more at the time of the detection of the zero point, the value of the first sine wave signal is the first sine wave When it is not less than the lower limit value of the maximum value of the signal and not more than the upper limit value of the maximum value of the first sine wave signal, the value of the first sine wave signal is set as the maximum value of the first sine wave signal. When the value of the first sine wave signal stored in the storage unit is less than 0, the value of the first sine wave signal is equal to or more than the lower limit value of the minimum value of the first sine wave signal, and Storing the value of the first sine wave signal as the minimum value of the first sine wave signal in the storage unit when the value is equal to or less than the upper limit value of the minimum value of the first sine wave signal;
The zero point of the first sine wave signal is detected, and when the value of the first cosine wave signal is 0 or more when the zero point is detected, the value of the first cosine wave signal is the first cosine wave. When the value is not less than the lower limit value of the maximum value of the signal and not more than the upper limit value of the maximum value of the first cosine wave signal, the value of the first cosine wave signal is taken as the maximum value of the first cosine wave signal. When the value of the first cosine wave signal stored in the storage unit is less than 0, the value of the first cosine wave signal is not less than the lower limit value of the minimum value of the first cosine wave signal, and The rotation according to claim 2, wherein the value of the first cosine wave signal is stored as the minimum value of the first cosine wave signal when the value is equal to or less than the upper limit value of the minimum value of the first cosine wave signal. Angle detector.
前記記憶部は、
前記第1正弦波信号及び前記第1余弦波信号の最大値の初期値と前記第1正弦波信号及び前記第1余弦波信号の最小値の初期値とがさらに記憶され、
前記第1ゲイン補正部は、
前記第1余弦波信号のゼロ点検出時において、前記第1正弦波信号の値が0以上であるとき、前記第1正弦波信号の値が、前記第1正弦波信号の最大値の下限値未満であるか、又は、前記第1正弦波信号の最大値の上限値よりも大きい場合に、前記第1正弦波信号の最大値の初期値を前記第1正弦波信号の最大値として前記記憶部に記憶し、前記第1正弦波信号の値が0未満であるとき、前記第1正弦波信号の値が、前記第1正弦波信号の最小値の下限値未満であるか、又は、前記第1正弦波信号の最小値の上限値よりも大きい場合に、前記第1正弦波信号の最小値の初期値を前記第1正弦波信号の最小値として前記記憶部に記憶し、
前記第1正弦波信号のゼロ点検出時において、前記第1余弦波信号の値が0以上であるとき、前記第1余弦波信号の値が、前記第1余弦波信号の最大値の下限値未満であるか、又は、前記第1余弦波信号の最大値の上限値よりも大きい場合に、前記第1余弦波信号の最大値の初期値を前記第1余弦波信号の最大値として前記記憶部に記憶し、前記第1余弦波信号の値が0未満であるとき、前記第1余弦波信号の値が、前記第1余弦波信号の最小値の下限値未満であるか、又は、前記第1余弦波信号の最小値の上限値よりも大きい場合に、前記第1余弦波信号の最小値の初期値を前記第1余弦波信号の最小値として前記記憶部に記憶する
請求項4に記載の回転角検出装置。
The storage unit is
The initial value of the maximum value of the first sine wave signal and the first cosine wave signal, and the initial value of the minimum value of the first sine wave signal and the first cosine wave signal are further stored.
The first gain correction unit
At the time of detecting the zero point of the first cosine wave signal, when the value of the first sine wave signal is 0 or more, the value of the first sine wave signal is the lower limit value of the maximum value of the first sine wave signal. The initial value of the maximum value of the first sine wave signal is stored as the maximum value of the first sine wave signal when the value is less than or larger than the upper limit value of the maximum value of the first sine wave signal. , And when the value of the first sine wave signal is less than 0, the value of the first sine wave signal is less than the lower limit value of the minimum value of the first sine wave signal, or The initial value of the minimum value of the first sine wave signal is stored as the minimum value of the first sine wave signal in the storage unit when the value is larger than the upper limit value of the minimum value of the first sine wave signal,
At the time of detecting the zero point of the first sine wave signal, when the value of the first cosine wave signal is 0 or more, the value of the first cosine wave signal is the lower limit value of the maximum value of the first cosine wave signal. The initial value of the maximum value of the first cosine wave signal is stored as the maximum value of the first cosine wave signal when the value is less than or larger than the upper limit value of the maximum value of the first cosine wave signal. , And when the value of the first cosine wave signal is less than 0, the value of the first cosine wave signal is less than the lower limit value of the minimum value of the first cosine wave signal, or The initial value of the minimum value of the first cosine wave signal is stored as the minimum value of the first cosine wave signal in the storage unit when the value is larger 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正弦波信号の値が0未満であるとき、当該第3正弦波信号の値を前記第3正弦波信号の最小値として前記記憶部に記憶し、
前記第3正弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第3余弦波信号の値が0以上であるとき、当該第3余弦波信号の値を前記第3余弦波信号の最大値として前記記憶部に記憶し、前記第3余弦波信号の値が0未満であるとき、当該第3余弦波信号の値を前記第3余弦波信号の最小値として前記記憶部に記憶する
請求項2から請求項5の何れか一項に記載の回転角検出装置。
The second gain correction unit
The zero point of the third cosine wave signal is detected, and when the zero point is detected, when the value of the third sine wave signal is 0 or more, the value of the third sine wave signal is set to the third sine wave signal. Of the third sine wave signal is stored as the minimum value of the third sine wave signal when the value of the third sine wave signal is less than 0. And
The zero point of the third sine wave signal is detected, and when the value of the third cosine wave signal is 0 or more at the time of the detection of the zero point, the value of the third cosine wave signal is set to the third cosine wave signal. Of the third cosine wave signal is stored as the minimum value of the third cosine wave signal when the value of the third cosine wave signal is less than 0. The rotation angle detection device according to any one of claims 2 to 5.
前記記憶部は、
前記第3正弦波信号及び前記第3余弦波信号の最大値の上限値及び下限値、並びに、前記第3正弦波信号及び前記第3余弦波信号の最小値の上限値及び下限値が記憶され、
前記第2ゲイン補正部は、
前記第3余弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第3正弦波信号の値が0以上であるとき、前記第3正弦波信号の値が、前記第3正弦波信号の最大値の下限値以上であり、且つ、前記第3正弦波信号の最大値の上限値以下である場合に、当該第3正弦波信号の値を前記第3正弦波信号の最大値として前記記憶部に記憶し、前記第3正弦波信号の値が0未満であるとき、前記第3正弦波信号の値が、前記第3正弦波信号の最小値の下限値以上であり、且つ、前記第3正弦波信号の最小値の上限値以下である場合に、当該第3正弦波信号の値を前記第3正弦波信号の最小値として前記記憶部に記憶し、
前記第3正弦波信号のゼロ点を検出し、当該ゼロ点検出時において、前記第3余弦波信号の値が0以上であるとき、前記第3余弦波信号の値が、前記第3余弦波信号の最大値の下限値以上であり、且つ、前記第3余弦波信号の最大値の上限値以下である場合に、当該第3余弦波信号の値を前記第3余弦波信号の最大値として前記記憶部に記憶し、前記第3余弦波信号の値が0未満であるとき、前記第3余弦波信号の値が、前記第3余弦波信号の最小値の下限値以上であり、且つ、前記第3余弦波信号の最小値の上限値以下である場合に、当該第3余弦波信号の値を前記第3余弦波信号の最小値として前記記憶部に記憶する
請求項2から請求項5の何れか一項に記載の回転角検出装置。
The storage unit is
The upper limit value and the lower limit value of the maximum value of the third sine wave signal and the third cosine wave signal, and the upper limit value and the lower limit value of the minimum value of the third sine wave signal and the third cosine wave signal are stored. ,
The second gain correction unit
The zero point of the third cosine wave signal is detected, and when the value of the third sine wave signal is 0 or more at the time of the detection of the zero point, the value of the third sine wave signal is the third sine wave When it is not less than the lower limit value of the maximum value of the signal and not more than the upper limit value of the maximum value of the third sine wave signal, the value of the third sine wave signal is regarded as the maximum value of the third sine wave signal. When the value of the third sine wave signal stored in the storage unit is less than 0, the value of the third sine wave signal is equal to or more than the lower limit value of the minimum value of the third sine wave signal, and And storing the value of the third sine wave signal as the minimum value of the third sine wave signal in the storage unit when the value is equal to or less than the upper limit value of the minimum value of the third sine wave signal;
The zero point of the third sine wave signal is detected, and when the value of the third cosine wave signal is 0 or more at the time of the detection of the zero point, the value of the third cosine wave signal is the third cosine wave. When the value is not less than the lower limit value of the maximum value of the signal and not more than the upper limit value of the maximum value of the third cosine wave signal, the value of the third cosine wave signal is set as the maximum value of the third cosine wave signal. When the value of the third cosine wave signal stored in the storage unit is less than 0, the value of the third cosine wave signal is not less than the lower limit value of the minimum value of the third cosine wave signal, and When the value is equal to or less than the upper limit value of the minimum value of the third cosine wave signal, the value of the third cosine wave signal is stored as the minimum value of the third cosine wave signal in the storage unit. The rotation angle detection device according to any one of the above.
前記記憶部は、
前記第3正弦波信号及び前記第3余弦波信号の最大値の初期値と前記第3正弦波信号及び前記第3余弦波信号の最小値の初期値とがさらに記憶され、
前記第2ゲイン補正部は、
前記第3余弦波信号のゼロ点検出時において、前記第3正弦波信号の値が0以上であるとき、前記第3正弦波信号の値が、前記第3正弦波信号の最大値の下限値未満であるか、又は、前記第3正弦波信号の最大値の上限値よりも大きい場合に、前記第3正弦波信号の最大値の初期値を前記第3正弦波信号の最大値として前記記憶部に記憶し、前記第3正弦波信号の値が0未満であるとき、前記第3正弦波信号の値が、前記第3正弦波信号の最小値の下限値未満であるか、又は、前記第3正弦波信号の最小値の上限値よりも大きい場合に、前記第3正弦波信号の最小値の初期値を前記第3正弦波信号の最小値として前記記憶部に記憶し、
前記第3正弦波信号のゼロ点検出時において、前記第3余弦波信号の値が0以上であるとき、前記第3余弦波信号の値が、前記第3余弦波信号の最大値の下限値未満であるか、又は、前記第3余弦波信号の最大値の上限値よりも大きい場合に、前記第3余弦波信号の最大値の初期値を前記第3余弦波信号の最大値として前記記憶部に記憶し、前記第3余弦波信号の値が0未満であるとき、前記第3余弦波信号の値が、前記第3余弦波信号の最小値の下限値未満であるか、又は、前記第3余弦波信号の最小値の上限値よりも大きい場合に、前記第3余弦波信号の最小値の初期値を前記第3余弦波信号の最小値として前記記憶部に記憶する
請求項7に記載の回転角検出装置。
The storage unit is
An initial value of maximum values of the third sine wave signal and the third cosine wave signal, and an initial value of minimum values of the third sine wave signal and the third cosine wave signal are further stored;
The second gain correction unit
At the time of detecting the zero point of the third cosine wave signal, when the value of the third sine wave signal is 0 or more, the value of the third sine wave signal is the lower limit value of the maximum value of the third sine wave signal. When it is less than or larger than the upper limit value of the maximum value of the third sine wave signal, the initial value of the maximum value of the third sine wave signal is stored as the maximum value of the third sine wave signal. , And when the value of the third sine wave signal is less than 0, the value of the third sine wave signal is less than the lower limit of the minimum value of the third sine wave signal, or The initial value of the minimum value of the third sine wave signal is stored in the storage unit as the minimum value of the third sine wave signal when the value is larger than the upper limit value of the minimum value of the third sine wave signal,
At the time of detecting the zero point of the third sine wave signal, when the value of the third cosine wave signal is 0 or more, the value of the third cosine wave signal is the lower limit value of the maximum value of the third cosine wave signal. If it is less than or greater than the upper limit value of the maximum value of the third cosine wave signal, the initial value of the maximum value of the third cosine wave signal is stored as the maximum value of the third cosine wave signal. And the value of the third cosine wave signal is less than the lower limit value of the minimum value of the third cosine wave signal when the value of the third cosine wave signal is less than 0, or The initial value of the minimum value of the third cosine wave signal is stored in the storage unit as the minimum value of the third cosine wave signal when the value is larger than the upper limit value of the minimum value of the third cosine wave signal. The rotation angle detection device described.
前記差分演算部は、
前記正相正弦波信号をSinθ+、前記逆相正弦波信号をSinθ−、前記第1正弦波信号をSinθ1fとしたとき、下記式(1)を用いて、前記第1正弦波信号Sinθ1fを算出し、
前記正相余弦波信号をCosθ+、前記逆相余弦波信号をCosθ−、前記第1余弦波信号をCosθ1fとしたとき、下記式(2)を用いて、前記第1余弦波信号Cosθ1fを算出する
請求項1から請求項8の何れか一項に記載の回転角検出装置。
Sinθ1f=(Sinθ+)−(Sinθ−)・・・(1)
Cosθ1f=(Cosθ+)−(Cosθ−)・・・(2)
The difference calculation unit
Assuming that the positive phase sine wave signal is Sinθ 1 +, the opposite phase sine wave signal is Sinθ 1 −, and the first sine wave signal is Sinθ 1f , the first sine wave signal is calculated using the following equation (1) Calculate Sin θ 1f ,
Assuming that the positive phase cosine wave signal is Cos θ 1 +, the negative phase cosine wave signal is Cos θ 1 −, and the first cosine wave signal is Cos θ 1 f , the first cosine wave signal is calculated using the following equation (2) The rotation angle detection device according to any one of claims 1 to 8, which calculates Cos θ 1f .
Sin θ 1f = (Sin θ 1 +)-(Sin θ 1- ) (1)
Cos θ 1f = (Cos θ 1 +) − (Cos θ 1 −) (2)
前記第1ゲイン補正部は、
前記第1正弦波信号Sinθ1fの最大値をMAX(Sinθ1f)、前記第2正弦波信号をSinθ1gとし、前記第1正弦波信号Sinθ1fの値が0以上であるとき、下記式(3)を用いて、前記第2正弦波信号Sinθ1gを算出し、前記第1正弦波信号Sinθ1fの値が0未満であるとき、下記式(4)を用いて、前記第2正弦波信号Sinθ1gを算出する
請求項1から請求項9の何れか一項に記載の回転角検出装置。
Sinθ1g=Sinθ1f×(1/(MAX(Sinθ1f)))・・・(3)
Sinθ1g=Sinθ1f×((−1)/(MIN(Sinθ1f)))・・・(4)
The first gain correction unit
The maximum value of the first sine-wave signal Sinθ 1f MAX (Sinθ 1f), said second sine-wave signal and sin [theta 1 g, when the value of the first sine-wave signal sin [theta 1f is greater than or equal to 0, the following equation (3 To calculate the second sine wave signal Sinθ 1g, and when the value of the first sine wave signal Sinθ 1f is less than 0, the second sine wave signal Sinθ is calculated using the following equation (4): The rotation angle detection device according to any one of claims 1 to 9, which calculates 1 g .
Sinθ 1g = Sinθ 1f × (1 / (MAX (Sinθ 1f ))) (3)
Sinθ 1g = Sinθ 1f × ((-1) / (MIN (Sinθ 1f ))) (4)
前記第1ゲイン補正部は、
前記第1余弦波信号Cosθ1fの最大値をMAX(Cosθ1f)、前記第2余弦波信号をCosθ1gとし、前記第1余弦波信号Cosθ1fの値が0以上であるとき、下記式(5)を用いて、前記第2余弦波信号Cosθ1gを算出し、前記第1余弦波信号Cosθ1fの値が0未満であるとき、下記式(6)を用いて、前記第2余弦波信号Cosθ1gを算出する
請求項1から請求項10の何れか一項に記載の回転角検出装置。
Cosθ1g=Cosθ1f×(1/(MAX(Cosθ1f)))・・・(5)
Cosθ1g=Cosθ1f×((−1)/(MIN(Cosθ1f)))・・・(6)
The first gain correction unit
The maximum value of the first cosine wave signal Cosθ 1f MAX (Cosθ 1f), the second cosine wave signal and Cos? 1 g, when the value of the first cosine wave signal Cos? 1f is greater than or equal to 0, the following equation (5 And calculating the second cosine wave signal Cosθ 1g, and when the value of the first cosine wave signal Cosθ 1f is less than 0, the second cosine wave signal Cosθ is calculated using the following equation (6) The rotation angle detection device according to any one of claims 1 to 10, wherein 1 g is calculated.
Cosθ 1g = Cosθ 1f × (1 / (MAX (Cosθ 1f ))) (5)
Cosθ 1g = Cosθ 1f × ((-1) / (MIN (Cosθ 1f ))) (6)
前記第2ゲイン補正部は、
前記第3正弦波信号をVC+Sとしたとき、下記(7)式を用いて、前記第3正弦波信号VC+Sを算出し、前記第3余弦波信号をVC−Sとしたとき、下記(8)式を用いて、前記第3余弦波信号VC−Sを算出する
請求項11に記載の回転角検出装置。
C+S=Cosθ1g+Sinθ1g・・・(7)
C−S=Cosθ1g−Sinθ1g・・・(8)
The second gain correction unit
When the third sine wave signal is V C + S , the third sine wave signal V C + S is calculated using the following equation (7), and the third cosine wave signal is V C-S: The rotation angle detection device according to claim 11, wherein the third cosine wave signal V C-S is calculated using the equation (8).
V C + S = Cosθ 1g + Sinθ 1g ··· (7)
V C-S = Cosθ 1g- Sinθ 1g (8)
前記第2ゲイン補正部は、
前記第3正弦波信号VC+Sの最大値をMAX(VC+S)、前記第4正弦波信号をV1C+Sとし、前記第3正弦波信号VC+Sの値が0以上であるとき、下記式(9)を用いて、前記第4正弦波信号V1C+Sを算出し、前記第3正弦波信号VC+Sの値が0未満であるとき、下記式(10)を用いて、前記第4正弦波信号V1C+Sを算出する
請求項12に記載の回転角検出装置。
V1C+S=VC+S×(1/(MAX(VC+S)))・・・(9)
V1C+S=VC+S×((−1)/(MIN(VC+S)))・・・(10)
The second gain correction unit
When the maximum value of the third sine wave signal V C + S is MAX (V C + S ), the fourth sine wave signal is V 1 C + S, and the value of the third sine wave signal V C + S is 0 or more, the following equation (9 To calculate the fourth sine wave signal V1 C + S, and when the value of the third sine wave signal V.sub.C + S is less than 0, the fourth sine wave signal V1 is calculated using the following equation (10). The rotation angle detection device according to claim 12, which calculates C + S.
V1 C + S = V C + S x (1 / (MAX (V C + S ))) (9)
V1 C + S = V C + S x ((-1) / (MIN (V C + S ))) (10)
前記第2ゲイン補正部は、
前記第3余弦波信号VC−Sの最大値をMAX(VC−S)、前記第4余弦波信号をV1C−Sとし、前記第3余弦波信号VC−Sの値が0以上であるとき、下記式(11)を用いて、前記第4余弦波信号V1C−Sを算出し、前記第3余弦波信号VC−Sの値が0未満であるとき、下記式(12)を用いて、前記第4余弦波信号V1C−Sを算出する
請求項12又は請求項13に記載の回転角検出装置。
V1C−S=VC−S×(1/(MAX(VC−S)))・・・(11)
V1C−S=VC−S×((−1)/(MIN(VC−S)))・・・(12)
The second gain correction unit
The maximum value of the third cosine wave signal V C-S is MAX (V C-S ), the fourth cosine wave signal is V 1 C-S, and 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 fourth cosine wave signal V 1 C -S is calculated using the following equation (11). The rotation angle detection device according to claim 12 or 13, wherein the fourth cosine wave signal V1C -S is calculated using.
V1 C-S = V C-S x (1 / (MAX (V C-S ))) (11)
V1C -S = VC -S * ((-1) / (MIN (VC -S ))) (12)
前記角度算出部は、
−90deg<θ1h<+90degの範囲内における角度をθ1hとしたとき、下記式(13)式を用いて、角度θ1hを算出し、0deg<θ<360degの範囲内における前記モータの回転角をθとし、前記第4余弦波信号V1C−Sが0以上であるとき、下記式(14)式を用いて、前記モータの回転角θを算出し、前記第4余弦波信号V1C−Sが0未満であるとき、下記式(15)式を用いて、前記モータの回転角θを算出する
請求項14に記載の回転角検出装置。
θ1h=arctan(V1C+S/V1C−S)・・・(13)
θ=θ1h−45deg・・・(14)
θ=(θ1h+180deg)−45deg・・・(15)
The angle calculation unit
-90deg <when the angle theta 1h in the range of theta 1h <+ 90deg, using the following equation (13), calculates the angle theta 1h, the rotation of the motor in the range of 0deg <θ 1 <360deg Assuming that the angle is θ 1 and the fourth cosine wave signal V 1 C-S is 0 or more, the rotation angle θ 1 of the motor is calculated using the following equation (14), and the fourth cosine wave signal The rotation angle detection device according to claim 14, wherein when the V1C -S is less than 0, the rotation angle? 1 of the motor is calculated using the following equation (15).
θ 1h = arctan (V 1 C + S / V 1 C−S ) (13)
θ 1 = θ 1 h −45 deg (14)
θ 1 = (θ 1 h +180 deg) −45 deg (15)
請求項1から請求項15の何れか一項に記載の回転角検出装置を備え、
前記回転角を用いて、前記モータを駆動制御する
モータ制御装置。
A rotation angle detection device according to any one of claims 1 to 15, comprising:
A motor control device that drives and controls the motor using the rotation angle.
請求項16に記載のモータ制御装置を備え、
前記モータは、ステアリングのコラム軸又はラックに設けられ、前記ステアリングの操舵力をトルク制御する
電動パワーステアリング装置。
The motor control device according to claim 16,
The motor is provided on a column axis or a rack of steering, and performs torque control of 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 output from a position detection sensor as a position detection signal of a motor 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 A rotation angle detection method for detecting the position of the motor based on a differential cosine wave signal including a signal and an antiphase cosine wave signal obtained by inverting the phase of the positive phase cosine wave signal.
Setting the difference between the positive phase sine wave signal and the negative phase sine wave signal as a first sine wave signal;
Setting a difference between the positive phase cosine wave signal and the negative phase cosine wave signal as a first cosine wave signal;
Correcting the gain of the first sine wave signal to a second sine wave signal based on the maximum value or the minimum value of the first sine wave signal;
Correcting the gain of the first cosine wave signal based on the maximum value or the minimum value of the first cosine wave signal to obtain a second cosine wave signal;
Adding the second cosine wave signal and the second sine wave signal to obtain 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 the gain of the third cosine wave signal based on the maximum value or the 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.
JP2018007475A 2018-01-19 2018-01-19 Rotation angle detection device, motor control device, electric power steering device, and rotation angle detection method Pending JP2019124670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018007475A JP2019124670A (en) 2018-01-19 2018-01-19 Rotation angle detection device, motor control device, electric power steering device, and rotation angle detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018007475A JP2019124670A (en) 2018-01-19 2018-01-19 Rotation angle detection device, motor control device, electric power steering device, and rotation angle detection method

Publications (1)

Publication Number Publication Date
JP2019124670A true JP2019124670A (en) 2019-07-25

Family

ID=67398522

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018007475A Pending JP2019124670A (en) 2018-01-19 2018-01-19 Rotation angle detection device, motor control device, electric power steering device, and rotation angle detection method

Country Status (1)

Country Link
JP (1) JP2019124670A (en)

Similar Documents

Publication Publication Date Title
JP5679136B2 (en) Rotation angle detection device and electric power steering device provided with rotation angle detection device
JP5941871B2 (en) Electric power steering device
JP4780223B2 (en) Vehicle drive motor control device
JP6086205B2 (en) Phase difference detection device and rotation angle detection device including the same
US10298157B2 (en) Brushless motor and electric power steering apparatus
WO2019216022A1 (en) Motor control device and electric power steering device provided with same
JP5092760B2 (en) Motor control device and electric power steering device
WO2019142875A1 (en) Electric power steering device and rotation angle detection method
JP2010029028A (en) Motor controller
US10505482B2 (en) Magnetic pole direction detection device
JP2014115258A (en) Rotation angle detection device and electrically-driven power steering device having the same
JP2011097679A (en) Manufacturing method of rotation angle detection device, rotation angle detection device, motor control device and electric power steering device
CN112825467A (en) Battery current limit for permanent magnet synchronous motor drive
JP6024971B2 (en) Rotation angle detector
US9625249B2 (en) Rotation angle detection device and electric power steering system including the same
US11511803B2 (en) Rotation angle detection device, electric power steering device and method of controlling electric power steering device
JP2014219364A (en) Rotation angle detection apparatus
JP4269278B2 (en) Rotation torque direction detection device for brushless motor
JP2019144056A (en) Rotation angle detector, motor controller, electric power steering device, and rotation angle detection method
CN107465369B (en) Self-adaptive detection method and device for feedback signal of rotary transformer
JP2019124670A (en) Rotation angle detection device, motor control device, electric power steering device, and rotation angle detection method
JP6583592B1 (en) Motor control device and electric power steering device provided with the same
JP5141955B2 (en) Motor control device
JP6885531B1 (en) Detection signal correction method, motor control device and electric power steering device
JP2014142322A (en) Rotation angle detection device